bgneal@312: /** bgneal@312: * ins.js bgneal@312: * bgneal@312: * Copyright 2009, Moxiecode Systems AB bgneal@312: * Released under LGPL License. bgneal@312: * bgneal@312: * License: http://tinymce.moxiecode.com/license bgneal@312: * Contributing: http://tinymce.moxiecode.com/contributing bgneal@312: */ bgneal@312: bgneal@312: function init() { bgneal@312: SXE.initElementDialog('ins'); bgneal@312: if (SXE.currentAction == "update") { bgneal@312: setFormValue('datetime', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'datetime')); bgneal@312: setFormValue('cite', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'cite')); bgneal@312: SXE.showRemoveButton(); bgneal@312: } bgneal@312: } bgneal@312: bgneal@312: function setElementAttribs(elm) { bgneal@312: setAllCommonAttribs(elm); bgneal@312: setAttrib(elm, 'datetime'); bgneal@312: setAttrib(elm, 'cite'); bgneal@442: elm.removeAttribute('data-mce-new'); bgneal@312: } bgneal@312: bgneal@312: function insertIns() { bgneal@312: var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'INS'); bgneal@442: bgneal@312: if (elm == null) { bgneal@312: var s = SXE.inst.selection.getContent(); bgneal@312: if(s.length > 0) { bgneal@442: insertInlineElement('ins'); bgneal@442: var elementArray = SXE.inst.dom.select('ins[data-mce-new]'); bgneal@312: for (var i=0; i