summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers
AgeCommit message (Collapse)Author
2009-08-06Cleanup the javascript for enabling dialog or panel links.Tim Almdal
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-05Change the children and descendants APIs to be more consistent and toBharat Mediratta
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-05Remove the trigger definition codeTim Almdal
2009-08-05Merge branch 'master' of git@github.com:gallery/gallery3Tim Almdal
2009-08-04Dump any exceptions into the standard Kohana log as well as the taskBharat Mediratta
log for maximum exposure.
2009-07-31Merge branch 'master' of git@github.com:gallery/gallery3Tim Almdal
2009-07-31Add new events:Bharat Mediratta
graphics_resize graphics_resize_completed graphics_rotate graphics_rotate_completed graphics_composite graphics_composite_completed
2009-07-30Merge branch 'master' of git@github.com:gallery/gallery3Tim Almdal
2009-07-30Fix a static function declaration.Bharat Mediratta
2009-07-30Merge branch 'master' of git@github.com:gallery/gallery3Tim Almdal
Conflicts: modules/gallery/models/item.php
2009-07-29Make body_attributes() a theme callback instead of a method on theBharat Mediratta
View. This allows modules to piggyback on it.
2009-07-29Merge branch 'master' of git@github.com:gallery/gallery3Tim Almdal
2009-07-29Bump the gallery version to 10 in install()Bharat Mediratta
2009-07-29Remove some scary debug code.Bharat Mediratta
2009-07-30Fix for ticket #576Tim Almdal
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-29Fix for ticket #576Tim Almdal
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-28Move site_menu and admin_menu into gallery helper so that site_menuBharat Mediratta
can call admin_menu.
2009-07-28Change search callbacks to use the event system, so move them out ofBharat Mediratta
xxx_search helpers and into xxx_event helpers.
2009-07-28Use events to generate menus, instead of having xxx_menu helpers.Bharat Mediratta
This is the first step towards having a simple, lightweight and unified API for module interaction.
2009-07-28Convert the album add dialog to use the new Form_Script libraryTim Almdal
Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-07-28Revert commit 078c77a62b623322956457bfd7bfbdaf56203b00 and change theTim Almdal
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-27Revert "Fix for ticket #452"Tim Almdal
This reverts commit 809e52d80cbf3beb75b238fddb0da3951fb9a8e7.
2009-07-27Back out the fix for ticket #452Tim Almdal
Revert "Changed access::user_can to force the owner of an item to have" This reverts commit 0b97cfd6f098be08be5f3cf1dbca1cce580ae330.
2009-07-27Back out fixes for ticket #452Tim Almdal
Revert "It helps to save before committing :-)" This reverts commit 0d76d6fd77f53e9e92a9a013cd112c69217f3ceb.
2009-07-26Merge branch 'master' of git://github.com/rledisez/gallery3 into rledisez/masterAndy Staudacher
2009-07-26It helps to save before committing :-)Tim Almdal
2009-07-26Changed access::user_can to force the owner of an item to haveTim Almdal
view permission on the parent. Added a whitelist of allowable owner permissions. If the requested permission is view and the user requesting access is the owner, check that they have view permission to the parent.
2009-07-25Fix for ticket #452Tim Almdal
1) Change access_Core::user_can to return true for all permissions if the owner is the specified user. 2) Change Item_Model::viewable to set the owner_id is the first view_restriction This allowed simplification of the generating the where clause to a single $this->orwhere instead of a where and an orwhere.
2009-07-25Fix for ticket #594. Forced the directory name to be required when editting ↵Tim Almdal
the album.
2009-07-25Rename columns that use reserved SQL words : items.left and items.rightRomain LE DISEZ
2009-07-23Merge branch 'master' of git@github.com:/gallery/gallery3Bharat Mediratta
2009-07-24Add tag autocomplete to the album and photo edit pop up dialogs.Tim Almdal
This required putting a wrapper view around the forms and passing this view as the parameter to the item_edit_form event. The view contains a $script variable that the modules can add script to be included in the form html when rendered as part of the ajax response.
2009-07-23Disable the album cover icon if the item is already the current album cover.Bharat Mediratta
2009-07-23Fix a typo in a commentBharat Mediratta
2009-07-23Upgrade code to migrate the ACL from integer to boolean.Romain LE DISEZ
Related to 719c59e0402464a0e2b14915f6d10218ff5d4729 (cherry picked from commit 831bf63c236fe88624470d2906729e035e9dbfc8)
2009-07-23Consistency : always use self::XXXRomain LE DISEZ
(cherry picked from commit c9017ae2f21ff8f5d745f296a636b80a30add6a1)
2009-07-23Use BOOLEAN instead of integer to describe the permissions :Romain LE DISEZ
- DENY = false - ALLOW = true - UNKNOW = null (for intent only) - INHERIT = null (for cache) Upgrade is not included for now. (cherry picked from commit 719c59e0402464a0e2b14915f6d10218ff5d4729)
2009-07-22remove an extra ->reload() that was there for testingTim Almdal
2009-07-22Add explicit unit tests for access::user_canTim Almdal
2009-07-22Use the Kohana cascading filesystem to locate resources loaded by theBharat Mediratta
theme. Because the theme comes first, this means that themes can override any module resources, at the cost that we no longer have namespacing for JS and CSS files. The only file getting used outside of this model is themes/default/screen.css which is used in the admin theme. I fixed that by copying screen.css into admin_default and renaming its screen.css to admin_screen.css. I also copied over all the images that it was referencing. Fixes tickets #48 and #539. Theme API changes: - theme_script(), theme_url() and theme_css() are no longer needed - script(), url() and css() now refer to the first matching asset in the module load path, where gallery3/lib is at the end of the path
2009-07-22bump version to "3.0 git (pre-beta3)"Bharat Mediratta
2009-07-22Duh... when I added user_can, I passed in the user, but still used the ↵Tim Almdal
groups from the session
2009-07-21Add an API method user_can that allows for checking a specific user has theTim Almdal
specified permission to the item. Changed can to delegate to this method passing in the active user.
2009-07-21Always display the option menu so that modules with options that requireTim Almdal
menu items with view permission have somewhere to hang these menu items from. If its empty it will get removed by $menu->compact()
2009-07-21The RSS link should go to the parent album when looking at photos/movies.Bharat Mediratta
Fixes ticket #566.
2009-07-20Don't let the task status message exceed the size of the status column when ↵Bharat Mediratta
there's an error.
2009-07-20Make some API changes simplify the tag editing code. We now have aBharat Mediratta
good pattern for allowing modules to add their own hooks to item forms! 1) Album, photo and movie forms now all use edit_item as the group and we publish item_edit_form and item_edit_form_completed events which makes it much easier in the module to handle all events. They can still differentiate based on $item->type if they want to. 2) Added tag::clear_all() and tag::compact() functions which takes the place of hiwilson's tag::update() function and is now used in tag_event::item_delete(). This provides a simple API that allows us to have a lot less event handling code. It's less efficient than what hiwilson was doing before in that it will delete and re-add tags, but if that ever turns out to be a performance issue we can do something about it then.
2009-07-20(1)Add tag edit field in album/photo edit form. (2)provide edit ↵hiwilson
functionality. (3)support multi-word tagging.
2009-07-19Remove excess success logging. In the rebuild images case, it canBharat Mediratta
make a huge log file. In the l10n_client case, it's not really necessary to know that level of detail and it makes for a weird API.
2009-07-17Rename "locale" helper to "locales" to avoid conflicting with PHP 5.3.Bharat Mediratta
Fixes ticket #194