espiceland: branch 2.0 r5080 - /branches/2.0/config/js/features.js

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Tue Sep 7 14:40:55 CDT 2010


Author: espiceland
Date: Tue Sep  7 14:40:53 2010
New Revision: 5080

URL: http://svnview.digium.com/svn/asterisk-gui?view=rev&rev=5080
Log:
Fix problem with application map table where last-added application map was the only visible. Fixes ASTGUI-156.

Modified:
    branches/2.0/config/js/features.js

Modified: branches/2.0/config/js/features.js
URL: http://svnview.digium.com/svn/asterisk-gui/branches/2.0/config/js/features.js?view=diff&rev=5080&r1=5079&r2=5080
==============================================================================
--- branches/2.0/config/js/features.js (original)
+++ branches/2.0/config/js/features.js Tue Sep  7 14:40:53 2010
@@ -273,8 +273,8 @@
 		var amap_fields = ['', 'self', '', ''];
 	}
 
-	if (!amap_table.find('tr').length || (amap_table.find('tr').length && amap_table.find('tr.noapps'))) {
-		amap_table.find('tr:not(.template)').remove();
+	if (amap_table.find('tr:not(.template)').length) {
+		amap_table.find('tr.noapps').remove();
 	}
 
 	var row = $('#application_map_list > tbody > tr.template').clone();
@@ -454,6 +454,11 @@
 		$(this).remove();
 		$(this).dequeue();
 	});
+	// if number of rows is one, the table is about to be empty
+	if (amap_table.find('tr:not(.template)').length === 1) { 
+		var row = $('<tr>').attr('colspan', '7').addClass('noapps').html('No Application Maps Defined.');
+		amap_table.append(row);
+	}
 };
 
 var validateAmap = function(obj, params, focus) {




More information about the asterisk-gui-commits mailing list