Dotclear

Changeset 2496:e33dcbc18e36 for plugins


Ignore:
Timestamp:
10/27/13 09:52:46 (12 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Parents:
2495:dc8c7974ff0b (diff), 2494:b168f47c7f9c (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.
Message:

Merge 2.6 commits to the current 2.7-dev

Location:
plugins
Files:
3 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • plugins/pages/list.php

    r2442 r2496  
    5555  <title><?php echo __('Pages'); ?></title> 
    5656  <?php 
    57      echo dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 
     57     echo 
     58          dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 
     59          dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js'). 
    5860          dcPage::jsLoad('index.php?pf=pages/list.js'). 
    5961          '<script type="text/javascript">'. 
     
    8991     $post_list->display($page,$nb_per_page, 
    9092     '<form action="plugin.php" method="post" id="form-entries">'. 
    91       
     93 
    9294     '%s'. 
    93       
     95 
    9496     '<div class="two-cols">'. 
    9597     '<p class="col checkboxes-helpers"></p>'. 
    96       
     98 
    9799     '<p class="col right"><label for="action" class="classic">'.__('Selected pages action:').'</label> '. 
    98100     form::combo('action',$pages_actions_page->getCombo()). 
  • plugins/pages/list.php

    r2495 r2496  
    9999     '<p class="col right"><label for="action" class="classic">'.__('Selected pages action:').'</label> '. 
    100100     form::combo('action',$pages_actions_page->getCombo()). 
    101      '<input type="submit" value="'.__('ok').'" /></p>'. 
     101     '<input type="submit" value="'.__('ok').'" />'. 
    102102     form::hidden(array('post_type'),'page'). 
    103103     form::hidden(array('p'),'pages'). 
    104104     form::hidden(array('act'),'list'). 
    105      '</div>'. 
    106105     $core->formNonce(). 
     106     '</p></div>'. 
    107107     '<p class="clear form-note hidden-if-js">'. 
    108108     __('To rearrange pages order, change number at the begining of the line, then click on “Save pages order” button.').'</p>'. 
    109109     '<p class="clear form-note hidden-if-no-js">'. 
    110110     __('To rearrange pages order, move items by drag and drop, then click on “Save pages order” button.').'</p>'. 
    111      '<input type="submit" value="'.__('Save pages order').'" name="reorder" class="clear"/>'. 
     111     '<p><input type="submit" value="'.__('Save pages order').'" name="reorder" class="clear" /></p>'. 
    112112     '</form>'); 
    113113} 
  • plugins/simpleMenu/index.php

    r2455 r2496  
    347347               echo 
    348348                    dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 
     349                    dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js'). 
    349350                    dcPage::jsLoad('index.php?pf=simpleMenu/simplemenu.js'); 
    350351          } 
  • plugins/simpleMenu/index.php

    r2495 r2496  
    350350                    dcPage::jsLoad('index.php?pf=simpleMenu/simplemenu.js'); 
    351351          } 
     352          echo dcPage::jsConfirmClose('additem','menuitems'); 
    352353     ?> 
    353354</head> 
  • plugins/widgets/index.php

    r2448 r2496  
    5353          } 
    5454     } 
    55            
     55 
    5656     # Append 1 widget 
    5757     $wid = false; 
     
    6060          $wid = $wid[0]; 
    6161     } 
    62       
     62 
    6363     # Append widgets 
    6464     if (!empty($addw)) 
     
    7373               $widgets_custom = new dcWidgets(); 
    7474          } 
    75            
     75 
    7676          foreach ($addw as $k => $v) 
    7777          { 
     
    9191               } 
    9292          } 
    93            
     93 
    9494          try { 
    9595               $core->blog->settings->addNamespace('widgets'); 
     
    151151          $_POST['w'] = array(); 
    152152     } 
    153       
     153 
    154154     try 
    155155     { 
     
    163163               } 
    164164          } 
    165            
     165 
    166166          if (!isset($_POST['w']['nav'])) { 
    167167               $_POST['w']['nav'] = array(); 
     
    173173               $_POST['w']['custom'] = array(); 
    174174          } 
    175            
     175 
    176176          $widgets_nav = dcWidgets::loadArray($_POST['w']['nav'],$__widgets); 
    177177          $widgets_extra = dcWidgets::loadArray($_POST['w']['extra'],$__widgets); 
    178178          $widgets_custom = dcWidgets::loadArray($_POST['w']['custom'],$__widgets); 
    179            
     179 
    180180          $core->blog->settings->addNamespace('widgets'); 
    181181          $core->blog->settings->widgets->put('widgets_nav',$widgets_nav->store()); 
     
    183183          $core->blog->settings->widgets->put('widgets_custom',$widgets_custom->store()); 
    184184          $core->blog->triggerBlog(); 
    185            
     185 
    186186          http::redirect($p_url); 
    187187     } 
     
    200200          $core->blog->settings->widgets->put('widgets_custom',''); 
    201201          $core->blog->triggerBlog(); 
    202            
     202 
    203203          http::redirect($p_url); 
    204204     } 
     
    216216          echo 
    217217               dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 
     218               dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js'). 
    218219               dcPage::jsLoad('index.php?pf=widgets/widgets.js'); 
    219220  ?> 
    220   <?php  
    221      $core->auth->user_prefs->addWorkspace('accessibility');  
     221  <?php 
     222     $core->auth->user_prefs->addWorkspace('accessibility'); 
    222223     $user_dm_nodragdrop = $core->auth->user_prefs->accessibility->nodragdrop; 
    223224  ?> 
     
    304305     ($w->desc() != '' ? ' <span class="form-note">'.__($w->desc()).'</span>' : '').'</dt>'. 
    305306     '<dd>'; 
    306       
     307 
    307308     $w_settings = $w->settings(); 
    308309     if (empty($w_settings)) 
     
    329330                         break; 
    330331               } 
    331                 
     332 
    332333               $widget_elements->content .= 
    333334               '<li>'. 
     
    347348{ 
    348349     $res = '<h3>'.$title.'</h3>'; 
    349       
     350 
    350351     if (!($widgets instanceof dcWidgets)) 
    351352     { 
    352353          $widgets = $default_widgets; 
    353354     } 
    354       
     355 
    355356     $res .= '<ul id="'.$id.'" class="connected">'; 
    356       
    357      $res .= '<li class="empty-widgets" '.(!$widgets->isEmpty() ? 'style="display: none;"' : '').'>'.__('No widget as far.').'</li>'; 
    358       
     357 
     358     $res .= '<li class="empty-widgets" '.(!$widgets->isEmpty() ? 'style="display: none;"' : '').'>'.__('No widget for now.').'</li>'; 
     359 
    359360     $i = 0; 
    360361     foreach ($widgets->elements() as $w) 
     
    366367           
    367368          $iname = 'w['.$pr.']['.$i.']'; 
    368            
     369 
    369370          $res .= 
    370371          '<li>'.form::hidden(array($iname.'[id]'),html::escapeHTML($w->id())). 
     
    380381          '<div class="widgetSettings hidden-if-drag">'.$w->formSettings($iname,$j).'</div>'. 
    381382          '</li>'; 
    382            
     383 
    383384          $i++; 
    384385          $j++; 
    385386     } 
    386       
     387 
    387388     $res .= '</ul>'; 
    388       
     389 
    389390     $res .= '<ul class="sortable-delete"'.($i > 0 ? '':' style="display: none;"').'><li class="sortable-delete-placeholder">'. 
    390391               __('Drag widgets here to remove.').'</li></ul>'; 
    391       
     392 
    392393     return $res; 
    393394} 
  • plugins/widgets/index.php

    r2495 r2496  
    212212<head> 
    213213  <title><?php echo __('Widgets'); ?></title> 
    214   <style type="text/css"> 
    215   <?php echo file_get_contents(dirname(__FILE__).'/style.css'); ?> 
    216   </style> 
     214  <link type="text/css" rel="stylesheet" href="index.php?pf=widgets/style.css"/> 
    217215  <?php 
    218216          echo 
     
    268266echo 
    269267'</ul>'. 
    270 $core->formNonce(). 
     268'<p>'.$core->formNonce().'</p>'. 
    271269'<p class="remove-if-drag"><input type="submit" name="append" value="'.__('Add widgets to sidebars').'" /></p>'. 
    272270'</form>'; 
     
    299297 
    300298$widget_elements = new stdClass; 
    301 $widget_elements->content = 
    302 '<h4>'.__('Use of widgets').'</h4>'. 
    303 '<p>'.__('Widgets may be used to add various blocks of content to be displayed on your public pages. To add a widget, '. 
    304 'drag it from the Available widgets list on the left to one of the sidebars on the right of this page. You can order '. 
    305 'your widgets in a sidebar by dragging them up or down. You must update sidebars to apply your changes.').'</p>'. 
    306 '<p>'.__('Once included in a sidebar, widgets have configuration options that you can reach by clicking on the arrow next '. 
    307 'to their name.').'</p>'. 
    308 '<p>'.__('Reset sidebars to get back to default widgets installation.').'</p>'. 
    309 '<h4>'.__('Widget templates tags').'</h4>'. 
    310 '<div id="widgets-tpl">'. 
    311 '<p>'.__('If you are allowed to edit your theme templates, you can directly add widgets as '. 
    312 'templates tags, with their own configuration.').'</p>'. 
    313 '<p>'.__('To add a widget in your template, you need to write code like this:').'</p>'. 
    314 '<pre>&lt;tpl:Widget id="<strong>'.__('Widget ID').'</strong>"&gt; 
    315   &lt;setting name="<strong>'.__('Setting name').'</strong>"&gt;<strong>'.__('Setting value').'</strong>&lt;/setting&gt; 
    316   ... 
    317 &lt;/tpl:Widget&gt;</pre>'. 
    318 '<p>'.__('Here are the following available widgets for your blog:').'</p>'; 
    319  
    320 $widget_elements->content .= '<dl>'; 
     299$widget_elements->content = '<dl>'; 
    321300foreach ($__widgets->elements() as $w) 
    322301{ 
     
    364343$widget_elements->content .= '</dl></div>'; 
    365344 
    366 dcPage::helpBlock($widget_elements); 
     345dcPage::helpBlock('widgets',$widget_elements); 
    367346 
    368347function sidebarWidgets($id,$title,$widgets,$pr,$default_widgets,&$j) 
     
    382361     foreach ($widgets->elements() as $w) 
    383362     { 
    384           $upDisabled = $i == 0 ? '" disabled="" src="images/disabled_' : '" src="images/'; 
    385           $downDisabled = $i == count($widgets->elements())-1 ? '" disabled="" src="images/disabled_' : '" src="images/'; 
    386  
     363          $upDisabled = $i == 0 ? ' disabled" src="images/disabled_' : '" src="images/'; 
     364          $downDisabled = $i == count($widgets->elements())-1 ? ' disabled" src="images/disabled_' : '" src="images/'; 
     365          $altUp = $i == 0 ? ' alt=""' : ' alt="'.__('Up the widget').'"'; 
     366          $altDown = $i == count($widgets->elements())-1 ? ' alt=""' : ' alt="'.__('Down the widget').'"'; 
     367           
    387368          $iname = 'w['.$pr.']['.$i.']'; 
    388369 
     
    393374          ($w->desc() != '' ? ' <span class="form-note">'.__($w->desc()).'</span>' : ''). 
    394375          '<span class="toolsWidget remove-if-drag">'. 
    395           '<input type="image" class="upWidget'.$upDisabled.'up.png" name="'.$iname.'[_up]" value="'.__('Up the widget').'" />'. 
    396           '<input type="image" class="downWidget'.$downDisabled.'down.png" name="'.$iname.'[_down]" value="'.__('Down the widget').'" />'.' '. 
    397           '<input type="image" class="removeWidget" src="images/trash.png" name="'.$iname.'[_rem]" value="'.__('Remove widget').'" />'. 
     376          '<input type="image" class="upWidget'.$upDisabled.'up.png" name="'.$iname.'[_up]" value="'.__('Up the widget').'"'.$altUp.' /> '. 
     377          '<input type="image" class="downWidget'.$downDisabled.'down.png" name="'.$iname.'[_down]" value="'.__('Down the widget').'"'.$altDown.' /> '.' '. 
     378          '<input type="image" class="removeWidget" src="images/trash.png" name="'.$iname.'[_rem]" value="'.__('Remove widget').'" alt="'.__('Remove the widget').'" />'. 
    398379          '</span>'. 
    399380          '<br class="clear"/></p>'. 
Note: See TracChangeset for help on using the changeset viewer.

Sites map