issue 867: fixed multimedeia component bug

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9924 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
taggon 2011-12-08 09:33:21 +00:00
parent b13b1ad97d
commit 04c56954ea
2 changed files with 6 additions and 3 deletions

View file

@ -22,6 +22,9 @@ jQuery(function($){
get_by_id('multimedia_'+key).value = val;
});
// auto start?
get_by_id('multimedia_auto_start').checked = ($node.attr('auto_start') == 'true');
})();
$('.btnArea button').click(function(){
@ -29,7 +32,7 @@ $('.btnArea button').click(function(){
var el_wmode = get_by_id('fo').elements['multimedia_wmode'];
var attrs = {
alt : get_by_id('multimedia_caption').value,
alt : encodeURIComponent(get_by_id('multimedia_caption').value),
width : get_by_id('multimedia_width').value || 400,
height : get_by_id('multimedia_height').value || 400,
wmode : el_wmode.value || el_wmode.options[0].value,
@ -44,7 +47,7 @@ $('.btnArea button').click(function(){
var html = '<img src="../../../../common/img/blank.gif" editor_component="multimedia_link" multimedia_src="" width="" height="" wmode="" style="display:block;width:'+attrs.width+'px;height:'+attrs.height+'px;border:2px dotted #4371B9;background:url(./modules/editor/components/multimedia_link/tpl/multimedia_link_component.gif) no-repeat center" auto_start="" alt="" />';
html = html.replace(/(\w+)=""/, function(m0,m1) {
html = html.replace(/(\w+)=""/g, function(m0,m1) {
return attrs[m1] ? (m1+'="'+attrs[m1]+'"') : '';
});