Commit Graph

108 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Andy Lindeman
c101151616 Allow tags to be merged by renaming
* Fixes #1628
2011-04-23 12:04:43 -04: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
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
Joe7
fca6d1254a Fixed offset sanitizing code - Fixes Ticket#1593 2011-01-09 18:48:24 -08:00
Joe7
f364e8a96b Using array support introduced in 8295201adf948ea35f21f75801b7a8bf36c27569 2011-01-03 11:38:21 -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
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
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
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
2992daa00e Add "Tag: %s" in the title on tag pages. Fixes ticket #1097. 2010-06-20 16:55:42 -07:00
ckieffer
f1076590f1 Add page_title to admin views. Closes #1038. 2010-04-30 00:08:37 -06:00
Bharat Mediratta
c3c2b45280 Update the copyright to 2010. It's only 3 months into the year :-) 2010-03-03 10:15:34 -08:00
Andy Staudacher
7099fc71f1 Fix for ticket 1004: Replace all uses of split with explode (none actually required regular expressions). Thanks to Brian Hartsock for providing a patch! 2010-02-06 13:05:44 -08:00
Tim Almdal
e98991b90f return a location method so the page reloads properly if the edit was successful. 2010-01-31 16:58:42 -08:00
Bharat Mediratta
cfbbf9ef60 Convert __toString() to use (string) cast instead. 2010-01-27 21:58:06 -08:00
Bharat Mediratta
5c49c041e7 Use "(string) $form" instead of "$form->__toString()" 2010-01-16 22:42:02 -08:00
Bharat Mediratta
057e8d09af Convert a bunch of leftover kohana::show_404 calls to throw
Kohana_404_Exception instead.  These are the ones where we used a
lower-case 'k' so my previous filter didn't catch it.
2009-12-23 20:51:33 -08:00
Bharat Mediratta
8b9a02084a Updates for the latest version of Kohana 2.4:
1) Controller::$input is gone -- use Input::instance() now
2) Handle new 'database.<default>.connection.params' parameter
3) Handle new 'cache.<default>.prefix' parameter
2009-12-21 21:27:43 -08:00
Bharat Mediratta
3d0a7a33ad Fix a few more database queries 2009-12-06 20:38:57 -08:00
Bharat Mediratta
2132c9a96d Fix some database calls. 2009-12-06 20:19:54 -08:00
Bharat Mediratta
1fd0e14359 Convert all DB where() calls to take 3 arguments.
Convert all open_paren() calls to and_open() or or_open() as appropriate.
2009-11-26 12:09:04 -08:00
Bharat Mediratta
0121bfd585 ORM::orderby -> ORM::order_by 2009-11-25 19:26:52 -08:00
Bharat Mediratta
f50dbd992d Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_dev
Conflicts:
	modules/gallery/controllers/rest.php
2009-11-25 13:40:47 -08:00
Bharat Mediratta
2e420522ec Preliminary work to cut over to Kohana 2.4
- Kohana::log() -> Kohana_Log::add()
- Kohana::config_XXX -> Kohana_Config::instance()->XXX
- Implement View::set_global in MY_View
- Updated Cache_Database_Driver to latest APIs
- ORM::$loaded -> ORM::loaded()
- Updated item::viewable() to use K2.4 parenthesization
2009-11-25 13:22:24 -08:00
Tim Almdal
454a96f48f Refactor the tags to remove the REST_Controller. Partial fix for ticket #917 2009-11-25 09:08:33 -08:00
Tim Almdal
57adefc5ba Revert "Create theme::get_var(), theme::set_var() methods to set the options of the active site theme. Change all refrences to theme options to use these methods. Update the version number of Gallery to 20 and move any them related options to the be stored under the active theme."
This reverts commit 26114972c3.
2009-11-19 11:44:01 -08:00
Tim Almdal
26114972c3 Create theme::get_var(), theme::set_var() methods to set the options of the active site theme. Change all refrences to theme options to use these methods. Update the version number of Gallery to 20 and move any them related options to the be stored under the active theme. 2009-11-18 15:36:13 -08:00
Bharat Mediratta
1067e68292 Redesign the way that we consider page types to create buckets of page
types, and a subtype for specifics.  Currently the top level bucket

   collection, item, other

Here are the core subtypes so far:

   collection: album, search, tag
   item: movie, photo
   other: login, reset, comment-fragment, comment

It's legal to create new page_subtypes whenever you want.  Use the
appropriate page_type to get the coarse grain behavior that you want.
2009-11-17 14:04:45 -08:00
Bharat Mediratta
846f365db9 Normalize tags a bit.
- Create Tag_Model::url() to mimic Item_Model::url()
- Use the same pagination logic as we do for viewing items
2009-11-14 16:17:19 -08:00
Tim Almdal
beb63a8380 Clean up the In place edit api:
1) Only allow 1 in place edit to be active at a time (gets around the issue of using an id to identify the form
2) remove the add_ prefix from some of the api methods
3) clean up inconsistent naming
2009-11-06 23:05:20 -08:00