Latest UI changes. Add button labels on all pages.

This commit is contained in:
chouseknecht
2013-05-24 07:43:06 -04:00
parent 8b919b666f
commit b4709c5138
33 changed files with 2351 additions and 518 deletions

View File

@@ -427,11 +427,14 @@ angular.module('FormGenerator', ['GeneratorHelpers'])
var act;
for (action in this.form.statusActions) {
act = this.form.statusActions[action];
html += "<button " + this.attr(act, 'ngClick') +
"class=\"btn btn-small " + act.class + "\" ";
html += "<button " + this.attr(act, 'ngClick') + "class=\"btn";
html += (act.class) ? " " + act.class : "";
html += "\" ";
html += (act.awToolTip) ? this.attr(act,'awToolTip') : "";
html += (act.awToolTip) ? "data-placement=\"top\" " : "";
html += " >" + this.icon(act.icon) + "</button> ";
html += " >" + this.icon(act.icon);
html += (act.label) ? act.label : "";
html += "</button> ";
}
html += "</div>\n";
html += "<div class=\"status-spin\"><i class=\"icon-spinner icon-spin\" ng-show=\"statusSearchSpin == true\"></i></div>\n";

View File

@@ -102,6 +102,7 @@ angular.module('GeneratorHelpers', [])
set + "'," + "'" + iterator + "')\" class=\"input-mini";
html += (useMini) ? " field-mini-height" : "";
html += " page-size\">\n";
html += "<option value=\"10\" selected>10</option>\n";
html += "<option value=\"20\" selected>20</option>\n";
html += "<option value=\"40\">40</option>\n";
html += "<option value=\"60\">60</option>\n";

View File

@@ -143,11 +143,14 @@ angular.module('ListGenerator', ['GeneratorHelpers',])
if (list.actions[action].mode == 'all' || list.actions[action].mode == options.mode) {
if ( (list.actions[action].basePaths == undefined) ||
(list.actions[action].basePaths && list.actions[action].basePaths.indexOf(base) > -1) ) {
html += "<button " + this.attr(list.actions[action], 'ngClick') +
"class=\"btn btn-small " + list.actions[action].class + "\" ";
html += "<button " + this.attr(list.actions[action], 'ngClick') + "class=\"btn";
html += (list.actions[action].class) ? " " + list.actions[action].class : " btn-small";
html += "\" ";
html += (list.actions[action].awToolTip) ? this.attr(list.actions[action],'awToolTip') : "";
html += (list.actions[action].awToolTip) ? "data-placement=\"top\" " : "";
html += " >" + this.icon(list.actions[action].icon) + "</button> ";
html += " >" + this.icon(list.actions[action].icon);
html += (list.actions[action].label) ? " " + list.actions[action].label : "";
html += "</button> ";
}
}
}
@@ -234,9 +237,7 @@ angular.module('ListGenerator', ['GeneratorHelpers',])
html += "<td class=\"actions\">";
for (action in list.fieldActions) {
html += "<button class=\"btn";
if (list.fieldActions[action].class) {
html += " " + list.fieldActions[action].class;
}
html += (list.fieldActions[action].class) ? " " + list.fieldActions[action].class : " btn-small";
html += "\" " + this.attr(list.fieldActions[action],'ngClick');
html += (list.fieldActions[action].ngShow) ? this.attr(list.fieldActions[action],'ngShow') : "";
html += (list.fieldActions[action].awToolTip) ? this.attr(list.fieldActions[action],'awToolTip') : "";
@@ -252,7 +253,7 @@ angular.module('ListGenerator', ['GeneratorHelpers',])
// Message for when a collection is empty
html += "<tr class=\"info\" ng-show=\"" + list.name + " == null || " + list.name + ".length == 0\">\n";
html += "<td colspan=\"" + cnt + "\"><div class=\"alert alert-info\">No " + list.iterator + " records matched your search.</div></td>\n";
html += "<td colspan=\"" + cnt + "\"><div class=\"alert alert-info\">No records matched your search.</div></td>\n";
html += "</tr>\n";
// End List

View File

@@ -44,7 +44,10 @@ angular.module('Utilities',[])
'requested action. Please contact a system administrator.');
}
else if (data.non_field_errors) {
Alert('Error!', data.non_field_errors);
Alert('Error!', data.non_field_errors);
}
else if (data.detail) {
Alert(defaultMsg.hdr, defaultMsg.msg + ' ' + data.detail);
}
else if (form) {
var fieldErrors = false;