Displays the space properties of the projectdoc document's space currently shown in the browser.
The bookmarklet allows a quick overview over all space properties, including delegated property.
Bookmarklet
The bookmarklet is ready to use. Simply drag and drop the bookmarklet button to the bookmarks in your browser.
Code
The code is available on the resource repository.
const spaceKey = AJS.Meta.get('space-key');
const locale = AJS.Meta.get('user-locale');
const baseUrl = AJS.Meta.get('base-url');
var result = $.ajax({
url: baseUrl + "/rest/projectdoc/1/space/" + spaceKey,
async: false,
dataType: 'json'
}).responseText;
console.log("Result: " + result);
const htmlTitle = "Space Properties for " + spaceKey;
var html = "<html lang='" + locale + "'><head><title>" + htmlTitle + "</title><style>" +
" .table-sm td, .table-sm th {padding: .1rem !important;}" +
" .table td, .table th { font-size: 10px !important;}" +
"</style>" +
"<link rel=\"stylesheet\"" +
" href=\"https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css\"" +
" integrity=\"sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T\"" +
" crossorigin=\"anonymous\">" +
"</head><body><h6>" + htmlTitle + "</h6>";
html += "<table class=\"table table-sm table-bordered table-striped\">";
$.each($.parseJSON(result).property,
function (index, obj) {
html = html + "<tr><td>" + obj.source + "</td><th>" + obj.name + "</th><td>" + obj.value + "</td></tr>"
}
);
html += "</table></body></html>";
const x = window.open('', '', 'width=600,height=800,location=no,toolbar=0');
x.document.body.innerHTML = html;