nbchip in #272321: CCK field:

Quickswitch option would be usefull for people who already have lots of nodes with attached documents... but maybe its enough to only mention that quickswitch exist ;) http://www.scribd.com/platform/documentation/quickswitch

Comments

rares’s picture

Assigned: Unassigned » rares
Status: Active » Needs review

The June 20 (or CVS if you can't wait) will have a section in the module administration that links to the Scribd Quickswitch page and allows you to paste the JS code from them. You can test it and let me know how works!

rares’s picture

Status: Needs review » Fixed
rares’s picture

In order to have the Quickswitch iPapers display correctly, you need to add the following CSS with your Quickswitch code (in the box on the iPaper Configuration page). I will include this in the box by default in the future versions. On some themes it will still not come out right, maybe the trick there is to add height:100%; next to width:100%;

Rareş

<style>
#attachments{width:100%;}
#attachments thead, #attachments td{display:none;}
#attachments tbody tr td:first-child{display:inline;} 
</style>
vkr11’s picture

Rares,

Adding this code to the quickswitch box made the attachment disappear. However the attachment was fixed once I removed the 3rd line

<style>
#attachments{width:100%;}
#attachments thead, #attachments td{display:none;}  <--- Causes the attachment to dissapear
#attachments tbody tr td:first-child{display:inline;} 
</style>

I am using garland on Drupal 5.7.

Thanks,
Victor

rares’s picture

Status: Fixed » Active

I think it has to do more with the browser understanding the code.
On Firefox and IE7 the code worked, and I tested it with several themes on Drupal 5 and 6. What the display:none line was doing is hiding all the table cells, so that the next line (tr td:first-child) would override that and display the first cell in each row - the link to the document.
I was reading about the :first-child CSS pseudo-class and it says that you need a tag for it to work in IE. I assume you have that, so the next thing must be the version of the browser. According to http://www.w3schools.com/CSS/css_pseudo_classes.asp, IE support for :first-child is only available beginning with version 7.

So here's an a version of the CSS that should work properly on everything other than IE<7 and on IE<7 it will just show all the cells. Let me know if it works.
Rareş

<style>
#attachments{width:100%;}
#attachments thead, #attachments td{display:none;}
#attachments tbody tr td:first-child{display:inline;}
<!--[if lte IE 6]>
#attachments td{display:inline;}
<![endif]-->
</style>
vkr11’s picture

Yeah that worked with IE7 & Firefox. However it is still broken with IE6 (the whole table is invisible with IE6). Removing the third line

#attachments thead, #attachments td{display:none;} <- removing this line fixes IE6

Is there a way we can comment out it only for IE6 but visible in IE7 & Firefox?
Sorry I tried few things but I am not much of a CSS expert.

Thanx,
Victor

rares’s picture

Hmm...
How does this look?

<style>
#attachments{width:100%;}
#attachments thead, #attachments td{display:none;}
#attachments tbody tr td:first-child{display:inline;}
</style>
<!--[if lte IE 6]>
<style>#attachments td{display:inline;}</style>
<![endif]-->
vkr11’s picture

Works like a champ. I tried it with (D5.7 & Garland and here are the results):
IE 7 & Firefox 2 - Works Great
IE 6 - Displays the ipaper in the the two column table (right side is attachment size).

Thanks for looking into this,
Victor

rares’s picture

Status: Active » Fixed

Excellent.

rares’s picture

Hey, actually I just did away with that. The new development version (which will also become the beta) now uses hook_nodeapi to change the code that the upload module adds, stripping everything but the links. This eliminates the need for CSS.

rares’s picture

Forgot to say that you need to run
"UPDATE system SET weight = 1 WHERE name = 'ipaper'" (add table prefix if necessary)
on your database for it to work (or uninstall and reinstall)

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

spiffyd’s picture

The quickswitch documentation link no longer works. Do we still need to specify QS code?

rares’s picture

I believe they are no longer supporting Quickswitch. I can't find it on their site.

spiffyd’s picture

Then module should be updated to reflect this!

rares’s picture

Status: Closed (fixed) » Fixed

I've added text in the administration section (-dev release) telling people that this has been deprecated. Hopefully a future release will offer similar functionality.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.