rbrindley: branch rbrindley/welcome_revamp r4321 - in /team/rbrindley/welcome...
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Tue Dec 9 14:29:18 CST 2008
Author: rbrindley
Date: Tue Dec 9 14:29:17 2008
New Revision: 4321
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=4321
Log:
merged branches/2.0 from 4267 to 4320
Added:
team/rbrindley/welcome_revamp/config/js/gtalk.js
- copied unchanged from r4320, branches/2.0/config/js/gtalk.js
team/rbrindley/welcome_revamp/config/update_phonefirmware.html
- copied unchanged from r4320, branches/2.0/config/update_phonefirmware.html
team/rbrindley/welcome_revamp/scripts/detectdahdi.sh
- copied unchanged from r4320, branches/2.0/scripts/detectdahdi.sh
Modified:
team/rbrindley/welcome_revamp/config/flashupdate.html
team/rbrindley/welcome_revamp/config/gtalk.html
team/rbrindley/welcome_revamp/config/hardware.html
team/rbrindley/welcome_revamp/config/js/astman.js
team/rbrindley/welcome_revamp/config/js/flashupdate.js
team/rbrindley/welcome_revamp/config/js/hardware.js
team/rbrindley/welcome_revamp/config/js/networking.js
team/rbrindley/welcome_revamp/config/js/paging.js
team/rbrindley/welcome_revamp/config/js/pbx.js
team/rbrindley/welcome_revamp/config/js/preferences.js
team/rbrindley/welcome_revamp/config/js/tooltip.js
team/rbrindley/welcome_revamp/config/js/users.js
team/rbrindley/welcome_revamp/config/networking.html
team/rbrindley/welcome_revamp/config/paging.html
team/rbrindley/welcome_revamp/config/skype.html
team/rbrindley/welcome_revamp/config/users.html
Modified: team/rbrindley/welcome_revamp/config/flashupdate.html
URL: http://svn.digium.com/view/asterisk-gui/team/rbrindley/welcome_revamp/config/flashupdate.html?view=diff&rev=4321&r1=4320&r2=4321
==============================================================================
--- team/rbrindley/welcome_revamp/config/flashupdate.html (original)
+++ team/rbrindley/welcome_revamp/config/flashupdate.html Tue Dec 9 14:29:17 2008
@@ -32,6 +32,7 @@
<td align=center style='padding-top:30px;'>
<span id='span_current_fwversion'></span>
<span id='check_forNewFirmwareVersions_button' style='display:none' class='guiButton' onclick='check_forNewFirmwareVersions()'> Check for new Firmware versions </span>
+ <div id="UpdatePolycomFirmware" style="display:none"><A href='update_phonefirmware.html'>Update Polycom firmware</A></div>
</td>
</tr>
<tr>
Modified: team/rbrindley/welcome_revamp/config/gtalk.html
URL: http://svn.digium.com/view/asterisk-gui/team/rbrindley/welcome_revamp/config/gtalk.html?view=diff&rev=4321&r1=4320&r2=4321
==============================================================================
--- team/rbrindley/welcome_revamp/config/gtalk.html (original)
+++ team/rbrindley/welcome_revamp/config/gtalk.html Tue Dec 9 14:29:17 2008
@@ -20,6 +20,7 @@
-->
<script src="js/jquery.js"></script>
<script src="js/astman.js"></script>
+<script src="js/gtalk.js"></script>
<script src="js/jquery.tooltip.js"></script>
<link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
<style type="text/css">
@@ -62,284 +63,6 @@
}
</style>
-<script>
-var GTALK_CNF , JABBER_CNF, EXTENSIONS_CNF;
-
-var EDIT_BUDDY ;
-var EDIT_ACCOUNT ;
-
-
-var MANAGE_BUDDIES = {
- listBuddies : function(){ // MANAGE_BUDDIES.listBuddies
- var addCell = ASTGUI.domActions.tr_addCell; // temporarily store the function
- var TBL = _$('table_BuddiesList');
- ASTGUI.domActions.clear_table(TBL);
-
-
- for( buddy in GTALK_CNF ){
- if( !GTALK_CNF.hasOwnProperty(buddy) || buddy == 'general' ) continue;
-
- var newRow = TBL.insertRow(-1);
- newRow.className = ((TBL.rows.length)%2==1)?'odd':'even';
- addCell( newRow , { html:GTALK_CNF[buddy].username , align:'left'});
-
- var tmp_context = GTALK_CNF[buddy].context || '' ;
-
- var dest_line = ( tmp_context && tmp_context.contains(ASTGUI.contexts.gtalkIncomingContext) && EXTENSIONS_CNF.hasOwnProperty(tmp_context) ) ? EXTENSIONS_CNF[tmp_context][0] : '' ;
- var dest_args = ASTGUI.parseContextLine.getArgs(dest_line) ;
- addCell( newRow , { html: ASTGUI.parseContextLine.toKnownContext(dest_args) , align:'left' } );
-
-
- addCell( newRow , { html:GTALK_CNF[buddy].connection });
-
- var tmp = "<span class='guiButton' onclick=\"MANAGE_BUDDIES.edit_buddy_form('" + buddy +"')\">Edit</span> "
- + "<span class='guiButtonDelete' onclick=\"MANAGE_BUDDIES.deleteBuddy('" + buddy +"')\">Delete</span>" ;
- addCell( newRow , { html: tmp });
- }
-
- if( TBL.rows.length == 0 ){
- var newRow = TBL.insertRow(-1);
- addCell( newRow , { html: "<BR>No peers configured. To send or receive calls from your friends on google talk, Add the peer name by clicking on the 'New peer' button.<BR><BR>" });
- }else{
- var newRow = TBL.insertRow(0);
- newRow.className = 'frow' ;
- addCell( newRow , { html: 'UserName' , align: 'left' });
- addCell( newRow , { html: 'Incoming Calls', align: 'left' });
- addCell( newRow , { html: 'Connection' });
- addCell( newRow , { html: '' });
- }
- },
-
- deleteBuddy : function(a , silentmode){ // MANAGE_BUDDIES.deleteBuddy(); use silentmode to delete while editing buddy
- if(!silentmode){
- if( !confirm("Delete peer '"+ a + "' ?") ) return true;
- }
-
- var u = new listOfSynActions('gtalk.conf');
- u.new_action('delcat', a, '', '');
- u.callActions();
-
- u.clearActions('extensions.conf');
- u.new_action('delcat', GTALK_CNF[a].context , '', '');
- u.callActions();
-
- if(!silentmode){
- ASTGUI.feedback( { msg:"deleted peer '" + a + "'" , showfor: 3, color:'red', bgcolor:'#FFFFFF' } );
- window.location.reload();
- }
- },
-
- addBuddy: function(){ // MANAGE_BUDDIES.addBuddy();
-
- if ( EDIT_BUDDY ){
- this.deleteBuddy(EDIT_BUDDY , true);
- }
-
- var v = new listOfActions('gtalk.conf');
- var tmp_uname = ASTGUI.getFieldValue('edit_buddyName_text');
- var tmp_connection = ASTGUI.getFieldValue('edit_buddyConnection_select');
- if( !tmp_uname.contains('@') ){
- tmp_uname = tmp_uname + '@gmail.com';
- }
- var catname = ( EDIT_BUDDY ) ? EDIT_BUDDY : tmp_uname.beforeChar('@');
-
- v.new_action('newcat', catname, '', '');
- v.new_action('append', catname , 'username', tmp_uname );
- v.new_action('append', catname , 'disallow', 'all');
- v.new_action('append', catname , 'allow', 'all');
- v.new_action('append', catname , 'context', ASTGUI.contexts.gtalkIncomingContext + catname );
-
- v.new_action('append', catname , 'connection', tmp_connection );
- v.callActions( function(){
-
- var W = new listOfSynActions('extensions.conf') ;
- W.new_action('newcat', ASTGUI.contexts.gtalkIncomingContext + catname , '', '');
- W.new_action('append', ASTGUI.contexts.gtalkIncomingContext + catname , 'exten', 's,1,' + ASTGUI.getFieldValue('edit_buddyIncomingCalls_select') );
- W.callActions();
-
- ASTGUI.feedback( { msg:"updated peer" , showfor: 3, color:'red', bgcolor:'#FFFFFF' } );
- window.location.reload();
- });
- },
-
- new_buddy_form : function(){ // MANAGE_BUDDIES.new_buddy_form();
- EDIT_BUDDY = '';
- ASTGUI.resetTheseFields([ 'edit_buddyName_text', 'edit_buddyConnection_select', 'edit_buddyIncomingCalls_select']);
- $('#buddy_editdiv .dialog_title > span').html('Add Peer');
- $('#buddy_editdiv').showWithBg();
- },
-
- edit_buddy_form : function(a){ // MANAGE_BUDDIES.edit_buddy_form();
- if(!a) return;
- EDIT_BUDDY = a;
- ASTGUI.updateFieldToValue( 'edit_buddyName_text', GTALK_CNF[EDIT_BUDDY].username );
- ASTGUI.updateFieldToValue( 'edit_buddyConnection_select', GTALK_CNF[EDIT_BUDDY].connection );
-
- var dest_line = ( EXTENSIONS_CNF.hasOwnProperty( GTALK_CNF[EDIT_BUDDY].context ) ) ? EXTENSIONS_CNF[ GTALK_CNF[EDIT_BUDDY].context ][0] : '' ;
- ASTGUI.selectbox.selectDestinationOption( 'edit_buddyIncomingCalls_select' , ASTGUI.parseContextLine.getAppWithArgs(dest_line) );
-
- $('#buddy_editdiv .dialog_title > span').html( 'Edit Peer ' + EDIT_BUDDY);
- $('#buddy_editdiv').showWithBg();
- }
-};
-
-var MANAGE_ACCOUNTS = {
- listAccounts : function(){
- var addCell = ASTGUI.domActions.tr_addCell; // temporarily store the function
- var TBL = _$('table_AccountsList');
- ASTGUI.domActions.clear_table(TBL);
-
- for( account in JABBER_CNF ){
- if( !JABBER_CNF.hasOwnProperty(account) || account == 'general' ) continue;
- ASTGUI.selectbox.append('edit_buddyConnection_select', account , account);
-
- var newRow = TBL.insertRow(-1);
- newRow.className = ((TBL.rows.length)%2==1) ? 'odd':'even';
- addCell( newRow , { html: JABBER_CNF[account].username, align: 'left' });
- addCell( newRow , { html: account, align: 'left' });
- var tmp = "<span class='guiButton' onclick=\"MANAGE_ACCOUNTS.edit_Account_form('" + account +"')\">Edit</span> "
- + "<span class='guiButtonDelete' onclick=\"MANAGE_ACCOUNTS.deleteAccount('" + account +"')\">Delete</span>" ;
- addCell( newRow , { html: tmp, align: 'center' });
- }
-
- if( TBL.rows.length == 0 ){
- var newRow = TBL.insertRow(-1);
- addCell( newRow , { html: "<BR>No google talk accounts configured. <BR> Please click on 'New gtalk Account' button to send and receive calls via your google talk account.<BR><BR>"});
- }else{
- var newRow = TBL.insertRow(0);
- newRow.className = 'frow' ;
- addCell( newRow , { html: 'UserName' , align: 'left' });
- addCell( newRow , { html: 'Account', align: 'left' });
- addCell( newRow , { html: '' });
- }
- },
-
- deleteAccount : function(a, silentmode){ // MANAGE_ACCOUNTS.deleteAccount()
- if(!silentmode && !confirm("Delete account '"+ a + "' ?")) { return true; }
- var u = new listOfSynActions('jabber.conf') ;
- u.new_action('delcat', a, '', '');
- u.callActions();
- if( !silentmode ){
- ASTGUI.feedback({ msg:"Deleted jabber account '" + a + "'", showfor: 3, color:'red', bgcolor:'#FFFFFF' });
- window.location.reload();
- }
- },
-
- saveAccount : function(){ // MANAGE_ACCOUNTS.saveAccount()
- if ( EDIT_ACCOUNT ){
- this.deleteAccount(EDIT_ACCOUNT, true);
- }
-
- var v = new listOfActions('jabber.conf');
- var tmp_uname = ASTGUI.getFieldValue('edit_account_text');
- if( !tmp_uname.contains('@') ){
- tmp_uname = tmp_uname + '@gmail.com';
- }
- var catname = ( EDIT_ACCOUNT ) ? EDIT_ACCOUNT : tmp_uname.beforeChar('@');
- v.new_action('newcat', catname, '', '');
- v.new_action('append', catname , 'type', 'client');
- v.new_action('append', catname , 'serverhost', 'talk.google.com');
- v.new_action('append', catname , 'username', tmp_uname);
- v.new_action('append', catname , 'secret', ASTGUI.getFieldValue('edit_account_secret'));
- v.new_action('append', catname , 'port', '5222');
- v.new_action('append', catname , 'usetls', 'yes');
- v.new_action('append', catname , 'usesasl', 'yes');
- v.new_action('append', catname , 'statusmessage', ASTGUI.getFieldValue('edit_account_status'));
- v.new_action('append', catname , 'timeout', '100');
- v.callActions( function(){
- ASTGUI.feedback( { msg:"updated account" , showfor: 3, color:'red', bgcolor:'#FFFFFF' } );
- window.location.reload();
- });
-
- },
-
- new_Account_form : function(){ // MANAGE_ACCOUNTS.new_Account_form()
- EDIT_ACCOUNT = '';
- ASTGUI.resetTheseFields([ 'edit_account_text', 'edit_account_secret','edit_account_status' ]);
- $('#account_editdiv .dialog_title > span').html('Add new Account');
- $('#account_editdiv').showWithBg();
- },
-
- edit_Account_form : function(a){ // MANAGE_ACCOUNTS.edit_Account_form()
- if(!a) return;
- EDIT_ACCOUNT = a;
-
- ASTGUI.updateFieldToValue( 'edit_account_text', JABBER_CNF[EDIT_ACCOUNT].username );
- ASTGUI.updateFieldToValue( 'edit_account_secret', JABBER_CNF[EDIT_ACCOUNT].secret );
- ASTGUI.updateFieldToValue( 'edit_account_status', JABBER_CNF[EDIT_ACCOUNT].statusmessage );
-
- $('#account_editdiv .dialog_title > span').html('Edit Account ' + EDIT_ACCOUNT );
- $('#account_editdiv').showWithBg();
-
- }
-
-};
-
-
-
-var localajaxinit = function(){
- top.document.title = 'Google Talk Preferences' ;
- GTALK_CNF = config2json({ filename:'gtalk.conf', usf:1 }); // buddies
- JABBER_CNF = config2json({ filename:'jabber.conf', usf:1 }); // accounts
- EXTENSIONS_CNF = config2json({ filename:'extensions.conf', usf:0 });
-
- var someArray = parent.miscFunctions.getAllDestinations() ;
- ASTGUI.selectbox.populateArray('edit_buddyIncomingCalls_select', someArray);
-
- (function(){
- // check if the general section of the config files are configured
- var u = new listOfSynActions('gtalk.conf') ;
- if( !GTALK_CNF.hasOwnProperty('general') ){
- u.new_action('newcat', 'general' , '', '');
- }
- if( GTALK_CNF.hasOwnProperty('general') && !GTALK_CNF['general'].hasOwnProperty('allowguest') ){
- u.new_action('append', 'general' , 'allowguest', 'no');
- }
-
- var v = new listOfSynActions('jabber.conf') ;
- if( !JABBER_CNF.hasOwnProperty('general') ){
- v.new_action('newcat', 'general' , '', '');
- }
- if( JABBER_CNF.hasOwnProperty('general') && !JABBER_CNF['general'].hasOwnProperty('autoprune') ){
- v.new_action('append', 'general' , 'autoprune', 'no');
- }
- if( JABBER_CNF.hasOwnProperty('general') && !JABBER_CNF['general'].hasOwnProperty('autoregister') ){
- v.new_action('append', 'general' , 'autoregister', 'yes');
- }
-
- if( u.actionCount || v.actionCount ) {
- u.callActions();
- v.callActions();
- window.location.reload();
- }
- })();
-
- (function(){
- var t = [{ url:'#',
- desc:'Google Talk Accounts',
- click_function: function(){
- $('#table_BuddiesList_DIV').hide();
- $('#table_AccountsList_DIV').show();
- }
- },{ url: '#',
- desc: ' Peers ',
- click_function: function(){
- $('#table_BuddiesList_DIV').show();
- $('#table_AccountsList_DIV').hide();
- }
- }];
-
- ASTGUI.tabbedOptions( _$('tabbedMenu') , t );
-
- $('#tabbedMenu').find('A:eq(0)').click();
- })();
-
- MANAGE_ACCOUNTS.listAccounts();
- MANAGE_BUDDIES.listBuddies();
-};
-
-
-</script>
<body bgcolor="EFEFEF">
<div class="iframeTitleBar">
Google Talk Settings
Modified: team/rbrindley/welcome_revamp/config/hardware.html
URL: http://svn.digium.com/view/asterisk-gui/team/rbrindley/welcome_revamp/config/hardware.html?view=diff&rev=4321&r1=4320&r2=4321
==============================================================================
--- team/rbrindley/welcome_revamp/config/hardware.html (original)
+++ team/rbrindley/welcome_revamp/config/hardware.html Tue Dec 9 14:29:17 2008
@@ -59,7 +59,7 @@
border: 1px solid #666666;
margin-top:10px;
margin-bottom:10px;
- max-width: 745;
+ max-width: 80%;
}
.taglist tr.frow {
Modified: team/rbrindley/welcome_revamp/config/js/astman.js
URL: http://svn.digium.com/view/asterisk-gui/team/rbrindley/welcome_revamp/config/js/astman.js?view=diff&rev=4321&r1=4320&r2=4321
==============================================================================
--- team/rbrindley/welcome_revamp/config/js/astman.js (original)
+++ team/rbrindley/welcome_revamp/config/js/astman.js Tue Dec 9 14:29:17 2008
@@ -94,6 +94,10 @@
Array.prototype.removeFirst = function(){ // opposite of push - removes the first element of the array
this.splice(0,1);
+ };
+
+ Array.prototype.removeLast = function(){ // removes the last element of the array
+ this.pop();
};
if(!Array.indexOf){
@@ -657,6 +661,13 @@
customObject : function(){
// eliminates the need of 'hasOwnProperty' to read this objects propeties, look for this objects prototype below.
if ( !(this instanceof ASTGUI.customObject) ) { return new ASTGUI.customObject(); }
+ },
+
+ TABLE : function(a){
+ if(!a) return;
+ if ( !(this instanceof ASTGUI.TABLE) ) { return new ASTGUI.TABLE(a); }
+ this.TableElement = ( typeof a == 'string' ) ? _$(a) : a ;
+ this.TableRow = null ;
},
toCustomObject : function(a){// if a is a native object returns an ASTGUI.customObject version of a
@@ -1816,14 +1827,11 @@
parseTrunkDialArgument: function(y){ // usage ASTGUI.parseContextLine.parseTrunkDialArgument(y)
// expects y as '${trunk_1}/XXX${EXTEN:X}' OR SIP/user/XXX${EXTEN:X}
- if (typeof y != 'string') {
+ if( !y || typeof y != 'string') {
ASTGUI.Log.Error('ASTGUI.parseContextLine.parseTrunkDialArgument: expecting y as string');
- return null;
+ return { name : '', channel : '', prepend : '', stripx : '' };
}
var WhatToDial = '';
- if (!y) {
- return null;
- }
y = y.trim();
if( y.beginsWith('${') && y.afterChar('}').beginsWith('/') ) {
var trunkname = y.betweenXY('{' , '}');
@@ -1848,7 +1856,7 @@
if(!WhatToDial.contains('${EXTEN')){ // if WhatToDial is in some other format that the gui does not understand
// TODO : replace the above if condition with a regular expression to check for the acceptable formats
// TODO : THROW ERROR
- return null;
+ return {name : trunkname, channel : channel, prepend : WhatToDial, stripx : ''};
}
var prepend = WhatToDial.beforeChar('$') ;
var extenString = WhatToDial.betweenXY('{','}') ;
@@ -2621,6 +2629,44 @@
}
};
+ASTGUI.TABLE.prototype = {
+
+ addRow: function( e , rowindex ){ // Usage: 'TABLE'.addRow({className : 'alt'});
+ var TBL = this.TableElement ;
+ var newRow = (typeof rowindex == 'number' ) ? TBL.insertRow(rowindex) : TBL.insertRow(-1) ;
+ if( !!e ){
+ if( e.hasOwnProperty('className') ){
+ if(e.className == 'alt'){
+ newRow.className = ((TBL.rows.length)%2==1) ? 'odd':'even';
+ }else{
+ newRow.className = e.className ;
+ }
+ delete e.className;
+ }
+ for( f in e ){
+ if( !e.hasOwnProperty(f) ) continue;
+ newRow.f = e[f] ;
+ }
+ }
+ this.TableRow = newRow ;
+ },
+
+ addCell: function( C ){ // Usage: 'TABLE'.addCell({ html: 'newCell Text', align:'center', width:'20px' });
+ var el = this.TableRow ;
+ ASTGUI.domActions.tr_addCell( el, C );
+ },
+
+ clear : function(){ // Usage: 'TABLE'.clear()
+ var el = this.TableElement ;
+ ASTGUI.domActions.clear_table(el);
+ },
+
+ rowCount : function(){
+ var el = this.TableElement ;
+ return el.rows.length;
+ }
+};
+
var makeRequest = function( params){ // for making Asynchronus requests
// usage :: makeRequest ( { action :'getconfig', filename: 'something.conf', callback:callbackfunction() } )
var cb = params.callback ; delete params.callback;
Modified: team/rbrindley/welcome_revamp/config/js/flashupdate.js
URL: http://svn.digium.com/view/asterisk-gui/team/rbrindley/welcome_revamp/config/js/flashupdate.js?view=diff&rev=4321&r1=4320&r2=4321
==============================================================================
--- team/rbrindley/welcome_revamp/config/js/flashupdate.js (original)
+++ team/rbrindley/welcome_revamp/config/js/flashupdate.js Tue Dec 9 14:29:17 2008
@@ -175,6 +175,7 @@
$("#overlayUpload_TR").show();
}
if(!parent.sessionData.PLATFORM.isAA50_OEM ){
+ $('#UpdatePolycomFirmware').show();
ASTGUI.systemCmdWithOutput( 'firmware_version' , function(a){
current_version = a.trim();
_$('span_current_fwversion').innerHTML = '<B> Current Firmware version : ' + current_version + ' </B>';
Modified: team/rbrindley/welcome_revamp/config/js/hardware.js
URL: http://svn.digium.com/view/asterisk-gui/team/rbrindley/welcome_revamp/config/js/hardware.js?view=diff&rev=4321&r1=4320&r2=4321
==============================================================================
--- team/rbrindley/welcome_revamp/config/js/hardware.js (original)
+++ team/rbrindley/welcome_revamp/config/js/hardware.js Tue Dec 9 14:29:17 2008
@@ -260,7 +260,7 @@
ASTGUI.domActions.tr_addCell( newRow, {html: 'SPAN' } );
ASTGUI.domActions.tr_addCell( newRow, {html: 'ALARMS' } );
ASTGUI.domActions.tr_addCell( newRow, {html: 'Framing/Coding' } );
- ASTGUI.domActions.tr_addCell( newRow, {html: 'channels<BR>Used/Total', align : 'center' } );
+ ASTGUI.domActions.tr_addCell( newRow, {html: 'channels Used/Total', align : 'center' } );
ASTGUI.domActions.tr_addCell( newRow, {html: 'Signalling', align : 'center'} );
ASTGUI.domActions.tr_addCell( newRow, {html: '' } );
};
Modified: team/rbrindley/welcome_revamp/config/js/networking.js
URL: http://svn.digium.com/view/asterisk-gui/team/rbrindley/welcome_revamp/config/js/networking.js?view=diff&rev=4321&r1=4320&r2=4321
==============================================================================
--- team/rbrindley/welcome_revamp/config/js/networking.js (original)
+++ team/rbrindley/welcome_revamp/config/js/networking.js Tue Dec 9 14:29:17 2008
@@ -117,7 +117,9 @@
function localajaxinit() {
top.document.title = 'Network Settings' ;
parent.ASTGUI.dialog.waitWhile('Loading Information ...');
-
+ if(!parent.sessionData.PLATFORM.isAA50_OEM ){
+ $('#URLforPolycom').show();
+ }
var t = [
{url:'#', desc:'General', click_function: function(){ $('#general_div').show(); $('#lan_div').hide(); $('#wan_div').hide(); } } ,
{url:'#', desc:'WAN', click_function: function(){ $('#general_div').hide(); $('#lan_div').hide(); $('#wan_div').show(); } },
Modified: team/rbrindley/welcome_revamp/config/js/paging.js
URL: http://svn.digium.com/view/asterisk-gui/team/rbrindley/welcome_revamp/config/js/paging.js?view=diff&rev=4321&r1=4320&r2=4321
==============================================================================
--- team/rbrindley/welcome_revamp/config/js/paging.js (original)
+++ team/rbrindley/welcome_revamp/config/js/paging.js Tue Dec 9 14:29:17 2008
@@ -399,7 +399,6 @@
var c = context2json ({ filename: 'extensions.conf' , context: 'globals', usf: 1 });
ASTGUI.updateFieldToValue( 'text_Alert_Info_Header' , c.getProperty('PAGING_HEADER') );
- ASTGUI.updateFieldToValue( 'select_Timeout' , c.getProperty('PAGING_TIMEOUT') );
var d = context2json ({ filename: 'extensions.conf' , context: ASTGUI.contexts.PageAnExtension , usf: 0 });
var i = d.length;
@@ -421,7 +420,6 @@
var save_TAB_paging_settings = function(){
ASTGUI.updateaValue({ file:'extensions.conf', context :'globals', variable :'PAGING_HEADER', value : ASTGUI.getFieldValue('text_Alert_Info_Header') });
- ASTGUI.updateaValue({ file:'extensions.conf', context :'globals', variable :'PAGING_TIMEOUT', value : ASTGUI.getFieldValue('select_Timeout') });
ASTGUI.feedback({msg:' Saved !!', showfor: 3 , color: '#5D7CBA', bgcolor: '#FFFFFF'}) ;
};
Modified: team/rbrindley/welcome_revamp/config/js/pbx.js
URL: http://svn.digium.com/view/asterisk-gui/team/rbrindley/welcome_revamp/config/js/pbx.js?view=diff&rev=4321&r1=4320&r2=4321
==============================================================================
--- team/rbrindley/welcome_revamp/config/js/pbx.js (original)
+++ team/rbrindley/welcome_revamp/config/js/pbx.js Tue Dec 9 14:29:17 2008
@@ -29,7 +29,7 @@
// check whether the config files are in proper format and have every thing needed for the gui to function properly
var check_For_Contexts = {
general : { static : 'yes', writeprotect : 'no', clearglobalvars : 'yes' },
- globals : { FEATURES : '' , DIALOPTIONS : '' , RINGTIME: '20', FOLLOWMEOPTIONS : '', PAGING_HEADER : 'Intercom', PAGING_TIMEOUT : '60' },
+ globals : { FEATURES : '' , DIALOPTIONS : '' , RINGTIME: '20', FOLLOWMEOPTIONS : '', PAGING_HEADER : 'Intercom' },
'default' : {},
'macro-stdexten' : [
'exten=s,1,Set(__DYNAMIC_FEATURES=${FEATURES})',
@@ -59,9 +59,8 @@
],
'macro-pagingintercom' : [
'exten=s,1,SIPAddHeader(Alert-Info: ${PAGING_HEADER})',
- 'exten=s,2,Set(TIMEOUT(absolute)=${PAGING_TIMEOUT})',
- 'exten=s,3,Page(${ARG1}|${ARG2})',
- 'exten=s,4,Hangup'
+ 'exten=s,2,Page(${ARG1}|${ARG2})',
+ 'exten=s,3,Hangup'
]
};
Modified: team/rbrindley/welcome_revamp/config/js/preferences.js
URL: http://svn.digium.com/view/asterisk-gui/team/rbrindley/welcome_revamp/config/js/preferences.js?view=diff&rev=4321&r1=4320&r2=4321
==============================================================================
--- team/rbrindley/welcome_revamp/config/js/preferences.js (original)
+++ team/rbrindley/welcome_revamp/config/js/preferences.js Tue Dec 9 14:29:17 2008
@@ -32,7 +32,7 @@
function localajaxinit(){
top.document.title = "General Preferences" ;
- if( parent.sessionData.PLATFORM.isAST_1_6 || parent.sessionData.PLATFORM.isAA50 || parent.sessionData.PLATFORM.isABE ){
+ if( (parent.sessionData.PLATFORM.isAST_1_6 || parent.sessionData.PLATFORM.isAA50 || parent.sessionData.PLATFORM.isABE) && !parent.sessionData.PLATFORM.isAA50_OEM ){
$('.16_Only').show();
(function(){
var c = config2json( { filename: 'phoneprov.conf' , usf: 0 } );
@@ -181,7 +181,7 @@
u.new_action('append', 'default', 'exten', 'o,1,' + ASTGUI.getFieldValue(DOM_op_ext) );
u.callActions();
- if( parent.sessionData.PLATFORM.isAST_1_6 || parent.sessionData.PLATFORM.isAA50 || parent.sessionData.PLATFORM.isABE ){
+ if( (parent.sessionData.PLATFORM.isAST_1_6 || parent.sessionData.PLATFORM.isAA50 || parent.sessionData.PLATFORM.isABE) && !parent.sessionData.PLATFORM.isAA50_OEM ){
u.clearActions('phoneprov.conf');
u.new_action('delete', 'polycom', 'setvar','', 'IDLEIMAGE_ACTIVE=1' );
u.new_action('delete', 'polycom', 'setvar','', 'IDLEIMAGE_ACTIVE=0' );
Modified: team/rbrindley/welcome_revamp/config/js/tooltip.js
URL: http://svn.digium.com/view/asterisk-gui/team/rbrindley/welcome_revamp/config/js/tooltip.js?view=diff&rev=4321&r1=4320&r2=4321
==============================================================================
--- team/rbrindley/welcome_revamp/config/js/tooltip.js (original)
+++ team/rbrindley/welcome_revamp/config/js/tooltip.js Tue Dec 9 14:29:17 2008
@@ -503,6 +503,7 @@
tooltips['paging'].en[0] = "<B>Alert-Info Header:</B> This is the value that is sent to the phone for an intercom call in the alert info header. It is not recommended that this valued be changed from the default of Intercom. ";
tooltips['paging'].en[1] = "Dial sequence that is used to prefix an extension to dial it as a Page. For instance setting this value to ** would allow to page the extension 6000 by dialing **6000.";
tooltips['paging'].en[2] = "Dial sequence that is used to prefix an extension to dial it as Intercom. For instance setting this value to *# would allow to initiate an intercom call with extension 6000 by dialing *#6000.";
+ tooltips['paging'].en[3] = "If this option is checked, a beep sound will be played when the intercom call is connected to inform users they can begin talking.";
// Tooltips for "CDR Viewer" in english
tooltips['CDR'] = { en: [] };
Modified: team/rbrindley/welcome_revamp/config/js/users.js
URL: http://svn.digium.com/view/asterisk-gui/team/rbrindley/welcome_revamp/config/js/users.js?view=diff&rev=4321&r1=4320&r2=4321
==============================================================================
--- team/rbrindley/welcome_revamp/config/js/users.js (original)
+++ team/rbrindley/welcome_revamp/config/js/users.js Tue Dec 9 14:29:17 2008
@@ -39,6 +39,51 @@
};
var USERS_MISC_FUNCTIONS = {
+ show_UserEdit_normal : function(){ // USERS_MISC_FUNCTIONS.show_UserEdit_normal();
+ $('#edit_User_Advanced_DIV').hideWithBg();
+ $('#edit_userExtension_div').showWithBg();
+ },
+
+ save_User_Advanced : function(){ // USERS_MISC_FUNCTIONS.save_User_Advanced();
+ parent.ASTGUI.dialog.waitWhile('Saving ..') ;
+
+ try{
+ ASTGUI.miscFunctions.empty_context({ filename:'users.conf', context : EXTENSION_EDIT, cb : function(){
+ var x = new listOfActions('users.conf');
+
+ var user_lines = ASTGUI.getFieldValue('edit_USER_Advanced_details') ;
+ user_lines = user_lines.split('\n');
+ user_lines.each( function(this_line){
+ x.new_action( 'append', EXTENSION_EDIT , this_line.beforeChar('=') , this_line.afterChar('=') );
+ });
+ x.callActions( function(){
+ ASTGUI.dialog.waitWhile('Updated User information <BR> Reloading GUI ... ');
+ setTimeout( function(){ top.window.location.reload(); } , 2000 );
+ });
+ }});
+ }catch(err){
+ alert("Error saving User information");
+ top.window.location.reload();
+ }
+ },
+
+ show_UserEdit_Advanced : function(){ // USERS_MISC_FUNCTIONS.show_UserEdit_Advanced();
+ parent.ASTGUI.dialog.waitWhile('Loading ..') ;
+ $('#edit_User_Advanced_DIV').showWithBg();
+ $('#edit_userExtension_div').hideWithBg();
+ $('#edit_User_Advanced_DIV .dialog_title > span').html( 'Edit User ' + EXTENSION_EDIT + " -- Advanced");
+
+ var textarea = _$('edit_USER_Advanced_details');
+ textarea.value = '';
+ var t = config2json({filename:'users.conf', usf:0});
+ if( t.hasOwnProperty(EXTENSION_EDIT) ){
+ //textarea.rows = t[EXTENSION_EDIT].length + 1 ;
+ textarea.value = t[EXTENSION_EDIT].join('\n');
+ }
+
+ parent.ASTGUI.dialog.hide() ;
+ },
+
initialize_formFields : function(){ // USERS_MISC_FUNCTIONS.initialize_formFields();
//Load dialplans into 'edit_user_dialplan'
var dps = parent.astgui_manageCallPlans.listPlans() ;
@@ -265,9 +310,11 @@
ASTGUI.feedback( { msg: 'Create New User !', showfor: 2 , color: 'green', bgcolor: '#FFFFFF' } );
USERS_MISC_FUNCTIONS.RESET_USER_FORM_FIELDS();
$('#edit_userExtension_div').showWithBg();
+ $('#User_AdvancedEditButton').hide();
},
EDIT_USER_FORM : function(a){ // USERS_MISC_FUNCTIONS.EDIT_USER_FORM();
+ $('#User_AdvancedEditButton').show();
isNewUSER = false ;
EXTENSION_EDIT = a ;
ASTGUI.feedback( { msg: 'Edit User Extension !', showfor: 2 , color: 'green', bgcolor: '#FFFFFF' } );
Modified: team/rbrindley/welcome_revamp/config/networking.html
URL: http://svn.digium.com/view/asterisk-gui/team/rbrindley/welcome_revamp/config/networking.html?view=diff&rev=4321&r1=4320&r2=4321
==============================================================================
--- team/rbrindley/welcome_revamp/config/networking.html (original)
+++ team/rbrindley/welcome_revamp/config/networking.html Tue Dec 9 14:29:17 2008
@@ -50,7 +50,7 @@
<TR> <TD height=20></TD>
<TD></TD>
</TR>
- <TR>
+ <TR id="URLforPolycom" style="display:none">
<TD valign="top" align="right">URL for Polycom <BR> auto provisioning:</TD>
<TD> <input type="text" id='TFTP_LAN' size=24></TD>
</TR>
Modified: team/rbrindley/welcome_revamp/config/paging.html
URL: http://svn.digium.com/view/asterisk-gui/team/rbrindley/welcome_revamp/config/paging.html?view=diff&rev=4321&r1=4320&r2=4321
==============================================================================
--- team/rbrindley/welcome_revamp/config/paging.html (original)
+++ team/rbrindley/welcome_revamp/config/paging.html Tue Dec 9 14:29:17 2008
@@ -111,18 +111,6 @@
<input type=text id="text_Alert_Info_Header" size=16 required='yes'>
</td>
</TR>
- <TR> <td align="right">Timeout : </td>
- <td>
- <select id="select_Timeout" dfalt='60' required='yes'>
- <option value="15">15 Seconds</option>
- <option value="30">30 Seconds</option>
- <option value="45">45 Seconds</option>
- <option value="60">60 Seconds</option>
- <option value="90">90 Seconds</option>
- <option value="120">120 Seconds</option>
- </select>
- </td>
- </TR>
<tr> <td align="right" colspan=2 height=10></td></tr>
<tr> <td align=right>
<span class='guiButtonCancel' onclick='ASTGUI.hideDrag(event);'>Cancel</span>
@@ -159,7 +147,7 @@
</TR>
<tr> <td align=right>Play a beep : </td>
- <td colspan=2><input type=checkbox id="chk_pgrp_beep"></td>
+ <td colspan=2><input type=checkbox id="chk_pgrp_beep"> <img src="images/tooltip_info.gif" tip="en,paging,3" class='tooltipinfo'> </td>
</tr>
<tr> <td align=center valign=top>
Modified: team/rbrindley/welcome_revamp/config/skype.html
URL: http://svn.digium.com/view/asterisk-gui/team/rbrindley/welcome_revamp/config/skype.html?view=diff&rev=4321&r1=4320&r2=4321
==============================================================================
--- team/rbrindley/welcome_revamp/config/skype.html (original)
+++ team/rbrindley/welcome_revamp/config/skype.html Tue Dec 9 14:29:17 2008
@@ -1,7 +1,7 @@
<!--
* Asterisk-GUI - an Asterisk configuration interface
*
- * Asterisk-Skype Configuration
+ * 'Skype for Asterisk' Configuration
*
* Copyright (C) 2008, Digium, Inc.
*
@@ -47,53 +47,47 @@
var SKYPE_CNF, EXTENSIONS_CNF;
var EDIT_ACCOUNT ;
-
var set_as_default_account = function(a){
ASTGUI.updateaValue({ file: 'chan_skype.conf', context :'general', variable :'default_user', value : a });
ASTGUI.feedback( { msg: 'Updated default Skype Account !', showfor: 2 , color: 'blue', bgcolor: '#FFFFFF' } );
window.location.reload();
};
-
var MANAGE_ACCOUNTS = {
listAccounts : function(){
- var addCell = ASTGUI.domActions.tr_addCell; // temporarily store the function
- var TBL = _$('table_AccountsList');
- ASTGUI.domActions.clear_table(TBL);
-
+ var TBL = ASTGUI.TABLE('table_AccountsList');
+ TBL.clear();
var DEFAULT_ACCOUNT = ( SKYPE_CNF.hasOwnProperty('general') && SKYPE_CNF['general'].default_user ) ? SKYPE_CNF['general'].default_user : '' ;
for( account in SKYPE_CNF ){
if( !SKYPE_CNF.hasOwnProperty(account) || account == 'general' ) continue;
- var newRow = TBL.insertRow(-1);
- newRow.className = ((TBL.rows.length)%2==1) ? 'odd':'even';
-
var img_name = ( DEFAULT_ACCOUNT == account ) ? 'images/edit.gif' : 'images/checkbox_blank.gif';
- addCell( newRow , { html: "<A href='#' TITLE='Set this as the default skype account for placing calls through skype network'><img src=" + img_name + " border=0 onclick=\"set_as_default_account('" + account +"')\"></A>" } );
-
- addCell( newRow , { html: account, align: 'left' });
-
var tmp_context = SKYPE_CNF[account].context || '' ;
var dest_line = ( tmp_context && tmp_context.contains(ASTGUI.contexts.skypeIncomingContext) && EXTENSIONS_CNF.hasOwnProperty(tmp_context) ) ? EXTENSIONS_CNF[tmp_context][0] : '' ;
- var dest_args = ASTGUI.parseContextLine.getArgs(dest_line) ;
- addCell( newRow , { html: ASTGUI.parseContextLine.toKnownContext(dest_args) , align:'left' } );
-
- var tmp = "<span class='guiButton' onclick=\"MANAGE_ACCOUNTS.edit_Account_form('" + account +"')\">Edit</span> "
+ var tmp = "<span class='guiButton' onclick=\"MANAGE_ACCOUNTS.edit_Account_form('" + account +"')\">Edit</span> "
+ "<span class='guiButtonDelete' onclick=\"MANAGE_ACCOUNTS.deleteAccount('" + account +"')\">Delete</span>" ;
- addCell( newRow , { html: tmp, align: 'center' });
- }
-
- if( TBL.rows.length == 0 ){
- var newRow = TBL.insertRow(-1);
- addCell( newRow , { html: "<BR>No Skype accounts configured. <BR> Please click on 'New Skype Account' button to send and receive calls via your skype account.<BR><BR>"});
+
+
+ TBL.addRow({className : 'alt'});
+
+ TBL.addCell({ html: "<A href='#' TITLE='Set this as the default skype account for placing calls through skype network'><img src="
+ + img_name + " border=0 onclick=\"set_as_default_account('" + account +"')\"></A>" });
+ TBL.addCell({ html: account, align: 'left' });
+ TBL.addCell({ html: ASTGUI.parseContextLine.showAs(dest_line) , align:'left' });
+ TBL.addCell({ html: tmp, align: 'center' });
+ }
+
+ if( TBL.rowCount() == 0 ){
+ TBL.addRow();
+ TBL.addCell({ html: "<BR>No Skype accounts configured. <BR> Please click on 'New Skype Account' button to send and receive calls via your skype account.<BR><BR>"});
}else{
- var newRow = TBL.insertRow(0);
- newRow.className = 'frow' ;
- addCell( newRow , { html:'Default' } );
- addCell( newRow , { html: 'Skype Account' , align: 'left' });
- addCell( newRow , { html: 'Incoming calls go to', align: 'left' });
- addCell( newRow , { html: '' });
+ TBL.addRow({className : 'frow'} , 0);
+
+ TBL.addCell({ html: 'Default' });
+ TBL.addCell({ html: 'Skype Account' , align: 'left' });
+ TBL.addCell({ html: 'Incoming calls go to', align: 'left' });
+ TBL.addCell({ html: '' });
}
},
@@ -163,7 +157,6 @@
};
-
var localajaxinit = function(){
top.document.title = 'Configure Skype Accounts' ;
SKYPE_CNF = config2json({ filename:'chan_skype.conf', usf:1 });
@@ -174,8 +167,6 @@
MANAGE_ACCOUNTS.listAccounts();
};
-
-
</script>
<body bgcolor="EFEFEF">
<div class="iframeTitleBar">
Modified: team/rbrindley/welcome_revamp/config/users.html
URL: http://svn.digium.com/view/asterisk-gui/team/rbrindley/welcome_revamp/config/users.html?view=diff&rev=4321&r1=4320&r2=4321
==============================================================================
--- team/rbrindley/welcome_revamp/config/users.html (original)
+++ team/rbrindley/welcome_revamp/config/users.html Tue Dec 9 14:29:17 2008
@@ -76,6 +76,7 @@
<TABLE width="100%" cellpadding=0 cellspacing=0>
<TR class="dialog_title_tr">
<TD class="dialog_title" onmousedown="ASTGUI.startDrag(event);"><span id="edit_userExtension_div_title"></span></TD>
+ <TD width="120"><span id='User_AdvancedEditButton' class='guiButton' onclick='USERS_MISC_FUNCTIONS.show_UserEdit_Advanced();'>Advanced Edit</span></TD>
<TD class="dialog_title_X" onclick="ASTGUI.hideDrag(event);"> X </TD>
</TR>
</TABLE>
@@ -425,6 +426,26 @@
</div>
+<div id="edit_User_Advanced_DIV" STYLE="width:650; max-height:450;display:none;" class='dialog'>
+ <TABLE width="100%" cellpadding=0 cellspacing=0>
+ <TR class="dialog_title_tr">
+ <TD class="dialog_title" onmousedown="ASTGUI.startDrag(event);"><span></span></TD>
+ <TD class="dialog_title_X" onclick="ASTGUI.hideDrag(event);"> X </TD>
+ </TR>
+ </TABLE>
+ <TABLE align=center cellpadding=2 cellspacing=2 border=0 width='100%'>
+ <TR> <TD align="center">
+ <textarea id='edit_USER_Advanced_details' rows=15 cols=80></textarea>
+ </TD>
+ </TR>
+ <TR> <TD align=center height=50 valign=middle>
+ <span class='guiButtonCancel' onclick='USERS_MISC_FUNCTIONS.show_UserEdit_normal();'>Cancel</span>
+ <span class='guiButtonEdit' onclick='USERS_MISC_FUNCTIONS.save_User_Advanced();'>Update</span>
+ </TD>
+ </TR>
+ </TABLE>
+</div>
+
<div style="display:none">
<form name="buynow_form" id="buynow_form" action="http://www.digium.com/en/ecosystem/partners/partners.php" method="post"></form>
More information about the asterisk-gui-commits
mailing list