forked from phpipam/phpipam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.js
73 lines (55 loc) · 1.69 KB
/
install.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/**
* Javascript / jQuery install functions
*/
$(document).ready(function() {
/* hide error div if jquery loads ok
*********************************************/
$('div.jqueryError').hide();
$('div.loading').hide();
/* show advanced options */
$('#toggle-advanced').on('click', function() {
$("div.loading").fadeIn("fast");
$("#advanced").slideToggle("fast");
$("div.loading").fadeOut("fast");
return false;
});
/* install database */
$(document).on("click", "a.install", function() {
$("div.loading").fadeIn("fast");
var postData = $("#install").serialize();
$.post("app/install/install-execute.php", postData, function(data) {
$("div.upgradeResult").html(data).slideDown("fast");
$("div.loading").fadeOut("fast");
});
});
$(document).on("click", "div.error", function() {
$(this).stop(true,true).show();
});
/* postinstallation settings */
$('#postinstall').submit(function() {
$("div.loading").fadeIn("fast");
var postData = $(this).serialize();
$.post("app/install/postinstall_submit.php", postData, function(data) {
$("div.postinstallresult").html(data).slideDown("fast");
$("div.loading").fadeOut("fast");
});
return false;
});
/* database upgrade */
$("#manualUpgrade").click(function() {
$('#manualShow').slideToggle("fast");
return false;
});
$(document).on("click", "input.upgrade", function() {
$(this).removeClass("upgrade");
$("div.loading").fadeIn("fast");
var version = $(this).attr("version");
$.post("app/upgrade/upgrade-execute.php", {version:version}, function(data) {
$("div#upgradeResult").html(data).slideDown("fast");
$("div.loading").fadeOut("fast");
});
});
$(document).on("click", "div.error", function() {
$(this).stop(true,true).show();
});
});