Kaynağa Gözat

#4145 - Uploader's enhancement

roman.lesnikov@gmail.com 3 yıl önce
ebeveyn
işleme
4e43566b9a
55 değiştirilmiş dosya ile 485 ekleme ve 231 silme
  1. 1 0
      inc/classes/BxDolUploader.php
  2. 86 2
      inc/js/classes/BxDolUploader.js
  3. 32 0
      modules/base/general/classes/BxBaseModGeneralModule.php
  4. 60 0
      modules/base/general/classes/BxBaseModGeneralTemplate.php
  5. 16 0
      modules/base/general/template/image_tweak.html
  6. 78 0
      modules/base/general/template/uploader_cover.html
  7. 1 1
      modules/base/groups/template/unit.html
  8. 27 1
      modules/base/profile/classes/BxBaseModProfileFormEntry.php
  9. 28 35
      modules/base/profile/classes/BxBaseModProfileTemplate.php
  10. 1 1
      modules/base/profile/classes/BxBaseModProfileUploaderCoverCrop.php
  11. 8 19
      modules/base/profile/template/cover.html
  12. 2 1
      modules/base/profile/template/css/main.css
  13. 1 0
      modules/base/profile/template/image_popup.html
  14. 1 1
      modules/base/profile/template/unit_with_cover.html
  15. 0 10
      modules/base/text/template/uploader_button_html5_attach.html
  16. 9 19
      modules/boonex/artificer/data/template/mod_groups/cover.html
  17. 7 18
      modules/boonex/artificer/data/template/mod_profile/cover.html
  18. 37 0
      modules/boonex/artificer/data/template/system/css/cover.css
  19. 1 1
      modules/boonex/channels/classes/BxCnlConfig.php
  20. 0 9
      modules/boonex/channels/install/sql/enable.sql
  21. 1 0
      modules/boonex/channels/install/sql/install.sql
  22. 1 1
      modules/boonex/courses/classes/BxCoursesConfig.php
  23. 1 1
      modules/boonex/courses/classes/BxCoursesSearchResult.php
  24. 0 10
      modules/boonex/courses/install/sql/enable.sql
  25. 1 0
      modules/boonex/courses/install/sql/install.sql
  26. 7 18
      modules/boonex/decorous/data/template/bx_organizations/cover.html
  27. 8 19
      modules/boonex/decorous/data/template/bx_persons/cover.html
  28. 6 1
      modules/boonex/english/data/langs/system/en.xml
  29. 1 1
      modules/boonex/events/classes/BxEventsConfig.php
  30. 1 1
      modules/boonex/events/classes/BxEventsSearchResult.php
  31. 0 10
      modules/boonex/events/install/sql/enable.sql
  32. 1 0
      modules/boonex/events/install/sql/install.sql
  33. 1 1
      modules/boonex/groups/classes/BxGroupsConfig.php
  34. 1 1
      modules/boonex/groups/classes/BxGroupsSearchResult.php
  35. 0 10
      modules/boonex/groups/install/sql/enable.sql
  36. 1 0
      modules/boonex/groups/install/sql/install.sql
  37. 1 1
      modules/boonex/lucid/data/template/bx_channels/unit.html
  38. 1 1
      modules/boonex/lucid/data/template/bx_events/unit.html
  39. 1 1
      modules/boonex/lucid/data/template/bx_groups/unit.html
  40. 1 1
      modules/boonex/lucid/data/template/bx_persons/unit_with_cover.html
  41. 1 1
      modules/boonex/lucid/data/template/bx_spaces/unit.html
  42. 1 1
      modules/boonex/organizations/classes/BxOrgsConfig.php
  43. 1 1
      modules/boonex/organizations/classes/BxOrgsSearchResult.php
  44. 0 9
      modules/boonex/organizations/install/sql/enable.sql
  45. 1 0
      modules/boonex/organizations/install/sql/install.sql
  46. 2 1
      modules/boonex/persons/classes/BxPersonsConfig.php
  47. 1 1
      modules/boonex/persons/classes/BxPersonsSearchResult.php
  48. 0 9
      modules/boonex/persons/install/sql/enable.sql
  49. 1 0
      modules/boonex/persons/install/sql/install.sql
  50. 6 0
      modules/boonex/russian/data/langs/system/ru.xml
  51. 1 1
      modules/boonex/spaces/classes/BxSpacesConfig.php
  52. 1 1
      modules/boonex/spaces/classes/BxSpacesSearchResult.php
  53. 0 10
      modules/boonex/spaces/install/sql/enable.sql
  54. 1 0
      modules/boonex/spaces/install/sql/install.sql
  55. 37 0
      template/css/cover.css

+ 1 - 0
inc/classes/BxDolUploader.php

@@ -313,6 +313,7 @@ abstract class BxDolUploader extends BxDolFactory
             '_sys_uploader_confirm_leaving_page',
             '_sys_uploader_confirm_close_popup',
             '_sys_uploader_upload_canceled',
+            '_sys_uploader_image_reposition_info',
         ], $bDynamic);
         return $bDynamic ? $s : '';
     }

+ 86 - 2
inc/js/classes/BxDolUploader.js

@@ -213,8 +213,8 @@ BxDolUploaderBase.prototype.showGhost = function(iId, oVars) {
 
     for(var i in oVars)
         sHTML = sHTML.replace (new RegExp('{' + i + '}', 'g'), oVars[i]);
-
-    $('#' + this._sResultContainerId).append(sHTML);
+    
+    $('#' + this._sResultContainerId).append(sHTML).trigger( "contentchange" );
 
     oFileContainer.find('.bx-uploader-ghost-preview img').hide().fadeIn(1000);
 };
@@ -1012,4 +1012,88 @@ function BxDolUploaderRecordVideo (sUploaderObject, sStorageObject, sUniqId, opt
 
 BxDolUploaderRecordVideo.prototype = BxDolUploaderBase.prototype;
 
+
+function BxDolImageTweak (unique_id, action_url, content_id, field, js_object, allow_tweak) {
+    var $this = this;
+    this._sUniqueId = unique_id;
+    this._sActionUrl = action_url;
+    this._sContentId = content_id;
+    this._sField = field;
+    this._sJsObject = js_object;
+    this._bAllowTweak = allow_tweak;
+    this._oContainerButtons = $('.bx-image-edit-buttons-' + unique_id);
+    
+    $("#bx-form-input-files-" + this._sUniqueId + "-upload-result").bind( "contentchange", function(){ 
+        $this.uploadComplete($(this));
+    });
+    
+    if (this._bAllowTweak){
+        this._oContainerButtons.find('.bx-image-edit-buttons-edit').removeClass('hidden');
+    }
+}
+
+BxDolImageTweak.prototype.showUploaderForm = function(){
+    var $this = this;
+    $('#bx-form-input-files-' + $this._sUniqueId + '-upload-result').html('');
+    eval($this._sJsObject + '.showUploaderForm()');
+}
+    
+BxDolImageTweak.prototype.uploadComplete = function(obj){
+    var $this = this;
+    var sUrl = $this._sActionUrl + "updateImage/" + $this._sField + "/" + $this._sContentId + "/" + obj.html() + "/"; 
+    
+    $this._oContainerButtons.removeClass('bx-image-edit-buttons-no-image');
+    $.post(sUrl, function (aData) {
+        if ($this._bAllowTweak){
+            $(".bx-image-edit-source-" + $this._sUniqueId).css("background-image", "url(" + aData + ")").css('background-position', '');
+        }
+        else{
+            $(".bx-image-edit-source-" + $this._sUniqueId).attr("src", aData);
+        }
+    });
+}
+
+BxDolImageTweak.prototype.changePosition = function (){
+    var $this = this;
+    $(".bx-image-edit-source-" + $this._sUniqueId).parent().append("<div class='bx-image-edit-move-info'><i class='sys-icon sys-colored arrows-alt '></i>" + _t('_sys_txt_form_entry_input_image_reposition_info') + "</div>");
+    $(".bx-image-edit-source-" + $this._sUniqueId).addClass('bx-image-edit-move').bind('dragover', function(e){
+        $(".bx-image-edit-source-" + $this._sUniqueId).parent().find('.bx-image-edit-move-info').remove();
+        $(".bx-image-edit-source-" + $this._sUniqueId).css('background-position', " 0px " + e.offsetY/500*100 + '%');
+    });
+    with ($this._oContainerButtons) {
+        find('.bx-image-edit-buttons-cancel').removeClass('hidden');
+        find('.bx-image-edit-buttons-save').removeClass('hidden');
+        find('.bx-image-edit-buttons-edit').addClass('hidden');
+        find('.bx-image-edit-buttons-upload').addClass('hidden');
+    }
+}
+
+BxDolImageTweak.prototype.cancelPosition = function (){
+    var $this = this;
+    $(".bx-image-edit-source-" + $this._sUniqueId).parent().find('.bx-image-edit-move-info').remove();
+    with ($this._oContainerButtons) {
+        find('.bx-image-edit-buttons-cancel').addClass('hidden');
+        find('.bx-image-edit-buttons-save').addClass('hidden');
+        find('.bx-image-edit-buttons-edit').removeClass('hidden');
+        find('.bx-image-edit-buttons-upload').removeClass('hidden');
+    }
+}
+    
+BxDolImageTweak.prototype.savePosition = function (){
+    var $this = this;
+    
+    $(".bx-image-edit-source-" + $this._sUniqueId).parent().find('.bx-image-edit-move-info').remove();
+    $(".bx-image-edit-source-" + $this._sUniqueId).removeClass('bx-image-edit-move')
+    
+    aPos = $(".bx-image-edit-source-" + $this._sUniqueId).css('background-position').split(' ');
+    $.post($this._sActionUrl + 'updateImagePosition/' + $this._sContentId + '/' + $this._sField + '/' + aPos[0].replace('%','').replace('px','') + '/' + aPos[1].replace('%','').replace('px','') + '/', function () {
+        with ($this._oContainerButtons) {
+            find('.bx-image-edit-buttons-cancel').addClass('hidden');
+            find('.bx-image-edit-buttons-save').addClass('hidden');
+            find('.bx-image-edit-buttons-edit').removeClass('hidden');
+            find('.bx-image-edit-buttons-upload').removeClass('hidden');
+        }
+    });
+}
+
 /** @} */

+ 32 - 0
modules/base/general/classes/BxBaseModGeneralModule.php

@@ -72,6 +72,38 @@ class BxBaseModGeneralModule extends BxDolModule
         return true;        
     }
 
+    
+    public function actionUpdateImage($sFiledName, $iContentId, $sValue)
+    {
+        $CNF = &$this->_oConfig->CNF;
+        $aData = $this->_oDb->getContentInfoById($iContentId);
+        if ($this->checkAllowedEdit($aData) === CHECK_ACTION_RESULT_ALLOWED){
+        
+            $this->_oDb->updateEntriesBy([$sFiledName => $sValue], [$CNF['FIELD_ID'] => $iContentId]);
+            //TODO add transcoder settings
+            $oImgStorage = BxDolStorage::getObjectInstance($CNF['OBJECT_STORAGE']);
+            $sImageUrl = $oImgStorage->getFileUrlById($sValue);
+            
+            $this->actionUpdateImagePosition($iContentId, $sFiledName, '', '');
+            
+            echo $sImageUrl;
+        }
+        
+    }
+    
+    public function actionUpdateImagePosition($iContentId, $sFiledName, $sH, $sV)
+    {
+        $CNF = &$this->_oConfig->CNF;
+        $sFieldNamePos = 'FIELD_' . strtoupper($sFiledName) . '_POSITION';
+        if (isset($CNF[$sFieldNamePos])){
+            $sValue = '';
+            $CNF = &$this->_oConfig->CNF;
+            if ($sH != '' || $sV != '')
+                $sValue = json_encode(['x' => $sH, 'y' => $sV]);
+            $this->_oDb->updateEntriesBy([$CNF[$sFieldNamePos] => $sValue], [$CNF['FIELD_ID'] => $iContentId]);
+        }
+    }
+    
     public function actionApprove()
     {
         $CNF = &$this->_oConfig->CNF;

+ 60 - 0
modules/base/general/classes/BxBaseModGeneralTemplate.php

@@ -676,6 +676,66 @@ class BxBaseModGeneralTemplate extends BxDolModuleTemplate
 
         return array($oPlayer, $oStorage, $aContentInfo, $a);
     }
+    
+    function _getImageSettings($sSettings)
+    {
+        $sCoverSettings = '';
+        $aCoverData = json_decode($sSettings, true);
+        if (!empty($aCoverData)){
+            $sCoverSettings = 'background-position: ' . $aCoverData['x'] . '% ' . $aCoverData['y'] . '%';
+        }
+        return $sCoverSettings;
+    }
+
+    function _prepareImage($aData, $sUniqId, $sUploader, $sStorage, $sField, $bAllowTweak)
+    {
+        $CNF = &$this->_oConfig->CNF;
+        
+        $oUploader = null;
+        $sUploadersButtons = $sUploadersJs = '';
+
+        $aUploaders = $sUploader;
+        $sUploadersJs = '';
+        $sJsName = '';
+        foreach ($aUploaders as $sUploaderObject) {
+            $oUploader = BxDolUploader::getObjectInstance($sUploaderObject, $sStorage, $sUniqId, $this);
+
+            $sGhostTemplate = '{file_id}';
+
+            $aParamsJs = array_merge($oUploader->getUploaderJsParams(), 
+                [
+                    'content_id' => $aData['id'],
+                    'storage_private' => '0',
+                    'is_init_ghosts' => 0,
+                    'is_init_reordering' => 0
+                ]
+            );
+            $sUploadersJs .= $oUploader->getUploaderJs($sGhostTemplate, false, $aParamsJs, true);
+            $sJsName = $oUploader->getNameJsInstanceUploader();
+        }
+
+        $aParamsButtons = [
+            'content_id' => $aData['id'],
+            'storage_private' => '0',
+            'btn_class' => '',
+            'button_title' => '',
+        ];
+
+        $sAddCode = $this->parseHtmlByName('image_tweak.html', [
+            'id' => $aData['id'],
+            'js_object' => $sJsName,
+            'unique_id' => $sUniqId,
+            'id' => $aData['id'],
+            'allow_tweak' => $bAllowTweak,
+            'image_exists' => $aData[$sField] == 0 ? 'bx-image-edit-buttons-no-image' : '',
+            'field' => $sField,
+            'action_url' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri(),
+            'uploader' => $oUploader->getUploaderButton($aParamsButtons),
+            'uploader_js' => $sUploadersJs,
+        ]); 
+        $this->addJsTranslation(['_sys_txt_form_entry_input_image_reposition_info']);
+        return $sAddCode;
+    }
 
     public function addCssJs()
     {

+ 16 - 0
modules/base/general/template/image_tweak.html

@@ -0,0 +1,16 @@
+<div class="bx-image-edit-buttons __image_exists__ bx-image-edit-buttons-__unique_id__">
+    <a href="javascript:" class="bx-btn bx-btn-small bx-image-edit-buttons-edit hidden" title="<bx_text:_sys_uploader_image_reposition />" onclick="oBxDolImageTweak__unique_id__.changePosition()"><i class="sys-icon arrows-alt"></i></a>
+    <a href="javascript:" class="bx-btn bx-btn-small bx-image-edit-buttons-save hidden" title="<bx_text:_sys_uploader_image_reposition_save />" onclick="oBxDolImageTweak__unique_id__.savePosition()"><i class="sys-icon check"></i></a>
+    <a href="javascript:" class="bx-btn bx-btn-small bx-image-edit-buttons-cancel hidden" title="<bx_text:_sys_uploader_image_reposition_cancel />" onclick="oBxDolImageTweak__unique_id__.cancelPosition()"><i class="sys-icon times"></i></a>
+    <a href="javascript:" class="bx-btn bx-btn-small bx-image-edit-buttons-upload" title="<bx_text:_sys_uploader_image_upload />" onclick="oBxDolImageTweak__unique_id__.showUploaderForm()"><i class="sys-icon upload"></i></a>
+</div>
+<div class="hidden">
+    <div id="bx-form-input-files-__unique_id__-upload-result"></div>
+    __uploader__
+    __uploader_js__
+</div>
+<script> 
+    $( document).ready(function() {
+        oBxDolImageTweak__unique_id__ = new BxDolImageTweak('__unique_id__', '__action_url__', '__id__', '__field__', '__js_object__', __allow_tweak__);
+    });
+</script>

+ 78 - 0
modules/base/general/template/uploader_cover.html

@@ -0,0 +1,78 @@
+<div class="bx-image-edit-buttons __image_exists__ bx-image-edit-buttons-__unique_id__">
+    <a href="javascript:" class="bx-btn bx-btn-small bx-image-edit-buttons-edit" onclick="oBxDolCovers__unique_id__.changePosition()"><i class="sys-icon cog"></i></a>
+    <a href="javascript:" class="bx-btn bx-btn-small bx-image-edit-buttons-save hidden" onclick="oBxDolCovers__unique_id__.savePosition()"><i class="sys-icon save"></i></a>
+    <a href="javascript:" class="bx-btn bx-btn-small bx-image-edit-buttons-cancel hidden" onclick="oBxDolCovers__unique_id__.cancelPosition()"><i class="sys-icon times"></i></a>
+    <a href="javascript:" class="bx-btn bx-btn-small bx-image-edit-buttons-upload" onclick="oBxDolCovers__unique_id__.showUploaderForm()"><i class="sys-icon upload"></i></a>
+</div>
+<div class="hidden">
+    <div id="bx-form-input-files-__unique_id__-upload-result"></div>
+    __uploader__
+    __uploader_js__
+</div>
+<script>
+$("#bx-form-input-files-__unique_id__-upload-result").bind( "contentchange", function(){ 
+    oBxDolCovers__unique_id__.uploadComplete($(this));
+});
+    
+function BxDolCovers (unique_id, action_url, content_id, field, js_object) {
+    this._sUniqueId = unique_id;
+    this._sActionUrl = action_url;
+    this._sContentId = content_id;
+    this._sField = field;
+    this._sJsObject = js_object;
+    this._oContainerButtons = $('.bx-image-edit-buttons-' + unique_id);
+}
+
+BxDolCovers.prototype.showUploaderForm = function(){
+    var $this = this;
+    $('#bx-form-input-files-' + $this._sUniqueId + '-upload-result').html('');
+    eval($this._sJsObject + '.showUploaderForm()');
+}
+    
+BxDolCovers.prototype.uploadComplete = function(obj){
+    var $this = this;
+    var sUrl = $this._sActionUrl + "updateImage/" + $this._sField + "/" + $this._sContentId + "/" + obj.html() + "/"; 
+    
+    $this._oContainerButtons.removeClass('bx-image-edit-buttons-no-image');
+    
+    $.post(sUrl, function (aData) {
+        $(".bx-image-edit-source-" + $this._sUniqueId).css("background-image", "url(" + aData + ")").css('background-position', '');
+    });
+}
+
+BxDolCovers.prototype.changePosition = function (){
+    var $this = this;
+    $(".bx-image-edit-source-" + $this._sUniqueId).addClass('bx-image-edit-move').bind('dragover', function(e){
+        $(".bx-image-edit-source-" + $this._sUniqueId).css('background-position', " 0px " + e.offsetY/500*100 + '%');
+    });
+    $this._oContainerButtons.find('.bx-image-edit-buttons-cancel').removeClass('hidden');
+    $this._oContainerButtons.find('.bx-image-edit-buttons-save').removeClass('hidden');
+    $this._oContainerButtons.find('.bx-image-edit-buttons-edit').addClass('hidden');
+    $this._oContainerButtons.find('.bx-image-edit-buttons-upload').addClass('hidden');
+}
+
+BxDolCovers.prototype.cancelPosition = function (){
+    var $this = this;
+    $this._oContainerButtons.find('.bx-image-edit-buttons-cancel').addClass('hidden');
+    $this._oContainerButtons.find('.bx-image-edit-buttons-save').addClass('hidden');
+    $this._oContainerButtons.find('.bx-image-edit-buttons-edit').removeClass('hidden');
+    $this._oContainerButtons.find('.bx-image-edit-buttons-upload').removeClass('hidden');
+}
+    
+BxDolCovers.prototype.savePosition = function (){
+    var $this = this;
+    
+    $(".bx-image-edit-source-" + $this._sUniqueId).removeClass('bx-image-edit-move')
+    
+    aPos = $(".bx-image-edit-source-" + $this._sUniqueId).css('background-position').split(' ');
+    $.post($this._sActionUrl + 'updateImagePosition/' + $this._sContentId + '/' + $this._sField + '/' + aPos[0].replace('%','').replace('px','') + '/' + aPos[1].replace('%','').replace('px','') + '/', function () {
+        $this._oContainerButtons.find('.bx-image-edit-buttons-cancel').addClass('hidden');
+        $this._oContainerButtons.find('.bx-image-edit-buttons-save').addClass('hidden');
+        $this._oContainerButtons.find('.bx-image-edit-buttons-edit').removeClass('hidden');
+        $this._oContainerButtons.find('.bx-image-edit-buttons-upload').removeClass('hidden');
+    });
+}
+
+oBxDolCovers__unique_id__ = new BxDolCovers('__unique_id__', '__action_url__', '__id__', '__field__', '__js_object__');
+    
+</script>

+ 1 - 1
modules/base/groups/template/unit.html

@@ -1,7 +1,7 @@
 <div class="__class__ p-2 box-border">
     <div class="bx-base-pofile-unit-cnt bx-def-box bx-def-box-round-corners bx-def-color-bg-box relative h-full overflow-hidden">
         <div class="absolute z-0 w-full h-40 bg-gradient-to-b from-green-400 to-green-500"></div>
-        <a class="bx-base-pofile-unit-cover relative flex items-center justify-start w-full h-40 bg-no-repeat bg-center bg-cover hover:no-underline" style="background-image:url(__cover_url__);" href="__content_url__" onclick="__content_click__">
+        <a class="bx-base-pofile-unit-cover relative flex items-center justify-start w-full h-40 bg-no-repeat bg-center bg-cover hover:no-underline" style="background-image:url(__cover_url__); __cover_settings__" href="__content_url__" onclick="__content_click__">
             <bx_if:show_thumbnail>
                 <div class="bx-def-unit-img bx-def-__size__-size __class_size__ relative ml-5">
                     <bx_if:show_thumb_image>

+ 27 - 1
modules/base/profile/classes/BxBaseModProfileFormEntry.php

@@ -16,6 +16,8 @@ class BxBaseModProfileFormEntry extends BxBaseModGeneralFormEntry
 {
     protected $_iAccountProfileId = 0;
     protected $_aImageFields = array ();
+    
+    protected $_aUploadersInfo = [];
 
     public function __construct($aInfo, $oTemplate = false)
     {   
@@ -37,10 +39,23 @@ class BxBaseModProfileFormEntry extends BxBaseModGeneralFormEntry
         }
 
         if (!empty($CNF['FIELD_COVER']) && isset($this->aInputs[$CNF['FIELD_COVER']])) {
+            $sStorage = $this->_oModule->_oConfig->getObject($CNF['OBJECT_STORAGE_COVER']);
+            $sUploadersId = genRndPwd(8, false);
+            $aUploaders = !empty($this->aInputs[$CNF['FIELD_COVER']]['value']) ? unserialize($this->aInputs[$CNF['FIELD_COVER']]['value']) : $this->_oModule->_oConfig->getUploaders($CNF['FIELD_COVER']);
+
+            foreach($aUploaders as $sUploader){
+                $this->_aUploadersInfo[$sUploader] = array(
+                    'id' => $sUploadersId, 
+                    'name' => $sUploader,
+                    'js_object' => BxDolUploader::getObjectInstance($sUploader, $sStorage, $sUploadersId)->getNameJsInstanceUploader()
+                );
+            }
+            
             $this->_aImageFields[$CNF['FIELD_COVER']] = array (
                 'storage_object' => $CNF['OBJECT_STORAGE_COVER'],
                 'images_transcoder' => $CNF['OBJECT_IMAGES_TRANSCODER_COVER_THUMB'],
-                'uploaders' => $CNF['OBJECT_UPLOADERS_COVER'],
+                'uploaders_id' => $sUploadersId,
+                'uploaders' => $aUploaders
             );
         }
 
@@ -48,6 +63,7 @@ class BxBaseModProfileFormEntry extends BxBaseModGeneralFormEntry
             $this->aInputs[$sField]['storage_object'] = $aParams['storage_object'];
             $this->aInputs[$sField]['uploaders'] = !empty($this->aInputs[$sField]['value']) ? unserialize($this->aInputs[$sField]['value']) : $aParams['uploaders'];
             $this->aInputs[$sField]['images_transcoder'] = $aParams['images_transcoder'];
+            $this->aInputs[$sField]['uploaders_id'] = isset($aParams['uploaders_id']) ? $aParams['uploaders_id'] : '';
             $this->aInputs[$sField]['storage_private'] = 0;
             $this->aInputs[$sField]['multiple'] = false;
             $this->aInputs[$sField]['content_id'] = 0;
@@ -59,6 +75,16 @@ class BxBaseModProfileFormEntry extends BxBaseModGeneralFormEntry
             $this->_iAccountProfileId = $oAccountProfile->id();
     }
 
+    public function getUploadersInfo($sField = '')
+    {
+        if(empty($sField))
+            return $this->_aUploadersInfo;
+
+        $aUploaders = !empty($this->aInputs[$sField]['value']) ? unserialize($this->aInputs[$sField]['value']) : $this->_oModule->_oConfig->getUploaders($sField);
+
+        return $this->_aUploadersInfo[array_shift($aUploaders)];
+    }
+    
     function initChecker ($aValues = array (), $aSpecificValues = array())
     {
         $CNF = &$this->_oModule->_oConfig->CNF;

+ 28 - 35
modules/base/profile/classes/BxBaseModProfileTemplate.php

@@ -190,6 +190,8 @@ class BxBaseModProfileTemplate extends BxBaseModGeneralTemplate
         $aTmplVarsMeta = array();
         if(substr($sTemplate, 0, 8) != 'unit_wo_')
             $aTmplVarsMeta = $this->getSnippetMenuVars ($iProfile, $bPublic);
+        
+        $sCoverData = isset($aData['cover_data']) ? $aData['cover_data'] : '';
 
         return array_merge(array (
             'class' => $this->_getUnitClass($aData, $sTemplate) . (!$bCoverUrl ? ' bx-cover-empty' : ''),
@@ -200,10 +202,12 @@ class BxBaseModProfileTemplate extends BxBaseModGeneralTemplate
                 'content' => $aTmplVarsThumbnail
             ),
             'cover_url' => $sCoverUrl,
+            'cover_settings' => $this->_getImageSettings($sCoverData),
             'bx_if:show_cover' => array(
                 'condition' => $bCoverUrl,
                 'content' => array(
                     'cover_url' => $sCoverUrl,
+                    'cover_settins' => $this->_getImageSettings($sCoverData),
                     'title' => $sTitle,
                 )
             ),
@@ -271,21 +275,21 @@ class BxBaseModProfileTemplate extends BxBaseModGeneralTemplate
         $aTmplVars = $this->prepareCover($aData, array_merge($aParams, [
             'use_as_block' => true
         ]));
-
+        
         return $this->parseHtmlByName('cover_block.html', $aTmplVars);
     }
-
+    
     function prepareCover($aData, $aParams = [])
     {
         $CNF = &$this->_oConfig->CNF;
         $oModule = $this->getModule();
-
         $sClass = isset($aParams['class']) ? $aParams['class'] : '';
         $sShowData = isset($aParams['show_data']) ? $aParams['show_data'] : '';
         $bShowCover = !isset($aParams['show_cover']) || $aParams['show_cover'] === true;
         $bShowAvatar = !isset($aParams['show_avatar']) || $aParams['show_avatar'] === true;
         $bShowClickable = !isset($aParams['show_clickable']) || $aParams['show_clickable'] === true; //--- Is available for UseAsBlock appearance only.
         $sAddCode = "";
+        
 
         $bUseAsAuthor = isset($aParams['use_as_author']) && $aParams['use_as_author'] === true;
         $bUseAsBlock = $bUseAsAuthor || (isset($aParams['use_as_block']) && $aParams['use_as_block'] === true);
@@ -315,7 +319,6 @@ class BxBaseModProfileTemplate extends BxBaseModGeneralTemplate
         //--- Process Cover
         $bTmplVarsShowCover = $bShowCover;
         $aTmplVarsShowCover = [];
-        $sCoverPopup = '';
 
         if($bTmplVarsShowCover) {
             $sCoverPopupId = $this->MODULE . '-popup-cover';
@@ -329,6 +332,7 @@ class BxBaseModProfileTemplate extends BxBaseModGeneralTemplate
             $sUrlCover = $this->urlCover($aData, false);
             if(!$sUrlCover && $oPage !== false && $oPage->isPageCover()) {
                 $aCover = $oPage->getPageCoverImage();
+                
                 if(!empty($aCover))
                     $sUrlCover = BxDolCover::getCoverImageUrl($aCover);
             }
@@ -342,8 +346,12 @@ class BxBaseModProfileTemplate extends BxBaseModGeneralTemplate
             else
                 $sUrlCover = $this->getImageUrl('cover.svg');
 
-            $sUrlCoverChange = bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_EDIT_COVER'] . '&id=' . $aData[$CNF['FIELD_ID']]));
-
+            $sCoverTweak = '';
+            $sUniqIdCover = genRndPwd (8, false);
+            if ($bIsAllowEditCover){
+                $sCoverTweak = $this->_prepareImage($aData, $sUniqIdCover, $CNF['OBJECT_UPLOADERS_COVER'], $CNF['OBJECT_STORAGE_COVER'], $CNF['FIELD_COVER'], true);
+            }
+            
             $sAddClassCover = "";
             if(isset($CNF['FIELD_COVER']) && isset($CNF['OBJECT_UPLOADERS_COVER']) && isset($CNF['OBJECT_STORAGE_COVER']) && isset($CNF['OBJECT_IMAGES_TRANSCODER_COVER'])){
                 bx_alert('system', 'image_editor', 0, 0, array(
@@ -361,26 +369,15 @@ class BxBaseModProfileTemplate extends BxBaseModGeneralTemplate
                    'add_code' => &$sAddCode
                 ));
             }
-
+            
             $aTmplVarsShowCover = [
                 'cover_popup_id' => $sCoverPopupId,
                 'cover_url' => $sUrlCover,
-                'cover_href' => !$aData[$CNF['FIELD_COVER']] && $bIsAllowEditCover ? $sUrlCoverChange : 'javascript:void(0);',
+                'unique_id' => $sUniqIdCover,
+                'cover_settins' => isset($CNF['FIELD_COVER_POSITION']) ? $this->_getImageSettings($aData[$CNF['FIELD_COVER_POSITION']]) : '',
                 'add_class' => $sAddClassCover,
                 'img_class' => $sAddClassCover != '' ? 'bx-media-editable-src' : '',
             ];
-
-            if($bProfileViewAllowed && $aData[$CNF['FIELD_COVER']]) {
-                $sCoverPopup = BxTemplFunctions::getInstance()->transBox($sCoverPopupId, $this->parseHtmlByName('image_popup.html', array (
-                    'image_url' => $sUrlCover,
-                    'bx_if:owner' => array (
-                        'condition' => $bIsAllowEditCover && empty($sAddClassCover),
-                        'content' => array (
-                            'change_image_url' => $sUrlCoverChange,
-                        ),
-                    ),
-                )), true, true);
-            }
         }
         else
             $sClass .= ' bx-no-cover';
@@ -391,7 +388,6 @@ class BxBaseModProfileTemplate extends BxBaseModGeneralTemplate
 
         $bTmplVarsShowAvatar = $bShowAvatar && ($bUrlAvatar || $this->_bLetterAvatar);
         $aTmplVarsShowAvatar = [];
-        $sPicturePopup = '';
 
         if($bTmplVarsShowAvatar) {
             $sPicturePopupId = $this->MODULE . '-popup-picture';
@@ -400,6 +396,12 @@ class BxBaseModProfileTemplate extends BxBaseModGeneralTemplate
             $sUrlPicture = $this->urlPicture ($aData);
             $sUrlPictureChange = bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_EDIT_ENTRY'] . '&id=' . $aData[$CNF['FIELD_ID']]));
 
+            $sPictureTweak = '';
+            $sUniqIdPicture = genRndPwd (8, false);
+            if ($bIsAllowEditPicture){
+                $sPictureTweak = $this->_prepareImage($aData, $sUniqIdPicture, $CNF['OBJECT_UPLOADERS_PICTURE'], $CNF['OBJECT_STORAGE'], $CNF['FIELD_PICTURE'], false);
+            }
+            
             $sAddClassPicture = "";
             if(isset($CNF['FIELD_PICTURE']) && isset($CNF['OBJECT_UPLOADERS_PICTURE']) && isset($CNF['OBJECT_STORAGE']) && isset($CNF['OBJECT_IMAGES_TRANSCODER_THUMB'])){
                 bx_alert('system', 'image_editor', 0, 0, array(
@@ -439,21 +441,12 @@ class BxBaseModProfileTemplate extends BxBaseModGeneralTemplate
                 ),
                 'picture_avatar_url' => $bUrlAvatar ? $sUrlAvatar : $this->getImageUrl('no-picture-preview.png'),
                 'picture_popup_id' => $sPicturePopupId,
+                'unique_id' => $sUniqIdPicture,
+                'picture_tweak' => $sPictureTweak, 
+                'cover_settins' => isset($CNF['FIELD_PICTURE_POSITION']) ? $this->_getImageSettings($aData[$CNF['FIELD_PICTURE_POSITION']]) : '',
                 'picture_url' => $sUrlPicture,
                 'picture_href' => !$aData[$CNF['FIELD_PICTURE']] && CHECK_ACTION_RESULT_ALLOWED === $oModule->checkAllowedEdit($aData) ? $sUrlPictureChange : 'javascript:void(0);',
             );
-
-            if($bProfileViewAllowed && $aData[$CNF['FIELD_PICTURE']]) {
-                $sPicturePopup = BxTemplFunctions::getInstance()->transBox($sPicturePopupId, $this->parseHtmlByName('image_popup.html', array (
-                    'image_url' => $sUrlPicture,
-                    'bx_if:owner' => array (
-                        'condition' => $bIsAllowEditPicture && empty($sAddClassPicture),
-                        'content' => array (
-                            'change_image_url' => $sUrlPictureChange,
-                        ),
-                    ),
-                )), true, true);
-            }
         }
 
         //--- Process Actions menu
@@ -480,6 +473,7 @@ class BxBaseModProfileTemplate extends BxBaseModGeneralTemplate
             'class' => trim($sClass),
             'id' => $aData[$CNF['FIELD_ID']],
             'content_url' => $sUrl,
+            
             'title' => $sTitle,
             'bx_if:show_title_as_tag' => [
                 'condition' => !$bUseAsAuthor,
@@ -505,9 +499,8 @@ class BxBaseModProfileTemplate extends BxBaseModGeneralTemplate
             'action_menu' => $sActionsMenu,
             'meta' => $sMetaMenu,
             'show_data' => $sShowData,
-            'picture_popup' => $sPicturePopup,
-            'cover_popup' => $sCoverPopup,
             'additional_code' => $sAddCode,
+            'cover_tweak' => $sCoverTweak,
         ];
 
         if($bUseAsBlock)

+ 1 - 1
modules/base/profile/classes/BxBaseModProfileUploaderCoverCrop.php

@@ -9,7 +9,7 @@
  * @{
  */
 
-class BxBaseModProfileUploaderCoverCrop extends BxTemplUploaderCrop
+class BxBaseModProfileUploaderCoverCrop extends BxTemplUploaderHTML5
 {
     protected $_oModule;
 

+ 8 - 19
modules/base/profile/template/cover.html

@@ -2,22 +2,23 @@
     <div class="bx-base-pofile-cover-wrapper __class__ bx-def-centered bx-def-padding-leftright bx-def-page-width bx-def-box-sizing">
         <div class="bx-base-pofile-cover bx-def-cover-color-bg bx-def-box-sizing">
             <div class="bx-base-pofile-cover-image __add_class__">
-                <a class="bx-base-pofile-cover-image bx-def-box-sizing" href="__cover_href__" onclick="$('#__cover_popup_id__').dolPopupImage('__cover_url__', this)">
-                    <img class="bx-base-pofile-cover-image __img_class__" style="background-image:url(__cover_url__)" src="<bx_icon_url:spacer.gif />"/>
-                </a>
-                <div class="bx-cover-gradient"></div>
+                <p class="bx-base-pofile-cover-image bx-def-box-sizing flex justify-center items-center" >
+                    <img class="bx-base-pofile-cover-image __img_class__ bx-image-edit-source-__unique_id__" style="background-image:url(__cover_url__); __cover_settins__" src="<bx_icon_url:spacer.gif />"/>
+                </p>
+                <div class="bx-cover-gradient"></div>  
             </div>
             <div class="bx-base-pofile-cover-info">
                 <div class="bx-base-pofile-ci-cnt bx-def-padding-leftright">
                     <bx_if:show_avatar>
                         <div class="bx-base-pofile-cover-thumb __add_class__">
-                            <a class="bx-base-pofile-cover-thumb" href="__picture_href__" onclick="$('#__picture_popup_id__').dolPopupImage('__picture_url__', $(this).parent()); event.stopPropagation();">
-                                <img class="bx-base-pofile-unit-thumb bx-def-ava-big bx-def-ava-big-size rounded-full ring-4 mx-auto ring-white dark:ring-gray-900 __img_class__" src="__ava_url__" <bx_if:show_ava_letter> style="display:none" </bx_if:show_ava_letter> />
+                            <a class="bx-base-pofile-cover-thumb" href="__picture_href__">
+                                <img class="bx-base-pofile-unit-thumb bx-def-ava-big bx-def-ava-big-size rounded-full ring-4 mx-auto ring-white dark:ring-gray-900 __img_class__ bx-image-edit-source-__unique_id__" src="__ava_url__" <bx_if:show_ava_letter> style="display:none" </bx_if:show_ava_letter> />
                                 <p class="bx-base-pofile-unit-thumb bx-def-ava-big bx-def-ava-big-size flex items-center justify-center box-border m-0 rounded-full ring-4 mx-auto ring-white dark:ring-gray-900 text-white font-bold text-5xl __img_class__-placeholder" style="background-color:rgba(__color__);<bx_if:show_ava_image>display:none</bx_if:show_ava_image>">__letter__</p>
                             </a>
                             <bx_if:show_online>
                                 <div class="bx-base-pofile-unit-online"></div>
                             </bx_if:show_online>
+                            __picture_tweak__
                         </div>
                     </bx_if:show_avatar>
                     <div class="bx-base-pofile-cover-user bx-def-margin-sec-topbottom">
@@ -29,20 +30,8 @@
                     </div>
                 </div>
             </div>
+            __cover_tweak__
         </div>
     </div>
-    __cover_popup__
-    __picture_popup__
 </div>
-<script>
-    setTimeout(function () {
-        var sPath = '.bx-base-pofile-cover-wrapper .bx-base-pofile-unit-thumb';
-        if ($(sPath).length) {
-            var body = $("html, body");
-            if (body.scrollTop() == 0) {
-                body.animate({ scrollTop: $(sPath).offset().top + "px" }, 'slow');
-            }
-        }
-    }, 500);
-</script>
 __additional_code__

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

@@ -239,6 +239,7 @@ div.bx-base-pofile-cover-image {
     height: 24rem;
 }
 a.bx-base-pofile-cover-image,
+p.bx-base-pofile-cover-image,
 a.bx-base-pofile-cover-image:hover {
     position:absolute;
     width:100%;
@@ -253,7 +254,7 @@ a.bx-base-pofile-cover-image:hover {
     -o-background-size: cover;
     background-size: cover;
 }
-a.bx-base-pofile-cover-image img {
+p.bx-base-pofile-cover-image img {
     position: relative;
     display: block;
     width: 100%;

+ 1 - 0
modules/base/profile/template/image_popup.html

@@ -3,6 +3,7 @@
     <div class="bx-base-pofile-popup-btn bx-def-padding">
         <bx_if:owner>
             <a class="bx-btn" href="__change_image_url__"><bx_text:_sys_txt_change_image /></a>
+            
         </bx_if:owner>
         <a class="bx-btn bx-def-margin-sec-left" title="<bx_text_attribute:_sys_close />" href="javascript:void(0);" onclick="$(this).parents().filter('.bx-popup-wrapper').dolPopupHide()"><i class="sys-icon times"></i></a>
     </div>

+ 1 - 1
modules/base/profile/template/unit_with_cover.html

@@ -1,7 +1,7 @@
 <div class="__class__ p-2 box-border">
     <div class="bx-base-pofile-unit-cnt bx-def-box bx-def-box-round-corners bx-def-color-bg-box relative h-full overflow-hidden">
         <div class="absolute z-0 w-full h-40 bg-gradient-to-b from-blue-400 to-blue-500"></div>
-        <a class="bx-base-pofile-unit-cover relative flex items-center justify-center w-full h-40 bg-no-repeat bg-center bg-cover hover:no-underline" style="background-image:url(__cover_url__);" href="__content_url__" onclick="__content_click__">
+        <a class="bx-base-pofile-unit-cover relative flex items-center justify-center w-full h-40 bg-no-repeat bg-center bg-cover hover:no-underline" style="background-image:url(__cover_url__);__cover_settings__" href="__content_url__" onclick="__content_click__">
             <bx_if:show_thumbnail>
                 <div class="bx-def-unit-img bx-def-__size__-size __class_size__ relative">
                     <bx_if:show_thumb_image>

+ 0 - 10
modules/base/text/template/uploader_button_html5_attach.html

@@ -1,10 +0,0 @@
-<div>
-    <div id="__div_id__" class="filepond bx-uploader-html5-drop-area border-2 border-gray-300 border-dashed rounded-lg hidden"></div>
-    <input type="text" id="__focus_div_id__" class="bx-uploader-html5-paste-catcher" tabindex="1" style="display: none" />
-    <div id="__errors_container_id__" class="bx-uploader-html5-errors-area bx-def-font-small"></div>
-    <div id="__progress_div_id__" class="hidden">
-        <div class="w-full bg-gray-200 rounded-full h-1 dark:bg-gray-700">
-            <div class="bg-blue-600 h-1 rounded-full progress_line" style="width: 0%"></div>
-        </div>
-    </div>
-</div>

+ 9 - 19
modules/boonex/artificer/data/template/mod_groups/cover.html

@@ -2,23 +2,26 @@
     <div class="bx-base-pofile-cover-wrapper __class__ relative">
         <div class="bx-base-pofile-cover relative">
             <div class="bx-base-pofile-cover-image-wrp relative xl:px-4 overflow-hidden">
-                <div class="bx-base-pofile-cover-image bx-def-page-width relative mx-auto opacity-100 xl:rounded-b-lg <bx_if:show_cover_placeholder>bx-bpci-holder h-32 lg:h-32 bg-gradient-to-b from-green-400 to-green-500</bx_if:show_cover_placeholder><bx_if:show_cover>h-64 lg:h-80</bx_if:show_cover> __add_class__">
-                    <a class="bx-base-pofile-cover-image box-border absolute h-full w-full" href="__cover_href__" onclick="$('#__cover_popup_id__').dolPopupImage('__cover_url__', this)">
-                        <img class="bx-base-pofile-cover-image w-full object-cover bg-cover xl:rounded-b-lg h-full relative __img_class__" style="background-image:url(__cover_url__)" src="<bx_icon_url:spacer.gif />" />
-                    </a>
+                <div class="bx-base-pofile-cover-image bx-def-page-width relative mx-auto opacity-100 xl:rounded-b-lg <bx_if:show_cover_placeholder>bx-bpci-holder h-32 lg:h-32 bg-gradient-to-b from-green-400 to-green-500</bx_if:show_cover_placeholder><bx_if:show_cover>h-64 lg:h-80</bx_if:show_cover> __add_class__ ">
+                    <p class="bx-base-pofile-cover-image box-border absolute h-full w-full flex justify-center items-center">
+                        <img class="bx-base-pofile-cover-image w-full object-cover bg-cover xl:rounded-b-lg h-full relative __img_class__ bx-image-edit-source-__unique_id__" style="background-image:url(__cover_url__); __cover_settins__" src="<bx_icon_url:spacer.gif />" />
+                    </p>
+                    __cover_tweak__
                 </div>
+                
             </div>
             <div class="bx-base-pofile-cover-info bx-def-page-width relative mx-auto px-6 lg:px-8">
                 <div class="bx-base-pofile-ci-cnt relative flex flex-col -mt-24 lg:-mt-16 lg:flex-row lg:items-center">
                     <bx_if:show_avatar>
                         <div class="bx-base-pofile-cover-thumb relative lg:absolute flex justify-center lg:flex-none z-10 __add_class__">
-                            <a class="bx-base-pofile-cover-thumb hover:no-underline" href="__picture_href__" onclick="$('#__picture_popup_id__').dolPopupImage('__picture_url__', $(this).parent()); event.stopPropagation();">
-                                <img class="bx-base-pofile-unit-thumb bx-def-ava-big bx-def-ava-big-size rounded-full ring-4 mx-auto ring-white dark:ring-gray-900 h-48 w-48 __img_class__" src="__ava_url__"  <bx_if:show_ava_letter> style="display:none" </bx_if:show_ava_letter> />
+                            <a class="bx-base-pofile-cover-thumb hover:no-underline" href="__picture_href__" >
+                                <img class="bx-base-pofile-unit-thumb bx-def-ava-big bx-def-ava-big-size rounded-full ring-4 mx-auto ring-white dark:ring-gray-900 h-48 w-48 __img_class__ bx-image-edit-source-__unique_id__" src="__ava_url__"  <bx_if:show_ava_letter> style="display:none" </bx_if:show_ava_letter> />
                                 <p class="bx-base-pofile-unit-thumb bx-def-ava-big bx-def-ava-big-size flex items-center justify-center box-border m-0 rounded-full ring-4 mx-auto ring-white dark:ring-gray-900 h-48 w-48 text-white font-bold text-5xl __img_class__-placeholder" style="background-color:rgba(__color__);<bx_if:show_ava_image>display:none</bx_if:show_ava_image>" >__letter__</p>
                             </a>
                             <bx_if:show_online>
                                 <div class="bx-base-pofile-unit-online"></div>
                             </bx_if:show_online>
+                            __picture_tweak__
                         </div>
                     </bx_if:show_avatar>
                     <bx_if:show_avatar_placeholder>
@@ -38,18 +41,5 @@
         </div>
         <div class="bx-def-page-width mx-auto pt-5 px-4 sm:px-6 lg:px-8 border-b border-gray-200 dark:border-gray-800 box-border"></div>
     </div>
-    __cover_popup__
-    __picture_popup__
 </div>
-<script>
-    setTimeout(function () {
-        var sPath = '.bx-base-pofile-cover-wrapper .bx-base-pofile-unit-thumb';
-        if ($(sPath).length) {
-            var body = $("html, body");
-            if (body.scrollTop() == 0) {
-                body.animate({ scrollTop: $(sPath).offset().top + "px" }, 'slow');
-            }
-        }
-    }, 500);
-</script>
 __additional_code__

+ 7 - 18
modules/boonex/artificer/data/template/mod_profile/cover.html

@@ -3,22 +3,24 @@
         <div class="bx-base-pofile-cover relative">
             <div class="bx-base-pofile-cover-image-wrp relative xl:px-4 overflow-hidden">
                 <div class="bx-base-pofile-cover-image bx-def-page-width relative mx-auto opacity-100 xl:rounded-b-lg <bx_if:show_cover_placeholder>bx-bpci-holder h-32 lg:h-32 bg-gradient-to-b from-blue-400 to-blue-500</bx_if:show_cover_placeholder><bx_if:show_cover>h-64 lg:h-80</bx_if:show_cover> __add_class__">
-                    <a class="bx-base-pofile-cover-image box-border absolute h-full w-full" href="__cover_href__" onclick="$('#__cover_popup_id__').dolPopupImage('__cover_url__', this)">
-                        <img class="bx-base-pofile-cover-image w-full object-cover bg-cover xl:rounded-b-lg h-full relative __img_class__" style="background-image:url(__cover_url__)" src="<bx_icon_url:spacer.gif />" />
-                    </a>
+                    <p class="bx-base-pofile-cover-image box-border absolute h-full w-full">
+                        <img class="bx-base-pofile-cover-image w-full object-cover bg-cover xl:rounded-b-lg h-full relative __img_class__ bx-image-edit-source-__unique_id__" style="background-image:url(__cover_url__); __cover_settins__" src="<bx_icon_url:spacer.gif />" />
+                    </p>
+                    __cover_tweak__
                 </div>
             </div>
             <div class="bx-base-pofile-cover-info bx-def-page-width relative mx-auto px-6 lg:px-8">
                 <div class="bx-base-pofile-ci-cnt relative flex flex-col -mt-24 lg:-mt-16 lg:flex-row lg:items-center">
                     <bx_if:show_avatar>
                         <div class="bx-base-pofile-cover-thumb bx-def-ava-big-size relative lg:absolute flex self-center lg:flex-none z-10 __add_class__">
-                            <a class="bx-base-pofile-cover-thumb hover:no-underline" href="__picture_href__" onclick="$('#__picture_popup_id__').dolPopupImage('__picture_url__', $(this).parent()); event.stopPropagation();">
-                                <img class="bx-base-pofile-unit-thumb bx-def-ava-big bx-def-ava-big-size rounded-full ring-4 mx-auto ring-white dark:ring-gray-900 h-48 w-48 __img_class__" src="__ava_url__"  <bx_if:show_ava_letter> style="display:none" </bx_if:show_ava_letter> />
+                            <a class="bx-base-pofile-cover-thumb hover:no-underline" href="__picture_href__">
+                                <img class="bx-base-pofile-unit-thumb bx-def-ava-big bx-def-ava-big-size rounded-full ring-4 mx-auto ring-white dark:ring-gray-900 h-48 w-48 __img_class__ bx-image-edit-source-__unique_id__" src="__ava_url__"  <bx_if:show_ava_letter> style="display:none" </bx_if:show_ava_letter> />
                                 <p class="bx-base-pofile-unit-thumb bx-def-ava-big bx-def-ava-big-size flex items-center justify-center box-border m-0 rounded-full ring-4 mx-auto ring-white dark:ring-gray-900 h-48 w-48 text-white font-bold text-5xl __img_class__-placeholder" style="background-color:rgba(__color__);<bx_if:show_ava_image>display:none</bx_if:show_ava_image>" >__letter__</p>
                             </a>
                             <bx_if:show_online>
                                 <div class="bx-base-pofile-unit-online"></div>
                             </bx_if:show_online>
+                            __picture_tweak__
                         </div>
                     </bx_if:show_avatar>
                     <bx_if:show_avatar_placeholder>
@@ -38,18 +40,5 @@
         </div>
         <div class="bx-def-page-width mx-auto pt-5 px-4 sm:px-6 lg:px-8 border-b border-gray-200 dark:border-gray-800 box-border"></div>
     </div>
-    __cover_popup__
-    __picture_popup__
 </div>
-<script>
-    setTimeout(function () {
-        var sPath = '.bx-base-pofile-cover-wrapper .bx-base-pofile-unit-thumb';
-        if ($(sPath).length) {
-            var body = $("html, body");
-            if (body.scrollTop() == 0) {
-                body.animate({ scrollTop: $(sPath).offset().top + "px" }, 'slow');
-            }
-        }
-    }, 500);
-</script>
 __additional_code__

+ 37 - 0
modules/boonex/artificer/data/template/system/css/cover.css

@@ -13,4 +13,41 @@ import url(../../../../../../../template/css/cover.css);
 }
 .dark .bx-cover-wrapper {
     background-image: url(../images/cover-default-dark.svg);
+}
+
+.bx-image-edit-buttons{
+    position: absolute;
+    left:1rem;
+    top:1rem;
+}
+.bx-base-pofile-cover-thumb .bx-image-edit-buttons{
+    display: flex;
+    width: 100%;
+    justify-content: center;
+    left:0px;
+    bottom:1rem;
+    top:auto;
+}
+.bx-image-edit-move{
+    cursor:move
+}
+.bx-image-edit-move-info{
+    display: flex;
+    align-items: center;
+    position: absolute;
+    opacity: 0.5;
+    background-color: #000;
+    -webkit-backface-visibility: hidden;
+    padding: 0.5rem 1rem;
+    border-radius: 1rem;
+    color:#fff;
+    letter-spacing: 1px;
+}
+.bx-image-edit-move-info i{
+    color:#fff;
+    font-size: 1.25rem;
+    margin-right: 1rem;
+}
+.bx-image-edit-buttons-no-image .bx-image-edit-buttons-edit{
+    display: none;
 }

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

@@ -42,6 +42,7 @@ class BxCnlConfig extends BxBaseModGroupsConfig
             'FIELD_TITLE' => 'channel_name',
             'FIELD_PICTURE' => 'picture',
             'FIELD_COVER' => 'cover',
+            'FIELD_COVER_POSITION' => 'cover_data',
             'FIELD_ALLOW_VIEW_TO' => 'allow_view_to',
             'FIELD_CF' => 'cf',
             'FIELD_VIEWS' => 'views',
@@ -54,7 +55,6 @@ class BxCnlConfig extends BxBaseModGroupsConfig
             // page URIs
             'URI_VIEW_ENTRY' => 'view-channel-profile',
             'URI_EDIT_ENTRY' => 'edit-channel-profile',
-            'URI_EDIT_COVER' => 'edit-channel-cover',
             'URI_JOINED_ENTRIES' => 'channels-author',
 
             'URL_HOME' => 'page.php?i=channels-home',

+ 0 - 9
modules/boonex/channels/install/sql/enable.sql

@@ -55,13 +55,6 @@ INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module
 INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
 ('bx_channels_edit_profile', 1, 'bx_channels', '_bx_channels_page_block_title_edit_profile', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:11:\"bx_channels\";s:6:\"method\";s:11:\"entity_edit\";}', 0, 0, 0);
 
--- PAGE: edit profile cover
-
-INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
-('bx_channels_edit_profile_cover', 'edit-channel-cover', '_bx_channels_page_title_sys_edit_profile_cover', '_bx_channels_page_title_edit_profile_cover', 'bx_channels', 5, 2147483647, 1, 'page.php?i=edit-channel-cover', '', '', '', 0, 1, 0, 'BxCnlPageEntry', 'modules/boonex/channels/classes/BxCnlPageEntry.php');
-
-INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
-('bx_channels_edit_profile_cover', 1, 'bx_channels', '_bx_channels_page_block_title_edit_profile_cover', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:11:\"bx_channels\";s:6:\"method\";s:17:\"entity_edit_cover\";}', 0, 0, 0);
 
 -- PAGE: delete profile
 
@@ -184,7 +177,6 @@ INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES
 
 INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
 ('bx_channels_view_actions_more', 'bx_channels', 'profile-subscribe-remove', '_bx_channels_menu_item_title_system_unsubscribe', '_bx_channels_menu_item_title_unsubscribe', 'javascript:void(0)', 'bx_conn_action(this, \'sys_profiles_subscriptions\', \'remove\', \'{profile_id}\')', '', 'check', '', 2147483647, 1, 0, 20),
-('bx_channels_view_actions_more', 'bx_channels', 'edit-channel-cover', '_bx_channels_menu_item_title_system_edit_cover', '_bx_channels_menu_item_title_edit_cover', 'page.php?i=edit-channel-cover&id={content_id}', '', '', 'pencil-alt', '', 2147483647, 1, 0, 30),
 ('bx_channels_view_actions_more', 'bx_channels', 'edit-channel-profile', '_bx_channels_menu_item_title_system_edit_profile', '_bx_channels_menu_item_title_edit_profile', 'page.php?i=edit-channel-profile&id={content_id}', '', '', 'pencil-alt', '', 2147483647, 0, 0, 40),
 ('bx_channels_view_actions_more', 'bx_channels', 'delete-channel-profile', '_bx_channels_menu_item_title_system_delete_profile', '_bx_channels_menu_item_title_delete_profile', 'page.php?i=delete-channel-profile&id={content_id}', '', '', 'remove', '', 2147483647, 1, 0, 50);
 
@@ -208,7 +200,6 @@ INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `titl
 ('bx_channels_view_actions_all', 'bx_channels', 'report', '_sys_menu_item_title_system_va_report', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 260),
 ('bx_channels_view_actions_all', 'bx_channels', 'notes', '_sys_menu_item_title_system_va_notes', '_sys_menu_item_title_va_notes', 'javascript:void(0)', 'javascript:bx_get_notes(this,  ''{module_uri}'', {content_id});', '', 'exclamation-triangle', '', '', 0, 2147483647, 1, 0, 280),
 ('bx_channels_view_actions_all', 'bx_channels', 'social-sharing', '_sys_menu_item_title_system_social_sharing', '_sys_menu_item_title_social_sharing', 'javascript:void(0)', 'oBxDolPage.share(this, \'{url_encoded}\')', '', 'share', '', '', 0, 2147483647, 1, 0, 300),
-('bx_channels_view_actions_all', 'bx_channels', 'edit-channel-cover', '_bx_channels_menu_item_title_system_edit_cover', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 400),
 ('bx_channels_view_actions_all', 'bx_channels', 'edit-channel-profile', '_bx_channels_menu_item_title_system_edit_profile', '', '', '', '', '', '', '', 0, 2147483647, 0, 0, 410),
 ('bx_channels_view_actions_all', 'bx_channels', 'delete-channel-profile', '_bx_channels_menu_item_title_system_delete_profile', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 420),
 ('bx_channels_view_actions_all', 'bx_channels', 'more-auto', '_sys_menu_item_title_system_va_more_auto', '_sys_menu_item_title_va_more_auto', 'javascript:void(0)', '', '', 'ellipsis-v', '', '', 0, 2147483647, 1, 0, 9999);

+ 1 - 0
modules/boonex/channels/install/sql/install.sql

@@ -8,6 +8,7 @@ CREATE TABLE IF NOT EXISTS `bx_cnl_data` (
   `changed` int(11) NOT NULL,
   `picture` int(11) NOT NULL,
   `cover` int(11) NOT NULL,
+  `cover_data` varchar(50) NOT NULL,
   `channel_name` varchar(191) NOT NULL,
   `views` int(11) NOT NULL default '0',
   `rate` float NOT NULL default '0',

+ 1 - 1
modules/boonex/courses/classes/BxCoursesConfig.php

@@ -47,6 +47,7 @@ class BxCoursesConfig extends BxBaseModGroupsConfig
             'FIELD_CATEGORY' => 'cat',
             'FIELD_PICTURE' => 'picture',
             'FIELD_COVER' => 'cover',
+            'FIELD_COVER_POSITION' => 'cover_data',
             'FIELD_JOIN_CONFIRMATION' => 'join_confirmation',
             'FIELD_ALLOW_VIEW_TO' => 'allow_view_to',
             'FIELD_ALLOW_POST_TO' => 'allow_post_to',
@@ -68,7 +69,6 @@ class BxCoursesConfig extends BxBaseModGroupsConfig
             // page URIs
             'URI_VIEW_ENTRY' => 'view-course-profile',
             'URI_EDIT_ENTRY' => 'edit-course-profile',
-            'URI_EDIT_COVER' => 'edit-course-cover',
             'URI_JOIN_ENTRY' => 'join-course-profile',
             'URI_JOINED_ENTRIES' => 'joined-courses',
             'URI_MANAGE_COMMON' => 'courses-manage',

+ 1 - 1
modules/boonex/courses/classes/BxCoursesSearchResult.php

@@ -39,7 +39,7 @@ class BxCoursesSearchResult extends BxBaseModGroupsSearchResult
                     'table' => 'bx_courses_data',
                     'mainField' => 'content_id',
                     'onField' => 'id',
-                    'joinFields' => array('id', 'name', 'desc', 'picture', 'cover', 'added', 'author', 'allow_view_to'),
+                    'joinFields' => array('id', 'name', 'desc', 'picture', 'cover', 'cover_data', 'added', 'author', 'allow_view_to'),
                 ),
                 'account' => array(
                     'type' => 'INNER',

+ 0 - 10
modules/boonex/courses/install/sql/enable.sql

@@ -67,14 +67,6 @@ INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module
 INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
 ('bx_courses_edit_profile', 1, 'bx_courses', '_bx_courses_page_block_title_edit_profile', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:10:"bx_courses";s:6:"method";s:11:"entity_edit";}', 0, 0, 0);
 
--- PAGE: edit profile cover
-
-INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
-('bx_courses_edit_profile_cover', 'edit-course-cover', '_bx_courses_page_title_sys_edit_profile_cover', '_bx_courses_page_title_edit_profile_cover', 'bx_courses', 5, 2147483647, 1, 'page.php?i=edit-course-cover', '', '', '', 0, 1, 0, 'BxCoursesPageEntry', 'modules/boonex/courses/classes/BxCoursesPageEntry.php');
-
-INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
-('bx_courses_edit_profile_cover', 1, 'bx_courses', '_bx_courses_page_block_title_edit_profile_cover', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:10:"bx_courses";s:6:"method";s:17:"entity_edit_cover";}', 0, 0, 0);
-
 -- PAGE: invite members
 
 INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
@@ -261,7 +253,6 @@ INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES
 INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `visibility_custom`, `active`, `copyable`, `order`) VALUES 
 ('bx_courses_view_actions_more', 'bx_courses', 'profile-fan-remove', '_bx_courses_menu_item_title_system_leave_entry', '{title_remove_fan}', 'javascript:void(0)', 'bx_conn_action(this, \'bx_courses_fans\', \'remove\', \'{profile_id}\')', '', 'sign-out-alt', '', 2147483647, '', 1, 0, 10),
 ('bx_courses_view_actions_more', 'bx_courses', 'profile-subscribe-remove', '_bx_courses_menu_item_title_system_unsubscribe', '_bx_courses_menu_item_title_unsubscribe', 'javascript:void(0)', 'bx_conn_action(this, \'sys_profiles_subscriptions\', \'remove\', \'{profile_id}\')', '', 'check', '', 2147483647, '', 1, 0, 20),
-('bx_courses_view_actions_more', 'bx_courses', 'edit-course-cover', '_bx_courses_menu_item_title_system_edit_cover', '_bx_courses_menu_item_title_edit_cover', 'page.php?i=edit-course-cover&id={content_id}', '', '', 'edit', '', 2147483647, '', 1, 0, 30),
 ('bx_courses_view_actions_more', 'bx_courses', 'edit-course-profile', '_bx_courses_menu_item_title_system_edit_profile', '_bx_courses_menu_item_title_edit_profile', 'page.php?i=edit-course-profile&id={content_id}', '', '', 'pencil-alt', '', 2147483647, '', 1, 0, 40),
 ('bx_courses_view_actions_more', 'bx_courses', 'edit-course-pricing', '_bx_courses_menu_item_title_system_edit_pricing', '_bx_courses_menu_item_title_edit_pricing', 'page.php?i=edit-course-pricing&profile_id={profile_id}', '', '', 'money-check-alt', '', 2147483647, 'a:3:{s:6:"module";s:10:"bx_courses";s:6:"method";s:20:"is_pricing_avaliable";s:6:"params";a:1:{i:0;s:12:"{profile_id}";}}', 1, 0, 41),
 ('bx_courses_view_actions_more', 'bx_courses', 'invite-to-course', '_bx_courses_menu_item_title_system_invite', '_bx_courses_menu_item_title_invite', 'page.php?i=invite-to-course&id={content_id}', '', '', 'user-friends', '', 2147483647, '', 1, 0, 42),
@@ -294,7 +285,6 @@ INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `titl
 ('bx_courses_view_actions_all', 'bx_courses', 'notes', '_sys_menu_item_title_system_va_notes', '_sys_menu_item_title_va_notes', 'javascript:void(0)', 'javascript:bx_get_notes(this,  ''{module_uri}'', {content_id});', '', 'exclamation-triangle', '', '', 0, 2147483647, '', 1, 0, 280),
 ('bx_courses_view_actions_all', 'bx_courses', 'audit', '_sys_menu_item_title_system_va_audit', '_sys_menu_item_title_va_audit', 'page.php?i=dashboard-audit&module=bx_courses&content_id={content_id}', '', '', 'history', '', '', 0, 192, '', 1, 0, 290),
 ('bx_courses_view_actions_all', 'bx_courses', 'social-sharing', '_sys_menu_item_title_system_social_sharing', '_sys_menu_item_title_social_sharing', 'javascript:void(0)', 'oBxDolPage.share(this, \'{url_encoded}\')', '', 'share', '', '', 0, 2147483647, '', 1, 0, 300),
-('bx_courses_view_actions_all', 'bx_courses', 'edit-course-cover', '_bx_courses_menu_item_title_system_edit_cover', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 400),
 ('bx_courses_view_actions_all', 'bx_courses', 'edit-course-profile', '_bx_courses_menu_item_title_system_edit_profile', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 410),
 ('bx_courses_view_actions_all', 'bx_courses', 'edit-course-pricing', '_bx_courses_menu_item_title_system_edit_pricing', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 415),
 ('bx_courses_view_actions_all', 'bx_courses', 'invite-to-course', '_bx_courses_menu_item_title_system_invite', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 420),

+ 1 - 0
modules/boonex/courses/install/sql/install.sql

@@ -8,6 +8,7 @@ CREATE TABLE IF NOT EXISTS `bx_courses_data` (
   `changed` int(11) NOT NULL,
   `picture` int(11) NOT NULL,
   `cover` int(11) NOT NULL,
+  `cover_data` varchar(50) NOT NULL,
   `name` varchar(255) NOT NULL,
   `cat` int(11) NOT NULL,
   `desc` text NOT NULL,

+ 7 - 18
modules/boonex/decorous/data/template/bx_organizations/cover.html

@@ -1,10 +1,10 @@
 <div class="bx-menu-toolbar-padding">
-    <div class="bx-base-pofile-cover-wrapper __class__ bx-def-centered bx-def-padding-leftright bx-def-page-width bx-def-box-sizing">
+    <div class="bx-base-pofile-cover-wrapper __class__ bx-def-centered bx-def-page-width bx-def-box-sizing">
         <div class="bx-base-pofile-cover bx-def-cover-color-bg bx-def-box-sizing">
             <div class="bx-base-pofile-cover-image">
-                <a class="bx-base-pofile-cover-image bx-def-box-sizing" href="__cover_href__" onclick="$('#__cover_popup_id__').dolPopupImage('__cover_url__', this)">
-                    <img class="bx-base-pofile-cover-image" style="background-image:url(__cover_url__)" src="<bx_icon_url:spacer.gif />"/>
-                </a>
+                <p class="bx-base-pofile-cover-image bx-def-box-sizing flex justify-center items-center">
+                    <img class="bx-base-pofile-cover-image bx-image-edit-source-__unique_id__" style="background-image:url(__cover_url__); __cover_settins__" src="<bx_icon_url:spacer.gif />"/>
+                </p>
                 <div class="bx-cover-gradient"></div>
             </div>
             <div class="bx-base-pofile-cover-info">
@@ -17,6 +17,7 @@
                         <bx_if:show_online>
                             <div class="bx-base-pofile-unit-online"></div>
                         </bx_if:show_online>
+                        __picture_tweak__
                     </div>
                 </bx_if:show_avatar>
                 <div class="bx-base-pofile-ci-cnt bx-def-padding-leftright">
@@ -29,19 +30,7 @@
                     </div>
                 </div>
             </div>
+        __cover_tweak__
         </div>
     </div>
-    __cover_popup__
-    __picture_popup__
-</div>
-<script>
-    setTimeout(function () {
-        var sPath = '.bx-base-pofile-cover-wrapper .bx-base-pofile-unit-thumb';
-        if ($(sPath).length) {
-            var body = $("html, body");
-            if (body.scrollTop() == 0) {
-                body.animate({ scrollTop: $(sPath).offset().top - $('#bx-toolbar').height() - 16 + "px" }, 'slow');
-            }
-        }
-    }, 500);
-</script>
+</div>

+ 8 - 19
modules/boonex/decorous/data/template/bx_persons/cover.html

@@ -1,11 +1,11 @@
 <div class="bx-menu-toolbar-padding">
     <div class="bx-base-pofile-cover-wrapper __class__">
         <div class="bx-base-pofile-cover bx-def-cover-color-bg bx-def-box-sizing">
-            <div class="bx-base-pofile-cover-image bx-def-page-width bx-def-centered bx-def-padding-leftright bx-def-box-sizing">
+            <div class="bx-base-pofile-cover-image bx-def-page-width bx-def-centered bx-def-box-sizing ">
                 <div class="bx-base-pofile-cover-image-cnt bx-def-box-sizing">
-                    <a class="bx-base-pofile-cover-image bx-def-box-sizing" href="__cover_href__" onclick="$('#__cover_popup_id__').dolPopupImage('__cover_url__', this)">
-                        <img class="bx-base-pofile-cover-image" style="background-image:url(__cover_url__)" src="<bx_icon_url:spacer.gif />"/>
-                    </a>
+                    <p class="bx-base-pofile-cover-image bx-def-box-sizing flex justify-center items-center">
+                        <img class="bx-base-pofile-cover-image bx-image-edit-source-__unique_id__" style="background-image:url(__cover_url__); __cover_settins__" src="<bx_icon_url:spacer.gif />"/>
+                    </p>
                     <div class="bx-cover-gradient"></div>
                 </div>
             </div>
@@ -13,12 +13,13 @@
                 <bx_if:show_avatar>
                     <div class="bx-base-pofile-cover-thumb bx-def-ava-big-size __add_class__">
                         <a class="bx-base-pofile-cover-thumb" href="__picture_href__" onclick="$('#__picture_popup_id__').dolPopupImage('__picture_url__', $(this).parent()); event.stopPropagation();">
-                            <img class="bx-base-pofile-unit-thumb bx-def-ava-big bx-def-ava-big-size __img_class__" src="__ava_url__" <bx_if:show_ava_letter> style="display:none" </bx_if:show_ava_letter> />
+                            <img class="bx-base-pofile-unit-thumb bx-def-ava-big bx-def-ava-big-size __img_class__ bx-image-edit-source-__unique_id__" src="__ava_url__" <bx_if:show_ava_letter> style="display:none" </bx_if:show_ava_letter> />
                             <p class="bx-base-pofile-unit-thumb bx-def-ava-big bx-def-ava-big-size bx-def-border __img_class__-placeholder" style="background-color:rgba(__color__);<bx_if:show_ava_image>display:none</bx_if:show_ava_image>">__letter__</p>
                         </a>
                         <bx_if:show_online>
                             <div class="bx-base-pofile-unit-online"></div>
                         </bx_if:show_online>
+                        __picture_tweak__
                     </div>
                 </bx_if:show_avatar>
                 <div class="bx-base-pofile-ci-cnt bx-def-padding">
@@ -31,19 +32,7 @@
                     </div>
                 </div>
             </div>
+            __cover_tweak__
         </div>
     </div>
-    __cover_popup__
-    __picture_popup__
-</div>
-<script>
-    setTimeout(function () {
-        var sPath = '.bx-base-pofile-cover-wrapper .bx-base-pofile-unit-thumb';
-        if ($(sPath).length) {
-            var body = $("html, body");
-            if (body.scrollTop() == 0) {
-				body.animate({ scrollTop: $(sPath).offset().top - $('#bx-toolbar').height() - 16 + "px" }, 'slow');
-            }
-        }
-    }, 500);
-</script>
+</div>

+ 6 - 1
modules/boonex/english/data/langs/system/en.xml

@@ -3598,7 +3598,7 @@ If it is not enabled then please consider implement this optimization, since it
     <string name="_sys_txt_form_entry_input_picture_pic_url"><![CDATA[Attachment URL:]]></string>
     <string name="_sys_txt_form_entry_input_picture_use_as_thumb"><![CDATA[Use as Thumbnail]]></string>
     <string name="_sys_txt_form_submission_error"><![CDATA[Incorrect info. Please, check your inputs and try to submit again.]]></string>
-    <string name="_sys_txt_form_submission_error_csrf_expired"><![CDATA[Token expired. Please try again.]]></string>
+    <string name="_sys_txt_form_submission_error_csrf_expired"><![CDATA[Token expired. Please try again.]]></string> 
 
     <string name="_sys_txt_homepage_cover"><![CDATA[Unity is strength... when there is teamwork and collaboration, wonderful things can be achieved.<br /><button class="bx-btn bx-hide-when-logged-in bx-def-margin-top" onclick="document.location='{0}'">Join Now!</button>]]></string>
     <string name="_sys_txt_login_2fa_description"><![CDATA[Two-factor authentication is enabled, please specify the phone number to send verification code to.]]></string>
@@ -3710,6 +3710,11 @@ If it is not enabled then please consider implement this optimization, since it
 	<string name="_sys_uploader_upload_canceled"><![CDATA[Too bad. Upload canceled.]]></string>
 	<string name="_sys_uploader_camera_capture_failed"><![CDATA[We were unable to initialize your camera.]]></string>
 	<string name="_sys_uploader_unsupported_browser"><![CDATA[Your browser doesn't support video recording. You can try <strong>Google Chrome</strong> or <strong>Mozilla FireFox</strong> instead.]]></string>
+    <string name="_sys_uploader_image_reposition"><![CDATA[Change position]]></string>
+    <string name="_sys_uploader_image_reposition_save"><![CDATA[Save]]></string>
+    <string name="_sys_uploader_image_reposition_cancel"><![CDATA[Cancel]]></string>
+    <string name="_sys_uploader_image_upload"><![CDATA[Upload new]]></string>
+    <string name="_sys_uploader_image_reposition_info"><![CDATA[Drag to reposition]]></string>
 	<string name="_sys_edit_profile"><![CDATA[Edit profile]]></string>    
 	<string name="_sys_exit"><![CDATA[Exit]]></string>    
 	<string name="_sys_warn"><![CDATA[warning]]></string>

+ 1 - 1
modules/boonex/events/classes/BxEventsConfig.php

@@ -49,6 +49,7 @@ class BxEventsConfig extends BxBaseModGroupsConfig
             'FIELD_CATEGORY' => 'event_cat',
             'FIELD_PICTURE' => 'picture',
             'FIELD_COVER' => 'cover',
+            'FIELD_COVER_POSITION' => 'cover_data',
             'FIELD_DATE_START' => 'date_start',
             'FIELD_DATE_END' => 'date_end',
             'FIELD_TIMEZONE' => 'timezone',
@@ -75,7 +76,6 @@ class BxEventsConfig extends BxBaseModGroupsConfig
             'URI_VIEW_ENTRY' => 'view-event-profile',
             'URI_EDIT_ENTRY' => 'edit-event-profile',
             'URI_ENTRIES_BY_CONTEXT' => 'events-context',
-            'URI_EDIT_COVER' => 'edit-event-cover',
             'URI_JOIN_ENTRY' => 'join-event-profile',
             'URI_JOINED_ENTRIES' => 'joined-events',
             'URI_MANAGE_COMMON' => 'events-manage',

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

@@ -43,7 +43,7 @@ class BxEventsSearchResult extends BxBaseModGroupsSearchResult
                     'table' => 'bx_events_data',
                     'mainField' => 'content_id',
                     'onField' => 'id',
-                    'joinFields' => array('id', 'event_name', 'event_desc', 'picture', 'cover', 'added', 'author', 'allow_view_to', 'date_start', 'date_end'),
+                    'joinFields' => array('id', 'event_name', 'event_desc', 'picture', 'cover', 'cover_data', 'added', 'author', 'allow_view_to', 'date_start', 'date_end'),
                 ),
                 'account' => array(
                     'type' => 'INNER',

+ 0 - 10
modules/boonex/events/install/sql/enable.sql

@@ -73,14 +73,6 @@ INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module
 INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
 ('bx_events_edit_profile', 1, 'bx_events', '_bx_events_page_block_title_edit_profile', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_events\";s:6:\"method\";s:11:\"entity_edit\";}', 0, 0, 0);
 
--- PAGE: edit profile cover
-
-INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
-('bx_events_edit_profile_cover', 'edit-event-cover', '_bx_events_page_title_sys_edit_profile_cover', '_bx_events_page_title_edit_profile_cover', 'bx_events', 5, 2147483647, 1, 'page.php?i=edit-event-cover', '', '', '', 0, 1, 0, 'BxEventsPageEntry', 'modules/boonex/events/classes/BxEventsPageEntry.php');
-
-INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
-('bx_events_edit_profile_cover', 1, 'bx_events', '_bx_events_page_block_title_edit_profile_cover', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_events\";s:6:\"method\";s:17:\"entity_edit_cover\";}', 0, 0, 0);
-
 -- PAGE: invite members
 
 INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
@@ -310,7 +302,6 @@ INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES
 INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `visibility_custom`, `active`, `copyable`, `order`) VALUES 
 ('bx_events_view_actions_more', 'bx_events', 'profile-fan-remove', '_bx_events_menu_item_title_system_leave_group', '{title_remove_fan}', 'javascript:void(0)', 'bx_conn_action(this, \'bx_events_fans\', \'remove\', \'{profile_id}\')', '', 'sign-out-alt', '', 2147483647, '', 1, 0, 10),
 ('bx_events_view_actions_more', 'bx_events', 'profile-subscribe-remove', '_bx_events_menu_item_title_system_unsubscribe', '_bx_events_menu_item_title_unsubscribe', 'javascript:void(0)', 'bx_conn_action(this, \'sys_profiles_subscriptions\', \'remove\', \'{profile_id}\')', '', 'check', '', 2147483647, '', 1, 0, 20),
-('bx_events_view_actions_more', 'bx_events', 'edit-event-cover', '_bx_events_menu_item_title_system_edit_cover', '_bx_events_menu_item_title_edit_cover', 'page.php?i=edit-event-cover&id={content_id}', '', '', 'edit', '', 2147483647, '', 1, 0, 30),
 ('bx_events_view_actions_more', 'bx_events', 'edit-event-profile', '_bx_events_menu_item_title_system_edit_profile', '_bx_events_menu_item_title_edit_profile', 'page.php?i=edit-event-profile&id={content_id}', '', '', 'pencil-alt', '', 2147483647, '', 1, 0, 40),
 ('bx_events_view_actions_more', 'bx_events', 'edit-event-pricing', '_bx_events_menu_item_title_system_edit_pricing', '_bx_events_menu_item_title_edit_pricing', 'page.php?i=edit-event-pricing&profile_id={profile_id}', '', '', 'money-check-alt', '', 2147483647, 'a:3:{s:6:"module";s:9:"bx_events";s:6:"method";s:20:"is_pricing_avaliable";s:6:"params";a:1:{i:0;s:12:"{profile_id}";}}', 1, 0, 41),
 ('bx_events_view_actions_more', 'bx_events', 'invite-to-event', '_bx_events_menu_item_title_system_invite', '_bx_events_menu_item_title_invite', 'page.php?i=invite-to-event&id={content_id}', '', '', 'user-friends', '', 2147483647, '', 1, 0, 42),
@@ -344,7 +335,6 @@ INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `titl
 ('bx_events_view_actions_all', 'bx_events', 'notes', '_sys_menu_item_title_system_va_notes', '_sys_menu_item_title_va_notes', 'javascript:void(0)', 'javascript:bx_get_notes(this,  ''{module_uri}'', {content_id});', '', 'exclamation-triangle', '', '', 0, 2147483647, '', 1, 0, 280),
 ('bx_events_view_actions_all', 'bx_events', 'audit', '_sys_menu_item_title_system_va_audit', '_sys_menu_item_title_va_audit', 'page.php?i=dashboard-audit&module=bx_events&content_id={content_id}', '', '', 'history', '', '', 0, 192, '', 1, 0, 290),
 ('bx_events_view_actions_all', 'bx_events', 'social-sharing', '_sys_menu_item_title_system_social_sharing', '_sys_menu_item_title_social_sharing', 'javascript:void(0)', 'oBxDolPage.share(this, \'{url_encoded}\')', '', 'share', '', '', 0, 2147483647, '', 1, 0, 300),
-('bx_events_view_actions_all', 'bx_events', 'edit-event-cover', '_bx_events_menu_item_title_system_edit_cover', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 400),
 ('bx_events_view_actions_all', 'bx_events', 'edit-event-profile', '_bx_events_menu_item_title_system_edit_profile', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 410),
 ('bx_events_view_actions_all', 'bx_events', 'edit-event-pricing', '_bx_events_menu_item_title_system_edit_pricing', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 415),
 ('bx_events_view_actions_all', 'bx_events', 'invite-to-event', '_bx_events_menu_item_title_system_invite', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 420),

+ 1 - 0
modules/boonex/events/install/sql/install.sql

@@ -10,6 +10,7 @@ CREATE TABLE IF NOT EXISTS `bx_events_data` (
   `published` int(11) NOT NULL,
   `picture` int(11) NOT NULL,
   `cover` int(11) NOT NULL,
+  `cover_data` varchar(50) NOT NULL,
   `event_name` varchar(255) NOT NULL,
   `event_cat` int(11) NOT NULL,
   `event_desc` text NOT NULL,

+ 1 - 1
modules/boonex/groups/classes/BxGroupsConfig.php

@@ -47,6 +47,7 @@ class BxGroupsConfig extends BxBaseModGroupsConfig
             'FIELD_CATEGORY' => 'group_cat',
             'FIELD_PICTURE' => 'picture',
             'FIELD_COVER' => 'cover',
+            'FIELD_COVER_POSITION' => 'cover_data',
             'FIELD_JOIN_CONFIRMATION' => 'join_confirmation',
             'FIELD_ALLOW_VIEW_TO' => 'allow_view_to',
             'FIELD_ALLOW_POST_TO' => 'allow_post_to',
@@ -68,7 +69,6 @@ class BxGroupsConfig extends BxBaseModGroupsConfig
             // page URIs
             'URI_VIEW_ENTRY' => 'view-group-profile',
             'URI_EDIT_ENTRY' => 'edit-group-profile',
-            'URI_EDIT_COVER' => 'edit-group-cover',
             'URI_JOIN_ENTRY' => 'join-group-profile',
             'URI_JOINED_ENTRIES' => 'joined-groups',
             'URI_ENTRIES_BY_CONTEXT' => 'groups-context',

+ 1 - 1
modules/boonex/groups/classes/BxGroupsSearchResult.php

@@ -39,7 +39,7 @@ class BxGroupsSearchResult extends BxBaseModGroupsSearchResult
                     'table' => 'bx_groups_data',
                     'mainField' => 'content_id',
                     'onField' => 'id',
-                    'joinFields' => array('id', 'group_name', 'group_desc', 'picture', 'cover', 'added', 'author', 'allow_view_to'),
+                    'joinFields' => array('id', 'group_name', 'group_desc', 'picture', 'cover', 'cover_data', 'added', 'author', 'allow_view_to'),
                 ),
                 'account' => array(
                     'type' => 'INNER',

+ 0 - 10
modules/boonex/groups/install/sql/enable.sql

@@ -69,14 +69,6 @@ INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module
 INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
 ('bx_groups_edit_profile', 1, 'bx_groups', '_bx_groups_page_block_title_edit_profile', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_groups\";s:6:\"method\";s:11:\"entity_edit\";}', 0, 0, 0);
 
--- PAGE: edit profile cover
-
-INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
-('bx_groups_edit_profile_cover', 'edit-group-cover', '_bx_groups_page_title_sys_edit_profile_cover', '_bx_groups_page_title_edit_profile_cover', 'bx_groups', 5, 2147483647, 1, 'page.php?i=edit-group-cover', '', '', '', 0, 1, 0, 'BxGroupsPageEntry', 'modules/boonex/groups/classes/BxGroupsPageEntry.php');
-
-INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
-('bx_groups_edit_profile_cover', 1, 'bx_groups', '_bx_groups_page_block_title_edit_profile_cover', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_groups\";s:6:\"method\";s:17:\"entity_edit_cover\";}', 0, 0, 0);
-
 -- PAGE: invite members
 
 INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
@@ -276,7 +268,6 @@ INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES
 INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `visibility_custom`, `active`, `copyable`, `order`) VALUES 
 ('bx_groups_view_actions_more', 'bx_groups', 'profile-fan-remove', '_bx_groups_menu_item_title_system_leave_group', '{title_remove_fan}', 'javascript:void(0)', 'bx_conn_action(this, \'bx_groups_fans\', \'remove\', \'{profile_id}\')', '', 'sign-out-alt', '', 2147483647, '', 1, 0, 10),
 ('bx_groups_view_actions_more', 'bx_groups', 'profile-subscribe-remove', '_bx_groups_menu_item_title_system_unsubscribe', '_bx_groups_menu_item_title_unsubscribe', 'javascript:void(0)', 'bx_conn_action(this, \'sys_profiles_subscriptions\', \'remove\', \'{profile_id}\')', '', 'check', '', 2147483647, '', 1, 0, 20),
-('bx_groups_view_actions_more', 'bx_groups', 'edit-group-cover', '_bx_groups_menu_item_title_system_edit_cover', '_bx_groups_menu_item_title_edit_cover', 'page.php?i=edit-group-cover&id={content_id}', '', '', 'edit', '', 2147483647, '', 1, 0, 30),
 ('bx_groups_view_actions_more', 'bx_groups', 'edit-group-profile', '_bx_groups_menu_item_title_system_edit_profile', '_bx_groups_menu_item_title_edit_profile', 'page.php?i=edit-group-profile&id={content_id}', '', '', 'pencil-alt', '', 2147483647, '', 1, 0, 40),
 ('bx_groups_view_actions_more', 'bx_groups', 'edit-group-pricing', '_bx_groups_menu_item_title_system_edit_pricing', '_bx_groups_menu_item_title_edit_pricing', 'page.php?i=edit-group-pricing&profile_id={profile_id}', '', '', 'money-check-alt', '', 2147483647, 'a:3:{s:6:"module";s:9:"bx_groups";s:6:"method";s:20:"is_pricing_avaliable";s:6:"params";a:1:{i:0;s:12:"{profile_id}";}}', 1, 0, 41),
 ('bx_groups_view_actions_more', 'bx_groups', 'invite-to-group', '_bx_groups_menu_item_title_system_invite', '_bx_groups_menu_item_title_invite', 'page.php?i=invite-to-group&id={content_id}', '', '', 'user-friends', '', 2147483647, '', 1, 0, 42),
@@ -309,7 +300,6 @@ INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `titl
 ('bx_groups_view_actions_all', 'bx_groups', 'notes', '_sys_menu_item_title_system_va_notes', '_sys_menu_item_title_va_notes', 'javascript:void(0)', 'javascript:bx_get_notes(this,  ''{module_uri}'', {content_id});', '', 'exclamation-triangle', '', '', 0, 2147483647, '', 1, 0, 280),
 ('bx_groups_view_actions_all', 'bx_groups', 'audit', '_sys_menu_item_title_system_va_audit', '_sys_menu_item_title_va_audit', 'page.php?i=dashboard-audit&module=bx_groups&content_id={content_id}', '', '', 'history', '', '', 0, 192, '', 1, 0, 290),
 ('bx_groups_view_actions_all', 'bx_groups', 'social-sharing', '_sys_menu_item_title_system_social_sharing', '_sys_menu_item_title_social_sharing', 'javascript:void(0)', 'oBxDolPage.share(this, \'{url_encoded}\')', '', 'share', '', '', 0, 2147483647, '', 1, 0, 300),
-('bx_groups_view_actions_all', 'bx_groups', 'edit-group-cover', '_bx_groups_menu_item_title_system_edit_cover', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 400),
 ('bx_groups_view_actions_all', 'bx_groups', 'edit-group-profile', '_bx_groups_menu_item_title_system_edit_profile', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 410),
 ('bx_groups_view_actions_all', 'bx_groups', 'edit-group-pricing', '_bx_groups_menu_item_title_system_edit_pricing', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 415),
 ('bx_groups_view_actions_all', 'bx_groups', 'invite-to-group', '_bx_groups_menu_item_title_system_invite', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 420),

+ 1 - 0
modules/boonex/groups/install/sql/install.sql

@@ -8,6 +8,7 @@ CREATE TABLE IF NOT EXISTS `bx_groups_data` (
   `changed` int(11) NOT NULL,
   `picture` int(11) NOT NULL,
   `cover` int(11) NOT NULL,
+  `cover_data` varchar(50) NOT NULL,
   `group_name` varchar(255) NOT NULL,
   `group_cat` int(11) NOT NULL,
   `group_desc` text NOT NULL,

+ 1 - 1
modules/boonex/lucid/data/template/bx_channels/unit.html

@@ -1,6 +1,6 @@
 <div class="__class__ bx-channels-unit-with-cover bx-def-padding-sec bx-def-box-sizing">
     <div class="bx-base-pofile-unit-cnt bx-def-box bx-def-border bx-def-round-corners bx-def-color-bg-box">
-	    <a class="bx-base-pofile-unit-cover bx-def-align-center" style="background-image:url(__cover_url__);" href="__content_url__" onclick="__content_click__">
+	    <a class="bx-base-pofile-unit-cover bx-def-align-center" style="background-image:url(__cover_url__);__cover_settings__" href="__content_url__" onclick="__content_click__">
                 <bx_if:show_thumbnail>
                     <div class="bx-def-unit-img bx-def-__size__-size">
                         <bx_if:show_thumb_image>

+ 1 - 1
modules/boonex/lucid/data/template/bx_events/unit.html

@@ -1,6 +1,6 @@
 <div class="__class__ bx-events-unit-with-cover bx-def-padding-sec bx-def-box-sizing">
     <div class="bx-base-pofile-unit-cnt bx-def-box bx-def-border bx-def-round-corners bx-def-color-bg-box">
-	    <a class="bx-base-pofile-unit-cover bx-def-align-center" style="background-image:url(__cover_url__);" href="__content_url__" onclick="__content_click__">
+	    <a class="bx-base-pofile-unit-cover bx-def-align-center" style="background-image:url(__cover_url__);__cover_settings__" href="__content_url__" onclick="__content_click__">
                 <bx_if:show_thumbnail>
                     <div class="bx-def-unit-img bx-def-__size__-size">
                         <bx_if:show_thumb_image>

+ 1 - 1
modules/boonex/lucid/data/template/bx_groups/unit.html

@@ -1,6 +1,6 @@
 <div class="__class__ bx-groups-unit-with-cover bx-def-padding-sec bx-def-box-sizing">
     <div class="bx-base-pofile-unit-cnt bx-def-box bx-def-border bx-def-round-corners bx-def-color-bg-box">
-	    <a class="bx-base-pofile-unit-cover bx-def-align-center" style="background-image:url(__cover_url__);" href="__content_url__" onclick="__content_click__">
+	    <a class="bx-base-pofile-unit-cover bx-def-align-center" style="background-image:url(__cover_url__);__cover_settings__" href="__content_url__" onclick="__content_click__">
                 <bx_if:show_thumbnail>
                     <div class="bx-def-unit-img bx-def-__size__-size">
                         <bx_if:show_thumb_image>

+ 1 - 1
modules/boonex/lucid/data/template/bx_persons/unit_with_cover.html

@@ -1,6 +1,6 @@
 <div class="__class__ bx-def-padding-sec bx-def-box-sizing">
     <div class="bx-base-pofile-unit-cnt bx-def-box bx-def-border bx-def-round-corners bx-def-color-bg-box">
-        <a class="bx-base-pofile-unit-cover bx-def-align-center" style="background-image:url(__cover_url__);" href="__content_url__" onclick="__content_click__">
+        <a class="bx-base-pofile-unit-cover bx-def-align-center" style="background-image:url(__cover_url__);__cover_settings__" href="__content_url__" onclick="__content_click__">
             <div class="bx-def-unit-img bx-def-__size__-size">
                 <bx_if:show_thumb_image>
                     <img class="bx-base-pofile-unit-thumb bx-def-__size__ bx-def-__size__-size bx-def-border bx-def-box-sizing" src="__thumb_url__" />

+ 1 - 1
modules/boonex/lucid/data/template/bx_spaces/unit.html

@@ -1,6 +1,6 @@
 <div class="__class__ bx-spaces-unit-with-cover bx-def-padding-sec bx-def-box-sizing">
     <div class="bx-base-pofile-unit-cnt bx-def-box bx-def-border bx-def-round-corners bx-def-color-bg-box">
-	    <a class="bx-base-pofile-unit-cover bx-def-align-center" style="background-image:url(__cover_url__);" href="__content_url__" onclick="__content_click__">
+	    <a class="bx-base-pofile-unit-cover bx-def-align-center" style="background-image:url(__cover_url__);__cover_settings__" href="__content_url__" onclick="__content_click__">
                 <bx_if:show_thumbnail>
                     <div class="bx-def-unit-img bx-def-__size__-size">
                         <bx_if:show_thumb_image>

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

@@ -57,6 +57,7 @@ class BxOrgsConfig extends BxBaseModGroupsConfig
             'FIELD_CATEGORY' => 'org_cat',
             'FIELD_PICTURE' => 'picture',
             'FIELD_COVER' => 'cover',
+            'FIELD_COVER_POSITION' => 'cover_data',
             'FIELD_JOIN_CONFIRMATION' => 'join_confirmation',
             'FIELD_ALLOW_VIEW_TO' => 'allow_view_to',
             'FIELD_ALLOW_POST_TO' => 'allow_post_to',
@@ -81,7 +82,6 @@ class BxOrgsConfig extends BxBaseModGroupsConfig
             'URI_VIEW_FRIEND_REQUESTS' => 'organization-friend-requests',
             'URI_VIEW_FAVORITES' => 'organization-profile-favorites',
             'URI_EDIT_ENTRY' => 'edit-organization-profile',
-            'URI_EDIT_COVER' => 'edit-organization-cover',
             'URI_JOIN_ENTRY' => 'join-organization-profile',
             'URI_JOINED_ENTRIES' => 'joined-organizations',
             'URI_MANAGE_COMMON' => 'organizations-manage',

+ 1 - 1
modules/boonex/organizations/classes/BxOrgsSearchResult.php

@@ -48,7 +48,7 @@ class BxOrgsSearchResult extends BxBaseModGroupsSearchResult
                     'table' => 'bx_organizations_data',
                     'mainField' => 'content_id',
                     'onField' => 'id',
-                    'joinFields' => array('id', 'org_name', 'picture', 'cover', 'added', 'author', 'allow_view_to'),
+                    'joinFields' => array('id', 'org_name', 'picture', 'cover', 'cover_data', 'added', 'author', 'allow_view_to'),
                 ),
                 'account' => array(
                     'type' => 'INNER',

+ 0 - 9
modules/boonex/organizations/install/sql/enable.sql

@@ -79,13 +79,6 @@ INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module
 INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
 ('bx_organizations_edit_profile', 1, 'bx_organizations', '_bx_orgs_page_block_title_edit_profile', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:11:\"entity_edit\";}', 0, 0, 0);
 
--- PAGE: edit profile cover
-INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
-('bx_organizations_edit_profile_cover', 'edit-organization-cover', '_bx_orgs_page_title_sys_edit_profile_cover', '_bx_orgs_page_title_edit_profile_cover', 'bx_organizations', 5, 2147483647, 1, 'page.php?i=edit-organization-cover', '', '', '', 0, 1, 0, 'BxOrgsPageEntry', 'modules/boonex/organizations/classes/BxOrgsPageEntry.php');
-
-INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
-('bx_organizations_edit_profile_cover', 1, 'bx_organizations', '_bx_orgs_page_block_title_edit_profile_cover', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:17:\"entity_edit_cover\";}', 0, 0, 0);
-
 -- PAGE: invite members
 INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
 ('bx_organizations_invite', 'invite-to-organization', '_bx_orgs_page_title_sys_invite_to_organization', '_bx_orgs_page_title_invite_to_organization', 'bx_organizations', 5, 2147483647, 1, 'page.php?i=invite-to-organization', '', '', '', 0, 1, 0, 'BxOrgsPageEntry', 'modules/boonex/organizations/classes/BxOrgsPageEntry.php');
@@ -312,7 +305,6 @@ INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `titl
 ('bx_organizations_view_actions_more', 'bx_organizations', 'profile-friend-remove', '_bx_orgs_menu_item_title_system_unfriend', '{title_remove_friend}', 'javascript:void(0)', 'bx_conn_action(this, \'sys_profiles_friends\', \'remove\', \'{profile_id}\')', '', 'user-minus', '', 2147483647, '', 1, 0, 10),
 ('bx_organizations_view_actions_more', 'bx_organizations', 'profile-relation-remove', '_bx_orgs_menu_item_title_system_relation_delete', '_bx_orgs_menu_item_title_relation_delete', 'javascript:void(0)', 'bx_conn_action(this, \'sys_profiles_relations\', \'remove\', \'{profile_id}\')', '', 'sync', '', 2147483647, '', 1, 0, 15),
 ('bx_organizations_view_actions_more', 'bx_organizations', 'profile-subscribe-remove', '_bx_orgs_menu_item_title_system_unsubscribe', '_bx_orgs_menu_item_title_unsubscribe', 'javascript:void(0)', 'bx_conn_action(this, \'sys_profiles_subscriptions\', \'remove\', \'{profile_id}\')', '', 'check', '', 2147483647, '', 1, 0, 20),
-('bx_organizations_view_actions_more', 'bx_organizations', 'edit-organization-cover', '_bx_orgs_menu_item_title_system_edit_cover', '_bx_orgs_menu_item_title_edit_cover', 'page.php?i=edit-organization-cover&id={content_id}', '', '', 'edit', '', 2147483647, '', 1, 0, 25),
 ('bx_organizations_view_actions_more', 'bx_organizations', 'edit-organization-profile', '_bx_orgs_menu_item_title_system_edit_profile', '_bx_orgs_menu_item_title_edit_profile', 'page.php?i=edit-organization-profile&id={content_id}', '', '', 'pencil-alt', '', 2147483647, '', 1, 0, 30),
 ('bx_organizations_view_actions_more', 'bx_organizations', 'edit-organization-pricing', '_bx_orgs_menu_item_title_system_edit_pricing', '_bx_orgs_menu_item_title_edit_pricing', 'page.php?i=edit-organization-pricing&profile_id={profile_id}', '', '', 'money-check-alt', '', 2147483647, 'a:3:{s:6:"module";s:16:"bx_organizations";s:6:"method";s:20:"is_pricing_avaliable";s:6:"params";a:1:{i:0;s:12:"{profile_id}";}}', 1, 0, 41),
 ('bx_organizations_view_actions_more', 'bx_organizations', 'invite-to-organization', '_bx_orgs_menu_item_title_system_invite', '_bx_orgs_menu_item_title_invite', 'page.php?i=invite-to-organization&id={content_id}', '', '', 'user-friends', '', 2147483647, '', 1, 0, 32),
@@ -350,7 +342,6 @@ INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `titl
 ('bx_organizations_view_actions_all', 'bx_organizations', 'notes', '_sys_menu_item_title_system_va_notes', '_sys_menu_item_title_va_notes', 'javascript:void(0)', 'javascript:bx_get_notes(this,  ''{module_uri}'', {content_id});', '', 'exclamation-triangle', '', '', 0, 2147483647, '', 1, 0, 280),
 ('bx_organizations_view_actions_all', 'bx_organizations', 'audit', '_sys_menu_item_title_system_va_audit', '_sys_menu_item_title_va_audit', 'page.php?i=dashboard-audit&module=bx_organizations&content_id={content_id}', '', '', 'history', '', '', 0, 192, '', 1, 0, 290),
 ('bx_organizations_view_actions_all', 'bx_organizations', 'social-sharing', '_sys_menu_item_title_system_social_sharing', '_sys_menu_item_title_social_sharing', 'javascript:void(0)', 'oBxDolPage.share(this, \'{url_encoded}\')', '', 'share', '', '', 0, 2147483647, '', 1, 0, 300),
-('bx_organizations_view_actions_all', 'bx_organizations', 'edit-organization-cover', '_bx_orgs_menu_item_title_system_edit_cover', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 400),
 ('bx_organizations_view_actions_all', 'bx_organizations', 'edit-organization-profile', '_bx_orgs_menu_item_title_system_edit_profile', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 410),
 ('bx_organizations_view_actions_all', 'bx_organizations', 'edit-organization-pricing', '_bx_orgs_menu_item_title_system_edit_pricing', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 415),
 ('bx_organizations_view_actions_all', 'bx_organizations', 'invite-to-organization', '_bx_orgs_menu_item_title_system_invite', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 420),

+ 1 - 0
modules/boonex/organizations/install/sql/install.sql

@@ -9,6 +9,7 @@ CREATE TABLE IF NOT EXISTS `bx_organizations_data` (
   `changed` int(11) NOT NULL,
   `picture` int(11) NOT NULL,
   `cover` int(11) NOT NULL,
+  `cover_data` varchar(50) NOT NULL,
   `org_name` varchar(255) NOT NULL,
   `org_cat` int(11) NOT NULL,
   `multicat` text NOT NULL,

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

@@ -46,7 +46,9 @@ class BxPersonsConfig extends BxBaseModProfileConfig
             'FIELD_TITLE' => 'fullname',
             'FIELD_TEXT' => 'description',
             'FIELD_PICTURE' => 'picture',
+            'FIELD_PICTURE_POSITION' => 'picture_data',
             'FIELD_COVER' => 'cover',
+            'FIELD_COVER_POSITION' => 'cover_data',
             'FIELD_BIRTHDAY' => 'birthday',
             'FIELD_ALLOW_VIEW_TO' => 'allow_view_to',
             'FIELD_ALLOW_POST_TO' => 'allow_post_to',
@@ -66,7 +68,6 @@ class BxPersonsConfig extends BxBaseModProfileConfig
             'URI_VIEW_FRIEND_REQUESTS' => 'persons-friend-requests',
             'URI_VIEW_FAVORITES' => 'persons-profile-favorites',
             'URI_EDIT_ENTRY' => 'edit-persons-profile',
-            'URI_EDIT_COVER' => 'edit-persons-cover',
             'URI_MANAGE_COMMON' => 'persons-manage',
             'URI_VIEW_SUBSCRIPTIONS' => 'persons-profile-subscriptions',
 

+ 1 - 1
modules/boonex/persons/classes/BxPersonsSearchResult.php

@@ -38,7 +38,7 @@ class BxPersonsSearchResult extends BxBaseModProfileSearchResult
                     'table' => 'bx_persons_data',
                     'mainField' => 'content_id',
                     'onField' => 'id',
-                    'joinFields' => array('id', 'fullname', 'last_name', 'picture', 'cover', 'added', 'author', 'allow_view_to'),
+                    'joinFields' => array('id', 'fullname', 'last_name', 'picture', 'cover', 'cover_data', 'added', 'author', 'allow_view_to'),
                 ),
                 'account' => array(
                     'type' => 'INNER',

+ 0 - 9
modules/boonex/persons/install/sql/enable.sql

@@ -72,13 +72,6 @@ INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module
 INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
 ('bx_persons_edit_profile', 1, 'bx_persons', '_bx_persons_page_block_title_edit_profile', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:11:\"entity_edit\";}', 0, 0, 0);
 
--- PAGE: edit profile cover
-INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
-('bx_persons_edit_profile_cover', 'edit-persons-cover', '_bx_persons_page_title_sys_edit_profile_cover', '_bx_persons_page_title_edit_profile_cover', 'bx_persons', 5, 2147483647, 1, 'page.php?i=edit-persons-cover', '', '', '', 0, 1, 0, 'BxPersonsPageEntry', 'modules/boonex/persons/classes/BxPersonsPageEntry.php');
-
-INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
-('bx_persons_edit_profile_cover', 1, 'bx_persons', '_bx_persons_page_block_title_edit_profile_cover', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:17:\"entity_edit_cover\";}', 0, 0, 0);
-
 -- PAGE: delete profile
 INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
 ('bx_persons_delete_profile', 'delete-persons-profile', '_bx_persons_page_title_sys_delete_profile', '_bx_persons_page_title_delete_profile', 'bx_persons', 5, 2147483647, 1, 'page.php?i=delete-persons-profile', '', '', '', 0, 1, 0, 'BxPersonsPageEntry', 'modules/boonex/persons/classes/BxPersonsPageEntry.php');
@@ -253,7 +246,6 @@ INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `titl
 ('bx_persons_view_actions_more', 'bx_persons', 'profile-friend-remove', '_bx_persons_menu_item_title_system_unfriend', '{title_remove_friend}', 'javascript:void(0)', 'bx_conn_action(this, \'sys_profiles_friends\', \'remove\', \'{profile_id}\')', '', 'user-times', '', 2147483647, 1, 0, 10),
 ('bx_persons_view_actions_more', 'bx_persons', 'profile-relation-remove', '_bx_persons_menu_item_title_system_relation_delete', '_bx_persons_menu_item_title_relation_delete', 'javascript:void(0)', 'bx_conn_action(this, \'sys_profiles_relations\', \'remove\', \'{profile_id}\')', '', 'sync', '', 2147483647, 1, 0, 15),
 ('bx_persons_view_actions_more', 'bx_persons', 'profile-subscribe-remove', '_bx_persons_menu_item_title_system_unsubscribe', '_bx_persons_menu_item_title_unsubscribe', 'javascript:void(0)', 'bx_conn_action(this, \'sys_profiles_subscriptions\', \'remove\', \'{profile_id}\')', '', 'check', '', 2147483647, 1, 0, 20),
-('bx_persons_view_actions_more', 'bx_persons', 'edit-persons-cover', '_bx_persons_menu_item_title_system_edit_cover', '_bx_persons_menu_item_title_edit_cover', 'page.php?i=edit-persons-cover&id={content_id}', '', '', 'edit', '', 2147483647, 1, 0, 25),
 ('bx_persons_view_actions_more', 'bx_persons', 'edit-persons-profile', '_bx_persons_menu_item_title_system_edit_profile', '_bx_persons_menu_item_title_edit_profile', 'page.php?i=edit-persons-profile&id={content_id}', '', '', 'pencil-alt', '', 2147483647, 1, 0, 30),
 ('bx_persons_view_actions_more', 'bx_persons', 'delete-persons-profile', '_bx_persons_menu_item_title_system_delete_profile', '_bx_persons_menu_item_title_delete_profile', 'page.php?i=delete-persons-profile&id={content_id}', '', '', 'remove', '', 2147483647, 1, 0, 40),
 ('bx_persons_view_actions_more', 'bx_persons', 'delete-persons-account', '_bx_persons_menu_item_title_system_delete_account', '_bx_persons_menu_item_title_delete_account', 'page.php?i=account-settings-delete&id={account_id}', '', '', 'user-times', '', 128, 1, 0, 50),
@@ -285,7 +277,6 @@ INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `titl
 ('bx_persons_view_actions_all', 'bx_persons', 'report', '_sys_menu_item_title_system_va_report', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 250),
 ('bx_persons_view_actions_all', 'bx_persons', 'notes', '_sys_menu_item_title_system_va_notes', '_sys_menu_item_title_va_notes', 'javascript:void(0)', 'javascript:bx_get_notes(this,  ''{module_uri}'', {content_id});', '', 'exclamation-triangle', '', '', 0, 2147483647, '', 1, 0, 280),
 ('bx_persons_view_actions_all', 'bx_persons', 'audit', '_sys_menu_item_title_system_va_audit', '_sys_menu_item_title_va_audit', 'page.php?i=dashboard-audit&module=bx_persons&content_id={content_id}', '', '', 'history', '', '', 0, 192, '', 1, 0, 290),
-('bx_persons_view_actions_all', 'bx_persons', 'edit-persons-cover', '_bx_persons_menu_item_title_system_edit_cover', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 400),
 ('bx_persons_view_actions_all', 'bx_persons', 'edit-persons-profile', '_bx_persons_menu_item_title_system_edit_profile', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 410),
 ('bx_persons_view_actions_all', 'bx_persons', 'delete-persons-profile', '_bx_persons_menu_item_title_system_delete_profile', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 420),
 ('bx_persons_view_actions_all', 'bx_persons', 'delete-persons-account', '_bx_persons_menu_item_title_system_delete_account', '', '', '', '', '', '', '', 0, 128, '', 1, 0, 430),

+ 1 - 0
modules/boonex/persons/install/sql/install.sql

@@ -9,6 +9,7 @@ CREATE TABLE IF NOT EXISTS `bx_persons_data` (
   `changed` int(11) NOT NULL,
   `picture` int(11) NOT NULL,
   `cover` int(11) NOT NULL,
+  `cover_data` varchar(50) NOT NULL,
   `fullname` varchar(255) NOT NULL,
   `last_name` varchar(255) NOT NULL,
   `description` text NOT NULL,

+ 6 - 0
modules/boonex/russian/data/langs/system/ru.xml

@@ -3628,6 +3628,12 @@
 	<string name="_sys_uploader_record_video_mb"><![CDATA[Мб]]></string>
 	<string name="_sys_uploader_record_video_switch_camera"><![CDATA[Переключить камеру]]></string>
 	<string name="_sys_uploader_unsupported_browser"><![CDATA[Ваш браузер не поддерживает запись видео. Попробуйте <strong>Google Chrome</strong> или <strong>Mozilla FireFox</strong>.]]></string>
+    <string name="_sys_uploader_image_reposition"><![CDATA[Изменить позицию]]></string>
+    <string name="_sys_uploader_image_reposition_save"><![CDATA[Сохранить]]></string>
+    <string name="_sys_uploader_image_reposition_cancel"><![CDATA[Отменить]]></string>
+    <string name="_sys_uploader_image_upload"><![CDATA[Загрузить новую]]></string>
+    <string name="_sys_uploader_image_reposition_info"><![CDATA[Перетащите, чтобы изменить положение]]></string>
+    
 	<string name="_sys_edit_profile"><![CDATA[Редактировать профиль]]></string>
 	<string name="_sys_exit"><![CDATA[Закончить]]></string>    
 	<string name="_sys_warn"><![CDATA[предупреждение]]></string>

+ 1 - 1
modules/boonex/spaces/classes/BxSpacesConfig.php

@@ -49,6 +49,7 @@ class BxSpacesConfig extends BxBaseModGroupsConfig
             'FIELD_CATEGORY' => 'space_cat',
             'FIELD_PICTURE' => 'picture',
             'FIELD_COVER' => 'cover',
+            'FIELD_COVER_POSITION' => 'cover_data',
             'FIELD_JOIN_CONFIRMATION' => 'join_confirmation',
             'FIELD_ALLOW_VIEW_TO' => 'allow_view_to',
             'FIELD_ALLOW_POST_TO' => 'allow_post_to',
@@ -70,7 +71,6 @@ class BxSpacesConfig extends BxBaseModGroupsConfig
             // page URIs
             'URI_VIEW_ENTRY' => 'view-space-profile',
             'URI_EDIT_ENTRY' => 'edit-space-profile',
-            'URI_EDIT_COVER' => 'edit-space-cover',
             'URI_JOIN_ENTRY' => 'join-space-profile',
             'URI_JOINED_ENTRIES' => 'joined-spaces',
             'URI_MANAGE_COMMON' => 'spaces-manage',

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

@@ -39,7 +39,7 @@ class BxSpacesSearchResult extends BxBaseModGroupsSearchResult
                     'table' => 'bx_spaces_data',
                     'mainField' => 'content_id',
                     'onField' => 'id',
-                    'joinFields' => array('id', 'space_name', 'picture', 'cover', 'added', 'author', 'allow_view_to'),
+                    'joinFields' => array('id', 'space_name', 'picture', 'cover', 'cover_data', 'added', 'author', 'allow_view_to'),
                 ),
                 'account' => array(
                     'type' => 'INNER',

+ 0 - 10
modules/boonex/spaces/install/sql/enable.sql

@@ -71,14 +71,6 @@ INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module
 INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
 ('bx_spaces_edit_profile', 1, 'bx_spaces', '_bx_spaces_page_block_title_edit_profile', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_spaces\";s:6:\"method\";s:11:\"entity_edit\";}', 0, 0, 0);
 
--- PAGE: edit profile cover
-
-INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
-('bx_spaces_edit_profile_cover', 'edit-space-cover', '_bx_spaces_page_title_sys_edit_profile_cover', '_bx_spaces_page_title_edit_profile_cover', 'bx_spaces', 5, 2147483647, 1, 'page.php?i=edit-space-cover', '', '', '', 0, 1, 0, 'BxSpacesPageEntry', 'modules/boonex/spaces/classes/BxSpacesPageEntry.php');
-
-INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
-('bx_spaces_edit_profile_cover', 1, 'bx_spaces', '_bx_spaces_page_block_title_edit_profile_cover', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_spaces\";s:6:\"method\";s:17:\"entity_edit_cover\";}', 0, 0, 0);
-
 -- PAGE: invite members
 
 INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
@@ -264,7 +256,6 @@ INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES
 INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `visibility_custom`, `active`, `copyable`, `order`) VALUES 
 ('bx_spaces_view_actions_more', 'bx_spaces', 'profile-fan-remove', '_bx_spaces_menu_item_title_system_leave_space', '{title_remove_fan}', 'javascript:void(0)', 'bx_conn_action(this, \'bx_spaces_fans\', \'remove\', \'{profile_id}\')', '', 'sign-out-alt', '', 2147483647, '', 1, 0, 10),
 ('bx_spaces_view_actions_more', 'bx_spaces', 'profile-subscribe-remove', '_bx_spaces_menu_item_title_system_unsubscribe', '_bx_spaces_menu_item_title_unsubscribe', 'javascript:void(0)', 'bx_conn_action(this, \'sys_profiles_subscriptions\', \'remove\', \'{profile_id}\')', '', 'check', '', 2147483647, '', 1, 0, 20),
-('bx_spaces_view_actions_more', 'bx_spaces', 'edit-space-cover', '_bx_spaces_menu_item_title_system_edit_cover', '_bx_spaces_menu_item_title_edit_cover', 'page.php?i=edit-space-cover&id={content_id}', '', '', 'edit', '', 2147483647, '', 1, 0, 30),
 ('bx_spaces_view_actions_more', 'bx_spaces', 'edit-space-profile', '_bx_spaces_menu_item_title_system_edit_profile', '_bx_spaces_menu_item_title_edit_profile', 'page.php?i=edit-space-profile&id={content_id}', '', '', 'pencil-alt', '', 2147483647, '', 1, 0, 40),
 ('bx_spaces_view_actions_more', 'bx_spaces', 'edit-space-pricing', '_bx_spaces_menu_item_title_system_edit_pricing', '_bx_spaces_menu_item_title_edit_pricing', 'page.php?i=edit-space-pricing&profile_id={profile_id}', '', '', 'money-check-alt', '', 2147483647, 'a:3:{s:6:"module";s:9:"bx_spaces";s:6:"method";s:20:"is_pricing_avaliable";s:6:"params";a:1:{i:0;s:12:"{profile_id}";}}', 1, 0, 41),
 ('bx_spaces_view_actions_more', 'bx_spaces', 'invite-to-space', '_bx_spaces_menu_item_title_system_invite', '_bx_spaces_menu_item_title_invite', 'page.php?i=invite-to-space&id={content_id}', '', '', 'user-friends', '', 2147483647, '', 1, 0, 42),
@@ -297,7 +288,6 @@ INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `titl
 ('bx_spaces_view_actions_all', 'bx_spaces', 'notes', '_sys_menu_item_title_system_va_notes', '_sys_menu_item_title_va_notes', 'javascript:void(0)', 'javascript:bx_get_notes(this,  ''{module_uri}'', {content_id});', '', 'exclamation-triangle', '', '', 0, 2147483647, '', 1, 0, 280),
 ('bx_spaces_view_actions_all', 'bx_spaces', 'audit', '_sys_menu_item_title_system_va_audit', '_sys_menu_item_title_va_audit', 'page.php?i=dashboard-audit&module=bx_spaces&content_id={content_id}', '', '', 'history', '', '', 0, 192, '', 1, 0, 290),
 ('bx_spaces_view_actions_all', 'bx_spaces', 'social-sharing', '_sys_menu_item_title_system_social_sharing', '_sys_menu_item_title_social_sharing', 'javascript:void(0)', 'oBxDolPage.share(this, \'{url_encoded}\')', '', 'share', '', '', 0, 2147483647, '', 1, 0, 300),
-('bx_spaces_view_actions_all', 'bx_spaces', 'edit-space-cover', '_bx_spaces_menu_item_title_system_edit_cover', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 400),
 ('bx_spaces_view_actions_all', 'bx_spaces', 'edit-space-profile', '_bx_spaces_menu_item_title_system_edit_profile', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 410),
 ('bx_spaces_view_actions_all', 'bx_spaces', 'edit-space-pricing', '_bx_spaces_menu_item_title_system_edit_pricing', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 415),
 ('bx_spaces_view_actions_all', 'bx_spaces', 'invite-to-space', '_bx_spaces_menu_item_title_system_invite', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 420),

+ 1 - 0
modules/boonex/spaces/install/sql/install.sql

@@ -10,6 +10,7 @@ CREATE TABLE IF NOT EXISTS `bx_spaces_data` (
   `changed` int(11) NOT NULL,
   `picture` int(11) NOT NULL,
   `cover` int(11) NOT NULL,
+  `cover_data` varchar(50) NOT NULL,
   `space_name` varchar(255) NOT NULL,
   `space_cat` int(11) NOT NULL,
   `space_desc` text NOT NULL,

+ 37 - 0
template/css/cover.css

@@ -19,6 +19,43 @@
     overflow: hidden;
 }
 
+.bx-image-edit-buttons{
+    position: absolute;
+    left:1rem;
+    top:1rem;
+}
+.bx-base-pofile-cover-thumb .bx-image-edit-buttons{
+    display: flex;
+    width: 100%;
+    justify-content: center;
+    left:0px;
+    bottom:1rem;
+    top:auto;
+}
+.bx-image-edit-move{
+    cursor:move
+}
+.bx-image-edit-move-info{
+    display: flex;
+    align-items: center;
+    position: absolute;
+    opacity: 0.5;
+    background-color: #000;
+    -webkit-backface-visibility: hidden;
+    padding: 0.5rem 1rem;
+    border-radius: 1rem;
+    color:#fff;
+    letter-spacing: 1px;
+}
+.bx-image-edit-move-info i{
+    color:#fff;
+    font-size: 1.25rem;
+    margin-right: 1rem;
+}
+.bx-image-edit-buttons-no-image .bx-image-edit-buttons-edit{
+    display: none;
+}
+
 .bx-cover-gradient {
     position: absolute;
     width: 100%;