Commit 763304be authored by amandaghassaei's avatar amandaghassaei

closing off parts of code that throw errors

parent 08fe0ca8
......@@ -640,4 +640,20 @@ label {
.waveformIcon {
margin-left: 10px;
width: 40px;
}
.modal-header{
text-align: center;
border: 0px;
}
.modal-content{
-webkit-border-radius:0px;
-moz-border-radius:0px;
border-radius:0px;
text-align: center;
}
#comingSoon, #genericModal{
top:20%;
}
\ No newline at end of file
......@@ -158,6 +158,18 @@
<div class="modal fade" id="genericModal" tabindex="-1" role="dialog" aria-labelledby="basicModal" aria-hidden="true"></div>
<div class="modal fade" id="comingSoon" tabindex="-1" role="dialog" aria-labelledby="basicModal" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-body">
This is in development,<br/>
coming soon.
</div>
</div>
</div>
</div>
<div id="console">
<div>
<div id="consoleOutput"></div>
......
......@@ -3,7 +3,8 @@
*/
define(['jquery', 'underscore', 'backbone', 'text!menus/templates/ModalView.html'], function($, _, Backbone, template){
define(['jquery', 'underscore', 'backbone', 'text!menus/templates/ModalView.html', 'text!menus/templates/ModalViewSmall.html'],
function($, _, Backbone, template, templateSmall){
return Backbone.View.extend({
......@@ -18,7 +19,11 @@ define(['jquery', 'underscore', 'backbone', 'text!menus/templates/ModalView.html
},
render: function(data){
this.$el.html(this.template(data));
if (data.small){
this.$el.html(this.templateSmall(data));
} else {
this.$el.html(this.template(data));
}
this.$el.modal("show");
},
......@@ -30,6 +35,7 @@ define(['jquery', 'underscore', 'backbone', 'text!menus/templates/ModalView.html
// Backbone.View.prototype.remove.call(this);
},
template: _.template(template)
template: _.template(template),
templateSmall: _.template(templateSmall)
});
});
\ No newline at end of file
......@@ -63,6 +63,11 @@ define(['jquery', 'underscore', 'backbone', 'fileSaver', 'navViewMenu', 'navHier
}
e.preventDefault();
if (navSelection == "navSim"){//choose which simulation package to pull up
var hierLevel = appState.get("hierLevel");
if (hierLevel == "element" || hierLevel == "module" || hierLevel == "system"){
$("#comingSoon").modal("show");
return;
}
this.model.set("currentNav", appState.get("materialClass") + "NavSim");
return;
} else if (navSelection == "navDesign" && appState.get("currentNav") == "navDesign"){//optionally show the design dropdown
......
<div class="modal-dialog modal-sm">
<div class="modal-content">
<% if (title != "" ){ %>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<p class="modal-title" ><%= title %></p>
</div>
<% } %>
<div class="modal-body">
<% if (text == ""){ %>
Need something here.
<% } else { %>
<%= text %>
<% } %>
</div>
</div>
</div>
\ No newline at end of file
......@@ -29,6 +29,9 @@ define(['underscore', 'backbone', 'threeModel', 'lattice', 'plist', 'emWire', 'G
var numCells = lattice.get("numCells");
if (numCells == 0){
require(["modalView"], function(ModalView){
new ModalView({small: true, title:"", text:"No cells in assembly.<br/>Please go back to 'Design' tab and add cells."});
});
console.warn("no cells");
return;
}
......
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