diff --git a/admin/themes/default/css/overrides.css b/admin/themes/default/css/overrides.css index 8fe091112..10d0b7e8b 100644 --- a/admin/themes/default/css/overrides.css +++ b/admin/themes/default/css/overrides.css @@ -1,2 +1,28 @@ -/* This stylesheet should be used to add your custom styles to the back-office without using the Sass sources. It will be loaded after all the default styles. -You should NOT edit any other exisiting back-office CSS file manually: they are generated by the Sass preprocessor: http://www.sass-lang.com/ . */ \ No newline at end of file + /*This stylesheet should be used to add your custom styles to the back-office without using the Sass sources. It will be loaded after all the default styles. */ +/*You should NOT edit any other exisiting back-office CSS file manually: they are generated by the Sass preprocessor: http://www.sass-lang.com/ . */ + +.datepicker2 { + background: #fff; + position: absolute; + z-index: 99999; + width: 14rem; +} + +.bootstrap #datepicker .daterangepicker thead tr th { + color: #fff; + font-size: .8em; + height: 2.5em; +} + +.bootstrap #datepicker .daterangepicker thead tr:first-child th { + font-size: 1.2em; +} + +.form-date-actions { + bottom: -25px; + position: absolute; + width: 100%; + z-index: 999; + background-color: #fff; + border: solid 1px #ccc; +} diff --git a/admin/themes/default/js/calendar.js b/admin/themes/default/js/calendar.js index eed8c7bbf..81f975c19 100644 --- a/admin/themes/default/js/calendar.js +++ b/admin/themes/default/js/calendar.js @@ -292,9 +292,15 @@ $( document ).ready(function() { "start": $("#date-start").val(), "end": $("#date-end").val() }).on('changeDate', function(ev){ - if (ev.date.valueOf() >= datepickerEnd.date.valueOf()){ - datepickerEnd.setValue(ev.date.setMonth(ev.date.getMonth()+1)); - } + // if (ev.date.valueOf() >= datepickerEnd.date.valueOf()){ + // datepickerEnd.setValue(ev.date.setMonth(ev.date.getMonth()+1)); + // } + }).data('daterangepicker'); + $('#testdatepic').daterangepicker({ + "dates": translated_dates, + "weekStart": 1, + "start": $("#date-start").val(), + "end": $("#date-end").val() }).data('daterangepicker'); datepickerEnd = $('.datepicker2').daterangepicker({ @@ -308,31 +314,31 @@ $( document ).ready(function() { } }).data('daterangepicker'); - //Set first date picker to month -1 if same month + // Set first date picker to month -1 if same month startDate = Date.parseDate($("#date-start").val(), $("#date-start").data('date-format')); endDate = Date.parseDate($("#date-end").val(), $("#date-end").data('date-format')); if (startDate.getFullYear() == endDate.getFullYear() && startDate.getMonth() == endDate.getMonth()) datepickerStart.setValue(startDate.subMonths(1)); - //Events binding + // Events binding $("#date-start").focus(function() { datepickerStart.setCompare(false); - datepickerEnd.setCompare(false); + // datepickerEnd.setCompare(false); $(".date-input").removeClass("input-selected"); $(this).addClass("input-selected"); }); $("#date-end").focus(function() { datepickerStart.setCompare(false); - datepickerEnd.setCompare(false); + // datepickerEnd.setCompare(false); $(".date-input").removeClass("input-selected"); $(this).addClass("input-selected"); }); $("#date-start-compare").focus(function() { datepickerStart.setCompare(true); - datepickerEnd.setCompare(true); + // datepickerEnd.setCompare(true); $('#compare-options').val(3); $(".date-input").removeClass("input-selected"); $(this).addClass("input-selected"); @@ -340,7 +346,7 @@ $( document ).ready(function() { $("#date-end-compare").focus(function() { datepickerStart.setCompare(true); - datepickerEnd.setCompare(true); + // datepickerEnd.setCompare(true); $('#compare-options').val(3); $(".date-input").removeClass("input-selected"); $(this).addClass("input-selected"); @@ -363,8 +369,8 @@ $( document ).ready(function() { } else { datepickerStart.setStartCompare(null); datepickerStart.setEndCompare(null); - datepickerEnd.setStartCompare(null); - datepickerEnd.setEndCompare(null); + // datepickerEnd.setStartCompare(null); + // datepickerEnd.setEndCompare(null); $('#form-date-body-compare').hide(); $('#compare-options').prop('disabled', true); $('#date-start').focus(); @@ -380,10 +386,10 @@ $( document ).ready(function() { datepickerStart.setStartCompare($("#date-start-compare").val()); datepickerStart.setEndCompare($("#date-end-compare").val()); - datepickerEnd.setStartCompare($("#date-start-compare").val()); - datepickerEnd.setEndCompare($("#date-end-compare").val()); + // datepickerEnd.setStartCompare($("#date-start-compare").val()); + // datepickerEnd.setEndCompare($("#date-end-compare").val()); datepickerStart.setCompare(true); - datepickerEnd.setCompare(true); + // datepickerEnd.setCompare(true); if (this.value == 3) $('#date-start-compare').focus(); diff --git a/admin/themes/default/template/controllers/dashboard/helpers/view/view.tpl b/admin/themes/default/template/controllers/dashboard/helpers/view/view.tpl index 79fa3c92e..20cdc1984 100644 --- a/admin/themes/default/template/controllers/dashboard/helpers/view/view.tpl +++ b/admin/themes/default/template/controllers/dashboard/helpers/view/view.tpl @@ -38,7 +38,7 @@