You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wookie.apache.org by sc...@apache.org on 2012/01/09 15:37:24 UTC

svn commit: r1229174 - /incubator/wookie/trunk/widgets/templates/browse/scripts/browse_controller.js

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()
     },



Re: svn commit: r1229174 - /incubator/wookie/trunk/widgets/templates/browse/scripts/browse_controller.js

Posted by Ross Gardler <rg...@opendirective.com>.
On 9 January 2012 14:37,  <sc...@apache.org> wrote:
> 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)

What a great idea, in a widget I needed to build with this template I
used css to hide it. This is much better as it is automagic.

Thanks.

Ross