Commit Graph

372 Commits

Author SHA1 Message Date
shadlaws
a140303468 #2061 - Remove Uploadify from add_photo_form/add_photo_form_completed events.
- Added code around event calls in uploader to add Uploadify-specific JS to update the inputs.
- Removed Uploadify JS from tag_event.  Now it's uploader-agnostic.
- Refactored tag_event autocomplete code (no functional changes).
2013-03-13 16:18:12 +01:00
shadlaws
b43349f4de #2048 - Remove unneeded jquery.autocomplete.css/js inclusions.
- removed autocomplete.css/js calls in server_add, tag, and g2_import.
- revised xss_data.txt golden file (line number changes only).
2013-03-10 22:08:16 +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
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
9396342250 Drop the requirement to have the install() function set the module
version.  It's redundant.  Fixes #1985.
2013-01-31 19:55:53 -05:00
Bharat Mediratta
1e4d75c120 Improve the display context API to return a "siblings_callback" field
containing a callback that returns all the siblings.  Fixes #1975.
2013-01-30 12:10:18 -05:00
shadlaws
48bd19808c #1956 - Escape LIKE queries (for _ and %).
In MySQL queries, _ and % characters are treated as wildcards (similar to ? and *, respectively).
- Added escape_for_like function to MY_Database.php
- Added unit test to Database_Test
- Corrected the five unescaped instances in the code using this function.
2013-01-25 08:47:29 +01:00
Bharat Mediratta
49f6ce2d94 gallery.menalto.com -> galleryproject.org
codex.gallery2.org -> codex.galleryproject.org

Fixes #1957.
2013-01-22 18:39:24 -05:00
Bharat Mediratta
d45a737779 Update copyright to 2013. Fixes #1953. 2013-01-21 01:22:01 -05:00
Mike Miller
f92982c59c Tags by name (includes a G2 mapping) 2013-01-13 05:36:50 +02:00
Bharat Mediratta
e81bb34327 Fix the delete function on item_tags and tag_items collections to
remove all tags from an item, or remove all items from a tag as
appropriate (ie, empty the collection).  Fixes #1902.
2012-10-08 14:45:10 -07:00
Bharat Mediratta
a98f7577ba Avoid chaining after .gallery_autocomplete() - there are reports that
it doesn't work with later versions of jQuery.  Fixes #1889.
2012-07-21 16:16:36 -07: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
Bharat Mediratta
891652b233 Send back form errors wrapped in JSON. Fixes #1867. 2012-05-15 16:00:46 -07:00
Bharat Mediratta
608d8f6636 Fix #1843. 2012-04-30 15:20:40 -07:00
Bharat Mediratta
bf2bb3e1ea Update copyright to 2012. #1822 2012-02-27 09:48:23 -08:00
Bharat Mediratta
ce43f29e2c Refactor the display context code a bit:
1) Move the display context code into the controller themselves so that it's
   more logically a continuation callback from the original controller
   rendering code.
2) Simplify the display context set/get code and put it in the item helper,
   it's just a couple of lines of code now.
3) Add more descriptive breadcrumb strings
2011-08-27 11:18:07 -07:00
Tim Almdal
c92d34a86b Merge branch 'displayContext' into display_context_compressed
Conflicts:
	modules/gallery/controllers/movies.php
	modules/gallery/controllers/photos.php
	modules/tag/controllers/tag.php
2011-08-11 22:11:24 -07:00
Tim Almdal
933a34986d Patch for tickets #1428 and #1760
Create the concept of a Photo_Display_Context.  If the user is browsing a dynamic album (i.e. tags) and chooses to
look at an image in that album.  The display of the image happens correctly, but the 'next' and 'previous' buttons
are no longer consistent.  When one of these is clicked, Gallery  will open the adjacent image in the actuall album,
not the dynamic album.
2011-08-11 22:04:21 -07:00
Bharat Mediratta
67719c6f61 Simplification of 59b04b897b for #1764:
- Breadcrumb::build_from_item becomes Breadcrumb::array_from_item_parents
- Eliminate Breadcrumb::$id -- it's no longer necessary
- Fold Breadcrumb::generate_show_query_strings into Breadcrumb::array_from_item_parents
- Create Breadcrumb::set_first() and Breadcrumb::set_last()
- Breadcrumb::build_from_list goes away, we just use arrays for this
- Change Search_Controller and Tag_Controller to just create an array
  of Breadcrumb instances with the first/last marked appropriately
- Breadcrumb_Test loses a bunch of complexity.
2011-08-11 22:04:03 -07:00
Tim Almdal
a246b6fe45 Initial commit of a patch for Ticket #1764. as discussed here: https://github.com/gallery/gallery3/pull/58/files#r72949.
Create a Breadcrumb library which has two static methods for_item (which takes a an item and builds the entire
breadcrumb for the item) or build (which takes a variable number of Breadcrumb elements and creates a breadcrumb
based on the specified elements).

Used tag->url() to build the tag album url. Escaped the query string for the search. Tightened up the breadcrumb code
 in page.html.php.

When adding the show query parameter, we can't blindly concatenate using the ? separator.  We have to check that we
use a & if a query parameter already exists.
2011-08-11 22:04:02 -07:00
Bharat Mediratta
da523de777 Simplification of 59b04b897b for #1764:
- Breadcrumb::build_from_item becomes Breadcrumb::array_from_item_parents
- Eliminate Breadcrumb::$id -- it's no longer necessary
- Fold Breadcrumb::generate_show_query_strings into Breadcrumb::array_from_item_parents
- Create Breadcrumb::set_first() and Breadcrumb::set_last()
- Breadcrumb::build_from_list goes away, we just use arrays for this
- Change Search_Controller and Tag_Controller to just create an array
  of Breadcrumb instances with the first/last marked appropriately
- Breadcrumb_Test loses a bunch of complexity.
2011-08-08 21:29:19 -07:00
Tim Almdal
dd0b622ae9 Initial commit of a patch for Ticket #1764. as discussed here: https://github.com/gallery/gallery3/pull/58/files#r72949.
Create a Breadcrumb library which has two static methods for_item (which takes a an item and builds the entire
breadcrumb for the item) or build (which takes a variable number of Breadcrumb elements and creates a breadcrumb
based on the specified elements).

Used tag->url() to build the tag album url. Escaped the query string for the search. Tightened up the breadcrumb code
 in page.html.php.

When adding the show query parameter, we can't blindly concatenate using the ? separator.  We have to check that we
use a & if a query parameter already exists.
2011-08-07 13:41:47 -07:00
Bharat Mediratta
5e6a6d58c2 Follow on to c101151616 -- delete all
tags in setup so that we have a blank slate, otherwise create_tag()
will fail because sometimes there'll be other tags in the system. #1628
2011-05-24 20:49:09 -07:00
Tim Almdal
4e20e71d03 Merge branch 'master' of git@github.com:gallery/gallery3 2011-04-27 19:30:00 -07:00
Bharat Mediratta
f8493a1df2 Revert my two "fixes" on top of Andy's tag combine change. Leave Tag_Model::items() calling
Item_Model::viewable() because it's too dangerous to separate that out, and it's fragile to
rely on only admins doing tag combines.

Revert "Undo the change made in 5ce8563632 because it messes up tag counts"
- This reverts commit 67d2e8081c.
Revert "Move the calculation for item_related_update ahead of the duplicate"
- This reverts commit 5ce8563632.
2011-04-24 08:59:33 -07:00
Tim Almdal
7f48671186 For ticket #1701. Remove unused variable. 2011-04-24 07:15:30 -07:00
Tim Almdal
41f90e669f Clarify the meaning of variable names. 2011-04-24 07:04:11 -07:00
Tim Almdal
c01a0eac9a Allow the tag rename function to split a tag into multiple tags if a comma is used to delinate the seperate tags. 2011-04-23 20:30:30 -07:00
Bharat Mediratta
67d2e8081c Undo the change made in 5ce8563632 because it messes up tag counts
(and makes the test fail-- I should have run that!).

Also, use Tag_Model::items() in save() to avoid code duplication.  Follow-on for #1628.
2011-04-23 16:12:10 -07:00
Bharat Mediratta
c07af35a19 Oops, fix broken codex urls. For #1698. 2011-04-23 14:53:39 -07:00
Bharat Mediratta
ba20d5a500 Oops, this is the rest of the modules and themes for #1696 and #1698. 2011-04-23 14:46:07 -07:00
Bharat Mediratta
5ce8563632 Move the calculation for item_related_update ahead of the duplicate
tag merge so that we don't trigger an item_related_update on items
who semantically have the same tag after the merge.  Follow-on for #1628.
2011-04-23 13:20:22 -07:00
Andy Lindeman
c101151616 Allow tags to be merged by renaming
* Fixes #1628
2011-04-23 12:04:43 -04:00
Tim Almdal
0ec819d381 Insure that the tag count to display is always greater than 0. Refixes #1649. 2011-04-23 07:46:38 -07:00
Tim Almdal
9dd91b55b0 Insure that the tag count to display is always greater than 1. Refixes #1649. 2011-04-23 07:42:28 -07:00
Tim Almdal
b07bc1af08 Allow the administrator to set the number of tags to display in the cloud via the advanced settings. Fixes ticket #1649. 2011-04-22 16:15:56 -07:00
Bharat Mediratta
72149b8c68 Urlencode the tag name so that our html is compliant. Fixes #1672. 2011-04-22 08:11:56 -07:00
Bharat Mediratta
8cf066b838 Use Tag_Model::url() instead of hand creating tag urls, since the API
changed and that broke.  Fixe #1680.
2011-04-21 15:43:48 -07:00
Bharat Mediratta
5b927a7083 Guard against registered users removing tags from items they don't own. Fixes #1671. 2011-04-04 17:45:09 -07:00
Joe7
074f801acd Fix against Ticket #1666 2011-04-02 18:52:54 +02:00
Bharat Mediratta
fa6f233603 Centralize our encoding code into a new helpers and use
mb_convert_encoding if possible.  Build on the work in
c791ae96d5 by momo-i.  Fixes #1660.
2011-03-27 11:31:34 -07:00
Bharat Mediratta
451ef39d58 PATH_INFO mangles apostrophe (and other symbols, I'm sure) into a
question mark, so any tags containing an apostrophe won't display
their contents.

Take the simple fix here and change the tag urls to also contain the
tag id, which avoids having to add a slug for the tag and all kinds of
validation code.

Fixes #1636.
2011-03-05 16:51:20 -08:00
Bharat Mediratta
423daa52d5 Update copyright to 2011. 2011-01-21 23:01:06 -08:00
Bharat Mediratta
b78fd8eeff Create a hidden anchor containing the tag cloud autocomplete url. This way validates. Fix for #1577. 2011-01-18 21:25:58 -08:00
Bharat Mediratta
c060179916 Revert "Temporarily removed ref tag to get the page validated. (Was also pointing at a rather semi-finished looking page)"
This was breaking the tag autocomplete code, which depends on this value.

This reverts commit 5e8d92552b.
2011-01-18 21:22:24 -08:00
Bharat Mediratta
02f30b91bf Follow on to 966dee8628 for #1586 --
don't try to update the tag item count if we didn't change any items
with this change (ie: a tag rename).  In that case, we haven't loaded
the related items so we don't have any idea what the count is going to
be.
2011-01-15 14:20:26 -08:00
Bharat Mediratta
ee13b934f4 Fix all the head() and admin_head() theme callbacks to return the
results of the $theme->css() and $theme->script() calls.  This handles
the case where combining scripts/css returns HTML instead of putting
it in the queue for combination.  Fixes #1611.
2011-01-15 13:14:43 -08:00
Joe7
fca6d1254a Fixed offset sanitizing code - Fixes Ticket#1593 2011-01-09 18:48:24 -08:00
Bharat Mediratta
e8bbf53708 Merge branch 'Ticket#1577' of git://github.com/Joe7/gallery3 2011-01-08 17:09:32 -08:00