Commit 64135ad1 authored by RobLoach's avatar RobLoach
Browse files

Moved back to HEAD.

parent b539c0ce
// $Id$
jQuery UI x.x-x.x, xxxx-xx-xx
-----------------------------
jQuery UI 7.x-1.x, xxxx-xx-xx
-----------------------------
jQuery UI 6.x-1.x, xxxx-xx-xx
-----------------------------
#362509 by Rob Loach, Deciphered, sun and adrinux: New release system with jQuery UI 1.6.
#322731 by sun: Fixed improper use of t() in module install file.
#227687 by sun: Fixed improperly capitalized package name.
jQuery UI 6.x-1.2, 2008-06-23
-----------------------------
- Updated to work with jQuery UI 1.5 release.
- Uses jQuery Update's compression settings rather than its own.
jQuery UI 6.x-1.1, 2008-03-27
-----------------------------
- Initial release of jQuery UI.
- Works with jQuery UI 1.5b4.
// $Id$
CONTENTS OF THIS FILE
---------------------
* Introduction
* Installation
* API
INTRODUCTION
------------
Authors:
* Jeff Robbins (jjeff)
* Angela Byron (webchick)
* Addison Berry (add1sun)
This Module Made by Robots: http://www.lullabot.com
jQuery UI (http://ui.jquery.com/) is a set of cool widgets and effects that
developers can use to add some pizazz to their modules.
This module is more-or-less a utility module that should simply be required by
other modules that depend on jQuery UI being available. It doesn't do anything
on its own.
INSTALLATION
------------
1. Apply the patch from http://drupal.org/node/315100 .
2. Copy the jquery_ui module directory to your sites/all/modules directory.
3. Download the latest jQuery 1.7 development package from:
http://code.google.com/p/jquery-ui/downloads/list?can=3&q=1.7
4. Extract it as a sub-directory called 'jquery-ui' in the jquery_ui folder:
/sites/all/modules/jquery_ui/jquery-ui/
5. Enable the module at Administer >> Site building >> Modules.
API
---
Developers who wish to use jQuery UI effects in their modules need only make
the following changes:
1. In your module's .info file, add the following line:
dependencies[] = jquery_ui
This will force users to have the jQuery UI module installed before they can
enable your module.
2. In your module, call the following function:
drupal_add_plugin('ui.accordion');
See the contents of the jquery.ui-X.X sub-directory for a list of available
files that may be included, and see http://ui.jquery.com/docs for details on
how to use them. The required ui.core file is automatically included, as is
effects.core if you include any effects files.
Please move to HEAD.
; $Id$
name = jQuery UI
description = Provides the jQuery UI plug-in to other Drupal modules.
core = 7.x
files[] = jquery_ui.module
<?php
// $Id$
/**
* @file
* Provides the jQuery UI plug-in to other Drupal modules.
*
* Requires http://drupal.org/node/315100 .
*/
/**
* Implementation of hook_help().
*/
function jquery_ui_help($path, $arg) {
switch ($path) {
case 'admin/help#jquery_ui':
$output = '<p>' . t('jQuery UI provides abstractions for low-level interaction and animation, advanced effects and high-level, themeable widgets, built on top of the jQuery JavaScript Library, that you can use to build highly interactive web applications.') . '</p>';
$output .= <<<EOT
<div id="accordion">
<h3><a href="#">Section 1</a></h3>
<div>
<p>
Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer
ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit
amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut
odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.
</p>
</div>
<h3><a href="#">Section 2</a></h3>
<div>
<p>
Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet
purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor
velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In
suscipit faucibus urna.
</p>
</div>
<h3><a href="#">Section 3</a></h3>
<div>
<p>
Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis.
Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero
ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis
lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui.
</p>
<ul>
<li>List item one</li>
<li>List item two</li>
<li>List item three</li>
</ul>
</div>
<h3><a href="#">Section 4</a></h3>
<div>
<p>
Cras dictum. Pellentesque habitant morbi tristique senectus et netus
et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in
faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia
mauris vel est.
</p>
<p>
Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus.
Class aptent taciti sociosqu ad litora torquent per conubia nostra, per
inceptos himenaeos.
</p>
</div>
</div>
EOT;
if (!isset($added)) {
drupal_add_plugin('ui.accordion');
drupal_add_js('jQuery(document).ready(function() { jQuery("#accordion").accordion(); });', 'inline');
$added = TRUE;
}
return $output;
}
}
/**
* Implementation of hook_js_plugin().
*/
function jquery_ui_js_plugin() {
$version = jquery_ui_get_version();
$path = drupal_get_path('module', 'jquery_ui').'/jquery-ui';
if (!empty($version)) {
$files = file_scan_directory($path .'/ui', '/.js/', array('recurse' => FALSE));
foreach ($files as $file) {
$plugins[$file->name] = array(
'title' => $file->name,
'project_page' => 'http://jqueryui.com',
'version' => $version,
'download' => 'http://code.google.com/p/jquery-ui/downloads/list?can=3&q=1.7+tests',
'js' => array(
$file->filepath,
),
'plugin' => array(
'ui.core',
),
);
}
}
$plugins['ui.core'] = array(
'title' => 'jQuery UI',
'project_page' => 'http://jqueryui.com',
'version' => $version,
'download' => 'http://code.google.com/p/jquery-ui/downloads/list?can=3&q=1.7+tests',
'js' => array(
// Items that are just strings are interpreted as stright files.
$path . '/ui/ui.core.js' => array('weight' => -100),
),
'css' => array(
$path . '/themes/base/ui.all.css',
),
);
return $plugins;
}
/**
* Gets the current jQuery UI version.
*/
function jquery_ui_get_version() {
static $version = NULL;
if (!isset($version)) {
$path = drupal_get_path('module', 'jquery_ui') .'/jquery-ui/version.txt';
if (file_exists($path)) {
$version = file_get_contents($path);
}
}
return $version;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment