Changeset 1669:5b0b6a8422f3 for plugins/widgets
- Timestamp:
- 08/31/13 15:16:06 (12 years ago)
- Branch:
- default
- Location:
- plugins/widgets
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/widgets/index.php
r1659 r1669 165 165 <?php echo file_get_contents(dirname(__FILE__).'/style.css'); ?> 166 166 </style> 167 <script type="text/javascript" src="js/jquery/jquery-ui.custom.js"></script> 168 <script type="text/javascript" src="index.php?pf=widgets/widgets.js"></script> 167 <?php 168 echo 169 dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 170 dcPage::jsLoad('index.php?pf=widgets/widgets.js'); 171 ?> 169 172 <?php 170 173 $core->auth->user_prefs->addWorkspace('accessibility'); … … 220 223 echo 221 224 '<div id="sidebarNav" class="widgets fieldset">'. 222 sidebarWidgets('dndnav',__('Navigation sidebar'),$widgets_nav,'nav',$__default_widgets['nav'],$j). 223 '</div>'. 224 '<ul class="sortable-delete"><li class="sortable-delete-placeholder">'.__('Drag here to delete').'</li></ul>'; 225 sidebarWidgets('dndnav',__('Navigation sidebar'),$widgets_nav,'nav',$__default_widgets['nav'],$j); 226 echo '</div>'; 225 227 226 228 # Extra sidebar 227 229 echo 228 230 '<div id="sidebarExtra" class="widgets fieldset">'. 229 sidebarWidgets('dndextra',__('Extra sidebar'),$widgets_extra,'extra',$__default_widgets['extra'],$j). 230 '</div>'. 231 '<ul class="sortable-delete"><li class="sortable-delete-placeholder">'.__('Drag here to delete').'</li></ul>'; 231 sidebarWidgets('dndextra',__('Extra sidebar'),$widgets_extra,'extra',$__default_widgets['extra'],$j); 232 echo '</div>'; 232 233 233 234 # Custom sidebar 234 235 echo 235 236 '<div id="sidebarCustom" class="widgets fieldset">'. 236 sidebarWidgets('dndcustom',__('Custom sidebar'),$widgets_custom,'custom',$__default_widgets['custom'],$j). 237 '</div>'. 238 '<ul class="sortable-delete"><li class="sortable-delete-placeholder">'.__('Drag here to delete').'</li></ul>'; 237 sidebarWidgets('dndcustom',__('Custom sidebar'),$widgets_custom,'custom',$__default_widgets['custom'],$j); 238 echo '</div>'; 239 239 240 240 echo … … 322 322 } 323 323 324 if ($widgets->isEmpty()) { 325 $res .= '<p class="empty-widgets">'.__('No widget.').'</p>'; 326 } else { 327 $res .= '<p class="empty-widgets" style="display: none;">'.__('No widget.').'</p>'; 328 } 324 $res .= '<p class="empty-widgets" '.(!$widgets->isEmpty() ? 'style="display: none;"' : '').'>'.__('No widget.').'</p>'; 329 325 330 326 $res .= '<ul id="'.$id.'" class="connected">'; … … 350 346 351 347 $res .= '</ul>'; 348 349 if ($i > 0) { 350 $res .= '<ul class="sortable-delete"><li class="sortable-delete-placeholder">'. 351 __('Drag widgets here to remove them from this sidebar.').'</li></ul>'; 352 } 352 353 353 354 return $res; -
plugins/widgets/style.css
r1661 r1669 24 24 } 25 25 .widgets.fieldset.if-drag { 26 margin-bottom: 0; 27 border-radius: 6px 6px 0 0; 28 border-bottom: 1px dashed #FF0000; 26 padding-bottom: 0; 27 border-radius: .5em; 29 28 } 30 29 #dndnav, #dndextra, #dndcustom { … … 34 33 #dndnav > li, 35 34 #dndextra > li, 36 #dndcustom > li, 37 .sortable-delete > li { 38 padding: O; 35 #dndcustom > li { 36 padding: 0; 39 37 border: 1px solid #999; 40 38 margin-bottom: 1em; … … 46 44 .sortable-delete > li.ui-sortable-placeholder { 47 45 border: 1px dashed #999; 48 height: 2 rem;49 padding: 3px;46 height: 2em; 47 padding: .3em; 50 48 } 51 49 .sortable-delete > li.ui-sortable-placeholder { 50 border-width: 2px; 51 border-color: red; 52 } 52 53 .sortable-delete { 53 54 display: none; 54 55 } 55 56 .sortable-delete.if-drag { 56 border: 1px solid #999999; 57 border-top: 0; 58 border-radius: 0 0 6px 6px; 59 color: #000000; 57 border: 1px dotted #999; 58 color: #000; 60 59 font-weight: bold; 61 list-style: none outside none; 62 margin: 0 0 2em; 63 min-height: 25px; 64 padding: 4px; 60 list-style-type: none; 61 margin: 0 0 1em; 62 padding: .5em 1em; 65 63 display: block; 64 background: #fafafa; 66 65 } 67 66 .sortable-delete > li { … … 70 69 .sortable-delete > li.sortable-delete-placeholder { 71 70 border: 0 none; 72 color: # FF0000;73 font-size: 1 rem;74 font-weight: normal;71 color: #aaa; 72 font-size: 1em; 73 font-weight: bold; 75 74 text-align: center; 76 75 } 77 78 76 .widget-name { 79 77 background: #eef; … … 91 89 .widget-name a.aexpand:visited { 92 90 border: 0 none; 93 color: #000 000;91 color: #000; 94 92 text-decoration: none; 95 93 }
Note: See TracChangeset
for help on using the changeset viewer.