]> git.donarmstrong.com Git - roundcube.git/blobdiff - program/js/tiny_mce/plugins/media/js/media.js
Imported Upstream version 0.3
[roundcube.git] / program / js / tiny_mce / plugins / media / js / media.js
index f04d5d9c31ce2a8224058412502f1d250e3a1cb1..86cfa98563d829fed029f6bc164bc4bc6493b0ef 100644 (file)
@@ -183,7 +183,7 @@ function insertMedia() {
        tinyMCEPopup.restoreSelection();\r
 \r
        if (!AutoValidator.validate(f)) {\r
-               alert(ed.getLang('invalid_data'));\r
+               tinyMCEPopup.alert(ed.getLang('invalid_data'));\r
                return false;\r
        }\r
 \r
@@ -218,7 +218,7 @@ function insertMedia() {
                                break;\r
                }\r
 \r
-               if (fe.width != f.width.value || fe.height != f.height.height)\r
+               if (fe.width != f.width.value || fe.height != f.height.value)\r
                        ed.execCommand('mceRepaint');\r
 \r
                fe.title = serializeParameters();\r
@@ -359,7 +359,9 @@ function changedType(t) {
        d.getElementById('shockwave_options').style.display = 'none';\r
        d.getElementById('wmp_options').style.display = 'none';\r
        d.getElementById('rmp_options').style.display = 'none';\r
-       d.getElementById(t + '_options').style.display = 'block';\r
+\r
+       if (t)\r
+               d.getElementById(t + '_options').style.display = 'block';\r
 }\r
 \r
 function serializeParameters() {\r
@@ -467,7 +469,7 @@ function setBool(pl, p, n) {
        if (typeof(pl[n]) == "undefined")\r
                return;\r
 \r
-       document.forms[0].elements[p + "_" + n].checked = pl[n];\r
+       document.forms[0].elements[p + "_" + n].checked = pl[n] != 'false';\r
 }\r
 \r
 function setStr(pl, p, n) {\r
@@ -488,7 +490,7 @@ function getBool(p, n, d, tv, fv) {
        tv = typeof(tv) == 'undefined' ? 'true' : "'" + jsEncode(tv) + "'";\r
        fv = typeof(fv) == 'undefined' ? 'false' : "'" + jsEncode(fv) + "'";\r
 \r
-       return (v == d) ? '' : n + (v ? ':' + tv + ',' : ':' + fv + ',');\r
+       return (v == d) ? '' : n + (v ? ':' + tv + ',' : ":\'" + fv + "\',");\r
 }\r
 \r
 function getStr(p, n, d) {\r
@@ -600,7 +602,7 @@ function generatePreview(c) {
 \r
        // Avoid annoying warning about insecure items\r
        if (!tinymce.isIE || document.location.protocol != 'https:') {\r
-               h += '<object classid="clsid:' + cls + '" codebase="' + codebase + '" width="' + pl.width + '" height="' + pl.height + '" id="' + pl.id + '" name="' + pl.name + '" align="' + pl.align + '">';\r
+               h += '<object classid="' + cls + '" codebase="' + codebase + '" width="' + pl.width + '" height="' + pl.height + '" id="' + pl.id + '" name="' + pl.name + '" align="' + pl.align + '">';\r
 \r
                for (n in pl) {\r
                        h += '<param name="' + n + '" value="' + pl[n] + '">';\r