| | |
| | | /**
|
| | | * $Id: editable_selects.js 520 2008-01-07 16:30:32Z spocke $
|
| | | * editable_selects.js
|
| | | *
|
| | | * Makes select boxes editable.
|
| | | * Copyright 2009, Moxiecode Systems AB
|
| | | * Released under LGPL License.
|
| | | *
|
| | | * @author Moxiecode
|
| | | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
|
| | | * License: http://tinymce.moxiecode.com/license
|
| | | * Contributing: http://tinymce.moxiecode.com/contributing
|
| | | */
|
| | |
|
| | | var TinyMCE_EditableSelects = {
|
| | |
| | |
|
| | | 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';
|
| | |
|
| | |
| | | se.style.display = 'none';
|
| | | ne.focus();
|
| | | ne.onblur = TinyMCE_EditableSelects.onBlurEditableSelectInput;
|
| | | ne.onkeydown = TinyMCE_EditableSelects.onKeyDown;
|
| | | TinyMCE_EditableSelects.editSelectElm = se;
|
| | | }
|
| | | },
|
| | |
| | | se.parentNode.removeChild(se.previousSibling);
|
| | | TinyMCE_EditableSelects.editSelectElm = null;
|
| | | }
|
| | | },
|
| | |
|
| | | onKeyDown : function(e) {
|
| | | e = e || window.event;
|
| | |
|
| | | if (e.keyCode == 13)
|
| | | TinyMCE_EditableSelects.onBlurEditableSelectInput();
|
| | | }
|
| | | };
|