Commit Graph

53 Commits

Author SHA1 Message Date
shadlaws
2e94edab53 #2053 - Change all .bind() to .on() for jQuery future-proofing.
- 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.
2013-03-11 17:16:20 +01:00
shadlaws
73139982c7 #2032 - Fix short form submit/cancel button formatting.
- 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)
2013-03-02 23:00:02 +01:00
shadlaws
ef2ca6edb5 #2018 follow-on and #2023 - Fixed issues with thumb hover effects.
- 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.
2013-02-28 17:10:48 +01:00
shadlaws
556d0d40eb Context menus are fixed! This should be fully compatible with older themes
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...
2013-02-18 16:15:49 +01:00
Bharat Mediratta
d632ef3e50 Fix up autocomplete for admin_server_add - found and fixed some bugs
in gallery_autocomplete when "multiple" isn't set.  Fixed some
harmless syntax issues that js2-mode helpfully pointed out.
2013-02-17 00:23:50 -05:00
shadlaws
a8b571cc97 Context menu dialog box problem: better, but still not working.
- 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
2013-02-16 12:12:16 +01:00
Bharat Mediratta
0494244e80 Super first pass:
- 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
2013-02-03 18:55:23 -05:00
Bharat Mediratta
a9be0691d9 Create an ajax response framework that inserts <meta> tags to guard
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.
2012-05-19 11:31:25 -07:00
Ian
b07b4759c4 added if (nh < 1) { var nh = 0; }
to start album upper border not as nh = -n
2011-11-05 12:50:19 +01:00
Bharat Mediratta
7eabf6c1c2 Use Math.round() instead of Number() to convert floating point numbers
to integer.  Fixes overflow probelm that causes #1490.  Thanks to
nkinkade for the fix.
2011-01-11 21:21:59 -08:00
Bharat Mediratta
81327641cd Fix two bugs with the context menu:
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.
2010-09-11 00:27:47 -07:00
Bharat Mediratta
b35886c0fc Refactor $.fn.gallery_context_menu() to store some variables instead
of using CSS selector lookups for every operation.  I assume (but have
not verified) that this is more efficient.
2010-09-11 00:08:38 -07:00
Bharat Mediratta
6211ed69d7 Vertically realign thumbnails after rotation so that they stay
centered.  Partial fix for #1354.
2010-09-09 21:25:23 -07:00
Bharat Mediratta
32878ebfdc Replace the hook function hack I introduced in
cbba45fffc with a namespaced jQuery
custom event.  This is way more portable.
2010-09-09 21:04:18 -07:00
Bharat Mediratta
c51b6ab38d Fix full size dimensions after rotating an image on the photo view page.
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
2010-09-04 15:54:07 -07:00
ckieffer
b7cc677c3d Indentation fixes. 2010-07-11 12:07:50 -06:00
Bharat Mediratta
9b4d9d1d46 Fix two issues with the "loading" overlay:
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.
2010-06-20 16:51:06 -07:00
Bharat Mediratta
25f936e1ed Show context menus for movie items. Fix for ticket #960. 2009-12-31 18:13:42 -08:00
Chad Kieffer
2935816fb3 Swap sides for rounded corners for short forms when RTL language is in use. 2009-11-17 14:07:21 -07:00
Chad Kieffer
ed1bdd7b93 White-space cleanup. 2009-11-08 18:09:51 -07:00
Chad Kieffer
2d5b65a419 Use jQuery fadeIn() for message display effect, it fades bg icon and color at the same time. 2009-10-23 05:39:24 -07:00
Chad Kieffer
c9ccc24618 Moved the short_form init function to gallery.common and made it jQuery plugin. Dropped gallery.form.js. Applied short forms to server_add and tag admin pages. Added tag.css to admin views. Added .g-wide {}. 2009-10-18 10:32:08 -06:00
Chad Kieffer
387adbbc9d Added comments, minor white-space fixes. 2009-10-17 16:02:18 -06:00
Chad Kieffer
d581bbbd1e Renamed more CSS selectors from gName to g-name. 2009-10-04 15:53:00 -06:00
Chad Kieffer
3e6ba7acc3 Renamed most, if not all css selectors from gName to g-name. Moved a few shared images from wind to lib. Deleted unused images in the admin_wind. This will likely break a few ajax features. 2009-10-04 00:27:22 -06:00
Chad Kieffer
e1e8904e4a Convert gDialog and gCancel over to g-dialog and g-cancel. Refactor CSS id's and classes in the login/reset password dialog. 2009-09-30 22:49:36 -06:00
Chad Kieffer
6cd8679dec Set .gItem height dynamically based on the tallest item in the grid. Addresses ticket #757 2009-09-27 22:49:46 -06:00
Chad Kieffer
d1792ab3e0 Clean up hover effect, move some CSS out of ui.init.js to screen.css. Fix context_menu, it wasn't closing. Fix context_menu in IE7 by putting a bg color on the menu 2009-09-26 15:44:34 -06:00
Chad Kieffer
7f066b34c9 Apply thumbnail hover effect to context menu's list items, which holds the menu open in ie6 and ie7 now. Items which appear above the meta data list underneath flicker, though. I'll fix later. 2009-09-22 22:31:05 -06:00
Chad Kieffer
68f3dab7f2 Don't try to initialize contextual menu unless it has items 2009-09-21 21:56:27 -06:00
Chad Kieffer
94b5749d46 Convert tabs to spaces. 2009-08-28 13:42:45 -06:00
Chad Kieffer
2264a80368 Merge branch 'master' of git@github.com:gallery/gallery3 2009-08-23 15:00:00 -06:00
Chad Kieffer
457708311a Cut down on jittering of the context menu on open on resize view. 2009-08-23 14:58:26 -06:00
Tim Almdal
256822a1e8 Refactor the _auto_fit method in gallery.show_full_size to a common method in gallery.common.js
Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-08-21 03:56:38 +08:00
Tim Almdal
b989383fe6 Modified the conversion of the margin-top and margin-bottom css values. The
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>
2009-08-20 07:11:13 +08:00
Chad Kieffer
65e97fda48 Move context menu to gallery.common 2009-08-11 00:40:14 -06:00
Chad Kieffer
3e3bbd5d2e Merge branch 'master' of git@github.com:bharat/gallery3 2009-08-11 00:15:04 -06:00
Bharat Mediratta
cbba45fffc Create the concept of an "ajax link" and use it for thumbnail rotation
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.
2009-08-10 23:07:50 -07:00
Chad Kieffer
e3a58b76c1 Return .each() to work with more than an individual photo. 2009-08-10 23:11:31 -06:00
Bharat Mediratta
790545ac97 Add missing semicolons. 2009-08-10 10:49:50 -07:00
Chad Kieffer
24e29b0b68 Rename fit_image to fit_photo for consistency. 2009-08-09 23:10:02 -06:00
Chad Kieffer
69b7b1803a Move hover effect to a function. 2009-08-09 23:08:18 -06:00
Chad Kieffer
a961211f56 Move the get photo filter out to it's own function for re-use. Docblock cleanup. 2009-08-09 22:51:21 -06:00
Chad Kieffer
de00a4ac39 Explicitly use gValign class rather than first child. 2009-08-09 11:40:39 -06:00
Chad Kieffer
2f4c4a3f70 Rename resizeImage gallery_fit_image to follow convention. Move the function to gallery.common.js. 2009-08-09 11:31:31 -06:00
Bharat Mediratta
e4eec71efa Rename gallery.common.js functions to conform to our naming standards
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
2009-08-07 11:53:40 -07:00
Bharat Mediratta
a5137f5972 Remove boilerplate comment. 2009-08-07 11:17:07 -07:00
Tim Almdal
30b77b5714 Forgot this file on the gallery dialog commit
Signed-off-by: Bharat Mediratta <bharat@menalto.com>
2009-08-08 02:08:34 +08:00
Tim Almdal
a302a9c3fa Refactor the gallery dialog into a jQuery widget
Signed-off-by: Bharat Mediratta <bharat@menalto.com>
2009-08-08 02:08:28 +08:00
Tim Almdal
0a2da7731a Simplify getViewportSize function to use the jQuery height and width functions 2009-07-31 05:27:53 -07:00