(41 intermediate revisions by 2 users not shown) | |||
Line 28: | Line 28: | ||
dateFormat: "dd/mm/yy", | dateFormat: "dd/mm/yy", | ||
minDate: "19/06/2017", | minDate: "19/06/2017", | ||
− | maxDate: " | + | maxDate: "31/10/2017", |
onSelect: function(dateText,inst) { | onSelect: function(dateText,inst) { | ||
var re = new RegExp(dateText + ".*?(?=<\/p>)"); | var re = new RegExp(dateText + ".*?(?=<\/p>)"); | ||
var textExtracted = notes.match(re); | var textExtracted = notes.match(re); | ||
if (textExtracted != null) { | if (textExtracted != null) { | ||
− | var toShow = "< | + | var toShow = "<h4>" + textExtracted[0].slice(0,10) + "</h4>" + textExtracted[0].slice(14); |
console.log(toShow); | console.log(toShow); | ||
} else { | } else { | ||
var toShow = null; | var toShow = null; | ||
} | } | ||
− | notePad.innerHTML = (toShow == null) ? "< | + | notePad.innerHTML = (toShow == null) ? "<h4>"+dateText+"</h4><ul><li>Slow day...</li></ul>" : toShow; |
+ | checkDatePicker(); | ||
+ | console.log("change function does trigger"); | ||
+ | var buttonPrev = "<svg viewbox=\"0 0 100 100\"><path class=\"arrow\" d=\"M 50,0 L 60,10 L 20,50 L 60,90 L 50,100 L 0,50 Z\" /></svg>"; | ||
+ | var buttonNext = "<svg viewbox=\"0 0 100 100\"><path class=\"arrow\" d=\"M 50,0 L 60,10 L 20,50 L 60,90 L 50,100 L 0,50 Z \" transform=\"translate(85,100) rotate(180)\"></svg>"; | ||
+ | console.log(buttonPrev + "\n" + buttonNext); | ||
+ | $('.ui-datepicker-prev').append(buttonPrev); | ||
+ | $('.ui-datepicker-next').append(buttonNext); | ||
+ | console.log($('.ui-datepicker-prev').html()); | ||
} | } | ||
}); | }); | ||
checkDatepicker(); | checkDatepicker(); | ||
− | |||
− | + | $(document).on('click','.ui-datepicker-next',function(){ | |
+ | var buttonPrev = "<svg viewbox=\"0 0 100 100\"><path class=\"arrow\" d=\"M 50,0 L 60,10 L 20,50 L 60,90 L 50,100 L 0,50 Z\" /></svg>"; | ||
+ | var buttonNext = "<svg viewbox=\"0 0 100 100\"><path class=\"arrow\" d=\"M 50,0 L 60,10 L 20,50 L 60,90 L 50,100 L 0,50 Z \" transform=\"translate(85,100) rotate(180)\"></svg>"; | ||
+ | $('.ui-datepicker-prev').append(buttonPrev); | ||
+ | $('.ui-datepicker-next').append(buttonNext); | ||
+ | }); | ||
+ | |||
+ | $(document).on('click','.ui-datepicker-prev',function(){ | ||
+ | var buttonPrev = "<svg viewbox=\"0 0 100 100\"><path class=\"arrow\" d=\"M 50,0 L 60,10 L 20,50 L 60,90 L 50,100 L 0,50 Z\" /></svg>"; | ||
+ | var buttonNext = "<svg viewbox=\"0 0 100 100\"><path class=\"arrow\" d=\"M 50,0 L 60,10 L 20,50 L 60,90 L 50,100 L 0,50 Z \" transform=\"translate(85,100) rotate(180)\"></svg>"; | ||
+ | $('.ui-datepicker-prev').append(buttonPrev); | ||
+ | $('.ui-datepicker-next').append(buttonNext); | ||
+ | }); | ||
+ | |||
+ | $(document).on('select','td',function(){ | ||
+ | console.log("change function does trigger"); | ||
+ | var buttonPrev = "<svg viewbox=\"0 0 100 100\"><path class=\"arrow\" d=\"M 50,0 L 60,10 L 20,50 L 60,90 L 50,100 L 0,50 Z\" /></svg>"; | ||
+ | var buttonNext = "<svg viewbox=\"0 0 100 100\"><path class=\"arrow\" d=\"M 50,0 L 60,10 L 20,50 L 60,90 L 50,100 L 0,50 Z \" transform=\"translate(85,100) rotate(180)\"></svg>" | ||
+ | $('.ui-datepicker-prev').append(buttonPrev); | ||
+ | $('.ui-datepicker-next').append(buttonNext); | ||
+ | }); | ||
+ | |||
+ | |||
+ | }); | ||
function checkDatepicker() { | function checkDatepicker() { | ||
Line 63: | Line 93: | ||
</script> | </script> | ||
− | <div id=" | + | <div class="container-fluid"> |
− | + | <div class="row"> | |
− | + | <div class="col-2"> | |
− | + | <a href="https://2017.igem.org/Team:Exeter"><img id="logo-top-left" width="100%;" src="https://static.igem.org/mediawiki/2017/2/29/T--Exeter--startpage_logo.png"></a> | |
− | + | <nav id="navbar-page" class="navbar"> <!-- classes removed from template: navbar-light bg-light--> | |
− | + | <!-- <a class="navbar-brand" href="#navbar-top">Back to top</a> --> | |
− | + | <nav class="nav nav-pills flex-column"> | |
+ | </nav> | ||
+ | </nav> | ||
+ | </div> | ||
+ | <div class="col-10" id="pageContent"> | ||
+ | <div> | ||
+ | <img class="w-25 mx-auto d-block" src="https://static.igem.org/mediawiki/2017/7/7e/T--Exeter--Notebook_logo.png"> | ||
+ | <h1 id="pageHeader">Exeter iGEM's Notebook</h1> | ||
+ | <div class="row"> | ||
+ | <div class="col-6"> | ||
+ | <div id="datepicker"> | ||
+ | </div> | ||
+ | </div> | ||
+ | <div class="col-6"> | ||
+ | <div id="notes"> | ||
+ | </div> | ||
+ | </div> | ||
+ | </div> | ||
+ | </div> | ||
+ | </div> | ||
</div> | </div> | ||
</div> | </div> | ||
− | |||
− | |||
</html> | </html> | ||
+ | {{Exeter/footer}} |
Latest revision as of 19:39, 1 November 2017