rbrindley: branch rbrindley/astman_revamp r4626 - /team/rbrindley/astman_reva...

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Thu Mar 12 11:30:08 CDT 2009


Author: rbrindley
Date: Thu Mar 12 11:30:05 2009
New Revision: 4626

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

- name var is now newname in pbx.time_intervals.edit
- changed update to append since we deleted it
- off by one, week[3] --> week[2]


Modified:
    team/rbrindley/astman_revamp/config/js/pbx2.js

Modified: team/rbrindley/astman_revamp/config/js/pbx2.js
URL: http://svn.digium.com/svn-view/asterisk-gui/team/rbrindley/astman_revamp/config/js/pbx2.js?view=diff&rev=4626&r1=4625&r2=4626
==============================================================================
--- team/rbrindley/astman_revamp/config/js/pbx2.js (original)
+++ team/rbrindley/astman_revamp/config/js/pbx2.js Thu Mar 12 11:30:05 2009
@@ -412,10 +412,10 @@
  */
 pbx.time_intervals.edit = function(oldname, newname, interval) {
 	/* check the basics */
-	if (!name) {
+	if (!newname) {
 		top.log.error('pbx.time_intervals.add: name is empty.');
 		return false;
-	} else if (typeof interval !== 'undefined') {
+	} else if (typeof interval === 'undefined') {
 		top.log.error('pbx.time_intervals.add: interval is undefined.');
 		return false;
 	}
@@ -477,7 +477,7 @@
 		}
 	}
 
-	actions.new_action('update', 'globals', ASTGUI.contexts.TimeIntervalPrefix + newname, value);
+	actions.new_action('append', 'globals', ASTGUI.contexts.TimeIntervalPrefix + newname, value);
 	var resp = actions.callActions();
 	if (!resp.contains('Response: Success')) {
 		top.log.error('pbx.time_intervals.add: error updating extensions.conf');
@@ -595,9 +595,9 @@
 		return true;
 	}
 
-	if (week.contains('-') && week[3] !== '-') {
-		return false;
-	} else if (week[3] === '-') {
+	if (week.contains('-') && week[2] !== '-') {
+		return false;
+	} else if (week[2] === '-') {
 		var first = week.split('-')[0];
 		var second = week.split('-')[1];
 




More information about the asterisk-gui-commits mailing list