aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/webui/static
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2016-11-22 17:45:52 +0800
committerAaron LI <aaronly.me@outlook.com>2016-11-22 17:45:52 +0800
commitdaaeb7cf053804dfe7e87dff545b6fdaf5568ed5 (patch)
treebabf97b0fedd9dd1784c1e81ebdd1791ba02b1c9 /fg21sim/webui/static
parent7f7c3a011d05669536354686af37643986e9c27f (diff)
downloadfg21sim-daaeb7cf053804dfe7e87dff545b6fdaf5568ed5.tar.bz2
webui: Update against the improved "showModal()"
Diffstat (limited to 'fg21sim/webui/static')
-rw-r--r--fg21sim/webui/static/js/configs.js22
-rw-r--r--fg21sim/webui/static/js/console.js10
2 files changed, 16 insertions, 16 deletions
diff --git a/fg21sim/webui/static/js/configs.js b/fg21sim/webui/static/js/configs.js
index ad8972d..c4fd317 100644
--- a/fg21sim/webui/static/js/configs.js
+++ b/fg21sim/webui/static/js/configs.js
@@ -316,14 +316,14 @@ var resetConfigs = function (url) {
// Popup a modal notification
var modalData = {};
modalData.icon = "check-circle";
- modalData.message = "Reset and synchronized the configurations.";
+ modalData.contents = "Reset and synchronized the configurations.";
showModalConfigs(modalData);
});
})
.fail(function (jqxhr) {
var modalData = {};
modalData.icon = "times-circle";
- modalData.message = "Failed to reset the configurations!";
+ modalData.contents = "Failed to reset the configurations!";
modalData.code = jqxhr.status;
modalData.reason = jqxhr.statusText;
showModalConfigs(modalData);
@@ -352,7 +352,7 @@ var setServerConfigs = function (url, data) {
.fail(function (jqxhr) {
var modalData = {};
modalData.icon = "times-circle";
- modalData.message = "Failed to update/set the configuration data!";
+ modalData.contents = "Failed to update/set the configuration data!";
modalData.code = jqxhr.status;
modalData.reason = jqxhr.statusText;
showModalConfigs(modalData);
@@ -376,7 +376,7 @@ var loadServerConfigFile = function (url, userconfig) {
.fail(function (jqxhr) {
var modalData = {};
modalData.icon = "times-circle";
- modalData.message = "Failed to load the user configuration file!";
+ modalData.contents = "Failed to load the user configuration file!";
modalData.code = jqxhr.status;
modalData.reason = jqxhr.statusText;
showModalConfigs(modalData);
@@ -402,11 +402,11 @@ var saveServerConfigFile = function (url, clobber) {
if ($("#conf-status").data("validity")) {
// Form configurations is valid :)
modalData.icon = "check-circle";
- modalData.message = "Configurations saved to file.";
+ modalData.contents = "Configurations saved to file.";
} else {
// Configurations is currently invalid!
modalData.icon = "warning";
- modalData.message = ("Configurations saved to file. " +
+ modalData.contents = ("Configurations saved to file. " +
"But there exist some invalid values!");
}
showModalConfigs(modalData);
@@ -414,7 +414,7 @@ var saveServerConfigFile = function (url, clobber) {
.fail(function (jqxhr) {
var modalData = {};
modalData.icon = "times-circle";
- modalData.message = "Failed to save the configurations!";
+ modalData.contents = "Failed to save the configurations!";
modalData.code = jqxhr.status;
modalData.reason = jqxhr.statusText;
showModalConfigs(modalData);
@@ -432,7 +432,7 @@ var existsServerFile = function (url, filepath, callback) {
.fail(function (jqxhr) {
var modalData = {};
modalData.icon = "times-circle";
- modalData.message = ("Failed to check the existence " +
+ modalData.contents = ("Failed to check the existence " +
"of the user configuration file!");
modalData.code = jqxhr.status;
modalData.reason = jqxhr.statusText;
@@ -471,7 +471,7 @@ $(document).ready(function () {
$("#reset-defaults").on("click", function () {
var modalData = {};
modalData.icon = "warning";
- modalData.message = ("Are you sure to reset the configurations?");
+ modalData.contents = ("Are you sure to reset the configurations?");
modalData.buttons = [
{
text: "Cancel",
@@ -502,7 +502,7 @@ $(document).ready(function () {
// Popup a modal notification
var modalData = {};
modalData.icon = "check-circle";
- modalData.message = "Loaded the configurations from file.";
+ modalData.contents = "Loaded the configurations from file.";
showModalConfigs(modalData);
});
});
@@ -516,7 +516,7 @@ $(document).ready(function () {
// Confirm to overwrite
var modalData = {};
modalData.icon = "warning";
- modalData.message = ("Configuration file already exists! Overwrite?");
+ modalData.contents = ("Configuration file already exists! Overwrite?");
modalData.buttons = [
{
text: "Cancel",
diff --git a/fg21sim/webui/static/js/console.js b/fg21sim/webui/static/js/console.js
index 4b2d1b7..71603ed 100644
--- a/fg21sim/webui/static/js/console.js
+++ b/fg21sim/webui/static/js/console.js
@@ -149,7 +149,7 @@ var getServerTaskStatus = function (url) {
.fail(function (jqxhr) {
var modalData = {};
modalData.icon = "times-circle";
- modalData.message = "Failed to get the task status!";
+ modalData.contents = "Failed to get the task status!";
modalData.code = jqxhr.status;
modalData.reason = jqxhr.statusText;
showModalConsole(modalData);
@@ -172,7 +172,7 @@ var startServerTask = function (url, task, kwargs) {
.fail(function (jqxhr) {
var modalData = {};
modalData.icon = "times-circle";
- modalData.message = "Failed to start the task!";
+ modalData.contents = "Failed to start the task!";
modalData.code = jqxhr.status;
modalData.reason = jqxhr.statusText;
showModalConsole(modalData);
@@ -219,14 +219,14 @@ $(document).ready(function () {
// Popup a modal notification
var modalData = {};
modalData.icon = "check-circle";
- modalData.message = "Simulation task successfully finished.";
+ modalData.contents = "Simulation task successfully finished.";
showModalConfigs(modalData);
});
});
} else {
var modalData = {};
modalData.icon = "times-circle";
- modalData.message = ("Exist invalid configuration values! " +
+ modalData.contents = ("Exist invalid configuration values! " +
"Please correct the configurations " +
"before starting the task");
showModalConsole(modalData);
@@ -257,7 +257,7 @@ $(document).ready(function () {
$("#log-delete").on("click", function () {
var modalData = {};
modalData.icon = "warning";
- modalData.message = ("Are you sure to delete all logging messages?");
+ modalData.contents = "Are you sure to delete all logging messages?";
modalData.buttons = [
{
text: "Cancel",