From cea12d25389af66e3ca0759c9104c6263f5b2e9a Mon Sep 17 00:00:00 2001 From: Dieter Date: Fri, 29 Jun 2012 17:25:29 +0200 Subject: [PATCH 1/6] fixed jquery remove error on line 130 --- javascript/WidgetAreaEditor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascript/WidgetAreaEditor.js b/javascript/WidgetAreaEditor.js index 11fbf1e..34aa037 100644 --- a/javascript/WidgetAreaEditor.js +++ b/javascript/WidgetAreaEditor.js @@ -127,7 +127,7 @@ insertWidgetEditor: function(response) { // Remove placeholder text if($('#NoWidgets-'+$(this).attr('name')).length>0) { - $('#usedWidgets-'+$(this).attr('name')).remove($('#NoWidgets-'+$(this).attr('name'))); + $('#NoWidgets-'+$(this).attr('name')).remove(); } var usedWidgets = $('#usedWidgets-'+$(this).attr('name')).children(); From 208297b7fefb4de5302dae7a2aaf4c80a5ad5315 Mon Sep 17 00:00:00 2001 From: Dieter Date: Fri, 29 Jun 2012 17:36:35 +0200 Subject: [PATCH 2/6] css improvements --- css/WidgetAreaEditor.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/css/WidgetAreaEditor.css b/css/WidgetAreaEditor.css index 8a5bf6f..e4b67fb 100644 --- a/css/WidgetAreaEditor.css +++ b/css/WidgetAreaEditor.css @@ -34,7 +34,7 @@ div.availableWidgets div.Widget { width: 98%; border: 1px solid #ddd; border-top: none; - margin-bottom: 5px; + margin-bottom: 10px; } div.widgetDescription p, div.widgetFields { @@ -44,7 +44,7 @@ div.widgetFields { } p.deleteWidget { - margin: 0; + margin: 0 0 4px; height: 22px; line-height: 2.2; font-size: 12px; From 97f902117b16db4314f93f05a6fb3e93a647aa8e Mon Sep 17 00:00:00 2001 From: mattclegg Date: Fri, 29 Jun 2012 16:51:46 +0100 Subject: [PATCH 3/6] MINOR: Added background --- css/WidgetAreaEditor.css | 1 + 1 file changed, 1 insertion(+) diff --git a/css/WidgetAreaEditor.css b/css/WidgetAreaEditor.css index e4b67fb..f57f6aa 100644 --- a/css/WidgetAreaEditor.css +++ b/css/WidgetAreaEditor.css @@ -35,6 +35,7 @@ div.availableWidgets div.Widget { border: 1px solid #ddd; border-top: none; margin-bottom: 10px; + background: #F0F3F4 url('../../cms/images/textures/bg_cms_main_content.png') repeat top left; } div.widgetDescription p, div.widgetFields { From 5dc74f7359e7b992f7e03d57d63b7297581abe1c Mon Sep 17 00:00:00 2001 From: Dieter Date: Fri, 29 Jun 2012 17:53:35 +0200 Subject: [PATCH 4/6] css improvements --- css/WidgetAreaEditor.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/css/WidgetAreaEditor.css b/css/WidgetAreaEditor.css index e4b67fb..e03c6e7 100644 --- a/css/WidgetAreaEditor.css +++ b/css/WidgetAreaEditor.css @@ -36,6 +36,10 @@ div.availableWidgets div.Widget { border-top: none; margin-bottom: 10px; } + +div.widgetDescription{ + padding: 10px 0; +} div.widgetDescription p, div.widgetFields { padding: 0 8px; From 95b1804b95b2e866d92a87619e5e6f062dc210a7 Mon Sep 17 00:00:00 2001 From: Dieter Date: Fri, 29 Jun 2012 18:09:28 +0200 Subject: [PATCH 5/6] remove calls to behaviour & prototype which seem unnecessary --- code/form/WidgetAreaEditor.php | 3 --- 1 file changed, 3 deletions(-) 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"); } From 502c441c9ddd1e6d26a1d2a969ec8ea407549428 Mon Sep 17 00:00:00 2001 From: UndefinedOffset Date: Fri, 29 Jun 2012 15:23:09 -0300 Subject: [PATCH 6/6] Removed background on the widgets (makes them harder to read) Removed references to NoWidgets in WidgetAreaEditor --- css/WidgetAreaEditor.css | 2 +- javascript/WidgetAreaEditor.js | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/css/WidgetAreaEditor.css b/css/WidgetAreaEditor.css index fdac531..c5a45e0 100644 --- a/css/WidgetAreaEditor.css +++ b/css/WidgetAreaEditor.css @@ -35,7 +35,7 @@ div.availableWidgets div.Widget { border: 1px solid #ddd; border-top: none; margin-bottom: 10px; - background: #F0F3F4 url('../../cms/images/textures/bg_cms_main_content.png') repeat top left; + background: #F0F3F4; } div.widgetDescription{ diff --git a/javascript/WidgetAreaEditor.js b/javascript/WidgetAreaEditor.js index 34aa037..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) { - $('#NoWidgets-'+$(this).attr('name')).remove(); - } - 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? } });