Dotclear


Ignore:
Timestamp:
08/19/13 18:58:08 (12 years ago)
Author:
Lepeltier kévin
Branch:
Ticket #1181
Message:

Ticket #1181 : Modification de admin/plugin.php?p=pages pour ajouter les champs de réordonancement.
Nouvelle action reorder dans le menu d'action.
Javascript sortable.
Petites modifs sur la copie de _posts_list.js

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/pages/list.php

    r1464 r1882  
    3131                
    3232               $html_block = 
    33                '<table class="clear"><tr>'. 
    34                '<th colspan="2">'.__('Title').'</th>'. 
     33               '<table class="maximal dragable"><thead><tr>'. 
     34               '<th colspan="3">'.__('Title').'</th>'. 
    3535               '<th>'.__('Date').'</th>'. 
    3636               '<th>'.__('Author').'</th>'. 
     
    3838               '<th>'.__('Trackbacks').'</th>'. 
    3939               '<th>'.__('Status').'</th>'. 
    40                '</tr>%s</table>'; 
     40               '</tr></thead><tbody id="pageslist">%s</tbody></table>'; 
    4141                
    4242               if ($enclose_block) { 
     
    5050               echo $blocks[0]; 
    5151                
     52               $count = 0; 
    5253               while ($this->rs->fetch()) 
    5354               { 
    54                     echo $this->postLine(); 
     55                    echo $this->postLine($count); 
     56                    $count ++; 
    5557               } 
    5658                
     
    6163     } 
    6264      
    63      private function postLine() 
     65     private function postLine($count) 
    6466     { 
    6567          $img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />'; 
     
    100102           
    101103          $res .= 
     104          '<td class="nowrap handle minimal">'.form::field(array('order['.$this->rs->post_id.']'),2,3,$count+1,'position','',false,'title="'.sprintf(__('position of %s'),html::escapeHTML($this->rs->post_title)).'"').'</td>'. 
    102105          '<td class="nowrap">'. 
    103106          form::checkbox(array('entries[]'),$this->rs->post_id,'','','',!$this->rs->isEditable(),'title="'.__('Select this page').'"').'</td>'. 
     
    145148if ($core->auth->check('publish,contentadmin',$core->blog->id)) 
    146149{ 
     150     $combo_action[__('Reorder')] = 'reorder'; 
    147151     $combo_action[__('Publish')] = 'publish'; 
    148152     $combo_action[__('Unpublish')] = 'unpublish'; 
     
    167171<head> 
    168172  <title><?php echo __('Pages'); ?></title> 
    169   <script type="text/javascript" src="js/_posts_list.js"></script> 
     173  <?php 
     174     echo dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 
     175          dcPage::jsLoad('index.php?pf=pages/list.js'); 
     176  ?> 
    170177  <script type="text/javascript"> 
    171178  //<![CDATA[ 
Note: See TracChangeset for help on using the changeset viewer.

Sites map