equal
deleted
inserted
replaced
22 |
22 |
23 for (x=0; x<tsrc.length; x++) |
23 for (x=0; x<tsrc.length; x++) |
24 sel.options[sel.options.length] = new Option(tsrc[x].title, tinyMCEPopup.editor.documentBaseURI.toAbsolute(tsrc[x].src)); |
24 sel.options[sel.options.length] = new Option(tsrc[x].title, tinyMCEPopup.editor.documentBaseURI.toAbsolute(tsrc[x].src)); |
25 |
25 |
26 this.resize(); |
26 this.resize(); |
|
27 this.tsrc = tsrc; |
27 }, |
28 }, |
28 |
29 |
29 resize : function() { |
30 resize : function() { |
30 var w, h, e; |
31 var w, h, e; |
31 |
32 |
51 tinymce.each(ed.getParam("content_css", '').split(','), function(u) { |
52 tinymce.each(ed.getParam("content_css", '').split(','), function(u) { |
52 d.write('<link href="' + ed.documentBaseURI.toAbsolute(u) + '" rel="stylesheet" type="text/css" />'); |
53 d.write('<link href="' + ed.documentBaseURI.toAbsolute(u) + '" rel="stylesheet" type="text/css" />'); |
53 }); |
54 }); |
54 }, |
55 }, |
55 |
56 |
56 selectTemplate : function(u) { |
57 selectTemplate : function(u, ti) { |
57 var d = window.frames['templatesrc'].document; |
58 var d = window.frames['templatesrc'].document, x, tsrc = this.tsrc; |
58 |
59 |
59 if (!u) |
60 if (!u) |
60 return; |
61 return; |
61 |
62 |
62 d.body.innerHTML = this.templateHTML = this.getFileContents(u); |
63 d.body.innerHTML = this.templateHTML = this.getFileContents(u); |
|
64 |
|
65 for (x=0; x<tsrc.length; x++) { |
|
66 if (tsrc[x].title == ti) |
|
67 document.getElementById('tmpldesc').innerHTML = tsrc[x].description || ''; |
|
68 } |
63 }, |
69 }, |
64 |
70 |
65 insert : function() { |
71 insert : function() { |
66 tinyMCEPopup.execCommand('mceInsertTemplate', false, { |
72 tinyMCEPopup.execCommand('mceInsertTemplate', false, { |
67 content : this.templateHTML, |
73 content : this.templateHTML, |