<script src="{{ STATIC_URL }}/js/xoslib/xosHelper.js"></script>
<script src="{{ STATIC_URL }}/js/xosAdminSite.js"></script>
+<script type="text/template" id="xos-log-template">
+ <tr id="<%= logMessageId %>" class="xos-log xos-<%= statusclass %>">
+ <td><%= what %><br>
+ <%= status %> <%= statusText %>
+ </td>
+ </tr>
+</script>
+
<div id="contentPanel">
<div id="contentTitle">
</div>
<div class="box save-box" id="xos-listview-button-box">
<button class="btn btn-high btn-success btn-xos-contentButtonPanel" onclick="$('button.btn-xos-add').click()">Add</button>
</div>
+<div class="box" id="logPanel">
+<table id="logTable">
+<tbody>
+</tbody>
+</table> <!-- end logTable -->
+</div> <!-- end logPanel -->
</div> <!-- end contentButtonPanel -->
<div id="contentInner">
<div id="tabs">
</div> <!-- end contentInner -->
</div> <!-- end contentPanel -->
-<div id="logPanel">
-<table id="logTable">
-<thead>
-<tr><th>status</th><th>operation</th><th>code</th><th>message</th></tr>
-</thead>
-<tbody>
-</tbody>
-</table>
-
-</div>
-
{% include 'xosAdmin.html' %}
<script src="{{ STATIC_URL }}/js/xoslib/xosHelper.js"></script>
<script src="{{ STATIC_URL }}/js/xosAdminSite.js"></script>
+<script type="text/template" id="xos-log-template">
+ <tr id="<%= logMessageId %>" class="xos-log xos-<%= statusclass %>">
+ <td><%= what %></td>
+ <td><%= status %></td>
+ <td><%= statusText %></td>
+ </tr>
+</script>
+
<div id="headerPanel">
{% include 'xosAdminHeader.html' %}
</div>
display: none;
}
-#logPanel {
- display: none;
+#logTable {
+ width: 100%;
+}
+
+#logTable tr {
+ border-bottom: 1px solid;
+}
+
+#logTable tr:last-child {
+ border-bottom: none;\r
}
#contentButtonPanel {
color:blue;
text-decoration:underline;
}
-#logTable td, th {
- border: 1px solid black;
+
+.xos-log.xos-success {
+ background-color: #00ff00;
+}
+
+.xos-log.xos-inprog {
+ background-color: #ffff00;
+}
+
+.xos-log.xos-failure {
+ background-color: #ff0000;
}
.btn-xosnav {
display: none;
}
+
collection_name = name + "s";
region_name = name + "List";
detailNavLink = collection_name;
+ listNavLink = collection_name;
detailClass = XOSDetailView.extend({
template: detail_template,\r
app: XOSAdminApp,\r
+ listNavLink: listNavLink,\r
});\r
XOSAdminApp[collection_name + "DetailView"] = detailClass;\r
},
showSuccess: function(result) {
- result["success"] = "success";
+ result["statusclass"] = "success";
if (this.logTableId) {
this.appendLogWindow(result);
} else {
},
showError: function(result) {
- result["success"] = "failure";
+ result["statusclass"] = "failure";
if (this.logTableId) {
this.appendLogWindow(result);
} else {
},
showInformational: function(result) {
- result["success"] = "information";
+ result["statusclass"] = "inprog";
if (this.logTableId) {
return this.appendLogWindow(result);
} else {
console.log("saveLeave");
e.preventDefault();
this.save();
+ this.app.Router.navigate(this.listNavLink, {trigger: true});
+ console.log("route to " + this.listNavLink);
},
submitAddAnotherClicked: function(e) {
<button class="btn btn-default btn-xosnav" onclick="<%= router %>.navigate('<%= routeUrl %>', {trigger: true})"><%= name %></button><br>
</script>
-<script type="text/template" id="xos-log-template">
- <tr id="<%= logMessageId %>">
- <td><%= success %></td>
- <td><%= what %></td>
- <td><%= status %></td>
- <td><%= statusText %></td>
- </tr>
-</script>
-
<script type="text/template" id="xos-status-template">
- <%= what %>: [<%= success %>] <%= statusText %> (<%= status %>)
+ <div class="xos-status xos-<%= statusclass %>"><%= what %>: <%= statusText %> (<%= status %>)</div>
</script>
<script type="text/template" id="xos-tabs-template">