pari: trunk r345 - in /trunk/config: localexts.html
scripts/astman.js
asterisk-gui-commits at lists.digium.com
asterisk-gui-commits at lists.digium.com
Thu Feb 15 19:59:06 MST 2007
Author: pari
Date: Thu Feb 15 20:59:05 2007
New Revision: 345
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=345
Log:
fix: error on line 1025 when text is empty
Modified:
trunk/config/localexts.html
trunk/config/scripts/astman.js
Modified: trunk/config/localexts.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/localexts.html?view=diff&rev=345&r1=344&r2=345
==============================================================================
--- trunk/config/localexts.html (original)
+++ trunk/config/localexts.html Thu Feb 15 20:59:05 2007
@@ -28,7 +28,7 @@
var usercallbacks = new Object;
var fieldnames = new Array('status', 'save','userbase','localextenlength','allow_aliasextns','vmsecret','hasvoicemail','hasdirectory','hassip','hasiax','hasmanager','callwaiting','threewaycalling','hasagent');
var widgets = new Array;
-var focus_fields = new Array('localextenlength','userbase');
+var focus_fields = new Array('localextenlength','userbase','vmsecret');
function tosetup(){
parent.window.location.href = "./setup/install.html";
Modified: trunk/config/scripts/astman.js
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/scripts/astman.js?view=diff&rev=345&r1=344&r2=345
==============================================================================
--- trunk/config/scripts/astman.js (original)
+++ trunk/config/scripts/astman.js Thu Feb 15 20:59:05 2007
@@ -1022,10 +1022,13 @@
function check_pattern(pattern, text)
{
- if (text.search(pattern) == -1)
- return false;
- else
- return true;
+ if(typeof text != "undefined"){
+ if (text.search(pattern) == -1)
+ return false;
+ else
+ return true;
+ }
+ return true;
}
@@ -1490,7 +1493,8 @@
this.oldvalue = this.value;
return true;
}
- widgets[x].onkeyup = function() {
+ widgets[x].onkeyup = function(event) {
+ if (event.keyCode ==9 || event.keyCode ==8 ){return true;}
pattern = this.getAttribute('pattern');
if (pattern && check_pattern(pattern, this.oldvalue) && !check_pattern(pattern, this.value)) {
this.value = this.oldvalue;
More information about the asterisk-gui-commits
mailing list