1
0
mirror of https://github.com/ohwgiles/laminar.git synced 2026-03-02 03:40:21 +00:00

report running state, only show spinner when actually running

This commit is contained in:
Oliver Giles
2015-12-06 12:15:05 +01:00
parent 87ebf91f1e
commit f181c87d3b
5 changed files with 12 additions and 5 deletions

View File

@@ -306,7 +306,10 @@ angular.module('laminar',['ngRoute','ngSanitize'])
.run(function($rootScope) {
angular.extend($rootScope, {
runIcon: function(result) {
return result === "success" ? '<span style="color:forestgreen;font-family:\'Zapf Dingbats\';">✔</span>' : result === "failed" ? '<span style="color:crimson;">✘</span>' : '';
return result === "success" ? '<span style="color:forestgreen;font-family:\'Zapf Dingbats\';">✔</span>' : result === "failed" || result === "aborted" ? '<span style="color:crimson;">✘</span>' : '';
},
runComplete: function(run) {
return !!run && (run.result === 'aborted' || run.result === 'failed' || run.result === 'success');
},
formatDate: function(unix) {
// TODO reimplement when toLocaleDateString() accepts formatting