Changeset 1657:589433690f81
- Timestamp:
- 08/29/13 15:42:29 (11 years ago)
- Branch:
- Ticket #1604 - widgets
- Location:
- plugins/widgets
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/widgets/dragdrop.js
r1651 r1657 2 2 3 3 // clean 4 $('.js-remove').remove(); 5 $('.js-hide').hide(); 6 $('.widgetSettings').hide(); 7 $('.widgets, .sortable-delete').addClass('drag'); 4 $('.remove-if-drag').remove(); 5 $('.hidden-if-drag').hide(); 6 $('.widgets, .sortable-delete').addClass('if-drag'); 8 7 9 8 // move … … 15 14 handle: ".widget-name", 16 15 placeholder: "ui-sortable-placeholder", 16 items: "li:not(.sortable-delete-placeholder)", 17 17 connectWith: ".connected, .sortable-delete", 18 18 start: function( event, ui ) { -
plugins/widgets/index.php
r1656 r1657 201 201 echo 202 202 '<li>'.form::hidden(array('w[void][0][id]'),html::escapeHTML($w->id())). 203 '<p class="widget-name">'.form::field(array('w[void][0][order]'),2,3,0,' js-hide','',0,'title="'.__('order').'"').' '.$w->name().203 '<p class="widget-name">'.form::field(array('w[void][0][order]'),2,3,0,'hidden-if-drag','',0,'title="'.__('order').'"').' '.$w->name(). 204 204 ($w->desc() != '' ? ' <span class="form-note">'.__($w->desc()).'</span>' : '').'</p>'. 205 '<p class=" js-remove"><label class="classic">'.__('Append to:').'</label> '.205 '<p class="remove-if-drag"><label class="classic">'.__('Append to:').'</label> '. 206 206 form::combo(array('addw['.$w->id().']'),$append_combo).'</p>'. 207 '<div class="widgetSettings ">'.$w->formSettings('w[void][0]',$j).'</div>'.207 '<div class="widgetSettings hidden-if-drag">'.$w->formSettings('w[void][0]',$j).'</div>'. 208 208 '</li>'; 209 209 $j++; … … 213 213 '</ul>'. 214 214 $core->formNonce(). 215 '<p class=" js-remove"><input type="submit" name="append" value="'.__('Add widgets to sidebars').'" /></p>'.215 '<p class="remove-if-drag"><input type="submit" name="append" value="'.__('Add widgets to sidebars').'" /></p>'. 216 216 '</form>'; 217 217 … … 222 222 sidebarWidgets('dndnav',__('Navigation sidebar'),$widgets_nav,'nav',$__default_widgets['nav'],$j). 223 223 '</div>'. 224 '<ul class="sortable-delete">< /ul>';224 '<ul class="sortable-delete"><li class="sortable-delete-placeholder">'.__('Drag here to delete').'</li></ul>'; 225 225 226 226 # Extra sidebar … … 229 229 sidebarWidgets('dndextra',__('Extra sidebar'),$widgets_extra,'extra',$__default_widgets['extra'],$j). 230 230 '</div>'. 231 '<ul class="sortable-delete">< /ul>';231 '<ul class="sortable-delete"><li class="sortable-delete-placeholder">'.__('Drag here to delete').'</li></ul>'; 232 232 233 233 # Custom sidebar … … 236 236 sidebarWidgets('dndcustom',__('Custom sidebar'),$widgets_custom,'custom',$__default_widgets['custom'],$j). 237 237 '</div>'. 238 '<ul class="sortable-delete">< /ul>';238 '<ul class="sortable-delete"><li class="sortable-delete-placeholder">'.__('Drag here to delete').'</li></ul>'; 239 239 240 240 echo … … 337 337 $res .= 338 338 '<li>'.form::hidden(array($iname.'[id]'),html::escapeHTML($w->id())). 339 '<p class="widget-name">'.form::field(array($iname.'[order]'),2,3,(string) $i,' js-hide','',0,'title="'.__('order').'"').' '.$w->name().339 '<p class="widget-name">'.form::field(array($iname.'[order]'),2,3,(string) $i,'hidden-if-drag','',0,'title="'.__('order').'"').' '.$w->name(). 340 340 ($w->desc() != '' ? ' <span class="form-note">'.__($w->desc()).'</span>' : '').'</p>'. 341 '<p class="removeWidget js-remove"><label class="classic">'.341 '<p class="removeWidget remove-if-drag"><label class="classic">'. 342 342 form::checkbox(array($iname.'[_rem]'),'1',0).' '.__('Remove widget'). 343 343 '</label></p>'. 344 '<div class="widgetSettings ">'.$w->formSettings($iname,$j).'</div>'.344 '<div class="widgetSettings hidden-if-drag">'.$w->formSettings($iname,$j).'</div>'. 345 345 '</li>'; 346 346 -
plugins/widgets/style.css
r1651 r1657 42 42 margin-bottom: 2em; 43 43 } 44 .widgets.fieldset. drag {44 .widgets.fieldset.if-drag { 45 45 margin-bottom: 0; 46 46 border-radius: 6px 6px 0 0; 47 border-bottom: 1px dashed #FF0000; 47 48 } 48 49 #widgets, #dndnav, #dndextra, #dndcustom { … … 62 63 .sortable-delete > li { 63 64 margin-bottom: 3px; 65 } 66 .sortable-delete li.sortable-delete-placeholder { 67 border: 0 none; 68 color: #666666; 69 font-size: 1rem; 70 font-weight: normal; 71 text-align: center; 64 72 } 65 73 … … 109 117 } 110 118 111 .sortable-delete. drag {112 b ackground: url("style/JsToolbar/bt_clean.png") no-repeat scroll 2px 5px #FFBABA;113 border- color: #999999;119 .sortable-delete.if-drag { 120 border: 1px solid #999999; 121 border-top: 0; 114 122 border-radius: 0 0 6px 6px; 115 border-right: 1px solid #999999;116 border-style: solid;117 border-width: 0 1px 1px;118 123 color: #000000; 119 124 font-weight: bold; … … 121 126 margin: 0 0 2em; 122 127 min-height: 25px; 123 padding: 4px 4px 0 24px;128 padding: 4px; 124 129 display: block; 125 130 }
Note: See TracChangeset
for help on using the changeset viewer.