Revision 4829,
1.3 KB
checked in by airton, 13 years ago
(diff) |
Ticket #2146 - Implementacao da funcionalidade de multiplas assinaturas - Adicao da biblioteca TinyMCE
|
-
Property svn:executable set to
*
|
Line | |
---|
1 | /**
|
---|
2 | * ins.js
|
---|
3 | *
|
---|
4 | * Copyright 2009, Moxiecode Systems AB
|
---|
5 | * Released under LGPL License.
|
---|
6 | *
|
---|
7 | * License: http://tinymce.moxiecode.com/license
|
---|
8 | * Contributing: http://tinymce.moxiecode.com/contributing
|
---|
9 | */
|
---|
10 |
|
---|
11 | function init() {
|
---|
12 | SXE.initElementDialog('ins');
|
---|
13 | if (SXE.currentAction == "update") {
|
---|
14 | setFormValue('datetime', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'datetime'));
|
---|
15 | setFormValue('cite', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'cite'));
|
---|
16 | SXE.showRemoveButton();
|
---|
17 | }
|
---|
18 | }
|
---|
19 |
|
---|
20 | function setElementAttribs(elm) {
|
---|
21 | setAllCommonAttribs(elm);
|
---|
22 | setAttrib(elm, 'datetime');
|
---|
23 | setAttrib(elm, 'cite');
|
---|
24 | elm.removeAttribute('data-mce-new');
|
---|
25 | }
|
---|
26 |
|
---|
27 | function insertIns() {
|
---|
28 | var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'INS');
|
---|
29 |
|
---|
30 | if (elm == null) {
|
---|
31 | var s = SXE.inst.selection.getContent();
|
---|
32 | if(s.length > 0) {
|
---|
33 | insertInlineElement('ins');
|
---|
34 | var elementArray = SXE.inst.dom.select('ins[data-mce-new]');
|
---|
35 | for (var i=0; i<elementArray.length; i++) {
|
---|
36 | var elm = elementArray[i];
|
---|
37 | setElementAttribs(elm);
|
---|
38 | }
|
---|
39 | }
|
---|
40 | } else {
|
---|
41 | setElementAttribs(elm);
|
---|
42 | }
|
---|
43 | tinyMCEPopup.editor.nodeChanged();
|
---|
44 | tinyMCEPopup.execCommand('mceEndUndoLevel');
|
---|
45 | tinyMCEPopup.close();
|
---|
46 | }
|
---|
47 |
|
---|
48 | function removeIns() {
|
---|
49 | SXE.removeElement('ins');
|
---|
50 | tinyMCEPopup.close();
|
---|
51 | }
|
---|
52 |
|
---|
53 | tinyMCEPopup.onInit.add(init);
|
---|
Note: See
TracBrowser
for help on using the repository browser.