[Bps-public-commit] rt-extension-rightsdebugger branch, master, updated. 17c9694920d27c37b69c71db30f3bed5e5c9ca94
Shawn Moore
shawn at bestpractical.com
Tue Feb 28 15:37:36 EST 2017
The branch, master has been updated
via 17c9694920d27c37b69c71db30f3bed5e5c9ca94 (commit)
from d531592624600b261c199918f76dfc54d746d7fb (commit)
Summary of changes:
static/css/rights-debugger.css | 5 +++++
static/js/rights-debugger.js | 13 ++++++++++---
2 files changed, 15 insertions(+), 3 deletions(-)
- Log -----------------------------------------------------------------
commit 17c9694920d27c37b69c71db30f3bed5e5c9ca94
Author: Shawn M Moore <shawn at bestpractical.com>
Date: Tue Feb 28 20:37:29 2017 +0000
Render errors
diff --git a/static/css/rights-debugger.css b/static/css/rights-debugger.css
index 680a397..f09040a 100644
--- a/static/css/rights-debugger.css
+++ b/static/css/rights-debugger.css
@@ -18,6 +18,11 @@
display: inline;
}
+#rights-debugger.error .results {
+ color: red;
+ font-weight: bold;
+}
+
#rights-debugger.refreshing .results {
opacity: 0.5;
}
diff --git a/static/js/rights-debugger.js b/static/js/rights-debugger.js
index 38f78c0..9d72fcc 100644
--- a/static/js/rights-debugger.js
+++ b/static/js/rights-debugger.js
@@ -51,8 +51,9 @@ jQuery(function () {
data: search,
timeout: 30000, /* 30 seconds */
success: function (response) {
- form.removeClass('refreshing');
- display.empty(); // just in case of race condition
+ form.removeClass('refreshing').removeClass('error');
+ display.empty();
+
var items = response.results;
jQuery.each(items, function (i, item) {
display.append(renderItem({ search: search, item: item }));
@@ -62,9 +63,15 @@ jQuery(function () {
var revokeButton = buttonForAction(key);
displayRevoking(revokeButton);
});
-
},
error: function (xhr, reason) {
+ if (reason == 'abort') {
+ return;
+ }
+
+ form.removeClass('refreshing').addClass('error');
+ display.empty();
+ display.text('Error: ' + xhr.statusText);
}
});
};
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list