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

save composite name

parent fdd4a23d
No related branches found
No related tags found
No related merge requests found
......@@ -283,6 +283,11 @@ input.intInput, input.floatInput{
display: inline-block;
}
.seventyFiveWidth{
width: 75%;
display: inline-block;
}
#navRibbon{
height: 49px;
width: 400px;
......
......@@ -73,7 +73,7 @@ define(['jquery', 'underscore', 'menuParent', 'plist', 'lattice'], function($, _
template: _.template('\
<a href="#" class="btn btn-halfWidth btn-lg btn-default importJSON">Load Composite</a>\
<a id="saveComposite" href="#" class="btn btn-halfWidth btn-lg pull-right btn-default">Save Composite</a><br/><br/>\
Name: &nbsp;&nbsp;<input id="compositeName" value="<%= compositeName %>" placeholder="Enter Name" class="halfWidth form-control" type="text"><br/><br/>\
Name: &nbsp;&nbsp;<input id="compositeName" data-property="compositeName" value="<%= compositeName %>" placeholder="Enter Name" class="seventyFiveWidth form-control textInput lattice" type="text"><br/><br/>\
Bounding Box: ()<br/><br/>\
Display Color: &nbsp;&nbsp;\
<input style="border-color: <%= compositeColor %> ;" value="<%= compositeColor %>" placeholder="Enter HEX" class="halfWidth form-control" type="text"><br/><br/>\
......
......@@ -44,6 +44,18 @@ define(['jquery', 'underscore', 'plist', 'backbone', 'lattice'], function($, _,
}
if ($(".floatInput").is(":focus")) this._updateFloat(e);
if ($(".intInput").is(":focus")) this._updateInt(e);
if ($(".textInput").is(":focus")) this._updateString(e);
},
_updateString: function(e){
e.preventDefault();
var $target = $(e.target);
var property = $target.data("property");
if (!property) {
console.warn("no property associated with string input");
return;
}
this._getPropertyOwner($target).set(property, $target.val());
},
_updateFloat: function(e){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment