Changeset 1829:db77f6bb5df9
- Timestamp:
- 09/11/13 13:26:20 (12 years ago)
- Branch:
- Ticket #1539
- Parents:
- 1828:5274b117ae55 (diff), 1792:3ad2e47ed52d (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:
-
- 1 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/js/common.js
r1789 r1829 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
r1827 r1829 83 83 84 84 var set_user_pref = p.hide ^ p.reverse_user_pref; 85 if (p.user_pref && (p.user_pref in p.unfolded_sections)) {85 if (p.user_pref && p.unfolded_sections !== undefined && (p.user_pref in p.unfolded_sections)) { 86 86 p.hide = p.reverse_user_pref; 87 87 } … … 349 349 // remove class no-js from html tag; cf style/default.css for examples 350 350 $('body').removeClass('no-js'); 351 $('body').addClass('with-js'); 351 352 352 353 $('#wrapper').contents().each(function() { -
admin/post.php
r1789 r1829 455 455 '<p>'.form::combo('post_format',$formaters_combo,$post_format,'maximal'). 456 456 '</p>'. 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>')),457 '<p class="format_control control_wiki">'. 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>')), 460 460 'metas-box' => array( 461 461 'title' => __('Ordering'), … … 533 533 534 534 "post_content" => 535 '<p class="area" ><label class="required" '.535 '<p class="area" id="content-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/post.php
r1824 r1829 69 69 $bad_dt = false; 70 70 71 # Trackbacks 72 $TB = new dcTrackback($core); 73 $tb_urls = $tb_excerpt = ''; 74 71 75 # Get entry informations 72 76 if (!empty($_REQUEST['id'])) … … 128 132 $core->error->add($e->getMessage()); 129 133 } 134 135 # Sanitize trackbacks excerpt 136 $tb_excerpt = empty($_POST['tb_excerpt']) ? 137 $post_excerpt_xhtml.' '.$post_content_xhtml : 138 $_POST['tb_excerpt']; 139 $tb_excerpt = html::decodeEntities(html::clean($tb_excerpt)); 140 $tb_excerpt = text::cutString(html::escapeHTML($tb_excerpt), 255); 141 $tb_excerpt = preg_replace('/\s+/ms', ' ', $tb_excerpt); 142 } 143 } 144 145 # Ping blogs 146 if (!empty($_POST['ping'])) 147 { 148 if (!empty($_POST['tb_urls']) && $post_id && $post_status == 1 && $can_edit_post) 149 { 150 $tb_urls = $_POST['tb_urls']; 151 $tb_urls = str_replace("\r", '', $tb_urls); 152 $tb_post_title = html::escapeHTML(trim(html::clean($post_title))); 153 154 foreach (explode("\n", $tb_urls) as $tb_url) 155 { 156 try { 157 $TB->ping($tb_url, $post_id, $tb_post_title, $tb_excerpt, $post_url); 158 } catch (Exception $e) { 159 $core->error->add($e->getMessage()); 160 } 161 } 162 163 if (!$core->error->flag()) { 164 http::redirect('post.php?id='.$post_id.'&tbsent=1&tb=1'); 165 } 130 166 } 131 167 } 132 168 133 169 # Format excerpt and content 134 if (!empty($_POST) && $can_edit_post)170 elseif (!empty($_POST) && $can_edit_post) 135 171 { 136 172 $post_format = $_POST['post_format']; … … 294 330 if (!empty($_GET['co'])) { 295 331 $default_tab = 'comments'; 332 } 333 elseif (!empty($_GET['tb'])) { 334 $default_tab = 'trackbacks'; 296 335 } 297 336 … … 354 393 if (!empty($_GET['creaco'])) { 355 394 dcPage::success(__('Comment has been successfully created.')); 395 } 396 if (!empty($_GET['tbsent'])) { 397 dcPage::success(__('All pings sent.')); 356 398 } 357 399 … … 512 554 echo '<div id="entry-content"><div class="constrained">'; 513 555 514 echo '<h3 class=" hidden">'.__('Edit post').'</h3>';556 echo '<h3 class="out-of-screen-if-js">'.__('Edit post').'</h3>'; 515 557 516 558 foreach ($main_items as $id => $item) { … … 567 609 568 610 echo '</div>'; 569 570 if ($post_id && $post->post_status == 1) { 571 echo '<p><a href="trackbacks.php?id='.$post_id.'" class="multi-part">'. 572 __('Ping blogs').'</a></p>'; 573 } 574 575 } 576 577 578 /* Comments and trackbacks 579 -------------------------------------------------------- */ 611 } 612 580 613 if ($post_id) 581 614 { 615 /* Comments 616 -------------------------------------------------------- */ 617 582 618 $params = array('post_id' => $post_id, 'order' => 'comment_dt ASC'); 583 619 584 620 $comments = $core->blog->getComments(array_merge($params,array('comment_trackback'=>0))); 585 $trackbacks = $core->blog->getComments(array_merge($params,array('comment_trackback'=>1)));586 621 587 622 # Actions combo box … … 606 641 $core->callBehavior('adminCommentsActionsCombo',array(&$combo_action)); 607 642 608 $has_action = !empty($combo_action) && (!$trackbacks->isEmpty() || !$comments->isEmpty());643 $has_action = !empty($combo_action) && !$comments->isEmpty(); 609 644 echo 610 645 '<p class="top-add"><a class="button add" href="#comment-form">'.__('Add a comment').'</a></p>'; … … 612 647 if ($has_action) { 613 648 echo '<form action="comments_actions.php" id="form-comments" method="post">'; 614 }615 616 echo '<h3>'.__('Trackbacks').'</h3>';617 618 if (!$trackbacks->isEmpty()) {619 showComments($trackbacks,$has_action,true);620 } else {621 echo '<p>'.__('No trackback').'</p>';622 649 } 623 650 … … 676 703 '</div>'. #add comment 677 704 '</div>'; #comments 705 } 706 707 if ($post_id && $post_status == 1) 708 { 709 /* Trackbacks 710 -------------------------------------------------------- */ 711 712 $params = array('post_id' => $post_id, 'order' => 'comment_dt ASC'); 713 $trackbacks = $core->blog->getComments(array_merge($params, array('comment_trackback' => 1))); 714 715 # Actions combo box 716 $combo_action = array(); 717 if ($can_edit_post && $core->auth->check('publish,contentadmin', $core->blog->id)) 718 { 719 $combo_action[__('Publish')] = 'publish'; 720 $combo_action[__('Unpublish')] = 'unpublish'; 721 $combo_action[__('Mark as pending')] = 'pending'; 722 $combo_action[__('Mark as junk')] = 'junk'; 723 } 724 725 if ($can_edit_post && $core->auth->check('delete,contentadmin', $core->blog->id)) 726 { 727 $combo_action[__('Delete')] = 'delete'; 728 } 729 730 # --BEHAVIOR-- adminTrackbacksActionsCombo 731 $core->callBehavior('adminTrackbacksActionsCombo', array(&$combo_action)); 732 733 $has_action = !empty($combo_action) && !$trackbacks->isEmpty(); 734 735 if (!empty($_GET['tb_auto'])) { 736 $tb_urls = implode("\n", $TB->discover($post_excerpt_xhtml.' '.$post_content_xhtml)); 737 } 738 739 # Display tab 740 echo 741 '<div id="trackbacks" class="clear multi-part" title="'.__('Trackbacks').'">'; 742 743 # tracbacks actions 744 if ($has_action) { 745 echo '<form action="comments_actions.php" id="form-trackbacks" method="post">'; 746 } 747 748 echo '<h3>'.__('Trackbacks').'</h3>'; 749 750 if (!$trackbacks->isEmpty()) { 751 showComments($trackbacks, $has_action, true); 752 } else { 753 echo '<p>'.__('No trackback').'</p>'; 754 } 755 756 if ($has_action) { 757 echo 758 '<div class="two-cols">'. 759 '<p class="col checkboxes-helpers"></p>'. 760 761 '<p class="col right"><label for="action" class="classic">'.__('Selected trackbacks action:').'</label> '. 762 form::combo('action', $combo_action). 763 form::hidden('redir', 'post.php?id='.$post_id.'&tb=1'). 764 $core->formNonce(). 765 '<input type="submit" value="'.__('ok').'" /></p>'. 766 '</div>'. 767 '</form>'; 768 } 769 770 /* Add trackbacks 771 -------------------------------------------------------- */ 772 if ($can_edit_post && $post->post_status) { 773 echo 774 '<div class="fieldset clear">'; 775 776 echo 777 '<h3>'.__('Ping blogs').'</h3>'. 778 '<form action="post.php?id='.$post_id.'" id="trackback-form" method="post">'. 779 '<p><label for="tb_urls" class="area">'.__('URLs to ping:').'</label>'. 780 form::textarea('tb_urls', 60, 5, $tb_urls). 781 '</p>'. 782 783 '<p><label for="tb_excerpt" class="area">'.__('Send excerpt:').'</label>'. 784 form::textarea('tb_excerpt', 60, 5, $tb_excerpt).'</p>'. 785 786 '<p>'. 787 $core->formNonce(). 788 '<input type="submit" name="ping" value="'.__('Ping blogs').'" />'. 789 (empty($_GET['tb_auto']) ? 790 ' <a class="button" href="'. 791 'post.php?id='.$post_id.'&tb_auto=1&tb=1'. 792 '">'.__('Auto discover ping URLs').'</a>' 793 : ''). 794 '</p>'. 795 '</form>'; 796 797 $pings = $TB->getPostPings($post_id); 798 799 if (!$pings->isEmpty()) 800 { 801 echo '<h3>'.__('Previously sent pings').'</h3>'; 802 803 echo '<ul class="nice">'; 804 while ($pings->fetch()) { 805 echo 806 '<li>'.dt::dt2str(__('%Y-%m-%d %H:%M'), $pings->ping_dt).' - '. 807 $pings->ping_url.'</li>'; 808 } 809 echo '</ul>'; 810 } 811 812 echo '</div>'; 813 } 814 815 echo '</div>'; #trackbacks 678 816 } 679 817 -
admin/style/default.css
r1790 r1829 1984 1984 } 1985 1985 /* caché pour tout le monde */ 1986 .hide {1986 .hide, .button.hide { 1987 1987 display: none; 1988 1988 } -
admin/style/default.css
r1827 r1829 270 270 font-size: 1.6rem; 271 271 } 272 h3:first-child {margin-top: 0;} 273 h4, as_h4 { 272 #main-menu h3 { 273 font-weight: bold; 274 } 275 h4, .as_h4 { 274 276 font-size: 14px; /* ie < 9 sucks */ 275 277 font-size: 1.4rem; 276 278 color: #676e78; 277 279 } 278 .smart-title, .box h3, .fieldset h3, .fieldset h4 { /* pour les h3 ou les h4 titres de boîtes */ 280 .fieldset h3, .fieldset h4, .pretty-title { /* variante */ 281 color: #D33800; 282 font-size: 12px; 283 font-size: 1.2rem; 284 font-weight: bold; 285 } 286 .fieldset h3 { 287 font-size: 14px; 288 font-size: 1.4rem; 289 } 290 .fieldset h3.smart-title, .fieldset h4.smart-title, .smart-title { /* variante */ 279 291 font-size: 1em; 280 292 text-transform: uppercase; … … 283 295 text-shadow: 0 1px 0 rgba(200, 200, 200, 0.6) 284 296 } 285 h4 label, h5 label {color: #333;}286 297 h5 { 287 298 font-size: 12px; /* ie < 9 sucks */ … … 298 309 vertical-align: text-top; 299 310 } 311 h4 label, h5 label {color: #333;} 312 h2:first-child, h3:first-child, h4:first-child, h5:first-child, ul:first-child, p:first-child { 313 margin-top: 0; 314 } 300 315 /* ---------------------------------------------------------------- tableaux */ 301 316 table { … … 522 537 BOUTONS 523 538 ---------------------------------------------------------------------------- */ 524 /* commun */ 525 input[type=submit], input[type=reset], input[type=button], input[type=delete], 526 input.submit, input.reset, input.button, input.delete, 527 a.button, a.button.submit, a.delete, a.reset { 539 /* Removes inner padding and border in FF3+ - Knacss */ 540 button::-moz-focus-inner, 541 input[type=button]::-moz-focus-inner, 542 input[type=reset]::-moz-focus-inner, 543 input[type=submit]::-moz-focus-inner { 544 border: 0; 545 padding: 0; 546 } 547 /* tous les boutons */ 548 button, 549 a.button, 550 input[type=button], 551 input[type=reset], 552 input[type=submit] { 553 border: 1px solid #ccc; 554 font-family: arial, helvetica, sans-serif; 555 padding: 3px 8px; 556 line-height: normal !important; 528 557 display: inline-block; 529 cursor: pointer; 558 vertical-align: top; 559 font-size: 12px; /* ie < 9 sucks */ 560 font-size: 1.2rem; 530 561 text-align: center; 531 562 text-decoration: none; 532 padding: 2px 6px 2px;533 563 border-radius: 3px; 534 font-size: 12px; /* ie < 9 sucks */ 535 font-size: 1.2rem; 536 line-height: 1.5em; 537 } 538 a.button, a.button.submit, a.reset { 539 padding-bottom: 1px; 540 } 564 cursor: pointer; 565 } 566 button, 567 input[type=button], 568 input[type=reset], 569 input[type=submit] { 570 -webkit-appearance: button; 571 } 541 572 /* validation */ 542 573 input[type=submit], a.button.submit { 543 574 color: #fff; 544 text-shadow: 0 -1px 0 rgba(100, 100, 100, 0.6);545 b ackground:#25A6E1;575 background-color:#25A6E1; 576 border-color: #2C8FD1; 546 577 background:-moz-linear-gradient(top,#25A6E1 0%,#188BC0 100%); 547 578 background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#25A6E1),color-stop(100%,#188BC0)); 548 579 background:linear-gradient(top,#25A6E1 0%,#188BC0 100%); 549 580 filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#25A6E1',endColorstr='#188BC0',GradientType=0); 550 border: 1px solid #2C8FD1; 551 padding-bottom: 1px; 581 text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3); 552 582 } 553 583 input[type=submit]:hover, input[type=submit]:focus, … … 560 590 } 561 591 /* suppression, reset, "neutres" */ 562 input[type=reset], input[type=delete], input[type= button],592 input[type=reset], input[type=delete], input[type=submit].delete, input[type=submit].reset, input[type=button], 563 593 input.delete, input.reset, input.button, 564 594 a.delete, a.reset, a.button { 565 border: 1px solid #ccc;566 background: #f5f5f5;567 595 color: #000; 596 background-color: #f5f5f5; 568 597 background: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#dfdfdf)); 569 598 background: -moz-linear-gradient(top, #f5f5f5, #dfdfdf); … … 571 600 } 572 601 input[type=reset]:hover, input[type=delete]:hover, input[type=button]:hover, 602 input[type=submit].delete:hover, 573 603 input.delete:hover, input.reset:hover, input.button:hover, 574 604 a.delete:hover, a.reset:hover, a.button:hover, 575 605 input[type=reset]:focus, input[type=delete]:focus, input[type=button]:focus, 606 input[type=submit].delete:focus, 576 607 input.delete:focus, input.reset:focus, input.button:focus, 577 608 a.delete:focus, a.reset:focus, a.button:focus { 609 background-color:#e9e9e9; 578 610 background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #e9e9e9), color-stop(1, #f9f9f9) ); 579 611 background:-moz-linear-gradient( center top, #e9e9e9 5%, #f9f9f9 100% ); 580 612 filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e9e9e9', endColorstr='#f9f9f9'); 581 background-color:#e9e9e9;582 613 } 583 614 a.delete, input[type=delete], input.delete { 615 border-color: #ccc; 584 616 color: #c00; 585 617 margin-left: 1em; 586 padding-bottom: 2px; 618 } 619 a.delete:first-child, input[type=delete]:first-child, input.delete:first-child { 620 margin-left: 0; 587 621 } 588 622 a.delete:hover, input[type=delete]:hover, input.delete:hover, … … 590 624 border-color: #c00; 591 625 } 592 a.button {padding-bottom: 1px}593 626 #info-box a.button { 594 627 padding: 0 .5em; … … 624 657 625 658 /* disabled */ 626 input.disabled {659 input.disabled, input[type=submit].disabled { 627 660 text-shadow: none; 628 661 color: #676e78; … … 630 663 border: 1px solid #CCC; 631 664 } 632 input.disabled:hover {665 input.disabled:hover, input[type=submit].disabled { 633 666 color: #676e78; 634 667 background: #DFDFDF; … … 659 692 border: 1px solid #BCE8F1; 660 693 } 694 span.warn, span.warning, span.info { 695 padding-top: 1px; 696 padding-bottom: 1px; 697 background-position: .3em .2em; 698 } 661 699 .error, .message, .static-msg, .success, .warning-msg { 662 700 padding: 1em 0.5em 0.5em 48px; … … 707 745 margin-top: 0; 708 746 color: #34495e; 747 } 748 .dc-update p { 749 display: inline-block; 709 750 } 710 751 .dc-update a { … … 1227 1268 } 1228 1269 #icons p { 1229 width: 2 10px;1270 width: 207px; 1230 1271 text-align: center; 1231 1272 margin: 1em 0 2em; … … 1300 1341 padding-top: 2em; 1301 1342 } 1343 .db-items, .db-contents { 1344 display: inline-block; 1345 text-align: center; 1346 } 1347 #dashboard-boxes .box { 1348 min-width: 300px; 1349 max-width: 580px; 1350 padding: 10px; 1351 border: 1px solid #ccc; 1352 border-radius: 3px; 1353 min-height: 200px; 1354 margin: 10px; 1355 text-align: left; 1356 } 1357 .box.small { 1358 width: 300px; 1359 } 1360 .box.large { 1361 width: 580px; 1362 } 1363 .dc-box { 1364 background: transparent url(dc_logos/sq-logo-32.png) no-repeat top right; 1365 } 1302 1366 .db-items img, .db-contents img { 1303 1367 vertical-align: middle; … … 1645 1709 /* ---------------------------------------------------------- preferences.php */ 1646 1710 .fav-list { 1647 border-top: 1px solid #eee;1648 1711 list-style-type: none; 1649 1712 margin-left: 0; 1650 1713 padding-left: 0; 1651 1714 } 1715 #my-favs .fav-list { 1716 border-top: 1px solid #eee; 1717 } 1652 1718 .fav-list li { 1653 line-height: 2;1654 1719 margin-left: 0; 1655 1720 padding-left: 0; 1656 border-bottom: 1px solid #eee;1657 1721 padding-top: 3px; 1658 1722 padding-bottom: 3px; 1659 1723 position: relative; 1660 1724 } 1661 .fav-list img { 1662 vertical-align: middle; 1663 margin-right: .2em; 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 } 1725 #my-favs .fav-list li { 1726 line-height: 2; 1727 border-bottom: 1px solid #eee; 1728 padding-top: 3px; 1729 padding-bottom: 3px; 1730 position: relative; 1731 } 1732 .fav-list img { 1733 vertical-align: middle; 1734 margin-right: .2em; 1735 } 1736 .fav-list li span.zoom { 1737 display: none; 1738 } 1739 .fav-list li:hover span.zoom { 1740 display: block; 1741 position: absolute; 1742 bottom: 0; 1743 left: 10em; 1744 background-color: #f7f7f7; 1745 border: 1px solid #ddd; 1746 padding: .2em; 1747 border-radius: .5em; 1748 } 1749 #my-favs { 1750 border-color: #A8DC26; 1751 } 1752 #my-favs input.position { 1753 margin: 0 0 .4em .2em; 1754 } 1681 1755 #available-favs input, #available-favs label, #available-favs label span { 1682 1756 white-space: normal; … … 1914 1988 } 1915 1989 /* Caché sauf pour les revues d'écran */ 1916 .hidden {1990 .hidden, .with-js .out-of-screen-if-js { 1917 1991 position: absolute !important; 1918 1992 clip: rect(1px 1px 1px 1px); /* IE6, IE7 */ … … 1960 2034 display: block; 1961 2035 } 2036 2037 2038 /* 2039 tests dashboard 2040 2041 #content {width: auto;float:none !important; margin: 0;} 2042 #main {width: auto; display:inline-block; vertical-align: top; margin: 0;float: none !important} 2043 #main-menu {clear:both; width: auto} 2044 #main-menu {margin-top: 8em} 2045 #favorites-menu {display:none;} 2046 #plugins-menu, #blog-menu, #system-menu, #dashboard-items {display: inline-block;vertical-align: top; min-width: 17em; margin: 0; clear: none;} 2047 2048 */ 2049 2050 1962 2051 /* ------------------------------------------------------------------------------------ 1963 2052 UN POIL DE MEDIA QUERIES … … 2032 2121 #info-box1 p.nomobile, label.nomobile { display: none; } 2033 2122 } 2123 } 2124
Note: See TracChangeset
for help on using the changeset viewer.