pari: trunk r1016 - in /trunk/config: cfgbasic.html scripts/astman.js

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Thu May 31 16:21:08 MST 2007


Author: pari
Date: Thu May 31 18:21:07 2007
New Revision: 1016

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1016
Log:
moving get event target into astman.js

Modified:
    trunk/config/cfgbasic.html
    trunk/config/scripts/astman.js

Modified: trunk/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/cfgbasic.html?view=diff&rev=1016&r1=1015&r2=1016
==============================================================================
--- trunk/config/cfgbasic.html (original)
+++ trunk/config/cfgbasic.html Thu May 31 18:21:07 2007
@@ -122,12 +122,8 @@
 }
 
 function fghjhhs(event){
-	function getTarget(x){
-		x = x || window.event;
-		return x.target || x.srcElement;
-	}
-	var f = getTarget(event);
-	var s = f;	
+	var f = ASTGUI.events.getTarget(event);
+	var s = f;
 	if (f.nodeName.toLowerCase() == 'img' || f.nodeName.toLowerCase() == 'span' ){
 		s = f.parentNode.parentNode;
 	}

Modified: trunk/config/scripts/astman.js
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/scripts/astman.js?view=diff&rev=1016&r1=1015&r2=1016
==============================================================================
--- trunk/config/scripts/astman.js (original)
+++ trunk/config/scripts/astman.js Thu May 31 18:21:07 2007
@@ -46,6 +46,13 @@
 if(document.attachEvent){ var isIE = true; }else{ var isIE = false; }
 
 var ASTGUI = { // the idea is to eventually move all the global variables and functions into this one object so that the global name space is not as cluttered as it is now.
+	events: {
+		getTarget: function(x){
+			x = x || window.event;
+			return x.target || x.srcElement;
+		}
+	},
+
 	displayHeight: function(){
 		if(isIE){return document.body.clientHeight;}else{return window.innerHeight;}
 	},



More information about the asterisk-gui-commits mailing list