Fix js warning of not loaded module space.chooser (#4900)

This commit is contained in:
Yuriy Bakhtin 2021-02-19 19:02:05 +03:00 committed by GitHub
parent 09cdaf37cf
commit 90ec966788
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -13,6 +13,7 @@ HumHub Changelog
- Fix #3687: Disable profile field type for existing record
- Fix #4819: Fixed some PHP8 issues. (Updated to Yii 2.0.40 / Imagine 1.0+)
- Fix #4825: Ensure unique setting values (Added unique table index)
- Fix #4895: Fix js warning of not loaded module space.chooser
1.7.2 (January 21, 2021)

View File

@ -7,7 +7,6 @@
humhub.module('content.container', function (module, require, $) {
var client = require('client');
var additions = require('ui.additions');
var chooser = require('space.chooser');
var follow = function(evt) {
var containerId = evt.$trigger.data('content-container-id');
@ -15,7 +14,7 @@ humhub.module('content.container', function (module, require, $) {
if (response.success) {
additions.switchButtons(evt.$trigger, $('[data-content-container-id="' + containerId + '"].unfollowButton'));
if (response.space) {
chooser.SpaceChooser.instance($('#space-menu-dropdown')).appendItem(response.space);
require('space.chooser').SpaceChooser.instance($('#space-menu-dropdown')).appendItem(response.space);
}
}
}).catch(function(e) {
@ -29,7 +28,7 @@ humhub.module('content.container', function (module, require, $) {
if (response.success) {
additions.switchButtons(evt.$trigger, $('[data-content-container-id="' + containerId + '"].followButton'));
if (response.space) {
chooser.SpaceChooser.instance($('#space-menu-dropdown')).removeItem(response.space);
require('space.chooser').SpaceChooser.instance($('#space-menu-dropdown')).removeItem(response.space);
}
}
}).catch(function(e) {