Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Activate dynamic tooltips to reposition it, so that they are always visi... #6

Merged
merged 1 commit into from
Feb 10, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/HISTORY.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Changelog
1.1.3 (unreleased)
------------------

- Nothing changed yet.
- Activate dynamic tooltips to reposition it, so that they are always visible
[elio.schmutz]


1.1.2 (2013-10-21)
Expand Down
4 changes: 2 additions & 2 deletions ftw/tooltip/browser/tooltip_template.js.pt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function ShowTooltip(item){
}
}, customconfig);
if (!$this.data('tooltip')){
$this.tooltip(settings);
$this.tooltip(settings).dynamic({right: {offset: [0, $this.width()]}});
$this.trigger('mouseover')
}
// Manually remove title attribute (live event allways readds the title attr)
Expand All @@ -52,4 +52,4 @@ $(function(){
});
});
</tal:def>
<div tal:replace="structure python: '//]]>'" />
<div tal:replace="structure python: '//]]>'" />
1 change: 1 addition & 0 deletions ftw/tooltip/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<i18n:registerTranslations directory="locales" />

<include package=".browser" />
<include package=".upgrades" />

<genericsetup:registerProfile
name="default"
Expand Down
1 change: 1 addition & 0 deletions ftw/tooltip/profiles/default/jsregistry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
<javascript cacheable="False" compression="safe" cookable="False" expression=""
enabled="True" id="@@dynamic_tooltips.js" inline="True"
/>
<javascript enabled="True" id="++resource++plone.app.jquerytools.plugins.js" />
</object>
2 changes: 1 addition & 1 deletion ftw/tooltip/profiles/default/metadata.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0"?>
<metadata>
<version>1.0</version>
<version>1131</version>
</metadata>
Empty file.
18 changes: 18 additions & 0 deletions ftw/tooltip/upgrades/configure.zcml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
xmlns:upgrade-step="http://namespaces.zope.org/ftw.upgrade"
i18n_domain="ftw.tooltip">

<include package="ftw.upgrade" file="meta.zcml" />

<!-- 1 -> 1131-->
<upgrade-step:importProfile
title="Activate dynamic tooltips"
profile="ftw.tooltip:default"
source="1.0"
destination="1131"
directory="profiles/1131"
/>

</configure>
4 changes: 4 additions & 0 deletions ftw/tooltip/upgrades/profiles/1131/jsregistry.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0"?>
<object name="portal_javascripts" meta_type="JavaScripts Registry">
<javascript enabled="True" id="++resource++plone.app.jquerytools.plugins.js" />
</object>
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@

install_requires=[
'setuptools',
'ftw.upgrade',

# Zope
'Zope2',
Expand Down