Commit Graph

336 Commits

Author SHA1 Message Date
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
Joe7
5e8d92552b Temporarily removed ref tag to get the page validated. (Was also pointing at a rather semi-finished looking page) 2011-01-08 18:44:43 +01:00
Bharat Mediratta
966dee8628 Move tag count management into the model. Fixes #1586. 2011-01-07 23:38:08 -08:00
Bharat Mediratta
4756db435c Minor style cleanup 2011-01-07 20:09:27 -08:00
Chad Kieffer
06d94065ce Updates per Bharat's pull request review. Renamed info_block_metadata event to info_block_get_metadata. 2011-01-06 21:03:19 -07:00
Chad Kieffer
2e5d4a59b1 Display an item's tags in the info block. 2011-01-04 19:52:25 -07:00
Joe7
f364e8a96b Using array support introduced in 8295201adf948ea35f21f75801b7a8bf36c27569 2011-01-03 11:38:21 -08:00
Bharat Mediratta
3e117fc2b4 Remove a stray comma at the end of a JSON array which was breakig IE. Fixes #1561. 2010-12-29 11:33:08 -08:00
Bharat Mediratta
b42fcb9cda Use db::expr instead of "new Database_Expression". Resolves #1560. 2010-12-28 23:10:05 -08:00
Bharat Mediratta
add586bbb1 Create a task to clean up tag counts and delete tag with no associated
items.  Fixes #1488.
2010-11-14 15:53:30 -08:00
Bharat Mediratta
d49a6dcc99 Create a new task to resync tag task counts and delete tags that have
no associated items.
2010-11-14 15:45:30 -08:00
Bharat Mediratta
7efa9a5b87 Fix two issues with item deletion:
1) We're compacting tags on every deletion which is slow.  Since we delete
   albums in batch, we should just do one tag compaction at the end.  Fixes
   #1487.

2) Issue introduced in 3d952f41c8 where
   we trigger an item_related_update in tag::clear_all().  Since
   tag::clear_all() is called when we delete an item, this causes
   the search module to attempt to index a deleted item.  Move that
   triggering upstream.
2010-11-14 15:01:29 -08:00
Bharat Mediratta
3d952f41c8 Fix a bug in the way that we add tags that causes it to be really slow
when adding a tag to lots of items.  Tag_Model::save() would call
item_related_update for every tag related to an item upon save which
is an O(N!) operation.  Fixes ticket #1412.
2010-11-08 22:16:57 -08:00
Bharat Mediratta
dff1a53696 All modules should be named Xxx_Core for extensibility. Fixes #1458. 2010-10-25 21:05:31 -07:00
Tim Almdal
bd532f6c88 Merge branch 'master' of git@github.com:gallery/gallery3 2010-09-12 10:57:41 -07:00
Tim Almdal
ac64614d4d Path for ticket #1140. Add a size0 to the tag cloud. 2010-09-12 10:53:06 -07:00
Bharat Mediratta
cef7ca9cf2 Change tag url form to be /tag/{name} from /tags/show/{id}. This is
a much friendlier url format.  Fixes ticket #1363.
2010-09-11 10:26:48 -07:00
Bharat Mediratta
d398651c08 Disable selectFirst in the autocomplete box, which makes it a little
harder to select pre-existing tags, but avoids the problem where we
force the user to pick from existing tags.  Fixes ticket #1339
2010-09-07 00:34:41 -07:00
Bharat Mediratta
db75ac642a Use the title of the root album as the site title for all RSS feeds.
Fixes ticket #1307.
2010-09-04 13:40:39 -07:00
Bharat Mediratta
7607e1f932 Full pass over all the JSON encoding and JS dialog code. We now abide
by the following rules:

1) An initial dialog or panel load can take either HTML or JSON, but
   the mime type must accurately reflect its payload.

2) dialog form submits can handle a pure HTML response, but the mime
   type must also be correct.  This properly resolves the problem
   where the reauth code gets a JSON response first from the reauth
   code, and then an HTML response when you reauth and continue on to
   a given form -- try it out with Admin > Settings > Advanced.

3) All JSON replies must set the mime type correctly.  The json::reply
   convenience function does this for us.

4) By default, any HTML content sent back in the JSON response should be
   in the "html" field, no longer the "form" field.

The combination of these allows us to stop doing boilerplate code like
this in our controllers:

  // Print our view, JSON encoded
  json::reply(array("form" => (string) $view));

instead, controllers can just return HTML, eg:

  // Print our view
  print $view;

That's much more intuitive for developers.
2010-07-31 21:16:17 -07:00
Tim Almdal
91a2c04a24 More patches as part of #1225. Change the 'core' modules to use the json::reply
method to set the content type header and encode the response as a json object
2010-07-31 15:44:55 -07:00
Bharat Mediratta
887154a3b7 Merge branch 'master' of github.com:gallery/gallery3 2010-07-13 12:30:03 -07:00
Bharat Mediratta
5eb4b8ff6c Check for the existence of uploadify() in the add_photos_form. The HTML uploader won't have that field. 2010-07-13 12:16:52 -07:00
Tim Almdal
dbf3199e46 Fix for ticket #1181. Use $.getJSON to retrieve the json contents of the dialog. Convert all the controllers
that create the data to go into a dialog to return the html as part of a json object.
2010-07-06 14:12:01 -07:00
Bharat Mediratta
f75ce45b6b When detecting encodings, give priority to ISO-8859-1 which seems to
solve the umlaut problem in IPTC data.  Fixes ticket #1144.
2010-06-27 12:14:56 -07:00
Bharat Mediratta
5335e4c0b4 Fix the autocomplete callback in item_edit_form(). We were
incorrectly matching the form input in the jQuery selector.  Did this
ever work?  Fixes ticket #1168
2010-06-27 11:25:31 -07:00
Bharat Mediratta
48af5e6b50 Rename "children" to "items" in our feed view because it makes more
semantic sense.
2010-06-20 17:25:23 -07:00
Bharat Mediratta
2992daa00e Add "Tag: %s" in the title on tag pages. Fixes ticket #1097. 2010-06-20 16:55:42 -07:00
Bharat Mediratta
f451804c6d $request->params might not exist. 2010-06-19 15:00:44 -07:00
Bharat Mediratta
1ba9d079bf post_test() should be using admin, not guest. 2010-06-19 15:00:33 -07:00
Tim Almdal
84c8d1c79a Fix ticket #1155. For compatibility with gallery2 increase the size of the tag name field from 64 bytes to 128 bytes. 2010-06-18 06:51:02 -07:00
Bharat Mediratta
bd496cc95c Add start/num query parameters to tags::get() 2010-06-16 16:09:29 -07:00
ckieffer
f1076590f1 Add page_title to admin views. Closes #1038. 2010-04-30 00:08:37 -06:00
ckieffer
e30849d310 Applied capitalization rules to title, changed from Tag admin to Manage tags 2010-04-29 23:59:20 -06:00
Chad Kieffer
67ced571c7 HTML validation and accessibility fix, add id attr to add tag input. 2010-04-21 22:48:33 -06:00
Bharat Mediratta
af71df3d0f Update tests to reflect recent changes to the REST API. 2010-04-17 15:35:09 -07:00
Bharat Mediratta
5679e30ef6 REST changes: Allow PUT and POST requests to modify members, not
just entity.

TESTS ARE NOT UPDATED YET.

- Fix item_rest::get() to maintain the proper sort order, which
  requires duplicating some Item_Model code.

- Elide "weight" from the REST version of item

- Adjust the weight of members according to the order they're returned
  from the client.  You can't add or remove members here, you can only
  reorder them.

- Changed the wire protocol to handle more complex values.
  Now "entity" and "members" are JSON encoded.  The Gallery3
  helper does this correctly.

- Changed the wire protocol for tag_item -- now it stores the
  tag and item urls in the entity, not as members.  This is more
  consistent.

- Added missing security for renaming and deleting tags.

- Got rid of vestigial tag_rest::post().  We add/remove tags
  via the relationship.
2010-04-04 11:55:54 -07:00