mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-02-06 04:35:12 -05:00
wiki: Add throbber on edit.
This commit is contained in:
@@ -152,7 +152,11 @@
|
||||
.wiki_button {
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
|
||||
.throbber {
|
||||
margin-bottom: -5px;
|
||||
}
|
||||
|
||||
// Submit Discussion button
|
||||
.discussionlink {
|
||||
display: inline-block;
|
||||
|
||||
@@ -90,12 +90,14 @@ r.wiki = {
|
||||
special.hide()
|
||||
params = r.utils.serializeForm($this)
|
||||
$('#wiki_save_button').attr("disabled", true)
|
||||
$this.addClass("working")
|
||||
r.wiki.request({
|
||||
url: url,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: params,
|
||||
error: function() {
|
||||
$this.removeClass("working")
|
||||
$('#wiki_save_button').removeAttr("disabled")
|
||||
},
|
||||
success: function() {
|
||||
|
||||
@@ -45,4 +45,5 @@
|
||||
<input type="text" name="reason" maxlength="256" id="wiki_revision_reason" />
|
||||
<input type="hidden" id="previous" name="previous" value="${thing.previous}" />
|
||||
<br/><br/><input type="submit" id="wiki_save_button" class="wiki_button" value="${_('save page')}" />
|
||||
<span class="throbber" />
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user