Commit Graph
61 Commits
Author SHA1 Message Date
Chad Kieffer ce70ab3785 Comment and code format fixes 2009-01-16 07:22:30 +00:00
Chad Kieffer ac59df2395 Fixed vertical alignment of thumbs. 2009-01-13 04:27:35 +00:00
Chad Kieffer 9be9c5a3d1 Updated vertical alignment of thumbnails. 2009-01-12 23:54:52 +00:00
Bharat Mediratta ff5722bef0 Add missing semicolon 2009-01-10 07:24:04 +00:00
Chad Kieffer f7f2fa10cd Started to wire up album and photo view menus. Need photo's parent album link added. Also need add the slideshow link to the menu. 2009-01-04 03:43:12 +00:00
Bharat Mediratta 4f57c30590 Fix windows-style line endings 2009-01-04 01:33:17 +00:00
Chad Kieffer bdff96bd54 Added a jump to comments button with a scroll to effect. 2009-01-03 19:09:32 +00:00
Chad Kieffer b709c7eca0 For album-specific JS, key off of #gAlbumGrid rather than .gItem. 2009-01-01 22:22:18 +00:00
Bharat Mediratta 11d2788af8 Refactor common dialog JS code out into lib/gallery.dialog.js 2009-01-01 00:06:52 +00:00
Bharat Mediratta 23105f1359 PhotoID -> PhotoId for consistency 2008-12-31 07:16:38 +00:00
Chad Kieffer 959fa91f49 Minor refactor. Move some stuff out of $("document").ready to functions. Comment updates. 2008-12-31 04:10:03 +00:00
Chad Kieffer 27009ad852 Drop .gShortForm in favor of using specific form ids (gSearchForm, gAddTagForm). This maintains styles when forms are are reloaded into the DOM. Haven't figured out how to fire shortFormInit() when a form is reloaded into the DOM, as gAddTagForm is :( 2008-12-30 02:50:52 +00:00
Chad Kieffer aff2af5e1f Tighten up album grid display. Vertically align thumbnail/metadata in gItem container. Brought back borders. Use a neutral bg color for albums. Link item titles, not just thumbnails. 2008-12-28 07:33:09 +00:00
Chad Kieffer 4dda9c5a6e Comment and indent cleanup. Forgot to delete an image in a previous commit. 2008-12-26 06:09:43 +00:00
Felix Rabinovich 0bef37eb0b To reset a form use resetForm 2008-12-26 05:36:08 +00:00
Bharat Mediratta 74bfa24b8f Move jquery.listen.js out to lib 2008-12-25 08:27:57 +00:00
Bharat Mediratta fdc0f83024 Big round of normalization of the way that our controllers
communicate.  Almost all controllers now use JSON to speak to the
theme when we're dealing with form processing.  This means tht we only
send the form back and forth, but we use a JSON protocol to tell the
browser success/error status as well as the location of any newly
created resources, or where the browser should redirect the user.

Lots of small changes:
1) Admin -> Edit Profile is gone.  Instead I fixed the "Modify Profile" link
   in the top right corner to be a modal dialog

2) We use json_encode everywhere.  No more Atom/XML for now.  We can bring those
   back later, though.  For now there's a lot of code duplication but that'll be
   easy to clean up.

3) REST_Controller is no longer abstract.   All methods its subclasses should create
   throw exceptions, which means that subclasses don't have to implement stubs for
   those methods.

4) New pattern: helper method get_add_form calls take an Item_Model,
   not an id since we have to load the Item_Model in the controller
   anyway to check permissions.

5) User/Groups REST resources are separate from User/Group in the site
   admin.  They do different things, we should avoid confusing overlap.
2008-12-25 05:12:46 +00:00
Bharat Mediratta 672eca5337 Lots of deltas rolled up into a bigger change. Sorry for the mess.
1) Deleted in-place-editing.  We'll be replacing this with a real edit
   system that groups settings together and is more coherent.

2) Tweaked the way that dialog boxes work to get the ajax stuff working
   again.  It's imperfect and does not work properly for uploading images.
   This is going to get redone also, but this is a good resting point.

3) Created edit forms for albums and photos.  Moved _update and _create out
   of Items_Controller and into the individual subclasses.

4) Created access::required which is a shorthand for:
    if (!access::can(...)) {
      access::forbidden();
    }

5) Added validation rules to Items_Model

6) Converted login to use the regular modal dialog approach in the theme.
2008-12-24 00:20:26 +00:00
Bharat Mediratta 76b1500209 Clean up the way that we upload via dialogs:
1) If the create request is Ajax, then return a 201 Created response code
2) If we receive back a 201 response, then switch to the new page.
3) Display a status message when we do an upload.
2008-12-23 07:30:14 +00:00
Chad Kieffer 73d7cb4576 Make the loading class a bit more reusable. 2008-12-23 06:24:21 +00:00
Chad Kieffer 0c89fdcfc8 Added missing semicolons 2008-12-23 01:00:23 +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
Chad Kieffer 01f6c67eb5 Added .gLoadingLarge and .gLoadingSmall to show ajax loading indicator. Applied to modal dialogs. 2008-12-17 06:22:08 +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
Tim Almdal 363548bfc4 2008-12-16 20:40:29 +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 011fe8bc93 Get rid of windows line endings 2008-12-15 08:35:30 +00:00
Chad Kieffer c68a0823b9 Should be ul, not u#gLoginLink 2008-12-15 06:17:17 +00:00
Chad Kieffer 1a5da095ae Renamed vars used in dialog init to avoid confusion and conflicts. 2008-12-15 06:11:32 +00:00
Chad Kieffer 119344d9db Switched login display from display in the header to a dialog. Validation errors don't display on first failed attempt, will fix later. Moved jquery js, images, css out to respective folders. 2008-12-15 02:45:50 +00:00
Bharat Mediratta 2842a1a8be Argh, fix a bad rename. 2008-12-15 01:52:04 +00:00
Bharat Mediratta 1127257f63 Rename default_admin to admin_default. 2008-12-15 01:50:52 +00:00
Tim Almdal bf10544e27 Destroy the popup dialog when it closes so there is nothing hanging around and we can reuse it for a different popup 2008-12-11 20:47:09 +00:00
Tim Almdal 1af3b8e100 Changes to the Menu.php:
1) separate the classes that are generated by the Menu class from what is used for the rendering. The classes that are generated are gMenu, gMenuElement, and gMenuDialog for the Menu, Menu_Element and MenuDialog classes respectively.
2) Changed the ui.init.js to add the appropriate rendering classes to the above classes. All gMenu elements have the sf-menu class added.  All elements of class gMenuDialog have the gDialogLink class added.
3) Use Superfish for the menus so they now float properly.
2008-12-11 19:01:47 +00:00
Chad Kieffer 2fbd4c09e6 Checked in jQuery superfish menu plugin, applied to item options menu. Updated album/item view icons. 2008-12-09 06:40:20 +00:00
Chad Kieffer c65ae12032 Let dialogs be draggable for now. 2008-12-07 04:58:07 +00:00
Chad Kieffer 36cda412f4 First go around at reusable modal dialogs. Moved jQuery UI CSS into screen.css, moved default theme JS to js folder. Named jQuery UI files to match the file names as they distribute them. Removed accordion, it's not used yet. 2008-12-07 04:49:26 +00:00
Tim Almdal 27e64f1dc6 Move javascript from default theme to appropriate modules 2008-11-27 06:14:32 +00:00
Tim Almdal 326fa1dd27 Remove slideshow.js as it is not required 2008-11-27 05:59:25 +00:00
Bharat Mediratta 7be23c269c Remove a stray comma that was making IE sad. 2008-11-25 03:24:31 +00:00
Chad Kieffer c812d2a931 Changed comment sort order asc. Changed ajax comment add to append comment li to comment thread ul. Added fadeIn for user login. 2008-11-24 07:12:45 +00:00
Chad Kieffer e85282b709 Make login form JS unobtrusive. Needs work. 2008-11-24 00:27:45 +00:00
Chad Kieffer 9139872c8d When removing #gCommentForm I forgot to update the jQuery selectors used here. In place commenting works again. 2008-11-23 20:17:02 +00:00
Chad Kieffer ac9df35d8a Cleanup of header to normalize margins and white space. Improved display of user login form. Added gHide, gShowBlock, gShowInline, gClose classes to handle show and hide functions. Half-baked idea which will need refinement. 2008-11-22 20:36:46 +00:00
Tim Almdal 4bf486955c The start of the slideshow module. Mostly framework stuff, no real implementation yet 2008-11-18 19:09:24 +00:00
Jozef Selesi 3ebb751cda First iteration of REST controller refactoring. RESTful controllers that refer to collections should now have plural names and there should be only one controller per resource. Updated existing classes that implement REST_Controller. The routing now works like this:
GET    /controller    -> controller::_index()
POST   /controller    -> controller::_create()
GET    /controller/id -> controller::_show()
PUT    /controller/id -> controller::_update()
DELETE /controller/id -> controller::_delete()
GET    /form/edit/controller/resource_id -> controller::_form()
GET    /form/add/controller/data         -> controller::_form()
2008-11-18 08:28:32 +00:00
Bharat Mediratta ce7fbf979d Stop using the target param; replace the form by hand so that we can run ajaxify_comment_form() as needed. Otherwise the 2nd post attempt won't be ajax 2008-11-16 07:27:36 +00:00
Bharat Mediratta 140736a1e4 Several large changes:
1) Changed the way that we get forms.  Now, if you want to get a form
   for a REST resource you prefix /form to the resource id.  So:
    /form/photo/1    : returns a form for editing photo id 1
    /form/comments/1 : returns a form for adding a comment to photo id 1
    /form/comment/1  : returns a form for editing comment id 1

2) Changed the comment module to have two controllers:
    comment:  deals with a single comment resource
    comments: deal with collections of comments attached to an item

Related stuff:
- Moved the comments js into the theme
- Reworked Comment_Helper for clarity
- Moved form generation code down into Comment_Helper
- Cleaned up routes (eliminating new comment ones added in recent rev)
- Added form() function to all REST controllers
- Changed comment module to use a block instead of an arbitrary helper call from the theme
- Comment controller only returns HTML currently, but returns a 201 Created status
  code when a new comment is added, which the Ajax code can catch and act upon.
- Got rid of a lot of extra views in comment module
2008-11-16 07:14:12 +00:00
Bharat Mediratta b8b60df391 Rename gLogin -> gLoginForm
This disambiguates forms from blocks (for example in the comment
module we were calling both the form and block gComments).
2008-11-16 07:07:16 +00:00