Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
javascript
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
7 Feb 2008 at 08:52 UTC
Updated:
8 Apr 2011 at 18:51 UTC
Jump to comment: Most recent file
Comments
Comment #1
starbow commentedIncluding the animated gif in the patch file seemed weird, so please put the attached ajax-loader.gif into your misc folder.
Comment #2
steven jones commentedsubscribing
Comment #3
breyten commentedWhy does the popup api have it's own javascript file, but not a .css file? That makes no sense ;) Go for consistency.
Comment #4
starbow commentedI am being consistent with all the other core javascript files, which define their css rules in system.css.
Comment #5
starbow commentedLooks like this patch is getting folded back into #193311: Ajax Popups in Drupal 7: Adding Modal Dialogs to Help, Confirmations and Filter tips (Unified). See explination at:
http://drupal.org/node/193311#comment-770004
Comment #6
dries commentedHere is a first, quick review of the patch. I haven't really looked at the design/approach yet -- I've merely skimmed the code for obvious offenders. I found a couple but nothing too bad:
- The words popup and popups are used inconsistently. Something it is singular, sometimes it is plural.
- The popup settings are way too technical. My mom doesn't know what a 'jQuery selector' is. Can't we remove these settings?
- I'd rename popupsapi.js to popups.js (or popup.js).
- We only use a capital letter for the first word in a title or string. For example, 'Title Selector' should be 'Title selector'. Dito for 'Warning: Please Confirm', 'Save Changes', etc.
- In documentation, we write URL and not url.
- There are various coding style issues: lack of spaces in certain expressions. For example:
'attributes'=>array('class'=>'popup').I'll try to do a more in-depth review shortly -- would be great to get a review from Nate as well.
Comment #7
starbow commentedThanks for the feedback.
The jQuery selectors are there because there is not currently any other way to find the page's content area. The ideal way to deal with this is to require all themes to use the the ids specified in the default page template (system/page.tpl.php). Then the content area is always #content-content, and the page title is always #page-title.
I touched on this issue for d6 over here: #215312: Missing an id for content div in garland page.tpl.php
A slightly less pushy solution would be to allow the theme creator to use their own content id, but require them to specify it in the theme.info file.
I have cleaned up the naming and capitalization inconsistencies and posted a new patch over at: http://drupal.org/node/193311#comment-773116
Comment #8
lilou commentedPatch still applied.
Comment #9
catchBased on #6 this needs work.
Comment #10
starbow commentedYeah, unfortunately it is still stuck in the great JSON logjam. Not to mention the Drupal 6 Popups API module has progressed way beyond this. I would still love to get this functionality into D7, but I have no idea how to move forward.
Comment #11
babbage commentedSubscribing.
Comment #12
babbage commentedIt looks like what is proposed in this thread is now implemented in this patch under consideration: #87994: Quit clobbering people's work when they click the filter tips link
Comment #13
starbow commentedstick a fork in it.
Comment #14
lourencofernandes commenteddrupal7 :(