diff --git a/module/editor/js/index.js b/module/editor/js/index.js index c2b1ddc184..379148968f 100644 --- a/module/editor/js/index.js +++ b/module/editor/js/index.js @@ -1,12 +1,12 @@ $(function() { - var showHeight = $('#main').height() - $('#mainMenu').height() - 40; - $('#editWin').height(showHeight); - $('#extendWin').height(showHeight); + var showHeight = $('#main').height() - $('#mainMenu').height() - 40; + $('#editWin').height(showHeight); + $('#extendWin').height(showHeight); - $('.side-col a').click(function() - { - $('.side-col a.active').removeClass('active'); - $(this).addClass('active'); - }); + $('.side-col a').click(function() + { + $(this).closest('.side-col').find('a.text-primary').removeClass('text-primary'); + $(this).addClass('text-primary'); + }); }); diff --git a/module/editor/view/extend.html.php b/module/editor/view/extend.html.php index 291d2e6af4..7e6ab7964b 100644 --- a/module/editor/view/extend.html.php +++ b/module/editor/view/extend.html.php @@ -38,6 +38,19 @@ $(function() $this.addClass('expandable-hitarea').removeClass('collapsable-hitarea'); } }); + + $('.has-list a').on('click', function() + { + $('.has-list a.text-primary').removeClass('text-primary active'); + $(this).addClass('text-primary active'); + }).on('mouseover', function() + { + $('.has-list a:not(.active)').removeClass('text-primary'); + $(this).addClass('text-primary'); + }).on('mouseout', function() + { + if(!$(this).hasClass('active')) $(this).removeClass('text-primary'); + }); });