diff --git a/views/elements/seo_admin_filter.ctp b/views/elements/seo_admin_filter.ctp index bf1667d..28e5d6c 100644 --- a/views/elements/seo_admin_filter.ctp +++ b/views/elements/seo_admin_filter.ctp @@ -1,3 +1,4 @@ +Html->script('/seo/js/clear_default'); ?>
element('seo_admin_filter', array('plugin' => 'seo', 'model' => 'SeoBlacklist')); ?>
+ element('seo_admin_filter', array('plugin' => 'seo', 'model' => 'SeoBlacklist')); ?> element('seo_view_head', array('plugin' => 'seo')); ?>

diff --git a/views/seo_meta_tags/admin_index.ctp b/views/seo_meta_tags/admin_index.ctp index 3f6c4af..acd76ad 100644 --- a/views/seo_meta_tags/admin_index.ctp +++ b/views/seo_meta_tags/admin_index.ctp @@ -1,5 +1,5 @@ -element('seo_admin_filter', array('plugin' => 'seo', 'model' => 'SeoMetaTag')); ?>
+ element('seo_admin_filter', array('plugin' => 'seo', 'model' => 'SeoMetaTag')); ?> element('seo_view_head', array('plugin' => 'seo')); ?>

diff --git a/views/seo_redirects/admin_index.ctp b/views/seo_redirects/admin_index.ctp index bcc33ae..613c270 100644 --- a/views/seo_redirects/admin_index.ctp +++ b/views/seo_redirects/admin_index.ctp @@ -1,5 +1,5 @@ -element('seo_admin_filter', array('plugin' => 'seo', 'model' => 'SeoRedirect')); ?>
+ element('seo_admin_filter', array('plugin' => 'seo', 'model' => 'SeoRedirect')); ?> element('seo_view_head', array('plugin' => 'seo')); ?>

diff --git a/views/seo_titles/admin_index.ctp b/views/seo_titles/admin_index.ctp index 208d4ef..07e7456 100644 --- a/views/seo_titles/admin_index.ctp +++ b/views/seo_titles/admin_index.ctp @@ -1,5 +1,5 @@ -element('seo_admin_filter', array('plugin' => 'seo', 'model' => 'SeoTitle')); ?>
+ element('seo_admin_filter', array('plugin' => 'seo', 'model' => 'SeoTitle')); ?> element('seo_view_head', array('plugin' => 'seo')); ?>

diff --git a/views/seo_uris/admin_index.ctp b/views/seo_uris/admin_index.ctp index 65e4be6..054d719 100644 --- a/views/seo_uris/admin_index.ctp +++ b/views/seo_uris/admin_index.ctp @@ -1,5 +1,5 @@ -element('seo_admin_filter', array('plugin' => 'seo', 'model' => 'SeoUri')); ?>
+ element('seo_admin_filter', array('plugin' => 'seo', 'model' => 'SeoUri')); ?> element('seo_view_head', array('plugin' => 'seo')); ?>

diff --git a/webroot/css/seo_style.css b/webroot/css/seo_style.css index 99171fb..c98baab 100644 --- a/webroot/css/seo_style.css +++ b/webroot/css/seo_style.css @@ -17,7 +17,10 @@ div.seo_plugin div.actions h3 { padding-top:0; color:#777; } - +div.seo_plugin #admin_filter form input[type="image"]{ + position: relative; + top: 10px; +} /** Tables **/ div.seo_plugin table { @@ -169,6 +172,10 @@ div.seo_plugin input, div.seo_plugin textarea { padding: 1%; width:98%; } +div.seo_plugin #admin_filter input { + clear: none; + width: auto; +} div.seo_plugin select { clear: both; font-size: 120%; diff --git a/webroot/js/clear_default.js b/webroot/js/clear_default.js new file mode 100644 index 0000000..c96f6b3 --- /dev/null +++ b/webroot/js/clear_default.js @@ -0,0 +1,18 @@ +(function($){ + $.fn.clearDefault = function(){ + return this.each(function(){ + + var default_value = $(this).val(); + $(this).focus(function(){ + if ($(this).val() == default_value) $(this).val(""); + }); + $(this).blur(function(){ + if ($(this).val() == "") $(this).val(default_value); + }); + }); + }; +})(jQuery); + +$(document).ready(function() { + $('input:text.clear_default').clearDefault(); +}); \ No newline at end of file