Closed (duplicate)
Project:
Location
Version:
5.x-2.7
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
30 Mar 2007 at 12:56 UTC
Updated:
7 Mar 2008 at 22:42 UTC
Jump to comment: Most recent file
In order to be able to theme the location input form, I've created a little patch that
1. gives me a css-handle to style the location-fields
2. let's me overwrite the theming with a phptemplate theming function
Just look at the current output, then apply the patch and add the following 2 css-lines to your theme and tell me what you think
.location-input .container-inline { clear: left; }
.location-input .container-inline label { display: block; float: left; width: 120px; }
Comments?
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | location-inputform-1.patch | 1.58 KB | ray007 |
| location-theme-input-1.patch | 2.14 KB | ray007 |
Comments
Comment #1
ray007 commentedThere anything wrong with this patch?
Or did I miss something about theming location input fields without this patch?
Comment #2
ray007 commented*Bump*
Shall I close this issue and keep the patch in my private branch, or is somebody else interested in this too?
Comment #3
lias commentedI think this is a good thing. One question, does this also work with contemplate so that location can be customized there?
Comment #4
ray007 commentedContemplate is for formatting data to view, while this little patch provides the means to better format the location input form.
So, formatting location data with contemplate isn't influenced in any way by this patch.
I'd really appreciate a word from the maintainer if this can go in or if I should change something ...
Comment #5
ray007 commentedI see you have checked something in to have theming for location input.
I've had problems with long descriptions breaking the layout because they didn't wrap so I'd suggest to add a line like the following to the location.css file:
I also think it would be a good idea to bring the map for selecting coordinates over the whole width instead of only the right column.
Comment #6
ray007 commentedAttached patch gives the gmap some more room and top-aligns the field-titles.
Comment #7
smitty commentedThanks to ray007 for this patch and the css-snippet.
I think, this is very important for the usability with flexible themes on small displays.
Please add it to the next version!
Some additional remarks:
Comment #8
sebs commentedTo include location.css in the list of css files loaded with a given page:
Modify file: modules/location.inc
Function: location_form
Add at line #317:
cheers,
sebs
Comment #9
pkej commentedThis works very well, I applied #6, #7, #8 and suddenly things looks much nicer, and the map can be bigger.
This should be put into the next release.
Comment #10
chriszz commentedIt works with 2.7, as i just found out.
But still - there are two fieldsets, which looks silly
Comment #11
pkej commentedI guess, but I've never tried this, that the outer fieldset is supposed to contain all the location points when there are more than one added for a node. I personally only use 1 for any node, so I agree that it looks silly with two fieldsets.
There should be some logic in the code which would get rid of the outer fieldset if only one location is used in the node.
Comment #12
smitty commentedPlease have a look at: http://drupal.org/node/160443
Comment #13
smitty commentedWell, I used the suggested changes of this thread for a while. But I got problems with several themes because the Location Table seems to be bigger than my content area (at least using this Default location map macro: [gmap|id=locmap |center=51,9 |zoom=5 |width=100% |height=400px |tcontrol=on]): In Garland the table hides the right column and in YAML a part of the table disappears behind the right column.
Besides that, it is a table! And tables are not recommended by drupal UI guideline.
So I suggest to throw out this table (by applying the patch of http://drupal.org/node/213989) and come back to the first patch in this thread, provided by ray007 in #1.
Only the css seems not to work any more in the meantime.
So I used this css:
Comment #14
smitty commentedI found the solution for the table in the right width: http://drupal.org/node/165434#comment-699756
Adding the following line to the CSS file does the fix:
Comment #15
dgtlmoon commenteddoing #6, #7, #8 also cleaned it up massively for me
Comment #16
bdragon commentedMarking as duplicate of http://drupal.org/node/231419. Please followup there.