Changeset 2496:e33dcbc18e36 for plugins
- Timestamp:
- 10/27/13 09:52:46 (12 years ago)
- 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. - Location:
- plugins
- Files:
-
- 3 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/pages/list.php
r2442 r2496 55 55 <title><?php echo __('Pages'); ?></title> 56 56 <?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'). 58 60 dcPage::jsLoad('index.php?pf=pages/list.js'). 59 61 '<script type="text/javascript">'. … … 89 91 $post_list->display($page,$nb_per_page, 90 92 '<form action="plugin.php" method="post" id="form-entries">'. 91 93 92 94 '%s'. 93 95 94 96 '<div class="two-cols">'. 95 97 '<p class="col checkboxes-helpers"></p>'. 96 98 97 99 '<p class="col right"><label for="action" class="classic">'.__('Selected pages action:').'</label> '. 98 100 form::combo('action',$pages_actions_page->getCombo()). -
plugins/pages/list.php
r2495 r2496 99 99 '<p class="col right"><label for="action" class="classic">'.__('Selected pages action:').'</label> '. 100 100 form::combo('action',$pages_actions_page->getCombo()). 101 '<input type="submit" value="'.__('ok').'" /> </p>'.101 '<input type="submit" value="'.__('ok').'" />'. 102 102 form::hidden(array('post_type'),'page'). 103 103 form::hidden(array('p'),'pages'). 104 104 form::hidden(array('act'),'list'). 105 '</div>'.106 105 $core->formNonce(). 106 '</p></div>'. 107 107 '<p class="clear form-note hidden-if-js">'. 108 108 __('To rearrange pages order, change number at the begining of the line, then click on “Save pages order” button.').'</p>'. 109 109 '<p class="clear form-note hidden-if-no-js">'. 110 110 __('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>'. 112 112 '</form>'); 113 113 } -
plugins/simpleMenu/index.php
r2455 r2496 347 347 echo 348 348 dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 349 dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js'). 349 350 dcPage::jsLoad('index.php?pf=simpleMenu/simplemenu.js'); 350 351 } -
plugins/simpleMenu/index.php
r2495 r2496 350 350 dcPage::jsLoad('index.php?pf=simpleMenu/simplemenu.js'); 351 351 } 352 echo dcPage::jsConfirmClose('additem','menuitems'); 352 353 ?> 353 354 </head> -
plugins/widgets/index.php
r2448 r2496 53 53 } 54 54 } 55 55 56 56 # Append 1 widget 57 57 $wid = false; … … 60 60 $wid = $wid[0]; 61 61 } 62 62 63 63 # Append widgets 64 64 if (!empty($addw)) … … 73 73 $widgets_custom = new dcWidgets(); 74 74 } 75 75 76 76 foreach ($addw as $k => $v) 77 77 { … … 91 91 } 92 92 } 93 93 94 94 try { 95 95 $core->blog->settings->addNamespace('widgets'); … … 151 151 $_POST['w'] = array(); 152 152 } 153 153 154 154 try 155 155 { … … 163 163 } 164 164 } 165 165 166 166 if (!isset($_POST['w']['nav'])) { 167 167 $_POST['w']['nav'] = array(); … … 173 173 $_POST['w']['custom'] = array(); 174 174 } 175 175 176 176 $widgets_nav = dcWidgets::loadArray($_POST['w']['nav'],$__widgets); 177 177 $widgets_extra = dcWidgets::loadArray($_POST['w']['extra'],$__widgets); 178 178 $widgets_custom = dcWidgets::loadArray($_POST['w']['custom'],$__widgets); 179 179 180 180 $core->blog->settings->addNamespace('widgets'); 181 181 $core->blog->settings->widgets->put('widgets_nav',$widgets_nav->store()); … … 183 183 $core->blog->settings->widgets->put('widgets_custom',$widgets_custom->store()); 184 184 $core->blog->triggerBlog(); 185 185 186 186 http::redirect($p_url); 187 187 } … … 200 200 $core->blog->settings->widgets->put('widgets_custom',''); 201 201 $core->blog->triggerBlog(); 202 202 203 203 http::redirect($p_url); 204 204 } … … 216 216 echo 217 217 dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 218 dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js'). 218 219 dcPage::jsLoad('index.php?pf=widgets/widgets.js'); 219 220 ?> 220 <?php 221 $core->auth->user_prefs->addWorkspace('accessibility'); 221 <?php 222 $core->auth->user_prefs->addWorkspace('accessibility'); 222 223 $user_dm_nodragdrop = $core->auth->user_prefs->accessibility->nodragdrop; 223 224 ?> … … 304 305 ($w->desc() != '' ? ' <span class="form-note">'.__($w->desc()).'</span>' : '').'</dt>'. 305 306 '<dd>'; 306 307 307 308 $w_settings = $w->settings(); 308 309 if (empty($w_settings)) … … 329 330 break; 330 331 } 331 332 332 333 $widget_elements->content .= 333 334 '<li>'. … … 347 348 { 348 349 $res = '<h3>'.$title.'</h3>'; 349 350 350 351 if (!($widgets instanceof dcWidgets)) 351 352 { 352 353 $widgets = $default_widgets; 353 354 } 354 355 355 356 $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 359 360 $i = 0; 360 361 foreach ($widgets->elements() as $w) … … 366 367 367 368 $iname = 'w['.$pr.']['.$i.']'; 368 369 369 370 $res .= 370 371 '<li>'.form::hidden(array($iname.'[id]'),html::escapeHTML($w->id())). … … 380 381 '<div class="widgetSettings hidden-if-drag">'.$w->formSettings($iname,$j).'</div>'. 381 382 '</li>'; 382 383 383 384 $i++; 384 385 $j++; 385 386 } 386 387 387 388 $res .= '</ul>'; 388 389 389 390 $res .= '<ul class="sortable-delete"'.($i > 0 ? '':' style="display: none;"').'><li class="sortable-delete-placeholder">'. 390 391 __('Drag widgets here to remove.').'</li></ul>'; 391 392 392 393 return $res; 393 394 } -
plugins/widgets/index.php
r2495 r2496 212 212 <head> 213 213 <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"/> 217 215 <?php 218 216 echo … … 268 266 echo 269 267 '</ul>'. 270 $core->formNonce().268 '<p>'.$core->formNonce().'</p>'. 271 269 '<p class="remove-if-drag"><input type="submit" name="append" value="'.__('Add widgets to sidebars').'" /></p>'. 272 270 '</form>'; … … 299 297 300 298 $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><tpl:Widget id="<strong>'.__('Widget ID').'</strong>"> 315 <setting name="<strong>'.__('Setting name').'</strong>"><strong>'.__('Setting value').'</strong></setting> 316 ... 317 </tpl:Widget></pre>'. 318 '<p>'.__('Here are the following available widgets for your blog:').'</p>'; 319 320 $widget_elements->content .= '<dl>'; 299 $widget_elements->content = '<dl>'; 321 300 foreach ($__widgets->elements() as $w) 322 301 { … … 364 343 $widget_elements->content .= '</dl></div>'; 365 344 366 dcPage::helpBlock( $widget_elements);345 dcPage::helpBlock('widgets',$widget_elements); 367 346 368 347 function sidebarWidgets($id,$title,$widgets,$pr,$default_widgets,&$j) … … 382 361 foreach ($widgets->elements() as $w) 383 362 { 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 387 368 $iname = 'w['.$pr.']['.$i.']'; 388 369 … … 393 374 ($w->desc() != '' ? ' <span class="form-note">'.__($w->desc()).'</span>' : ''). 394 375 '<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').'" />'. 398 379 '</span>'. 399 380 '<br class="clear"/></p>'.
Note: See TracChangeset
for help on using the changeset viewer.