move calendar icon path to template js init

This commit is contained in:
Max Pozdeev 2020-08-21 16:58:26 +03:00
parent 30c9cca2d4
commit 1d71b923f4
2 changed files with 19 additions and 4 deletions

View file

@ -54,7 +54,8 @@ var mytinytodo = window.mytinytodo = _mtt = {
tagPreviewDelay: 700, //milliseconds
saveShowNotes: false,
firstdayofweek: 1,
touchDevice: false
touchDevice: false,
calendarIcon: 'calendar.png' // need templateUrl+icon
},
timers: {
@ -311,13 +312,25 @@ var mytinytodo = window.mytinytodo = _mtt = {
dateFormat: _mtt.duedatepickerformat(),
firstDay: _mtt.options.firstdayofweek,
showOn: 'button',
buttonImage: _mtt.templateUrl + 'images/calendar.svg', buttonImageOnly: true,
buttonImage: _mtt.options.calendarIcon,
buttonImageOnly: true,
constrainInput: false,
duration:'',
dayNamesMin:_mtt.lang.daysMin, dayNames:_mtt.lang.daysLong, monthNamesShort:_mtt.lang.monthsLong
dayNamesMin:_mtt.lang.daysMin,
dayNames:_mtt.lang.daysLong,
monthNamesShort:_mtt.lang.monthsLong
});
$("#edittags").autocomplete('ajax.php?suggestTags', {scroll: false, multiple: true, selectFirst:false, max:8, extraParams:{list:function(){ var taskId = document.getElementById('taskedit_form').id.value; return taskList[taskId].listId; }}});
$("#edittags").autocomplete('ajax.php?suggestTags', {
scroll: false,
multiple: true,
selectFirst:false,
max:8,
extraParams:{ list:function(){
var taskId = document.getElementById('taskedit_form').id.value;
return taskList[taskId].listId;
}}
});
$('#taskedit_form').find('select,input,textarea').bind('change keypress', function(){
flag.editFormChanged = true;

View file

@ -47,9 +47,11 @@ $().ready(function(){
singletab: <?php echo (isset($_GET['singletab']) || Config::get('mobile')) ? "true" : "false"; ?>,
duedatepickerformat: "<?php echo htmlspecialchars(Config::get('dateformat2')); ?>",
firstdayofweek: <?php echo (int) Config::get('firstdayofweek'); ?>,
calendarIcon: mytinytodo.templateUrl + 'images/calendar.svg',
autotag: <?php echo Config::get('autotag') ? "true" : "false"; ?>
<?php if(isset($_GET['list'])) echo ",openList: ". (int)$_GET['list']; ?>
<?php if(Config::get('mobile')) echo ", touchDevice: true"; ?>
}).loadLists(1);
});
</script>