18 Commits

Author SHA1 Message Date
Chad Kieffer
39818dd29f Comment updates. Add empty <li> to empty <ul> for HTML validation, fixes #1066. Minor CSS/JS fixes. Add scrollTo effect when clicking on 'Add a Comment'. 2010-04-21 22:36:52 -06:00
Andy Staudacher
64e5d438c7 HTML validation, avoid empty <ul> 2010-02-14 07:15:58 -08:00
Tim Almdal
4c3b9e363a Refactor the comment module as part of ticket: #917 "Remove Rest Controller"
* Remove the methods create, update, delete, get_edit_form as there are not used
* Change the return when a comment is created to return the html for the new comment.
  This saves a second get request to down load the comment.
2009-11-25 08:12:50 -08:00
Bharat Mediratta
78b6da12aa Make sure that we have a valid resource from the server side before we
fetch its url.  Fixes ticket #888.
2009-11-16 14:57:24 -08:00
Chad Kieffer
3e6ba7acc3 Renamed most, if not all css selectors from gName to g-name. Moved a few shared images from wind to lib. Deleted unused images in the admin_wind. This will likely break a few ajax features. 2009-10-04 00:27:22 -06:00
Tim Almdal
b310fab1f8 Change the link on the "Be first to comment" link to do a request to the server to get the comment add form. Fixes ticket #699. 2009-09-22 07:59:26 -07:00
Bharat Mediratta
21d6e17efa Don't add another comment form every time you click the [Add a
comment] button.
2009-09-13 14:19:04 -07:00
Tim Almdal
1d5262f9c3 Fix ticket #591: reCaptcha always on the page.
1) move creating the "Add a comment" button into the comments.html.php
2) use $.get() to retrieve the comment add form
2009-08-28 13:44:01 -07:00
Bharat Mediratta
8ae2305289 Hide the "no comments yet" text after the first comment is posted.
Fixes ticket #196.
2009-04-06 00:27:24 +00:00
Chad Kieffer
9bbe8053c7 Added a show comment form button. Add comment form is revealed when the button is clicked. Used jQuery UI Effect to .highlight() to bring attention to newly added comments. Also added a named anchor to our block library to allow direct linking/scrolling to those blocks on the page. 2009-02-12 07:07:11 +00:00
Bharat Mediratta
b39be71a4e We don't need to reset the form anymore, since it's reset on the server side. 2009-01-18 23:26:53 +00:00
Bharat Mediratta
a7feeb576f Big set of changes to comments, with related changes to akismet and
user modules.

* Don't delete vars when we delete a module.  This makes
  reinstalling a module a lot easier.

* Add user::lookup() as the preferred way to load a user, so that
  other modules don't delve into the user module (that'd be a
  problem when we swap out user modules)

* Notify site admins if Akismet is not fully configured

* Bundle all server variables into the comment so that if/when we
  re-check the comment, we are not using the server info from the
  site admin's request.

* Update Akismet to grab request context data from the comment

* Pre-seed comment fields if we have a logged in user.  Update
  comment::create() API to clarify it for this.

* Delete comment::update(), that's a controller function.

* Add url to User_Model

* Add author_name() author_email() and author_url() to
  Comment_Model.  It'll return the appropriate values depending
  on whether the comment was left by a logged in user or a guest.

* Use resetForm() instead of clearForm() when we reload the
  comment form after ajax submit, this way we preserve the
  pre-seeded values.

* In the user profile page, ignore blank passwords.
2009-01-10 00:34:23 +00:00
Chad Kieffer
246139cf1f Tabs to spaces. 2008-12-31 03:29:25 +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
fd49c74607 Convert tag module over to returning JSON. 2008-12-25 01:34:17 +00:00
Bharat Mediratta
cdcd8bf377 Update the form first, then clear it on success (else it doesn't get cleared on success) 2008-12-25 00:56:10 +00:00
Bharat Mediratta
0bb82b7621 Gut the comment module and simplify it. Stop trying to support Atom
and XML for now, we have no driver for those technologies so anything
we implement is not going to be sufficiently tested and therefore
it'll be broken.

Change all comment functions to return JSON and update the JS to deal
purely with JSON.  This is our new protocol for talking to the browser
and it should be flexible and portable.

Create comments.html.php.  This duplicates comment.html.php, but will
be more efficient for rendering comments since we won't be creating a
new View for every comment we render.
2008-12-25 00:47:40 +00:00
Tim Almdal
27e64f1dc6 Move javascript from default theme to appropriate modules 2008-11-27 06:14:32 +00:00