Sha256: d1530395d4b6bb09f837a066050a52c697a981b2dab5e62a8a858bd5c8eeb9cb

Contents?: true

Size: 1.65 KB

Versions: 13

Compression:

Stored size: 1.65 KB

Contents

widgetTpl = new Ext.Template(
    "<% #Optional Parameters:\n",
    "   # content_type: Leave blank to search all section types, set to Blog to only search Blog articles\n",
    "   # section_permalink: This is the permalink value for the section \n",
    "   #                    Useful if you only want to search articles within a single Blog section\n",
    "   # results_permalink: How do you want your results to display? via ajax? or on a new page?\n",
    "   #                    Leave blank if you want results to display via ajax on the same page as the search form\n",
    "   #                    Enter the permalink of results page if you want the search results to display on a new page\n",
    "   # per_page: Number of results per page \n",
    "   # class: CSS class for the form %>\n",
    "<%= render_widget :search, \n",
    "                  :action => get_widget_action,\n",
    "                  :params => set_widget_params({\n",
    "                               :content_type => '',\n", 
    "                               :section_permalink => '',\n", 
    "                               :results_permalink => '',\n",
    "                               :per_page => 20,\n",
    "                               :class => ''}) %>\n"
    );
    
Compass.ErpApp.Widgets.Search = {
    addSearch:function(){
        Ext.getCmp('knitkitCenterRegion').addContentToActiveCodeMirror(widgetTpl.apply({})); 
    }
}

Compass.ErpApp.Widgets.AvailableWidgets.push({
    name:'Search',
    iconUrl:'/images/icons/search/search_48x48.png',
    onClick:Compass.ErpApp.Widgets.Search.addSearch,
    about:'This widget allows users to search for content in a website.'
});

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
knitkit-2.1.2 app/widgets/search/javascript/search.js
knitkit-2.1.1 app/widgets/search/javascript/search.js
knitkit-2.1.0 app/widgets/search/javascript/search.js
knitkit-2.0.11 app/widgets/search/javascript/search.js
knitkit-2.0.10 app/widgets/search/javascript/search.js
knitkit-2.0.9 app/widgets/search/javascript/search.js
knitkit-2.0.7 app/widgets/search/javascript/search.js
knitkit-2.0.6 app/widgets/search/javascript/search.js
knitkit-2.0.5 app/widgets/search/javascript/search.js
knitkit-2.0.4 app/widgets/search/javascript/search.js
knitkit-2.0.3 app/widgets/search/javascript/search.js
knitkit-2.0.2 app/widgets/search/javascript/search.js
knitkit-2.0.1 app/widgets/search/javascript/search.js