parent
78fc90a2cd
commit
b73e478e26
4 changed files with 20 additions and 0 deletions
|
|
@ -144,6 +144,8 @@ app.views.Publisher = Backbone.View.extend({
|
||||||
var serializedForm = $(evt.target).closest("form").serializeObject();
|
var serializedForm = $(evt.target).closest("form").serializeObject();
|
||||||
// disable input while posting, must be after the form is serialized
|
// disable input while posting, must be after the form is serialized
|
||||||
this.setInputEnabled(false);
|
this.setInputEnabled(false);
|
||||||
|
this.setButtonsEnabled(false);
|
||||||
|
this.$('#publisher_spinner').removeClass('hidden');
|
||||||
|
|
||||||
// lulz this code should be killed.
|
// lulz this code should be killed.
|
||||||
var statusMessage = new app.models.Post();
|
var statusMessage = new app.models.Post();
|
||||||
|
|
@ -179,6 +181,8 @@ app.views.Publisher = Backbone.View.extend({
|
||||||
error: function() {
|
error: function() {
|
||||||
if( app.publisher ) app.publisher.trigger('publisher:error');
|
if( app.publisher ) app.publisher.trigger('publisher:error');
|
||||||
self.setInputEnabled(true);
|
self.setInputEnabled(true);
|
||||||
|
self.setButtonsEnabled(true);
|
||||||
|
self.$('#publisher_spinner').addClass('hidden');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -346,6 +350,12 @@ app.views.Publisher = Backbone.View.extend({
|
||||||
|
|
||||||
// enable input
|
// enable input
|
||||||
this.setInputEnabled(true);
|
this.setInputEnabled(true);
|
||||||
|
|
||||||
|
// enable buttons
|
||||||
|
this.setButtonsEnabled(false);
|
||||||
|
|
||||||
|
// hide spinner
|
||||||
|
this.$('#publisher_spinner').addClass('hidden');
|
||||||
|
|
||||||
// clear location
|
// clear location
|
||||||
this.destroyLocation();
|
this.destroyLocation();
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#publisher_spinner {
|
||||||
|
position: relative;
|
||||||
|
top: 3px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
#publisher_service_icons {
|
#publisher_service_icons {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 3px;
|
top: 3px;
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,8 @@
|
||||||
|
|
||||||
.options_and_submit
|
.options_and_submit
|
||||||
.public_toggle
|
.public_toggle
|
||||||
|
%span#publisher_spinner{:class => 'hidden'}
|
||||||
|
= image_tag 'ajax-loader.gif'
|
||||||
%span#publisher_service_icons
|
%span#publisher_service_icons
|
||||||
- if current_user.services
|
- if current_user.services
|
||||||
- for service in current_user.services
|
- for service in current_user.services
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,8 @@
|
||||||
=t('cancel')
|
=t('cancel')
|
||||||
|
|
||||||
.btn-toolbar.pull-right
|
.btn-toolbar.pull-right
|
||||||
|
%span#publisher_spinner{:class => 'hidden'}
|
||||||
|
= image_tag 'ajax-loader.gif'
|
||||||
%span#publisher_service_icons
|
%span#publisher_service_icons
|
||||||
- if current_user.services
|
- if current_user.services
|
||||||
- for service in current_user.services
|
- for service in current_user.services
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue