Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Commit

Permalink
Updating to latest CVS checkout of admin.
Browse files Browse the repository at this point in the history
  • Loading branch information
Young Hahn committed Jun 10, 2009
1 parent e6557ac commit 9d64e5c
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 39 deletions.
4 changes: 2 additions & 2 deletions sites/all/modules/contrib/admin/admin.info
@@ -1,5 +1,5 @@
; $Id: admin.info,v 1.1.2.1 2009/06/07 07:03:52 yhahn Exp $
; $Id: admin.info,v 1.1.2.2 2009/06/08 00:55:33 yhahn Exp $
name = "Admin"
description = "Drupal administration UI helpers. Includes: admin menu, contextual administration links, admin theme."
description = "UI helpers for Drupal admins and managers. Includes a special admin theme, custom admin header with JS support, and contextual admin links."
package = "Administration"
core = 6.x
2 changes: 1 addition & 1 deletion sites/all/modules/contrib/admin/admin.install
@@ -1,5 +1,5 @@
<?php
// $Id: admin.install,v 1.1.2.1 2009/06/07 07:03:52 yhahn Exp $
// $Id: admin.install,v 1.1.2.2 2009/06/08 16:35:31 yhahn Exp $

/**
* Implementation of hook_install().
Expand Down
12 changes: 6 additions & 6 deletions sites/all/modules/contrib/admin/admin.module
@@ -1,5 +1,5 @@
<?php
// $Id: admin.module,v 1.1.2.5 2009/06/07 07:03:52 yhahn Exp $
// $Id: admin.module,v 1.1.2.6 2009/06/08 00:52:46 yhahn Exp $

/**
* Implementation of hook_init().
Expand Down Expand Up @@ -171,25 +171,25 @@ function admin_perm() {
* Implementation of hook_theme().
*/
function admin_theme($cache, $type, $theme, $path) {
$items = array();
$path = drupal_get_path('module', 'admin');
$items['admin_menu_overview_form'] = array(
'arguments' => array('form' => array()),
);
$items['admin_toolbar'] = array(
'arguments' => array('tree' => array()),
'template' => 'admin-toolbar',
'path' => drupal_get_path('module', 'admin') .'/toolbar',
'path' => $path . '/toolbar',
'file' => 'theme.inc',
);
$items['admin_links'] = array(
'arguments' => array('links' => array()),
'template' => 'admin-links',
'path' => drupal_get_path('module', 'admin') .'/toolbar',
'path' => $path . '/toolbar',
'file' => 'theme.inc',
);
$items['admin_manage_options'] = array(
'arguments' => array('form' => array()),
'path' => drupal_get_path('module', 'admin') .'/theme',
'path' => $path . '/theme',
'file' => 'template.php',
);
return $items;
Expand Down Expand Up @@ -385,7 +385,7 @@ function admin_preprocess_node(&$vars) {
* Helper for returning a selectively flattened version of the admin menu.
*/
function admin_get_menu_tree($method = 'all', $reset = FALSE) {
$tree = ($method == 'all') ? menu_tree_all_data('admin', $item) : menu_tree_page_data('admin');
$tree = ($method == 'all' ? menu_tree_all_data('admin') : menu_tree_page_data('admin'));
foreach ($tree as $k => $item) {
if ($item['link']['link_path'] == 'admin' && !empty($item['below'])) {
unset($tree[$k]);
Expand Down
2 changes: 1 addition & 1 deletion sites/all/modules/contrib/admin/theme/page.tpl.php
Expand Up @@ -4,7 +4,7 @@
<?php print $head ?>
<?php print $styles ?>
<!--[if lt IE 7]>
<style type='text/css' media='screen'>@import <?php print base_path() . drupal_get_path('module', 'admin') .'/theme/ie6.css' ?>;</style>
<style type="text/css" media="screen">@import "<?php echo $base_path, $directory; ?>/ie6.css";</style>
<![endif]-->
<title><?php print $head_title ?></title>
</head>
Expand Down
31 changes: 17 additions & 14 deletions sites/all/modules/contrib/admin/theme/theme.js
@@ -1,4 +1,4 @@
// $Id: theme.js,v 1.1 2009/06/03 06:50:54 yhahn Exp $
// $Id: theme.js,v 1.1.2.1 2009/06/08 05:13:48 yhahn Exp $

Drupal.behaviors.admin_theme = function(context) {
// Toggle help
Expand All @@ -20,22 +20,25 @@ Drupal.behaviors.admin_theme = function(context) {
});

// Fieldset
$('div.fieldset:not(.processed)').each(function() {
$(this).addClass('processed');
if ($(this).is('.collapsible')) {
if ($('input.error, textarea.error, select.error', this).size() > 0) {
$(this).removeClass('collapsed');
$('div.fieldset:not(.admin-processed)').each(function () {
var $fieldset = $(this);
$fieldset.addClass('admin-processed');
if ($fieldset.is('.collapsible')) {
if ($('.error', $fieldset).length > 0) {
$fieldset.removeClass('collapsed');
}
// Note that .children() only returns the immediate ancestors rather than
// recursing down all children.
$(this).children('.fieldset-title').click(function() {
if ($(this).parent().is('.collapsed')) {
$(this).siblings('.fieldset-content').show();
$(this).parent().removeClass('collapsed');
if ($fieldset.is('.collapsed')) {
$fieldset.children('.fieldset-content').hide();
}
$fieldset.children('.fieldset-title').click(function () {
var $title = $(this);
if ($fieldset.is('.collapsed')) {
$title.next('.fieldset-content').slideDown('fast');
$fieldset.removeClass('collapsed');
}
else {
$(this).siblings('.fieldset-content').hide();
$(this).parent().addClass('collapsed');
$title.next('.fieldset-content').slideUp('fast');
$fieldset.addClass('collapsed');
}
return false;
});
Expand Down
29 changes: 14 additions & 15 deletions sites/all/modules/contrib/admin/toolbar/admin_toolbar.js
@@ -1,22 +1,21 @@
// $Id: admin_toolbar.js,v 1.1.2.1 2009/06/07 04:14:41 yhahn Exp $
// $Id: admin_toolbar.js,v 1.1.2.2 2009/06/08 00:52:46 yhahn Exp $

Drupal.behaviors.admin_toolbar = function(context) {
Drupal.admin = Drupal.admin || {};
Drupal.admin.toolbar = Drupal.admin.toolbar || {};

Drupal.admin = {
'toolbar': {}
}
Drupal.admin.toolbar.setActive = function(toolbar_id) {
// Show the right toolbar
$('#admin-toolbar .depth-1 ul.links').addClass('collapsed');
$(toolbar_id).removeClass('collapsed');
$('div#admin-toolbar, div#admin-toolbar .depth-1').removeClass('collapsed');

Drupal.admin.toolbar.setActive = function(toolbar_id) {
// Show the right toolbar
$('#admin-toolbar .depth-1 ul.links').addClass('collapsed');
$(toolbar_id).removeClass('collapsed');
$('div#admin-toolbar, div#admin-toolbar .depth-1').removeClass('collapsed');
// Switch link active class to corresponding menu item
var link_id = toolbar_id.replace('admin-toolbar', 'admin-link');
$('#admin-toolbar .depth-0 ul.links a').removeClass('active');
$(link_id).addClass('active');
}

// Switch link active class to corresponding menu item
var link_id = toolbar_id.replace('admin-toolbar', 'admin-link');
$('#admin-toolbar .depth-0 ul.links a').removeClass('active');
$(link_id).addClass('active');
}
Drupal.behaviors.admin_toolbar = function(context) {

// Primary menus
$('#admin-toolbar .depth-0 ul.links a:not(.processed)').each(function() {
Expand Down

0 comments on commit 9d64e5c

Please sign in to comment.