Issue Details (XML | Word | Printable)

Key: SAK-13694
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Gonzalo Silverio
Reporter: Adam Marshall
Votes: 1
Watchers: 5
Operations

If you were logged in you would be able to see more operations.
Sakai

the access.css uses its own unique style. It should follow the style that the rest of Sakai uses

Created: 05-Jun-2008 09:19   Updated: 19-Jan-2010 05:57
Component/s: Access, Resources
Affects Version/s: 2.5.0, 2.5.2, 2.5.3, 2.6.0
Fix Version/s: 2.7.0-b01, 2.8.0 [Tentative]

Time Tracking:
Not Specified

File Attachments: 1. Text File access-css-bugfix.txt (0.6 kB)
2. Text File access-css-patch2.txt (5 kB)
3. Text File access-css.txt (4 kB)
4. Text File access_css-patch-11-25-09.txt (3 kB)
5. Text File CollectionAccessFormatter-java-patch2.txt (11 kB)
6. Text File CollectionAccessFormatter-java.txt (8 kB)

Image Attachments:

1. folder-up.gif
(0.3 kB)
Issue Links:
Depend
 
Relate
 

2.7.x Status: Closed
2.6.x Status: None
2.5.x Status: None
2.4.x Status: None


 Description  « Hide
The access.css uses a different font and font size to the rest of sakai and consequently doesnt look good.

We are using the following, feel free to replace the incumbent (or ignore).

/* access.css : Styles for access servlet (/access/) directory listings */
/*
.directoryIndex { padding:8px; }

body { font-family: Verdana, Arial, sans-serif; }

h2 { font-size: 1.1em; }

td {
     padding-right: .5em;
}

tr {
     vertical-align: top;
}
*/

.directoryIndex{
width: 100%;
padding: 8px;
font-family: 'Trebuchet MS',Verdana,sans-serif;
font-size:.8em;
margin: 0;
background: #fff;
}

table{
margin-left: 2em;
}

td + td {
padding-bottom: 10px;
}

td {
display: list-item;
list-style-type: none;
}

td a {
font-weight: bold;
}


 All   Comments   Work Log   Change History   Subversion Commits   git Commits      Sort Order: Ascending order - Click to sort in descending order
Peter A. Knoop added a comment - 13-Jun-2008 15:31
Gonzalo, is this one you could review? Thanks.

Gonzalo Silverio added a comment - 13-Jun-2008 19:43
Wow - I had no idea this (access servlet) existed, is pretty nice - so lightweight.

Is there any documentation on what the servlet can serve up? Is the present markup it, or are there other versions in other dialects (rss, other xml, etc.)?

Any objections if I try changing the markup a bit to make it a bit more semantic and stylable?



Adam Marshall added a comment - 16-Jun-2008 01:46
It would be great if you could change the mark-up. Hattie from Cambs told me that either Rutgers or New York have done some styling of the access servlet - I dont know whether this work could be embraced?

Some notes / ideas:

If you give a resource folder a description, then on the access page for this folder, you get this description in a <p>..</p> just underneath the title of the folder. It'd be good to have a class attribute in this block.

Also for the 'directory index' table, I'd suggest removing the table and using div's 'n' spans instead and put the individual resource title and resource description in spans.

If you're inside the code making changes and want some ideas (!!), what we'd also like to achieve is to have 'folder' or 'application' icons next to the links, in a similar way to the regular resources tool.

If you could put a <span class="ms-word-doc"> (or "folder" or "PPT" or "PDF" etc) inside the <a href> then we can add background images to each link. [I note that the Resources display does not use this method, it uses 2 <a href>s one which contains an image (word / ppt / pdf etc) and a second which contains the display title of the resource.]

Adam Marshall added a comment - 16-Jun-2008 03:17
The "[Folder]" text should also be in a span so it can be hidden if desired.

Stephen Marquard added a comment - 16-Jun-2008 07:21
The access servlet (/access/content/ or the shortcut /web/) basically just provides directory views (if given a folder name not a filename), and I think supports maybe POST operations for some editor integration requirements, but nothing else.

I think the markup is hardcoded in java code, but that's no reason not to change it :-)

Gonzalo Silverio added a comment - 16-Jun-2008 12:57 - edited
Hi,

Please see (with Firefox, Safari or IE7):

http://garden.dmc.dc.umich.edu:8080/access/content/group/70501be5-3136-4ad5-a771-fb9f87f2b56d/

I think all the folders are public, if not, use admin/admin

All I did was import the default tool sheet, added a few definitions just for access servlet, turned list into an actual list. I think I made all the markup adressable either directly or via inheritance.

If this is ok further work would entail having the access servlet obey the stylesheet of the site, perhaps.

The icons for the files are done via parsing the extension of the file in the css and arranging for the proper icon to be displayed. This is in the nature of an elaborate joke - a more rational solution would be to have the access servlet mime type conscious, but maybe that defeats the "lightweight" nature of this type of access.

Other possibilities: toggle descriptions?

Matthew Buckett added a comment - 17-Jun-2008 02:22
Very nice.

Expandable descriptions would be really nice.

Gonzalo Silverio added a comment - 17-Jun-2008 08:00
access.css patch

Gonzalo Silverio added a comment - 17-Jun-2008 08:00
servlet patch

Gonzalo Silverio added a comment - 17-Jun-2008 08:01
folder up icon

Gonzalo Silverio added a comment - 17-Jun-2008 08:07
Attached 2 patch files and a new image.

Descriptions can be toggled, link to toggle only shows if there are descriptions. "Go one up" link has been moved to top of the page.

There are the following things to consider:

1 - the icon lookup is not "real"

2 - all the strings are in English and in the servlet

3 - I do not really know what other things this is used for - I think I only edited the bits that make the dir listing - but this should be looked at by someone more familiar with the ins and outs of the servlet - there are mentions to the sferix editor, for example, as well as some formish things that I do not really understand.

Thanks!



Adam Marshall added a comment - 06-Jan-2009 10:11
would it be possible to get this patch into 2.6 or 2.7. It is such a HUGE improvement over the current piece of code.


Matthew Buckett added a comment - 06-Jan-2009 13:13
It's not a showstopper but I don't think this works in IE6 according to
http://www.quirksmode.org/css/selector_attributeAdvanced.html

Also rather than using

a[href*='.doc'], a[href*='.rtf']{

should we use the end selector

a[href$='.doc'], a[href$='.rtf']{

so that test.document.txt matches on .txt and not .doc?


Gonzalo Silverio added a comment - 07-Jan-2009 16:07 - edited
New version of patches attached (based on 2.5). The file extension parsing (and class matching) is now scripted so Internet Explorer should be fine now. Adding new file types is also simplified as the css class = the file extension. Also - the extension is lowercased before applied as a class to the link so that it will match the css class (for SAK-15306) even when the extension was not lowercased in the file.

It would be nice if SAK-13693 (make access servlet run with site skin and add access css defs to tool css) was addressed as well.

Gonzalo Silverio added a comment - 07-Jan-2009 19:38
Oh. Am unable to build content-impl in trunk or 2.6 for some reason. It seems to be lacking the needed pom files and the content pom file does not reference it, and that is the limit of my knowledge. The patches could be applied to to 2.5, though, after testing...


Adam Marshall added a comment - 14-Jan-2009 06:19
now that SAK-13752 (update search to use POI 3.5 to index OOXML docs (docx, etc.)) has been resolved (for 2.6/2.7), will your CSS need to be updated for these new file extensions?

Gonzalo Silverio added a comment - 14-Jan-2009 06:37
The new CSS is based on the extension of the documents - the script finds it, assigns the extension as a class to the link, the CSS matches that class with an icon, so it is matter of adding the new extensions to a specific icon in the CSS.

For example - the new CSS has:

.doc, .rtf, .docx, .docm, .dotx, .dotm {
background: url(../../image/sakai/doc.gif) center left no-repeat !important
}

So all wordish things will get the same icon. I did similar things for the rest of the Office docs. This can be expanded to the other icons so that all reasonable file extensions are covered.

I still need help checking this into trunk - as well as resolving SAK-13693

Matthew Buckett added a comment - 25-Mar-2009 04:41
It doesn't look like there is a doc.gif in the sakai icons folder. Attached patch reverts back to the use of word.gif for .doc* files.

Gonzalo Silverio added a comment - 25-Mar-2009 05:21
Hi,

Thanks! Favor? Am unable to build or work with this in a 2.6 context. Also SAK-13693 needs resolution before the results of these patches are of universal help. Could we get all of this checked in somehow and SAK-13693 as well?

Thanks again.

Peter A. Knoop added a comment - 21-Apr-2009 11:36
John L., is this something Jim could help out with, including SAK-13693?

Stephen Marquard added a comment - 24-Nov-2009 00:19
As per KNL-305 we now have the markup changes but not the CSS changes in trunk.

Gonzalo, can you attach a completely new access.css with all the correct styles in it? I ran into trouble applying the 2nd patch above (after applying the first OK).



Gonzalo Silverio added a comment - 24-Nov-2009 07:02 - edited
New patch version (access_css-patch-11-25-09.txt (3 kB). Let me know if there are any problems with it, and thanks for updating the servlet!

Gonzalo Silverio added a comment - 24-Nov-2009 07:04
Any thoughts on SAK-13693? This would make this more useful. Thanks.

Anthony Whyte added a comment - 19-Jan-2010 05:56
2.7.x, r71579.