mirror of
https://github.com/humhub/humhub.git
synced 2025-04-20 23:21:54 +02:00
settings cleanup (#7338)
* Remove horImageScrollOnMobile option #471 * Remove horImageScrollOnMobile option #471 * Remove horImageScrollOnMobile option #471
This commit is contained in:
parent
f56117fbbc
commit
4d27a04e57
@ -5,6 +5,7 @@ HumHub Changelog
|
||||
------------------------------
|
||||
- Enh #7328: `Mailer`, `User` and `Cache` configs removed from `dynamic.php`
|
||||
- Enh #7332: Optimized `DynamicConfig` to store and read database information only
|
||||
- Enh #7338: Remove `horImageScrollOnMobile` config option
|
||||
|
||||
1.17.0-beta.3 (Unreleased)
|
||||
---------------------------------
|
||||
|
@ -143,6 +143,5 @@ class SettingsLoader implements BootstrapInterface
|
||||
{
|
||||
$app->name = $app->settings->get('name');
|
||||
$app->params['installed'] = $app->settings->get('installed');
|
||||
$app->params['horImageScrollOnMobile'] = $app->settings->get('horImageScrollOnMobile');
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +33,6 @@ class DesignSettingsForm extends Model
|
||||
public $logo;
|
||||
public $icon;
|
||||
public $dateInputDisplayFormat;
|
||||
public $horImageScrollOnMobile;
|
||||
public $defaultStreamSort;
|
||||
|
||||
/**
|
||||
@ -51,7 +50,6 @@ class DesignSettingsForm extends Model
|
||||
$this->displayNameSubFormat = $settingsManager->get('displayNameSubFormat');
|
||||
$this->spaceOrder = Yii::$app->getModule('space')->settings->get('spaceOrder');
|
||||
$this->dateInputDisplayFormat = Yii::$app->getModule('admin')->settings->get('defaultDateInputFormat');
|
||||
$this->horImageScrollOnMobile = $settingsManager->get('horImageScrollOnMobile');
|
||||
$this->defaultStreamSort = Yii::$app->getModule('stream')->settings->get('defaultSort');
|
||||
}
|
||||
|
||||
@ -65,7 +63,6 @@ class DesignSettingsForm extends Model
|
||||
['paginationSize', 'integer', 'max' => 200, 'min' => 1],
|
||||
['theme', 'in', 'range' => $this->getThemes()],
|
||||
[['displayNameFormat', 'displayNameSubFormat', 'spaceOrder'], 'safe'],
|
||||
[['horImageScrollOnMobile'], 'boolean'],
|
||||
['logo', 'image', 'extensions' => 'png, jpg, jpeg', 'minWidth' => 100, 'minHeight' => 120],
|
||||
[['defaultStreamSort'], 'in', 'range' => array_keys($this->getDefaultStreamSortOptions())],
|
||||
['icon', 'image', 'extensions' => 'png, jpg, jpeg', 'minWidth' => 256, 'minHeight' => 256],
|
||||
@ -88,7 +85,6 @@ class DesignSettingsForm extends Model
|
||||
'logo' => Yii::t('AdminModule.settings', 'Logo upload'),
|
||||
'icon' => Yii::t('AdminModule.settings', 'Icon upload'),
|
||||
'dateInputDisplayFormat' => Yii::t('AdminModule.settings', 'Date input format'),
|
||||
'horImageScrollOnMobile' => Yii::t('AdminModule.settings', 'Horizontal scrolling images on a mobile device'),
|
||||
];
|
||||
}
|
||||
|
||||
@ -155,7 +151,6 @@ class DesignSettingsForm extends Model
|
||||
$settingsManager->set('displayNameSubFormat', $this->displayNameSubFormat);
|
||||
Yii::$app->getModule('space')->settings->set('spaceOrder', $this->spaceOrder);
|
||||
Yii::$app->getModule('admin')->settings->set('defaultDateInputFormat', $this->dateInputDisplayFormat);
|
||||
$settingsManager->set('horImageScrollOnMobile', $this->horImageScrollOnMobile);
|
||||
|
||||
Yii::$app->getModule('stream')->settings->set('defaultSort', $this->defaultStreamSort);
|
||||
|
||||
|
@ -66,10 +66,6 @@ $iconUrl = SiteIcon::getUrl(140);
|
||||
]);
|
||||
?>
|
||||
<strong><?= Yii::t('AdminModule.settings', 'Mobile appearance'); ?></strong>
|
||||
<br>
|
||||
<br>
|
||||
<?= $form->field($model, 'horImageScrollOnMobile')->checkbox(); ?>
|
||||
|
||||
|
||||
<div class="well">
|
||||
<?= $form->field($model, 'logo')->fileInput(['id' => 'admin-logo-file-upload', 'data-action-change' => 'admin.changeLogo', 'style' => 'display: none', 'name' => 'logo[]']); ?>
|
||||
|
@ -40,7 +40,6 @@ class InitialData
|
||||
Yii::$app->settings->set('baseUrl', BaseUrl::base(true));
|
||||
Yii::$app->settings->set('paginationSize', 10);
|
||||
Yii::$app->settings->set('displayNameFormat', '{profile.firstname} {profile.lastname}');
|
||||
Yii::$app->settings->set('horImageScrollOnMobile', true);
|
||||
|
||||
// Avoid immediate cron run after installation
|
||||
Yii::$app->settings->set('cronLastDailyRun', time());
|
||||
|
@ -45,7 +45,7 @@ humhub.module('stream.wall', function (module, require, $) {
|
||||
|
||||
Stream.call(this, container, options);
|
||||
|
||||
if (module.config.horizontalImageScrollOnMobile && /Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)) {
|
||||
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)) {
|
||||
this.$.addClass('mobile');
|
||||
}
|
||||
});
|
||||
|
@ -26,6 +26,5 @@ return [
|
||||
'params' =>
|
||||
[
|
||||
'config_created_at' => 1509135303,
|
||||
'horImageScrollOnMobile' => null,
|
||||
],
|
||||
];
|
||||
|
@ -268,7 +268,6 @@ class CoreJsConfig extends Widget
|
||||
'adminDeleteModalUrl' => Url::to(['/content/content/get-admin-delete-modal']),
|
||||
],
|
||||
'stream' => [
|
||||
'horizontalImageScrollOnMobile' => Yii::$app->settings->get('horImageScrollOnMobile'),
|
||||
'defaultSort' => Yii::$app->getModule('stream')->settings->get('defaultSort', 'c'),
|
||||
'text' => [
|
||||
'success.archive' => Yii::t('ContentModule.base', 'The content has been archived.'),
|
||||
|
Loading…
x
Reference in New Issue
Block a user