rbrindley: branch 2.0 r4658 - /branches/2.0/config/js/pbx2.js

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Wed Mar 25 10:42:00 CDT 2009


Author: rbrindley
Date: Wed Mar 25 10:41:57 2009
New Revision: 4658

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

- copied miscFunctions.getTimeIntervals() in config/js/index.js to pbx.time_intervals.list in pbx2.js


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

Modified: branches/2.0/config/js/pbx2.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/pbx2.js?view=diff&rev=4658&r1=4657&r2=4658
==============================================================================
--- branches/2.0/config/js/pbx2.js (original)
+++ branches/2.0/config/js/pbx2.js Wed Mar 25 10:41:57 2009
@@ -942,6 +942,23 @@
 
 	ASTGUI.feedback({ msg: 'Updated time interval!', showfor: 3, color: 'green', bgcolor: '#ffffff'});
 	return true;
+};
+
+/**
+ * List all Time Intervals.
+ * @return an object of all the time intervals.
+ */
+pbx.time_intervals.list = function() {
+	var list = new ASTGUI.customObject;
+
+	var globals = context2json({filename: 'extensions.conf', context: 'globals', usf:0});
+	for (var i=0; i<globals.length; i++) {
+		if (globals[i].beginsWith(ASTGUI.contexts.TimeIntervalsPrefix)) {
+			list[globals[i].lChop(ASTGUI.contexts.TimeIntervalPrefix).beforeChar('=')] = globals[i].afterChar('=');
+		}
+	}
+
+	return list;
 };
 
 /**




More information about the asterisk-gui-commits mailing list