EliJDonahue of Aras Labs
2/15/2017 - 6:45 PM

Displays a watermark image when the context item is not the current generation

Displays a watermark image when the context item is not the current generation

var itm = document.thisItem;
var inn = itm.getInnovator();

// if is_current property exists in the cache, use it
var isCurr = itm.getProperty("is_current","");

// else, retrieve is_current from the database
if(isCurr === ""){
    itm = inn.getItemById(itm.getID());
    isCurr = itm.getProperty("is_current", "");
}

// show overlay image field
var overlay = document.getElementById("img-overlay");
if (isCurr == "0") {
    overlay.style.visibility = "visible";
    overlay.style.display = "";
}