[Kimchi-devel] [PATCH] [Kimchi 4/9] Issue 773: Snapshot error message showed behind edit window
sguimaraes943 at gmail.com
sguimaraes943 at gmail.com
Mon Dec 14 20:10:29 UTC 2015
From: samhenri <samuel.guimaraes at eldorado.org.br>
Updated wok.message.error instances in kimchi.api.js to show some error messages inside modal windows. If the container provided is not found in the DOM, wok.message.js will display the error message within the default container.
Signed-off-by: samhenri <samuel.guimaraes at eldorado.org.br>
---
ui/js/src/kimchi.api.js | 38 ++++++++++++++++++++------------------
1 file changed, 20 insertions(+), 18 deletions(-)
diff --git a/ui/js/src/kimchi.api.js b/ui/js/src/kimchi.api.js
index cb6aaab..40f9f4f 100644
--- a/ui/js/src/kimchi.api.js
+++ b/ui/js/src/kimchi.api.js
@@ -523,8 +523,9 @@ var kimchi = {
};
kimchi.getTask(taskID, onTaskResponse, err);
- if(kimchi.trackingTasks.indexOf(taskID) < 0)
+ if(kimchi.trackingTasks.indexOf(taskID) < 0) {
kimchi.trackingTasks.push(taskID);
+ }
},
deleteStoragePool : function(poolName, suc, err) {
@@ -539,7 +540,7 @@ var kimchi = {
},
changePoolState : function(poolName, state, suc, err) {
- if (state === 'activate' || state === 'deactivate')
+ if (state === 'activate' || state === 'deactivate') {
$.ajax({
url : 'plugins/kimchi/storagepools/' + encodeURIComponent(poolName) + '/' + state,
type : 'POST',
@@ -548,6 +549,7 @@ var kimchi = {
success : suc,
error : err
});
+ }
},
listNetworks : function(suc, err) {
@@ -780,7 +782,7 @@ var kimchi = {
dataType : 'json',
success : suc,
error : err || function(data) {
- wok.message.error(data.responseJSON.reason);
+ wok.message.error(data.responseJSON.reason,'#alert-modal-container');
}
});
},
@@ -794,7 +796,7 @@ var kimchi = {
data : JSON.stringify(interface),
success : suc,
error : err || function(data) {
- wok.message.error(data.responseJSON.reason);
+ wok.message.error(data.responseJSON.reason,'#alert-modal-container');
}
});
},
@@ -807,7 +809,7 @@ var kimchi = {
dataType : 'json',
success : suc,
error : err ? err : function(data) {
- wok.message.error(data.responseJSON.reason);
+ wok.message.error(data.responseJSON.reason,'#alert-modal-container');
}
});
},
@@ -821,7 +823,7 @@ var kimchi = {
dataType : 'json',
success: suc,
error: err ? err : function(data) {
- wok.message.error(data.responseJSON.reason);
+ wok.message.error(data.responseJSON.reason,'#alert-modal-container');
}
});
},
@@ -836,7 +838,7 @@ var kimchi = {
async : false,
success : suc && suc(data),
error : err ? err : function(data) {
- wok.message.error(data.responseJSON.reason);
+ wok.message.error(data.responseJSON.reason,'#alert-modal-container');
}
});
},
@@ -850,7 +852,7 @@ var kimchi = {
resend : true,
success : suc,
error : err ? err : function(data) {
- wok.message.error(data.responseJSON.reason);
+ wok.message.error(data.responseJSON.reason,'#alert-modal-container');
}
});
},
@@ -864,7 +866,7 @@ var kimchi = {
resend : true,
success : suc,
error : err ? err : function(data) {
- wok.message.error(data.responseJSON.reason);
+ wok.message.error(data.responseJSON.reason,'#alert-modal-container');
}
});
},
@@ -878,7 +880,7 @@ var kimchi = {
resend : true,
success : suc,
error : err ? err : function(data) {
- wok.message.error(data.responseJSON.reason);
+ wok.message.error(data.responseJSON.reason,'#alert-modal-container');
}
});
},
@@ -892,7 +894,7 @@ var kimchi = {
resend : true,
success : suc,
error : err ? err : function(data) {
- wok.message.error(data.responseJSON.reason);
+ wok.message.error(data.responseJSON.reason,'#alert-modal-container');
}
});
},
@@ -906,7 +908,7 @@ var kimchi = {
resend : true,
success : suc,
error : err ? err : function(data) {
- wok.message.error(data.responseJSON.reason);
+ wok.message.error(data.responseJSON.reason,'#alert-modal-container');
}
});
},
@@ -922,7 +924,7 @@ var kimchi = {
resend : true,
success : suc,
error : err ? err : function(data) {
- wok.message.error(data.responseJSON.reason);
+ wok.message.error(data.responseJSON.reason,'#alert-modal-container');
}
});
},
@@ -1067,7 +1069,7 @@ var kimchi = {
resend : true,
success : suc,
error : err ? err : function(data) {
- wok.message.error(data.responseJSON.reason);
+ wok.message.error(data.responseJSON.reason, '#alert-modal-container');
}
});
},
@@ -1082,7 +1084,7 @@ var kimchi = {
resend : true,
success : suc,
error : err ? err : function(data) {
- wok.message.error(data.responseJSON.reason);
+ wok.message.error(data.responseJSON.reason, '#alert-modal-container');
}
});
},
@@ -1095,7 +1097,7 @@ var kimchi = {
dataType : 'json',
success : suc,
error : err ? err : function(data) {
- wok.message.error(data.responseJSON.reason);
+ wok.message.error(data.responseJSON.reason, '#alert-modal-container');
}
});
},
@@ -1108,7 +1110,7 @@ var kimchi = {
dataType : 'json',
success : suc,
error : err ? err : function(data) {
- wok.message.error(data.responseJSON.reason);
+ wok.message.error(data.responseJSON.reason, '#alert-modal-container');
}
});
},
@@ -1121,7 +1123,7 @@ var kimchi = {
dataType : 'json',
success : suc,
error : err ? err : function(data) {
- wok.message.error(data.responseJSON.reason);
+ wok.message.error(data.responseJSON.reason, '#alert-modal-container');
}
});
},
--
1.9.3
More information about the Kimchi-devel
mailing list