All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.wicket.ajax.wicket-ajax-debug.js Maven / Gradle / Ivy

Go to download

Pax Wicket Service is an OSGi extension of the Wicket framework, allowing for dynamic loading and unloading of Wicket components and pageSources.

There is a newer version: 5.0.0
Show newest version
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
var WicketAjaxDebug = {

	showResponseText : false,
	
	scrollLock : false,

	debugWindowId : "wicketAjaxDebugWindow",
	
	debugWindowScrollLockLinkId : "wicketAjaxDebugScrollLock",
	
	debugWindowDragHandleId : "wicketAjaxDebugWindowDragHandle",
	
	debugWindowResizeHandleId : "wicketAjaxDebugWindowResizeHandle",
	
	debugWindowLogId : "wicketAjaxDebugWindowLogId",
	
	getDebugWindow : function() {
		WicketAjaxDebug.init();
	    wicketGet(WicketAjaxDebug.debugWindowId);
	},
	
	showDebugWindow : function() {
		WicketAjaxDebug.init();
	    wicketShow(WicketAjaxDebug.debugWindowId);
	},
	
	hideDebugWindow : function() {
		WicketAjaxDebug.init();
	    wicketHide(WicketAjaxDebug.debugWindowId);
	},

    log : function(msg, label) {
		WicketAjaxDebug.init();
        var d = wicketGet(WicketAjaxDebug.debugWindowLogId);
        var c = document.createElement("div");

		msg = "" + msg;		
		msg = msg.replace(/&/g, "&");
        msg = msg.replace(//g, ">");
        msg = msg.replace(/\n/g, "
"); msg = msg.replace(/ /g, " "); msg = msg.replace(/\t/g, "    "); if (typeof(label) != "undefined") msg = "" + label + "" + msg; WicketAjaxDebug.doInnerHTML(c, msg); c.setAttribute("style","font-size: 82%; margin: 0px; padding:0px"); d.appendChild(c); if (WicketAjaxDebug.scrollLock == false) { d.scrollTop = d.scrollHeight; } }, logError : function(msg) { WicketAjaxDebug.init(); WicketAjaxDebug.log(msg, "ERROR: "); }, logInfo : function(msg) { WicketAjaxDebug.init(); WicketAjaxDebug.log(msg, "INFO: "); }, clearLog : function() { WicketAjaxDebug.init(); var d = wicketGet(WicketAjaxDebug.debugWindowLogId); d.innerHTML = ""; }, init : function() { if ( wicketAjaxDebugEnabled()) { var wad=WicketAjaxDebug; var dwid=wad.debugWindowId; var dwdhid=wad.debugWindowDragHandleId; var dwrhid=wad.debugWindowResizeHandleId; var firstTime = document.getElementById(dwid) == null; if (firstTime) { var html = ""; // Special style for Internet 6 and 7 in quirks mode if (Wicket.Browser.isIE() && (Wicket.Browser.isIEQuirks() || !Wicket.Browser.isIE7())) { html += "




© 2015 - 2025 Weber Informatics LLC | Privacy Policy