]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
[#461] review fixes
authorScottDowne <sdowne@learn.senecac.on.ca>
Fri, 22 Jul 2011 14:25:46 +0000 (10:25 -0400)
committerScottDowne <sdowne@learn.senecac.on.ca>
Fri, 22 Jul 2011 14:25:46 +0000 (10:25 -0400)
plugins/mustache/popcorn.mustache.js
plugins/timeline/popcorn.timeline.html

index 92813e89abf3fff8eb2aaf01bfab6b01b394ed2b..d54af2d507e3843ff1a06882a4bda78ff1263b9d 100755 (executable)
       }
     } else if ( typeOfTemplate === 'string' ) {
       template = options.template;
+    } else if ( Popcorn.plugin.debug ) {
+      throw new Error( 'Mustache Plugin Error: options.template must be a String or a Function.' );
     } else {
-      Popcorn.plugin.debug && Popcorn.error( 'Mustache Plugin Error: options.template must be a String or a Function.' );
       template = "";
     }
 
       data = JSON.parse( options.data );
     } else if ( typeOfData === 'object' ) {
       data = options.data;
+    } else if ( Popcorn.plugin.debug ) {
+      thros new Error( 'Mustache Plugin Error: options.data must be a String, Object, or Function.' );
     } else {
-      Popcorn.plugin.debug && Popcorn.error( 'Mustache Plugin Error: options.data must be a String, Object, or Function.' );
       data = "";
     }
 
index 880e2c2b8ebad294d44cb871314de6051b9bdd55..e6dc422fe4793d5f6909c0d7d2ab7e0f73a3527a 100644 (file)
       .volume(0)
       .play()
       .timeline({
+        start: 1, // seconds
+        target: "timeline",
+        title: "This is a title",
+        text: "this is some interesting text that goes inside",
+        innerHTML: "Click here for <a href='http://www.google.ca'>Google</a>" ,
+        direction: "down"
       } )
       .timeline({
         start: 3, // seconds