Dotclear

Changeset 410:cf849a8737c0 for admin/js


Ignore:
Timestamp:
06/23/11 13:47:38 (14 years ago)
Author:
Tomtom33 <tbouron@…>
Branch:
wysiwyg
Message:

Fixed *.js for editor CSS compliance

Location:
admin/js
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • admin/js/jquery/jquery.oembed.js

    r402 r410  
    202202           
    203203          _getVideoCode: function(data) { 
    204                return internalMethods._getValidHXHTMLCode(data.html); 
     204               return internalMethods._getValidHXHTMLCode(data.html,data); 
    205205          }, 
    206206           
    207207          _getRichCode: function(data) { 
    208                return internalMethods._getValidHXHTMLCode(data.html); 
     208               return internalMethods._getValidHXHTMLCode(data.html,data); 
    209209          }, 
    210210           
     
    225225          }, 
    226226           
    227           _getValidHXHTMLCode: function(html) { 
     227          _getValidHXHTMLCode: function(html,data) { 
    228228               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); 
    229233                
    230234               $(html).each(function() { 
     
    243247                              } 
    244248                         } 
    245                          xhtml += $('<div>').append(object).html(); 
     249                         xhtml += $('<div>').append(object.html(alt.join(' - '))).html(); 
    246250                    }  
    247251                    else if (this.tagName == 'OBJECT') { 
     
    256260                              $(this).find('embed').remove(); 
    257261                         } 
    258                          xhtml += $('<div>').append($(this)).html(); 
     262                         xhtml += $('<div>').append($(this).html(alt.join(' - '))).html(); 
    259263                    } else { 
    260                          xhtml += internalMethods._getValidHXHTMLCode($('<div>').append($(html).find('iframe,object')).html()); 
     264                         xhtml += internalMethods._getValidHXHTMLCode($('<div>').append($(html).find('iframe,object')).html(),data); 
    261265                    } 
    262266               }); 
  • admin/js/tiny_mce/plugins/dcControls/js/popup_media.js

    r405 r410  
    5353               else if (type == 'mp3') { 
    5454                    var res = null; 
     55                    var opts_div = { 
     56                         class: 'media media-audio' 
     57                    }; 
     58                     
    5559                    if (alignment != 'none') { 
    56                          res = ed.dom.createHTML('div',{style: media_align_grid[alignment]},player); 
     60                         opts_div.style = media_align_grid[alignment]; 
    5761                    } 
    58                     else { 
    59                          res = player; 
    60                     } 
     62                     
     63                    res = ed.dom.createHTML('div',opts_div,player); 
     64                     
    6165                    ed.execCommand('mceInsertContent',false,res,{skip_undo : 1}); 
    6266               } 
    6367               else if (type == 'flv') { 
    6468                    var res = null; 
    65                     var opt_div = {}; 
     69                    var opt_div = { 
     70                         class: 'media media-video' 
     71                    }; 
    6672                    var oplayer = $(player); 
    6773                    var flashvars = $('[name="FlashVars"]',player).val(); 
     
    8692               } 
    8793               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                    }; 
    8999                     
    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]; 
    95102                    } 
     103                     
     104                    res = ed.dom.createHTML('a',opts_a,(description || title)); 
     105                     
     106                    ed.execCommand('mceInsertContent',false,res,{skip_undo : 1}); 
    96107               } 
    97108                
  • admin/js/tiny_mce/plugins/dcControls/js/popup_web_media.js

    r405 r410  
    8888               if (data != null) { 
    8989                    var res = null; 
    90                     var opts_div = {}; 
     90                    var opts_div = { 
     91                         class: 'media media-' + data.type 
     92                    }; 
    9193                    var opts_img = { 
    9294                         src: data.thumbnail_url, 
Note: See TracChangeset for help on using the changeset viewer.

Sites map