- Category: SilverStripe
- Last edited: September 27, 2012
Hide and show large widgets with this handy add-on.
Add to /themes/YOURTHEME/css/cms.css
/* — WIDGETS HIDE/SHOW — */
.usedWidgets .Widget {
position: relative;}
.usedWidgets .Widget .expand {
position: absolute;
top: 4px;
right: 20px;
color: #FFFFFF;
font-weight: bold;
cursor: hand;
cursor: pointer;}
.usedWidgets .Widget.collapsed .widgetDescription,
.usedWidgets .Widget.collapsed .widgetFields,
.usedWidgets .Widget.collapsed .deleteWidget {
display: none;}
Add to /themes/YOURTHEME/js/cms.js
$('.usedWidgets .Widget .expand').live( 'click', function(){
$(this).closest('.Widget').toggleClass('collapsed');
});