Просмотр исходного кода

Ticket #1430 - Mature-audience content filter (PG, PG13, R): Group based modules.

AntonLV 4 лет назад
Родитель
Сommit
89c1773df1
32 измененных файлов с 134 добавлено и 309 удалено
  1. 2 0
      modules/boonex/channels/classes/BxCnlConfig.php
  2. 1 1
      modules/boonex/channels/classes/BxCnlModule.php
  3. 4 1
      modules/boonex/channels/classes/BxCnlSearchResult.php
  4. 1 0
      modules/boonex/channels/install/langs/en.xml
  5. 6 2
      modules/boonex/channels/install/sql/install.sql
  6. 6 47
      modules/boonex/channels/js/manage_tools.js
  7. 2 0
      modules/boonex/courses/classes/BxCoursesConfig.php
  8. 5 2
      modules/boonex/courses/classes/BxCoursesSearchResult.php
  9. 1 0
      modules/boonex/courses/install/langs/en.xml
  10. 6 2
      modules/boonex/courses/install/sql/install.sql
  11. 6 53
      modules/boonex/courses/js/manage_tools.js
  12. 2 0
      modules/boonex/events/classes/BxEventsConfig.php
  13. 4 1
      modules/boonex/events/classes/BxEventsSearchResult.php
  14. 6 5
      modules/boonex/events/install/langs/en.xml
  15. 8 4
      modules/boonex/events/install/sql/install.sql
  16. 6 53
      modules/boonex/events/js/manage_tools.js
  17. 2 0
      modules/boonex/groups/classes/BxGroupsConfig.php
  18. 7 4
      modules/boonex/groups/classes/BxGroupsSearchResult.php
  19. 1 0
      modules/boonex/groups/install/langs/en.xml
  20. 6 2
      modules/boonex/groups/install/sql/install.sql
  21. 6 54
      modules/boonex/groups/js/manage_tools.js
  22. 1 0
      modules/boonex/russian/data/langs/bx_channels/ru.xml
  23. 1 0
      modules/boonex/russian/data/langs/bx_courses/ru.xml
  24. 1 0
      modules/boonex/russian/data/langs/bx_events/ru.xml
  25. 1 0
      modules/boonex/russian/data/langs/bx_groups/ru.xml
  26. 1 0
      modules/boonex/russian/data/langs/bx_spaces/ru.xml
  27. 5 4
      modules/boonex/spaces/classes/BxSpacesConfig.php
  28. 4 1
      modules/boonex/spaces/classes/BxSpacesSearchResult.php
  29. 19 18
      modules/boonex/spaces/install/langs/en.xml
  30. 6 2
      modules/boonex/spaces/install/sql/install.sql
  31. 6 53
      modules/boonex/spaces/js/manage_tools.js
  32. 1 0
      modules/boonex/timeline/classes/BxTimelineResponse.php

+ 2 - 0
modules/boonex/channels/classes/BxCnlConfig.php

@@ -43,6 +43,7 @@ class BxCnlConfig extends BxBaseModGroupsConfig
             'FIELD_PICTURE' => 'picture',
             'FIELD_COVER' => 'cover',
             'FIELD_ALLOW_VIEW_TO' => 'allow_view_to',
+            'FIELD_CF' => 'cf',
             'FIELD_VIEWS' => 'views',
             'FIELD_COMMENTS' => 'comments',
             'FIELD_STATUS' => 'status',
@@ -155,6 +156,7 @@ class BxCnlConfig extends BxBaseModGroupsConfig
                 'filter_item_pending' => '_bx_channels_grid_filter_item_title_adm_pending',
                 'filter_item_suspended' => '_bx_channels_grid_filter_item_title_adm_suspended',
                 'filter_item_select_one_filter1' => '_bx_channels_grid_filter_item_title_adm_select_one_filter1',
+                'filter_item_select_one_filter2' => '_bx_channels_grid_filter_item_title_adm_select_one_filter2',
                 'menu_item_manage_my' => '_bx_channels_menu_item_title_manage_my',
                 'menu_item_manage_all' => '_bx_channels_menu_item_title_manage_all',
                 'txt_all_entries_by_author' => '_bx_channels_page_title_browse_by_author'

+ 1 - 1
modules/boonex/channels/classes/BxCnlModule.php

@@ -63,7 +63,7 @@ class BxCnlModule extends BxBaseModGroupsModule
                     $iProfileId = BxDolProfile::getInstanceByAccount(array_shift($aOperators))->id();
             }
 
-            $aContent = $this->serviceEntityAdd($iProfileId, array($CNF['FIELD_NAME'] => $sHashtag));
+            $aContent = $this->serviceEntityAdd($iProfileId, array($CNF['FIELD_NAME'] => $sHashtag, $CNF['FIELD_CF'] => 1));
             checkActionModule($this->_iProfileId, 'create channel auto', $this->getName(), true);
             if(isset($aContent['content']) && isset($aContent['content']['id']))
                 $mixedCnlId = $aContent['content']['id'];

+ 4 - 1
modules/boonex/channels/classes/BxCnlSearchResult.php

@@ -161,9 +161,12 @@ class BxCnlSearchResult extends BxBaseModGroupsSearchResult
                 $this->isError = true;
         }
 
-        if ($bProcessConditionsForPrivateContent)
+        if ($bProcessConditionsForPrivateContent) {
             $this->addConditionsForPrivateContent($CNF, $oJoinedProfile);
 
+            $this->addCustomConditions($CNF, $oJoinedProfile, $sMode, $aParams);
+        }
+
         $this->sCenterContentUnitSelector = false;
     }
 

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

@@ -208,6 +208,7 @@
         <string name="_bx_channels_menu_item_title_followings"><![CDATA[Channels]]></string>
 
 	<string name="_bx_channels_grid_filter_item_title_adm_select_one_filter1"><![CDATA[All Statuses]]></string>
+        <string name="_bx_channels_grid_filter_item_title_adm_select_one_filter2"><![CDATA[Any Audience]]></string>
 	<string name="_bx_channels_grid_filter_item_title_adm_active"><![CDATA[Active]]></string>
 	<string name="_bx_channels_grid_filter_item_title_adm_pending"><![CDATA[Pending]]></string>
 	<string name="_bx_channels_grid_filter_item_title_adm_suspended"><![CDATA[Suspended]]></string>

+ 6 - 2
modules/boonex/channels/install/sql/install.sql

@@ -19,6 +19,7 @@ CREATE TABLE IF NOT EXISTS `bx_cnl_data` (
   `comments` int(11) NOT NULL default '0',
   `reports` int(11) NOT NULL default '0',
   `featured` int(11) NOT NULL default '0',
+  `cf` int(11) NOT NULL default '1',
   `allow_view_to` varchar(255) DEFAULT '3',
   `status` enum('active','awaiting','hidden') NOT NULL DEFAULT 'active',
   PRIMARY KEY (`id`),
@@ -220,6 +221,7 @@ INSERT INTO `sys_form_displays`(`object`, `display_name`, `module`, `view_mode`,
 ('bx_channel', 'bx_channel_view_full', 'bx_channels', 1, '_bx_channels_form_profile_display_view_full');
 
 INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `checked`, `type`, `caption_system`, `caption`, `info`, `required`, `collapsed`, `html`, `attrs`, `attrs_tr`, `attrs_wrapper`, `checker_func`, `checker_params`, `checker_error`, `db_pass`, `db_params`, `editable`, `deletable`) VALUES 
+('bx_channel', 'bx_channels', 'cf', '1', '#!sys_content_filter', 0, 'select', '_sys_form_entry_input_sys_cf', '_sys_form_entry_input_cf', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
 ('bx_channel', 'bx_channels', 'delete_confirm', 1, '', 0, 'checkbox', '_bx_channels_form_profile_input_sys_delete_confirm', '_bx_channels_form_profile_input_delete_confirm', '_bx_channels_form_profile_input_delete_confirm_info', 1, 0, 0, '', '', '', 'avail', '', '_bx_channels_form_profile_input_delete_confirm_error', '', '', 1, 0),
 ('bx_channel', 'bx_channels', 'do_submit', '_sys_form_account_input_submit', '', 0, 'submit', '_bx_channels_form_profile_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_channel', 'bx_channels', 'channel_name', '', '', 0, 'text', '_bx_channels_form_profile_input_sys_channel_name', '_bx_channels_form_profile_input_channel_name', '', 1, 0, 0, '', '', '', 'avail', '', '_bx_channels_form_profile_input_channel_name_err', 'Xss', '', 1, 0),
@@ -228,13 +230,15 @@ INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `ch
 
 INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES 
 ('bx_channel_add', 'channel_name', 2147483647, 1, 1),
-('bx_channel_add', 'do_submit', 2147483647, 1, 2),
+('bx_channel_add', 'cf', 2147483647, 1, 2),
+('bx_channel_add', 'do_submit', 2147483647, 1, 3),
 
 ('bx_channel_delete', 'delete_confirm', 2147483647, 1, 0),
 ('bx_channel_delete', 'do_submit', 2147483647, 1, 1),
 
 ('bx_channel_edit', 'channel_name', 2147483647, 1, 1),
-('bx_channel_edit', 'do_submit', 2147483647, 1, 2),
+('bx_channel_edit', 'cf', 2147483647, 1, 2),
+('bx_channel_edit', 'do_submit', 2147483647, 1, 3),
 
 ('bx_channel_edit_cover', 'cover', 2147483647, 1, 1),
 ('bx_channel_edit_cover', 'do_submit', 2147483647, 1, 2),

+ 6 - 47
modules/boonex/channels/js/manage_tools.js

@@ -8,55 +8,14 @@
  * @{
  */
 
-function BxCnlManageTools(oOptions) {
-	this._iSearchTimeoutId = false;
-	this._sActionsUrl = oOptions.sActionUrl;
-	this._sObjNameGrid = oOptions.sObjNameGrid;
-	this._sObjName = oOptions.sObjName == undefined ? 'oBxCnlManageTools' : oOptions.sObjName;
+function BxCnlManageTools(oOptions)
+{
+    BxBaseModGroupsManageTools.call(this, oOptions);
 
-    this._sAnimationEffect = oOptions.sAnimationEffect == undefined ? 'fade' : oOptions.sAnimationEffect;
-    this._iAnimationSpeed = oOptions.iAnimationSpeed == undefined ? 'slow' : oOptions.iAnimationSpeed;
-    this._sParamsDivider = oOptions.sParamsDivider == undefined ? '#-#' : oOptions.sParamsDivider;
-
-    this._aHtmlIds = oOptions.aHtmlIds == undefined ? {} : oOptions.aHtmlIds;
-    this._oRequestParams = oOptions.oRequestParams == undefined ? {} : oOptions.oRequestParams;
+    this._sObjName = oOptions.sObjName == undefined ? 'oBxCnlManageTools' : oOptions.sObjName;
 }
 
-BxCnlManageTools.prototype.onChangeFilter = function (oFilter) {
-	var $this = this;
-	var oFilter1 = $('#bx-grid-filter1-' + this._sObjNameGrid);
-	var sValueFilter1 = oFilter1.length > 0 ? oFilter1.val() : '';
-
-	var oSearch = $('#bx-grid-search-' + this._sObjNameGrid);
-	var sValueSearch = oSearch.length > 0 ? oSearch.val() : '';
-	if(sValueSearch == _t('_sys_grid_search'))
-		sValueSearch = '';
-
-	clearTimeout($this._iSearchTimeoutId);
-    $this._iSearchTimeoutId = setTimeout(function () {
-        glGrids[$this._sObjNameGrid].setFilter(sValueFilter1 + $this._sParamsDivider + sValueSearch, true);
-    }, 500);
-};
-
-BxCnlManageTools.prototype.onClickSettings = function (sMenuObject, oButton) {
-	if($(oButton).hasClass('bx-btn-disabled'))
-		return false;
-
-	bx_menu_popup(sMenuObject, oButton, {}, {
-		content_id: $(oButton).attr('bx_grid_action_data')
-	});
-};
-
-BxCnlManageTools.prototype.onClickDelete = function (iContentId) {
-	$('.bx-popup-applied:visible').dolPopupHide();
-
-	glGrids[this._sObjNameGrid].actionWithId(iContentId, 'delete', {}, '', false, 1);
-};
-
-BxCnlManageTools.prototype.onClickDeleteWithContent = function (iContentId) {
-	$('.bx-popup-applied:visible').dolPopupHide();
-
-	glGrids[this._sObjNameGrid].actionWithId(iContentId, 'delete_with_content', {}, '', false, 1);
-};
+BxCnlManageTools.prototype = Object.create(BxBaseModGroupsManageTools.prototype);
+BxCnlManageTools.prototype.constructor = BxCnlManageTools;
 
 /** @} */

+ 2 - 0
modules/boonex/courses/classes/BxCoursesConfig.php

@@ -49,6 +49,7 @@ class BxCoursesConfig extends BxBaseModGroupsConfig
             'FIELD_JOIN_CONFIRMATION' => 'join_confirmation',
             'FIELD_ALLOW_VIEW_TO' => 'allow_view_to',
             'FIELD_ALLOW_POST_TO' => 'allow_post_to',
+            'FIELD_CF' => 'cf',
             'FIELD_VIEWS' => 'views',
             'FIELD_VOTES' => 'votes',
             'FIELD_STATUS' => 'status',
@@ -213,6 +214,7 @@ class BxCoursesConfig extends BxBaseModGroupsConfig
                 'filter_item_pending' => '_bx_courses_grid_filter_item_title_adm_pending',
                 'filter_item_suspended' => '_bx_courses_grid_filter_item_title_adm_suspended',
                 'filter_item_select_one_filter1' => '_bx_courses_grid_filter_item_title_adm_select_one_filter1',
+                'filter_item_select_one_filter2' => '_bx_courses_grid_filter_item_title_adm_select_one_filter2',
                 'menu_item_manage_my' => '_bx_courses_menu_item_title_manage_my',
                 'menu_item_manage_all' => '_bx_courses_menu_item_title_manage_all',
                 'menu_item_title_become_fan_sent' => '_bx_courses_menu_item_title_become_fan_sent',

+ 5 - 2
modules/boonex/courses/classes/BxCoursesSearchResult.php

@@ -32,7 +32,7 @@ class BxCoursesSearchResult extends BxBaseModGroupsSearchResult
                 'featured' => array('value' => '', 'field' => 'featured', 'operator' => '<>', 'table' => 'bx_courses_data'),
             ),
             'join' => array (
-                    'profile' => array(
+                'profile' => array(
                     'type' => 'INNER',
                     'table' => 'bx_courses_data',
                     'mainField' => 'content_id',
@@ -171,9 +171,12 @@ class BxCoursesSearchResult extends BxBaseModGroupsSearchResult
                 $this->isError = true;
         }
 
-        if ($bProcessConditionsForPrivateContent)
+        if ($bProcessConditionsForPrivateContent) {
             $this->addConditionsForPrivateContent($CNF, $oJoinedProfile);
 
+            $this->addCustomConditions($CNF, $oJoinedProfile, $sMode, $aParams);
+        }
+
         $this->sCenterContentUnitSelector = false;
     }
 

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

@@ -309,6 +309,7 @@
     <string name="_bx_courses_menu_item_title_sm_leave_cancel"><![CDATA[Cancel attend request]]></string>
 
     <string name="_bx_courses_grid_filter_item_title_adm_select_one_filter1"><![CDATA[All Statuses]]></string>
+    <string name="_bx_courses_grid_filter_item_title_adm_select_one_filter2"><![CDATA[Any Audience]]></string>
     <string name="_bx_courses_grid_filter_item_title_adm_active"><![CDATA[Active]]></string>
     <string name="_bx_courses_grid_filter_item_title_adm_pending"><![CDATA[Pending]]></string>
     <string name="_bx_courses_grid_filter_item_title_adm_suspended"><![CDATA[Suspended]]></string>

+ 6 - 2
modules/boonex/courses/install/sql/install.sql

@@ -23,6 +23,7 @@ CREATE TABLE IF NOT EXISTS `bx_courses_data` (
   `comments` int(11) NOT NULL default '0',
   `reports` int(11) NOT NULL default '0',
   `featured` int(11) NOT NULL default '0',
+  `cf` int(11) NOT NULL default '1',
   `join_confirmation` tinyint(4) NOT NULL DEFAULT '0',
   `allow_view_to` varchar(16) NOT NULL DEFAULT '3',
   `allow_post_to` varchar(16) NOT NULL DEFAULT '3',
@@ -308,6 +309,7 @@ INSERT INTO `sys_form_displays`(`object`, `display_name`, `module`, `view_mode`,
 ('bx_course', 'bx_course_invite', 'bx_courses', 0, '_bx_courses_form_profile_display_invite');
 
 INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `checked`, `type`, `caption_system`, `caption`, `info`, `required`, `collapsed`, `html`, `attrs`, `attrs_tr`, `attrs_wrapper`, `checker_func`, `checker_params`, `checker_error`, `db_pass`, `db_params`, `editable`, `deletable`) VALUES 
+('bx_course', 'bx_courses', 'cf', '', '#!sys_content_filter', 0, 'select', '_sys_form_entry_input_sys_cf', '_sys_form_entry_input_cf', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
 ('bx_course', 'bx_courses', 'allow_view_to', 3, '', 0, 'custom', '_bx_courses_form_profile_input_sys_allow_view_to', '_bx_courses_form_profile_input_allow_view_to', '_bx_courses_form_profile_input_allow_view_to_desc', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_course', 'bx_courses', 'allow_post_to', 3, '', 0, 'custom', '_bx_courses_form_profile_input_sys_allow_post_to', '_bx_courses_form_profile_input_allow_post_to', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_course', 'bx_courses', 'delete_confirm', 1, '', 0, 'checkbox', '_bx_courses_form_profile_input_sys_delete_confirm', '_bx_courses_form_profile_input_delete_confirm', '_bx_courses_form_profile_input_delete_confirm_info', 1, 0, 0, '', '', '', 'avail', '', '_bx_courses_form_profile_input_delete_confirm_error', '', '', 1, 0),
@@ -331,7 +333,8 @@ INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for
 ('bx_course_add', 'join_confirmation', 2147483647, 1, 6),
 ('bx_course_add', 'allow_view_to', 2147483647, 1, 7),
 ('bx_course_add', 'allow_post_to', 2147483647, 1, 8),
-('bx_course_add', 'do_submit', 2147483647, 1, 9),
+('bx_course_add', 'cf', 2147483647, 1, 9),
+('bx_course_add', 'do_submit', 2147483647, 1, 10),
 
 ('bx_course_invite', 'initial_members', 2147483647, 1, 1),
 ('bx_course_invite', 'do_submit', 2147483647, 1, 2),
@@ -346,7 +349,8 @@ INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for
 ('bx_course_edit', 'join_confirmation', 2147483647, 1, 5),
 ('bx_course_edit', 'allow_view_to', 2147483647, 1, 6),
 ('bx_course_edit', 'allow_post_to', 2147483647, 1, 7),
-('bx_course_edit', 'do_submit', 2147483647, 1, 8),
+('bx_course_edit', 'cf', 2147483647, 1, 8),
+('bx_course_edit', 'do_submit', 2147483647, 1, 9),
 
 ('bx_course_edit_cover', 'cover', 2147483647, 1, 1),
 ('bx_course_edit_cover', 'do_submit', 2147483647, 1, 2),

+ 6 - 53
modules/boonex/courses/js/manage_tools.js

@@ -8,61 +8,14 @@
  * @{
  */
 
-function BxCoursesManageTools(oOptions) {
-    this._iSearchTimeoutId = false;
-    this._sActionsUrl = oOptions.sActionUrl;
-    this._sObjNameGrid = oOptions.sObjNameGrid;
-    this._sObjName = oOptions.sObjName == undefined ? 'oBxCoursesManageTools' : oOptions.sObjName;
-
-    this._sAnimationEffect = oOptions.sAnimationEffect == undefined ? 'fade' : oOptions.sAnimationEffect;
-    this._iAnimationSpeed = oOptions.iAnimationSpeed == undefined ? 'slow' : oOptions.iAnimationSpeed;
-    this._sParamsDivider = oOptions.sParamsDivider == undefined ? '#-#' : oOptions.sParamsDivider;
+function BxCoursesManageTools(oOptions)
+{
+    BxBaseModGroupsManageTools.call(this, oOptions);
 
-    this._aHtmlIds = oOptions.aHtmlIds == undefined ? {} : oOptions.aHtmlIds;
-    this._oRequestParams = oOptions.oRequestParams == undefined ? {} : oOptions.oRequestParams;
+    this._sObjName = oOptions.sObjName == undefined ? 'oBxCoursesManageTools' : oOptions.sObjName;
 }
 
-BxCoursesManageTools.prototype.onChangeFilter = function(oFilter) {
-    var $this = this;
-    var oFilter1 = $('#bx-grid-filter1-' + this._sObjNameGrid);
-    var sValueFilter1 = oFilter1.length > 0 ? oFilter1.val() : '';
-
-    var oSearch = $('#bx-grid-search-' + this._sObjNameGrid);
-    var sValueSearch = oSearch.length > 0 ? oSearch.val() : '';
-    if(sValueSearch == _t('_sys_grid_search'))
-        sValueSearch = '';
-
-    clearTimeout($this._iSearchTimeoutId);
-    $this._iSearchTimeoutId = setTimeout(function () {
-        glGrids[$this._sObjNameGrid].setFilter(sValueFilter1 + $this._sParamsDivider + sValueSearch, true);
-    }, 500);
-};
-
-BxCoursesManageTools.prototype.onClickSettings = function(sMenuObject, oButton) {
-    if($(oButton).hasClass('bx-btn-disabled'))
-        return false;
-
-    bx_menu_popup(sMenuObject, oButton, {}, {
-        content_id: $(oButton).attr('bx_grid_action_data')
-    });
-};
-
-BxCoursesManageTools.prototype.onClickDelete = function(iContentId) {
-    $('.bx-popup-applied:visible').dolPopupHide();
-
-    glGrids[this._sObjNameGrid].actionWithId(iContentId, 'delete', {}, '', false, 1);
-};
-
-BxCoursesManageTools.prototype.onClickDeleteWithContent = function(iContentId) {
-    $('.bx-popup-applied:visible').dolPopupHide();
-
-    glGrids[this._sObjNameGrid].actionWithId(iContentId, 'delete_with_content', {}, '', false, 1);
-};
-
-BxCoursesManageTools.prototype.onClickClearReports = function (iContentId) {
-    $('.bx-popup-applied:visible').dolPopupHide();
-
-    glGrids[this._sObjNameGrid].actionWithId(iContentId, 'clear_reports', {}, '', false, 1);
-};
+BxCoursesManageTools.prototype = Object.create(BxBaseModGroupsManageTools.prototype);
+BxCoursesManageTools.prototype.constructor = BxCoursesManageTools;
 
 /** @} */

+ 2 - 0
modules/boonex/events/classes/BxEventsConfig.php

@@ -54,6 +54,7 @@ class BxEventsConfig extends BxBaseModGroupsConfig
             'FIELD_REMINDER' => 'reminder',
             'FIELD_ALLOW_VIEW_TO' => 'allow_view_to',
             'FIELD_ALLOW_POST_TO' => 'allow_post_to',
+            'FIELD_CF' => 'cf',
             'FIELD_VIEWS' => 'views',
             'FIELD_VOTES' => 'votes',
             'FIELD_COMMENTS' => 'comments',
@@ -229,6 +230,7 @@ class BxEventsConfig extends BxBaseModGroupsConfig
             	'filter_item_pending' => '_bx_events_grid_filter_item_title_adm_pending',
             	'filter_item_suspended' => '_bx_events_grid_filter_item_title_adm_suspended',
             	'filter_item_select_one_filter1' => '_bx_events_grid_filter_item_title_adm_select_one_filter1',
+                'filter_item_select_one_filter2' => '_bx_events_grid_filter_item_title_adm_select_one_filter2',
             	'menu_item_manage_my' => '_bx_events_menu_item_title_manage_my',
                 'menu_item_manage_all' => '_bx_events_menu_item_title_manage_all',
                 'menu_item_title_become_fan_sent' => '_bx_events_menu_item_title_become_fan_sent',

+ 4 - 1
modules/boonex/events/classes/BxEventsSearchResult.php

@@ -224,8 +224,11 @@ class BxEventsSearchResult extends BxBaseModGroupsSearchResult
                 $this->isError = true;
         }
 
-        if ($bProcessConditionsForPrivateContent)
+        if ($bProcessConditionsForPrivateContent) {
             $this->addConditionsForPrivateContent($CNF, $oJoinedProfile);
+            
+            $this->addCustomConditions($CNF, $oJoinedProfile, $sMode, $aParams);
+        }
 
         $this->sCenterContentUnitSelector = false;
     }

+ 6 - 5
modules/boonex/events/install/langs/en.xml

@@ -364,6 +364,7 @@
     <string name="_bx_events_menu_item_title_sm_date_end"><![CDATA[Date end]]></string>
 
     <string name="_bx_events_grid_filter_item_title_adm_select_one_filter1"><![CDATA[All Statuses]]></string>
+    <string name="_bx_events_grid_filter_item_title_adm_select_one_filter2"><![CDATA[Any Audience]]></string>
     <string name="_bx_events_grid_filter_item_title_adm_active"><![CDATA[Active]]></string>
     <string name="_bx_events_grid_filter_item_title_adm_pending"><![CDATA[Pending]]></string>
     <string name="_bx_events_grid_filter_item_title_adm_suspended"><![CDATA[Suspended]]></string>
@@ -374,11 +375,11 @@
     <string name="_bx_events_grid_action_title_adm_delete"><![CDATA[Delete]]></string>
     <string name="_bx_events_grid_action_title_adm_delete_with_content"><![CDATA[Delete With Content]]></string>
     <string name="_bx_events_grid_action_title_adm_more_actions"><![CDATA[More Actions]]></string>
-  <string name="_bx_events_grid_action_title_adm_audit_content"><![CDATA[Audit actions with content]]></string>
-  <string name="_bx_events_grid_action_title_adm_audit_context"><![CDATA[Audit actions in context]]></string>
-  <string name="_bx_events_grid_action_title_adm_clear_reports"><![CDATA[Сlear reports]]></string>
-	<string name="_bx_events_grid_action_err_delete"><![CDATA[Cannot delete the selected event(s).]]></string>
-	<string name="_bx_events_grid_txt_account_manager"><![CDATA[Redirect to manage account.]]></string>
+    <string name="_bx_events_grid_action_title_adm_audit_content"><![CDATA[Audit actions with content]]></string>
+    <string name="_bx_events_grid_action_title_adm_audit_context"><![CDATA[Audit actions in context]]></string>
+    <string name="_bx_events_grid_action_title_adm_clear_reports"><![CDATA[Сlear reports]]></string>
+    <string name="_bx_events_grid_action_err_delete"><![CDATA[Cannot delete the selected event(s).]]></string>
+    <string name="_bx_events_grid_txt_account_manager"><![CDATA[Redirect to manage account.]]></string>
 
     <string name="_bx_events_grid_column_title_name"><![CDATA[Name]]></string>
     <string name="_bx_events_grid_column_title_role_id"><![CDATA[Role]]></string>

+ 8 - 4
modules/boonex/events/install/sql/install.sql

@@ -28,6 +28,7 @@ CREATE TABLE IF NOT EXISTS `bx_events_data` (
   `comments` int(11) NOT NULL default '0',
   `reports` int(11) NOT NULL default '0',
   `featured` int(11) NOT NULL default '0',
+  `cf` int(11) NOT NULL default '1',
   `join_confirmation` tinyint(4) NOT NULL DEFAULT '0',
   `reminder` int(11) NOT NULL DEFAULT '1',
   `allow_view_to` varchar(16) NOT NULL DEFAULT '3',
@@ -327,6 +328,7 @@ INSERT INTO `sys_form_displays`(`object`, `display_name`, `module`, `view_mode`,
 ('bx_event', 'bx_event_invite', 'bx_events', 0, '_bx_events_form_profile_display_invite');
 
 INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `checked`, `type`, `caption_system`, `caption`, `info`, `required`, `collapsed`, `html`, `attrs`, `attrs_tr`, `attrs_wrapper`, `checker_func`, `checker_params`, `checker_error`, `db_pass`, `db_params`, `editable`, `deletable`) VALUES 
+('bx_event', 'bx_events', 'cf', '', '#!sys_content_filter', 0, 'select', '_sys_form_entry_input_sys_cf', '_sys_form_entry_input_cf', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
 ('bx_event', 'bx_events', 'allow_view_to', 3, '', 0, 'custom', '_bx_events_form_profile_input_sys_allow_view_to', '_bx_events_form_profile_input_allow_view_to', '_bx_events_form_profile_input_allow_view_to_desc', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_event', 'bx_events', 'allow_post_to', 'p', '', 0, 'custom', '_bx_events_form_profile_input_sys_allow_post_to', '_bx_events_form_profile_input_allow_post_to', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_event', 'bx_events', 'cover', 'a:1:{i:0;s:20:\"bx_events_cover_crop\";}', 'a:1:{s:20:\"bx_events_cover_crop\";s:24:\"_sys_uploader_crop_title\";}', 0, 'files', '_bx_events_form_profile_input_sys_cover', '_bx_events_form_profile_input_cover', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
@@ -368,8 +370,9 @@ INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for
 ('bx_event_add', 'reminder', 2147483647, 1, 15),
 ('bx_event_add', 'allow_view_to', 2147483647, 1, 16),
 ('bx_event_add', 'allow_post_to', 2147483647, 1, 17),
-('bx_event_add', 'published', 192, 1, 18),
-('bx_event_add', 'do_submit', 2147483647, 1, 19),
+('bx_event_add', 'cf', 2147483647, 1, 18),
+('bx_event_add', 'published', 192, 1, 19),
+('bx_event_add', 'do_submit', 2147483647, 1, 20),
 
 ('bx_event_invite', 'initial_members', 2147483647, 1, 1),
 ('bx_event_invite', 'do_submit', 2147483647, 1, 2),
@@ -398,8 +401,9 @@ INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for
 ('bx_event_edit', 'reminder', 2147483647, 1, 15),
 ('bx_event_edit', 'allow_view_to', 2147483647, 1, 16),
 ('bx_event_edit', 'allow_post_to', 2147483647, 1, 17),
-('bx_event_edit', 'published', 192, 1, 18),
-('bx_event_edit', 'do_submit', 2147483647, 1, 19),
+('bx_event_edit', 'cf', 2147483647, 1, 18),
+('bx_event_edit', 'published', 192, 1, 19),
+('bx_event_edit', 'do_submit', 2147483647, 1, 20),
 
 ('bx_event_edit_cover', 'allow_view_to', 2147483647, 0, 1),
 ('bx_event_edit_cover', 'time', 2147483647, 0, 2),

+ 6 - 53
modules/boonex/events/js/manage_tools.js

@@ -8,61 +8,14 @@
  * @{
  */
 
-function BxEventsManageTools(oOptions) {
-	this._iSearchTimeoutId = false;
-	this._sActionsUrl = oOptions.sActionUrl;
-	this._sObjNameGrid = oOptions.sObjNameGrid;
-    this._sObjName = oOptions.sObjName == undefined ? 'oBxEventsManageTools' : oOptions.sObjName;
-
-    this._sAnimationEffect = oOptions.sAnimationEffect == undefined ? 'fade' : oOptions.sAnimationEffect;
-    this._iAnimationSpeed = oOptions.iAnimationSpeed == undefined ? 'slow' : oOptions.iAnimationSpeed;
-    this._sParamsDivider = oOptions.sParamsDivider == undefined ? '#-#' : oOptions.sParamsDivider;
+function BxEventsManageTools(oOptions)
+{
+    BxBaseModGroupsManageTools.call(this, oOptions);
 
-    this._aHtmlIds = oOptions.aHtmlIds == undefined ? {} : oOptions.aHtmlIds;
-    this._oRequestParams = oOptions.oRequestParams == undefined ? {} : oOptions.oRequestParams;
+    this._sObjName = oOptions.sObjName == undefined ? 'oBxEventsManageTools' : oOptions.sObjName;
 }
 
-BxEventsManageTools.prototype.onChangeFilter = function(oFilter) {
-	var $this = this;
-	var oFilter1 = $('#bx-grid-filter1-' + this._sObjNameGrid);
-	var sValueFilter1 = oFilter1.length > 0 ? oFilter1.val() : '';
-
-	var oSearch = $('#bx-grid-search-' + this._sObjNameGrid);
-	var sValueSearch = oSearch.length > 0 ? oSearch.val() : '';
-	if(sValueSearch == _t('_sys_grid_search'))
-		sValueSearch = '';
-
-	clearTimeout($this._iSearchTimeoutId);
-    $this._iSearchTimeoutId = setTimeout(function () {
-        glGrids[$this._sObjNameGrid].setFilter(sValueFilter1 + $this._sParamsDivider + sValueSearch, true);
-    }, 500);
-};
-
-BxEventsManageTools.prototype.onClickSettings = function(sMenuObject, oButton) {
-	if($(oButton).hasClass('bx-btn-disabled'))
-		return false;
-
-	bx_menu_popup(sMenuObject, oButton, {}, {
-		content_id: $(oButton).attr('bx_grid_action_data')
-	});
-};
-
-BxEventsManageTools.prototype.onClickDelete = function(iContentId) {
-	$('.bx-popup-applied:visible').dolPopupHide();
-
-	glGrids[this._sObjNameGrid].actionWithId(iContentId, 'delete', {}, '', false, 1);
-};
-
-BxEventsManageTools.prototype.onClickDeleteWithContent = function(iContentId) {
-	$('.bx-popup-applied:visible').dolPopupHide();
-
-	glGrids[this._sObjNameGrid].actionWithId(iContentId, 'delete_with_content', {}, '', false, 1);
-};
-
-BxEventsManageTools.prototype.onClickClearReports = function (iContentId) {
-    $('.bx-popup-applied:visible').dolPopupHide();
-
-    glGrids[this._sObjNameGrid].actionWithId(iContentId, 'clear_reports', {}, '', false, 1);
-};
+BxEventsManageTools.prototype = Object.create(BxBaseModGroupsManageTools.prototype);
+BxEventsManageTools.prototype.constructor = BxEventsManageTools;
 
 /** @} */

+ 2 - 0
modules/boonex/groups/classes/BxGroupsConfig.php

@@ -49,6 +49,7 @@ class BxGroupsConfig extends BxBaseModGroupsConfig
             'FIELD_JOIN_CONFIRMATION' => 'join_confirmation',
             'FIELD_ALLOW_VIEW_TO' => 'allow_view_to',
             'FIELD_ALLOW_POST_TO' => 'allow_post_to',
+            'FIELD_CF' => 'cf',
             'FIELD_VIEWS' => 'views',
             'FIELD_VOTES' => 'votes',
             'FIELD_STATUS' => 'status',
@@ -215,6 +216,7 @@ class BxGroupsConfig extends BxBaseModGroupsConfig
                 'filter_item_pending' => '_bx_groups_grid_filter_item_title_adm_pending',
                 'filter_item_suspended' => '_bx_groups_grid_filter_item_title_adm_suspended',
                 'filter_item_select_one_filter1' => '_bx_groups_grid_filter_item_title_adm_select_one_filter1',
+                'filter_item_select_one_filter2' => '_bx_groups_grid_filter_item_title_adm_select_one_filter2',
                 'menu_item_manage_my' => '_bx_groups_menu_item_title_manage_my',
                 'menu_item_manage_all' => '_bx_groups_menu_item_title_manage_all',
                 'menu_item_title_become_fan_sent' => '_bx_groups_menu_item_title_become_fan_sent',

+ 7 - 4
modules/boonex/groups/classes/BxGroupsSearchResult.php

@@ -25,14 +25,14 @@ class BxGroupsSearchResult extends BxBaseModGroupsSearchResult
             'ownFields' => array(),
             'searchFields' => array(),
             'restriction' => array(
-        		'account_id' => array('value' => '', 'field' => 'account_id', 'operator' => '='),
+                'account_id' => array('value' => '', 'field' => 'account_id', 'operator' => '='),
                 'perofileStatus' => array('value' => 'active', 'field' => 'status', 'operator' => '='),
                 'perofileType' => array('value' => 'bx_groups', 'field' => 'type', 'operator' => '='),
                 'owner' => array('value' => '', 'field' => 'author', 'operator' => '=', 'table' => 'bx_groups_data'),
-        		'featured' => array('value' => '', 'field' => 'featured', 'operator' => '<>', 'table' => 'bx_groups_data'),
+                'featured' => array('value' => '', 'field' => 'featured', 'operator' => '<>', 'table' => 'bx_groups_data'),
             ),
             'join' => array (
-				'profile' => array(
+                'profile' => array(
                     'type' => 'INNER',
                     'table' => 'bx_groups_data',
                     'mainField' => 'content_id',
@@ -177,9 +177,12 @@ class BxGroupsSearchResult extends BxBaseModGroupsSearchResult
                 $this->isError = true;
         }
 
-        if ($bProcessConditionsForPrivateContent)
+        if ($bProcessConditionsForPrivateContent) {
             $this->addConditionsForPrivateContent($CNF, $oJoinedProfile);
 
+            $this->addCustomConditions($CNF, $oJoinedProfile, $sMode, $aParams);
+        }
+
         $this->sCenterContentUnitSelector = false;
     }
 

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

@@ -311,6 +311,7 @@
     <string name="_bx_groups_menu_item_title_sm_privacy"><![CDATA[Privacy]]></string>
 
     <string name="_bx_groups_grid_filter_item_title_adm_select_one_filter1"><![CDATA[All Statuses]]></string>
+    <string name="_bx_groups_grid_filter_item_title_adm_select_one_filter2"><![CDATA[Any Audience]]></string>
     <string name="_bx_groups_grid_filter_item_title_adm_active"><![CDATA[Active]]></string>
     <string name="_bx_groups_grid_filter_item_title_adm_pending"><![CDATA[Pending]]></string>
     <string name="_bx_groups_grid_filter_item_title_adm_suspended"><![CDATA[Suspended]]></string>

+ 6 - 2
modules/boonex/groups/install/sql/install.sql

@@ -23,6 +23,7 @@ CREATE TABLE IF NOT EXISTS `bx_groups_data` (
   `comments` int(11) NOT NULL default '0',
   `reports` int(11) NOT NULL default '0',
   `featured` int(11) NOT NULL default '0',
+  `cf` int(11) NOT NULL default '1',
   `join_confirmation` tinyint(4) NOT NULL DEFAULT '0',
   `allow_view_to` varchar(16) NOT NULL DEFAULT '3',
   `allow_post_to` varchar(16) NOT NULL DEFAULT '3',
@@ -308,6 +309,7 @@ INSERT INTO `sys_form_displays`(`object`, `display_name`, `module`, `view_mode`,
 ('bx_group', 'bx_group_invite', 'bx_groups', 0, '_bx_groups_form_profile_display_invite');
 
 INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `checked`, `type`, `caption_system`, `caption`, `info`, `required`, `collapsed`, `html`, `attrs`, `attrs_tr`, `attrs_wrapper`, `checker_func`, `checker_params`, `checker_error`, `db_pass`, `db_params`, `editable`, `deletable`) VALUES 
+('bx_group', 'bx_groups', 'cf', '', '#!sys_content_filter', 0, 'select', '_sys_form_entry_input_sys_cf', '_sys_form_entry_input_cf', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
 ('bx_group', 'bx_groups', 'allow_view_to', 3, '', 0, 'custom', '_bx_groups_form_profile_input_sys_allow_view_to', '_bx_groups_form_profile_input_allow_view_to', '_bx_groups_form_profile_input_allow_view_to_desc', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_group', 'bx_groups', 'allow_post_to', 3, '', 0, 'custom', '_bx_groups_form_profile_input_sys_allow_post_to', '_bx_groups_form_profile_input_allow_post_to', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_group', 'bx_groups', 'delete_confirm', 1, '', 0, 'checkbox', '_bx_groups_form_profile_input_sys_delete_confirm', '_bx_groups_form_profile_input_delete_confirm', '_bx_groups_form_profile_input_delete_confirm_info', 1, 0, 0, '', '', '', 'avail', '', '_bx_groups_form_profile_input_delete_confirm_error', '', '', 1, 0),
@@ -331,7 +333,8 @@ INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for
 ('bx_group_add', 'join_confirmation', 2147483647, 1, 6),
 ('bx_group_add', 'allow_view_to', 2147483647, 1, 7),
 ('bx_group_add', 'allow_post_to', 2147483647, 1, 8),
-('bx_group_add', 'do_submit', 2147483647, 1, 9),
+('bx_group_add', 'cf', 2147483647, 1, 9),
+('bx_group_add', 'do_submit', 2147483647, 1, 10),
 
 ('bx_group_invite', 'initial_members', 2147483647, 1, 1),
 ('bx_group_invite', 'do_submit', 2147483647, 1, 2),
@@ -346,7 +349,8 @@ INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for
 ('bx_group_edit', 'join_confirmation', 2147483647, 1, 5),
 ('bx_group_edit', 'allow_view_to', 2147483647, 1, 6),
 ('bx_group_edit', 'allow_post_to', 2147483647, 1, 7),
-('bx_group_edit', 'do_submit', 2147483647, 1, 8),
+('bx_group_edit', 'cf', 2147483647, 1, 8),
+('bx_group_edit', 'do_submit', 2147483647, 1, 9),
 
 ('bx_group_edit_cover', 'cover', 2147483647, 1, 1),
 ('bx_group_edit_cover', 'do_submit', 2147483647, 1, 2),

+ 6 - 54
modules/boonex/groups/js/manage_tools.js

@@ -8,62 +8,14 @@
  * @{
  */
 
-function BxGroupsManageTools(oOptions) {
-	this._iSearchTimeoutId = false;
-	this._sActionsUrl = oOptions.sActionUrl;
-	this._sObjNameGrid = oOptions.sObjNameGrid;
-    this._sObjName = oOptions.sObjName == undefined ? 'oBxGroupsManageTools' : oOptions.sObjName;
-
-    this._sAnimationEffect = oOptions.sAnimationEffect == undefined ? 'fade' : oOptions.sAnimationEffect;
-    this._iAnimationSpeed = oOptions.iAnimationSpeed == undefined ? 'slow' : oOptions.iAnimationSpeed;
-    this._sParamsDivider = oOptions.sParamsDivider == undefined ? '#-#' : oOptions.sParamsDivider;
+function BxGroupsManageTools(oOptions)
+{
+    BxBaseModGroupsManageTools.call(this, oOptions);
 
-    this._aHtmlIds = oOptions.aHtmlIds == undefined ? {} : oOptions.aHtmlIds;
-    this._oRequestParams = oOptions.oRequestParams == undefined ? {} : oOptions.oRequestParams;
+    this._sObjName = oOptions.sObjName == undefined ? 'oBxGroupsManageTools' : oOptions.sObjName;
 }
 
-BxGroupsManageTools.prototype.onChangeFilter = function(oFilter) {
-	var $this = this;
-	var oFilter1 = $('#bx-grid-filter1-' + this._sObjNameGrid);
-	var sValueFilter1 = oFilter1.length > 0 ? oFilter1.val() : '';
-
-	var oSearch = $('#bx-grid-search-' + this._sObjNameGrid);
-	var sValueSearch = oSearch.length > 0 ? oSearch.val() : '';
-	if(sValueSearch == _t('_sys_grid_search'))
-		sValueSearch = '';
-
-	clearTimeout($this._iSearchTimeoutId);
-    $this._iSearchTimeoutId = setTimeout(function () {
-        glGrids[$this._sObjNameGrid].setFilter(sValueFilter1 + $this._sParamsDivider + sValueSearch, true);
-    }, 500);
-};
-
-BxGroupsManageTools.prototype.onClickSettings = function(sMenuObject, oButton) {
-	if($(oButton).hasClass('bx-btn-disabled'))
-		return false;
-
-	bx_menu_popup(sMenuObject, oButton, {}, {
-		content_id: $(oButton).attr('bx_grid_action_data')
-	});
-};
-
-BxGroupsManageTools.prototype.onClickDelete = function(iContentId) {
-	$('.bx-popup-applied:visible').dolPopupHide();
-
-	glGrids[this._sObjNameGrid].actionWithId(iContentId, 'delete', {}, '', false, 1);
-};
-
-BxGroupsManageTools.prototype.onClickDeleteWithContent = function(iContentId) {
-	$('.bx-popup-applied:visible').dolPopupHide();
-
-	glGrids[this._sObjNameGrid].actionWithId(iContentId, 'delete_with_content', {}, '', false, 1);
-};
-
-BxGroupsManageTools.prototype.onClickClearReports = function (iContentId) {
-    $('.bx-popup-applied:visible').dolPopupHide();
-
-    glGrids[this._sObjNameGrid].actionWithId(iContentId, 'clear_reports', {}, '', false, 1);
-};
-
+BxGroupsManageTools.prototype = Object.create(BxBaseModGroupsManageTools.prototype);
+BxGroupsManageTools.prototype.constructor = BxGroupsManageTools;
 
 /** @} */

+ 1 - 0
modules/boonex/russian/data/langs/bx_channels/ru.xml

@@ -208,6 +208,7 @@
     <string name="_bx_channels_menu_item_title_followings"><![CDATA[Каналы]]></string>
 
     <string name="_bx_channels_grid_filter_item_title_adm_select_one_filter1"><![CDATA[Все статусы]]></string>
+    <string name="_bx_channels_grid_filter_item_title_adm_select_one_filter2"><![CDATA[Любая аудитория]]></string>
     <string name="_bx_channels_grid_filter_item_title_adm_active"><![CDATA[Активные]]></string>
     <string name="_bx_channels_grid_filter_item_title_adm_pending"><![CDATA[В ожидании]]></string>
     <string name="_bx_channels_grid_filter_item_title_adm_suspended"><![CDATA[Заблокированные]]></string>

+ 1 - 0
modules/boonex/russian/data/langs/bx_courses/ru.xml

@@ -308,6 +308,7 @@
     <string name="_bx_courses_menu_item_title_sm_leave_cancel"><![CDATA[Отменить запрос на посещение]]></string>
 
     <string name="_bx_courses_grid_filter_item_title_adm_select_one_filter1"><![CDATA[Все статусы]]></string>
+    <string name="_bx_courses_grid_filter_item_title_adm_select_one_filter2"><![CDATA[Любая аудитория]]></string>
     <string name="_bx_courses_grid_filter_item_title_adm_active"><![CDATA[Активные]]></string>
     <string name="_bx_courses_grid_filter_item_title_adm_pending"><![CDATA[В ожидании]]></string>
     <string name="_bx_courses_grid_filter_item_title_adm_suspended"><![CDATA[Заблокированные]]></string>

+ 1 - 0
modules/boonex/russian/data/langs/bx_events/ru.xml

@@ -326,6 +326,7 @@
     <string name="_bx_events_menu_item_title_sm_date_end"><![CDATA[Конец]]></string>
 
     <string name="_bx_events_grid_filter_item_title_adm_select_one_filter1"><![CDATA[Все статусы]]></string>
+    <string name="_bx_events_grid_filter_item_title_adm_select_one_filter2"><![CDATA[Любая аудитория]]></string>
     <string name="_bx_events_grid_filter_item_title_adm_active"><![CDATA[Активные]]></string>
     <string name="_bx_events_grid_filter_item_title_adm_pending"><![CDATA[В ожидании]]></string>
     <string name="_bx_events_grid_filter_item_title_adm_suspended"><![CDATA[Заблокированные]]></string>

+ 1 - 0
modules/boonex/russian/data/langs/bx_groups/ru.xml

@@ -307,6 +307,7 @@
     <string name="_bx_groups_menu_item_title_sm_privacy"><![CDATA[Конфиденциальность]]></string>
 
     <string name="_bx_groups_grid_filter_item_title_adm_select_one_filter1"><![CDATA[Все статусы]]></string>
+    <string name="_bx_groups_grid_filter_item_title_adm_select_one_filter2"><![CDATA[Любая аудитория]]></string>
     <string name="_bx_groups_grid_filter_item_title_adm_active"><![CDATA[Активные]]></string>
     <string name="_bx_groups_grid_filter_item_title_adm_pending"><![CDATA[В ожидании]]></string>
     <string name="_bx_groups_grid_filter_item_title_adm_suspended"><![CDATA[Заблокированные]]></string>

+ 1 - 0
modules/boonex/russian/data/langs/bx_spaces/ru.xml

@@ -296,6 +296,7 @@
     <string name="_bx_spaces_menu_item_title_sm_parent"><![CDATA[Предок]]></string>
 
     <string name="_bx_spaces_grid_filter_item_title_adm_select_one_filter1"><![CDATA[Все статусы]]></string>
+    <string name="_bx_spaces_grid_filter_item_title_adm_select_one_filter2"><![CDATA[Любая аудитория]]></string>
     <string name="_bx_spaces_grid_filter_item_title_adm_active"><![CDATA[Активные]]></string>
     <string name="_bx_spaces_grid_filter_item_title_adm_pending"><![CDATA[В ожидании]]></string>
     <string name="_bx_spaces_grid_filter_item_title_adm_suspended"><![CDATA[Заблокированные]]></string>

+ 5 - 4
modules/boonex/spaces/classes/BxSpacesConfig.php

@@ -51,6 +51,7 @@ class BxSpacesConfig extends BxBaseModGroupsConfig
             'FIELD_JOIN_CONFIRMATION' => 'join_confirmation',
             'FIELD_ALLOW_VIEW_TO' => 'allow_view_to',
             'FIELD_ALLOW_POST_TO' => 'allow_post_to',
+            'FIELD_CF' => 'cf',
             'FIELD_VIEWS' => 'views',
             'FIELD_VOTES' => 'votes',
             'FIELD_STATUS' => 'status',
@@ -213,6 +214,7 @@ class BxSpacesConfig extends BxBaseModGroupsConfig
                 'filter_item_pending' => '_bx_spaces_grid_filter_item_title_adm_pending',
                 'filter_item_suspended' => '_bx_spaces_grid_filter_item_title_adm_suspended',
                 'filter_item_select_one_filter1' => '_bx_spaces_grid_filter_item_title_adm_select_one_filter1',
+                'filter_item_select_one_filter2' => '_bx_spaces_grid_filter_item_title_adm_select_one_filter2',
                 'menu_item_manage_my' => '_bx_spaces_menu_item_title_manage_my',
                 'menu_item_manage_all' => '_bx_spaces_menu_item_title_manage_all',
                 'menu_item_title_become_fan_sent' => '_bx_spaces_menu_item_title_become_fan_sent',
@@ -222,10 +224,10 @@ class BxSpacesConfig extends BxBaseModGroupsConfig
                 'txt_all_entries_by_author' => '_bx_spaces_page_title_browse_by_author',
                 'txt_invitation_popup_title' => '_bx_spaces_txt_invite_popup_title',
                 'txt_invitation_popup_text' => '_bx_spaces_txt_invite_popup_text',
-				'txt_invitation_popup_accept_button' => '_bx_spaces_txt_invite_popup_button_accept',
-				'txt_invitation_popup_decline_button' => '_bx_spaces_txt_invite_popup_button_decline',
+                'txt_invitation_popup_accept_button' => '_bx_spaces_txt_invite_popup_button_accept',
+                'txt_invitation_popup_decline_button' => '_bx_spaces_txt_invite_popup_button_decline',
                 'txt_invitation_popup_error_invitation_absent' => '_bx_spaces_txt_invite_popup_error_invitation_absent',
-				'txt_invitation_popup_error_wrong_user' => '_bx_spaces_txt_invite_popup_error_invitation_wrong_user',
+                'txt_invitation_popup_error_wrong_user' => '_bx_spaces_txt_invite_popup_error_invitation_wrong_user',
                 'txt_n_unit' => '_bx_spaces_txt_n_unit',
                 'txt_buy_title' => '_bx_spaces_grid_action_title_buy_title',
                 'txt_cart_item_title' => '_bx_spaces_txt_cart_item_title',
@@ -237,7 +239,6 @@ class BxSpacesConfig extends BxBaseModGroupsConfig
                 'err_price_duplicate' => '_bx_spaces_err_price_duplicate',
                 'err_cannot_perform' => '_bx_spaces_err_cannot_perform',
             ),
-
         );
 
         $this->_aJsClasses = array(

+ 4 - 1
modules/boonex/spaces/classes/BxSpacesSearchResult.php

@@ -175,9 +175,12 @@ class BxSpacesSearchResult extends BxBaseModGroupsSearchResult
                 $this->isError = true;
         }
 
-        if ($bProcessConditionsForPrivateContent)
+        if ($bProcessConditionsForPrivateContent) {
             $this->addConditionsForPrivateContent($CNF, $oJoinedProfile);
 
+            $this->addCustomConditions($CNF, $oJoinedProfile, $sMode, $aParams);
+        }
+
         $this->sCenterContentUnitSelector = false;
     }
 

+ 19 - 18
modules/boonex/spaces/install/langs/en.xml

@@ -297,24 +297,25 @@
 	<string name="_bx_spaces_menu_item_title_system_entries_top"><![CDATA[Top]]></string>
 	<string name="_bx_spaces_menu_item_title_entries_top"><![CDATA[Top]]></string>
 	
-	<string name="_bx_spaces_grid_filter_item_title_adm_select_one_filter1"><![CDATA[All Statuses]]></string>
-	<string name="_bx_spaces_grid_filter_item_title_adm_active"><![CDATA[Active]]></string>
-	<string name="_bx_spaces_grid_filter_item_title_adm_pending"><![CDATA[Pending]]></string>
-	<string name="_bx_spaces_grid_filter_item_title_adm_suspended"><![CDATA[Suspended]]></string>
-	<string name="_bx_spaces_grid_column_title_adm_active"><![CDATA[Active]]></string>
-	<string name="_bx_spaces_grid_column_title_adm_name"><![CDATA[Name]]></string>
-	<string name="_bx_spaces_grid_column_title_adm_added"><![CDATA[Created]]></string>
-	<string name="_bx_spaces_grid_column_title_adm_account"><![CDATA[Account]]></string>
-	<string name="_bx_spaces_grid_action_title_adm_delete"><![CDATA[Delete]]></string>
-	<string name="_bx_spaces_grid_action_title_adm_delete_with_content"><![CDATA[Delete With Content]]></string>
-	<string name="_bx_spaces_grid_action_title_adm_more_actions"><![CDATA[More Actions]]></string>
-        <string name="_bx_spaces_grid_action_title_adm_audit_context"><![CDATA[Audit actions in context]]></string>
-        <string name="_bx_spaces_grid_action_title_adm_audit_content"><![CDATA[Audit actions with content]]></string>
-        <string name="_bx_spaces_grid_action_title_adm_clear_reports"><![CDATA[Clear reports]]></string>
-	<string name="_bx_spaces_grid_action_err_delete"><![CDATA[Cannot delete the selected space(s).]]></string>
-	<string name="_bx_spaces_grid_txt_account_manager"><![CDATA[Redirect to manage account.]]></string>
-	<string name="_bx_spaces_menu_item_title_system_sm_parent"><![CDATA[Parent]]></string>
-        <string name="_bx_spaces_menu_item_title_sm_parent"><![CDATA[Parent]]></string>
+    <string name="_bx_spaces_grid_filter_item_title_adm_select_one_filter1"><![CDATA[All Statuses]]></string>
+    <string name="_bx_spaces_grid_filter_item_title_adm_select_one_filter2"><![CDATA[Any Audience]]></string>
+    <string name="_bx_spaces_grid_filter_item_title_adm_active"><![CDATA[Active]]></string>
+    <string name="_bx_spaces_grid_filter_item_title_adm_pending"><![CDATA[Pending]]></string>
+    <string name="_bx_spaces_grid_filter_item_title_adm_suspended"><![CDATA[Suspended]]></string>
+    <string name="_bx_spaces_grid_column_title_adm_active"><![CDATA[Active]]></string>
+    <string name="_bx_spaces_grid_column_title_adm_name"><![CDATA[Name]]></string>
+    <string name="_bx_spaces_grid_column_title_adm_added"><![CDATA[Created]]></string>
+    <string name="_bx_spaces_grid_column_title_adm_account"><![CDATA[Account]]></string>
+    <string name="_bx_spaces_grid_action_title_adm_delete"><![CDATA[Delete]]></string>
+    <string name="_bx_spaces_grid_action_title_adm_delete_with_content"><![CDATA[Delete With Content]]></string>
+    <string name="_bx_spaces_grid_action_title_adm_more_actions"><![CDATA[More Actions]]></string>
+    <string name="_bx_spaces_grid_action_title_adm_audit_context"><![CDATA[Audit actions in context]]></string>
+    <string name="_bx_spaces_grid_action_title_adm_audit_content"><![CDATA[Audit actions with content]]></string>
+    <string name="_bx_spaces_grid_action_title_adm_clear_reports"><![CDATA[Clear reports]]></string>
+    <string name="_bx_spaces_grid_action_err_delete"><![CDATA[Cannot delete the selected space(s).]]></string>
+    <string name="_bx_spaces_grid_txt_account_manager"><![CDATA[Redirect to manage account.]]></string>
+    <string name="_bx_spaces_menu_item_title_system_sm_parent"><![CDATA[Parent]]></string>
+    <string name="_bx_spaces_menu_item_title_sm_parent"><![CDATA[Parent]]></string>
 
     <string name="_bx_spaces_grid_column_title_name"><![CDATA[Name]]></string>
     <string name="_bx_spaces_grid_column_title_role_id"><![CDATA[Role]]></string>

+ 6 - 2
modules/boonex/spaces/install/sql/install.sql

@@ -25,6 +25,7 @@ CREATE TABLE IF NOT EXISTS `bx_spaces_data` (
   `comments` int(11) NOT NULL default '0',
   `reports` int(11) NOT NULL default '0',
   `featured` int(11) NOT NULL default '0',
+  `cf` int(11) NOT NULL default '1',
   `join_confirmation` tinyint(4) NOT NULL DEFAULT '0',
   `allow_view_to` varchar(16) NOT NULL DEFAULT '3',
   `allow_post_to` varchar(16) NOT NULL DEFAULT '3',
@@ -310,6 +311,7 @@ INSERT INTO `sys_form_displays`(`object`, `display_name`, `module`, `view_mode`,
 ('bx_space', 'bx_space_invite', 'bx_spaces', 0, '_bx_spaces_form_profile_display_invite');
 
 INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `checked`, `type`, `caption_system`, `caption`, `info`, `required`, `collapsed`, `html`, `attrs`, `attrs_tr`, `attrs_wrapper`, `checker_func`, `checker_params`, `checker_error`, `db_pass`, `db_params`, `editable`, `deletable`) VALUES 
+('bx_space', 'bx_spaces', 'cf', '', '#!sys_content_filter', 0, 'select', '_sys_form_entry_input_sys_cf', '_sys_form_entry_input_cf', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
 ('bx_space', 'bx_spaces', 'allow_view_to', 3, '', 0, 'custom', '_bx_spaces_form_profile_input_sys_allow_view_to', '_bx_spaces_form_profile_input_allow_view_to', '_bx_spaces_form_profile_input_allow_view_to_desc', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_space', 'bx_spaces', 'allow_post_to', 3, '', 0, 'custom', '_bx_spaces_form_profile_input_sys_allow_post_to', '_bx_spaces_form_profile_input_allow_post_to', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_space', 'bx_spaces', 'delete_confirm', 1, '', 0, 'checkbox', '_bx_spaces_form_profile_input_sys_delete_confirm', '_bx_spaces_form_profile_input_delete_confirm', '_bx_spaces_form_profile_input_delete_confirm_info', 1, 0, 0, '', '', '', 'avail', '', '_bx_spaces_form_profile_input_delete_confirm_error', '', '', 1, 0),
@@ -335,7 +337,8 @@ INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for
 ('bx_space_add', 'join_confirmation', 2147483647, 1, 7),
 ('bx_space_add', 'allow_view_to', 2147483647, 1, 8),
 ('bx_space_add', 'allow_post_to', 2147483647, 1, 9),
-('bx_space_add', 'do_submit', 2147483647, 1, 10),
+('bx_space_add', 'cf', 2147483647, 1, 10),
+('bx_space_add', 'do_submit', 2147483647, 1, 11),
 
 ('bx_space_invite', 'initial_members', 2147483647, 1, 1),
 ('bx_space_invite', 'do_submit', 2147483647, 1, 2),
@@ -351,7 +354,8 @@ INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for
 ('bx_space_edit', 'join_confirmation', 2147483647, 1, 6),
 ('bx_space_edit', 'allow_view_to', 2147483647, 1, 7),
 ('bx_space_edit', 'allow_post_to', 2147483647, 1, 8),
-('bx_space_edit', 'do_submit', 2147483647, 1, 9),
+('bx_space_edit', 'cf', 2147483647, 1, 9),
+('bx_space_edit', 'do_submit', 2147483647, 1, 10),
 
 ('bx_space_edit_cover', 'cover', 2147483647, 1, 1),
 ('bx_space_edit_cover', 'do_submit', 2147483647, 1, 2),

+ 6 - 53
modules/boonex/spaces/js/manage_tools.js

@@ -8,61 +8,14 @@
  * @{
  */
 
-function BxSpacesManageTools(oOptions) {
-	this._iSearchTimeoutId = false;
-	this._sActionsUrl = oOptions.sActionUrl;
-	this._sObjNameGrid = oOptions.sObjNameGrid;
-	this._sObjName = oOptions.sObjName == undefined ? 'oBxSpacesManageTools' : oOptions.sObjName;
+function BxSpacesManageTools(oOptions)
+{
+    BxBaseModGroupsManageTools.call(this, oOptions);
 
-    this._sAnimationEffect = oOptions.sAnimationEffect == undefined ? 'fade' : oOptions.sAnimationEffect;
-    this._iAnimationSpeed = oOptions.iAnimationSpeed == undefined ? 'slow' : oOptions.iAnimationSpeed;
-    this._sParamsDivider = oOptions.sParamsDivider == undefined ? '#-#' : oOptions.sParamsDivider;
-
-    this._aHtmlIds = oOptions.aHtmlIds == undefined ? {} : oOptions.aHtmlIds;
-    this._oRequestParams = oOptions.oRequestParams == undefined ? {} : oOptions.oRequestParams;
+    this._sObjName = oOptions.sObjName == undefined ? 'oBxSpacesManageTools' : oOptions.sObjName;
 }
 
-BxSpacesManageTools.prototype.onChangeFilter = function (oFilter) {
-	var $this = this;
-	var oFilter1 = $('#bx-grid-filter1-' + this._sObjNameGrid);
-	var sValueFilter1 = oFilter1.length > 0 ? oFilter1.val() : '';
-
-	var oSearch = $('#bx-grid-search-' + this._sObjNameGrid);
-	var sValueSearch = oSearch.length > 0 ? oSearch.val() : '';
-	if(sValueSearch == _t('_sys_grid_search'))
-		sValueSearch = '';
-
-	clearTimeout($this._iSearchTimeoutId);
-    $this._iSearchTimeoutId = setTimeout(function () {
-        glGrids[$this._sObjNameGrid].setFilter(sValueFilter1 + $this._sParamsDivider + sValueSearch, true);
-    }, 500);
-};
-
-BxSpacesManageTools.prototype.onClickSettings = function (sMenuObject, oButton) {
-	if($(oButton).hasClass('bx-btn-disabled'))
-		return false;
-
-	bx_menu_popup(sMenuObject, oButton, {}, {
-		content_id: $(oButton).attr('bx_grid_action_data')
-	});
-};
-
-BxSpacesManageTools.prototype.onClickDelete = function (iContentId) {
-	$('.bx-popup-applied:visible').dolPopupHide();
-
-	glGrids[this._sObjNameGrid].actionWithId(iContentId, 'delete', {}, '', false, 1);
-};
-
-BxSpacesManageTools.prototype.onClickDeleteWithContent = function (iContentId) {
-	$('.bx-popup-applied:visible').dolPopupHide();
-
-	glGrids[this._sObjNameGrid].actionWithId(iContentId, 'delete_with_content', {}, '', false, 1);
-};
-
-
-BxSpacesManageTools.prototype.onClickClearReports = function (iContentId) {
-    $('.bx-popup-applied:visible').dolPopupHide();
+BxSpacesManageTools.prototype = Object.create(BxBaseModGroupsManageTools.prototype);
+BxSpacesManageTools.prototype.constructor = BxSpacesManageTools;
 
-    glGrids[this._sObjNameGrid].actionWithId(iContentId, 'clear_reports', {}, '', false, 1);
-};
 /** @} */

+ 1 - 0
modules/boonex/timeline/classes/BxTimelineResponse.php

@@ -61,6 +61,7 @@ class BxTimelineResponse extends BxBaseModNotificationsResponse
                     'object_id' => $oAlert->iObject,
                     'object_owner_id' => $iObjectAuthorId,
                     'object_privacy_view' => $iObjectPrivacyView,
+                    'object_cf' => $this->_getObjectCf($oAlert->aExtras),
                     'content' => $sContent,
                     'title' => '',
                     'description' => ''