X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FResources%2Fviews%2Fthemes%2Fmaterial%2Fpublic%2Fjs%2Finit.js;h=edfdee82a933c8cbc72b8bf769aa2dacc7da86f9;hb=49e564ec159371d9fa751ba75f9f1c555d108179;hp=5e5ea8472af9de994e45bfe3b197b07afe6f59d0;hpb=d75a9fa38b24b57fbbb11d52c17d56d04387718f;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/public/js/init.js b/src/Wallabag/CoreBundle/Resources/views/themes/material/public/js/init.js index 5e5ea847..edfdee82 100755 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/public/js/init.js +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/public/js/init.js @@ -3,8 +3,9 @@ function init_filters() { if ($("div").is("#filters")) { $('#button_filters').show(); $('.button-collapse-right').sideNav({ edge: 'right' }); - $('#clean_form_filters').on('click', function(){ + $('#clear_form_filters').on('click', function(){ $('#filters input').val(''); + $('#filters :checked').removeAttr('checked'); return false; }); } @@ -17,8 +18,21 @@ $(document).ready(function(){ $('.collapsible').collapsible({ accordion : false }); + $('.datepicker').pickadate({ + selectMonths: true, + selectYears: 15, + formatSubmit: 'dd/mm/yyyy', + hiddenName: true, + format: 'dd/mm/yyyy', + }); init_filters(); + $('#nav-btn-add-tag').on('click', function(){ + $(".nav-panel-add-tag").toggle(100); + $(".nav-panel-menu").addClass('hidden'); + $("#tag_label").focus(); + return false; + }); $('#nav-btn-add').on('click', function(){ $(".nav-panel-buttom").hide(100); $(".nav-panel-add").show(100); @@ -46,4 +60,11 @@ $(document).ready(function(){ $(".nav-panels").css('background', 'transparent'); return false; }); + $(window).scroll(function () { + var s = $(window).scrollTop(), + d = $(document).height(), + c = $(window).height(); + var scrollPercent = (s / (d-c)) * 100; + $(".progress .determinate").css('width', scrollPercent+'%'); + }); });