Introduce bulk :create, :update and :destroy

Introduce bulk :create, :update and :destroy actions to avoid doing several request in the admin schedule.
This commit is contained in:
Ana 2016-08-18 00:27:52 +02:00 committed by Ana María Martínez Gómez
parent 10561129f9
commit bcff982d3d
5 changed files with 186 additions and 136 deletions

View file

@ -51,5 +51,13 @@
:javascript
$(document).ready( function() {
Schedule.initialize("#{admin_conference_event_schedules_path(@conference)}", "#{@schedule.id}");
// When reload the page after saving, show flash messages in the url.
var url = window.location.href;
if (url.indexOf("?") > 0){
var params = (url.split("?"))[1].split(/[&=]/);
if(params[0] == 'flash' && params[2] == 'type')
showMessage(decodeURI(params[1]), params[3]);
}
Schedule.initialize("#{@conference.short_title}", "#{@schedule.id}");
});