Author: scottbw
Date: Mon Jan 9 14:37:24 2012
New Revision: 1229174
URL: http://svn.apache.org/viewvc?rev=1229174&view=rev
Log:
Hide the "search" panel on the browse template if there is no search URL
provided, e.g. as in the Wookie Widget Admin Widget (see WOOKIE-299)
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=1229174&r1=1229173&r2=1229174&view=diff
==============================================================================
---
incubator/wookie/trunk/widgets/templates/browse/scripts/browse_controller.js
(original)
+++
incubator/wookie/trunk/widgets/templates/browse/scripts/browse_controller.js
Mon Jan 9 14:37:24 2012
@@ -20,7 +20,12 @@
* This is used to wire up the view and model with actions
*/
var ${widget.shortname}_browse_controller = {
- init:function() {
+ init:function() {
+ //
+ // If there is no URL for searching, don't show
+ // the search panel
+ //
+ if(""==="${browse.search.url}") $("#searchPanel").hide();
${widget.shortname}_browse_controller.update();
${widget.shortname}_browse_controller.search()
},