]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
Added more error checking for ticket342
authordseif <david.c.seifried@gmail.com>
Sat, 5 Mar 2011 03:00:44 +0000 (19:00 -0800)
committerdseif <david.c.seifried@gmail.com>
Sat, 5 Mar 2011 03:00:44 +0000 (19:00 -0800)
plugins/googlefeed/popcorn.googlefeed.js

index b5faed3369e9a3d476b56bec87407011373be641..084259a9d5b1560a050b0ab27b1e51c3a80b52a1 100644 (file)
@@ -63,8 +63,8 @@
       } else {
         // Create the feed control using the user entered url and title
         new GFdynamicFeedControl( options.url, newdiv, {
-          vertical:   options.orientation == "Vertical" ? true : false,
-          horizontal: options.orientation == "Horizontal" ? true : false,
+          vertical:   options.orientation.toLowerCase() == "vertical" ? true : false,
+          horizontal: options.orientation.toLowerCase() == "horizontal" ? true : false,
           title:      options.title = options.title || "Blog"
         });
       }
@@ -83,8 +83,9 @@
         newdiv.setAttribute( "style", "display:inline" );
         
         // Default to vertical orientation if empty or incorrect input
-        if( !options.orientation || ( options.orientation != "Vertical" && options.orientation != "Horizontal" ) ) {
-          options.orientation = "Vertical";
+        if( !options.orientation || ( options.orientation.toLowerCase() != "vertical" &&
+          options.orientation.toLowerCase() != "horizontal" ) ) {
+          options.orientation = "vertical";
         }
       },
       /**
     options: {
       start          : { elem:"input", type:"text", label:"In" },
       end            : { elem:"input", type:"text", label:"Out" },
-      target         : "map-container",
+      target         : "feed-container",
       url            : { elem:"input", type:"text", label:"url" },
       title          : { elem:"input", type:"text", label:"title" },
       orientation    : { elem:"input", type:"text", label:"orientation" }