[Rt-commit] rt branch, 4.6/core-rightinspector, updated. rt-4.4.4-373-gdf0835109
Michel Rodriguez
michel at bestpractical.com
Thu Sep 5 08:40:49 EDT 2019
The branch, 4.6/core-rightinspector has been updated
via df08351090b621372d0858cdd17886c5462fa364 (commit)
from dcb032b4dafa4f1f4848aa02e79333416040b81b (commit)
Summary of changes:
share/static/js/rights-inspector.js | 2 +-
share/static/js/util.js | 13 +++++++++++++
2 files changed, 14 insertions(+), 1 deletion(-)
- Log -----------------------------------------------------------------
commit df08351090b621372d0858cdd17886c5462fa364
Author: michel <michel at bestpractical.com>
Date: Thu Sep 5 14:39:21 2019 +0200
Added generation of the proper URL in the JS even if the RT URL is not /
diff --git a/share/static/js/rights-inspector.js b/share/static/js/rights-inspector.js
index cd49fc819..6ddcf9d6a 100644
--- a/share/static/js/rights-inspector.js
+++ b/share/static/js/rights-inspector.js
@@ -199,7 +199,7 @@ function render_inspector_result (item) {
+ ' <div class="object cell col-md-3">' + render_inspector_record( item.object) + '</div>'
+ ' <div class="right cell col-md-3">' + item.right_highlighted + '</div>'
+ ' <div class="revoke cell col-md-2">'
- + ' <button type="button" data-action="/Helpers/RightsInspector/Revoke?id=' + item.ace.id + '" ' + revoke + '>Revoke</button>'
+ + ' <button type="button" data-action="' + rt_home() + 'Helpers/RightsInspector/Revoke?id=' + item.ace.id + '" ' + revoke + '>Revoke</button>'
+ ' </div>'
+ '</div>'
;
diff --git a/share/static/js/util.js b/share/static/js/util.js
index 992fd78c5..3096c9d89 100644
--- a/share/static/js/util.js
+++ b/share/static/js/util.js
@@ -631,3 +631,16 @@ function toggle_hide_unset(e) {
return false;
}
+
+// home is included in all RT pages, and is generated in Mason by the server from the
+// WebPath config variable, so it should be accurate
+function rt_home () {
+ var home= jQuery('#home').attr( 'href');
+ // additional safety measure, in case the home url does not include a trailing /
+ if( ! home.match( /\/$/) ) {
+ home = home + '/';
+ }
+ return home;
+}
+
+
-----------------------------------------------------------------------
More information about the rt-commit
mailing list