Dotclear

Changeset 1813:3ba988cd501f for admin/js


Ignore:
Timestamp:
09/01/13 13:18:28 (12 years ago)
Author:
Lepeltier kévin
Branch:
Ticket #1539
Message:

Ticket #1539 : le validateur xhtml prend en compte le contenu affiché et non plus le contenu enregistré.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/js/_post.js

    r1812 r1813  
    132132          a.className = 'button '; 
    133133          $(a).click(function() { 
     134                
     135               excerpt_content = $('#post_excerpt').css('display') != 'none' ? $('#post_excerpt').val() : $('#excerpt-area iframe').contents().find('body').html(); 
     136               post_content    = $('#post_content').css('display') != 'none' ? $('#post_content').val() : $('#content-area iframe').contents().find('body').html(); 
     137                
    134138               var params = { 
    135139                    xd_check: dotclear.nonce, 
    136140                    f: 'validatePostMarkup', 
    137                     excerpt: $('#post_excerpt').text(), 
    138                     content: $('#post_content').text(), 
     141                    excerpt: excerpt_content, 
     142                    content: post_content, 
    139143                    format: $('#post_format').get(0).value, 
    140144                    lang: $('#post_lang').get(0).value 
     
    157161                         $(p).addClass('message'); 
    158162                         $(p).text(dotclear.msg.xhtml_valid); 
    159                          $(v).append(p); 
     163                         $('#entry-content h3').after(p); 
    160164                         $(p).backgroundFade({sColor:'#666666',eColor:'#ffcc00',steps:50},function() { 
    161165                                   $(this).backgroundFade({sColor:'#ffcc00',eColor:'#666666'}); 
     
    171175                         $(div).addClass('error'); 
    172176                         $(div).html('<p><strong>' + dotclear.msg.xhtml_not_valid + '</strong></p>' + $(data).find('errors').text()); 
    173                          $(v).append(div); 
     177                         $('#entry-content h3').after(div); 
    174178                         $(div).backgroundFade({sColor:'#ffffff',eColor:'#FFBABA',steps:50},function() { 
    175179                                   $(this).backgroundFade({sColor:'#ffbaba',eColor:'#ffffff'}); 
Note: See TracChangeset for help on using the changeset viewer.

Sites map