Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opentext Content Server 22.3 - Appearances

Status
Not open for further replies.

oscript

Programmer
Mar 25, 2003
63
GB
All,

Does anyone have a working example of an appearance that they can share that works in OTCS 22.x ? I have an appearance which works as designed in 16.2 (essentially some javascript which refences a .gif and has the effect that an additional button appears at the top right of the screen in the classic view and allows for additional functionality to be accessed) but not in 22.3 or 22.4. There is no error shown in the console and the appearance is enabled globally.

I have raised this with OT but as yet they do not seem to know why and are themselves so far unable to provide a working example in 22.x.

Any insight appreciated - if it helps this is the .js file which is referenced as a global appearance and resides in a folder on the servers file system (D:\OPENTEXT\support\sampleappearance) - if it has any effect (doesn't for me in cs22.3) then you should see some console activity using the dev tools as you navigate through the OT hierarchy:

$(function(){
var objId = gup('objId');

// Log objId to the console if available, or log a message if not available
if (objId != null && objId != '') {
console.log('Appearance - objId:', objId);
var uri = location.href;
var nexturl = encodeURIComponent(uri);
var url = "//" + location.host + location.pathname + '?func=ll&objId='+objId+'&objAction=adddocumenttosiblings&nextURL=' + nexturl;
var html = '<DIV class=toolbar-menu-seperator><A class=toolbar-additem-button title="Add Document to Somewhere" href="' + url + '"><SPAN style="BACKGROUND-IMAGE: url(/img/ms/anytestimage.gif)" class=ico-doc-add>Add Document to Somewhere</SPAN></A></DIV>';

//Check the breadcrumb trail or drop down menu to see if we're in the appropriate file structure
if ($('#LocationDropdownMenu div:nth-child(3) a').text() == "Child Files") {
$('.toolbar-background').prepend(html);
}

if ($('.breadcrumbs-trail a:nth-child(3)').attr('tNode') == 'Target Folder of Files' ) {
$('.toolbar-background').prepend(html);
}
} else {
console.log('Appearance - No objId obtained.');
}
});


function gup( name ){
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( window.location.href );
if( results == null ) return "";
else return results[1];
}

Any help appreciated - just a simple console.log 'appearance' but one that works in 22.x would confirm that there is an issue with my setup rather than a fundamental problem with appearances inn versions of OTCS since 22.x,

Steven
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top