Changeset 1827:38ac207ff0ba for admin
- Timestamp:
- 09/09/13 15:49:13 (12 years ago)
- Branch:
- Ticket #1539
- Parents:
- 1826:fd4a45d891a9 (diff), 1766:a3e16ad9e270 (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:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/js/_post.js
r1760 r1827 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 control_wiki"><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:'#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 247 264 // Check unsaved changes before XHTML conversion 248 265 var excerpt = $('#post_excerpt').val(); -
admin/js/common.js
r1761 r1827 263 263 }, 264 264 265 checkboxesHelpers: function(e ) {265 checkboxesHelpers: function(e, target) { 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 269 271 var a = document.createElement('a'); 270 272 a.href='#'; 271 273 $(a).append(document.createTextNode(dotclear.msg.select_all)); 272 274 a.onclick = function() { 273 $(this).parents('form').find('input[type="checkbox"]').check();275 target.check(); 274 276 return false; 275 277 }; … … 282 284 $(a).append(document.createTextNode(dotclear.msg.no_selection)); 283 285 a.onclick = function() { 284 $(this).parents('form').find('input[type="checkbox"]').unCheck();286 target.unCheck(); 285 287 return false; 286 288 }; … … 293 295 $(a).append(document.createTextNode(dotclear.msg.invert_sel)); 294 296 a.onclick = function() { 295 $(this).parents('form').find('input[type="checkbox"]').toggleCheck();297 target.toggleCheck(); 296 298 return false; 297 299 }; -
admin/js/common.js
r1818 r1827 244 244 imgE.style.position = 'absolute'; 245 245 imgE.style.top = '1.7em'; 246 imgE.style.left = ($(this).width()+ 4)+'px';246 imgE.style.left = ($(this).width()+12)+'px'; 247 247 imgE.alt=dotclear.msg.click_to_unlock; 248 248 $(imgE).css('cursor','pointer'); … … 382 382 $('#help').helpViewer(); 383 383 384 $('.message').backgroundFade({sColor:'#cccccc',eColor:'#6 66666',steps:20});384 $('.message').backgroundFade({sColor:'#cccccc',eColor:'#676e78',steps:20}); 385 385 $('.error').backgroundFade({sColor:'#ffdec8',eColor:'#ffbaba',steps:20}); 386 386 $('.success').backgroundFade({sColor:'#9BCA1C',eColor:'#bee74b',steps:20}); -
admin/style/default.css
r1763 r1827 1910 1910 } 1911 1911 /* caché pour tout le monde */ 1912 .hide {1912 .hide, .button.hide { 1913 1913 display: none; 1914 1914 } -
admin/style/default.css
r1823 r1827 108 108 display: inline-block; 109 109 vertical-align: top; 110 -moz-box-sizing: border-box; 111 -webkit-box-sizing: border-box; 112 box-sizing: border-box; 110 113 } 111 114 .two-boxes:first-child, .two-boxes.odd, .two-boxes.odd:last-child { … … 121 124 margin-left: 2.5%; 122 125 margin-right: 2.5%; 126 -moz-box-sizing: border-box; 127 -webkit-box-sizing: border-box; 128 box-sizing: border-box; 123 129 } 124 130 .three-boxes:first-child { … … 139 145 } 140 146 /* ---------------------------------------------------------------- layout: popups */ 141 body.popup #wrapper, body.popup #top {147 .popup #wrapper, .popup #top { 142 148 width: 100%; 143 149 padding: 0; 144 } 145 body.popup #wrapper { 146 float: none; 147 margin:0; 148 display: block; 149 } 150 body.popup h1, body.popup #top { 150 } 151 .popup h1, .popup #top { 151 152 margin: 0; 152 153 border-bottom: 1px solid; … … 157 158 text-indent: .5em; 158 159 line-height: 1.3em; 159 } 160 body.popup #main { 161 margin-bottom: 1em 0; 162 } 163 body.popup #content { 164 margin: 0; 165 padding: .5em 0; 166 } 167 body.popup #content h2 { 168 margin: 0 0 1em; 169 } 170 body.popup #footer p { 171 border: none; 172 } 173 /* ------------------------------------------------------------- layout: compléments */ 160 } 161 .popup #wrapper { 162 float: none; 163 margin:0; 164 display: block; 165 } 166 .popup #main { 167 margin-bottom: 1em 0; 168 } 169 .popup #content { 170 margin: 0; 171 padding: .5em 0; 172 } 173 .popup #content h2 { 174 margin: 0 0 1em; 175 } 176 .popup #footer p { 177 border: none; 178 } 179 /* -------------------------------------------------------- layout: classes de complément */ 174 180 .constrained { 175 181 margin: 0; … … 204 210 } 205 211 .frame-shrink { 206 border: 1px solid #6 66;212 border: 1px solid #676e78; 207 213 padding: 0.5em; 208 214 margin-bottom: 1em; … … 232 238 } 233 239 h2 { 234 color: #6 66;240 color: #676e78; 235 241 font-size: 18px; /* ie < 9 sucks */ 236 242 font-size: 1.8rem; … … 259 265 h3, .as_h3 { 260 266 margin-top: 1em; 261 color: #676e78; 267 color: #D33800; 268 font-weight: normal; 262 269 font-size: 16px; /* ie < 9 sucks */ 263 270 font-size: 1.6rem; 264 271 } 272 h3:first-child {margin-top: 0;} 265 273 h4, as_h4 { 266 274 font-size: 14px; /* ie < 9 sucks */ … … 268 276 color: #676e78; 269 277 } 270 .smart-title, .box h3, . media-action-boxh4 { /* pour les h3 ou les h4 titres de boîtes */278 .smart-title, .box h3, .fieldset h3, .fieldset h4 { /* pour les h3 ou les h4 titres de boîtes */ 271 279 font-size: 1em; 272 280 text-transform: uppercase; … … 275 283 text-shadow: 0 1px 0 rgba(200, 200, 200, 0.6) 276 284 } 285 h4 label, h5 label {color: #333;} 277 286 h5 { 278 287 font-size: 12px; /* ie < 9 sucks */ 279 288 font-size: 1.2rem; 289 font-weight: bold; 280 290 color: #676e78; 281 291 } … … 384 394 } 385 395 legend { 386 font-weight: bold;387 396 padding: 0.2em 0.6em; 388 397 border-width: 1px; 389 398 border-style: solid; 390 border-color: # 333;399 border-color: #676e78; 391 400 background: #fff; 392 401 margin-bottom: 0.5em; … … 502 511 font-style: italic; 503 512 font-weight: normal; 504 color: #6 66;513 color: #676e78; 505 514 } 506 515 p.form-note { … … 516 525 input[type=submit], input[type=reset], input[type=button], input[type=delete], 517 526 input.submit, input.reset, input.button, input.delete, 518 a.button, a. submit, a.delete, a.reset {527 a.button, a.button.submit, a.delete, a.reset { 519 528 display: inline-block; 520 529 cursor: pointer; … … 527 536 line-height: 1.5em; 528 537 } 529 a.button, a. submit, a.reset {538 a.button, a.button.submit, a.reset { 530 539 padding-bottom: 1px; 531 540 } 532 541 /* validation */ 533 input[type=submit], a. submit {542 input[type=submit], a.button.submit { 534 543 color: #fff; 535 544 text-shadow: 0 -1px 0 rgba(100, 100, 100, 0.6); … … 543 552 } 544 553 input[type=submit]:hover, input[type=submit]:focus, 545 a. submit:hover, a.submit:focus {554 a.button.submit:hover, a.button.submit:focus { 546 555 background:#188BC0; 547 556 background:-moz-linear-gradient(top,#188BC0 0%,#25A6E1 100%); … … 617 626 input.disabled { 618 627 text-shadow: none; 619 color: #6 66;628 color: #676e78; 620 629 background: #F5F5F5; 621 630 border: 1px solid #CCC; 622 631 } 623 632 input.disabled:hover { 624 color: #6 66;633 color: #676e78; 625 634 background: #DFDFDF; 626 635 border: 1px solid #CCC; … … 654 663 margin-bottom: 1em; 655 664 border-radius: 8px; 665 box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1); 656 666 } 657 667 p.error, p.message, p.static-msg, p.success, p.warning-msg { … … 670 680 .message a, .static-msg a { 671 681 color: #fff; 672 }682 } 673 683 .success, .warning-msg { 674 684 color: #000; … … 692 702 text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6); 693 703 color: #34495e; 704 box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1) 694 705 } 695 706 .dc-update h3 { … … 707 718 } 708 719 .dc-update a.button { 709 border-color: #ccc;710 font-weight: bold;711 720 padding: .5em 1em; 712 721 } … … 832 841 margin: 0; 833 842 padding: 10px 0 10px 8px; 834 color: #6 66;843 color: #676e78; 835 844 font-size: 14px; /* ie < 9 sucks */ 836 845 font-size: 1.4rem; … … 1234 1243 } 1235 1244 #icons a span { 1236 border-bottom: 1px dotted # f90;1245 border-bottom: 1px dotted #999; 1237 1246 color: #333; 1238 1247 } … … 1272 1281 border: 1px solid #99f; 1273 1282 padding: .2em 1em .1em 24px; 1274 color: #6 66;1283 color: #676e78; 1275 1284 } 1276 1285 #quick #new_cat, .q-cat, .q-cat label { … … 1301 1310 .db-items li, .db-contents li { 1302 1311 margin: 0.25em 0 0 0; 1303 color: #6 66;1312 color: #676e78; 1304 1313 } 1305 1314 #news dt { … … 1382 1391 } 1383 1392 span.theme-version { 1384 color: #6 66;1393 color: #676e78; 1385 1394 } 1386 1395 .theme-css { … … 1426 1435 } 1427 1436 #theme-box span.theme-version { 1428 color: #6 66;1437 color: #676e78; 1429 1438 } 1430 1439 #theme-box span.theme-parent-ok { 1431 color: #6 66;1440 color: #676e78; 1432 1441 } 1433 1442 #theme-box span.theme-parent-missing { … … 1635 1644 } 1636 1645 /* ---------------------------------------------------------- preferences.php */ 1637 #my-favs { 1638 border: 1px solid #A8DC26; 1639 padding: 1em 2em 1640 } 1641 #my-favs ul { 1646 .fav-list { 1647 border-top: 1px solid #eee; 1642 1648 list-style-type: none; 1643 1649 margin-left: 0; 1644 1650 padding-left: 0; 1645 line-height: 1.2; 1646 } 1647 #my-favs li { 1648 display: block; 1649 float: left; 1650 width: 164px; 1651 margin-top: 1em; 1652 margin-bottom: 1.5em; 1653 } 1654 #my-favs label {height: 2.5em;width:140px;margin-top:.3em;} 1655 #my-favs label input {display:inline;} 1656 #my-favs img { 1657 display: block; 1658 } 1659 #my-favs input.position { 1660 margin: 0 0 .4em .2em; 1661 } 1662 #available-favs input, #available-favs label, #available-favs label span { 1663 white-space: normal; 1664 display: inline; 1665 } 1666 #default-favs h3 { 1667 margin-top: 2em; 1668 margin-bottom: 1em; 1669 } 1670 .fav-list { 1671 list-style-type: none; 1672 margin-left: 0; 1673 padding-left: 0; 1674 } 1651 } 1675 1652 .fav-list li { 1676 1653 line-height: 2; 1677 1654 margin-left: 0; 1678 1655 padding-left: 0; 1656 border-bottom: 1px solid #eee; 1657 padding-top: 3px; 1658 padding-bottom: 3px; 1679 1659 position: relative; 1680 }1660 } 1681 1661 .fav-list img { 1682 1662 vertical-align: middle; 1683 1663 margin-right: .2em; 1684 } 1664 } 1665 .fav-list li span.zoom { 1666 display: none; 1667 } 1668 .fav-list li:hover span.zoom { 1669 display: block; 1670 position: absolute; 1671 bottom: 0; 1672 left: 10em; 1673 background-color: #f7f7f7; 1674 border: 1px solid #ddd; 1675 padding: .2em; 1676 border-radius: .5em; 1677 } 1678 #my-favs input.position { 1679 margin: 0 0 .4em .2em; 1680 } 1681 #available-favs input, #available-favs label, #available-favs label span { 1682 white-space: normal; 1683 display: inline; 1684 } 1685 1685 #available-favs label span.zoom { 1686 1686 display: none; 1687 }1687 } 1688 1688 #available-favs li:hover label span.zoom { 1689 1689 display: block; … … 1695 1695 padding: .2em; 1696 1696 border-radius: .5em; 1697 }1697 } 1698 1698 #user-options label.ib { 1699 1699 display: inline-block; … … 1868 1868 } 1869 1869 .fieldset h3 { 1870 color: #333;1870 margin-top: 0; 1871 1871 } 1872 1872 .right, .txt-right { … … 1907 1907 } 1908 1908 .offline { 1909 color: #6 66;1909 color: #676e78; 1910 1910 } 1911 1911 /* caché pour tout le monde */
Note: See TracChangeset
for help on using the changeset viewer.