diff --git a/code/form/WidgetAreaEditor.php b/code/form/WidgetAreaEditor.php index 532c688..814c132 100644 --- a/code/form/WidgetAreaEditor.php +++ b/code/form/WidgetAreaEditor.php @@ -21,10 +21,7 @@ class WidgetAreaEditor extends FormField { function FieldHolder($properties = array()) { Requirements::css('widgets/css/WidgetAreaEditor.css'); - Requirements::javascript(THIRDPARTY_DIR . "/prototype/prototype.js"); - Requirements::javascript(THIRDPARTY_DIR . '/behaviour/behaviour.js'); Requirements::javascript('widgets/javascript/WidgetAreaEditor.js'); - return $this->renderWith("WidgetAreaEditor"); } diff --git a/css/WidgetAreaEditor.css b/css/WidgetAreaEditor.css index 8a5bf6f..c5a45e0 100644 --- a/css/WidgetAreaEditor.css +++ b/css/WidgetAreaEditor.css @@ -34,7 +34,12 @@ div.availableWidgets div.Widget { width: 98%; border: 1px solid #ddd; border-top: none; - margin-bottom: 5px; + margin-bottom: 10px; + background: #F0F3F4; +} + +div.widgetDescription{ + padding: 10px 0; } div.widgetDescription p, div.widgetFields { @@ -44,7 +49,7 @@ div.widgetFields { } p.deleteWidget { - margin: 0; + margin: 0 0 4px; height: 22px; line-height: 2.2; font-size: 12px; diff --git a/javascript/WidgetAreaEditor.js b/javascript/WidgetAreaEditor.js index 11fbf1e..1a35b44 100644 --- a/javascript/WidgetAreaEditor.js +++ b/javascript/WidgetAreaEditor.js @@ -125,11 +125,6 @@ }, insertWidgetEditor: function(response) { - // Remove placeholder text - if($('#NoWidgets-'+$(this).attr('name')).length>0) { - $('#usedWidgets-'+$(this).attr('name')).remove($('#NoWidgets-'+$(this).attr('name'))); - } - var usedWidgets = $('#usedWidgets-'+$(this).attr('name')).children(); // Give the widget a unique id @@ -161,7 +156,6 @@ deleteWidget: function(widgetToRemove) { // Remove a widget from the used widgets column widgetToRemove.remove(); - // TODO ... re-create NoWidgets div? } });