pari: branch aadk r1036 - in /branches/aadk: ./ config/
config/scripts/ confi...
asterisk-gui-commits at lists.digium.com
asterisk-gui-commits at lists.digium.com
Mon Jun 4 16:26:21 MST 2007
Author: pari
Date: Mon Jun 4 18:26:20 2007
New Revision: 1036
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1036
Log:
Merged revisions 1031,1033-1034 via svnmerge from
https://origsvn.digium.com/svn/asterisk-gui/trunk
........
r1031 | pari | 2007-06-04 14:06:29 -0500 (Mon, 04 Jun 2007) | 1 line
Fix for - http://bugs.digium.com/view.php?id=9840
........
r1033 | pari | 2007-06-04 18:17:29 -0500 (Mon, 04 Jun 2007) | 1 line
really really stupid bug i introduced in 1021
........
r1034 | pari | 2007-06-04 18:23:55 -0500 (Mon, 04 Jun 2007) | 1 line
Setup Wizard updates :: (1) Introduce the Ping_every_x seconds thing (2) update the add_event, remove_event to ASTGUI.events.add etc
........
Modified:
branches/aadk/ (props changed)
branches/aadk/config/ringgroups.html
branches/aadk/config/scripts/astman.js
branches/aadk/config/setup/1.html
branches/aadk/config/setup/3.html
branches/aadk/config/setup/4.html
branches/aadk/config/setup/5.html
branches/aadk/config/setup/6.html
branches/aadk/config/setup/7.html
branches/aadk/config/setup/install.html
Propchange: branches/aadk/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Jun 4 18:26:20 2007
@@ -1,1 +1,1 @@
-/trunk:1-430,433-449,489-501,505-506,508-510,512-540,542-557,559,561-577,580-586,588-616,618-767,769-1028
+/trunk:1-430,433-449,489-501,505-506,508-510,512-540,542-557,559,561-577,580-586,588-616,618-767,769-1035
Modified: branches/aadk/config/ringgroups.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/ringgroups.html?view=diff&rev=1036&r1=1035&r2=1036
==============================================================================
--- branches/aadk/config/ringgroups.html (original)
+++ branches/aadk/config/ringgroups.html Mon Jun 4 18:26:20 2007
@@ -188,7 +188,7 @@
uri += build_action('append', p, context ,RG_COMMENT, _$('text_rgname').value); p = p+1;
- uri += build_action('append', p, context ,"exten", "s,1,Answer"); p = p+1;
+ uri += build_action('append', p, context ,"exten", "s,1,NoOp(RINGGROUP)"); p = p+1;
if( _$('text_rgExten').value.length ){
var y = _$('text_rgExten').value + ',1,Goto(' + context + '|s|1)' ;
Modified: branches/aadk/config/scripts/astman.js
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/scripts/astman.js?view=diff&rev=1036&r1=1035&r2=1036
==============================================================================
--- branches/aadk/config/scripts/astman.js (original)
+++ branches/aadk/config/scripts/astman.js Mon Jun 4 18:26:20 2007
@@ -441,7 +441,7 @@
}
function InArray(search_array, searchstring ){
- if( !search_array.length){
+ if(search_array.length){
for(i=0; i < search_array.length; i++ ){
if( search_array[i] === searchstring )return true;
}
Modified: branches/aadk/config/setup/1.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/setup/1.html?view=diff&rev=1036&r1=1035&r2=1036
==============================================================================
--- branches/aadk/config/setup/1.html (original)
+++ branches/aadk/config/setup/1.html Mon Jun 4 18:26:20 2007
@@ -39,7 +39,6 @@
parent.$('next').disabled = true;
parent.$('back').disabled = true;
rawman_url = parent.rawman_url ;
- parent.astmanEngine.setURL(rawman_url);
ping();
}
@@ -54,12 +53,18 @@
}
function isloggedin(originalRequest){
+ if(!parent.started_pinging){
+ parent.started_pinging = 1;
+ parent.pingevery(60);
+ }
+
if ( originalRequest.responseText.match("Error") ) {
// User is not logged in , show him the login screen
_$('loginform').style.display = "";
_$('username').focus();
return true;
}
+
if ( originalRequest.responseText.match("Pong") ) {
// install [asterisk_guitools] if not installed
getextconf();
@@ -68,8 +73,7 @@
function getextconf(){
parent.loggedon = 1;
- parent.astmanEngine.pollEvents();
-
+ //parent.astmanEngine.pollEvents();
var opt = {
method: 'get',
asynchronous: true,
Modified: branches/aadk/config/setup/3.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/setup/3.html?view=diff&rev=1036&r1=1035&r2=1036
==============================================================================
--- branches/aadk/config/setup/3.html (original)
+++ branches/aadk/config/setup/3.html Mon Jun 4 18:26:20 2007
@@ -26,7 +26,7 @@
</HEAD>
<script src="../scripts/prototype.js"></script>
<SCRIPT>
-add_event = parent.add_event;
+add_event = parent.ASTGUI.events.add;
var rawman_url;
var usercallbacks = new Object;
var fieldnames = new Array( 'save','userbase','localextenlength','allow_aliasextns');
@@ -109,7 +109,6 @@
usercallbacks.loaded = function(){
//_$('localextenlength').addEventListener("change", store_extlength, false);
add_event( _$('localextenlength') , "change", store_extlength );
- parent.astmanEngine.pollEvents();
_$('devices').selectitem(0);
parent._$('next').disabled = false;
parent._$('back').disabled = false;
Modified: branches/aadk/config/setup/4.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/setup/4.html?view=diff&rev=1036&r1=1035&r2=1036
==============================================================================
--- branches/aadk/config/setup/4.html (original)
+++ branches/aadk/config/setup/4.html Mon Jun 4 18:26:20 2007
@@ -150,9 +150,9 @@
}
callbacks.cancelnewcategory = function(){
- remove_event( _$('trunkstyleanalog') , 'click' , activateanalogvoip );
- remove_event( _$('trunkstylevoip') , 'click' , activateanalogvoip );
- remove_event( _$('trunkstylecustomvoip') , 'click' , activateanalogvoip );
+ ASTGUI.events.remove( _$('trunkstyleanalog') , 'click' , activateanalogvoip );
+ ASTGUI.events.remove( _$('trunkstylevoip') , 'click' , activateanalogvoip );
+ ASTGUI.events.remove( _$('trunkstylecustomvoip') , 'click' , activateanalogvoip );
hideSPdetails();
}
@@ -164,11 +164,10 @@
var _devices = _$('devices');
_devices.contentEditable = 'true';
_devices.disabled = 0;
- add_event( _$('new') , "click", showSPdetails ) ;
+ ASTGUI.events.add( _$('new') , "click", showSPdetails ) ;
loadServiceProvidersintotable();
//preparemenus();
//parent.loadscreen(this);
- parent.astmanEngine.pollEvents();
}
callbacks.postselect = function(){
@@ -463,9 +462,9 @@
_$('userscontent_title').innerHTML = "Add Service Provider";
isnewtrunk = 1;
- add_event( _$('trunkstyleanalog') , 'click' , activateanalogvoip );
- add_event( _$('trunkstylevoip') , 'click' , activateanalogvoip );
- add_event( _$('trunkstylecustomvoip') , 'click' , activateanalogvoip );
+ ASTGUI.events.add( _$('trunkstyleanalog') , 'click' , activateanalogvoip );
+ ASTGUI.events.add( _$('trunkstylevoip') , 'click' , activateanalogvoip );
+ ASTGUI.events.add( _$('trunkstylecustomvoip') , 'click' , activateanalogvoip );
return tmp;
}
@@ -548,7 +547,7 @@
var _trunkstylecustomvoip = _$('trunkstylecustomvoip');
_trunkstylecustomvoip.onclick = null;
- add_event( _$('custom_trunkname') , 'change' , function(){
+ ASTGUI.events.add( _$('custom_trunkname') , 'change' , function(){
_$('name').value = _$('custom_trunkname').value;
_$('save').disabled = false;
}
@@ -658,7 +657,7 @@
var menu_div = document.getElementById('mymenu') ;
menu_div.style.width="80";
menu_div.style.borderColor = "#eee #bbb #bbb #ddd";
- add_event( document.body , "click", function(){ _$('mymenu').style.display="none"; } );
+ ASTGUI.events.add( document.body , "click", function(){ _$('mymenu').style.display="none"; } );
var menuitem1 = document.createElement('div');
menuitem1.innerHTML = "Edit" ;
Modified: branches/aadk/config/setup/5.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/setup/5.html?view=diff&rev=1036&r1=1035&r2=1036
==============================================================================
--- branches/aadk/config/setup/5.html (original)
+++ branches/aadk/config/setup/5.html Mon Jun 4 18:26:20 2007
@@ -123,7 +123,7 @@
trunkcallbacks.loaded = function(){
//_$('trunks').addEventListener('click',hackenablesave,false);
- add_event( _$('trunks') , "click", hackenablesave );
+ ASTGUI.events.add( _$('trunks') , "click", hackenablesave );
parent.astmanEngine.config2list("extensions.conf", _$('extensions'), new Object(), numplan_callbacks);
}
@@ -150,7 +150,7 @@
}
numplan_callbacks.loaded = function() {
- parent.astmanEngine.pollEvents();
+ //parent.astmanEngine.pollEvents();
if(!default_numberplan){
// Redirect To creating a default Number Plan
addthe_default_callingplan();
Modified: branches/aadk/config/setup/6.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/setup/6.html?view=diff&rev=1036&r1=1035&r2=1036
==============================================================================
--- branches/aadk/config/setup/6.html (original)
+++ branches/aadk/config/setup/6.html Mon Jun 4 18:26:20 2007
@@ -173,7 +173,7 @@
callbacks.usesubfields = true;
callbacks.loaded = function() {
- parent.astmanEngine.pollEvents();
+ //parent.astmanEngine.pollEvents();
var whichexten = "";
for (x=0;x<_$('extensions').options.length;x++) {
var tmp;
Modified: branches/aadk/config/setup/7.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/setup/7.html?view=diff&rev=1036&r1=1035&r2=1036
==============================================================================
--- branches/aadk/config/setup/7.html (original)
+++ branches/aadk/config/setup/7.html Mon Jun 4 18:26:20 2007
@@ -73,8 +73,8 @@
_$('devices').contentEditable = 'true';
_$('devices').disabled = 0;
//_$('new').addEventListener("click", showuserdetails, false);
- add_event( _$('new') , "click", showuserdetails );
- parent.astmanEngine.pollEvents();
+ ASTGUI.events.add( _$('new') , "click", showuserdetails );
+ //parent.astmanEngine.pollEvents();
loadusersintotable();
}
Modified: branches/aadk/config/setup/install.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/setup/install.html?view=diff&rev=1036&r1=1035&r2=1036
==============================================================================
--- branches/aadk/config/setup/install.html (original)
+++ branches/aadk/config/setup/install.html Mon Jun 4 18:26:20 2007
@@ -28,26 +28,31 @@
<script src="../scripts/prototype.js"></script>
<script src="../scripts/astman.js"></script>
<script>
-var rawman_url = "../" + asterisk_rawmanPath;
+var rawman_url;
var fxoports = new Array();
var fxsports = new Array();
var numberofsteps = 8;
var loggedon = 0;
-var eventeater = {};
var localextenlength;
+var keepPinging;
+var started_pinging = 0;
+
+function pingevery(a){
+ keepPinging = setInterval( makeping, a*250 );
+}
+
+function makeping(){
+ makerequest("","","action=ping", function(t){ if( t.match(asterisk_guipingerror) ){ window.location.href=window.location.href;} } );
+}
function localinit(){
+ rawman_url = "../" + asterisk_rawmanPath;
+ asterisk_rawmanPath = "../" + asterisk_rawmanPath;
astmanEngine = new Astman();
- astmanEngine.setURL(rawman_url);
- astmanEngine.setEventCallback(eventeater.eventcb);
+ astmanEngine.setURL(asterisk_rawmanPath);
_$('mainscreen').src="1.html";
}
-eventeater.eventcb = function(msgs) {
- if (loggedon == 1){
- astmanEngine.pollEvents();
- }
-}
</script>
<body onload="localinit()" topmargin=0 bgcolor="FFFFFF">
More information about the asterisk-gui-commits
mailing list