r2565 - photoviewer: set title for image based on anchor title, add suffix with instructions

r2565 - photoviewer: set title for image based on anchor title, add suffix with instructions


Author: joern.zaefferer
Date: Thu May 14 01:26:10 2009
New Revision: 2565
Modified:
branches/photoviewer/demos/photoviewer/default.html
branches/photoviewer/ui/ui.photoviewer.js
Log:
photoviewer: set title for image based on anchor title, add suffix with
instructions
Modified: branches/photoviewer/demos/photoviewer/default.html
==============================================================================
--- branches/photoviewer/demos/photoviewer/default.html    (original)
+++ branches/photoviewer/demos/photoviewer/default.html    Thu May 14 01:26:10
2009
@@ -34,12 +34,12 @@
    <div id="photos">
        <div style="float:left; width: 258px;">
-            <a href="photos/flight.jpg">
+            <a href="photos/flight.jpg" title="Flight">
                <img src="photos/flight-thumb.jpg" />
            </a>
        </div>
        <div style="float:left; width: 92px;">
-            <a href="photos/earth.jpg">
+            <a href="photos/earth.jpg" title="Earth">
                <img src="photos/earth-thumb.jpg" />
            </a>
            <a href="photos/rocket.jpg">
Modified: branches/photoviewer/ui/ui.photoviewer.js
==============================================================================
--- branches/photoviewer/ui/ui.photoviewer.js    (original)
+++ branches/photoviewer/ui/ui.photoviewer.js    Thu May 14 01:26:10 2009
@@ -119,7 +119,7 @@
                });
            }
            
-            this._viewer("new").attr("src", anchor.href).one("load", function() {
+            this._viewer("new").attr("title", anchor.title +
this.options.titleSuffix).attr("src", anchor.href).one("load", function() {
                if (self.options.resize) {
                    self._resize($(this));
                }
@@ -194,6 +194,7 @@
            loop: true,
            overlay: true,
            resize: false,
+            titleSuffix: " - Click anywhere to close, use keyboard arrows or
mousewheel to rotate images",
            rotateIn: function(direction) {
                $(this).effect("drop", {
                    direction: direction,