Author: rgardler
Date: Sat Dec 29 02:45:49 2012
New Revision: 1426692

URL: http://svn.apache.org/viewvc?rev=1426692&view=rev
Log:
asset player now handles multiple albums of asset collections

Added:
    wookie/trunk/widgets/templates/assetPlayer/content_albums.html
    wookie/trunk/widgets/templates/assetPlayer/index.html
    
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/beeKeeping/
    
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/beeKeeping/3045715262_acbb1f9b60_z.jpg
   (with props)
    
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/beeKeeping/BeeFindsPollen.jpg
   (with props)
    
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/places/
    
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/places/032.jpg
   (with props)
    
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/places/042.jpg
   (with props)
    
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/places/Thumbs.db
   (with props)
    
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/places/eden
 project.jpg   (with props)
    
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/places/edenProject.jpg
   (with props)
    
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/vehicle/
    
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/vehicle/11919_wpm_hires.jpg
   (with props)
    
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/vehicle/14021_wpm_hires.jpg
   (with props)
    
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/vehicle/7863_wpm_hires.jpg
   (with props)
    
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/vehicle/Thumbs.db
   (with props)
Removed:
    
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/032.jpg
    
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/042.jpg
Modified:
    wookie/trunk/widgets/templates/assetPlayer/content_secondary.html
    wookie/trunk/widgets/templates/assetPlayer/readme.txt
    wookie/trunk/widgets/templates/assetPlayer/scripts/asset_controller.js
    wookie/trunk/widgets/templates/assetPlayer/template_build.xml
    wookie/trunk/widgets/templates/base/content_header.html
    
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/Thumbs.db
    
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/scripts/assetPlayerTestWidget_controller.js

Added: wookie/trunk/widgets/templates/assetPlayer/content_albums.html
URL: 
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/assetPlayer/content_albums.html?rev=1426692&view=auto
==============================================================================
--- wookie/trunk/widgets/templates/assetPlayer/content_albums.html (added)
+++ wookie/trunk/widgets/templates/assetPlayer/content_albums.html Sat Dec 29 
02:45:49 2012
@@ -0,0 +1,20 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the 'License'); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an 'AS IS' BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<div>
+  <ul id="albumList">
+  </ul>
+</div>

Modified: wookie/trunk/widgets/templates/assetPlayer/content_secondary.html
URL: 
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/assetPlayer/content_secondary.html?rev=1426692&r1=1426691&r2=1426692&view=diff
==============================================================================
--- wookie/trunk/widgets/templates/assetPlayer/content_secondary.html (original)
+++ wookie/trunk/widgets/templates/assetPlayer/content_secondary.html Sat Dec 
29 02:45:49 2012
@@ -15,7 +15,7 @@
   limitations under the License.
 -->
 <div>
-  <div data-scanOrder="4" id="gotoAlbum" data-role="button">
+  <div data-scanOrder="4" id="selectAlbum" data-role="button">
     Change Photos
   </div>
 

Added: wookie/trunk/widgets/templates/assetPlayer/index.html
URL: 
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/assetPlayer/index.html?rev=1426692&view=auto
==============================================================================
--- wookie/trunk/widgets/templates/assetPlayer/index.html (added)
+++ wookie/trunk/widgets/templates/assetPlayer/index.html Sat Dec 29 02:45:49 
2012
@@ -0,0 +1,84 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="pragma" content="no-cache" />
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<meta name="viewport" content="width=device-width, initial-scale=1">
+
+${content.styles}
+${content.scripts}
+
+<title>${widget.name}</title>
+</head>
+
+<body>
+  <div data-role="page" class="type-home" id="home" data-theme="d">
+    <div id="header" class="header" data-role="header" data-position="fixed">
+      ${content.header}
+    </div> 
+
+    <div data-role="content">
+      <div class="content-primary" id="content-album">
+        ${content.albums}
+      </div>
+    </div>
+
+    <div id="footer" data-role="footer" class="footer" id="footer" 
data-position="fixed">
+      ${content.footer}
+    </div>
+  </div>
+
+  <div data-role="page" class="type-home" id="picture" data-theme="d">
+    <div id="header" class="header" data-role="header" data-position="fixed">
+      ${content.header}
+    </div> 
+
+    <div data-role="content">
+      <div class="content-secondary" id="content-secondary">
+        ${content.secondary}
+      </div>
+
+      <div class="content-primary" id="content-primary">
+        ${content.primary}
+      </div>
+    </div>
+
+    <div id="footer" data-role="footer" class="footer" id="footer" 
data-position="fixed">
+      ${content.footer}
+    </div>
+  </div>
+
+  <div data-role="page" id="tile">
+    ${content.tile}
+  </div><!-- /page -->
+
+  <div data-role="dialog" id="help">
+    <div data-role="header">
+      <h4>Help: ${widget.name}</h4>
+    </div>
+    <!-- /header -->
+    
+    <div data-role="content" class="ui-content" id="content-help">
+      ${widget.help}</div>
+    <!-- /content -->
+  </div>
+  <!-- /page -->
+
+</body>
+</html>

Modified: wookie/trunk/widgets/templates/assetPlayer/readme.txt
URL: 
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/assetPlayer/readme.txt?rev=1426692&r1=1426691&r2=1426692&view=diff
==============================================================================
--- wookie/trunk/widgets/templates/assetPlayer/readme.txt (original)
+++ wookie/trunk/widgets/templates/assetPlayer/readme.txt Sat Dec 29 02:45:49 
2012
@@ -10,63 +10,25 @@ By defaul the template expects to find a
 "asset". This can be changed to an audio or video tag in the widgets
 that build on this template (see content_primary.html).
 
-** Functions
+** Features
 
-  - play a collection of assets in a rolling "slideshow"
+  - present multiple albums of assets
+  - play an album of assets in a rolling "slideshow"
   - move to the next asset
-  - move back tot he previous asset
+  - move back to the previous asset
   - scanning of buttons controlling the player (via the scanning template)
 
 ** Use
 
 By default the asset player assumes all assets are images it is
 therefore easiest to display images using this widget. To do this all
-you need to do is set the collection that should be displayed. This is
-done by calling the setCollection(assets) method, where assets is
-either an array or an object with an "assets" property which is the
-required array.  This array will contain, at least, a "src"
-property which contains the src to use for the HTML image.
-
-For example:
-
-var ${widget.shortname}_images_controller = { 
-    init:function() { 
-        var assets = {
-            "assets": [
-                {
-                   "src":"images/places/032.jpg"
-               },
-                {
-                   "src":"images/places/042.jpg"
-               },
-                {
-                   "src":"images/places/eden project.jpg"
-               },
-                {
-                   "src":"images/places/edenProject.jpg"
-               },
-
-            ]
-        };
-/*
-       var assets = [];
-       assets[0] = {
-           "src":"images/places/032.jpg"
-       };
-       assets[1] = {
-           "src":"images/places/042.jpg"
-       };
-*/
-
-       ${widget.shortname}_asset_controller.setCollection(assets);
-       ${widget.shortname}_scanning_controller.scanElements = 
$('[data-scanOrder]');
-    },
-
-};
-
-$('#home').live('pageshow',function(event) { 
-  ${widget.shortname}_images_controller.init(); 
-});
+you need to do is set the albums that should be displayed. This is
+done by calling the setAlbums(albums) method, where albums is a an
+object that describes the albums of assets that should be presented to
+the user.
+
+See the assetPlayerTestWidget for a working example.
+
 
 *** Assets other than images
 
@@ -86,3 +48,13 @@ something like:
 FIXME: Note that a future version of the player is likely to automaically
 create the relevant HTML tag for a chosen asset type.
 
+
+** Configuration
+*** Parent Templates
+
+This template builds upon the following templates and therefore is
+configurable in any way those templates are:
+
+  * scanning
+  * twoColumn
+  * base

Modified: wookie/trunk/widgets/templates/assetPlayer/scripts/asset_controller.js
URL: 
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/assetPlayer/scripts/asset_controller.js?rev=1426692&r1=1426691&r2=1426692&view=diff
==============================================================================
--- wookie/trunk/widgets/templates/assetPlayer/scripts/asset_controller.js 
(original)
+++ wookie/trunk/widgets/templates/assetPlayer/scripts/asset_controller.js Sat 
Dec 29 02:45:49 2012
@@ -24,7 +24,8 @@ var ${widget.shortname}_asset_controller
     auto: false, // indicates if we are auto playing assets
     staticDuration: 5000, // interval between auto play of static assets (e.g. 
photo's)
     interval: null, // the interval object that controls the auto player
-    collection: null, // the collection of assets to play
+    albums: null, // the albums of colelctions that can be played
+    collection: null, // the collection of assets currently playing
 
     init:function() { 
        // register button events
@@ -36,8 +37,8 @@ var ${widget.shortname}_asset_controller
            ${widget.shortname}_asset_controller.prevAsset();
        });
 
-       $('#gotoAlbum').click(function() {
-           alert("gotoAlbum not implemented yet");
+       $('#selectAlbum').click(function() {
+            $.mobile.changePage($("#home"));
        });
 
        $('#playPause').click(function() {
@@ -52,19 +53,58 @@ var ${widget.shortname}_asset_controller
            }
        });
     },
+
+    initAlbums:function() { 
+        var list = $("#albumList");
+        var albums = ${widget.shortname}_asset_controller.albums;
+        if (albums) {
+            list.empty();
+            $.each(
+                albums,
+                function( intIndex, album ){
+                    
list.append(${widget.shortname}_asset_controller.getAlbumCover(album));
+                    $("#" + album.title).click(function() {
+                        ${widget.shortname}_asset_controller.showAlbum(album);
+                    });
+                }
+            );
+        } else {
+            list.append("Loading Albums...");
+        }
+    },
+
+    getAlbumCover:function(album) {
+      var html = "<li id='" + album.title + "'>";
+      html = html + "<img src='" + album.preview + "' width='120' 
height='120'/> ";
+      html = html + album.title;
+      html = html + "</a></li>";
+      return $(html);
+    },
+
+    showAlbum:function(album) {
+       ${widget.shortname}_asset_controller.setCollection(album);
+        $.mobile.changePage("#picture");
+    },
+
+    setAlbums:function(albums) {
+       ${widget.shortname}_asset_controller.albums = albums;
+        ${widget.shortname}_asset_controller.initAlbums();
+    },
+
     
-    // Set the collection to an array. The "album" should be wither an array 
or an
+    // Set the collection, that is the collection being shown at this time
+    // to an array of assets. The "collection" should be either an array or an
     // object with an assets property which is the required array.
     //
     // The array will contain, at least, a src property which contains the src 
to
     // use for the HTML image.
-    setCollection:function(album){
-        if (album.assets) {
-           ${widget.shortname}_asset_controller.collection = album.assets;
+    setCollection:function(collection){
+        if (collection.assets) {
+           ${widget.shortname}_asset_controller.collection = collection.assets;
         } else {
-           ${widget.shortname}_asset_controller.collection = album;
+           ${widget.shortname}_asset_controller.collection = collection;
         }
-        // FIXME: cache images for faster slideshow. e.g. 
http://www.anthonymclin.com/code/7-miscellaneous/98-on-demand-image-loading-with-jquery
+        // TODO: cache images for faster slideshow. e.g. 
http://www.anthonymclin.com/code/7-miscellaneous/98-on-demand-image-loading-with-jquery
        ${widget.shortname}_asset_controller.displayAsset(0);
     },
 
@@ -73,24 +113,24 @@ var ${widget.shortname}_asset_controller
     },
     
     displayAsset:function(idx) {
-       var album = ${widget.shortname}_asset_controller.getCollection();
-       $('#asset').attr("src", album[idx].src);
+       var collection = ${widget.shortname}_asset_controller.getCollection();
+       $('#asset').attr("src", collection[idx].src);
     },
 
     nextAsset:function() {
-       var album = ${widget.shortname}_asset_controller.getCollection();
+       var collection = ${widget.shortname}_asset_controller.getCollection();
        ${widget.shortname}_asset_controller.idx += 1;
-        if (${widget.shortname}_asset_controller.idx >= album.length) { 
+        if (${widget.shortname}_asset_controller.idx >= collection.length) { 
            ${widget.shortname}_asset_controller.idx = 0;
        };
        
${widget.shortname}_asset_controller.displayAsset(${widget.shortname}_asset_controller.idx);
     },
 
     prevAsset:function() {
-       var album = ${widget.shortname}_asset_controller.getCollection();
+       var collection = ${widget.shortname}_asset_controller.getCollection();
        ${widget.shortname}_asset_controller.idx -= 1;
         if (${widget.shortname}_asset_controller.idx <0) { 
-           ${widget.shortname}_asset_controller.idx = album.length - 1;
+           ${widget.shortname}_asset_controller.idx = collection.length - 1;
        };
        
${widget.shortname}_asset_controller.displayAsset(${widget.shortname}_asset_controller.idx);
     },
@@ -108,6 +148,10 @@ var ${widget.shortname}_asset_controller
     }
 };
 
-$('#home').live('pageshow',function(event) { 
+$('#picture').live('pageinit',function(event) { 
   ${widget.shortname}_asset_controller.init(); 
 });
+
+$('#home').live('pageinit',function(event) { 
+  ${widget.shortname}_asset_controller.initAlbums(); 
+});

Modified: wookie/trunk/widgets/templates/assetPlayer/template_build.xml
URL: 
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/assetPlayer/template_build.xml?rev=1426692&r1=1426691&r2=1426692&view=diff
==============================================================================
--- wookie/trunk/widgets/templates/assetPlayer/template_build.xml (original)
+++ wookie/trunk/widgets/templates/assetPlayer/template_build.xml Sat Dec 29 
02:45:49 2012
@@ -112,6 +112,30 @@
       </filterchain>
     </loadfile>
 
+    <loadfile property="content.albums"
+             srcFile="content_albums.html"
+             failonerror="false">
+      <filterchain>
+       <expandproperties/>
+      </filterchain>
+    </loadfile>
+
+    <loadfile property="content.albums"
+             srcFile="../common/content_albums.html"
+             failonerror="false">
+      <filterchain>
+       <expandproperties/>
+      </filterchain>
+    </loadfile>
+    
+    <loadfile property="content.albums"
+              srcFile="${template.dir}/${template.name}/content_albums.html"
+              failonerror="false">
+      <filterchain>
+       <expandproperties/>
+      </filterchain>
+    </loadfile>
+
     <loadfile property="content.footer"
               srcFile="content_footer.html"
               failonerror="false">
@@ -166,4 +190,4 @@
     </ant>
 
   </target>
-</project>
\ No newline at end of file
+</project>

Modified: wookie/trunk/widgets/templates/base/content_header.html
URL: 
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/base/content_header.html?rev=1426692&r1=1426691&r2=1426692&view=diff
==============================================================================
--- wookie/trunk/widgets/templates/base/content_header.html (original)
+++ wookie/trunk/widgets/templates/base/content_header.html Sat Dec 29 02:45:49 
2012
@@ -1,17 +1,17 @@
-<%
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-%>
-<div class="header_title" id="view_title">see content_header.html</div>
+<%
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+%>
+<div class="header_title" id="view_title">see content_header.html</div>

Modified: 
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/Thumbs.db
URL: 
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/Thumbs.db?rev=1426692&r1=1426691&r2=1426692&view=diff
==============================================================================
Binary files - no diff available.

Added: 
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/beeKeeping/3045715262_acbb1f9b60_z.jpg
URL: 
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/beeKeeping/3045715262_acbb1f9b60_z.jpg?rev=1426692&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/beeKeeping/3045715262_acbb1f9b60_z.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: 
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/beeKeeping/BeeFindsPollen.jpg
URL: 
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/beeKeeping/BeeFindsPollen.jpg?rev=1426692&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/beeKeeping/BeeFindsPollen.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: 
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/places/032.jpg
URL: 
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/places/032.jpg?rev=1426692&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/places/032.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: 
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/places/042.jpg
URL: 
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/places/042.jpg?rev=1426692&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/places/042.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: 
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/places/Thumbs.db
URL: 
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/places/Thumbs.db?rev=1426692&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/places/Thumbs.db
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: 
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/places/eden
 project.jpg
URL: 
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/places/eden%20project.jpg?rev=1426692&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/places/eden
 project.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: 
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/places/edenProject.jpg
URL: 
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/places/edenProject.jpg?rev=1426692&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/places/edenProject.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: 
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/vehicle/11919_wpm_hires.jpg
URL: 
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/vehicle/11919_wpm_hires.jpg?rev=1426692&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/vehicle/11919_wpm_hires.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: 
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/vehicle/14021_wpm_hires.jpg
URL: 
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/vehicle/14021_wpm_hires.jpg?rev=1426692&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/vehicle/14021_wpm_hires.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: 
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/vehicle/7863_wpm_hires.jpg
URL: 
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/vehicle/7863_wpm_hires.jpg?rev=1426692&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/vehicle/7863_wpm_hires.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: 
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/vehicle/Thumbs.db
URL: 
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/vehicle/Thumbs.db?rev=1426692&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/images/vehicle/Thumbs.db
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: 
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/scripts/assetPlayerTestWidget_controller.js
URL: 
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/scripts/assetPlayerTestWidget_controller.js?rev=1426692&r1=1426691&r2=1426692&view=diff
==============================================================================
--- 
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/scripts/assetPlayerTestWidget_controller.js
 (original)
+++ 
wookie/trunk/widgets/templates/testWidgets/assetPlayerTestWidget/scripts/assetPlayerTestWidget_controller.js
 Sat Dec 29 02:45:49 2012
@@ -19,20 +19,59 @@
 
 var ${widget.shortname}_images_controller = { 
     init:function() { 
-       // FIXME: album should be created by reading a directory
-       var assets = [];
-       assets[0] = {
-           "src":"images/032.jpg"
-       };
-       assets[1] = {
-           "src":"images/042.jpg"
-       };
-       ${widget.shortname}_asset_controller.setCollection(assets);
+        var albums = {
+            "places": {
+                "title": "Places",
+                "preview": "images/places/032.jpg",
+                "assets": [
+                    {
+                       "src":"images/places/032.jpg"
+                   },
+                    {
+                       "src":"images/places/042.jpg"
+                   },
+                    {
+                       "src":"images/places/eden project.jpg"
+                   },
+                    {
+                       "src":"images/places/edenProject.jpg"
+                   }
+                ]
+            },
+            "beeKeeping": {
+                "title": "Bees",
+                "preview": "images/beeKeeping/3045715262_acbb1f9b60_z.jpg",
+                "assets": [
+                    {
+                       "src":"images/beeKeeping/3045715262_acbb1f9b60_z.jpg"
+                   },
+                    {
+                       "src":"images/beeKeeping/BeeFindsPollen.jpg"
+                   }
+                ]
+            },
+            "vehicles": {
+                "title": "Vehicles",
+                "preview": "images/vehicle/11919_wpm_hires.jpg",
+                "assets": [
+                    {
+                       "src":"images/vehicle/11919_wpm_hires.jpg"
+                   },
+                    {
+                       "src":"images/vehicle/14021_wpm_hires.jpg"
+                   },
+                    {
+                       "src":"images/vehicle/7863_wpm_hires.jpg"
+                   },
+                ]
+            }
+        }
+       ${widget.shortname}_asset_controller.setAlbums(albums);
        ${widget.shortname}_scanning_controller.scanElements = 
$('[data-scanOrder]');
     },
 
 };
 
-$('#home').live('pageshow',function(event) { 
+$('#home').live('pageinit',function(event) { 
   ${widget.shortname}_images_controller.init(); 
 });


Reply via email to