pari: branch aadk r828 - in /branches/aadk: ./ config/
config/scripts/ config...
asterisk-gui-commits at lists.digium.com
asterisk-gui-commits at lists.digium.com
Mon Apr 30 10:39:18 MST 2007
Author: pari
Date: Mon Apr 30 12:39:17 2007
New Revision: 828
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=828
Log:
Merged revisions 817-820,826 via svnmerge from
https://origsvn.digium.com/svn/asterisk-gui/trunk
........
r817 | pari | 2007-04-27 18:05:54 -0500 (Fri, 27 Apr 2007) | 1 line
Fix: IE getting confused about 'this' in events
........
r818 | pari | 2007-04-27 18:25:24 -0500 (Fri, 27 Apr 2007) | 1 line
Mark probably used altonclick because he was using widget[x].onclick, but since we are now using addEventListener/attachEvents - we no longer need these
........
r819 | pari | 2007-04-27 19:15:32 -0500 (Fri, 27 Apr 2007) | 1 line
part1 of --> cleanup of listing files, no need to store the files list in a DIV element
........
r820 | pari | 2007-04-27 19:16:53 -0500 (Fri, 27 Apr 2007) | 1 line
part 2 of 2 --> cleanup of listing files, no need to store the files list in a DIV element
........
r826 | pari | 2007-04-30 12:22:34 -0500 (Mon, 30 Apr 2007) | 1 line
Autoincrement for New User Extensions is not working properly during setup wizard
........
Modified:
branches/aadk/ (props changed)
branches/aadk/config/backup.html
branches/aadk/config/feditor.html
branches/aadk/config/menus.html
branches/aadk/config/record.html
branches/aadk/config/scripts/astman.js
branches/aadk/config/setup/7.html
branches/aadk/config/trunks.html
branches/aadk/scripts/listfiles
Propchange: branches/aadk/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Apr 30 12:39:17 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-811
+/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-827
Modified: branches/aadk/config/backup.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/backup.html?view=diff&rev=828&r1=827&r2=828
==============================================================================
--- branches/aadk/config/backup.html (original)
+++ branches/aadk/config/backup.html Mon Apr 30 12:39:17 2007
@@ -36,9 +36,8 @@
parent.astmanEngine.run_tool(asterisk_guiListFiles + " " + asterisk_ConfigBkpPath, callback = function() {
var opt = { method: 'get', asynchronous: true,
onComplete: function(originalRequest){
- _$('sysinfohtml').innerHTML = originalRequest.responseText;
if( parent.CF_status ){
- showlist_of_files();
+ showlist_of_files(originalRequest.responseText);
}else{
gui_alert("You need a Compact Flash to use this feature");
parent.astmanEngine.pollEvents();
@@ -52,9 +51,8 @@
});
}
-function showlist_of_files(){
- var k = _$('list_files').innerHTML ;
- var bkpfiles = k.split("\n") ;
+function showlist_of_files(ors){
+ var bkpfiles = ors.split("\n") ;
clear_table();
for( var i =0 ; i < bkpfiles.length ; i++){
@@ -246,7 +244,6 @@
</tr>
</table>
</div>
-<div id="sysinfohtml" style="display:none"></div>
<div id="bg_transparent" STYLE="display:none; position: absolute; left: 0; top: 24; width:100%; height:100%; background-color:#EFEFEF; -moz-opacity:.50;opacity:.50; border-width: 1px; border-color: #EFEFEF; border-style: solid; z-index:4">
</div>
</body>
Modified: branches/aadk/config/feditor.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/feditor.html?view=diff&rev=828&r1=827&r2=828
==============================================================================
--- branches/aadk/config/feditor.html (original)
+++ branches/aadk/config/feditor.html Mon Apr 30 12:39:17 2007
@@ -147,9 +147,7 @@
var opt = { method: 'get', asynchronous: true,
onComplete: function(originalRequest){
// Add config files to the list of files
- _$('sysinfohtml').innerHTML = originalRequest.responseText;
- var k = _$('list_files').innerHTML ;
- var recfiles = k.split("\n") ;
+ var recfiles = originalRequest.responseText.split("\n") ;
New_OPTION = document.createElement('option');
New_OPTION.text = "Config Files" ;
@@ -455,5 +453,4 @@
</tr>
</table>
</div>
-<div id="sysinfohtml" style="display:none"></div>
</body>
Modified: branches/aadk/config/menus.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/menus.html?view=diff&rev=828&r1=827&r2=828
==============================================================================
--- branches/aadk/config/menus.html (original)
+++ branches/aadk/config/menus.html Mon Apr 30 12:39:17 2007
@@ -970,10 +970,7 @@
parent.astmanEngine.run_tool(asterisk_guiListFiles + " " + asterisk_Sounds_path, callback = function() {
var opt = { method: 'get', asynchronous: true,
onComplete: function(originalRequest){
- _$('sysinfohtml').innerHTML = originalRequest.responseText;
- // Add Default sound files to the list of sound files
- var j = _$('list_files').innerHTML ;
- var sndfiles = j.split("\n") ;
+ var sndfiles = originalRequest.responseText.split("\n") ;
var New_OPTION = document.createElement('option');
New_OPTION.text = "Default Sounds" ;
New_OPTION.value = "" ;
@@ -1016,9 +1013,7 @@
var opt = { method: 'get', asynchronous: true,
onComplete: function(originalRequest){
// Add Recorded Voiemenus to the list of sound files
- _$('sysinfohtml').innerHTML = originalRequest.responseText;
- var k = _$('list_files').innerHTML ;
- var recfiles = k.split("\n") ;
+ var recfiles = originalRequest.responseText.split("\n") ;
New_OPTION = document.createElement('option');
New_OPTION.text = "Recorded Voicemenus" ;
New_OPTION.value = "" ;
@@ -1228,5 +1223,4 @@
</tr>
</table>
</div>
-<div id="sysinfohtml" style="display:none"></div>
</body>
Modified: branches/aadk/config/record.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/record.html?view=diff&rev=828&r1=827&r2=828
==============================================================================
--- branches/aadk/config/record.html (original)
+++ branches/aadk/config/record.html Mon Apr 30 12:39:17 2007
@@ -36,9 +36,8 @@
parent.astmanEngine.config2list("users.conf", _$('newvmenu_ext'), new Array, callbacks);
}
-function showlist_of_files(){
- var k = _$('list_files').innerHTML ;
- var recfiles = k.split("\n") ;
+function showlist_of_files(ors){
+ var recfiles = ors.split("\n") ;
clear_table();
@@ -48,7 +47,7 @@
}
recfiles[i] = recfiles[i].replace(/^\s*|\s*$/g,'') ;
if( recfiles[i] == "" ){ continue; }
- addrow_totable( recfiles[i].stripTags(), i );
+ addrow_totable( recfiles[i].stripTags());
}
var _rft = _$('recfilesTable') ;
@@ -69,7 +68,7 @@
}
}
-function addrow_totable(filename, i){
+function addrow_totable(filename){
var newRow = _$('recfilesTable').insertRow(-1);
newRow.style.backgroundColor='#FFFFFF';
newRow.onmouseover= function(){ this.style.backgroundColor='#F9F0D1'; };
@@ -116,9 +115,8 @@
parent.astmanEngine.run_tool(asterisk_guiListFiles + " " + asterisk_menusRecord_path, callback = function() {
var opt = { method: 'get', asynchronous: true,
onComplete: function(originalRequest){
- _$('sysinfohtml').innerHTML += originalRequest.responseText;
if( parent.CF_status ){
- showlist_of_files();
+ showlist_of_files(originalRequest.responseText);
parent.loadscreen(this);
}else{
gui_alert("You need a Compact Flash to use this feature");
@@ -160,6 +158,13 @@
_nm_n.focus();
return true;
}
+ if ( _nm_n.value.search('^[a-zA-Z_0-9]*$') == -1){
+ gui_alert("spaces and special characters are not allowed in the filename.");
+ _nm_n.focus();
+ return true;
+ }
+
+
if ( _nm_e.value == ""){
gui_alert("Please Select an extension to record the VoiceMenu");
_nm_e.focus();
@@ -274,7 +279,6 @@
<tr> <td colspan=2 align=center height=10></td></tr>
</table>
</div>
-<div id="sysinfohtml" style="display:none"></div>
<div id="bg_transparent" STYLE="display:none; position: absolute; left: 0; top: 24; width:100%; height:100%; background-color:#EFEFEF; -moz-opacity:.50;opacity:.50; border-width: 1px; border-color: #EFEFEF; border-style: solid; z-index:4">
</div>
</body>
Modified: branches/aadk/config/scripts/astman.js
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/scripts/astman.js?view=diff&rev=828&r1=827&r2=828
==============================================================================
--- branches/aadk/config/scripts/astman.js (original)
+++ branches/aadk/config/scripts/astman.js Mon Apr 30 12:39:17 2007
@@ -1406,14 +1406,16 @@
if (savewidget) {
widgets[x].savewidget = savewidget;
- add_event( widgets[x] , 'click', function() { this.oldvalue = this.value; return true; });
- add_event( widgets[x] , 'change', function() {
- this.savewidget.activateSave();
- if (this.altonchange){ this.altonchange();}
+ add_event( widgets[x] , 'click', function(event) {
+ var t = (event.srcElement)?event.srcElement:this;
+ t.oldvalue = t.value;
+ return true;
});
- }
- if (widgets[x].altonchange)
- widgets[x].altonchange();
+ add_event( widgets[x] , 'change', function(event) {
+ var t = (event.srcElement)?event.srcElement:this;
+ t.savewidget.activateSave();
+ });
+ }
} else if (widgets[x].type) {
if (!cat) {
@@ -1456,22 +1458,27 @@
if (savewidget) {
widgets[x].savewidget = savewidget;
if ((widgets[x].type == 'checkbox') || (widgets[x].type == 'radio')) {
- add_event( widgets[x] , 'click', function() { this.savewidget.activateSave(); if (this.altonclick){this.altonclick();} });
- if (widgets[x].altonclick)
- widgets[x].altonclick();
+ add_event( widgets[x] , 'click', function(event) {
+ var t = (event.srcElement)?event.srcElement:this;
+ t.savewidget.activateSave();
+ });
} else {
- add_event( widgets[x] , 'keydown', function() { this.oldvalue = this.value; return true; });
-
- add_event( widgets[x] , 'keyup', function() {
- if (this.oldvalue == this.value){return true;}
- pattern = this.getAttribute('pattern');
- if (pattern && check_pattern(pattern, this.oldvalue) && !check_pattern(pattern, this.value)) {
- this.value = this.oldvalue;
+ add_event( widgets[x] , 'keydown', function(event) {
+ var t = (event.srcElement)?event.srcElement:this;
+ t.oldvalue = t.value; return true;
+ });
+
+ add_event( widgets[x] , 'keyup', function(event) {
+ var t = (event.srcElement)?event.srcElement:this;
+ if (t.oldvalue == t.value){return true;}
+ pattern = t.getAttribute('pattern');
+ if (pattern && check_pattern(pattern, t.oldvalue) && !check_pattern(pattern, t.value)) {
+ t.value = t.oldvalue;
gui_feedback('Invalid Character !','red');
} else{
gui_feedback('','default',10);
- this.savewidget.activateSave();
+ t.savewidget.activateSave();
}
return true;
});
@@ -1659,30 +1666,30 @@
if (widgets['save']) {
widgets['save'].hostselectbox = box;
- add_event( widgets['save'] , 'click', function() { save_item(this.hostselectbox); });
+ add_event( widgets['save'] , 'click', function(event) { var t = (event.srcElement)?event.srcElement:this; save_item(t.hostselectbox); });
}
if (widgets['cancel']) {
widgets['cancel'].hostselectbox = box;
- add_event( widgets['cancel'] , 'click', function() { cancel_item(this.hostselectbox); });
+ add_event( widgets['cancel'] , 'click', function(event) { var t = (event.srcElement)?event.srcElement:this; cancel_item(t.hostselectbox); });
}
if (widgets['new']) {
widgets['new'].hostselectbox = box;
widgets['new'].disabled = false;
- add_event( widgets['new'] , 'click', function() { new_item(this.hostselectbox); });
+ add_event( widgets['new'] , 'click', function(event) { var t = (event.srcElement)?event.srcElement:this; new_item(t.hostselectbox); });
}
if (widgets['newitem']) {
widgets['newitem'].hostselectbox = box;
widgets['newitem'].disabled = false;
- add_event( widgets['newitem'] , 'click', function() { new_subitem(this.hostselectbox); });
+ add_event( widgets['newitem'] , 'click', function(event) {var t = (event.srcElement)?event.srcElement:this; new_subitem(t.hostselectbox); });
}
if (widgets['delete']) {
widgets['delete'].hostselectbox = box;
widgets['delete'].disabled = true;
- add_event( widgets['delete'] , 'click', function() { delete_item(this.hostselectbox); });
+ add_event( widgets['delete'] , 'click', function(event) {var t = (event.srcElement)?event.srcElement:this; delete_item(t.hostselectbox); });
}
tmp = new Ajax.Request(this.url, opt);
};
Modified: branches/aadk/config/setup/7.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/setup/7.html?view=diff&rev=828&r1=827&r2=828
==============================================================================
--- branches/aadk/config/setup/7.html (original)
+++ branches/aadk/config/setup/7.html Mon Apr 30 12:39:17 2007
@@ -89,16 +89,24 @@
}
callbacks.newcategory = function() {
+ var nar = [];
+ var _devices = _$('devices') ;
+ var _exten = _$('extensions') ;
+
+ for( var f=0; f < _devices.options.length ; f++ ){ nar.push( _devices.options[f].innerHTML.split(' -- ')[0]) ; }
+ for( f=0; f < _exten.options.length ; f++ ){ nar.push( _exten.options[f].innerHTML.split(' -- ')[0]) ; }
+ nar.sort();
+
var tmp = null;
- var x;
+ var x = 6000;
if (_$('devices').stored_config.catbyname['general'])
tmp = objcopy(_$('devices').stored_config.catbyname['general']);
- if (tmp) {
- x = tmp.fieldbyname['userbase'];
- if (x) {
- tmp.name = first_free_exten(_$('devices'), x);
- }
- }
+ if (tmp) { x = parseInt( tmp.fieldbyname['userbase'],10); }
+ for( f=0; f < nar.length ; f++ ){
+ if( x < parseInt(nar[f]) ){ break; } x++;
+ }
+
+ tmp.name = x;
return tmp;
}
callbacks.identifier = "extension";
Modified: branches/aadk/config/trunks.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/trunks.html?view=diff&rev=828&r1=827&r2=828
==============================================================================
--- branches/aadk/config/trunks.html (original)
+++ branches/aadk/config/trunks.html Mon Apr 30 12:39:17 2007
@@ -122,8 +122,6 @@
providercallbacks.loaded = function() {
var p = _$('provider');
- p.altonchange = p.onchange;
- p.onchange = null;
parent.astmanEngine.config2list("extensions.conf", _$('hiddenglobals'), new Array, globalvars);
}
@@ -494,15 +492,12 @@
_$('devices').contentEditable = 'false';
_$('zapchan').splitchar=',';
var _trunkstyleanalog = _$('trunkstyleanalog') ;
- _trunkstyleanalog.altonclick = _trunkstyleanalog.onclick;
_trunkstyleanalog.onclick = null;
var _trunkstylevoip = _$('trunkstylevoip');
- _trunkstylevoip.altonclick = _trunkstylevoip.onclick;
_trunkstylevoip.onclick = null;
var _trunkstylecustomvoip = _$('trunkstylecustomvoip');
- _trunkstylecustomvoip.altonclick = _trunkstylecustomvoip.onclick;
_trunkstylecustomvoip.onclick = null;
add_event( _$('custom_trunkname') , 'change' , function(){
@@ -1012,7 +1007,7 @@
<table align="center">
<tr onmouseover="show_tooltip('en', 'trunks', 1);">
<td style='width:80px' valign='top' class="field_text">Provider:</td>
- <td><select size='6' id='provider' style='width:200px' altonchange='selectprovider()' class="input8"></select></td>
+ <td><select size='6' id='provider' style='width:200px' class="input8"></select></td>
</tr>
<tr><td colspan='2' align='center'><A href="#" id="providerlink"><img id='providerlogo' style='visibility:hidden;' border=0></A></td></tr>
<tr><td colspan='2' align='center'><div id='providerdesc' align='left' style='width:230px;height:100px; font-size:10px'></div></td></tr>
Modified: branches/aadk/scripts/listfiles
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/scripts/listfiles?view=diff&rev=828&r1=827&r2=828
==============================================================================
--- branches/aadk/scripts/listfiles (original)
+++ branches/aadk/scripts/listfiles Mon Apr 30 12:39:17 2007
@@ -1,7 +1,7 @@
#!/bin/sh
SYSINFO_OUTPUT="/var/lib/asterisk/static-http/config/sysinfo_output.html"
-/bin/echo "<div id=list_files>" > $SYSINFO_OUTPUT
+#/bin/echo "<div id=list_files>" > $SYSINFO_OUTPUT
/bin/mkdir -p $1
-/bin/ls $1 >> $SYSINFO_OUTPUT
-/bin/echo "</div>" >> $SYSINFO_OUTPUT
+/bin/ls $1 > $SYSINFO_OUTPUT
+#/bin/echo "</div>" >> $SYSINFO_OUTPUT
More information about the asterisk-gui-commits
mailing list