git://git.onelab.eu
/
plstackapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a34b9fc
)
support for statusMsg in django's base.html
author
Scott Baker
<smbaker@gmail.com>
Thu, 6 Nov 2014 06:13:36 +0000
(22:13 -0800)
committer
Scott Baker
<smbaker@gmail.com>
Thu, 6 Nov 2014 06:13:36 +0000
(22:13 -0800)
planetstack/core/xoslib/static/js/xoslib/xosHelper.js
patch
|
blob
|
history
diff --git
a/planetstack/core/xoslib/static/js/xoslib/xosHelper.js
b/planetstack/core/xoslib/static/js/xoslib/xosHelper.js
index
417f8aa
..
1dc3bf5
100644
(file)
--- a/
planetstack/core/xoslib/static/js/xoslib/xosHelper.js
+++ b/
planetstack/core/xoslib/static/js/xoslib/xosHelper.js
@@
-33,8
+33,8
@@
XOSApplication = Marionette.Application.extend({
},
showSuccess: function(result) {
},
showSuccess: function(result) {
+ result["success"] = "success";
if (this.logTableId) {
if (this.logTableId) {
- result["success"] = "success";
this.appendLogWindow(result);
} else {
$(this.successBoxId).show();
this.appendLogWindow(result);
} else {
$(this.successBoxId).show();
@@
-47,8
+47,8
@@
XOSApplication = Marionette.Application.extend({
},
showError: function(result) {
},
showError: function(result) {
+ result["success"] = "failure";
if (this.logTableId) {
if (this.logTableId) {
- result["success"] = "failure";
this.appendLogWindow(result);
} else {
$(this.errorBoxId).show();
this.appendLogWindow(result);
} else {
$(this.errorBoxId).show();
@@
-61,8
+61,8
@@
XOSApplication = Marionette.Application.extend({
},
showInformational: function(result) {
},
showInformational: function(result) {
+ result["success"] = "information";
if (this.logTableId) {
if (this.logTableId) {
- result["success"] = "information";
return this.appendLogWindow(result);
} else {
return undefined;
return this.appendLogWindow(result);
} else {
return undefined;
@@
-90,6
+90,11
@@
XOSApplication = Marionette.Application.extend({
logTableBody = $(this.logTableId + " tbody");
logTableBody.prepend(newRow);
}
logTableBody = $(this.logTableId + " tbody");
logTableBody.prepend(newRow);
}
+
+ if (this.statusMsgId) {
+ $(this.statusMsgId).html( templateFromId("#xos-status-template")(result) );
+ }
+
return logMessageId;
},
return logMessageId;
},
@@
-162,9
+167,6
@@
XOSApplication = Marionette.Application.extend({
XOSDetailView = Marionette.ItemView.extend({
tagName: "div",
XOSDetailView = Marionette.ItemView.extend({
tagName: "div",
- events: {"click button.js-submit": "submitClicked",
- "change input": "inputChanged"},
-
events: {"click button.js-submit": "submitClicked",
"change input": "inputChanged"},
events: {"click button.js-submit": "submitClicked",
"change input": "inputChanged"},
@@
-191,6
+193,7
@@
XOSDetailView = Marionette.ItemView.extend({
},
submitClicked: function(e) {
},
submitClicked: function(e) {
+ console.log("submit clicked");
this.app.hideError();
\r
e.preventDefault();
\r
var infoMsgId = this.app.showInformational( {what: "save " + this.model.__proto__.modelName, status: "", statusText: "in progress..."} );
\r
this.app.hideError();
\r
e.preventDefault();
\r
var infoMsgId = this.app.showInformational( {what: "save " + this.model.__proto__.modelName, status: "", statusText: "in progress..."} );
\r