rbrindley: branch 2.0 r4697 - /branches/2.0/config/js/
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Wed Apr 1 15:06:52 CDT 2009
Author: rbrindley
Date: Wed Apr 1 15:06:48 2009
New Revision: 4697
URL: http://svn.digium.com/svn-view/asterisk-gui?view=rev&rev=4697
Log:
- all minor pages are now using new pbx object!
Modified:
branches/2.0/config/js/bulkadd.js
branches/2.0/config/js/callingrules.js
branches/2.0/config/js/cdr.js
branches/2.0/config/js/followme.js
branches/2.0/config/js/menuprompts_record.js
branches/2.0/config/js/preferences.js
branches/2.0/config/js/status.js
branches/2.0/config/js/welcome.js
Modified: branches/2.0/config/js/bulkadd.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/bulkadd.js?view=diff&rev=4697&r1=4696&r2=4697
==============================================================================
--- branches/2.0/config/js/bulkadd.js (original)
+++ branches/2.0/config/js/bulkadd.js Wed Apr 1 15:06:48 2009
@@ -50,7 +50,7 @@
var create_NEW_USERS = function(){
var addUser_OR_reloadGUI = function(){
var tmp_first_user = newusers_list[0];
- parent.astgui_manageusers.addUser( tmp_first_user , NEW_USERS[tmp_first_user] , function(){
+ parent.pbx.users.add( tmp_first_user , NEW_USERS[tmp_first_user] , function(){
newusers_list.splice(0,1);
if( newusers_list.length ){
addUser_OR_reloadGUI();
Modified: branches/2.0/config/js/callingrules.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/callingrules.js?view=diff&rev=4697&r1=4696&r2=4697
==============================================================================
--- branches/2.0/config/js/callingrules.js (original)
+++ branches/2.0/config/js/callingrules.js Wed Apr 1 15:06:48 2009
@@ -108,10 +108,10 @@
ASTGUI.events.add( DOM_new_crl_foChkbx, 'change' , en_db_fofields);
ASTGUI.events.add( DOM_new_cr_button , 'click' , newCallingRule_form);
- var t = parent.astgui_managetrunks.listofAllTrunks();
+ var t = parent.pbx.trunks.list();
var TMP_FORSORT = [];
t.each(function(item){
- TMP_FORSORT.push( parent.astgui_managetrunks.misc.getTrunkName(item) + ':::::::' + item);
+ TMP_FORSORT.push( parent.pbx.trunks.getName(item) + ':::::::' + item);
});
TMP_FORSORT.sort();
TMP_FORSORT.each( function(this_str){
@@ -188,8 +188,8 @@
addCell( newRow , { html: tmp_cr.pattern });
if( tmp_cr.hasOwnProperty('firstTrunk') ){
- addCell( newRow , { html: tmp_cr.firstTrunk ? ( parent.astgui_managetrunks.misc.getTrunkName(tmp_cr.firstTrunk) || '<i><font color=red>Invalid Trunk</font></i>' ) : '<i><font color=red>None Assigned</font></i>' });
- addCell( newRow , { html: tmp_cr.secondTrunk ? ( parent.astgui_managetrunks.misc.getTrunkName(tmp_cr.secondTrunk) || '<i><font color=red>Invalid Trunk</font></i>' ): '<i>None Selected</i>' });
+ addCell( newRow , { html: tmp_cr.firstTrunk ? ( parent.pbx.trunks.getName(tmp_cr.firstTrunk) || '<i><font color=red>Invalid Trunk</font></i>' ) : '<i><font color=red>None Assigned</font></i>' });
+ addCell( newRow , { html: tmp_cr.secondTrunk ? ( parent.pbx.trunks.getName(tmp_cr.secondTrunk) || '<i><font color=red>Invalid Trunk</font></i>' ): '<i>None Selected</i>' });
}else{
addCell( newRow , { html: '<i><font color=blue>Local Destination : ' + ASTGUI.parseContextLine.showAs(tmp_cr.destination) + '</font></i>', align: 'left', colspan : 2 });
}
@@ -346,13 +346,12 @@
}
if( isNew ){
- parent.astgui_manageCallingRules.createCallingRule( DOM_new_crl_name.value , as)
+ parent.pbx.calling_rules.add( DOM_new_crl_name.value , as)
ASTGUI.feedback( { msg:'CallingRule Created !', showfor:2, color:'green' });
window.location.reload();
}else{
- //parent.astgui_manageCallingRules.update( EDIT_CR, DOM_new_crl_name.value , cr_object ) ;
parent.ASTGUI.dialog.waitWhile(' Updating ...');
- parent.astgui_manageCallingRules.updateCallingRule( EDIT_CR, EDIT_CR_RULE, as )
+ parent.pbx.calling_rules.edit( EDIT_CR, EDIT_CR_RULE, as )
ASTGUI.feedback( { msg:'Calling Rule Updated !', showfor:2, color:'green' });
parent.ASTGUI.dialog.hide();
window.location.reload();
@@ -361,7 +360,7 @@
var delete_CR_confirm = function(a,b){
if( !confirm('Delete Calling Rule ?') ) return;
- parent.astgui_manageCallingRules.deleteCallingRule(a,b);
+ parent.pbx.calling_rules.remove(a,b);
ASTGUI.feedback( { msg:'Calling Rule Deleted !', showfor:2, color:'red' });
window.location.reload();
};
Modified: branches/2.0/config/js/cdr.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/cdr.js?view=diff&rev=4697&r1=4696&r2=4697
==============================================================================
--- branches/2.0/config/js/cdr.js (original)
+++ branches/2.0/config/js/cdr.js Wed Apr 1 15:06:48 2009
@@ -322,7 +322,7 @@
parent.ASTGUI.systemCmd(top.sessionData.directories.script_mastercsvexists, function (){
var content = ASTGUI.loadHTML("./Master.csv"); /* "./" is good enough. */
records = content.split("\n");
- var intDest = parent.astgui_manageusers.listOfUsers();
+ var intDest = parent.pbx.users.list();
for(var i=0;i<records.length;i++) {
records[i] = splitCSV(records[i]); /* cannot use records[i].split(","); */
Modified: branches/2.0/config/js/followme.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/followme.js?view=diff&rev=4697&r1=4696&r2=4697
==============================================================================
--- branches/2.0/config/js/followme.js (original)
+++ branches/2.0/config/js/followme.js Wed Apr 1 15:06:48 2009
@@ -25,7 +25,7 @@
var load_users_table = function(){
var TBL = _$('table_userslist') ;
var addCell = ASTGUI.domActions.tr_addCell;
- var ul = parent.astgui_manageusers.listOfUsers(); ul = ul.sortNumbers( );
+ var ul = parent.pbx.users.list(); ul = ul.sortNumbers( );
if(!ul.length){
ASTGUI.domActions.clear_table(TBL);
@@ -135,7 +135,7 @@
}
_$('FMU_moh').selectedIndex = -1;
- var c = parent.astgui_manageCallPlans.listPlans() ;
+ var c = parent.pbx.call_plans.list() ;
var tmp_pfx = ASTGUI.contexts.CallingPlanPrefix ;
for( var c_t = 0 ; c_t < c.length ; c_t++ ){
ASTGUI.selectbox.append( 'FMU_context' , c[c_t].withOut(tmp_pfx) , c[c_t] );
@@ -260,7 +260,7 @@
load_LocalExtensionsList : function(){ // followMe_MiscFunctions.load_LocalExtensionsList()
ASTGUI.selectbox.clear('FMU_newNumber_local');
- var ul = parent.astgui_manageusers.listOfUsers(); ul = ul.sortNumbers( );
+ var ul = parent.pbx.users.list(); ul = ul.sortNumbers( );
ul.each( function(user){
ASTGUI.selectbox.append('FMU_newNumber_local', user + ' ' + parent.sessionData.pbxinfo.users[user].getProperty('fullname') , user);
});
Modified: branches/2.0/config/js/menuprompts_record.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/menuprompts_record.js?view=diff&rev=4697&r1=4696&r2=4697
==============================================================================
--- branches/2.0/config/js/menuprompts_record.js (original)
+++ branches/2.0/config/js/menuprompts_record.js Wed Apr 1 15:06:48 2009
@@ -144,7 +144,7 @@
var newvmenu_ext = _$('newvmenu_ext');
var playVmenu_ext = _$('playVmenu_ext');
var _rft = _$('recfilesTable');
- var ul = parent.astgui_manageusers.listOfUsers(); ul = ul.sortNumbers();
+ var ul = parent.pbx.users.list(); ul = ul.sortNumbers();
ul.each( function(user){ // list each user in table
ASTGUI.selectbox.append(newvmenu_ext , user , user );
ASTGUI.selectbox.append(playVmenu_ext , user , user );
Modified: branches/2.0/config/js/preferences.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/preferences.js?view=diff&rev=4697&r1=4696&r2=4697
==============================================================================
--- branches/2.0/config/js/preferences.js (original)
+++ branches/2.0/config/js/preferences.js Wed Apr 1 15:06:48 2009
@@ -73,7 +73,7 @@
ASTGUI.tabbedOptions( _$('tabbedMenu') , t );
loadDOMelements();
- var cusers = parent.astgui_manageusers.listOfUsers();
+ var cusers = parent.pbx.users.list();
var op_tmp ;
cusers.each(function(user){
op_tmp = 'Goto(default,' + user + ',1)';
Modified: branches/2.0/config/js/status.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/status.js?view=diff&rev=4697&r1=4696&r2=4697
==============================================================================
--- branches/2.0/config/js/status.js (original)
+++ branches/2.0/config/js/status.js Wed Apr 1 15:06:48 2009
@@ -46,7 +46,7 @@
var localajaxinit = function(){
top.document.title = 'Monitor active calls' ;
- var ul = parent.astgui_manageusers.listOfUsers();
+ var ul = parent.pbx.users.list();
ul.sort();
ul.each( function(user) {
ASTGUI.selectbox.append('USERS', user, user);
Modified: branches/2.0/config/js/welcome.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/welcome.js?view=diff&rev=4697&r1=4696&r2=4697
==============================================================================
--- branches/2.0/config/js/welcome.js (original)
+++ branches/2.0/config/js/welcome.js Wed Apr 1 15:06:48 2009
@@ -36,10 +36,10 @@
REGISTRY_OUTPUT.iax2 = ASTGUI.parseCLIResponse(t) ;
t = parent.ASTGUI.cliCommand('sip show registry') ;
REGISTRY_OUTPUT.sip = ASTGUI.parseCLIResponse(t) ;
- var d = [].concat( parent.astgui_managetrunks.listOfSIPTrunks() , parent.astgui_managetrunks.listOfIAXTrunks() );
+ var d = parent.pbx.trunks.list({sip: true, iax: true});
d.each( function(item){
- var ttype = parent.astgui_managetrunks.misc.getTrunkType(item) ;
+ var ttype = parent.pbx.trunks.getType(item);
var newRow = TBL.insertRow(-1);
newRow.className = ((TBL.rows.length)%2==1)?'odd':'even';
@@ -55,7 +55,7 @@
/* End IAX and SIP Trunks */
/* Analog Trunks */
- var c = parent.astgui_managetrunks.listOfAnalogTrunks();
+ var c = parent.pbx.trunks.list({analog: true});
c.each(function(item){
var newRow = TBL.insertRow(-1);
newRow.className = ((TBL.rows.length)%2==1)?'odd':'even';
@@ -72,7 +72,7 @@
var d = parent.sessionData.pbxinfo.trunks.providers ;
for(var e in d){ if(d.hasOwnProperty(e)){
- var ttype = parent.astgui_managetrunks.misc.getTrunkType(e) ;
+ var ttype = parent.pbx.trunks.getType(e);
var newRow = TBL.insertRow(-1) ;
newRow.className = ((TBL.rows.length)%2==1)?'odd':'even';
var reg = ASTGUI.getTrunkStatus(REGISTRY_OUTPUT, e, ttype) ;
@@ -115,7 +115,7 @@
/* List all User Extensions */
var exten_tbody = $("#extensions_list > tbody");
- var ul = parent.astgui_manageusers.listOfUsers();
+ var ul = parent.pbx.users.list();
ul = ul.sortNumbers( );
ul.each(function(user){ // list each user in table
var ud = parent.sessionData.pbxinfo.users[user];
More information about the asterisk-gui-commits
mailing list