Author: scottbw
Date: Thu Jan 12 10:12:55 2012
New Revision: 1230470
URL: http://svn.apache.org/viewvc?rev=1230470&view=rev
Log:
Fixed test for a search URL as this would break where the URL is provided as an
eval such as '"q="+query'
Modified:
incubator/wookie/trunk/widgets/templates/browse/scripts/browse_controller.js
Modified:
incubator/wookie/trunk/widgets/templates/browse/scripts/browse_controller.js
URL:
http://svn.apache.org/viewvc/incubator/wookie/trunk/widgets/templates/browse/scripts/browse_controller.js?rev=1230470&r1=1230469&r2=1230470&view=diff
==============================================================================
---
incubator/wookie/trunk/widgets/templates/browse/scripts/browse_controller.js
(original)
+++
incubator/wookie/trunk/widgets/templates/browse/scripts/browse_controller.js
Thu Jan 12 10:12:55 2012
@@ -25,7 +25,9 @@ var ${widget.shortname}_browse_controlle
// If there is no URL for searching, don't show
// the search panel
//
- if(""==="${browse.search.url}") $("#searchPanel").hide();
+ var query = "";
+ var searchUrl = ${browse.search.url};
+ if(searchUrl === "") $("#searchPanel").hide();
${widget.shortname}_browse_controller.update();
${widget.shortname}_browse_controller.search()
},
@@ -94,10 +96,10 @@ var ${widget.shortname}_browse_controlle
displaySummary:function(itemId){
$(".detail").html("<p>Loading...</p>");
var sourceUrl = widget.proxify(${browse.get.detail.url});
- $.mobile.showPageLoadingMsg();
+ $.mobile.showPageLoadingMsg();
var html = ${widget.shortname}_browse_controller.transform(sourceUrl);
$(".detail").html(html);
- $('.detail').click(function() {
+ $('.detail').click(function() {
var event = { widget: "${widget.shortname}", type: "clickItem",
itemId: itemId};
${widget.shortname}_controller.executeCallbacks(event);
});