Skip to content

Commit

Permalink
New styles for main nav
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkepaul authored and scott1702 committed Mar 13, 2016
1 parent 37f11f3 commit ae31619
Show file tree
Hide file tree
Showing 13 changed files with 356 additions and 256 deletions.
2 changes: 1 addition & 1 deletion admin/css/ie7.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion admin/css/ie8.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions admin/css/screen.css

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions admin/javascript/dist/bundle-leftandmain.js

Large diffs are not rendered by default.

36 changes: 18 additions & 18 deletions admin/javascript/dist/bundle-lib.js

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions admin/javascript/dist/bundle-react.js

Large diffs are not rendered by default.

45 changes: 44 additions & 1 deletion admin/javascript/src/LeftAndMain.Menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,14 @@ $.entwine('ss', function($){
// Trigger synthetic resize event. Avoid native window.resize event
// since it causes other behaviour which should be reserved for actual window dimension changes.
$('.cms-container').trigger('windowresize');

//If panel is closing
if (this.hasClass('collapsed')) this.find('li.children.opened').removeClass('opened');

//If panel is opening
if(!this.hasClass('collapsed')) {
$('.toggle-children.opened').closest('li').addClass('opened');
}
}
},

Expand All @@ -234,8 +242,40 @@ $.entwine('ss', function($){

if (fly.children('ul').first().hasClass('collapsed-flyout')) {
if (bool) { //expand
// create the clone of the list item to be displayed
// over the existing one
if (
!fly.children('ul')
.first()
.children('li')
.first()
.hasClass('clone')
) {

var li = fly.clone();
li.addClass('clone').css({

});

li.children('ul').first().remove();

li.find('span').not('.text').remove();

li.find('a').first().unbind('click');

fly.children('ul').prepend(li);
}

$('.collapsed-flyout').show();
fly.addClass('opened');
fly.children('ul').find('li').fadeIn('fast');
} else { //collapse
if(li) {
li.remove();
}
$('.collapsed-flyout').hide();
fly.removeClass('opened');
fly.find('toggle-children').removeClass('opened');
fly.children('ul').find('li').hide();
}
}
Expand All @@ -246,8 +286,8 @@ $.entwine('ss', function($){

$('.cms-menu-list .toggle').entwine({
onclick: function(e) {
this.getMenuItem().toggle();
e.preventDefault();
$(this).toogleFlyout(true);
}
});

Expand All @@ -271,6 +311,9 @@ $.entwine('ss', function($){
open: function() {
var parent = this.getMenuItem();
if(parent) parent.open();
if( this.find('li.clone') ) {
this.find('li.clone').remove();
}
this.addClass('opened').find('ul').show();
this.find('.toggle-children').addClass('opened');
},
Expand Down
Loading

0 comments on commit ae31619

Please sign in to comment.