diff options
Diffstat (limited to 'plugins/CoreHome/javascripts/corehome.js')
-rwxr-xr-x | plugins/CoreHome/javascripts/corehome.js | 69 |
1 files changed, 9 insertions, 60 deletions
diff --git a/plugins/CoreHome/javascripts/corehome.js b/plugins/CoreHome/javascripts/corehome.js index b0ac486b10..b8951ed4c4 100755 --- a/plugins/CoreHome/javascripts/corehome.js +++ b/plugins/CoreHome/javascripts/corehome.js @@ -32,7 +32,7 @@ ajaxRequest.withTokenInUrl(); - var $titleElement = $(this); + var $titleElement = headerMessage.find('.title'); $titleElement.addClass('activityIndicator'); ajaxRequest.setCallback(function (response) { @@ -70,72 +70,21 @@ } }); - // - // section toggler behavior - // - - var handleSectionToggle = function (self, showType, doHide) { - var sectionId = $(self).attr('data-section-id'), - section = $('#' + sectionId), - showText = _pk_translate('General_Show'), - hideText = _pk_translate('General_Hide'); - - if (typeof(doHide) == 'undefined') { - doHide = section.is(':visible'); - } - - if (doHide) { - var newText = $(self).text().replace(hideText, showText), - afterHide = function () { $(self).text(newText); }; - - if (showType == 'slide') { - section.slideUp(afterHide); - } - else if (showType == 'inline') { - section.hide(); - afterHide(); - } - else { - section.hide(afterHide); - } - } - else { - var newText = $(self).text().replace(showText, hideText); - $(self).text(newText); - - if (showType == 'slide') { - section.slideDown(); - } - else if (showType == 'inline') { - section.css('display', 'inline-block'); - } - else { - section.show(); - } - } - }; - - // when click section toggler link, toggle the visibility of the associated section - $('body').on('click', 'a.section-toggler-link', function (e) { - e.preventDefault(); - handleSectionToggle(this, 'slide'); - return false; - }); - - $('body').on('change', 'input.section-toggler-link', function (e) { - handleSectionToggle(this, 'inline', !$(this).is(':checked')); - }); - }); - - - }(jQuery)); + $( document ).ready(function() { $('.accessibility-skip-to-content').click(function(e){ $('a[name="main"]').attr('tabindex', -1).focus(); $(window).scrollTo($('a[name="main"]')); }); + + $("nav .activateTopMenu").sideNav({ + closeOnClick: true, + edge: 'right', + }); + + $('select').material_select(); });
\ No newline at end of file |