getLabelCSS = function(font,fontSize,fontweight,alignment,color) {
font = (font == null) ? "tohoma" : font;
fontSize = (fontSize == null) ? "9px" : fontSize;
alignment = (alignment == null) ? "left" : alignment;
color = (color == null) ? "#15428B" : color;
fontweight = (fontweight == null) ? "normal" : fontweight;
return 'style="text-align:' + alignment + ';font:' + font + ';font-size:' + fontSize + ';font-weight:'+ fontweight + ';color:' + color + '"';
}
var buttonFontStart = '
';
var buttonFontEnd = '
';
## LABELS
var TEXT_NRW = buttonFontStart + '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.systembar.nrw.label")' + buttonFontEnd;
var TEXT_FA = buttonFontStart + '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.systembar.fastadd.label2")' + buttonFontEnd;
var TEXT_BA = buttonFontStart + '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.systembar.batchadd.label")' + buttonFontEnd;
var TEXT_BC = buttonFontStart + '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.systembar.batchchange.label")' + buttonFontEnd;
var TEXT_IMPORT = buttonFontStart + '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.systembar.import.label")' + buttonFontEnd;
var TEXT_EXPORT = buttonFontStart + '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.systembar.export.label")' + buttonFontEnd;
var TEXT_SEARCH = buttonFontStart + '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.systembar.search.label")' + buttonFontEnd;
var TEXT_REFRESH = buttonFontStart + '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.systembar.refresh.label")' + buttonFontEnd;
var TEXT_BMS_HELP = buttonFontStart + '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.systembar.helpcontents")' + buttonFontEnd;
var TEXT_RN = buttonFontStart + '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.menubar.relnotes.label")' + buttonFontEnd;
var TEXT_GLOSSARY = buttonFontStart + '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.systembar.glossary.label")' + buttonFontEnd;
var TEXT_DIRECTORY = buttonFontStart + '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.systembar.directory.label")' + buttonFontEnd;
var TEXT_REDEPLOY_HELP = buttonFontStart + '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.menubar.redeployhelp.label")' + buttonFontEnd;
var TEXT_PROJ_FIND = buttonFontStart + '$findProjectCtrlLabel' + buttonFontEnd;
var TEXT_IMPORT_ITEM = buttonFontStart + '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.systembar.projectimport.label")' + buttonFontEnd;
var TEXT_IMPORT_TASK = buttonFontStart + '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.systembar.taskimport.label")' + buttonFontEnd;
var TEXT_IMPORT_USER = buttonFontStart + '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.systembar.userimport.label")' + buttonFontEnd;
var TEXT_LICENSE_INFO = buttonFontStart + '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.menubar.licenseinfo.label")' + buttonFontEnd;
var TEXT_REPORTS = buttonFontStart + '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.menubar.reports.label")' + buttonFontEnd;
var TEXT_USER_PROFILE = buttonFontStart + '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.systembar.profile.label")' + buttonFontEnd;
var TEXT_LOGOUT = buttonFontStart + '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.menubar.signout.label")' + buttonFontEnd;
var TEXT_PRINT = buttonFontStart + '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.systembar.print.label")' + buttonFontEnd;
var TEXT_ABOUT = buttonFontStart + '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.menubar.abouttempo.label")' + buttonFontEnd;
var TEXT_GLOBAL_DOCS = buttonFontStart + '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.systembar.documents.label")' + buttonFontEnd;
var TEXT_NOTIFY_USERS = buttonFontStart + '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.systembar.notify.label")' + buttonFontEnd;
## TOOLTIPS
var TOOLTIP_NRW = '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.systembar.nrw.hint")';
var TOOLTIP_FA = '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.systembar.fastadd.hint")';
var TOOLTIP_BA = '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.systembar.batchadd.hint")';
var TOOLTIP_BC = '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.systembar.batchchange.hint")';
var TOOLTIP_IMPORT = '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.systembar.import.hint")';
var TOOLTIP_EXPORT = '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.systembar.export.hint")';
var TOOLTIP_SEARCH = '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.systembar.search.hint")';
var TOOLTIP_REFRESH = '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.systembar.refresh.hint")';
var TOOLTIP_GLOSSARY = '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.systembar.glossary.hint")';
var TOOLTIP_REPORTS = '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.menubar.managereports.label")';
var TOOLTIP_USER_PROFILE = '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.systembar.profile.hint")';
var TOOLTIP_NOTIFY_USERS = '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.systembar.notify.hint")';
var TOOLTIP_GLOBAL_DOCS = '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.systembar.documents.hint")';
var TOOLTIP_DIRECTORY = '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.systembar.directory.hint")';
var TOOLTIP_GLOSSARY = '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.systembar.glossary.hint")';
var TOOLTIP_FIND_PROJECT = '$findProjectCtrlButtonHint';
var TOOLTIP_PRINT = '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.systembar.print.hint")';
## TITLES
var TITLE_HELP = '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.menubar.tempohelp.label")';
var TITLE_HOME = '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.menubar.tab.home.label")';
var TITLE_PROJECT = '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.menubatr.tab.project.label")';
var TITLE_SYSTEM = '$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.menubar.tools.label")';
## MISC LABELS
var TEXT_SIGNED_IN = buttonFontStart + '$signInName ' + '$loggedInAs' + '' + buttonFontEnd;
function logout(exit) {
var lpcp = new LPCP(document.formPosting);
var loginManager = new LoginManager();
var xmlMethodSignature = loginManager.logout(exit);
lpcp.invoke(xmlMethodSignature) ;
}
function downloadImportTemplate(mode) {
var lpcp = new LPCP(document.formPosting);
var exportManager = new ExportManager();
var xmlMethodSignature = exportManager.getImportTemplateXLS(mode);
document.formPosting.target = 'hiddenPane';
lpcp.invoke(xmlMethodSignature);
document.formPosting.target = '_self';
}
function formatProjectId(id) {
var formattedId = "";
var startCount = 12 - id.length;
for (i = 0; i < startCount; i++) {
formattedId += "0";
}
formattedId += id;
return formattedId;
}
Ext.form.VTypes["projectIdVal"]=/[0-9]/;
Ext.form.VTypes["projectIdText"]='$CommonFunctions.getEncodedTermFromResourceBundle($currentUserId, "Controls", "controls.systembar.errormsg")';
Ext.form.VTypes["projectId"]=function(v){
return Ext.form.VTypes["projectIdVal"].test(v);
}
function displayMenuButton(button,action) {
//alert(action);
}
showSystemToolbarButton = function (buttonId) {
#if ($canAccessSystemToolbar)
var buttonTC = Ext.getCmp(buttonId + 'TC');
if (buttonTC) buttonTC.enable();
#end
}
hideSystemToolbarButton = function (buttonId) {
#if ($canAccessSystemToolbar)
var buttonTC = Ext.getCmp(buttonId + 'TC');
if (buttonTC) buttonTC.disable();
#end
}
appWindowSupportsReports = function () {
var supportsReports = true;
try {
getWindowHandle(APPLICATION_WINDOW).getReportData();
} catch (m) {supportsReports = false;}
return supportsReports;
}
launchAddReportDialog = function () {
getWindowHandle(APPLICATION_WINDOW).showReportDialog('newreport');
}