Changeset 410:cf849a8737c0 for admin/js
- Timestamp:
- 06/23/11 13:47:38 (14 years ago)
- Branch:
- wysiwyg
- Location:
- admin/js
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/js/jquery/jquery.oembed.js
r402 r410 202 202 203 203 _getVideoCode: function(data) { 204 return internalMethods._getValidHXHTMLCode(data.html );204 return internalMethods._getValidHXHTMLCode(data.html,data); 205 205 }, 206 206 207 207 _getRichCode: function(data) { 208 return internalMethods._getValidHXHTMLCode(data.html );208 return internalMethods._getValidHXHTMLCode(data.html,data); 209 209 }, 210 210 … … 225 225 }, 226 226 227 _getValidHXHTMLCode: function(html ) {227 _getValidHXHTMLCode: function(html,data) { 228 228 var xhtml = ''; 229 var alt = new Array(); 230 if (data.provider_name) alt.push(data.provider_name); 231 if (data.author_name) alt.push(data.author_name); 232 if (data.title) alt.push(data.title); 229 233 230 234 $(html).each(function() { … … 243 247 } 244 248 } 245 xhtml += $('<div>').append(object ).html();249 xhtml += $('<div>').append(object.html(alt.join(' - '))).html(); 246 250 } 247 251 else if (this.tagName == 'OBJECT') { … … 256 260 $(this).find('embed').remove(); 257 261 } 258 xhtml += $('<div>').append($(this) ).html();262 xhtml += $('<div>').append($(this).html(alt.join(' - '))).html(); 259 263 } else { 260 xhtml += internalMethods._getValidHXHTMLCode($('<div>').append($(html).find('iframe,object')).html() );264 xhtml += internalMethods._getValidHXHTMLCode($('<div>').append($(html).find('iframe,object')).html(),data); 261 265 } 262 266 }); -
admin/js/tiny_mce/plugins/dcControls/js/popup_media.js
r405 r410 53 53 else if (type == 'mp3') { 54 54 var res = null; 55 var opts_div = { 56 class: 'media media-audio' 57 }; 58 55 59 if (alignment != 'none') { 56 res = ed.dom.createHTML('div',{style: media_align_grid[alignment]},player);60 opts_div.style = media_align_grid[alignment]; 57 61 } 58 else {59 res = player;60 }62 63 res = ed.dom.createHTML('div',opts_div,player); 64 61 65 ed.execCommand('mceInsertContent',false,res,{skip_undo : 1}); 62 66 } 63 67 else if (type == 'flv') { 64 68 var res = null; 65 var opt_div = {}; 69 var opt_div = { 70 class: 'media media-video' 71 }; 66 72 var oplayer = $(player); 67 73 var flashvars = $('[name="FlashVars"]',player).val(); … … 86 92 } 87 93 else { 88 ed.execCommand('mceInsertLink', false, '#mce_temp_url#', {skip_undo : 1}); 94 var res = null; 95 var opts_a = { 96 href: url, 97 title: title 98 }; 89 99 90 elementArray = tinymce.grep(ed.dom.select('a'),function(n) {return ed.dom.getAttrib(n,'href') == '#mce_temp_url#';}); 91 for (i=0; i<elementArray.length; i++) { 92 var node = elementArray[i]; 93 ed.dom.setAttrib(node,'href',href); 94 ed.dom.setAttrib(node,'title',title); 100 if (alignment != 'none') { 101 opts_a.style = media_align_grid[alignment]; 95 102 } 103 104 res = ed.dom.createHTML('a',opts_a,(description || title)); 105 106 ed.execCommand('mceInsertContent',false,res,{skip_undo : 1}); 96 107 } 97 108 -
admin/js/tiny_mce/plugins/dcControls/js/popup_web_media.js
r405 r410 88 88 if (data != null) { 89 89 var res = null; 90 var opts_div = {}; 90 var opts_div = { 91 class: 'media media-' + data.type 92 }; 91 93 var opts_img = { 92 94 src: data.thumbnail_url,
Note: See TracChangeset
for help on using the changeset viewer.