Changeset 1392:f654316f6e43
- Timestamp:
- 08/16/13 10:39:47 (11 years ago)
- Branch:
- default
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/js/_post.js
r1353 r1392 122 122 hide: $('#post_password').val() == '' 123 123 }); 124 124 $('#post_status').parent().toggleWithLegend($('#post_status'),{ 125 cookie: 'dcx_post_status' 126 }); 127 $('#post_dt').parent().toggleWithLegend($('#post_dt').parent().children().not('label'),{ 128 cookie: 'dcx_post_dt' 129 }); 130 $('#post_format').parent().toggleWithLegend($('#post_format').parent().children().not('label').add($('#post_format').parents('p').next()),{ 131 cookie: 'dcx_post_format' 132 }); 133 $('#cat_id').parent().toggleWithLegend($('#cat_id'),{ 134 cookie: 'cat_id' 135 }); 136 $('#post_url').parent().toggleWithLegend($('#post_url').parent().children().not('label'),{ 137 cookie: 'post_url' 138 }); 125 139 // We load toolbar on excerpt only when it's ready 126 140 $('#excerpt-area label').toggleWithLegend($('#excerpt-area').children().not('label'),{ -
admin/post.php
r1365 r1392 445 445 echo '<div id="entry-sidebar">'; 446 446 447 echo 448 '<div id="status-box" class="box">'. 449 '<h4>Statut</h4>'. 450 451 '<p><label for="post_status">'.__('Entry status:'). 452 form::combo('post_status',$status_combo,$post_status,'maximal','',!$can_publish). 453 '</label></p>'. 454 455 '<p><label for="post_dt">'.__('Published on:'). 456 form::field('post_dt',16,16,$post_dt,($bad_dt ? 'invalid' : '')). 457 '</label></p>'. 458 459 '<p><label for="post_format">'.__('Text formating:'). 460 form::combo('post_format',$formaters_combo,$post_format,'maximal'). 461 '</label>'. 462 '</p>'. 463 464 '<p>'.($post_id && $post_format != 'xhtml' ? '<a id="convert-xhtml" class="button maximal" href="post.php?id='.$post_id.'&xconv=1">'.__('Convert to XHTML').'</a>' : '').'</p>'. 465 466 '<p><label for="post_lang">'.__('Entry lang:'). 467 form::combo('post_lang',$lang_combo,$post_lang). 468 '</label></p>'. 469 470 '</div>'. // End status box 471 472 '<div id="metas-box" class="box">'. 473 '<h4>Classement</h4>'. 474 475 '<p><label for="post_selected" class="classic">'.form::checkbox('post_selected',1,$post_selected).' '. 476 __('Selected entry').'</label></p>'. 477 478 '<p><label for="cat_id">'.__('Category:'). 479 form::combo('cat_id',$categories_combo,$cat_id,'maximal'). 480 '</label></p>'. 481 482 '</div>'. // End metas box 483 484 '<div id="options-box" class="box">'. 485 '<h4>Options</h4>'. 486 '<p><label for="post_open_comment" class="classic">'.form::checkbox('post_open_comment',1,$post_open_comment).' '. 487 __('Accept comments').'</label></p>'. 488 ($core->blog->settings->system->allow_comments ? 489 (isContributionAllowed($post_id,strtotime($post_dt),true) ? 490 '' : 491 '<p class="form-note warn">'.__('Warning: Comments are not more accepted for this entry.').'</p>') : 492 '<p class="form-note warn">'.__('Warning: Comments are not accepted on this blog.').'</p>'). 493 494 '<p><label for="post_open_tb" class="classic">'.form::checkbox('post_open_tb',1,$post_open_tb).' '. 495 __('Accept trackbacks').'</label></p>'. 496 ($core->blog->settings->system->allow_trackbacks ? 497 (isContributionAllowed($post_id,strtotime($post_dt),false) ? 498 '' : 499 '<p class="form-note warn">'.__('Warning: Trackbacks are not more accepted for this entry.').'</p>') : 500 '<p class="form-note warn">'.__('Warning: Trackbacks are not accepted on this blog.').'</p>'). 501 502 '<p><label for="post_password">'.__('Password:'). 503 form::field('post_password',10,32,html::escapeHTML($post_password),'maximal'). 504 '</label></p>'. 505 506 '<div class="lockable">'. 507 '<p><label for="post_url">'.__('Edit basename:'). 508 form::field('post_url',10,255,html::escapeHTML($post_url),'maximal'). 509 '</label></p>'. 510 '<p class="form-note warn">'. 511 __('Warning: If you set the URL manually, it may conflict with another entry.'). 512 '</p>'. 513 '</div>'; 447 $post_sidebar = new ArrayObject(array( 448 'status-box' => array( 449 'title' => __('Status'), 450 'items' => array( 451 'post_status' => 452 '<p><label for="post_status">'.__('Entry status:'). 453 form::combo('post_status',$status_combo,$post_status,'maximal','',!$can_publish). 454 '</label></p>', 455 'post_dt' => 456 '<p><label for="post_dt">'.__('Published on:'). 457 form::field('post_dt',16,16,$post_dt,($bad_dt ? 'invalid' : '')). 458 '</label></p>', 459 'post_lang' => 460 '<p><label for="post_lang">'.__('Entry lang:'). 461 form::combo('post_lang',$lang_combo,$post_lang). 462 '</label></p>', 463 'post_format' => 464 '<p><label for="post_format">'.__('Text formating:'). 465 form::combo('post_format',$formaters_combo,$post_format,'maximal'). 466 '</label></p>'. 467 '<p>'.($post_id && $post_format != 'xhtml' ? 468 '<a id="convert-xhtml" class="button maximal" href="post.php?id='.$post_id.'&xconv=1">'. 469 __('Convert to XHTML').'</a>' : '').'</p>')), 470 'metas-box' => array( 471 'title' => __('Ordering'), 472 'items' => array( 473 'post_selected' => 474 '<p><label for="post_selected" class="classic">'. 475 form::checkbox('post_selected',1,$post_selected).' '. 476 __('Selected entry').'</label></p>', 477 'cat_id' => 478 '<p><label for="cat_id">'.__('Category:'). 479 form::combo('cat_id',$categories_combo,$cat_id,'maximal'). 480 '</label></p>')), 481 'options-box' => array( 482 'title' => __('Options'), 483 'items' => array( 484 'post_open_comment' => 485 '<p><label for="post_open_comment" class="classic">'. 486 form::checkbox('post_open_comment',1,$post_open_comment).' '. 487 __('Accept comments').'</label></p>'. 488 ($core->blog->settings->system->allow_comments ? 489 (isContributionAllowed($post_id,strtotime($post_dt),true) ? 490 '' : 491 '<p class="form-note warn">'. 492 __('Warning: Comments are not more accepted for this entry.').'</p>') : 493 '<p class="form-note warn">'. 494 __('Warning: Comments are not accepted on this blog.').'</p>'), 495 'post_open_tb' => 496 '<p><label for="post_open_tb" class="classic">'. 497 form::checkbox('post_open_tb',1,$post_open_tb).' '. 498 __('Accept trackbacks').'</label></p>'. 499 ($core->blog->settings->system->allow_trackbacks ? 500 (isContributionAllowed($post_id,strtotime($post_dt),false) ? 501 '' : 502 '<p class="form-note warn">'. 503 __('Warning: Trackbacks are not more accepted for this entry.').'</p>') : 504 '<p class="form-note warn">'.__('Warning: Trackbacks are not accepted on this blog.').'</p>'), 505 'post_password' => 506 '<p><label for="post_password">'.__('Password:'). 507 form::field('post_password',10,32,html::escapeHTML($post_password),'maximal'). 508 '</label></p>', 509 'post_url' => 510 '<div class="lockable">'. 511 '<p><label for="post_url">'.__('Edit basename:'). 512 form::field('post_url',10,255,html::escapeHTML($post_url),'maximal'). 513 '</label></p>'. 514 '<p class="form-note warn">'. 515 __('Warning: If you set the URL manually, it may conflict with another entry.'). 516 '</p></div>' 517 )))); 518 $core->callBehavior('adminPostFormSidebarItems',$post_sidebar, isset($post) ? $post : null); 519 foreach ($post_sidebar as $id => $c) { 520 echo '<div id="'.$id.'" class="box">'. 521 '<h4>'.$c['title'].'</h4>'; 522 foreach ($c['items'] as $e_name=>$e_content) { 523 echo $e_content; 524 } 525 echo '</div>'; 526 } 527 514 528 515 529 # --BEHAVIOR-- adminPostFormSidebar 516 530 $core->callBehavior('adminPostFormSidebar',isset($post) ? $post : null); 517 518 echo '</div>'; // End options box519 520 531 echo '</div>'; // End #entry-sidebar 521 532 -
plugins/attachments/_admin.php
r1365 r1392 12 12 if (!defined('DC_CONTEXT_ADMIN')) { return; } 13 13 14 $core->addBehavior ('adminPostFormSidebar ',array('attachmentAdmin','adminPostFormSidebar'));14 $core->addBehavior ('adminPostFormSidebarItems',array('attachmentAdmin','adminPostFormSidebarItems')); 15 15 $core->addBehavior ('adminPostAfterForm',array('attachmentAdmin','adminPostAfterForm')); 16 $core->addBehavior('adminPostHeaders',array('attachmentAdmin','postHeaders')); 16 17 17 18 class attachmentAdmin 18 19 { 19 public static function adminPostFormSidebar($post) 20 public static function postHeaders() 21 { 22 return 23 '<script type="text/javascript" src="index.php?pf=attachments/js/post.js"></script>'; 24 } 25 public static function adminPostFormSidebarItems($items,$post) 20 26 { 21 27 if ($post !== null) … … 23 29 $core =& $GLOBALS['core']; 24 30 $post_media = $core->media->getPostMedia($post->post_id); 25 echo 26 '<h5 class="clear">'.__('Attachments').'</h5>'; 31 $item = '<h5 class="clear s-attachments">'.__('Attachments').'</h5>'; 27 32 foreach ($post_media as $f) 28 33 { … … 31 36 $ftitle = substr($ftitle,0,16).'...'; 32 37 } 33 echo34 '<div class="media-item ">'.38 $item .= 39 '<div class="media-item s-attachments">'. 35 40 '<a class="media-icon" href="media_item.php?id='.$f->media_id.'">'. 36 41 '<img src="'.$f->media_icon.'" alt="" title="'.$f->basename.'" /></a>'. … … 53 58 54 59 if (empty($post_media)) { 55 echo '<p class="form-note">'.__('No attachment.').'</p>';56 } else {57 }58 echo '<p><a class="button" href="media.php?post_id='.$post->post_id.'">'.__('Add files to this entry').'</a></p>';60 $item .= '<p class="form-note s-attachments">'.__('No attachment.').'</p>'; 61 } 62 $item .= '<p class="s-attachments"><a class="button" href="media.php?post_id='.$post->post_id.'">'.__('Add files to this entry').'</a></p>'; 63 $items['metas-box']['items']['attachments']= $item; 59 64 } 60 65 } -
plugins/pings/_admin.php
r1179 r1392 33 33 34 34 $core->addBehavior('adminPostHeaders',array('pingsBehaviors','pingJS')); 35 $core->addBehavior('adminPostFormSidebar ',array('pingsBehaviors','pingsForm'));35 $core->addBehavior('adminPostFormSidebarItems',array('pingsBehaviors','pingsFormItems')); 36 36 $core->addBehavior('adminAfterPostCreate',array('pingsBehaviors','doPings')); 37 37 $core->addBehavior('adminAfterPostUpdate',array('pingsBehaviors','doPings')); -
plugins/pings/lib.pings.php
r1365 r1392 41 41 } 42 42 43 public static function pingsForm ($post)43 public static function pingsFormItems($items,$post) 44 44 { 45 45 $core =& $GLOBALS['core']; … … 59 59 } 60 60 61 echo'<h5 class="ping-services">'.__('Pings:').'</h5>';61 $item = '<h5 class="ping-services">'.__('Pings:').'</h5>'; 62 62 $i = 0; 63 63 foreach ($pings_uris as $k => $v) 64 64 { 65 echo65 $item .= 66 66 '<p class="ping-services"><label for="pings_do-'.$i.'" class="classic">'. 67 67 form::checkbox(array('pings_do[]','pings_do-'.$i),html::escapeHTML($v),in_array($v,$pings_do)).' '. … … 69 69 $i++; 70 70 } 71 $items['options-box']['items']['pings']=$item; 72 71 73 } 72 74 -
plugins/tags/_admin.php
r1365 r1392 18 18 require dirname(__FILE__).'/_widgets.php'; 19 19 20 $core->addBehavior('adminPostFormSidebar ',array('tagsBehaviors','tagsField'));20 $core->addBehavior('adminPostFormSidebarItems',array('tagsBehaviors','tagsField')); 21 21 22 22 $core->addBehavior('adminAfterPostCreate',array('tagsBehaviors','setTags')); … … 71 71 } 72 72 73 public static function tagsField($ post)73 public static function tagsField($items,$post) 74 74 { 75 75 $meta =& $GLOBALS['core']->meta; … … 80 80 $value = ($post) ? $meta->getMetaStr($post->post_meta,'tag') : ''; 81 81 } 82 83 echo 84 '<h5><label for="post_tags">'.__('Tags:').'</label></h5>'. 85 '<div class="p" id="tags-edit">'.form::textarea('post_tags',20,3,$value,'maximal').'</div>'; 82 $items['metas-box']['items']['post_tags']= 83 '<h5><label class="s-tags" for="post_tags">'.__('Tags:').'</label></h5>'. 84 '<div class="p s-tags" id="tags-edit">'.form::textarea('post_tags',20,3,$value,'maximal').'</div>'; 86 85 } 87 86 -
plugins/tags/_define.php
r1179 r1392 18 18 /* Version */ '1.2', 19 19 array( 20 'permissions' => 'usage,contentadmin' 20 'permissions' => 'usage,contentadmin', 21 'priority' => 998 21 22 ) 22 23 ); -
plugins/tags/js/post.js
r1112 r1392 58 58 }); 59 59 }); 60 61 $('h5 .s-tags').toggleWithLegend($('.s-tags').not('label'),{ 62 cookie: 'post_tags' 63 }); 64 60 65 }); 61 66
Note: See TracChangeset
for help on using the changeset viewer.