var MonitoringCommonConfig = { /** * The width of the popup window */ calendarWindowPopupWidth : "250", /** * The height of the popup window */ calendarWindowPopupHeight : "200", /** * Monitoring Datatype Decimal */ DATATYPE_DECIMAL : 1, /** * Monitoring Datatype Text */ DATATYPE_TEXT : 2, /** * Monitoring Datatype Number */ DATATYPE_NUMBER : 3, /** * Monitoring Datatype Date */ DATATYPE_DATE : 4, /** * Monitoring Datatype Time */ DATATYPE_TIME : 5, /** * Monitoring Datatype DateTime */ DATATYPE_DATETIME : 6, /** * Monitoring Datatype URL */ DATATYPE_URL : 7, /** * Monitoring Datatype Blob */ DATATYPE_BLOB : 8, /** * Monitoring Datatype WebService */ DATATYPE_WS : 9 }; /** * Common util object */ var CommonUtils = { /** * the div identifier to show the progressbar when ajax requests are running */ global_progressbar_popup : "global_progressbar_popup", /** * the image to appear if there is no action going on... */ client_loader_image_still_class : "global_progressbar_popup_still", /** * the path to the loader image */ client_loader_image_class : "global_progressbar_popup_active", /** * the path to the loader image */ loader_image_class : "popup_active", /** * shows the loader in the loader area * @param additionalText - additional text to show with the loader */ showLoader : function(additionalText){ var text = "Working ..."; CommonUtils.showProgressLoader(this.global_progressbar_popup, text); }, /** * shows the loader in the loader area * @param additionalText - additional text to show with the loader */ showProgressLoader : function(where, additionalText){ var loaderArea = $(where); var text = "Working ..."; if(additionalText){ text = additionalText; } if(loaderArea){ loaderArea.className = this.client_loader_image_class; } }, /** * switch between two images * @param firstImage - the first image * @param secondImage - the second image */ toggleImage : function(imageId, firstImage, secondImage){ var image = $(imageId); if(image){ if(image.src.indexOf(firstImage) > 0){ image.src = secondImage; } else { image.src = firstImage; } } }, /** * Shows the loader for the start page * @param where - where to show the loader * @param text - the text to show */ showLoginLoader : function(where, text){ var target = $(where); if(where){ target.update(text); } }, /** * This function will wait 'timeOut' milliseconds before removing the loader image */ clearLoaderDelayed : function(timeOut){ window.setTimeout("CommonUtils.clearLoader()", timeOut); }, /** * clears the loader area */ clearLoader : function(){ var loaderArea = $(this.global_progressbar_popup); if(loaderArea){ loaderArea.className = this.client_loader_image_still_class; } }, /** * clears a given div container if available * @param which - the name of the container to clear */ clearContainer : function(which){ var container = $(which); if(container){ container.innerHTML = ''; } }, preLinkSpinner : function(){ var loaderArea = $(this.global_progressbar_popup); if(loaderArea){ loaderArea.className = this.client_loader_image_class; } } };