rbrindley: branch rbrindley/welcome_revamp r4216 - /team/rbrindley/welcome_re...

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Tue Nov 25 10:34:19 CST 2008


Author: rbrindley
Date: Tue Nov 25 10:34:18 2008
New Revision: 4216

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=4216
Log:

- removed Queues in Extensions load as they will no longer be displayed in Extensions, but in Queues
- transitioned some of loadExtensions to use jQuery instead of prototype as it was improperly appending table rows
- loading tablesorter on Extensions now


Modified:
    team/rbrindley/welcome_revamp/config/js/welcome2.js

Modified: team/rbrindley/welcome_revamp/config/js/welcome2.js
URL: http://svn.digium.com/view/asterisk-gui/team/rbrindley/welcome_revamp/config/js/welcome2.js?view=diff&rev=4216&r1=4215&r2=4216
==============================================================================
--- team/rbrindley/welcome_revamp/config/js/welcome2.js (original)
+++ team/rbrindley/welcome_revamp/config/js/welcome2.js Tue Nov 25 10:34:18 2008
@@ -52,16 +52,15 @@
 	}));
 
 	setTimeout("loadTrunks()", 1);
-	setTimeout("loadExtensions()", 1);
+	loadExtensions();
 	setTimeout("loadQueues()", 1);
 	setTimeout("loadAgents()", 1);
 	setTimeout("loadConferenceRooms()", 1);
 	setTimeout("loadParkingLot()", 1);
 
 	/* jQuery Tablesorter init */
-	/* this requires a rewrite of the loadExtensions and loadTrunks 
+	/* this requires a rewrite of the loadExtensions and loadTrunks */
 		$("#extensions_list").tablesorter();
-	*/
 
 	return;
  });
@@ -160,7 +159,7 @@
 		ul = ul.sortNumbers( );
 		ul.each(function(user){ // list each user in table
 			var ud = parent.sessionData.pbxinfo.users[user];
-			var newRow = TBL.insertRow(-1);
+			//var newRow = TBL.insertRow(-1);
 
 			var tmp_usertype_a = [];
 
@@ -178,32 +177,33 @@
 				var tmp_mails_str = '<font color=#888B8D> Messages : ' + tmp_mails.count_new + '/' + tmp_mails.count_old + '</font>' ;
 			}
 
-			newRow.className = (( TBL.rows.length)%2==1)?'odd':'even';
+			//newRow.className = (( TBL.rows.length)%2==1)?'odd':'even';
+			$("<tr></tr>").appendTo("#extensions_list tbody");
+
 				if( !ud.getProperty('context') || ! parent.sessionData.pbxinfo.callingPlans[ud.getProperty('context')] ){
 					var tmp_userstring = '<u>' + user + '</u> <font color=red>*No DialPlan assigned</font>' ;
 				}else{
 					var tmp_userstring = '<u>' + user + '</u>' ;
 				}
 
-				addCell( newRow , { html: ASTGUI.getUser_DeviceStatus_Image(user) , id : 'TD_USER_DEVICE_STATUS_' + user } );
-				addCell( newRow ,
-					{	html: tmp_userstring ,
-						onclickFunction: function(){
-							parent.miscFunctions.click_panel( 'users.html', 'users.html?EXTENSION_EDIT=' + user );
-						}
-					}
-				);
-
-				addCell( newRow , { html: ud.getProperty('fullname') } );
-				addCell( newRow , { html: tmp_mails_str } );
-				addCell( newRow , { html: tmp_usertype_a.join(',&nbsp;') } );
+				//addCell( newRow , { html: ASTGUI.getUser_DeviceStatus_Image(user) , id : 'TD_USER_DEVICE_STATUS_' + user } );
+				$("<td></td>").appendTo("#extensions_list tbody tr:last").html(ASTGUI.getUser_DeviceStatus_Image(user)).attr("id","TD_USER_DEVICE_STATUS_"+user);
+				$("<td></td>").appendTo("#extensions_list tbody tr:last").html(tmp_userstring);
+				//addCell( newRow ,
+				//	{	html: tmp_userstring ,
+				//		onclickFunction: function(){
+				//			parent.miscFunctions.click_panel( 'users.html', 'users.html?EXTENSION_EDIT=' + user );
+				//		}
+				//	}
+				//);
+
+				//addCell( newRow , { html: ud.getProperty('fullname') } );
+				$("<td></td>").appendTo("#extensions_list tbody tr:last").html(ud.getProperty('fullname'));
+				//addCell( newRow , { html: tmp_mails_str } );
+				$("<td></td>").appendTo("#extensions_list tbody tr:last").html(tmp_mails_str);
+				//addCell( newRow , { html: tmp_usertype_a.join(',&nbsp;') } );
+				$("<td></td>").appendTo("#extensions_list tbody tr:last").html(tmp_usertype_a.join(',&nbsp;'));
 		});
-	})();
-
-	(function(){ // List all meetMe Extensions
-
-		//update_Conferences_Table();
-		//update_parkedCalls_Table();
 	})();
 
 	(function(){ // List all Queue Extensions
@@ -317,6 +317,8 @@
 		addCell( newRow , { html: 'Directory' } );
 	})();
 
+	$("#extensions_list tbody tr:odd").removeClass("even").addClass("odd"); 	//removing classes to
+	$("#extensions_list tbody tr:even").removeClass("odd").addClass("even");	//accuont for old js code
 };
 
 var loadQueues = function() {




More information about the asterisk-gui-commits mailing list