- on/off are preferred to bind/unbind, live/die, and delegate/undelegate in jQuery 1.7+
- they're likely on the road toward deprecation, so let's replace them now.
- fixed the height of the submit buttons to match the input box
- changed the cancel links into cancel buttons
- added the hover effect to the buttons when used in in_place_edit (e.g. admin/tags)
- cleaned up resize after hover: more efficient, totally browser-compatible (IE7-10, FF, Chrome tested!).
- cleaned up resize on hover: more efficient, fixed bug with neighbors that are bigger but only by a little.
- fixed bugs when moving off item with expanded context menu and then quickly back: oversized hover, flicker.
- cleaned up formatting, removed unneeded code, and added comments.
since only gallery.common.js is modified.
Now that I understand the problem and the fix, I'm not sure I can explain why it
*used* to work with older jQuery...
- removed fake attr settings (possible compatibility issue with newer jQuery)
- replaced with extra class
- fixed formatting
- still doesn't work: addClass works, but hasClass always returns false when function runs again
- jQuery 1.90
- jQuery UI 1.10
- Superfish 1.5.1 (minus all plugins)
- jQuery Form 3.26.0-2013.01.28
Deleted all other jQuery plugins for now.
- Reworked autocomplete to use the latest jQuery code.
- Deleted references to $.browser.msie, no longer supported
- Basic CSS support for autocomplete - lots more work needed there
against UTF-7, and create a $.gallery_autocomplete variant of jQuery's
autocomplete that expects the first line to be a <meta> tag and
discards it. More complete fix for #1871.
1) Prevent it from "bouncing" which happens when we queue up a lot of
open and close events. Stop any running animations before starting
new ones. This fixes#1340.
2) Prevent a bug that's not really visible to the user where we wind
up re-initializing a context menu over and over which results in us
binding tons of hover events. I don't think this causes any serious
damage, but it's probably not good.
The photo view page caches the dimensions of the full size and then
renders it in Javascript. But after rotation, those dimensions are no
longer valid. Create a new function on the items controller that
returns the appropriate dimensions, then add a hook on
$.gallery_replace_image and implement the hook on the photo view page
to have it make an async call to get the new dimensions.
Fixes ticket #1317
1) gallery.common.js was using the wrong class name
2) we need to mark the CSS as !important because it conflicts with
other background images. Note that this will replace the existing
background which may not be desireable.
problem arises because $(selector).css("margin-top) does not return a string
and therefore the replace function is undefined.
Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
and album covers in the context menu.
Notes:
- This requires context_menu() to have a CSS selector that refers to the
<img> that we're operating on, otherwise we don't know how to find the
thumbnail, etc.
- Create Menu_Element_Ajax_Link which has an ajax_handler attribute
that contains a snippet of JS that we're going to run when the ajax
call returns.
- Add $.gallery_replace_image in gallery.common.js
- Add lib/gallery.ajax.js which can be used to ajaxify any link, and have
ui.init.js in the themes call that on all .gAjaxLink elements.
and have some basic namespacing:
showMessage --> gallery_show_message
vAlign --> gallery_valign
showLoading --> gallery_show_loading
Convert gallery.show_full_size.js to be a jQuery function and give it a namespace:
show_full_size --> gallery_show_full_size