Changeset 1815:07b857f03655
- Timestamp:
- 09/04/13 14:29:21 (11 years ago)
- Branch:
- Ticket #1539
- Parents:
- 1814:53cc8fc5cad5 (diff), 1717:9df047961e9c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Location:
- admin
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/js/_post.js
r1717 r1815 90 90 $(this).val(last_post_format); 91 91 } 92 93 $('.format_control > *').addClass('hide'); 94 if( $(this).val() == 'xhtml' ) { 95 $('.control_xhtml > *').removeClass('hide'); 96 } else if ( $(this).val() == 'wiki' ) { 97 $('.control_wiki > *').removeClass('hide'); 98 } 92 99 }); 93 100 … … 117 124 return window.confirm(dotclear.msg.confirm_delete_post); 118 125 }); 126 127 // Markup validator 128 var v = $('<div class="format_control control_xhtml"><p><a id="a-validator"></a></p><div/>').get(0); 129 $('.control_wiki').before(v); 130 var a = $('#a-validator').get(0); 131 a.href = '#'; 132 a.className = 'button '; 133 $(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 138 var params = { 139 xd_check: dotclear.nonce, 140 f: 'validatePostMarkup', 141 excerpt: excerpt_content, 142 content: post_content, 143 format: $('#post_format').get(0).value, 144 lang: $('#post_lang').get(0).value 145 }; 146 147 $.post('services.php',params,function(data) { 148 if ($(data).find('rsp').attr('status') != 'ok') { 149 alert($(data).find('rsp message').text()); 150 return false; 151 } 152 153 if ($(data).find('valid').text() == 1) { 154 var p = document.createElement('p'); 155 p.id = 'markup-validator'; 156 157 if ($('#markup-validator').length > 0) { 158 $('#markup-validator').remove(); 159 } 160 161 $(p).addClass('message'); 162 $(p).text(dotclear.msg.xhtml_valid); 163 $('#entry-content h3').after(p); 164 $(p).backgroundFade({sColor:'#666666',eColor:'#ffcc00',steps:50},function() { 165 $(this).backgroundFade({sColor:'#ffcc00',eColor:'#666666'}); 166 }); 167 } else { 168 var div = document.createElement('div'); 169 div.id = 'markup-validator'; 170 171 if ($('#markup-validator').length > 0) { 172 $('#markup-validator').remove(); 173 } 174 175 $(div).addClass('error'); 176 $(div).html('<p><strong>' + dotclear.msg.xhtml_not_valid + '</strong></p>' + $(data).find('errors').text()); 177 $('#entry-content h3').after(div); 178 $(div).backgroundFade({sColor:'#ffffff',eColor:'#FFBABA',steps:50},function() { 179 $(this).backgroundFade({sColor:'#ffbaba',eColor:'#ffffff'}); 180 }); 181 } 182 183 return false; 184 }); 185 186 return false; 187 }); 188 189 a.appendChild(document.createTextNode(dotclear.msg.xhtml_validator)); 190 191 $('.format_control > *').addClass('hide'); 192 if ( last_post_format == 'xhtml' ) { 193 $('.control_xhtml > *').removeClass('hide'); 194 } else if ( last_post_format == 'wiki' ) { 195 $('.control_wiki > *').removeClass('hide'); 196 } 119 197 120 198 // Hide some fields … … 184 262 }); 185 263 186 // Markup validator187 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).value199 };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:'#666666',eColor:'#ffcc00',steps:50},function() {219 $(this).backgroundFade({sColor:'#ffcc00',eColor:'#666666'});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 247 264 // Check unsaved changes before XHTML conversion 248 265 var excerpt = $('#post_excerpt').val(); -
admin/js/_post.js
r1813 r1815 198 198 // Hide some fields 199 199 $('#notes-area label').toggleWithLegend($('#notes-area').children().not('label'),{ 200 cookie: 'dcx_post_notes',200 user_pref: 'dcx_post_notes', 201 201 legend_click:true, 202 202 hide: $('#post_notes').val() == '' … … 207 207 }); 208 208 $('#post_lang').parent().children('label').toggleWithLegend($('#post_lang'),{ 209 cookie: 'dcx_post_lang',209 user_pref: 'dcx_post_lang', 210 210 legend_click: true 211 211 }); 212 212 $('#post_password').parent().children('label').toggleWithLegend($('#post_password'),{ 213 cookie: 'dcx_post_password',213 user_pref: 'dcx_post_password', 214 214 legend_click: true, 215 215 hide: $('#post_password').val() == '' 216 216 }); 217 217 $('#post_status').parent().children('label').toggleWithLegend($('#post_status'),{ 218 cookie: 'dcx_post_status',218 user_pref: 'dcx_post_status', 219 219 legend_click: true 220 220 }); 221 221 $('#post_dt').parent().children('label').toggleWithLegend($('#post_dt').parent().children().not('label'),{ 222 cookie: 'dcx_post_dt',222 user_pref: 'dcx_post_dt', 223 223 legend_click: true 224 224 }); 225 225 $('#label_format').toggleWithLegend($('#label_format').parent().children().not('#label_format'),{ 226 cookie: 'dcx_post_format',226 user_pref: 'dcx_post_format', 227 227 legend_click: true 228 228 }); 229 229 $('#cat_id').parent().children('label').toggleWithLegend($('#cat_id'),{ 230 cookie: 'cat_id', 230 user_pref: 'cat_id', 231 legend_click: true 232 }); 233 $('#label_comment_tb').toggleWithLegend($('#label_comment_tb').parent().children().not('#label_comment_tb'),{ 234 user_pref: 'dcx_comment_tb', 231 235 legend_click: true 232 236 }); 233 237 $('#post_url').parent().children('label').toggleWithLegend($('#post_url').parent().children().not('label'),{ 234 cookie: 'post_url',238 user_pref: 'post_url', 235 239 legend_click: true 236 240 }); 237 241 // We load toolbar on excerpt only when it's ready 238 242 $('#excerpt-area label').toggleWithLegend($('#excerpt-area').children().not('label'),{ 239 cookie: 'dcx_post_excerpt',243 user_pref: 'dcx_post_excerpt', 240 244 legend_click: true, 241 245 hide: $('#post_excerpt').val() == '' -
admin/post.php
r1714 r1815 445 445 '<p>'.form::combo('post_format',$formaters_combo,$post_format,'maximal'). 446 446 '</p>'. 447 '<p >'.($post_id && $post_format != 'xhtml' ?448 '<a id="convert-xhtml" class="button maximal " href="post.php?id='.$post_id.'&xconv=1">'.449 __('Convert to XHTML').'</a> ' : '').'</p></div>')),447 '<p class="format_control control_wiki">'. 448 '<a id="convert-xhtml" class="button maximal '.($post_id && $post_format != 'wiki' ? 'hide' : '').'" href="post.php?id='.$post_id.'&xconv=1">'. 449 __('Convert to XHTML').'</a></p></div>')), 450 450 'metas-box' => array( 451 451 'title' => __('Ordering'), … … 523 523 524 524 "post_content" => 525 '<p class="area" ><label class="required" '.525 '<p class="area" id="content-area"><label class="required" '. 526 526 'for="post_content"><abbr title="'.__('Required field').'">*</abbr> '.__('Content:').'</label> '. 527 527 form::textarea('post_content',50,$core->auth->getOption('edit_size'),html::escapeHTML($post_content)). -
admin/post.php
r1813 r1815 472 472 'title' => __('Options'), 473 473 'items' => array( 474 'post_open_comment' => 474 'post_open_comment_tb' => 475 '<div>'. 476 '<h5 id="label_comment_tb">'.__('Commentaires et rétroliens').'</h5>'. 475 477 '<p><label for="post_open_comment" class="classic">'. 476 478 form::checkbox('post_open_comment',1,$post_open_comment).' '. … … 482 484 __('Warning: Comments are not more accepted for this entry.').'</p>') : 483 485 '<p class="form-note warn">'. 484 __('Comments are not accepted on this blog so far.').'</p>'), 485 'post_open_tb' => 486 __('Comments are not accepted on this blog so far.').'</p>'). 486 487 '<p><label for="post_open_tb" class="classic">'. 487 488 form::checkbox('post_open_tb',1,$post_open_tb).' '. … … 492 493 '<p class="form-note warn">'. 493 494 __('Warning: Trackbacks are not more accepted for this entry.').'</p>') : 494 '<p class="form-note warn">'.__('Trackbacks are not accepted on this blog so far.').'</p>'), 495 '<p class="form-note warn">'.__('Trackbacks are not accepted on this blog so far.').'</p>'). 496 '</div>', 495 497 'post_password' => 496 498 '<p><label for="post_password" class="ib">'.__('Password').'</label>'. … … 516 518 "post_excerpt" => 517 519 '<p class="area" id="excerpt-area"><label for="post_excerpt">'.__('Excerpt:').'<span class="form-note">'. 518 __(' Add an introduction to the post.').'</span></label> '.520 __('Introduction to the post.').'</span></label> '. 519 521 form::textarea('post_excerpt',50,5,html::escapeHTML($post_excerpt)). 520 522 '</p>', … … 528 530 "post_notes" => 529 531 '<p class="area" id="notes-area"><label for="post_notes">'.__('Personal notes:').'<span class="form-note">'. 530 __(' Add unpublished notes.').'</span></label>'.532 __('Unpublished notes.').'</span></label>'. 531 533 form::textarea('post_notes',50,5,html::escapeHTML($post_notes)). 532 534 '</p>' -
admin/style/default.css
r1698 r1815 34 34 a:hover, a:active, a:focus { 35 35 text-decoration: underline; 36 } 37 a.hide, a.button.hide, a.submit.hide { 38 display: none; 36 39 } 37 40 a img, a:link img, a:visited img { -
admin/style/default.css
r1814 r1815 800 800 border: none; 801 801 } 802 .media-item {802 .media-item, .media-action-box { 803 803 position: relative; 804 804 border: 1px solid #ccc; … … 806 806 padding: 1em; 807 807 width: 300px; 808 height: 120px;809 808 display: inline-block; 810 809 vertical-align: top; 811 } 812 div.media-list .media-item { 810 min-height: 120px 813 811 } 814 812 a.media-icon { … … 908 906 margin-left: 0; 909 907 } 908 /* in blog_pref */ 909 .user-perm { 910 margin: 2em 0px; 911 background: transparent url(user.png) no-repeat left top; 912 width: 320px; 913 display: inline-block; 914 vertical-align: top; 915 } 916 .user-perm h4, .user-perm h5, .user-perm p, .user-perm ul, .user-perm li { 917 margin: .5em 0 .33em; 918 padding: 0; 919 } 920 .user-perm h4 { 921 padding-left: 28px; 922 } 923 .user-perm ul { 924 list-style-type: inside; 925 } 926 .user-perm li { 927 margin-left: 1em; 928 padding-left: 0; 929 } 930 .user-perm h5 { 931 margin: 1em 0 0 0; 932 } 933 li.user_super, li.user_admin { 934 margin-left: 0; 935 padding-left: 1em; 936 list-style: none; 937 background: transparent url(../images/superadmin.png) no-repeat -2px 2px; 938 } 939 li.user_admin { 940 background-image: url(../images/admin.png); 941 } 942 910 943 /* -------------------------------------------------------------------- Themes */ 911 944 #themes { … … 1165 1198 .success a { 1166 1199 color: #666; 1200 } 1201 .dc-update { 1202 padding: 1em 48px 0.5em 48px; 1203 margin-bottom: 1em; 1204 border-radius: 8px; 1205 background: #A2CBE9 url(msg-success.png) no-repeat .7em .7em; 1206 } 1207 .dc-update a { 1208 color: #000; 1209 border-color: #000; 1210 margin-right: 1em; 1211 } 1212 a.info { 1213 margin-left: 2em; 1214 font-weight: bold; 1167 1215 } 1168 1216 /* ------------------------------------------------------------------ navigation */
Note: See TracChangeset
for help on using the changeset viewer.