forked from WebGoat/WebGoat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request WebGoat#61 from misfir3/master
Recent UI Fixes
- Loading branch information
Showing
5 changed files
with
91 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
webgoat-container/src/main/webapp/js/goatApp/view/MenuButtonView.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// | ||
//UserAndInfoView | ||
define(['jquery', | ||
'underscore', | ||
'backbone'], | ||
function($, | ||
_, | ||
Backbone) { | ||
return Backbone.View.extend({ | ||
el:'#toggle-menu', //Check this, | ||
|
||
initialize: function() { | ||
this.$el.on('click',this.toggleMenu); | ||
}, | ||
|
||
toggleMenu: function() { | ||
//left | ||
if (!$('.sidebarRight').hasClass('.sidebar-toggle-right')) { | ||
$('.sidebarRight').removeClass('sidebar-toggle-right'); | ||
$('.main-content-wrapper').removeClass('main-content-toggle-right'); | ||
} | ||
$('.sidebar').toggleClass('sidebar-toggle'); | ||
$('.main-content-wrapper').toggleClass('main-content-toggle-left'); | ||
//e.stopPropagation(); | ||
} | ||
}); | ||
}); |
45 changes: 45 additions & 0 deletions
45
webgoat-container/src/main/webapp/js/goatApp/view/UserAndInfoView.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
//UserAndInfoView | ||
define(['jquery', | ||
'underscore', | ||
'backbone'], | ||
function($, | ||
_, | ||
Backbone) { | ||
return Backbone.View.extend({ | ||
el:'#user-and-info-nav', //Check this, | ||
|
||
events: { | ||
'click #about-button': 'showAboutModal', | ||
'click #user-menu': 'showUserMenu' | ||
}, | ||
|
||
initialize: function() { | ||
|
||
}, | ||
|
||
render:function(title) { | ||
}, | ||
|
||
showUserMenu: function() { | ||
var menu = this.$el.find('.dropdown-menu'); | ||
if (menu.is(':visible')) { | ||
menu.hide(200); | ||
} else { | ||
menu.show(400); | ||
/*menu.on('mouseout', function() { | ||
$('#user-and-info-nav .dropdown-menu').hide(200); | ||
});*/ | ||
} | ||
|
||
}, | ||
|
||
showAboutModal: function() { | ||
$('#about-modal').show(400); | ||
$('#about-modal div.modal-header button.close').unbind('click').on('click', function() { | ||
$('#about-modal').hide(200); | ||
}); | ||
} | ||
|
||
|
||
}); | ||
}); |