-
-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Conflicts: config/general.yml-example
- Loading branch information
Showing
176 changed files
with
30,364 additions
and
2,107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
// ... | ||
//= require jquery | ||
//= require jquery.ui.tabs | ||
//= require jquery.ui.sortable | ||
//= require jquery.ui.effect-highlight | ||
//= require admin/bootstrap-collapse | ||
//= require admin/bootstrap-tab | ||
//= require admin/admin | ||
//= require admin/category-order | ||
//= require jquery_ujs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
$(function() { | ||
$('.save-order').each(function(index){ | ||
|
||
// identify the elements that will work together | ||
var save_button = $(this); | ||
var save_notice = save_button.next(); | ||
var save_panel = save_button.parent(); | ||
var list_element = $(save_button.data('list-id')); | ||
var endpoint = save_button.data('endpoint'); | ||
|
||
// on the first list change, show that there are unsaved changes | ||
list_element.sortable({ | ||
update: function (event, ui) { | ||
if (save_button.is('.disabled')){ | ||
save_button.removeClass("disabled"); | ||
save_notice.html(save_notice.data('unsaved-text')); | ||
save_panel.effect('highlight', {}, 2000); | ||
} | ||
} | ||
}); | ||
// on save, POST to endpoint | ||
save_button.click(function(){ | ||
if (!save_button.is('.disabled')){ | ||
var data = list_element.sortable('serialize', {'attribute': 'data-id'}); | ||
var update_call = $.ajax({ data: data, type: 'POST', url: endpoint }); | ||
|
||
// on success, disable the save button again, and show success notice | ||
update_call.done(function(msg) { | ||
save_button.addClass('disabled'); | ||
save_panel.effect('highlight', {}, 2000); | ||
save_notice.html(save_notice.data('success-text')); | ||
}) | ||
// on failure, show error message | ||
update_call.fail(function(jqXHR, msg) { | ||
save_panel.effect('highlight', {'color': '#cc0000'}, 2000); | ||
save_notice.html(save_notice.data('error-text') + jqXHR.responseText); | ||
}); | ||
} | ||
return false; | ||
}) | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,11 @@ | ||
/* Layout for user pages */ | ||
|
||
#user_profile_search { | ||
#search_form { | ||
margin-top: 2rem; | ||
} | ||
|
||
#request_latest_status { | ||
width: 300px; | ||
} | ||
} |
Oops, something went wrong.