1 | function init() {
|
---|
2 | tinyMCEPopup.resizeToInnerSize();
|
---|
3 | }
|
---|
4 |
|
---|
5 | function getCheckedValue(radioObj) {
|
---|
6 | if(!radioObj)
|
---|
7 | return "";
|
---|
8 | var radioLength = radioObj.length;
|
---|
9 | if(radioLength == undefined)
|
---|
10 | if(radioObj.checked)
|
---|
11 | return radioObj.value;
|
---|
12 | else
|
---|
13 | return "";
|
---|
14 | for(var i = 0; i < radioLength; i++) {
|
---|
15 | if(radioObj[i].checked) {
|
---|
16 | return radioObj[i].value;
|
---|
17 | }
|
---|
18 | }
|
---|
19 | return "";
|
---|
20 | }
|
---|
21 |
|
---|
22 |
|
---|
23 | function insertLexiLink() {
|
---|
24 |
|
---|
25 | var tagtext;
|
---|
26 | var add_text = false;
|
---|
27 |
|
---|
28 | var rss = document.getElementById('rss_panel');
|
---|
29 |
|
---|
30 | // who is active ?
|
---|
31 | if (rss.className.indexOf('current') != -1) {
|
---|
32 | var rsslink = document.getElementById('rsslink').value;
|
---|
33 | var items = document.getElementById('rssitems')
|
---|
34 | var rssitems = items.options[items.selectedIndex].value;
|
---|
35 | var title="";
|
---|
36 | if(getCheckedValue(document.Lexi.group1)==2) {
|
---|
37 | title = ","+document.getElementById('rssowntitle').value;
|
---|
38 | }
|
---|
39 |
|
---|
40 | var config = 0;
|
---|
41 |
|
---|
42 | if (document.getElementById('rsscache').checked) config = config + 1;
|
---|
43 | if (document.getElementById('rsssc').checked) config = config + 2;
|
---|
44 | if (document.getElementById('rssst').checked) config = config + 4;
|
---|
45 | if (document.getElementById('rsstb').checked) config = config + 8;
|
---|
46 |
|
---|
47 |
|
---|
48 | tagtext = "[lexi:" + config + "," + rsslink + title + "," + rssitems + "]";
|
---|
49 | add_text = true;
|
---|
50 | }
|
---|
51 |
|
---|
52 |
|
---|
53 | if(add_text) {
|
---|
54 | window.tinyMCE.execInstanceCommand('content', 'mceInsertContent', false, tagtext);
|
---|
55 | }
|
---|
56 | window.tinyMCEPopup.close();
|
---|
57 | }
|
---|