mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
[Javascript] Split out JS code for ADIF and Notes pages
This commit is contained in:
@@ -20,49 +20,15 @@
|
||||
var icon_dot_url = "<?php echo base_url();?>assets/images/dot.png";
|
||||
</script>
|
||||
|
||||
<?php if ($this->uri->segment(1) == "adif") { ?>
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js"></script>
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.0.1/js/tempusdominus-bootstrap-4.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#datetimepicker1').datetimepicker({
|
||||
format: 'DD/MM/YYYY',
|
||||
});
|
||||
});
|
||||
|
||||
$(function () {
|
||||
$('#datetimepicker2').datetimepicker({
|
||||
format: 'DD/MM/YYYY',
|
||||
});
|
||||
});
|
||||
|
||||
$(function () {
|
||||
$('#datetimepicker3').datetimepicker({
|
||||
format: 'DD/MM/YYYY',
|
||||
});
|
||||
});
|
||||
|
||||
$(function () {
|
||||
$('#datetimepicker4').datetimepicker({
|
||||
format: 'DD/MM/YYYY',
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php } ?>
|
||||
<?php if ($this->uri->segment(1) == "adif") { ?>
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js"></script>
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.0.1/js/tempusdominus-bootstrap-4.min.js"></script>
|
||||
<script src="<?php echo base_url() ;?>assets/js/sections/adif.js"></script>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($this->uri->segment(1) == "notes" && ($this->uri->segment(2) == "add" || $this->uri->segment(2) == "edit") ) { ?>
|
||||
<script src="<?php echo base_url() ;?>assets/plugins/quill/quill.min.js"></script>
|
||||
|
||||
<script>
|
||||
var quill = new Quill('#quillArea', {
|
||||
placeholder: 'Compose an epic...',
|
||||
theme: 'snow'
|
||||
});
|
||||
|
||||
$("#notes_add").on("submit",function(){
|
||||
$("#hiddenArea").val(quill.root.innerHTML);
|
||||
})
|
||||
</script>
|
||||
<script src="<?php echo base_url() ;?>assets/js/sections/notes.js"></script>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($this->uri->segment(1) == "search" && $this->uri->segment(2) == "filter") { ?>
|
||||
|
||||
23
assets/js/sections/adif.js
Normal file
23
assets/js/sections/adif.js
Normal file
@@ -0,0 +1,23 @@
|
||||
$(function () {
|
||||
$('#datetimepicker1').datetimepicker({
|
||||
format: 'DD/MM/YYYY',
|
||||
});
|
||||
});
|
||||
|
||||
$(function () {
|
||||
$('#datetimepicker2').datetimepicker({
|
||||
format: 'DD/MM/YYYY',
|
||||
});
|
||||
});
|
||||
|
||||
$(function () {
|
||||
$('#datetimepicker3').datetimepicker({
|
||||
format: 'DD/MM/YYYY',
|
||||
});
|
||||
});
|
||||
|
||||
$(function () {
|
||||
$('#datetimepicker4').datetimepicker({
|
||||
format: 'DD/MM/YYYY',
|
||||
});
|
||||
});
|
||||
8
assets/js/sections/notes.js
Normal file
8
assets/js/sections/notes.js
Normal file
@@ -0,0 +1,8 @@
|
||||
var quill = new Quill('#quillArea', {
|
||||
placeholder: 'Compose an epic...',
|
||||
theme: 'snow'
|
||||
});
|
||||
|
||||
$("#notes_add").on("submit",function(){
|
||||
$("#hiddenArea").val(quill.root.innerHTML);
|
||||
})
|
||||
Reference in New Issue
Block a user