diff --git a/css/views.css b/css/views.css index b909f0b2476697076d8a7982a7883c74225734d0..763cc40cab27747cbeecc0862288222a867f330f 100644 --- a/css/views.css +++ b/css/views.css @@ -33,23 +33,6 @@ text-align: center; } -div.view div.views-hide { - display: none; -} - -/** For IE we add the class via js; for other browsers we rely on :hover **/ -div.view div.views-hide-hover, -div.view:hover div.views-hide { - display: block; - position: absolute; - z-index: 200; -} - -/* don't do this one in IE */ -div.view:hover div.views-hide { - margin-top: -1.5em; -} - /* Remove the border on tbody that system puts in */ .views-view-grid tbody { border-top: none; diff --git a/docs/docs.php b/docs/docs.php index c9ce039bfd154394a95bc640cd8405319ed6f5cc..53faf8cac9a8b4096af77031329f823fd9625134 100644 --- a/docs/docs.php +++ b/docs/docs.php @@ -674,23 +674,6 @@ function hook_views_query_alter(&$view, &$query) { // example code here } -/** - * This hook should be placed in MODULENAME.views.inc and it will be auto-loaded. - * This must either be in the same directory as the .module file or in a subdirectory - * named 'includes'. - * - * Alter the links that appear over a view. They are in a format suitable for - * theme('links'). - * - * Warning: $view is not a reference in PHP4 and cannot be modified here. But it IS - * a reference in PHP5, and can be modified. Please be careful with it. - * - * @see theme_links - */ -function hook_views_admin_links_alter(&$links, $view) { - // example code here -} - /** * This hook should be placed in MODULENAME.views.inc and it will be auto-loaded. * This must either be in the same directory as the .module file or in a subdirectory diff --git a/includes/plugins.inc b/includes/plugins.inc index 4742ae4af41d1094d3def99e75d2e5eb2c717614..7afac0c00813f1aecfba47b75414e22ead51abc0 100644 --- a/includes/plugins.inc +++ b/includes/plugins.inc @@ -38,6 +38,7 @@ function views_views_plugins() { 'handler' => 'views_plugin_display_page', 'theme' => 'views_view', 'uses hook menu' => TRUE, + 'contextual links locations' => array('page'), 'use ajax' => TRUE, 'use pager' => TRUE, 'accept attachments' => TRUE, @@ -50,6 +51,7 @@ function views_views_plugins() { 'handler' => 'views_plugin_display_block', 'theme' => 'views_view', 'uses hook block' => TRUE, + 'contextual links locations' => array('block'), 'use ajax' => TRUE, 'use pager' => TRUE, 'use more' => TRUE, diff --git a/js/base.js b/js/base.js index f437f5bd04c957233a01f0cf9782936d662d937c..68ee7f42c84f826c2a03d52ed93225ba98f5c6cc 100644 --- a/js/base.js +++ b/js/base.js @@ -40,34 +40,6 @@ Drupal.behaviors.viewsTabs = { } }; -/** - * For IE, attach some javascript so that our hovers do what they're supposed - * to do. - */ -Drupal.behaviors.viewsHoverlinks = function() { - if ($.browser.msie) { - // If IE, attach a hover event so we can see our admin links. - $("div.view:not(.views-hover-processed)").addClass('views-hover-processed').hover( - function() { - $('div.views-hide', this).addClass("views-hide-hover"); return true; - }, - function(){ - $('div.views-hide', this).removeClass("views-hide-hover"); return true; - } - ); - $("div.views-admin-links:not(.views-hover-processed)") - .addClass('views-hover-processed') - .hover( - function() { - $(this).addClass("views-admin-links-hover"); return true; - }, - function(){ - $(this).removeClass("views-admin-links-hover"); return true; - } - ); - } -} - /** * Helper function to parse a querystring. */ diff --git a/js/views-contextual.js b/js/views-contextual.js new file mode 100644 index 0000000000000000000000000000000000000000..8dd6cf2065a2560c0b0eb12a99302d9c06ba953a --- /dev/null +++ b/js/views-contextual.js @@ -0,0 +1,18 @@ +// $Id$ + +/** + * @file + * Javascript related to contextual links. + */ +(function ($) { + +Drupal.behaviors.viewsContextualLinks = { + attach: function (context) { + // If there are views-related contextual links attached to the main page + // content, find the smallest region that encloses both the links and the + // view, and display it as a contextual links region. + $('.views-contextual-links-page', context).closest(':has(.view)').addClass('contextual-links-region'); + } +}; + +})(jQuery); diff --git a/plugins/views_plugin_display.inc b/plugins/views_plugin_display.inc index 4f6366985c96fb59ce357d9be530344730307882..6846e838e38d8d1aecee75ac4d2f1dc1d2a90cd1 100644 --- a/plugins/views_plugin_display.inc +++ b/plugins/views_plugin_display.inc @@ -2399,7 +2399,7 @@ class views_plugin_display extends views_plugin { function view_special_blocks($type) { if ($type == '-exp') { // avoid interfering with the admin forms. - if (arg(0) == 'admin' && arg(1) == 'build' && arg(2) == 'views') { + if (arg(0) == 'admin' && arg(1) == 'structure' && arg(2) == 'views') { return; } $this->view->init_handlers(); diff --git a/tests/templates/views-view--frontpage.tpl.php b/tests/templates/views-view--frontpage.tpl.php index 7704c81412614a9d6eb197ced73dcb6e273bdeb9..1741b959e1207e5f326948d014d15275f58bb2dc 100644 --- a/tests/templates/views-view--frontpage.tpl.php +++ b/tests/templates/views-view--frontpage.tpl.php @@ -23,18 +23,11 @@ * - $exposed: Exposed widget form/info to display * - $feed_icon: Feed icon to display, if any * - $more: A link to view more, if any - * - $admin_links: A rendered list of administrative links - * - $admin_links_raw: A list of administrative links suitable for theme('links') * * @ingroup views_templates */ ?>