summaryrefslogtreecommitdiff
path: root/program/js/tiny_mce/plugins/media/js/media.js
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-04-27 07:36:26 +0000
committeralecpl <alec@alec.pl>2009-04-27 07:36:26 +0000
commit29da6414db77512106250b9832a0b4a0168bd7eb (patch)
treed3f36001953d24292166ef3ab1b62e87b3b89cf6 /program/js/tiny_mce/plugins/media/js/media.js
parent1fb5874f276e9ce7731e8f166b19a371ce33b894 (diff)
- Updated TinyMCE to 3.2.3 version
Diffstat (limited to 'program/js/tiny_mce/plugins/media/js/media.js')
-rw-r--r--program/js/tiny_mce/plugins/media/js/media.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/program/js/tiny_mce/plugins/media/js/media.js b/program/js/tiny_mce/plugins/media/js/media.js
index f04d5d9c3..86cfa9856 100644
--- a/program/js/tiny_mce/plugins/media/js/media.js
+++ b/program/js/tiny_mce/plugins/media/js/media.js
@@ -183,7 +183,7 @@ function insertMedia() {
tinyMCEPopup.restoreSelection();
if (!AutoValidator.validate(f)) {
- alert(ed.getLang('invalid_data'));
+ tinyMCEPopup.alert(ed.getLang('invalid_data'));
return false;
}
@@ -218,7 +218,7 @@ function insertMedia() {
break;
}
- if (fe.width != f.width.value || fe.height != f.height.height)
+ if (fe.width != f.width.value || fe.height != f.height.value)
ed.execCommand('mceRepaint');
fe.title = serializeParameters();
@@ -359,7 +359,9 @@ function changedType(t) {
d.getElementById('shockwave_options').style.display = 'none';
d.getElementById('wmp_options').style.display = 'none';
d.getElementById('rmp_options').style.display = 'none';
- d.getElementById(t + '_options').style.display = 'block';
+
+ if (t)
+ d.getElementById(t + '_options').style.display = 'block';
}
function serializeParameters() {
@@ -467,7 +469,7 @@ function setBool(pl, p, n) {
if (typeof(pl[n]) == "undefined")
return;
- document.forms[0].elements[p + "_" + n].checked = pl[n];
+ document.forms[0].elements[p + "_" + n].checked = pl[n] != 'false';
}
function setStr(pl, p, n) {
@@ -488,7 +490,7 @@ function getBool(p, n, d, tv, fv) {
tv = typeof(tv) == 'undefined' ? 'true' : "'" + jsEncode(tv) + "'";
fv = typeof(fv) == 'undefined' ? 'false' : "'" + jsEncode(fv) + "'";
- return (v == d) ? '' : n + (v ? ':' + tv + ',' : ':' + fv + ',');
+ return (v == d) ? '' : n + (v ? ':' + tv + ',' : ":\'" + fv + "\',");
}
function getStr(p, n, d) {
@@ -600,7 +602,7 @@ function generatePreview(c) {
// Avoid annoying warning about insecure items
if (!tinymce.isIE || document.location.protocol != 'https:') {
- h += '<object classid="clsid:' + cls + '" codebase="' + codebase + '" width="' + pl.width + '" height="' + pl.height + '" id="' + pl.id + '" name="' + pl.name + '" align="' + pl.align + '">';
+ h += '<object classid="' + cls + '" codebase="' + codebase + '" width="' + pl.width + '" height="' + pl.height + '" id="' + pl.id + '" name="' + pl.name + '" align="' + pl.align + '">';
for (n in pl) {
h += '<param name="' + n + '" value="' + pl[n] + '">';