-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
29 lines (26 loc) · 1.44 KB
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
$(document).ready(function () {
console.log("Loaded Default Form Status config")
var $modal = $('#external-modules-configure-modal');
var prefix = ExternalModules.UWMadison.defaultFormStatus.prefix;
$modal.on('show.bs.modal', function () {
// Making sure we are overriding this modules's modal only.
if ($(this).data('module') !== prefix) return;
if (typeof ExternalModules.Settings.prototype.resetConfigInstancesOld === 'undefined')
ExternalModules.Settings.prototype.resetConfigInstancesOld = ExternalModules.Settings.prototype.resetConfigInstances;
ExternalModules.Settings.prototype.resetConfigInstances = function () {
ExternalModules.Settings.prototype.resetConfigInstancesOld();
if ($modal.data('module') !== prefix) return;
$modal.find('thead').remove();
$modal.find('tr[field=json]').hide();
$modal.find('tr[field=info] a').on('click', function () {
$modal.find('tr[field=json]').toggle();
});
};
});
$modal.on('hide.bs.modal', function () {
// Making sure we are overriding this modules's modal only.
if ($(this).data('module') !== prefix) return;
if (typeof ExternalModules.Settings.prototype.resetConfigInstancesOld !== 'undefined')
ExternalModules.Settings.prototype.resetConfigInstances = ExternalModules.Settings.prototype.resetConfigInstancesOld;
});
});