From eef9eb1146cf9903e58743291ca27c68340aea2c Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Wed, 21 Aug 2013 03:44:27 -0400
Subject: [PATCH] Synchronized localization files from Transifex
---
program/js/tiny_mce/utils/editable_selects.js | 27 ++++++++++++++++++---------
1 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/program/js/tiny_mce/utils/editable_selects.js b/program/js/tiny_mce/utils/editable_selects.js
index e723365..4b920f3 100644
--- a/program/js/tiny_mce/utils/editable_selects.js
+++ b/program/js/tiny_mce/utils/editable_selects.js
@@ -1,10 +1,11 @@
/**
- * $Id: editable_selects.js 162 2007-01-03 16:16:52Z spocke $
+ * editable_selects.js
*
- * Makes select boxes editable.
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
*
- * @author Moxiecode
- * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
*/
var TinyMCE_EditableSelects = {
@@ -15,18 +16,18 @@
for (i=0; i<nl.length; i++) {
if (nl[i].className.indexOf('mceEditableSelect') != -1) {
- o = new Option('(value)', '__mce_add_custom__');
+ o = new Option(tinyMCEPopup.editor.translate('value'), '__mce_add_custom__');
o.className = 'mceAddSelectValue';
nl[i].options[nl[i].options.length] = o;
- nl[i].setAttribute('onchange', 'TinyMCE_EditableSelects.onChangeEditableSelect(this);');
+ nl[i].onchange = TinyMCE_EditableSelects.onChangeEditableSelect;
}
}
},
- onChangeEditableSelect : function(se) {
- var d = document, ne;
+ onChangeEditableSelect : function(e) {
+ var d = document, ne, se = window.event ? window.event.srcElement : e.target;
if (se.options[se.selectedIndex].value == '__mce_add_custom__') {
ne = d.createElement("input");
@@ -34,11 +35,12 @@
ne.name = se.name + "_custom";
ne.type = "text";
- ne.style.width = se.clientWidth;
+ ne.style.width = se.offsetWidth + 'px';
se.parentNode.insertBefore(ne, se);
se.style.display = 'none';
ne.focus();
ne.onblur = TinyMCE_EditableSelects.onBlurEditableSelectInput;
+ ne.onkeydown = TinyMCE_EditableSelects.onKeyDown;
TinyMCE_EditableSelects.editSelectElm = se;
}
},
@@ -57,5 +59,12 @@
se.parentNode.removeChild(se.previousSibling);
TinyMCE_EditableSelects.editSelectElm = null;
}
+ },
+
+ onKeyDown : function(e) {
+ e = e || window.event;
+
+ if (e.keyCode == 13)
+ TinyMCE_EditableSelects.onBlurEditableSelectInput();
}
};
--
Gitblit v1.9.1