Commit Graph
300 Commits
Author SHA1 Message Date
Bharat Mediratta b878ed174d Refactor Menu code to create allow you to create menus using a
chainable factory interface and retrieve them by ids.  Streamlined the
HTML creation code a little bit in the process, moved the basic menu
functionality into Theme_View and created the option to have different
menus other than site_navigation().
2008-12-08 06:14:34 +00:00
Bharat Mediratta 8592aad2bb Replace protected array and __get() with just class variables. This is faster and tighter. 2008-12-08 04:55:39 +00:00
Bharat Mediratta 736829490a Minor cleanups. 2008-12-08 04:50:56 +00:00
Bharat Mediratta 528a48a96e Minor cleanups. 2008-12-08 04:47:31 +00:00
Bharat Mediratta 73496de94f Tighten up head() 2008-12-08 04:39:21 +00:00
Tim Almdal ee2299d6d0 Restructure Menu processing to respect the differnent types of menu items (Menu's, Menu_Link, Menu_Dialog) 2008-12-08 00:23:33 +00:00
Tim Almdal bd033cda8f Move form.html.php from themes/default/views to core/views 2008-12-07 23:05:00 +00:00
Tim Almdal ba2b39624b correct menu processing such that urls=# aren't given class gDialogLink 2008-12-07 22:19:26 +00:00
Tim Almdal 3449827c5a Change the menu processing to add the gDialogLink class if the url starts with a #. this results in a modal dialog box being opened. At this point the url is not retrieved and the text just shows up in the dialog box... need to look at that 2008-12-07 22:10:23 +00:00
Tim Almdal 5f9e35bf93 Remove debugging code 2008-12-07 21:34:19 +00:00
Tim Almdal 954fcf0342 Merge gallery3/branches/menus back into gallery3/trunk 2008-12-07 19:45:46 +00:00
Tim Almdal b409a376f3 1) Change the photo description field to a text area
2) Added a 'type' data element to both forge/Form_Textarea and forge/Form_Upload

The second change allows the drawForm to correctly render both of these elements enclosed in a <li>...</li> html blocl
2008-12-07 17:09:21 +00:00
Bharat Mediratta 5d23a6515d Finish writing unit tests for Access. No bugs found! 2008-12-07 10:56:44 +00:00
Bharat Mediratta fef188d787 Leave all locking in ORM_MPTT::move_to, don't worry about it in
Item_Model::move_to, unless it turns out that we really need to.
2008-12-07 09:25:40 +00:00
Bharat Mediratta bf7ab8904a Change ORM_MPTT::add_to_parent() to take an ORM instead of an id so
that it's consistent with ORM_MPTT::move_to()
2008-12-07 08:46:44 +00:00
Bharat Mediratta e40b54a468 Adjust exception text to our normal form. 2008-12-07 08:32:30 +00:00
Bharat Mediratta c9cc6ffd1a fix a couple of typos. 2008-12-07 08:30:08 +00:00
Bharat Mediratta 055aa04497 Rename moveTo to move_to and extend the test a bit. 2008-12-07 08:23:22 +00:00
Bharat Mediratta d086f31ea4 Style cleanups to make File_Structure_Test pass. 2008-12-07 07:42:02 +00:00
Bharat Mediratta f0a1950597 Fix a bug in the redirect after adding photos. 2008-12-07 04:56:39 +00:00
Bharat Mediratta 2aa84796f3 * Don't call _getadd_photo_html() when we don't have an items table.
* Guard against errors when uninstalling modules that don't have any code left (eg: carousel)
* Create the var/uploads dir automatically.
2008-12-07 01:24:44 +00:00
Tim Almdal fb6e22e145 Implemented photo::_get_photo_add(). You need to create the var/uploads directory and make it writable by the server. The location of the temporary upload directory is specified in config/upload.php 2008-12-06 21:14:36 +00:00
Tim Almdal 64c380a60d Correct @todo's in Item_Controller 2008-12-06 20:27:55 +00:00
Bharat Mediratta bda84d71eb Fix a bug where any uninstall removed the entire database. 2008-12-05 06:27:02 +00:00
Tim Almdal 8d1790a0b4 * Add a moveTo unit test
* Pass the module::event(..., $data) by reference to the handlers
2008-12-05 04:56:33 +00:00
Tim Almdal 6ea063bc4c Tweak some issues with the moveTo Processing 2008-12-04 21:33:25 +00:00
Tim Almdal 0f103b1c06 Moving albums around with a drag and drop interface seems to work and preserve the left right pointers.
* changed _lock and _unlock to protected methods lock and lock respectively
* added a moveTo method on the Item_Model
* Corrected the hole closure  on delete.
* added moveTo on the ORM_MTPP class
* Changed the rearrange javascript to do moves with ajax
2008-12-04 20:05:58 +00:00
Bharat Mediratta 9ba9f7bf27 Change the startup code to only put installed modules on the autoload
path.  This breaks a bunch of places where we had hardcoded
dependencies, so guard all of those cases.  Restructure
module::available() a bit and the way that we do install/uninstall in
the scaffolding.
2008-12-04 07:44:28 +00:00
Bharat Mediratta bae905a4cb Improvements to access helper.
o Rename access::remove_group() to access::delete_group() for
  consistency.

o Wrote more unit tests

o Tests found a bug in access::remove_item() .. yay!
2008-12-04 06:40:35 +00:00
Tim Almdal 1ae3ed7e3b Get rid of the rearrange helper as the code could be inlined 2008-12-04 06:36:14 +00:00
Bharat Mediratta 4d76351017 Fix indentation 2008-12-04 05:54:48 +00:00
Bharat Mediratta 375e7c675e Implement ORM_MPTT::delete() properly.
Inline ORM_MPTT::_grow() for now
Rewrite ORM_MPTT tests to be domain specific; they no longer use album/photo helpers.
2008-12-04 05:47:05 +00:00
Bharat Mediratta 89a346c1e1 Rename Directory_Helper_Test to Dir_Helper_Test 2008-12-04 05:45:00 +00:00
Bharat Mediratta 24cbff29cc Replace grow_test and constrict_test with add_hierarchy_test and
delete_hierarchy_test.

Our tests will be more robust if we test the public API and not the
internal private functions.  If we get to the point where we have to
test the private functions, we should probably move those functions
into their own separate class with a public API.
2008-12-04 05:15:21 +00:00
Tim Almdal 5c095cbd78 Add unit tests to test growing and contracting the left and right pointers
Added a delete method to ORM_MPTT that contracts the tree when an item is deleted
2008-12-04 01:12:44 +00:00
Tim Almdal 9ae6acdc0a Before deleting an item, save the path to the image in the var directory as once the item is deleted, the $item->file_path() is no longer valid. 2008-12-04 00:14:52 +00:00
Bharat Mediratta e8cf2a3e67 Fix internationalized string. 2008-12-03 23:32:29 +00:00
Bharat Mediratta ccee9854c2 Rename file::unlink() to dir::unlink(). This creates an API that is
clearer about its actions, otherwise we may accidentally blow away an
entire hierarchy when we think we're deleting a single file (there's a
reason why rm won't let you delete dirs that aren't empty!)

Name it "dir" instead of "directory" because apparently "directory" is
already reserved.

Move the delete call out of Items_Controller and into the model.  The
model is responsible for keeping state integrity, not the controller.
2008-12-03 23:31:10 +00:00
Tim Almdal 76196be483 Remove @todo 2008-12-03 22:48:23 +00:00
Tim Almdal 7bb4b6029d Add a MY_file class that extends the file helper by creating an unlink method that deletes a file or an album directory.
Modify Items_Controller::_delete to call this new helper method when deleting an item
2008-12-03 22:39:57 +00:00
Bharat Mediratta d8511f2fde Implement two tests 2008-12-03 19:10:23 +00:00
Bharat Mediratta c3478675cd Fix a bug where we weren't actually deleting permissions (hooray for unit tests!) 2008-12-03 19:09:56 +00:00
Tim Almdal 27a9c14d27 If the the post and get arrays don't contain a _method parameter, then use the request::method() to determine the actual request method (i.e. delete doesn't show up in either places) 2008-12-03 17:33:18 +00:00
Bharat Mediratta efc6270295 Test stubs 2008-12-03 17:17:59 +00:00
Bharat Mediratta f114814c03 Move the form html into the controller 2008-12-03 05:59:39 +00:00
Bharat Mediratta 39499cdf2e Add /welcome/form/add/photos to give you the add photo form. 2008-12-03 05:40:59 +00:00
Bharat Mediratta e03bb0f7c3 Re-enable access_cache propagation now that we've patched the MySQL driver. 2008-12-03 04:28:14 +00:00
Bharat Mediratta 718ac67a02 get rid of a stray space that was breaking the File_Structure_Test 2008-12-03 04:17:02 +00:00
Bharat Mediratta c1886aab88 Temporarily disable some code to get tests to pass. 2008-12-03 04:05:24 +00:00
Bharat Mediratta 37758d15de Drop the right tables at uninstall time 2008-12-03 03:43:50 +00:00