Changes in [1837:bc086634dac8:1811:ca14fc7a6ad5]
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/js/_post.js
r1832 r1760 90 90 $(this).val(last_post_format); 91 91 } 92 93 $('.format_control > *').addClass('hide');94 $('.format_control:not(.control_no_'+$(this).val()+') > *').removeClass('hide');95 92 }); 96 93 … … 120 117 return window.confirm(dotclear.msg.confirm_delete_post); 121 118 }); 122 123 // Markup validator124 var v = $('<div class="format_control"><p><a id="a-validator"></a></p><div/>').get(0);125 $('.format_control').before(v);126 var a = $('#a-validator').get(0);127 a.href = '#';128 a.className = 'button ';129 $(a).click(function() {130 131 excerpt_content = $('#post_excerpt').css('display') != 'none' ? $('#post_excerpt').val() : $('#excerpt-area iframe').contents().find('body').html();132 post_content = $('#post_content').css('display') != 'none' ? $('#post_content').val() : $('#content-area iframe').contents().find('body').html();133 134 var params = {135 xd_check: dotclear.nonce,136 f: 'validatePostMarkup',137 excerpt: excerpt_content,138 content: post_content,139 format: $('#post_format').get(0).value,140 lang: $('#post_lang').get(0).value141 };142 143 $.post('services.php',params,function(data) {144 if ($(data).find('rsp').attr('status') != 'ok') {145 alert($(data).find('rsp message').text());146 return false;147 }148 149 $('.message, .success, .error, .warning-msg').remove();150 151 if ($(data).find('valid').text() == 1) {152 var p = document.createElement('p');153 p.id = 'markup-validator';154 155 $(p).addClass('success');156 $(p).text(dotclear.msg.xhtml_valid);157 $('#entry-content h3').after(p);158 $(p).backgroundFade({sColor:'#9BCA1C',eColor:'#bee74b',steps:20});159 } else {160 var div = document.createElement('div');161 div.id = 'markup-validator';162 163 $(div).addClass('error');164 $(div).html('<p><strong>' + dotclear.msg.xhtml_not_valid + '</strong></p>' + $(data).find('errors').text());165 $('#entry-content h3').after(div);166 $(div).backgroundFade({sColor:'#ffdec8',eColor:'#ffbaba',steps:20});167 }168 169 if ( $('#post_excerpt').text() != excerpt_content || $('#post_content').text() != post_content ) {170 var pn = document.createElement('p');171 $(pn).addClass('warning-msg');172 $(pn).text(dotclear.msg.warning_validate_no_save_content);173 $('#entry-content h3').after(pn);174 }175 176 return false;177 });178 179 return false;180 });181 182 a.appendChild(document.createTextNode(dotclear.msg.xhtml_validator));183 184 $('.format_control > *').addClass('hide');185 $('.format_control:not(.control_no_'+last_post_format+') > *').removeClass('hide');186 119 187 120 // Hide some fields … … 251 184 }); 252 185 186 // Markup validator 187 var h = document.createElement('h4'); 188 var a = document.createElement('a'); 189 a.href = '#'; 190 a.className = 'button'; 191 $(a).click(function() { 192 var params = { 193 xd_check: dotclear.nonce, 194 f: 'validatePostMarkup', 195 excerpt: $('#post_excerpt').text(), 196 content: $('#post_content').text(), 197 format: $('#post_format').get(0).value, 198 lang: $('#post_lang').get(0).value 199 }; 200 201 $.post('services.php',params,function(data) { 202 if ($(data).find('rsp').attr('status') != 'ok') { 203 alert($(data).find('rsp message').text()); 204 return false; 205 } 206 207 if ($(data).find('valid').text() == 1) { 208 var p = document.createElement('p'); 209 p.id = 'markup-validator'; 210 211 if ($('#markup-validator').length > 0) { 212 $('#markup-validator').remove(); 213 } 214 215 $(p).addClass('message'); 216 $(p).text(dotclear.msg.xhtml_valid); 217 $(p).insertAfter(h); 218 $(p).backgroundFade({sColor:'#676e78',eColor:'#ffcc00',steps:50},function() { 219 $(this).backgroundFade({sColor:'#ffcc00',eColor:'#676e78'}); 220 }); 221 } else { 222 var div = document.createElement('div'); 223 div.id = 'markup-validator'; 224 225 if ($('#markup-validator').length > 0) { 226 $('#markup-validator').remove(); 227 } 228 229 $(div).addClass('error'); 230 $(div).html('<p><strong>' + dotclear.msg.xhtml_not_valid + '</strong></p>' + $(data).find('errors').text()); 231 $(div).insertAfter(h); 232 $(div).backgroundFade({sColor:'#ffffff',eColor:'#FFBABA',steps:50},function() { 233 $(this).backgroundFade({sColor:'#ffbaba',eColor:'#ffffff'}); 234 }); 235 } 236 237 return false; 238 }); 239 240 return false; 241 }); 242 243 a.appendChild(document.createTextNode(dotclear.msg.xhtml_validator)); 244 h.appendChild(a); 245 $(h).appendTo('#entry-content'); 246 253 247 // Check unsaved changes before XHTML conversion 254 248 var excerpt = $('#post_excerpt').val(); -
admin/js/common.js
r1834 r1798 263 263 }, 264 264 265 checkboxesHelpers: function(e , target) {265 checkboxesHelpers: function(e) { 266 266 $(e).append(document.createTextNode(dotclear.msg.to_select)); 267 267 $(e).append(document.createTextNode(' ')); 268 268 269 target = target || $(e).parents('form').find('input[type="checkbox"]');270 271 269 var a = document.createElement('a'); 272 270 a.href='#'; 273 271 $(a).append(document.createTextNode(dotclear.msg.select_all)); 274 272 a.onclick = function() { 275 target.check();273 $(this).parents('form').find('input[type="checkbox"]').check(); 276 274 return false; 277 275 }; … … 284 282 $(a).append(document.createTextNode(dotclear.msg.no_selection)); 285 283 a.onclick = function() { 286 target.unCheck();284 $(this).parents('form').find('input[type="checkbox"]').unCheck(); 287 285 return false; 288 286 }; … … 295 293 $(a).append(document.createTextNode(dotclear.msg.invert_sel)); 296 294 a.onclick = function() { 297 target.toggleCheck();295 $(this).parents('form').find('input[type="checkbox"]').toggleCheck(); 298 296 return false; 299 297 }; -
admin/js/jsToolBar/jsToolBar.wysiwyg.js
r1833 r1753 46 46 47 47 if (mode == 'xhtml') { 48 this.wwg_mode = true;49 48 this.draw(mode); 50 49 } else { … … 52 51 this.syncContents('iframe'); 53 52 } 54 this.wwg_mode = false;55 53 this.removeEditor(); 56 54 this.textarea.style.display = ''; … … 88 86 } else if (window.navigator.product != undefined && 89 87 window.navigator.product == 'Gecko') { 90 This.ibody.innerHTML = '<p><br _moz_editor_blogus_node="TRUE" _moz_dirty="" /></p>';88 This.ibody.innerHTML = '<p><br _moz_editor_blogus_node="TRUE" _moz_dirty=""></p>'; 91 89 } else { 92 90 var idoc = This.iwin.document; -
admin/js/meta-editor.js
r1819 r1741 113 113 114 114 addMetaDialog: function() { 115 var This = this; 115 116 116 117 if (this.submit_button == null) { … … 120 121 } 121 122 123 // View meta list 124 var a = $('<a href="#">' + this.text_choose + '</a>'); 125 a.click(function() { 126 This.showMetaList(metaEditor.prototype.meta_type,$(this).parent()); 127 return false; 128 }); 122 129 if (this.text_separation != '') { 123 130 this.target.append($('<p></p>').addClass('form-note').append(this.text_separation.replace(/%s/,this.meta_type))); 124 131 } 125 126 this.showMetaList(metaEditor.prototype.meta_type,this.target); 127 132 this.target.append($('<p></p>').append(a)); 128 133 }, 129 134 130 135 showMetaList: function(type,target) { 136 target.empty(); 137 target.append('...'); 138 target.addClass('addMeta'); 131 139 132 140 var params = { … … 143 151 144 152 $.get(this.service_uri,params,function(data) { 145 146 var pl = $('<p class="addMeta"></p>');147 148 $('.addMeta').remove();149 150 153 if ($(data).find('meta').length > 0) { 151 pl.empty();154 target.empty(); 152 155 var meta_link; 153 156 … … 162 165 163 166 if (i>0) { 164 pl.append(', ');167 target.append(', '); 165 168 } 166 pl.append(meta_link);169 target.append(meta_link); 167 170 }); 168 171 … … 174 177 return false; 175 178 }); 176 pl.append(', ').append(a_more); 177 178 pl.addClass('hide'); 179 180 var pa = $('<p></p>'); 181 target.append(pa); 182 183 var a = $('<a href="#" class="metaGetList">' + This.text_choose + '</a>'); 184 a.click(function() { 185 $('.addMeta').removeClass('hide'); 186 $('.metaGetList').remove(); 187 return false; 188 }); 189 190 pa.append(a); 191 } 192 193 target.append(pl); 194 179 target.append(', ').append(a_more); 180 } 195 181 } else { 196 pl.empty();182 target.empty(); 197 183 } 198 184 }); -
admin/post.php
r1831 r1789 455 455 '<p>'.form::combo('post_format',$formaters_combo,$post_format,'maximal'). 456 456 '</p>'. 457 '<p class="format_control control_no_xhtml">'.458 '<a id="convert-xhtml" class="button '.($post_id && $post_format != 'wiki' ? ' hide' : '').'" href="post.php?id='.$post_id.'&xconv=1">'.459 __('Convert to XHTML').'</a> </p></div>')),457 '<p>'.($post_id && $post_format != 'xhtml' ? 458 '<a id="convert-xhtml" class="button" href="post.php?id='.$post_id.'&xconv=1">'. 459 __('Convert to XHTML').'</a>' : '').'</p></div>')), 460 460 'metas-box' => array( 461 461 'title' => __('Ordering'), … … 533 533 534 534 "post_content" => 535 '<p class="area" id="content-area"><label class="required" '.535 '<p class="area"><label class="required" '. 536 536 'for="post_content"><abbr title="'.__('Required field').'">*</abbr> '.__('Content:').'</label> '. 537 537 form::textarea('post_content',50,$core->auth->getOption('edit_size'),html::escapeHTML($post_content)). -
admin/style/default.css
r1837 r1811 1997 1997 } 1998 1998 /* caché pour tout le monde */ 1999 .hide , .button.hide{1999 .hide { 2000 2000 display: none; 2001 2001 } -
inc/admin/lib.dc.page.php
r1836 r1809 585 585 self::jsVar('dotclear.msg.xhtml_not_valid', 586 586 __('There are XHTML markup errors.')). 587 self::jsVar('dotclear.msg.warning_validate_no_save_content',588 __('Attention: an audit of a content not yet registered.')).589 587 self::jsVar('dotclear.msg.confirm_change_post_format', 590 588 __('You have unsaved changes. Switch post format will loose these changes. Proceed anyway?')). -
locales/fr/main.po
r1834 r1793 2325 2325 msgstr "Il y a des erreurs XHTML." 2326 2326 2327 msgid "Attention: an audit of a content not yet registered."2328 msgstr "Attention : la vérification porte sur un contenu non encore enregistré."2329 2330 2327 msgid "You have unsaved changes. Switch post format will loose these changes. Proceed anyway?" 2331 2328 msgstr "Vous avez des modifications non sauvegardées. Changer de format vous fera perdre ces modifications. Continuer ?" -
plugins/pages/page.php
r1833 r1741 406 406 '<p>'.form::combo('post_format',$formaters_combo,$post_format,'maximal'). 407 407 '</p>'. 408 '<p class="format_control control_wiki">'.409 '<a id="convert-xhtml" class="button '.($post_id && $post_format != 'wiki' ? ' hide' : '').'" href="post.php?id='.$post_id.'&xconv=1">'.410 __('Convert to XHTML').'</a> </p></div>')),408 '<p>'.($post_id && $post_format != 'xhtml' ? 409 '<a id="convert-xhtml" class="button maximal" href="post.php?id='.$post_id.'&xconv=1">'. 410 __('Convert to XHTML').'</a>' : '').'</p></div>')), 411 411 'metas-box' => array( 412 412 'title' => __('Ordering'), … … 473 473 474 474 "post_content" => 475 '<p class="area" id="content-area"><label class="required" '.475 '<p class="area"><label class="required" '. 476 476 'for="post_content"><abbr title="'.__('Required field').'">*</abbr> '.__('Content:').'</label> '. 477 477 form::textarea('post_content',50,$core->auth->getOption('edit_size'),html::escapeHTML($post_content)). … … 494 494 echo '<div id="entry-wrapper">'; 495 495 echo '<div id="entry-content"><div class="constrained">'; 496 echo '<h3 class="out-of-screen-if-js">'.__('Edit page').'</h3>';497 496 498 497 -
plugins/pings/lib.pings.php
r1818 r1398 65 65 $item .= 66 66 '<p class="ping-services"><label for="pings_do-'.$i.'" class="classic">'. 67 form::checkbox(array('pings_do[]','pings_do-'.$i),html::escapeHTML($v),in_array($v,$pings_do) , 'check-ping-services').' '.67 form::checkbox(array('pings_do[]','pings_do-'.$i),html::escapeHTML($v),in_array($v,$pings_do)).' '. 68 68 html::escapeHTML($k).'</label></p>'; 69 69 $i++; -
plugins/pings/post.js
r1818 r1699 4 4 p = $('<p></p>'); 5 5 p.addClass('ping-services'); 6 $('p.ping-services:last').after(p); 7 dotclear.checkboxesHelpers($('p.ping-services:last').get(0), $('.check-ping-services')); 6 a = $('<a href="#"></a>'); 7 a.text(dotclear.msg.check_all); 8 a.click(function() { 9 $('p.ping-services input[type="checkbox"]').attr('checked','checked'); 10 return false; 11 }); 12 $('p.ping-services:last').after(p.append(a)); 8 13 } 9 14 $('h5.ping-services').toggleWithLegend($('p.ping-services'),{ -
plugins/tags/style.css
r1820 r0 99 99 color: white; 100 100 } 101 #post_meta_input {102 margin: 0 0.5em 0 0;103 width: 13em;104 }105 #post_meta_input:focus {106 -moz-box-sizing: content-box;107 }108 #tags-edit input[type=button] {109 width: 3.5em;110 }
Note: See TracChangeset
for help on using the changeset viewer.