includes/clientside/static/faders.js
changeset 215 94db56b8124f
parent 210 2b283402e4e4
child 326 ab66d6d1f1f4
--- a/includes/clientside/static/faders.js	Sun Oct 28 23:50:10 2007 -0400
+++ b/includes/clientside/static/faders.js	Mon Oct 29 11:17:55 2007 -0400
@@ -184,7 +184,8 @@
   {
     btn = document.createElement('input');
     btn.type = 'button';
-    btn.value = 'OK';
+    btn.value = $lang.get('etc_ok');
+    btn._GenericName = 'OK';
     btn.onclick = this.clickHandler;
     btn.style.margin = '0 3px';
     buttondiv.appendChild(btn);
@@ -194,14 +195,16 @@
   {
     btn = document.createElement('input');
     btn.type = 'button';
-    btn.value = 'OK';
+    btn.value = $lang.get('etc_ok');
+    btn._GenericName = 'OK';
     btn.onclick = this.clickHandler;
     btn.style.margin = '0 3px';
     buttondiv.appendChild(btn);
     
     btn = document.createElement('input');
     btn.type = 'button';
-    btn.value = 'Cancel';
+    btn.value = $lang.get('etc_cancel');
+    btn._GenericName = 'Cancel';
     btn.onclick = this.clickHandler;
     btn.style.margin = '0 3px';
     buttondiv.appendChild(btn);
@@ -211,14 +214,16 @@
   {
     btn = document.createElement('input');
     btn.type = 'button';
-    btn.value = 'Yes';
+    btn.value = $lang.get('etc_yes');
+    btn._GenericName = 'Yes';
     btn.onclick = this.clickHandler;
     btn.style.margin = '0 3px';
     buttondiv.appendChild(btn);
     
     btn = document.createElement('input');
     btn.type = 'button';
-    btn.value = 'No';
+    btn.value = $lang.get('etc_no');
+    btn._GenericName = 'No';
     btn.onclick = this.clickHandler;
     btn.style.margin = '0 3px';
     buttondiv.appendChild(btn);
@@ -228,21 +233,24 @@
   {
     btn = document.createElement('input');
     btn.type = 'button';
-    btn.value = 'Yes';
+    btn.value = $lang.get('etc_yes');
+    btn._GenericName = 'Yes';
     btn.onclick = this.clickHandler;
     btn.style.margin = '0 3px';
     buttondiv.appendChild(btn);
     
     btn = document.createElement('input');
     btn.type = 'button';
-    btn.value = 'No';
+    btn.value = $lang.get('etc_no');
+    btn._GenericName = 'No';
     btn.onclick = this.clickHandler;
     btn.style.margin = '0 3px';
     buttondiv.appendChild(btn);
     
     btn = document.createElement('input');
     btn.type = 'button';
-    btn.value = 'Cancel';
+    btn.value = $lang.get('etc_cancel');
+    btn._GenericName = 'Cancel';
     btn.onclick = this.clickHandler;
     btn.style.margin = '0 3px';
     buttondiv.appendChild(btn);
@@ -295,7 +303,7 @@
 
 function messagebox_click(obj, mb)
 {
-  val = obj.value;
+  val = ( typeof ( obj._GenericName ) == 'string' ) ? obj._GenericName : obj.value;
   if(typeof mb.onbeforeclick[val] == 'function')
   {
     var o = mb.onbeforeclick[val];