Add spinner to story when updating position

pull/6827/head
Mark Maglana 15 years ago
parent bb7a5699e9
commit d9a735270e
  1. 2
      assets/javascripts/backlog.js
  2. 8
      assets/javascripts/story.js
  3. 13
      assets/stylesheets/story.css

@ -47,6 +47,8 @@ RB.Backlog = Object.create(RB.Model, {
type: "POST",
url: RB.urlFor['reorder'],
data: stories + moveto + dropped,
beforeSend: function(xhr){ ui.item.data('this').markSaving() },
complete: function(xhr, textStatus){ ui.item.data('this').unmarkSaving() }
});
},

@ -70,6 +70,10 @@ RB.Story = Object.create(RB.Model, {
}
},
markSaving: function(){
this.$.addClass('saving');
},
saveEdits: function(){
j = this.$;
editors = j.find('.editor');
@ -106,6 +110,10 @@ RB.Story = Object.create(RB.Model, {
// Focus on the input corresponding to the field clicked
j.find( '.' + $(event.currentTarget).attr('fieldname') + '.editor' ).focus();
}
},
unmarkSaving: function(){
this.$.removeClass('saving');
}
});

@ -34,6 +34,19 @@
position:absolute;
top:7px;
}
.story.saving .checkbox{
display:none;
}
.story.saving .spinner,
.story.updating .spinner{
background-image:url('../images/indicator.gif');
display:block;
height:16px;
left:9px;
position:absolute;
top:6px;
width:16px;
}
.story .id{
background-color:#cfc;
display:block;

Loading…
Cancel
Save