Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

merge

  • Loading branch information...
commit 473a13d9d514ce8f2ef4b07b53824233998e4ebc 2 parents c8764bc + 01aac8b
@Gabino3 Gabino3 authored
Showing with 10 additions and 4 deletions.
  1. +10 −4 js/geocamMaps.js
View
14 js/geocamMaps.js
@@ -138,7 +138,7 @@ GeocamResponderMaps.MapSets = Ember.CollectionView.create({
template: Ember.Handlebars.compile(//isEditing switches this template between editing mode
'<span>{{view Ember.Checkbox checkedBinding="isChecked" }}</span>\
{{#if isEditing}}\
- {{view Ember.TextField class="editing" valueBinding="alias"}}\
+ {{view Ember.TextField class="editing" placeholderBinding="alias" valueBinding="change"}}\
<img src="icons/cancel.png" {{action cancelEdit}}/>\
<img src="icons/save.png" {{action edit}}/>\
{{else}}\
@@ -147,6 +147,7 @@ GeocamResponderMaps.MapSets = Ember.CollectionView.create({
<img src="icons/Edit.ico" {{action edit}}/>\
{{/if}} '
),
+
attributeBindings: ['draggable', 'style'],
draggable: 'true',
isChecked: false,
@@ -154,8 +155,9 @@ GeocamResponderMaps.MapSets = Ember.CollectionView.create({
style: '', //creates the orange border when moving items around
alias: '',
lastAlias: '',
- /*
- * keeps track of the edit checkbox state
+ change: '',
+ /*
+ * keeps track of the edit checkbox state
*/
_isCheckedChanged: function(){
var isChecked = this.get('isChecked');
@@ -166,11 +168,15 @@ GeocamResponderMaps.MapSets = Ember.CollectionView.create({
this.set('isEditing', !this.isEditing);
if(this.isEditing){
this.set('lastAlias', this.alias);
- }
+ } else{
+ this.set('alias', this.change);
+ this.set('change','');
+ }
},
cancelEdit: function(){
this.set('isEditing', !this.isEditing);
this.set('alias', this.lastAlias);
+ this.set('change','');
},
dragEnter: function(event){
this.set('style', "border-top: 5px solid #CD3700");
Please sign in to comment.
Something went wrong with that request. Please try again.