Peter Frederick wrote:
> Hi Folks,
>
> I've noticed that when you have no image link in your source (when viewing
> the bubble) you get the broken link icon appearing. This shows up if you
> look at Brian's Exhibit (formulated with data from a Googledocs
> spreadsheet).
>
> http://webdrive.service.emory.edu/users/bcroxal/www/Portfolio/GoogleFormsTim
> eline.html
>
> Originally I thought that Googledocs was publishing the blank field (in the
> JSON data stream) but that is not the case. The same issue does not appear
> in the original Timeline code. Ie: if you have no image link nothing
> appears. It would be nicer if the Exhibit bubble on the timeline did the
> same thing.
>
> From Brians example htm file you have this 'description' for the
> bubble/lens:
>
>       <div ex:role="lens" class="a-lens">
>         <b ex:content=".label"></b><p> 
>                 <img ex:src-content=".image"><p>
>                 <p ex:content=".description"></p>
>                 <i ex:content=".name"></i>
>         </div> 
>
> This says how the image is to be displayed but it gives a broken link if the
> content of the image field is empty.
> This is based on data (ie: content) - some lines have an image, some don't.
> It something that needs to be determined when the bubble is displayed.
>
> Is there some attribute I can change in the lens definition area or is this
> an enhancement suggestion?
>   
You can change

    <img ex:src-content=".image"><p>

to

    <img ex:if-exists=".image" ex:src-content=".image" />

Or if Google Spreadsheets returns empty strings for empty cells, then 
you can test it with ex:if

    <img ex:if=".image <> ''" ex:src-content=".image" />

(That's a pair of single quotes.)

By the way, watch out for non-matching closing tags. The line

    <b ex:content=".label"></b><p>

should not have <p> at the end.

David

_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general

Reply via email to