Skip to main content

JQueryUI ready to be included in portal_javascript for Plone 4 by Makina Corpus

Project description

Introduction

Integration of jqueryui in Plone 4.

This version includes jqueryui 1.8.16 without the tabs plugin.

It is different from collective.jqueryui in many ways:

  • no skin dirs (js and css are in resource dirs)

  • no all the bunch of files and documentations from original jqueryui

  • this one is minified

  • just add all jqueryui to portal_js, and default css to portal_css (if you apply the profile)

To have an example of the current integration you can check @@example.jqueryui page. You must activate example within portal_properties.

include plugins and optimizations

By default this addon register all plugins and activate all of them except tabs. So ui.tabs is registred but not activated.

Because jqueryui is big on both javascripts and css you may want to optimize the configuration of your site or your addon which depends on this one.

So you can activate/unactivate plugins using registry profile or the jqueryui controlpanel.

Using registry.xml, you can activate only what you want:

<registry>
    <records interface="collective.js.jqueryui.controlpanel.IJQueryUIPlugins">
      <value key="ui_draggable">True</value>
      <value key="ui_droppable">True</value>
    </records>
</registry>

In the case of a policy you can do a full configuration:

<registry>
    <records interface="collective.js.jqueryui.controlpanel.IJQueryUIPlugins">
      <value key="ui_core">True</value>
      <value key="ui_widget">True</value>
      <value key="ui_mouse">True</value>
      <value key="ui_position">True</value>
      <value key="ui_draggable">True</value>
      <value key="ui_droppable">True</value>
      <value key="ui_resizable">True</value>
      <value key="ui_selectable">True</value>
      <value key="ui_sortable">True</value>
      <value key="ui_accordion">False</value>
      <value key="ui_autocomplete">False</value>
      <value key="ui_button">False</value>
      <value key="ui_dialog">False</value>
      <value key="ui_slider">False</value>
      <value key="ui_tabs">False</value>
      <value key="ui_datepicker">False</value>
      <value key="ui_progressbar">False</value>
      <value key="effects_core">False</value>
      <value key="effects_blind">False</value>
      <value key="effects_bounce">False</value>
      <value key="effects_clip">False</value>
      <value key="effects_drop">False</value>
      <value key="effects_explode">False</value>
      <value key="effects_fade">False</value>
      <value key="effects_fold">False</value>
      <value key="effects_highlight">False</value>
      <value key="effects_pulsate">False</value>
      <value key="effects_scale">False</value>
      <value key="effects_shake">False</value>
      <value key="effects_slide">False</value>
      <value key="effects_transfer">False</value>
    </records>
    <records interface="collective.js.jqueryui.controlpanel.IJQueryUICSS">
      <value key="css">False</value>
      <value key="patch">False</value>
    </records>
</registry>

Using the control panel, you can select plugins you want. If you unselect a plugin it will be unactivated (but not its dependencies)

Using python, you just have to use plone.registry api:

from zope.component import getUtility
from plone.registry.interfaces import IRegistry
from collective.js.jqueryui.config import DEPS
from collective.js.jqueryui.interfaces import IJQueryUICSS, IJQueryUIPlugins
#is plone.app.registry
registry = getUtility(IRegistry)
proxy = registry.forInterface(IJQueryUIPlugins)
setattr(proxy, 'ui_draggable', True)
setattr(proxy, 'ui_droppable', True)

Credits and contributions

makinacom

Contributors

  • Vincent Fretin [vincentfretin]

  • Hanno Schlichting [hanno]

  • Nathan Vangheem [vangheem]

  • Marcos F. Romero [marcosfromero]

  • Kees Hink [khink]

  • Robert Niederreiter [rnix]

  • JeanMichel FRANCOIS [toutpt]

Notes

The package contains now only one profile. It doesn’t replace the jQuery version like the previous versions did.

WARNINGS

JQueryUI > 1.8.6 is supposed to be compatible with jQuery 1.3.2. At the moment you should prefer to use the 1.7.X version of jqueryui (same package exists for 1.7 branch)

How to upgrade this package

  • Go to http://jqueryui.com/download

  • Unselect the tabs plugins which conflict with jquerytools

  • Download jquery-ui-1.8.X.custom.zip

  • Go to the URL specified in the collective/js/jqueryui/css/sunburst/jquery-ui-1.8.12.custom.css file to pre-load current theme settings.

  • Click on “Download theme” in the left-side “Theme rollover”.

  • Click on “Advanced Theme Settings” to expand options and type “sunburst” in “Theme Folder Name” field.

  • Create theme directory

  • Download jquery-ui-1.8.X.custom.zip

Commands to execute:

PKG="/home/toutpt/workspace/collective.js.jqueryui/collective/js/jqueryui"
VERSION="1.8.13"
PREV="1.8.12"
cd /tmp/
unzip ~/jquery-ui-$VERSION.custom.zip
rm $PKG/jquery-ui-$PREV.custom.min.js
rm $PKG/jquery-ui-$PREV.custom.js
cp js/jquery-ui-$VERSION.custom.min.js $PKG/jquery-ui-$VERSION.custom.js
cp js/jquery-ui-$VERSION.custom.min.js $PKG/jquery-ui-$VERSION.custom.min.js
cp development-bundle/ui/i18n/jquery-ui-i18n.js $PKG/jquery-ui-i18n.js

cd themes
unzip ~/jquery-ui-$VERSION.custom.zip
rm $PKG/css/sunburst/images/*
rm $PKG/css/sunburst/jqueryui.css
cp css/sunburst/jquery-ui-$VERSION.custom.css $PKG/css/sunburst/jqueryui.css
cp css/sunburst/images/* $PKG/css/sunburst/images/
  • update version in README.txt and configure.zcml and config.py

  • increment the profile version in metadata.xml

  • add ugprade step:

    <genericsetup:upgradeStep
        source="1895"
        destination="1896"
        title="Upgrade jqueryui to 1.8.16"
        description=""
        profile="collective.js.jqueryui:default"
        handler=".upgrades.cook_resources"
    />

Changelog

1.8.16.2 (2011-12-15)

  • Add a controlpanel using plone.app.registry to select plugins and optimize your site. Addons using collective.js.jqueryui should update their install to set which plugins they need.

1.8.16.1 (2011-12-02)

  • Upgrade JQueryUI to 1.8.16 [toutpt]

1.8.13.1 (2011-05-23)

  • Update JQueryUI to 1.8.13. Rename css from jquery-ui-1.8.12.custom.css to jqueryui.css to make it compatible with collective.jqueryuithememanager update sunburst theme to include font size = 0.9em [toutpt]

1.8.12.3 (unreleased)

  • add a config file with VERSION. [toutpt]

  • make example.jqueryui view activable (unactivated by default) [toutpt]

  • only include datepicker viewlet code if jqueryui is enabled for the content item [vangheem]

1.8.12.2 (2011-04-25)

  • Add jquery-ui-1.8.12.custom.js. fixed issue #1 [toutpt]

1.8.12.1 (2011-04-24)

  • Update JQueryUI to 1.8.12 [toutpt]

1.8.9.2 (2011-02-21)

  • Add include condition to JQueryUI resources. Can be configured throw portal_properties. [toutpt]

  • Add applyPrefix option to main css. Fix production mode issue with caching allowed. [toutpt]

1.8.9.1 (2011-01-21)

  • update to jqueryui 1.8.9. Include plone4-patch.css in default profile. Refactor css&theme browser resources to not have to update url in the css [toutpt marcosfromero]

  • remove browser layer on jquery-ui.min.js and jquery.ui.all.css. Let anyone want to use it has browser:resource if wanted [toutpt]

1.8.8.1 (2011-01-18)

  • Update jqueryui to 1.8.8 [toutpt]

1.8.7.2 (2011-01-08)

  • Add jquery-ui.min.js as browser resource: ++resource++jquery-ui.min.js This one do not need any install [toutpt]

  • Update profile to use jquery-ui.min.js in portal_javascript and add migrations [toutpt]

1.8.7.1 (2010-12-10)

  • Updated to jqueryui 1.8.7 [toutpt]

  • Disable compression of jquery-ui-i18n.js. Compression was broken, resulting in Chinese characters in the calendar popup. [khink]

1.8.6.1 (2010-12-07)

  • Updated to jqueryui 1.8.6 [toutpt]

1.8.5.2 (2010-11-23)

  • Register browser components for a package-specific browser layer, so they don’t leak to sites without this product installed. You will need to run the upgrade step from the Add-ons control panel if upgrading this product on a site where it is already installed. [davisagli]

1.8.5.1 (2010-10-21)

  • Updated to jqueryui 1.8.5. [vincentfretin]

  • Fixed L10nDatepicker to work without a request.LANGUAGE attribute. [hannosch]

  • Add icons to @@example.jqueryui view [toutpt]

  • Replaced original “smoothness” theme with a new “plone4” one more related to “sunburst” that comes with Plone 4. [marcosfromero]

1.8.4.1 (2010-08-11)

  • Update jqueryui to 1.8.4 [toutpt]

1.8.2.2 (2010-07-31)

  • Fixed the css to use images from the directory resources. [vincentfretin]

  • Added @@example.jqueryui page. [toutpt]

1.8.2.1 (2010-07-27)

  • Since jquery-ui-i18n.js contains symbols other than utf-8 it should be compressed with safe-encode type. [spliter]

  • Update to jqueryui 1.8.2 [toutpt]

1.8rc3 (2010-04-30)

  • Added jquery-ui-i18n.js which contains all translations for datepicker plugin. [vincentfretin]

  • Removed completly the withjqtoolsplone3 and withjqtools profiles. We don’t depend on collective.js.jquery anymore. So the jQuery of Plone 4 is kept. The defaut profile now install jqueryui 1.8 without the tabs plugin which conflicts with plone.app.jquerytools. This version only works on Plone 4 because Plone 4 ships with JQuery 1.4+ and jQuery 1.8 requires jQuery 1.4+. [vincentfretin]

1.7.2.7 (2010-03-16)

  • withjqtools profile doesn’t apply the collective.js.jquery profile anymore. So you can use it with Plone 3.3/4, it will not replace the jQuery version included in Plone. [vincentfretin]

  • Add withjqtoolsplone3 profile which is the same as withjqtools but installs the collective.js.jquery profile so the jQuery library is replaced by a newer one. Use this profile only on Plone 3.2 with plone.app.jquerytools. [vincentfretin]

1.7.2.6 (2010-02-02)

  • Add profile withjqtools, a profile registering the jquery UI bundle without the tabs plugin. This plugin conflicts with the same plugin from jquery tools. Note that plone.app.jquerytools must be availabe in your system, since it’s profile is applied as dependency. It’s not added to the setup dependencies of this package. [rnix]

  • Add jquery-ui-1.7.2.jq-tools-compat.js [rnix]

1.7.2.5 (2009-08-26)

  • Include collective.js.jquery configure.zcml [vincentfretin]

1.7.2.4 (2009-08-25)

  • Add dependency to collective.js.jquery in the default profile

1.7.2.3 (2009-08-17)

  • Update documentation: add note for developer about Plone3.3

  • Remove all .* files include in the last release (MacOSX feature)

1.7.2.2 (2009-06-25)

  • Fixed images not being able to be loaded from css problem.

1.7.2.1 (2009-06-10)

  • Initial release with jquery-ui 1.7.2 (need jquery 1.3.x)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

collective.js.jqueryui-1.8.16.2.tar.gz (207.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page