Skip to content
Snippets Groups Projects
Commit 42a715a0 authored by Amanda Ghassaei's avatar Amanda Ghassaei
Browse files

view menu fixes

parent c144c688
No related branches found
No related tags found
No related merge requests found
......@@ -3,15 +3,16 @@
*/
define(['jquery', 'underscore', 'backbone', 'plist', 'text!navViewMenuTemplate'], function($, _, Backbone, plist, template){
define(['jquery', 'underscore', 'backbone', 'plist', 'lattice', 'text!navViewMenuTemplate'],
function($, _, Backbone, plist, lattice, template){
return Backbone.View.extend({
el: "#navViewMenu",
events: {
"click a.boolProperty": "_makeSelection",
"click #reset3DView": "_reset3DNavigation"
"click a": "_makeSelection",
"click #reset3DView": "_reset3DNavigation"
},
initialize: function(){
......@@ -20,6 +21,7 @@ define(['jquery', 'underscore', 'backbone', 'plist', 'text!navViewMenuTemplate']
},
_makeSelection: function(e){
e.preventDefault();
var $target = $(e.target);
......@@ -46,7 +48,7 @@ define(['jquery', 'underscore', 'backbone', 'plist', 'text!navViewMenuTemplate']
},
render: function(){
this.$el.html(this.template(_.extend(this.model.toJSON(), plist)));
this.$el.html(this.template(_.extend(this.model.toJSON(), plist, lattice.toJSON())));
var self = this;
_.each($(".boolProperty"), function(item){
......
......@@ -28,7 +28,8 @@
<li class="dropdown-submenu">
<a tabindex="-1">Cells<span class="pull-right fui-arrow-right"></span></a>
<ul class="dropdown-menu">
<% _.each(allCellModes, function(mode, key){ %>
<% _.each(allCellModes, function(mode, key){
if (key == "part" && allLattices[cellType].connection[connectionType].type[latticeType].parts === null) return; %>
<li><a class="appState" data-property="cellMode" data-value="<%= key %>" href="#"><% if (cellMode == key) { %><span class="fui-check"></span><% } %><%= mode %></a></li>
<% }); %>
</ul>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment