pari: trunk r351 - in /trunk/config: scripts/astman.js
voicemail.html
asterisk-gui-commits at lists.digium.com
asterisk-gui-commits at lists.digium.com
Thu Feb 15 23:44:51 MST 2007
Author: pari
Date: Fri Feb 16 00:44:49 2007
New Revision: 351
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=351
Log:
fix: Save and cancel buttons are being enabled When keys like CTRL or CAPSLOCK are pressed
Modified:
trunk/config/scripts/astman.js
trunk/config/voicemail.html
Modified: trunk/config/scripts/astman.js
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/scripts/astman.js?view=diff&rev=351&r1=350&r2=351
==============================================================================
--- trunk/config/scripts/astman.js (original)
+++ trunk/config/scripts/astman.js Fri Feb 16 00:44:49 2007
@@ -1496,7 +1496,7 @@
return true;
}
widgets[x].onkeyup = function(event) {
- if (event.keyCode ==9){return true;}
+ 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;
Modified: trunk/config/voicemail.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/voicemail.html?view=diff&rev=351&r1=350&r2=351
==============================================================================
--- trunk/config/voicemail.html (original)
+++ trunk/config/voicemail.html Fri Feb 16 00:44:49 2007
@@ -49,11 +49,6 @@
$('name').value = $('extensions').stored_config.catbyname[tmp[0]].subfields[tmp[1]]['name'];
};
- function newexten() {
- var newname = $('name').value;
- $('save').disabled = false;
- }
-
callbacks.format = function(t, x) {
if ((t.name != specialcontext))
return null;
@@ -103,7 +98,12 @@
$('extensions').contentEditable = 'true';
$('extensions').disabled = 0;
$('extensions').current_category = specialcontext;
- $('name').onkeydown = newexten;
+ $('name').onkeydown = function(event){ this.oldvalue = this.value ; };
+ $('name').onkeyup = function(event){
+ if(this.oldvalue == this.value){return true;}
+ $('save').disabled = false;
+ $('cancel').disabled = false;
+ };
$('name').disabled = false;
if (whichexten.length ==0 ){
alert("Looks like a default Voicemail Extension is not yet configured \n\n Please set an \'Extension for Checking messages\' and \n click on 'save' button");
More information about the asterisk-gui-commits
mailing list