Pārlūkot izejas kodu

#48 - site search: live search

Alex Trofimov 12 gadi atpakaļ
vecāks
revīzija
3986134f2b

+ 7 - 7
inc/classes/BxDolSearch.php

@@ -40,7 +40,7 @@ class BxDolSearch extends BxDol
     protected $aClasses = array(); ///< array of all search classes
     protected $aClasses = array(); ///< array of all search classes
     protected $aChoice  = array(); ///< array of current search classes which were choosen in search area
     protected $aChoice  = array(); ///< array of current search classes which were choosen in search area
 
 
-    protected $_bQuickSearch = false;
+    protected $_bLiveSearch = false;
 
 
     /**
     /**
      * Constructor
      * Constructor
@@ -83,7 +83,7 @@ class BxDolSearch extends BxDol
             }
             }
             $oEx = new $aValue['class']();
             $oEx = new $aValue['class']();
             $oEx->setId($aValue['id']);
             $oEx->setId($aValue['id']);
-            $oEx->setQuickSearch($this->_bQuickSearch);
+            $oEx->setLiveSearch($this->_bLiveSearch);
             $sCode .= $oEx->processing();
             $sCode .= $oEx->processing();
         }
         }
         return $sCode;
         return $sCode;
@@ -103,9 +103,9 @@ class BxDolSearch extends BxDol
         return $a;
         return $a;
     }
     }
 
 
-    public function setQuickSearch($bQuickSearch)
+    public function setLiveSearch($bLiveSearch)
     {
     {
-        $this->_bQuickSearch = $bQuickSearch;
+        $this->_bLiveSearch = $bLiveSearch;
     }
     }
 }
 }
 
 
@@ -227,7 +227,7 @@ class BxDolSearchResult implements iBxDolReplaceable
     protected $bProcessPrivateContent = true; ///< check each item for privacy, if view isn't allowed then display private view instead
     protected $bProcessPrivateContent = true; ///< check each item for privacy, if view isn't allowed then display private view instead
     protected $bForceAjaxPaginate = false; ///< force ajax paginate
     protected $bForceAjaxPaginate = false; ///< force ajax paginate
 
 
-    protected $_bQuickSearch = false;
+    protected $_bLiveSearch = false;
 
 
     protected $_aMarkers = array (); ///< markers to replace somewhere, usually title and browse url (defined in custom class)
     protected $_aMarkers = array (); ///< markers to replace somewhere, usually title and browse url (defined in custom class)
 
 
@@ -256,9 +256,9 @@ class BxDolSearchResult implements iBxDolReplaceable
         $this->bForceAjaxPaginate = $b;
         $this->bForceAjaxPaginate = $b;
     }
     }
 
 
-    public function setQuickSearch($bQuickSearch)
+    public function setLiveSearch($bLiveSearch)
     {
     {
-        $this->_bQuickSearch = $bQuickSearch;
+        $this->_bLiveSearch = $bLiveSearch;
     }
     }
 
 
     /**
     /**

+ 19 - 3
inc/js/functions.js

@@ -427,16 +427,32 @@ function bx_append_url_params (sUrl, mixedParams) {
     return sUrl + sParams;
     return sUrl + sParams;
 }
 }
 
 
-function bx_search (sFormSel, sResultsContSel, sLoadingContSel) {
+function bx_search_on_type (n, sFormSel, sResultsContSel, sLoadingContSel, bSortResults) {
+    bx_search (n, sFormSel, sResultsContSel, sLoadingContSel, bSortResults);
+    return true;
+}
+
+function bx_search (n, sFormSel, sResultsContSel, sLoadingContSel, bSortResults) {
     if ('undefined' == typeof(sLoadingContSel))
     if ('undefined' == typeof(sLoadingContSel))
         sLoadingContSel = sResultsContSel;
         sLoadingContSel = sResultsContSel;
-    
+    if ('undefined' == typeof(bSortResults))
+        bSortResults = false;
+
     var sQuery = $('input', sFormSel).serialize();
     var sQuery = $('input', sFormSel).serialize();
 
 
     bx_loading($(sLoadingContSel), true);
     bx_loading($(sLoadingContSel), true);
     $.post(sUrlRoot + 'searchKeywordContent.php', sQuery, function(data) {
     $.post(sUrlRoot + 'searchKeywordContent.php', sQuery, function(data) {
-        $(sResultsContSel).html(data).bxTime();
         bx_loading($(sLoadingContSel), false);
         bx_loading($(sLoadingContSel), false);
+        if (bSortResults) {
+            var aSortedUnits = $(data).find(".bx-def-unit-live-search").toArray().sort(function (a, b) {
+                return b.getAttribute('data-ts') - a.getAttribute('data-ts');
+            });
+            data = '';
+            $.each(aSortedUnits.slice(0, n), function (i, e) {
+                data += e.outerHTML;
+            });
+        } 
+        $(sResultsContSel).html(data).bxTime();
     });
     });
 
 
     return false;
     return false;

+ 13 - 0
modules/base/general/template/css/main.css

@@ -0,0 +1,13 @@
+
+/* unit */
+
+.bx-def-unit-live-search {
+    width:236px;
+    width:14.75;
+    overflow:hidden;
+}
+
+.bx-def-unit-live-search .bx-def-unit-info {
+    width:188px;
+    width:11.75;
+}

+ 5 - 0
modules/base/general/template/unit_live_search.html

@@ -0,0 +1,5 @@
+
+<div class="bx-base-general-unit bx-def-unit bx-def-unit-live-search bx-def-margin-sec-bottom" data-ts="__ts__">
+    <a href="__content_url__"><img class="bx-def-thumb bx-def-thumb-size" src="__thumb_url__" /></a><div class="bx-def-unit-info bx-def-thumb-size-max-height bx-def-padding-sec-left"><a href="__content_url__">__title__</a><br /><span class="bx-def-fonr-grayed bx-def-font-small">__module_name__</span></div>
+</div>
+

+ 2 - 0
modules/base/profile/classes/BxBaseModProfileTemplate.php

@@ -40,6 +40,8 @@ class BxBaseModProfileTemplate extends BxBaseModGeneralTemplate
             'thumb_url' => $this->thumb ($aData),
             'thumb_url' => $this->thumb ($aData),
             'content_url' => $sUrl,
             'content_url' => $sUrl,
             'title' => $aData[$CNF['FIELD_NAME']],
             'title' => $aData[$CNF['FIELD_NAME']],
+            'module_name' => _t($CNF['T']['txt_sample_single']),
+            'ts' => $aData[$CNF['FIELD_ADDED']],
         );
         );
 
 
         return $this->parseHtmlByName($sTemplateName, $aVars);
         return $this->parseHtmlByName($sTemplateName, $aVars);

+ 1 - 0
modules/base/profile/template/css/main.css

@@ -1,4 +1,5 @@
 
 
+@import url(../../../general/template/css/main.css);
 
 
 /* browse unit */
 /* browse unit */
 
 

+ 2 - 0
modules/base/text/classes/BxBaseModTextTemplate.php

@@ -67,6 +67,8 @@ class BxBaseModTextTemplate extends BxBaseModGeneralTemplate
             'author' => $oProfile->getDisplayName(),
             'author' => $oProfile->getDisplayName(),
             'author_url' => $oProfile->getUrl(),
             'author_url' => $oProfile->getUrl(),
             'entry_posting_date' => bx_time_js($aData[$CNF['FIELD_ADDED']], BX_FORMAT_DATE),
             'entry_posting_date' => bx_time_js($aData[$CNF['FIELD_ADDED']], BX_FORMAT_DATE),
+            'module_name' => _t($CNF['T']['txt_sample_single']),
+            'ts' => $aData[$CNF['FIELD_ADDED']],
             'bx_if:thumb' => array (
             'bx_if:thumb' => array (
                 'condition' => $sPhotoThumb,
                 'condition' => $sPhotoThumb,
                 'content' => array (
                 'content' => array (

+ 2 - 0
modules/base/text/template/css/main.css

@@ -1,4 +1,6 @@
 
 
+@import url(../../../general/template/css/main.css);
+
 /* unit */
 /* unit */
 
 
 .bx-base-text-unit:first-child h1 {
 .bx-base-text-unit:first-child h1 {

+ 7 - 0
modules/base/text/template/unit_quick_search.html

@@ -0,0 +1,7 @@
+
+<div class="bx-base-text-unit bx-def-unit bx-def-unit-live-search bx-def-margin-sec-bottom" data-ts="__ts__">
+    <bx_if:thumb><a href="__content_url__"><img class="bx-def-thumb-size bx-def-round-corners bx-def-color-bg-sec" src="__thumb_url__" /></a></bx_if:thumb>
+    <bx_if:no_thumb><div class="bx-def-thumb-size bx-def-unit-img bx-def-round-corners bx-def-color-bg-sec"></div></bx_if:no_thumb>
+    <div class="bx-def-unit-info bx-def-thumb-size-max-height bx-def-padding-sec-left"><a href="__content_url__">__title__</a><br /><span class="bx-def-fonr-grayed bx-def-font-small">__module_name__</span></div>
+</div>
+

+ 0 - 1
modules/boonex/notes/install/langs/en.xml

@@ -97,5 +97,4 @@
     <string name="_bx_notes_menu_set_title_entries_my"><![CDATA[My Notes Menu]]></string>
     <string name="_bx_notes_menu_set_title_entries_my"><![CDATA[My Notes Menu]]></string>
 
 
     <string name="_bx_notes_txt_sample_single"><![CDATA[note]]></string>
     <string name="_bx_notes_txt_sample_single"><![CDATA[note]]></string>
-
 </resources>
 </resources>

+ 3 - 0
modules/boonex/notes/template/unit_live_search.html

@@ -0,0 +1,3 @@
+
+<bx_include_base:../modules/base/text/template/unit_live_search.html />
+

+ 2 - 1
modules/boonex/organizations/classes/BxOrgsConfig.php

@@ -43,7 +43,7 @@ class BxOrgsConfig extends BxBaseModProfileConfig
             'FIELD_PICTURE_PREVIEW' => 'picture_preview',
             'FIELD_PICTURE_PREVIEW' => 'picture_preview',
             'FIELD_COVER' => 'cover',
             'FIELD_COVER' => 'cover',
             'FIELD_COVER_PREVIEW' => 'cover_preview',
             'FIELD_COVER_PREVIEW' => 'cover_preview',
-            'FIELDS_QUICK_SEARCH' => array('org_name', 'id'),
+            'FIELDS_QUICK_SEARCH' => array('org_name'),
 
 
             // page URIs
             // page URIs
             'URI_VIEW_ENTRY' => 'view-organization-profile',
             'URI_VIEW_ENTRY' => 'view-organization-profile',
@@ -98,6 +98,7 @@ class BxOrgsConfig extends BxBaseModProfileConfig
 
 
             // some language keys
             // some language keys
             'T' => array (
             'T' => array (
+                'txt_sample_single' => '_bx_orgs_txt_sample_single',
                 'menu_item_title_befriend_sent' => '_bx_orgs_menu_item_title_befriend_sent', 
                 'menu_item_title_befriend_sent' => '_bx_orgs_menu_item_title_befriend_sent', 
                 'menu_item_title_unfriend_cancel_request' => '_bx_orgs_menu_item_title_unfriend_cancel_request',
                 'menu_item_title_unfriend_cancel_request' => '_bx_orgs_menu_item_title_unfriend_cancel_request',
                 'menu_item_title_befriend_confirm' => '_bx_orgs_menu_item_title_befriend_confirm',
                 'menu_item_title_befriend_confirm' => '_bx_orgs_menu_item_title_befriend_confirm',

+ 2 - 0
modules/boonex/organizations/install/langs/en.xml

@@ -151,4 +151,6 @@
     <string name="_bx_orgs_cat_Travel"><![CDATA[Travel]]></string>
     <string name="_bx_orgs_cat_Travel"><![CDATA[Travel]]></string>
     <string name="_bx_orgs_cat_University"><![CDATA[University]]></string>
     <string name="_bx_orgs_cat_University"><![CDATA[University]]></string>
     <string name="_bx_orgs_cat_Other"><![CDATA[Other]]></string>
     <string name="_bx_orgs_cat_Other"><![CDATA[Other]]></string>
+
+    <string name="_bx_orgs_txt_sample_single"><![CDATA[organization]]></string>
 </resources>
 </resources>

+ 3 - 0
modules/boonex/organizations/template/unit_live_search.html

@@ -0,0 +1,3 @@
+
+<bx_include_base:../modules/base/general/template/unit_live_search.html />
+

+ 2 - 1
modules/boonex/persons/classes/BxPersonsConfig.php

@@ -43,7 +43,7 @@ class BxPersonsConfig extends BxBaseModProfileConfig
             'FIELD_PICTURE_PREVIEW' => 'picture_preview',
             'FIELD_PICTURE_PREVIEW' => 'picture_preview',
             'FIELD_COVER' => 'cover',
             'FIELD_COVER' => 'cover',
             'FIELD_COVER_PREVIEW' => 'cover_preview',
             'FIELD_COVER_PREVIEW' => 'cover_preview',
-            'FIELDS_QUICK_SEARCH' => array('fullname', 'id'),
+            'FIELDS_QUICK_SEARCH' => array('fullname'),
 
 
             // page URIs
             // page URIs
             'URI_VIEW_ENTRY' => 'view-persons-profile',
             'URI_VIEW_ENTRY' => 'view-persons-profile',
@@ -98,6 +98,7 @@ class BxPersonsConfig extends BxBaseModProfileConfig
 
 
             // some language keys
             // some language keys
             'T' => array (
             'T' => array (
+                'txt_sample_single' => '_bx_persons_txt_sample_single',
                 'menu_item_title_befriend_sent' => '_bx_persons_menu_item_title_befriend_sent', 
                 'menu_item_title_befriend_sent' => '_bx_persons_menu_item_title_befriend_sent', 
                 'menu_item_title_unfriend_cancel_request' => '_bx_persons_menu_item_title_unfriend_cancel_request',
                 'menu_item_title_unfriend_cancel_request' => '_bx_persons_menu_item_title_unfriend_cancel_request',
                 'menu_item_title_befriend_confirm' => '_bx_persons_menu_item_title_befriend_confirm',
                 'menu_item_title_befriend_confirm' => '_bx_persons_menu_item_title_befriend_confirm',

+ 2 - 0
modules/boonex/persons/install/langs/en.xml

@@ -115,4 +115,6 @@
 
 
     <string name="_bx_persons_txt_account_pending"><![CDATA[This profile is pending approval, please wait until it is activated.]]></string>
     <string name="_bx_persons_txt_account_pending"><![CDATA[This profile is pending approval, please wait until it is activated.]]></string>
     <string name="_bx_persons_txt_account_suspended"><![CDATA[This profile is suspended.]]></string>
     <string name="_bx_persons_txt_account_suspended"><![CDATA[This profile is suspended.]]></string>
+
+    <string name="_bx_persons_txt_sample_single"><![CDATA[person]]></string>
 </resources>
 </resources>

+ 3 - 0
modules/boonex/persons/template/unit_live_search.html

@@ -0,0 +1,3 @@
+
+<bx_include_base:../modules/base/general/template/unit_live_search.html />
+

+ 2 - 2
searchKeyword.php

@@ -13,7 +13,7 @@ bx_import('BxTemplSearch');
 bx_import('BxDolTemplate');
 bx_import('BxDolTemplate');
 
 
 $o = new BxDolSearch();
 $o = new BxDolSearch();
-$o->setQuickSearch(bx_get('quick_search') ? 1 : 0);
+$o->setLiveSearch(bx_get('live_search') ? 1 : 0);
 
 
 $sCode = '';
 $sCode = '';
 if (bx_get('keyword')) {
 if (bx_get('keyword')) {
@@ -23,7 +23,7 @@ if (bx_get('keyword')) {
 }
 }
 
 
 $oSearch = new BxTemplSearch();
 $oSearch = new BxTemplSearch();
-$oSearch->setQuickSearch(false);
+$oSearch->setLiveSearch(false);
 
 
 $oTemplate = BxDolTemplate::getInstance();
 $oTemplate = BxDolTemplate::getInstance();
 $oTemplate->setPageNameIndex (BX_PAGE_DEFAULT);
 $oTemplate->setPageNameIndex (BX_PAGE_DEFAULT);

+ 1 - 1
searchKeywordContent.php

@@ -13,7 +13,7 @@ bx_import('BxDolLanguages');
 bx_import('BxDolSearch');
 bx_import('BxDolSearch');
 
 
 $o = new BxDolSearch(bx_get('section'));
 $o = new BxDolSearch(bx_get('section'));
-$o->setQuickSearch(bx_get('quick_search') ? 1 : 0);
+$o->setLiveSearch(bx_get('live_search') ? 1 : 0);
 $s = $o->response();
 $s = $o->response();
 if (!$s)
 if (!$s)
     $s = $o->getEmptyResult();
     $s = $o->getEmptyResult();

+ 1 - 0
template/css/default.less

@@ -433,6 +433,7 @@ h3,
     white-space:nowrap;
     white-space:nowrap;
 }
 }
 .bx-def-unit .bx-def-unit-info,
 .bx-def-unit .bx-def-unit-info,
+.bx-def-unit .bx-def-unit-img,
 .bx-def-unit img {
 .bx-def-unit img {
     display:inline;
     display:inline;
     display:inline-block;
     display:inline-block;

+ 1 - 1
template/scripts/BxBaseMenuSite.php

@@ -27,7 +27,7 @@ class BxBaseMenuSite extends BxTemplMenu
     {
     {
         bx_import('BxTemplSearch');
         bx_import('BxTemplSearch');
         $oSearch = new BxTemplSearch();
         $oSearch = new BxTemplSearch();
-        $oSearch->setQuickSearch(true);
+        $oSearch->setLiveSearch(true);
 
 
         $aVars = array (
         $aVars = array (
             'menu' => parent::getCode (),
             'menu' => parent::getCode (),

+ 15 - 11
template/scripts/BxBaseSearch.php

@@ -16,7 +16,7 @@ class BxBaseSearch extends BxDolSearch
     protected $_oTemplate;
     protected $_oTemplate;
     protected $_sIdForm = 'sys_search_form';
     protected $_sIdForm = 'sys_search_form';
     protected $_sIdResults = 'sys_search_results';
     protected $_sIdResults = 'sys_search_results';
-    protected $_sSuffixQuickSearch = '_quick';
+    protected $_sSuffixLiveSearch = '_quick';
 
 
     public function __construct($aChoice, $oTemplate)
     public function __construct($aChoice, $oTemplate)
     {
     {
@@ -33,22 +33,23 @@ class BxBaseSearch extends BxDolSearch
         $aValues = $this->getKeyTitlesPairs ();        
         $aValues = $this->getKeyTitlesPairs ();        
         $aValue = isset($_GET['type']) ? bx_process_input($_GET['type']) : array_keys($aValues);
         $aValue = isset($_GET['type']) ? bx_process_input($_GET['type']) : array_keys($aValues);
 
 
-        $sIdForm = $this->_sIdForm . ($this->_bQuickSearch ? $this->_sSuffixQuickSearch : '');
-        $sIdResults = $this->_sIdResults . ($this->_bQuickSearch ? $this->_sSuffixQuickSearch : '');
-        $sIdLoadingContainer = $this->_bQuickSearch ? $sIdResults : $sIdForm;
+        $sIdForm = $this->_sIdForm . ($this->_bLiveSearch ? $this->_sSuffixLiveSearch : '');
+        $sIdResults = $this->_sIdResults . ($this->_bLiveSearch ? $this->_sSuffixLiveSearch : '');
+        $sIdLoadingContainer = $this->_bLiveSearch ? $sIdResults : $sIdForm;
+        $sJsParams = "5, '#{$sIdForm}', '#{$sIdResults}', '#{$sIdLoadingContainer}', '{$this->_bLiveSearch}'";
 
 
         $aForm = array(
         $aForm = array(
             'form_attrs' => array(
             'form_attrs' => array(
                'id' => $sIdForm,
                'id' => $sIdForm,
                'action' => '',
                'action' => '',
                'method' => 'post',
                'method' => 'post',
-               'onsubmit' => "return bx_search('#{$sIdForm}', '#{$sIdResults}', '#{$sIdLoadingContainer}');",
+               'onsubmit' => "return bx_search($sJsParams);",
             ),
             ),
             'inputs' => array(
             'inputs' => array(
-                'quick_search' => array(
+                'live_search' => array(
                     'type' => 'hidden',
                     'type' => 'hidden',
-                    'name' => 'quick_search',
-                    'value' => $this->_bQuickSearch ? 1 : 0,
+                    'name' => 'live_search',
+                    'value' => $this->_bLiveSearch ? 1 : 0,
                 ),
                 ),
                 'section' => array(
                 'section' => array(
                     'type' => 'checkbox_set',
                     'type' => 'checkbox_set',
@@ -70,17 +71,20 @@ class BxBaseSearch extends BxDolSearch
             )
             )
         );
         );
 
 
-        if ($this->_bQuickSearch) {
+        if ($this->_bLiveSearch) {
             unset($aForm['inputs']['section']);
             unset($aForm['inputs']['section']);
             unset($aForm['inputs']['search']);
             unset($aForm['inputs']['search']);
             unset($aForm['inputs']['keyword']['caption']);
             unset($aForm['inputs']['keyword']['caption']);
+            $aForm['inputs']['keyword']['attrs']['onkeypress'] = "return bx_search_on_type($sJsParams);";
+            $aForm['inputs']['keyword']['attrs']['onpaste'] = $aForm['inputs']['keyword']['attrs']['onkeypress'];
+            $aForm['inputs']['keyword']['attrs']['oninput'] = $aForm['inputs']['keyword']['attrs']['onkeypress'];
         }
         }
 
 
         bx_import('BxTemplFormView');
         bx_import('BxTemplFormView');
         $oForm = new BxTemplFormView($aForm);
         $oForm = new BxTemplFormView($aForm);
         $sForm = $oForm->getCode();
         $sForm = $oForm->getCode();
 
 
-        if (!$this->_bQuickSearch) {
+        if (!$this->_bLiveSearch) {
             bx_import('BxTemplPaginate');
             bx_import('BxTemplPaginate');
             $o = new BxTemplPaginate(array());
             $o = new BxTemplPaginate(array());
             $o->addCssJs();
             $o->addCssJs();
@@ -91,7 +95,7 @@ class BxBaseSearch extends BxDolSearch
 
 
     public function getResultsContainer($sCode = '')
     public function getResultsContainer($sCode = '')
     {
     {
-        $sIdResults = $this->_sIdResults . ($this->_bQuickSearch ? $this->_sSuffixQuickSearch : '');
+        $sIdResults = $this->_sIdResults . ($this->_bLiveSearch ? $this->_sSuffixLiveSearch : '');
         return '<div id="' . $sIdResults . '" class="bx-def-margin-top">' . $sCode . '</div>';
         return '<div id="' . $sIdResults . '" class="bx-def-margin-top">' . $sCode . '</div>';
     }
     }
 }
 }

+ 3 - 3
template/scripts/BxBaseSearchResult.php

@@ -16,7 +16,7 @@ class BxBaseSearchResult extends BxDolSearchResult
     protected $sBrowseUrl; ///< currect browse url, used for paginate and other links in browsing
     protected $sBrowseUrl; ///< currect browse url, used for paginate and other links in browsing
 
 
     protected $sUnitTemplate = 'unit.html'; ///< common template to try to use for displaying one item
     protected $sUnitTemplate = 'unit.html'; ///< common template to try to use for displaying one item
-    protected $sUnitTemplateQuickSearch = 'unit_quick_search.html'; ///< common template to try to use for displaying quick search results
+    protected $sUnitTemplateLiveSearch = 'unit_live_search.html'; ///< common template to try to use for displaying live search results
 
 
     protected $aGetParams = array(); ///< get params to keep in paginate and other browsing links
     protected $aGetParams = array(); ///< get params to keep in paginate and other browsing links
 
 
@@ -57,7 +57,7 @@ class BxBaseSearchResult extends BxDolSearchResult
             $sSearchResultBlockId = 'bx-search-result-block-' . rand(0, PHP_INT_MAX);
             $sSearchResultBlockId = 'bx-search-result-block-' . rand(0, PHP_INT_MAX);
             $sCode = '<div id="' . $sSearchResultBlockId . '" class="bx-search-result-block bx-clearfix">' . $sCode . '</div>';
             $sCode = '<div id="' . $sSearchResultBlockId . '" class="bx-search-result-block bx-clearfix">' . $sCode . '</div>';
 
 
-            if ($this->sCenterContentUnitSelector) {
+            if (!$this->_bLiveSearch && $this->sCenterContentUnitSelector) {
                 $sCode .= "
                 $sCode .= "
                     <script>
                     <script>
                         $(document).ready(function() {
                         $(document).ready(function() {
@@ -84,7 +84,7 @@ class BxBaseSearchResult extends BxDolSearchResult
     function displaySearchUnit ($aData) 
     function displaySearchUnit ($aData) 
     {
     {
         $oMain = $this->getMain();
         $oMain = $this->getMain();
-        return $oMain->_oTemplate->unit($aData, $this->bProcessPrivateContent, $this->_bQuickSearch ? $this->sUnitTemplateQuickSearch : $this->sUnitTemplate);
+        return $oMain->_oTemplate->unit($aData, $this->bProcessPrivateContent, $this->_bLiveSearch ? $this->sUnitTemplateLiveSearch : $this->sUnitTemplate);
     }
     }
 
 
     function getDesignBoxMenu () 
     function getDesignBoxMenu ()