-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmigration.js
More file actions
45 lines (41 loc) · 1.26 KB
/
migration.js
File metadata and controls
45 lines (41 loc) · 1.26 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// $Id$
if (Drupal.jsEnabled) {
$(document).ready(function() {
$('#migration-start-monitor').click(function() {
$.getJSON(Drupal.settings.basePath + 'migration/start', function(json) {
$('#migration-monitor-switch').html(json.divHtml);
reapplyStopEvent();
alert(json.response);
});
return false;
});
$('#migration-stop-monitor').click(function() {
$.getJSON(Drupal.settings.basePath + 'migration/stop', function(json) {
$('#migration-monitor-switch').html(json.divHtml);
reapplyStartEvent();
alert(json.response);
});
return false;
});
})
function reapplyStartEvent() {
$('#migration-start-monitor').click(function() {
$.getJSON(Drupal.settings.basePath + 'migration/start', function(json) {
$('#migration-monitor-switch').html(json.divHtml);
reapplyStopEvent();
alert(json.response);
});
return false;
});
}
function reapplyStopEvent() {
$('#migration-stop-monitor').click(function() {
$.getJSON(Drupal.settings.basePath + 'migration/stop', function(json) {
$('#migration-monitor-switch').html(json.divHtml);
reapplyStartEvent();
alert(json.response);
});
return false;
});
}
}