- Fix #3200 wall stream scroll not working after single entry load request

- Fix added missing required validation of target space for move content feature
- Enh: Added `humhub.modules.stream.StreamState.firstRequest` in order to determine the initial request
This commit is contained in:
buddh4 2018-07-12 15:14:31 +02:00
parent b063f90b4b
commit 1f6c83b65a
5 changed files with 12 additions and 6 deletions

View File

@ -10,6 +10,9 @@ HumHub Change Log
- Enh: Add possibility to delete an invitation [#2980](https://github.com/humhub/humhub/issues/2980)
- Enh: Moved search index tasks (add, update & delete) into asynchronous tasks
- Enh: Added search index rebuild button
- Fix #3200 wall stream scroll not working after single entry load request
- Fix added missing required validation of target space for move content feature
- Enh: Added `humhub.modules.stream.StreamState.firstRequest` in order to determine the initial request
1.3.0-beta.1 (July 4, 2018)

View File

@ -47,7 +47,8 @@ class MoveContentForm extends Model
public function rules()
{
return [
[['target'], 'validateTarget']
[['target'], 'validateTarget'],
[['target'], 'required']
];
}

View File

@ -13,7 +13,7 @@ $canMove = $model->isMovable() === true;
?>
<?php ModalDialog::begin(['header' => Yii::t('ContentModule.base', '<strong>Move</strong> content')]) ?>
<?php $form = ActiveForm::begin() ?>
<?php $form = ActiveForm::begin(['enableClientValidation' => false]) ?>
<div class="modal-body">
<?php if($canMove): ?>
<?= $form->field($model, 'target')->widget(SpacePickerField::class, [
@ -28,7 +28,7 @@ $canMove = $model->isMovable() === true;
<?php endif; ?>
</div>
<div class="modal-footer">
<?= Button::primary(Yii::t('base', 'Save'))->action('content.submitMove')->loader(true)->visible($canMove) ?>
<?= Button::primary(Yii::t('base', 'Save'))->action('content.submitMove')->submit()->loader(true)->visible($canMove) ?>
<?= ModalButton::cancel() ?>
</div>
<?php ActiveForm::end() ?>

View File

@ -134,9 +134,11 @@ humhub.module('stream.Stream', function (module, require, $) {
var contentId = this.$.data(DATA_STREAM_CONTENTID);
this.$.data(DATA_STREAM_CONTENTID, null);
return new StreamRequest(this, {
this.state.firstRequest = new StreamRequest(this, {
contentId: contentId,
limit: this.options.initLoadCount}).load();
limit: this.options.initLoadCount});
return this.state.firstRequest.load();
};
Stream.prototype.handleResponse = function(request) {

View File

@ -112,7 +112,7 @@ humhub.module('stream.wall', function (module, require, $) {
WallStream.prototype.initScroll = function() {
var that = this;
$(window).off('scroll.wallStream').on('scroll.wallStream', function () {
if(that.state.scrollLock || !that.canLoadMore() || !that.state.lastRequest || that.state.lastRequest.isSingleEntryRequest()) {
if(that.state.scrollLock || !that.canLoadMore() || !that.state.lastRequest || that.state.firstRequest.isSingleEntryRequest()) {
return;
}