Commit Graph

752 Commits

Author SHA1 Message Date
Bharat Mediratta
f5bc55e72d Add labels to the form groups. 2008-12-18 22:35:16 +00:00
Bharat Mediratta
a74537ad59 Don't wrap hidden inputs in <li/> 2008-12-18 22:29:49 +00:00
Bharat Mediratta
052bb79d68 Add <fh:complete/> 2008-12-18 18:50:27 +00:00
Bharat Mediratta
c67234974d Refactor site admin menu into a theme function and build the menus in
the various modules.  In the process, rename xxx_menu::site_navigation() to just
xxx_menu::site().  And add xxx_menu::admin().

The menus are the same as before, but I changed the HTML to be
consistent with the way that we do it in the regular site, and this
broke the superfish styles.  I don't know how to fix this.. help me
Chad!
2008-12-18 07:32:34 +00:00
Chad Kieffer
aed68bfa9f I'm tired of clicking. Here are a few Selenium IDE tests. 2008-12-18 07:00:47 +00:00
Chad Kieffer
c2598fe4d8 Dialog polishing. They now resize their height. Updated form styles in the context of dialog display (don't show legends, fieldset border, or submit button).
Let's make sure that all forms generated are complete and well formed and then use JS and CSS to control their display and behavior in different contexts.
2008-12-18 02:50:40 +00:00
Bharat Mediratta
dc5faf0ebf Update cookie handling to ignore $Version, $Path and $Domain cookie
attributes and make it RF2109 compliant.
2008-12-18 00:41:55 +00:00
Bharat Mediratta
c92fbfd3c3 Add <generator> element to try to make Polar Rose happy (it doesn't work, though) 2008-12-18 00:29:22 +00:00
Bharat Mediratta
db110df5ba Absoluteify some urls to make feedvalidator.org happy 2008-12-18 00:28:30 +00:00
Bharat Mediratta
d4f1f6400f Polar Rose facial recognition module. Currently in a non-working
state because their server is not RFC2109 compliant.  Filing a bug.
2008-12-18 00:16:03 +00:00
Bharat Mediratta
55f63f6c9f Add item view permission checks.
Switch from absolute urls to relative ones.

Relative urls break the flash based slideshow, but the Cooliris
extension works.  I'll file a bug.
2008-12-18 00:02:59 +00:00
Bharat Mediratta
b37047ff55 Add Item_Model::viewable() which we can use to restrict any query to
just items viewable by the active user.  Ie:

  ORM::factory("item")
    ->where("name", "foo")
    ->find_all()

Would get all items with the name "foo".

  ORM::factory("item")
    ->viewable()
    ->where("name", "foo")
    ->find_all()

Restricts it to just the set of items that the user is allowed to see.
2008-12-17 22:39:33 +00:00
Bharat Mediratta
fe39641089 Update Kohana code to r3799 from their svn head. All tests pass.
Resolved upstream tickets:
  http://dev.kohanaphp.com/ticket/972

Command:
  svn merge -c19275 vendor/kohana/modified/kohana trunk/kohana
2008-12-17 19:28:26 +00:00
Bharat Mediratta
093fb407a8 Fix a bug where setting the active user did not reset group_ids (unit tests ftw!) 2008-12-17 19:23:04 +00:00
Bharat Mediratta
9b6ccfc7f3 Fix some lint errors 2008-12-17 19:06:39 +00:00
Bharat Mediratta
26f0b4e44d Clear out module list in load_modules() before trying any db operations 2008-12-17 19:04:20 +00:00
Bharat Mediratta
d1c737ffac Extend the changes in list_tables() and list_fields() that uses
TEST_MODE to avoid static members.
2008-12-17 19:03:36 +00:00
Bharat Mediratta
fa5a8fde4a Switch from cookie sessions to database sessions. We can't use cookie
sessions; it encodes all the value into the cookie which means
little/no security, transfer costs, and storage limits.
2008-12-17 18:32:08 +00:00
Bharat Mediratta
130e26983a Add initialization to the user module to put the user and group_ids
into the session, for easy access.  This cuts down the number of
queries when we're loading images through file_proxy.php
2008-12-17 17:40:45 +00:00
Bharat Mediratta
2abe82f106 Put Gallery3 under GPLv2 2008-12-17 17:10:08 +00:00
Chad Kieffer
01f6c67eb5 Added .gLoadingLarge and .gLoadingSmall to show ajax loading indicator. Applied to modal dialogs. 2008-12-17 06:22:08 +00:00
Bharat Mediratta
78cd00312e Improve performance by finding the item without walking the tree.
Instead, use the level and the name to get a short list of candidates,
and check each one of those.  In most cases, this query should give us
the right result the first time.
2008-12-17 05:53:05 +00:00
Bharat Mediratta
8630d61051 Change the album thumbnail/resize from _album.jpg to .album.pjg
because the leading underscore confuses the Kohana router.
2008-12-17 04:55:49 +00:00
Bharat Mediratta
fc7b78492b Separate thumbnails out into var/thumbs. This clears up some ambiguity in Item_Model and simplifies
file_proxy.  It also means we can stop munging file names in the var/resizes hierarchy.

In the process, rename "thumbnail" to "thumb" everywhere in honor of
Chad (well, ok because it's shorter)..
2008-12-17 04:45:35 +00:00
Tim Almdal
f8a0c91ce6 Drag & Drop the watermark now works and so does the dropdown box. The target image is divided into a 3x3 quadrant referenced as: northwest, north, northeast, west, center, east, southeast, south, southwest. Similiar to the imagemagik garvities. Currently the watermark is placed in the left top of the particular quadrant. 2008-12-17 01:26:40 +00:00
Chad Kieffer
9fa566a1c9 Added label to add tag form input 2008-12-17 01:19:13 +00:00
Chad Kieffer
3c05b95620 Added JS to set/reset simple forms' input values to their corresponding labels' value. Labels should always be used with visible inputs. Use this to style and control short form input display and behavior. 2008-12-17 00:45:52 +00:00
Bharat Mediratta
f4c6a20149 Remove error checking; if this fails let it fail noisily for now so that we can find problems faster. 2008-12-16 23:59:33 +00:00
Bharat Mediratta
af32e5708d Remove all caching from ORM_MPTT. This was premature optimization: it
wasn't benefitting us, and it will get in the way when we want to add
implicit view protection to our queries.
2008-12-16 23:36:56 +00:00
Bharat Mediratta
34484fb1b5 Dump out the stack trace on errors. 2008-12-16 23:33:43 +00:00
Bharat Mediratta
59bb72df88 Fix preamble 2008-12-16 23:11:24 +00:00
Bharat Mediratta
8c7d0a76e5 Add file_proxy. This is controller gets triggered by .htaccess
protection on var/albums and var/resizes and only displays files to
the user if they have "view" permission on the base ite.
2008-12-16 23:07:33 +00:00
Tim Almdal
363548bfc4 2008-12-16 20:40:29 +00:00
Tim Almdal
b0c21915e9 Oops, remove the () on the parameter to $("#Dialog").ready(...) so we pass the function, not the results of the function call. 2008-12-16 19:16:34 +00:00
Tim Almdal
c32988a097 Separate the handling of the dialog resizing into the watermark.js, so we don't have to download the watermark dialog initialization with each request. 2008-12-16 19:12:24 +00:00
Tim Almdal
59bc7dc22c 1) change the selector for the the function to gDialog
2) Once the dialog is resized, center it
2008-12-16 19:06:03 +00:00
Tim Almdal
04441e11cc 1) Remove the load watermark from the scaffolding... use the menu option
2) The set watermark dialog is now sizing properly.  @todo is recenter in the window
2008-12-16 17:30:18 +00:00
Tim Almdal
931d8c6bdc Submit the form using ajaxSubmit 2008-12-16 17:26:19 +00:00
Tim Almdal
4c3c68ac10 Add Submit and Reset buttons to the dialog in order to trap the form submission so the form doesn't close. There might be a better way, but i couldn't think of it. 2008-12-16 16:29:59 +00:00
Bharat Mediratta
a0e07764c1 Make the breadcrumb a little larger 2008-12-16 11:04:47 +00:00
Bharat Mediratta
e2544da5b0 Alphabetize field names to make it easier to find 'em. 2008-12-16 08:27:06 +00:00
Bharat Mediratta
3e219aab6b Change htaccess rules to use mod_rewrite 2008-12-16 08:17:00 +00:00
Bharat Mediratta
8bd7afeb5b TEST_MODE always exists now, so check its value, don't rely on its existence to know that we're in test mode. 2008-12-16 05:13:04 +00:00
Bharat Mediratta
83363172b1 Don't use model_cache for get_version and set_version; that breaks the installer. 2008-12-16 05:04:42 +00:00
Bharat Mediratta
3273984582 Use model_cache::get() to reduce duplicate queries 2008-12-16 04:56:51 +00:00
Bharat Mediratta
65a340efd8 Fix a bug where we were using module::set_var() instead of module::get_var() resulting in
loading all photos in an album on a single page and updating the var on every page load.
2008-12-16 04:52:16 +00:00
Bharat Mediratta
e82b08db20 Make the profiler output more legible by adding some padding to the table. 2008-12-16 04:45:52 +00:00
Bharat Mediratta
52a7607336 Define TEST_MODE 0 when we're in production 2008-12-16 04:31:33 +00:00
Bharat Mediratta
d9e02a5d0c Various optimizations:
o Add model_cache::get() which caches models avoiding duplicate lookups
o Stop using ORM relationships for Item_Model::owner so that we can use caching
o For Item_Model::xxx_edit fields, don't make them editable for guests
o Other minor stuff.

These optimizations reduce the number of queries for a 9-photos page from ~200
to ~45.  Still way too many!
2008-12-16 04:29:00 +00:00
Bharat Mediratta
dc08917345 Fix a bug where we were not deleting the .htaccess file on access::reset() 2008-12-16 02:31:13 +00:00