Commit 42a715a0 authored by Amanda Ghassaei's avatar Amanda Ghassaei

view menu fixes

parent c144c688
......@@ -3,14 +3,15 @@
*/
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 a": "_makeSelection",
"click #reset3DView": "_reset3DNavigation"
},
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment