frinellkd / simile-widgets

Automatically exported from code.google.com/p/simile-widgets
0 stars 0 forks source link

TIMELINE. The image in the popup box should be clickable and flow with the description. #220

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The current (non-svn-version) shows the image floating right through the
title and description in the popup box. We believe that it's better to have
the image below the title, floating to the right of the description. In
addition, the image should be a link as well, since users are used to
clicking on images.

[Submitted by Alf Lervåg on simile.mit.edu] 

Alf Lervåg - 22/Oct/07 04:44 AM
=== modified file 'simile/scripts/sources.js'
--- simile/scripts/sources.js 2007-09-07 12:35:14 +0000
+++ simile/scripts/sources.js 2007-10-22 08:39:45 +0000
@@ -387,14 +387,6 @@
         var link = this.getLink();
         var image = this.getImage();

- if (image != null) {
- var img = doc.createElement("img");
- img.src = image;
-
- theme.event.bubble.imageStyler(img);
- elmt.appendChild(img);
- }
-
         var divTitle = doc.createElement("div");
         var textTitle = doc.createTextNode(title);
         if (link != null) {
@@ -408,6 +400,21 @@
         theme.event.bubble.titleStyler(divTitle);
         elmt.appendChild(divTitle);

+ if (image != null) {
+ var img = doc.createElement("img");
+ img.src = image;
+ theme.event.bubble.imageStyler(img);
+
+ if (link != null) {
+ var a = doc.createElement("a");
+ a.href = link;
+ a.appendChild(img);
+ elmt.appendChild(a);
+ } else {
+ elmt.appendChild(img);
+ }
+ }
+
         var divBody = doc.createElement("div");
         this.fillDescription(divBody);
         theme.event.bubble.bodyStyler(divBody);
[ Show » ]
Alf Lervåg - 22/Oct/07 04:44 AM === modified file
'simile/scripts/sources.js' --- simile/scripts/sources.js 2007-09-07
12:35:14 +0000 +++ simile/scripts/sources.js 2007-10-22 08:39:45 +0000 @@
-387,14 +387,6 @@          var link = this.getLink();          var image =
this.getImage();           - if (image != null) { - var img =
doc.createElement("img"); - img.src = image; - -
theme.event.bubble.imageStyler(img); - elmt.appendChild(img); - } -       
  var divTitle = doc.createElement("div");          var textTitle =
doc.createTextNode(title);          if (link != null) { @@ -408,6 +400,21
@@          theme.event.bubble.titleStyler(divTitle);         
elmt.appendChild(divTitle);           + if (image != null) { + var img =
doc.createElement("img"); + img.src = image; +
theme.event.bubble.imageStyler(img); + + if (link != null) { + var a =
doc.createElement("a"); + a.href = link; + a.appendChild(img); +
elmt.appendChild(a); + } else { + elmt.appendChild(img); + } + } +        
 var divBody = doc.createElement("div");         
this.fillDescription(divBody);          theme.event.bubble.bodyStyler(divBody);

Original issue reported on code.google.com by GabrielR...@googlemail.com on 8 Apr 2009 at 7:34