+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
jQuery(function($){
$(document).on('click', '.toggle-persist button', function() {
var toggle_group = $(this).parents('[data-remote-href]').first();
}).
done(function(data, status, jqxhr) {
var context = this;
- $(document).trigger('ajax:complete');
// Remove "danger" status in case a previous action failed
$('.btn-danger', context.toggle_group).
addClass('btn-info').
fail(function(jqxhr, status, error) {
var context = this;
var saved_state;
- $(document).trigger('ajax:complete');
// Add a visual indication that something failed
$(context.button).
addClass('btn-danger').
window.alert("Request failed.");
}
});
- $(document).trigger('ajax:send');
});
});