if (data.error)
return display_flash('error', data.error);
- $('#flash_error').hide();
- $('#flash_error_content').empty();
+ $(['info', 'warning', 'error']).each(function(idx, category) {
+ $('#flash_' + category).hide();
+ $('#flash_' + category + '_content').empty();
+ });
if ((data.js || '') != '')
eval(data.js);
// console.log("current_content_type " + $('#current_content_type').val() + ' ID ' + $('#current_content_id').val());
}
+function submit_ajax_form(url, form_selector, additional_data) {
+ var separator = /\?/.test(url) ? '&' : '?';
+ $.post(url + separator + $(form_selector).serialize(), additional_data, eval_json_result);
+ return true;
+}
+
// Local Variables:
// mode: js
// End: