Commit Graph

442 Commits

Author SHA1 Message Date
Tim Almdal
5997f57323 Cleanup the javascript for enabling dialog or panel links.
1) We don't need to loop over the elements to bind the event handler.
2) Just include gallery.panel.js for all the admin pages.
2009-08-06 07:22:24 -07:00
Tim Almdal
7bdf382e81 Revert "Revert "Revert "Allow a theme to override the page refresh mechanism. Create a new"""
This reverts commit 7b1cca168c.

Basically remove it and Bharat and I will fight it out in SF for a resolution :-)
2009-08-06 07:02:41 -07:00
Tim Almdal
a6fb9a69a0 Merge branch 'master' of git://github.com/gallery/gallery3 2009-08-05 17:47:33 -07:00
Bharat Mediratta
b394b0b2c6 Fix the default $orderby to be an associative array in descendants() and children(), thanks Tim! 2009-08-05 11:01:48 -07:00
Tim Almdal
fb4bfa5711 Merge branch 'master' of git://github.com/gallery/gallery3 2009-08-05 10:45:38 -07:00
Bharat Mediratta
e8c57290a2 Change the children and descendants APIs to be more consistent and to
remove Gallery3 concepts from ORM_MPTT.

The following API methods:
  ORM_MPTT::children
  ORM_MPTT::children_count
  ORM_MPTT::descendants
  ORM_MPTT::descendants_count

All now take a $where clause that allow you to pass through additional
field parameters.

old API:
  $album->children(10, 0, "photos")
  $album->children_count("photos")

new API:
  $album->children(10, 0, array("type" => "photos"))
  $album->children_count(array("type" => "photos"))

This gives us a more flexible API and simplifies the code.  While I
was in there, I changed the way we deal with default orderby values so
that we just assign the default value in the function definition,
which allows us to get rid of all conditionals in the implementation
which results in simpler code.
2009-08-05 10:38:53 -07:00
Tim Almdal
7b1cca168c Revert "Revert "Allow a theme to override the page refresh mechanism. Create a new""
This reverts commit 9f396178ce.
2009-08-05 10:25:23 -07:00
Tim Almdal
9f396178ce Revert "Allow a theme to override the page refresh mechanism. Create a new"
This reverts commit 1f014aae6c.
2009-08-05 09:24:27 -07:00
Tim Almdal
81d39a9bb1 Remove the trigger definition code 2009-08-05 07:47:17 -07:00
Tim Almdal
187d4b209d Change the children methods on Item_Core and ORM_MPTT in order to
specify a type parameter, so tht we can filter the children based
on type (i.e. album, photo, etc).
In addition, expose the sort order, so that we can specify the order
we want to return the children.
2009-08-05 07:38:35 -07:00
Tim Almdal
2f63a5379f Merge branch 'master' of git@github.com:gallery/gallery3 2009-08-05 06:51:27 -07:00
Bharat Mediratta
a03b9273b2 Dump any exceptions into the standard Kohana log as well as the task
log for maximum exposure.
2009-08-04 20:34:46 -07:00
Tim Almdal
2e82c5e9ca Merge branch 'master' of git@github.com:gallery/gallery3 2009-08-03 08:12:39 -07:00
Bharat Mediratta
7ad0808a11 Change the API for getting to the original state of an ORM.
Old API:  $obj->original("field_name")
  New API:  $obj->original()->field_name

This allows us to revert the varous xxx_updated events back to passing
an original ORM as well as the the updated one.  This makes for a
cleaner event API.

  Old API:  comment_updated($comment) { $comment->original("field_name") }
  Old API:  comment_updated($old, $new) { $old->field_name }
2009-08-02 12:09:00 -07:00
Tim Almdal
bb8c83db81 Merge branch 'master' of git@github.com:gallery/gallery3 2009-07-31 14:51:37 -07:00
Bharat Mediratta
f034c6c534 Add new events:
graphics_resize
  graphics_resize_completed
  graphics_rotate
  graphics_rotate_completed
  graphics_composite
  graphics_composite_completed
2009-07-31 13:32:07 -07:00
Tim Almdal
7aa03e59ba Merge branch 'master' of git@github.com:gallery/gallery3 2009-07-30 19:25:43 -07:00
Bharat Mediratta
19d89f94f9 Remove debug statements 2009-07-30 09:57:24 -07:00
Bharat Mediratta
031a19724a Update golden file 2009-07-30 09:55:09 -07:00
Bharat Mediratta
0f43b35747 Fix a static function declaration. 2009-07-30 09:54:59 -07:00
Tim Almdal
d3ce7f7e36 Merge branch 'master' of git@github.com:gallery/gallery3 2009-07-30 08:09:40 -07:00
Bharat Mediratta
fc3273da4d Add some code to guard the weight calculation against zero rows when
we're doing an initial install.
2009-07-30 08:02:54 -07:00
Tim Almdal
fc7ef17e0f Remove try statement w/o catch 2009-07-30 05:27:19 -07:00
Tim Almdal
29f5a231c7 Merge branch 'master' of git@github.com:gallery/gallery3
Conflicts:
	modules/gallery/models/item.php
2009-07-30 05:15:24 -07:00
Bharat Mediratta
15f148349e Make body_attributes() a theme callback instead of a method on the
View.  This allows modules to piggyback on it.
2009-07-29 17:25:53 -07:00
Bharat Mediratta
ca96d47196 Oops, I removed too much in my last change. Put talmdal's query back,
but change it to use Database instead of ORM for a little more
efficiency.
2009-07-29 16:58:29 -07:00
Tim Almdal
6f1da3aba4 Merge branch 'master' of git@github.com:gallery/gallery3 2009-07-29 16:47:16 -07:00
Bharat Mediratta
5d0413631f Bump the gallery version to 10 in install() 2009-07-29 16:44:51 -07:00
Bharat Mediratta
7438a9c889 Remove some scary debug code. 2009-07-29 16:40:01 -07:00
Tim Almdal
ead6a61d9e Fix for ticket #576
Add a weight index to the item table and changed the retrieval of the maximum
weight to select weight from items order by weight desc limit 1.

Upgrades the gallery module to version 10

Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-07-30 01:59:07 +08:00
Tim Almdal
653c291d94 Fix for ticket #576
Add a weight index to the item table and changed the retrieval of the maximum
weight to select weight from items order by weight desc limit 1.

Upgrades the gallery module to version 10
2009-07-29 10:55:56 -07:00
Tim Almdal
a533099e8a Merge branch 'master' of git@github.com:gallery/gallery3 2009-07-29 05:17:25 -07:00
Bharat Mediratta
e6d6e498c0 Adjust the velocity based on whether or not we're waiting for more
updates to get smoother scrolling.
2009-07-28 21:21:09 -07:00
Tim Almdal
3461b4e8e6 Merge branch 'master' of git@github.com:gallery/gallery3 2009-07-28 20:49:50 -07:00
Bharat Mediratta
30586236a5 Make sure the thumb_menu has the gThumbMenu CSS class. 2009-07-28 20:44:50 -07:00
Bharat Mediratta
544e92adc9 Move site_menu and admin_menu into gallery helper so that site_menu
can call admin_menu.
2009-07-28 20:32:11 -07:00
Bharat Mediratta
eda2d75fa0 Disable smooth progressbar scrolling when we're at 100% (else the
progressbar trucks along slowly even though the task is done).
2009-07-28 20:31:24 -07:00
Bharat Mediratta
44bc74edb9 Change search callbacks to use the event system, so move them out of
xxx_search helpers and into xxx_event helpers.
2009-07-28 20:30:34 -07:00
Bharat Mediratta
1e90e40d3a Use events to generate menus, instead of having xxx_menu helpers.
This is the first step towards having a simple, lightweight and
unified API for module interaction.
2009-07-28 13:47:22 -07:00
Tim Almdal
f5c4d23e57 Convert the album add dialog to use the new Form_Script library
Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-07-28 21:39:05 +08:00
Tim Almdal
dfaf870310 Convert the album add dialog to use the new Form_Script library 2009-07-28 06:33:25 -07:00
Tim Almdal
a7f4d7aced Revert commit 078c77a62b and change the
tag_event:item_edit_form to use the new Form_Script library to inject
script into a form.

Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-07-28 21:00:25 +08:00
Tim Almdal
2e8f73d4e9 Revert commit 078c77a62b and change the
tag_event:item_edit_form to use the new Form_Script library to inject
script into a form.
2009-07-28 05:40:28 -07:00
Tim Almdal
2f969c80eb Create A Forge Script element. Form_Script allows the specification
of either a url to a script file or in line text which will be included
in a script block.

Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-07-28 12:04:23 +08:00
Tim Almdal
4550969101 Create A Forge Script element. Form_Script allows the specification
of either a url to a script file or in line text which will be included
in a script block.
2009-07-27 20:59:58 -07:00
Tim Almdal
a4c807232a Merge branch 'master' of git@github.com:gallery/gallery3 2009-07-27 15:49:20 -07:00
Bharat Mediratta
7efb4b4cdf Remove the unnecessary ORDER BY on $this->sort_column in
get_position(), and instead apply an ORDER BY on `id` in the 2nd query
so that we have stability among the equal elements.  This should
result in cheaper (and more sensible) queries.
2009-07-27 15:17:14 -07:00
Tim Almdal
1f014aae6c Allow a theme to override the page refresh mechanism. Create a new
javascript lib (gallery.reload.js) which defines the functions
gallery_reload() and gallery_location(new_location).  They just
do a window.location.reload() and window.location = new_location.

This change breaks the assumption that all themes will handle page reloads
the same and allows the theme to customize the page refresh.
2009-07-27 12:39:12 -07:00
Bharat Mediratta
b3fe70e654 Updated. 2009-07-27 11:34:27 -07:00
Andy Staudacher
e68599f6d7 Merge branch 'master' of git@github.com:gallery/gallery3 2009-07-27 11:27:50 -07:00