Changeset 1830:93aca6ba0163
- Timestamp:
- 09/11/13 13:32:50 (12 years ago)
- Branch:
- Ticket #1539
- Location:
- admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/js/_post.js
r1827 r1830 92 92 93 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 } 94 $('.format_control:not(.control_no_'+$(this).val()+') > *').removeClass('hide'); 99 95 }); 100 96 … … 126 122 127 123 // Markup validator 128 var v = $('<div class="format_control control_xhtml control_wiki"><p><a id="a-validator"></a></p><div/>').get(0);129 $('. control_wiki').before(v);124 var v = $('<div class="format_control"><p><a id="a-validator"></a></p><div/>').get(0); 125 $('.format_control').before(v); 130 126 var a = $('#a-validator').get(0); 131 127 a.href = '#'; … … 158 154 $('#markup-validator').remove(); 159 155 } 160 161 $(p).addClass('message'); 156 157 $('.message, .success, .error').remove(); 158 $(p).addClass('success'); 162 159 $(p).text(dotclear.msg.xhtml_valid); 163 160 $('#entry-content h3').after(p); 164 $(p).backgroundFade({sColor:'#666666',eColor:'#ffcc00',steps:50},function() { 165 $(this).backgroundFade({sColor:'#ffcc00',eColor:'#666666'}); 166 }); 161 $(p).backgroundFade({sColor:'#9BCA1C',eColor:'#bee74b',steps:20}); 167 162 } else { 168 163 var div = document.createElement('div'); … … 172 167 $('#markup-validator').remove(); 173 168 } 174 169 170 $('.message, .success, .error').remove(); 175 171 $(div).addClass('error'); 176 172 $(div).html('<p><strong>' + dotclear.msg.xhtml_not_valid + '</strong></p>' + $(data).find('errors').text()); 177 173 $('#entry-content h3').after(div); 178 $(div).backgroundFade({sColor:'#ffffff',eColor:'#FFBABA',steps:50},function() { 179 $(this).backgroundFade({sColor:'#ffbaba',eColor:'#ffffff'}); 180 }); 174 $(div).backgroundFade({sColor:'#ffdec8',eColor:'#ffbaba',steps:20}); 181 175 } 182 176 … … 190 184 191 185 $('.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 } 186 $('.format_control:not(.control_no_'+last_post_format+') > *').removeClass('hide'); 197 187 198 188 // Hide some fields -
admin/post.php
r1829 r1830 455 455 '<p>'.form::combo('post_format',$formaters_combo,$post_format,'maximal'). 456 456 '</p>'. 457 '<p class="format_control control_ wiki">'.457 '<p class="format_control control_no_xhtml">'. 458 458 '<a id="convert-xhtml" class="button'.($post_id && $post_format != 'wiki' ? ' hide' : '').'" href="post.php?id='.$post_id.'&xconv=1">'. 459 459 __('Convert to XHTML').'</a></p></div>')),
Note: See TracChangeset
for help on using the changeset viewer.