projectdoc Toolbox

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.

Ready to use!

Bookmarklets editor

 

The Bookmarklets Extension contains a doctype that provides a bookmarklets editor to edit and create bookmarklets.

Code

The code is available on the resource repository.

display-space-properties.js
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;

Work-in-progress

 

Note that the bookmarklets we present on this page are work-in-progress.

Currently we even refer to the master branch of the bookmark's JavaScript code. This will change in future once we have proper releases for our bookmarks project.

While we use the code in our daily work, your use case may be different. Therefore please check the code and maybe fork the projectdoc Bookmarklets Project to adjust the code according to your requirements.

Resources

Display All Space Properties
Renders all properties referenced by the current space.