pari: trunk r1014 - in /trunk/config: ./ stylesheets/

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Thu May 31 15:11:09 MST 2007


Author: pari
Date: Thu May 31 17:11:08 2007
New Revision: 1014

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1014
Log:
'event delegation' instead of 'event handling' for the main panel

Removed:
    trunk/config/stylesheets/rico.css
Modified:
    trunk/config/cfgbasic.html
    trunk/config/stylesheets/schwing.css

Modified: trunk/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/cfgbasic.html?view=diff&rev=1014&r1=1013&r2=1014
==============================================================================
--- trunk/config/cfgbasic.html (original)
+++ trunk/config/cfgbasic.html Thu May 31 17:11:08 2007
@@ -43,6 +43,7 @@
 	_$('mainscreen').style.height = (t - 70);
 	_$('TOP_MAINTABLE').rows[1].cells[0].height = (t - 70) ;
 	var pnameheight = 22;
+	c.pnameheight = pnameheight;
 	var panels = returnpanels();
 	var pheight = (( t - 70)  - (pnameheight*panels.length) ) ;
 	if(pheight > 0){
@@ -66,7 +67,11 @@
 function createpanels(){
 	var t,u,v;
 	var a = _$('configpanel');
-	var pnameheight = 22;
+
+//	add_event(a, 'mouseover', my_tooltip);
+//	add_event(a, 'mouseout', default_tooltip);
+	add_event(a, 'click', fghjhhs);
+
 	var panels = returnpanels();
 	var this_id ;
 	for( var r=0; r < panels.length; r++ ){
@@ -74,17 +79,10 @@
 
 		t = document.createElement("div");
 		t.className = "accordionTabTitleBar";
-		t.style.backgroundColor = "#6B79A5";
-		t.style.color = "#CED7EF";
-		t.style.fontWeight = "normal";
 		t.style.display = "none";
 		t.setAttribute('id', this_id );
-		t.height = pnameheight;
+		t.height = a.pnameheight;
 		t.innerHTML = "<nobr><img style='vertical-align: middle;' src='images/accordion-icon.gif'><span style='margin-left: 0px; font-weight: bold;'>&nbsp;" + panels[r].caption + "</span></nobr>";
-
-		add_event(t, 'click', fghjhhs);
-		add_event(t, 'mouseover', my_tooltip);
-		add_event(t, 'mouseout', default_tooltip);
 
 		u = document.createElement("div");
 		u.className = "accordionTabContentBox";
@@ -111,11 +109,6 @@
 
 function my_tooltip(event){
 	var s = (event.srcElement)?event.srcElement:this;
-
-	_$(s.id).style.backgroundColor="#63699C";
-	_$(s.id).style.color="#FFFFFF";
-	_$(s.id).style.fontWeight="bold";
-
 	show_Acctooltip(_$(s.id+"_U").innerHTML );
 }
 
@@ -130,11 +123,19 @@
 }
 
 function fghjhhs(event){
-	var s = (event.srcElement)?event.srcElement:this;
-	if(event.srcElement && s.id==""){s = event.srcElement.parentNode.parentNode;}
-
+	function getTarget(x){
+		x = x || window.event;
+		return x.target || x.srcElement;
+	}
+	var f = getTarget(event);
+	var s = f;	
+	if (f.nodeName.toLowerCase() == 'img' || f.nodeName.toLowerCase() == 'span' ){
+		s = f.parentNode.parentNode;
+	}
+	if ( s.className != 'accordionTabTitleBar' )return;
 	if( $('mainscreen').currentpage == s.id + ".html")return;
 	var t;
+
 	var panels = returnpanels();
 	for( var r=0; r < panels.length; r++ ){
 		t = panels[r].page.split(".html")[0];

Modified: trunk/config/stylesheets/schwing.css
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/stylesheets/schwing.css?view=diff&rev=1014&r1=1013&r2=1014
==============================================================================
--- trunk/config/stylesheets/schwing.css (original)
+++ trunk/config/stylesheets/schwing.css Thu May 31 17:11:08 2007
@@ -1,3 +1,53 @@
+div.accordionTabTitleBar {
+	font-size : 12.5px;
+	padding : 2px 2px 2px 2px;
+	border-style : solid none solid none;
+	border-top-color : #BDC7E7;
+	border-bottom-color : #182052;
+	border-width : 1px 0px 1px 0px;
+	height : 16px;
+	cursor: pointer;
+	background-color : #6B79A5;
+	color : #CED7EF;
+	font-weight :normal;
+}
+
+div.accordionTabTitleBar:hover {
+	font-weight:bold;
+	background-color : #63699C;
+	color            : #FFFFFF;
+}
+
+.accordionTabContentBox {
+	font-size        : 11px;
+	border           : 1px solid #1f669b;
+	border-top-width : 0px;
+	padding : 0px 8px 0px 8px;
+	cursor: default;
+	color : #000000;
+}
+
+body,td,a,p,.h{font-family:arial,sans-serif,Helvetica,Trebuchet MS; font-size   : 10px; cursor: default;}
+
+a:visited, a:link, a:hover  {
+	font-family : Trebuchet MS, Arial, Helvetica, sans-serif;
+}
+
+a:visited, a:link {
+   text-decoration : none;
+   color           : black;
+}
+
+a:hover  {
+	color : black;
+	text-decoration : underline;
+}
+
+h2, .header {
+   font-weight : bold;
+   font-size   : 13px;
+}
+
 .mainscreenTitleBar {
 	font-size           : 12px;
 	padding             : 4px 6px 4px 6px;



More information about the asterisk-gui-commits mailing list