Merge remote-tracking branch 'remotes/upstream/develop' into develop

# Conflicts:
#	modules/backend/behaviors/RelationController.php
This commit is contained in:
Jack Dark 2016-08-18 02:02:43 +03:00
commit a6b0d3da7d
36 changed files with 341 additions and 122 deletions

View File

@ -250,8 +250,8 @@
.tooltip.in{opacity:1;filter:alpha(opacity=100)}
.oc-logo-white{background-image:url(../images/october-logo-white.svg);background-position:50% 50%;background-repeat:no-repeat;background-size:contain}
.oc-logo{background-image:url(../images/october-logo.svg);background-position:50% 50%;background-repeat:no-repeat;background-size:contain}
.layout.control-tabs.oc-logo-transparent:not(.has-tabs),.layout-cell.oc-logo-transparent{background-size:50% auto;background-repeat:no-repeat;background-image:url(../images/october-logo.svg);background-position:50% 50%;position:relative}
.layout.control-tabs.oc-logo-transparent:not(.has-tabs):after,.layout-cell.oc-logo-transparent:after{content:'';display:table-cell;position:absolute;left:0;top:0;height:100%;width:100%;background:rgba(249,249,249,0.7)}
.layout.control-tabs.oc-logo-transparent:not(.has-tabs),.flex-layout-column.oc-logo-transparent:not(.has-tabs),.layout-cell.oc-logo-transparent{background-size:50% auto;background-repeat:no-repeat;background-image:url(../images/october-logo.svg);background-position:50% 50%;position:relative}
.layout.control-tabs.oc-logo-transparent:not(.has-tabs):after,.flex-layout-column.oc-logo-transparent:not(.has-tabs):after,.layout-cell.oc-logo-transparent:after{content:'';display:table-cell;position:absolute;left:0;top:0;height:100%;width:100%;background:rgba(249,249,249,0.7)}
.report-widget{padding:15px;background:white;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;font-size:13px}
.report-widget h3{font-size:14px;color:#7e8c8d;text-transform:uppercase;font-weight:600;margin-top:0;margin-bottom:30px}
.report-widget .height-100{height:100px}

View File

@ -71,6 +71,7 @@
TreeView.prototype.dispose = function() {
this.unregisterHandlers()
this.clearScrollTimeout()
this.options = null
this.$el.removeData('oc.treeView')
@ -210,6 +211,7 @@
useAnimation: false,
usePlaceholderClone: true,
handle: 'span.drag-handle',
onDrag: this.proxy(this.onDrag),
tolerance: -20 // Give 20px of carry between containers
})
@ -295,6 +297,66 @@
this.toggleGroup($(ev.currentTarget).closest('li'))
return false
}
// TREEVIEW SCROLL ON DRAG
// ============================
TreeView.prototype.onDrag = function ($item, position, _super, event) {
this.dragCallback = function() {
_super($item, position, null, event)
};
this.clearScrollTimeout()
this.dragCallback()
if (!this.$scrollbar || this.$scrollbar.length === 0)
return
if (position.top < 0)
this.scrollOffset = -10 + Math.floor(position.top / 5)
else if (position.top > this.$scrollbar.height())
this.scrollOffset = 10 + Math.ceil((position.top - this.$scrollbar.height()) / 5)
else
return
this.scrollMax = function() {
return this.$el.height() - this.$scrollbar.height()
};
this.dragScroll()
}
TreeView.prototype.dragScroll = function() {
var startScrollTop = this.$scrollbar.scrollTop()
var changed
this.scrollTimeout = null
this.$scrollbar.scrollTop( Math.min(startScrollTop + this.scrollOffset, this.scrollMax()) )
changed = this.$scrollbar.scrollTop() - startScrollTop
if (changed === 0)
return
this.$el.children('ol').each(function() {
var sortable = $(this).data('oc.sortable')
sortable.refresh()
sortable.cursorAdjustment.top -= changed // Keep cursor adjustment in sync with scroll
});
this.dragCallback()
this.$scrollbar.data('oc.scrollbar').setThumbPosition() // Update scrollbar position
this.scrollTimeout = window.setTimeout(this.proxy(this.dragScroll), 100)
}
TreeView.prototype.clearScrollTimeout = function() {
if (this.scrollTimeout) {
window.clearTimeout(this.scrollTimeout)
this.scrollTimeout = null
}
}
// TREEVIEW PLUGIN DEFINITION
// ============================

View File

@ -45,8 +45,8 @@
}
.layout.control-tabs.oc-logo-transparent:not(.has-tabs),
.layout-cell.oc-logo-transparent,
.flex-layout-column.oc-logo-transparent {
.flex-layout-column.oc-logo-transparent:not(.has-tabs),
.layout-cell.oc-logo-transparent {
background-size: 50% auto;
background-repeat: no-repeat;
background-image: url(../images/october-logo.svg);

View File

@ -8,6 +8,7 @@ use Backend;
use BackendAuth;
use Backend\Classes\ControllerBehavior;
use Backend\Behaviors\ImportExportController\TranscodeFilter;
use Illuminate\Database\Eloquent\MassAssignmentException;
use League\Csv\Reader as CsvReader;
use League\Csv\Writer as CsvWriter;
use ApplicationException;
@ -189,6 +190,12 @@ class ImportExportController extends ControllerBehavior
$this->vars['importResults'] = $model->getResultStats();
$this->vars['returnUrl'] = $this->getRedirectUrlForType('import');
}
catch (MassAssignmentException $ex) {
$this->controller->handleError(new ApplicationException(Lang::get(
'backend::lang.model.mass_assignment_failed',
['attribute' => $ex->getMessage()]
)));
}
catch (Exception $ex) {
$this->controller->handleError($ex);
}
@ -411,6 +418,12 @@ class ImportExportController extends ControllerBehavior
$this->vars['fileUrl'] = $fileUrl;
$this->vars['returnUrl'] = $this->getRedirectUrlForType('export');
}
catch (MassAssignmentException $ex) {
$this->controller->handleError(new ApplicationException(Lang::get(
'backend::lang.model.mass_assignment_failed',
['attribute' => $ex->getMessage()]
)));
}
catch (Exception $ex) {
$this->controller->handleError($ex);
}

View File

@ -313,7 +313,7 @@ class ListController extends ControllerBehavior
Flash::error(Lang::get('backend::lang.list.delete_selected_empty'));
}
return $this->controller->listRefresh();
return $this->controller->listRefresh($definition);
}
/**

View File

@ -30,6 +30,11 @@ class RelationController extends ControllerBehavior
*/
const PARAM_MODE = '_relation_mode';
/**
* @var const Postback parameter for read only mode.
*/
const PARAM_READ_ONLY = '_relation_read_only';
/**
* @var Backend\Classes\WidgetBase Reference to the search widget object.
*/
@ -237,6 +242,7 @@ class RelationController extends ControllerBehavior
$this->vars['relationViewWidget'] = $this->viewWidget;
$this->vars['relationViewModel'] = $this->viewModel;
$this->vars['relationPivotWidget'] = $this->pivotWidget;
$this->vars['relationReadOnly'] = $this->readOnly ? 1 : 0;
$this->vars['relationSessionKey'] = $this->relationGetSessionKey();
}
@ -310,7 +316,6 @@ class RelationController extends ControllerBehavior
$this->relationObject = $this->model->{$field}();
$this->relationModel = $this->relationObject->getRelated();
$this->readOnly = $this->getConfig('readOnly');
$this->deferredBinding = $this->getConfig('deferredBinding') || !$this->model->exists;
$this->toolbarButtons = $this->evalToolbarButtons();
$this->viewMode = $this->evalViewMode();
@ -358,6 +363,13 @@ class RelationController extends ControllerBehavior
$this->pivotWidget->bindToController();
}
}
/*
* Read only mode
*/
if (post(self::PARAM_READ_ONLY, $this->getConfig('readOnly'))) {
$this->makeReadOnly();
}
}
/**
@ -374,8 +386,6 @@ class RelationController extends ControllerBehavior
$options = ['sessionKey' => $options];
}
$this->prepareVars();
/*
* Session key
*/
@ -383,6 +393,15 @@ class RelationController extends ControllerBehavior
$this->sessionKey = $options['sessionKey'];
}
/*
* Read only mode
*/
if (isset($options['readOnly']) && $options['readOnly']) {
$this->makeReadOnly();
}
$this->prepareVars();
/*
* Determine the partial to use based on the supplied section option
*/
@ -506,11 +525,9 @@ class RelationController extends ControllerBehavior
/*
* Add buttons to toolbar
*/
$defaultButtons = null;
if (!$this->readOnly && $this->toolbarButtons) {
$defaultButtons = '~/modules/backend/behaviors/relationcontroller/partials/_toolbar.htm';
}
$defaultButtons = $this->toolbarButtons
? '~/modules/backend/behaviors/relationcontroller/partials/_toolbar.htm'
: null;
$defaultConfig['buttons'] = $this->getConfig('view[toolbarPartial]', $defaultButtons);
@ -578,14 +595,15 @@ class RelationController extends ControllerBehavior
$config->showSorting = $this->getConfig('view[showSorting]', true);
$config->defaultSort = $this->getConfig('view[defaultSort]');
$config->recordsPerPage = $this->getConfig('view[recordsPerPage]');
$config->showCheckboxes = $this->getConfig('view[showCheckboxes]', !$this->readOnly);
$config->showCheckboxes = $this->getConfig('view[showCheckboxes]', true);
$config->recordUrl = $this->getConfig('view[recordUrl]', null);
$defaultOnClick = sprintf(
"$.oc.relationBehavior.clickViewListRecord(':%s', '%s', '%s')",
"$.oc.relationBehavior.clickViewListRecord(':%s', '%s', '%s', %s)",
$this->relationModel->getKeyName(),
$this->field,
$this->relationGetSessionKey()
$this->relationGetSessionKey(),
$this->readOnly ? 1 : 0
);
if ($config->recordUrl) {
@ -604,10 +622,30 @@ class RelationController extends ControllerBehavior
$config->noRecordsMessage = $emptyMessage;
}
$widget = $this->makeWidget('Backend\Widgets\Lists', $config);
/*
* Apply defined constraints
*/
if ($sqlConditions = $this->getConfig('view[conditions]')) {
$widget->bindEvent('list.extendQueryBefore', function($query) use ($sqlConditions) {
$query->whereRaw($sqlConditions);
});
}
elseif ($scopeMethod = $this->getConfig('view[scope]')) {
$widget->bindEvent('list.extendQueryBefore', function($query) use ($scopeMethod) {
$query->$scopeMethod();
});
}
else {
$widget->bindEvent('list.extendQueryBefore', function($query) {
$this->relationObject->addDefinedConstraintsToQuery($query);
});
}
/*
* Constrain the query by the relationship and deferred items
*/
$widget = $this->makeWidget('Backend\Widgets\Lists', $config);
$widget->bindEvent('list.extendQuery', function ($query) {
$this->relationObject->setQuery($query);
@ -1024,9 +1062,8 @@ class RelationController extends ControllerBehavior
*/
if ($this->viewMode == 'multi') {
if (($checkedIds = post('checked')) && is_array($checkedIds)) {
$relatedModel = $this->relationObject->getRelated();
foreach ($checkedIds as $relationId) {
if (!$obj = $relatedModel->find($relationId)) {
foreach ($checkedIds as $relationId) {
if (!$obj = $this->relationModel->find($relationId)) {
continue;
}
@ -1116,6 +1153,8 @@ class RelationController extends ControllerBehavior
$this->beforeAjax();
$recordId = post('record_id');
$sessionKey = $this->deferredBinding ? $this->relationGetSessionKey() : null;
$relatedModel = $this->relationModel;
/*
* Remove
@ -1125,22 +1164,12 @@ class RelationController extends ControllerBehavior
$checkedIds = $recordId ? [$recordId] : post('checked');
if (is_array($checkedIds)) {
$foreignKeyName = $relatedModel->getKeyName();
if ($this->relationType == 'belongsToMany'
|| $this->relationType == 'morphToMany'
|| $this->relationType == 'morphedByMany'
) {
$this->relationObject->detach($checkedIds);
$models = $relatedModel->whereIn($foreignKeyName, $checkedIds)->get();
foreach ($models as $model) {
$this->relationObject->remove($model, $sessionKey);
}
elseif ($this->relationType == 'hasMany' || $this->relationType == 'morphMany') {
$relatedModel = $this->relationObject->getRelated();
foreach ($checkedIds as $relationId) {
if ($obj = $relatedModel->find($relationId)) {
$this->relationObject->remove($obj);
}
}
}
}
}
/*
@ -1152,11 +1181,11 @@ class RelationController extends ControllerBehavior
$this->relationObject->getParent()->save();
}
elseif ($this->relationType == 'hasOne' || $this->relationType == 'morphOne') {
if ($obj = $this->relationModel->find($recordId)) {
$this->relationObject->remove($obj);
if ($obj = $relatedModel->find($recordId)) {
$this->relationObject->remove($obj, $sessionKey);
}
elseif ($this->viewModel->exists) {
$this->relationObject->remove($this->viewModel);
$this->relationObject->remove($this->viewModel, $sessionKey);
}
}
@ -1449,6 +1478,22 @@ class RelationController extends ControllerBehavior
return $context;
}
/**
* Apply read only mode.
*/
protected function makeReadOnly()
{
$this->readOnly = true;
if ($this->toolbarWidget && !$this->getConfig('view[toolbarPartial]', false)) {
$this->toolbarWidget->buttons = null;
}
if ($this->viewWidget && $this->viewMode == 'multi' && !$this->getConfig('view[showCheckboxes]', false)) {
$this->viewWidget->showCheckboxes = false;
}
}
/**
* Returns the configuration for a mode (view, manage, pivot) for an
* expected type (list, form). Uses fallback configuration.

View File

@ -9,7 +9,7 @@
$(el).closest('.control-list').listWidget('toggleChecked', [el])
}
this.clickViewListRecord = function(recordId, relationField, sessionKey) {
this.clickViewListRecord = function(recordId, relationField, sessionKey, readOnly) {
var newPopup = $('<a />')
newPopup.popup({
@ -18,7 +18,8 @@
extraData: {
'manage_id': recordId,
'_relation_field': relationField,
'_session_key': sessionKey
'_session_key': sessionKey,
'_relation_read_only': readOnly ? 1 : 0
}
})
}

View File

@ -1,11 +1,12 @@
<div
data-request-data="_relation_field: '<?= $relationField ?>'" id="<?= $this->relationGetId() ?>"
id="<?= $this->relationGetId() ?>"
data-request-data="_relation_field: '<?= $relationField ?>', _relation_read_only: <?= $relationReadOnly ?>"
class="relation-behavior relation-view-<?= $relationViewMode ?>">
<?php if ($toolbar = $this->relationRenderToolbar()): ?>
<!-- Relation Toolbar -->
<div id="<?= $this->relationGetId('toolbar') ?>" class="relation-toolbar">
<?= $toolbar ?>
<?= $toolbar ?>
</div>
<?php endif ?>
@ -14,4 +15,4 @@
<?= $this->relationRenderView() ?>
</div>
</div>
</div>

View File

@ -1,10 +1,10 @@
<?php foreach ($records as $record): ?>
<li data-record-id="<?= $record->id ?>" data-record-sort-order="<?= $record->sort_order ?>">
<li data-record-id="<?= $record->getKey() ?>" data-record-sort-order="<?= $record->sort_order ?>">
<div class="record">
<a href="javascript:;" class="move"></a>
<span><?= $this->reorderGetRecordName($record) ?></span>
<input name="record_ids[]" type="hidden" value="<?= $record->id ?>" />
<input name="record_ids[]" type="hidden" value="<?= $record->getKey() ?>" />
</div>
<?php if ($reorderShowTree): ?>

View File

@ -511,7 +511,7 @@ class Controller extends Extendable
throw new SystemException(Lang::get('backend::lang.widget.not_bound', ['name'=>$widgetName]));
}
if (($widget = $this->widget->{$widgetName}) && method_exists($widget, $handlerName)) {
if (($widget = $this->widget->{$widgetName}) && $widget->methodExists($handlerName)) {
$result = call_user_func_array([$widget, $handlerName], $this->params);
return ($result) ?: true;
}
@ -542,7 +542,7 @@ class Controller extends Extendable
$this->execPageAction($this->action, $this->params);
foreach ((array) $this->widget as $widget) {
if (method_exists($widget, $handler)) {
if ($widget->methodExists($handler)) {
$result = call_user_func_array([$widget, $handler], $this->params);
return ($result) ?: true;
}

View File

@ -89,14 +89,10 @@ class DatePicker extends FormWidgetBase
if ($value = $this->getLoadValue()) {
$value = $value instanceof Carbon ? $value->toDateTimeString() : $value;
/*
* Time
*/
if (strlen($value) <= 8) {
$value = Carbon::now()->toDateString() . ' ' . $value;
}
$value = DateTimeHelper::makeCarbon($value, false);
$value = $value instanceof Carbon ? $value->toDateTimeString() : $value;
}
/*

View File

@ -80,7 +80,7 @@ $.FE.LANGUAGE['fr'] = {
"Insert Image": "Ins\u00e9rer une image",
"Upload Image": "T\u00e9l\u00e9charger une image",
"By URL": "Par URL",
"Browse": "Feuilleter",
"Browse": "Parcourir",
"Drop image": "D\u00e9posez l'image",
"or click": "ou cliquez",
"Manage Images": "Gestion des images",
@ -104,6 +104,9 @@ $.FE.LANGUAGE['fr'] = {
"Insert Video": "Ins\u00e9rer une vid\u00e9o",
"Embedded Code": "Code embarqu\u00e9",
// Audio
"Insert Audio": "Ins\u00e9rer un m\u00e9dia sonore",
// Tables
"Insert Table": "Ins\u00e9rer un tableau",
"Table Header": "Ent\u00eate de tableau",
@ -135,6 +138,7 @@ $.FE.LANGUAGE['fr'] = {
// Files
"Upload File": "T\u00e9l\u00e9charger le fichier",
"Drop file": "D\u00e9posez le fichier",
"Insert File": "Ins\u00e9rer un fichier",
// Emoticons
"Emoticons": "\u00c9motic\u00f4nes",
@ -219,7 +223,7 @@ $.FE.LANGUAGE['fr'] = {
"Select All": "Tout s\u00e9lectionner",
// Code view
"Code View": "Vue de code",
"Code View": "Voir le code source",
// Quote
"Quote": "Citer",

View File

@ -49,7 +49,7 @@ $.FE.LANGUAGE['hu'] = {
"Heading 4": "C\u00edmsor 4",
// Style
"Paragraph Style": "Bekezd\u00e9s st\u00edlus\u00e1t",
"Paragraph Style": "Bekezd\u00e9s st\u00edlusa",
"Inline Style": " Helyi st\u00edlus",
// Alignment
@ -102,7 +102,10 @@ $.FE.LANGUAGE['hu'] = {
// Video
"Insert Video": "Vide\u00f3 beilleszt\u00e9se",
"Embedded Code": "Vide\u00f3 be\u00e1gyazása",
"Embedded Code": "K\u00f3d bem\u00e1sol\u00e1sa",
// Audio
"Insert Audio": "Audi\u00f3 beilleszt\u00e9se",
// Tables
"Insert Table": "T\u00e1bl\u00e1zat beilleszt\u00e9se",
@ -134,7 +137,8 @@ $.FE.LANGUAGE['hu'] = {
// Files
"Upload File": "F\u00e1jl felt\u00f6lt\u00e9se",
"Drop file": "H\u00fazza ide a f\u00e1jl",
"Drop file": "H\u00fazza ide a f\u00e1jlt",
"Insert File": "F\u00e1jl beilleszt\u00e9se",
// Emoticons
"Emoticons": "Hangulatjelek",

View File

@ -285,7 +285,7 @@ return [
'locale_comment' => 'Wählen Sie Ihre gewünschte Sprache für das Backend.',
],
'access_log' => [
'hint' => 'Dieser Log zeigt eine Liste mit erfolgreichen Anmelde-Verscuhen von Administratoren. Die Aufzeichnungen bleiben erhalten für :days Tage.',
'hint' => 'Dieser Log zeigt eine Liste mit erfolgreichen Anmelde-Versuchen von Administratoren. Die Aufzeichnungen bleiben erhalten für :days Tage.',
'menu_label' => 'Zugriffslog',
'menu_description' => 'Sehen Sie sich eine Liste mit erfolgreichen Backend Benutzeranmeldungen an.',
'created_at' => 'Datum & Uhrzeit',

View File

@ -2,7 +2,7 @@
return [
'auth' => [
'title' => 'Adminisztrációs oldal'
'title' => 'Admin felület'
],
'field' => [
'invalid_type' => 'A(z) :type mezőtípus érvénytelen.',
@ -19,6 +19,11 @@ return [
'help' => 'Ön nem rendelkezik a szükséges engedélyekkel ennek a lapnak a megtekintéséhez.',
'cms_link' => 'Vissza a látogatói oldalra'
],
'no_database' => [
'label' => 'Hiányzó adatbázis',
'help' => 'Az admin felület eléréséhez szükséges az adatbázis. Kérjük ellenőrizze a hozzáférési adatok helyességét majd próbálja újra.',
'cms_link' => 'Vissza a weboldalra'
],
'invalid_token' => [
'label' => 'Érvénytelen a biztonsági kód.'
]
@ -123,6 +128,10 @@ return [
'allow' => 'Engedélyezés',
'inherit' => 'Öröklés',
'deny' => 'Tiltás',
'activated' => 'Aktivált',
'last_login' => 'Bejelentkezve',
'created_at' => 'Létrehozva',
'updated_at' => 'Módosítva',
'group' => [
'name' => 'Csoport',
'name_comment' => 'A név a csoport létrehozásnál és szerkesztésnél jelenik meg.',
@ -165,7 +174,7 @@ return [
'records_per_page' => 'Listázás',
'records_per_page_help' => 'Adja meg az elemek laponként megjelenítendő számát. Minél nagyobbat választ, annál több időbe kerül a lista frissítése. Az ajánlott érték 20 és 40 közötti.',
'check' => 'Bejelöl',
'delete_selected' => 'Kiválasztottak törlése',
'delete_selected' => 'Eltávolítás',
'delete_selected_empty' => 'A törléshez előbb ki kell választani elemet.',
'delete_selected_confirm' => 'Töröljük a kiválasztott elemeket?',
'delete_selected_success' => 'Sikeresen törölve lettek a kiválasztott elemek.',
@ -322,16 +331,16 @@ return [
'theme' => 'Színséma',
'markup_styles' => 'Stílusok',
'custom_styles' => 'Egyéni megjelenés',
'custom styles_comment' => 'Saját stílusok megadása, amik a HTML szerkesztőre is vonatkoznak.',
'markup_classes' => 'CSS osztályok',
'custom styles_comment' => 'Saját stílusok és megjelenések megadása.',
'markup_classes' => 'Értékek',
'paragraph' => 'Bekezdés',
'link' => 'Hivatkozás',
'table' => 'Táblázat',
'table_cell' => 'Táblázat cella',
'image' => 'Kép',
'label' => 'Címke',
'class_name' => 'Osztály neve',
'markup_tags' => 'HTML elemek',
'label' => 'Megnevezés',
'class_name' => 'CSS osztály',
'markup_tags' => 'Szabályok',
'allowed_empty_tags' => 'Engedélyezett üres elemek',
'allowed_empty_tags_comment' => 'Azon HTML elemek, amik üres érték esetén sem lesznek eltávolítva.',
'allowed_tags' => 'Engedélyezett elemek',
@ -381,7 +390,7 @@ return [
'region' => 'Régió',
'code_editor' => 'Kódszerkesztő',
'timezone' => 'Időzóna',
'timezone_comment' => 'Dátumok megjelenítése a választott időzóna alapján.',
'timezone_comment' => 'Válassza ki az alapértelmezett időzónát.',
'locale' => 'Nyelv',
'locale_comment' => 'Válassza ki az alapértelmezett nyelvet.'
],
@ -447,7 +456,7 @@ return [
'required_match_column_error' => 'Please specify a match for the required field :label.',
'empty_export_columns_error' => 'Kérjük adjon meg néhány oszlopot az exportáláshoz.',
'behavior_missing_uselist_error' => 'You must implement the controller behavior ListController with the export "useList" option enabled.',
'missing_model_class_error' => 'Please specify the modelClass property for :type',
'missing_model_class_error' => 'Kérjük adja meg a modelClass tulajdonságát ehhez: :type',
'missing_column_id_error' => 'Hiányzó oszlop azonosító',
'unknown_column_error' => 'Ismeretlen oszlop',
'encoding_not_supported_error' => 'Source file encoding is not recognized. Please select the custom file format option with the proper encoding to import your file.',

View File

@ -79,7 +79,7 @@ return [
'login' => '登录',
'first_name' => '名',
'last_name' => '姓',
'full_name' => '全',
'full_name' => '全',
'email' => '邮件',
'groups' => '团队',
'groups_comment' => '指明这个人属于哪个组.',
@ -99,9 +99,11 @@ return [
'deny' => '拒绝',
'group' => [
'name' => '组',
'name_comment' => '该名字将在群组列表中展示',
'name_field' => '名字',
'description_field' => '描述',
'is_new_user_default_field' => '默认增加新管理员到这个组',
'is_new_user_default_field_label' => '默认组',
'is_new_user_default_field_comment' => '默认增加新管理员到这个组',
'code_field' => '代码',
'code_comment' => '如果你想访问 API, 请输入唯一码.',
'menu_label' => '群组',

View File

@ -2,7 +2,7 @@
use Backend\Models\BrandSetting;
use Backend\Models\EditorSetting;
?>
<?php if (BrandSetting::isConfigured()): ?>
<?php if (BrandSetting::isConfigured() || BrandSetting::isBaseConfigured()): ?>
<style>
<?= BrandSetting::renderCss() ?>
</style>

View File

@ -1,4 +1,5 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=0, minimal-ui">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="app-timezone" content="<?= e(Config::get('app.timezone')) ?>">

View File

@ -2,6 +2,7 @@
<html lang="<?= App::getLocale() ?>" class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="backend-base-path" content="<?= Backend::baseUrl() ?>">

View File

@ -1,9 +1,12 @@
<?php namespace Backend\Models;
use App;
use Url;
use File;
use Lang;
use Model;
use Cache;
use Config;
use Less_Parser;
use Exception;
@ -48,14 +51,14 @@ class BrandSetting extends Model
public function initSettingsData()
{
$this->app_name = Lang::get('system::lang.app.name');
$this->app_tagline = Lang::get('system::lang.app.tagline');
$config = App::make('config');
$this->primary_color = self::PRIMARY_COLOR;
$this->secondary_color = self::SECONDARY_COLOR;
$this->accent_color = self::ACCENT_COLOR;
$this->menu_mode = self::INLINE_MENU;
$this->app_name = $config->get('brand.appName', Lang::get('system::lang.app.name'));
$this->app_tagline = $config->get('brand.tagline', Lang::get('system::lang.app.tagline'));
$this->primary_color = $config->get('brand.primaryColor', self::PRIMARY_COLOR);
$this->secondary_color = $config->get('brand.secondaryColor', self::SECONDARY_COLOR);
$this->accent_color = $config->get('brand.accentColor', self::ACCENT_COLOR);
$this->menu_mode = $config->get('brand.menuMode', self::INLINE_MENU);
}
public function afterSave()
@ -66,11 +69,12 @@ class BrandSetting extends Model
public static function getLogo()
{
$settings = self::instance();
if (!$settings->logo) {
return null;
if ($settings->logo) {
return $settings->logo->getPath();
}
return $settings->logo->getPath();
return self::getDefaultLogo() ?: null;
}
public static function renderCss()
@ -93,22 +97,21 @@ class BrandSetting extends Model
public static function compileCss()
{
$parser = new Less_Parser(['compress' => true]);
$basePath = base_path('modules/backend/models/brandsetting');
$primaryColor = self::get('primary_color', self::PRIMARY_COLOR);
$secondaryColor = self::get('secondary_color', self::PRIMARY_COLOR);
$accentColor = self::get('accent_color', self::ACCENT_COLOR);
$vars = [
$parser->ModifyVars([
'logo-image' => "'".self::getLogo()."'",
'brand-primary' => $primaryColor,
'brand-secondary' => $secondaryColor,
'brand-accent' => $accentColor,
];
$parser->ModifyVars($vars);
]);
$parser->parse(
File::get(base_path().'/modules/backend/models/brandsetting/custom.less') .
File::get($basePath . '/custom.less') .
self::get('custom_css')
);
@ -116,4 +119,25 @@ class BrandSetting extends Model
return $css;
}
//
// Base line configuration
//
public static function isBaseConfigured()
{
return !!Config::get('brand');
}
public static function getDefaultLogo()
{
$logoPath = File::symbolizePath(Config::get('brand.logoPath'));
if ($logoPath && File::exists($logoPath)) {
return Url::asset(File::localToPublic($logoPath));
}
return null;
}
}

View File

@ -132,6 +132,13 @@ table.table.data {
}
}
.fancy-layout .control-tabs.secondary-tabs.secondary-content-tabs.primary-collapsed,
.fancy-layout.control-tabs.secondary-tabs.secondary-content-tabs.primary-collapsed {
> div > ul.nav-tabs {
background: @brand-secondary;
}
}
.control-filelist ul li.active > a:after {
background: @brand-secondary;
}

View File

@ -1268,13 +1268,13 @@ class Controller
public function findComponentByHandler($handler)
{
foreach ($this->page->components as $component) {
if (method_exists($component, $handler)) {
if ($component->methodExists($handler)) {
return $component;
}
}
foreach ($this->layout->components as $component) {
if (method_exists($component, $handler)) {
if ($component->methodExists($handler)) {
return $component;
}
}

View File

@ -94,7 +94,8 @@ return [
'settings_menu' => 'Karbantartás',
'settings_menu_description' => 'Szolgáltatás aktiválása és testreszabása.',
'is_enabled' => 'Karbantartás engedélyezése',
'is_enabled_comment' => 'Aktiválása esetén a weboldal látogatói csak a kiválasztott lapot fogják látni.'
'is_enabled_comment' => 'Aktiválása esetén a weboldal látogatói csak a kiválasztott lapot fogják látni.',
'hint' => 'Karbantartás módban a lentebb megadott lap fog megjelenni azon látogatók számára, akik nincsennek bejelentkezve az admin felületre.'
],
'page' => [
'not_found_name' => "A következő lap nem található: ':name'",

View File

@ -10,7 +10,8 @@ return [
'invalid_file_extension'=>'不合法的文件扩展: :invalid. 允许的扩展: :allowed.',
'error_deleting' => "删除模板文件 ':name' 错误. 请检查写权限.",
'delete_success' => '模板成功删除: :count.',
'file_name_required' => '需要文件名字段.'
'file_name_required' => '需要文件名字段.',
'safe_mode_enabled' => '安全模式已经启用.',
],
'dashboard' => [
'active_theme' => [
@ -91,7 +92,8 @@ return [
'settings_menu' => '维护模式',
'settings_menu_description' => '配置维护模式页面和开关设置.',
'is_enabled' => '启用维护模式',
'is_enabled_comment' => '当启用时, 网站访问者会看到下述页面.'
'is_enabled_comment' => '当启用时, 网站访问者会看到下述页面.',
'hint' => '维护模式将对未登陆后台的访客展示维护页面.',
],
'page' => [
'not_found_name' => "页面 ':name' 找不到",
@ -237,7 +239,8 @@ return [
'manage_pages' => '管理页面',
'manage_layouts' => '管理布局',
'manage_partials' => '管理部件',
'manage_themes' => '管理主题'
'manage_themes' => '管理主题',
'manage_media' => '管理媒体'
],
'media' => [
'invalid_path' => "不合法的路径: ':path'.",

View File

@ -279,6 +279,10 @@ class MediaManager extends WidgetBase
throw new ApplicationException(Lang::get('cms::lang.asset.invalid_name'));
}
if (!$this->validateFileType($newName)) {
throw new ApplicationException(Lang::get('cms::lang.media.type_blocked'));
}
$originalPath = Input::get('originalPath');
$originalPath = MediaLibrary::validatePath($originalPath);
@ -307,6 +311,10 @@ class MediaManager extends WidgetBase
throw new ApplicationException(Lang::get('cms::lang.asset.invalid_name'));
}
if (!$this->validateFileType($name)) {
throw new ApplicationException(Lang::get('cms::lang.media.type_blocked'));
}
$path = Input::get('path');
$path = MediaLibrary::validatePath($path);
@ -978,14 +986,6 @@ class MediaManager extends WidgetBase
$extension = strtolower($uploadedFile->getClientOriginalExtension());
$fileName = File::name($fileName).'.'.$extension;
/*
* Check for unsafe file extensions
*/
$blockedFileTypes = FileDefinitions::get('blockedExtensions');
if (in_array($extension, $blockedFileTypes)) {
throw new ApplicationException(Lang::get('cms::lang.media.type_blocked'));
}
/*
* File name contains non-latin characters, attempt to slug the value
*/
@ -994,6 +994,13 @@ class MediaManager extends WidgetBase
$fileName = $fileNameClean . '.' . $extension;
}
/*
* Check for unsafe file extensions
*/
if (!$this->validateFileType($fileName)) {
throw new ApplicationException(Lang::get('cms::lang.media.type_blocked'));
}
// See mime type handling in the asset manager
if (!$uploadedFile->isValid()) {
throw new ApplicationException($uploadedFile->getErrorMessage());
@ -1023,7 +1030,7 @@ class MediaManager extends WidgetBase
/**
* Validate a proposed media item file name.
* @param string
* @return string
* @return bool
*/
protected function validateFileName($name)
{
@ -1038,6 +1045,24 @@ class MediaManager extends WidgetBase
return true;
}
/**
* Check for blocked / unsafe file extensions
* @param string
* @return bool
*/
protected function validateFileType($name)
{
$extension = strtolower(File::extension($name));
$blockedFileTypes = FileDefinitions::get('blockedExtensions');
if (in_array($extension, $blockedFileTypes)) {
return false;
}
return true;
}
/**
* Creates a slug form the string. A modified version of Str::slug
* with the main difference that it accepts @-signs

View File

@ -5,7 +5,7 @@ if ($.oc === undefined) $.oc = {}
if ($.oc.langMessages === undefined) $.oc.langMessages = {}
$.oc.langMessages['hu'] = $.extend(
$.oc.langMessages['hu'] || {},
{"markdowneditor":{"formatting":"Forr\u00e1sk\u00f3d","quote":"Id\u00e9zet","code":"K\u00f3d","header1":"C\u00edmsor 1","header2":"C\u00edmsor 2","header3":"C\u00edmsor 3","header4":"C\u00edmsor 4","header5":"C\u00edmsor 5","header6":"C\u00edmsor 6","bold":"F\u00e9lk\u00f6v\u00e9r","italic":"D\u00f6lt","unorderedlist":"Rendezett lista","orderedlist":"Sz\u00e1mozott lista","video":"Vide\u00f3","image":"K\u00e9p","link":"Hivatkoz\u00e1s","horizontalrule":"Vonal besz\u00far\u00e1sa","fullscreen":"Teljes k\u00e9perny\u0151","preview":"El\u0151n\u00e9zet"},"mediamanager":{"insert_link":"Hivatkoz\u00e1s besz\u00far\u00e1sa","insert_image":"K\u00e9p besz\u00far\u00e1sa","insert_video":"Vide\u00f3 besz\u00far\u00e1sa","insert_audio":"Audi\u00f3 besz\u00far\u00e1sa","invalid_file_empty_insert":"Hivatkoz\u00e1s k\u00e9sz\u00edt\u00e9s\u00e9hez jel\u00f6lj\u00f6n ki egy sz\u00f6vegr\u00e9szt.","invalid_file_single_insert":"K\u00e9rj\u00fck jel\u00f6lj\u00f6n ki egy f\u00e1jlt.","invalid_image_empty_insert":"V\u00e1lasszon ki legal\u00e1bb egy k\u00e9pet a besz\u00far\u00e1shoz.","invalid_video_empty_insert":"V\u00e1lasszon ki legal\u00e1bb egy vide\u00f3t a besz\u00far\u00e1shoz.","invalid_audio_empty_insert":"V\u00e1lasszon ki legal\u00e1bb egy audi\u00f3t a besz\u00far\u00e1shoz."},"alert":{"confirm_button_text":"OK","cancel_button_text":"M\u00e9gsem"},"datepicker":{"previousMonth":"El\u0151z\u0151 h\u00f3nap","nextMonth":"K\u00f6vetkez\u0151 h\u00f3nap","months":["janu\u00e1r","febru\u00e1r","m\u00e1rcius","\u00e1prilis","m\u00e1jus","j\u00fanius","j\u00falius","augusztus","szeptember","okt\u00f3ber","november","december"],"weekdays":["vas\u00e1rnap","h\u00e9tf\u0151","kedd","szerda","cs\u00fct\u00f6rt\u00f6k","p\u00e9ntek","szombat"],"weekdaysShort":["va","h\u00e9","ke","sze","cs","p\u00e9","szo"]},"filter":{"group":{"all":"\u00f6sszes"},"dates":{"all":"\u00f6sszes","filter_button_text":"Sz\u0171r\u00e9s","reset_button_text":"Alaphelyzet","date_placeholder":"D\u00e1tum","after_placeholder":"Ut\u00e1na","before_placeholder":"El\u0151tte"}},"eventlog":{"show_stacktrace":"Mutat\u00e1s","hide_stacktrace":"Rejt\u00e9s","tabs":{"formatted":"Form\u00e1zott","raw":"T\u00f6m\u00f6r\u00edtett"},"editor":{"title":"V\u00e1lassza ki melyik szerkeszt\u0151t szeretn\u00e9 haszn\u00e1lni","description":"Your environnement must be configured to listen to one of these URL schemes.","openWith":"Megnyit\u00e1s mint","remember_choice":"Megnyit\u00e1s \u00e9s munkamenet megjegyz\u00e9se","open":"Megnyit\u00e1s","cancel":"M\u00e9gsem"}}}
{"markdowneditor":{"formatting":"Forr\u00e1sk\u00f3d","quote":"Id\u00e9zet","code":"K\u00f3d","header1":"C\u00edmsor 1","header2":"C\u00edmsor 2","header3":"C\u00edmsor 3","header4":"C\u00edmsor 4","header5":"C\u00edmsor 5","header6":"C\u00edmsor 6","bold":"F\u00e9lk\u00f6v\u00e9r","italic":"D\u00f6lt","unorderedlist":"Rendezett lista","orderedlist":"Sz\u00e1mozott lista","video":"Vide\u00f3","image":"K\u00e9p","link":"Hivatkoz\u00e1s","horizontalrule":"Vonal besz\u00far\u00e1sa","fullscreen":"Teljes k\u00e9perny\u0151","preview":"El\u0151n\u00e9zet"},"mediamanager":{"insert_link":"Hivatkoz\u00e1s besz\u00far\u00e1sa","insert_image":"K\u00e9p besz\u00far\u00e1sa","insert_video":"Vide\u00f3 besz\u00far\u00e1sa","insert_audio":"Audi\u00f3 besz\u00far\u00e1sa","invalid_file_empty_insert":"Hivatkoz\u00e1s k\u00e9sz\u00edt\u00e9s\u00e9hez jel\u00f6lj\u00f6n ki egy sz\u00f6vegr\u00e9szt.","invalid_file_single_insert":"K\u00e9rj\u00fck jel\u00f6lj\u00f6n ki egy f\u00e1jlt.","invalid_image_empty_insert":"V\u00e1lasszon ki legal\u00e1bb egy k\u00e9pet a besz\u00far\u00e1shoz.","invalid_video_empty_insert":"V\u00e1lasszon ki legal\u00e1bb egy vide\u00f3t a besz\u00far\u00e1shoz.","invalid_audio_empty_insert":"V\u00e1lasszon ki legal\u00e1bb egy audi\u00f3t a besz\u00far\u00e1shoz."},"alert":{"confirm_button_text":"OK","cancel_button_text":"M\u00e9gsem"},"datepicker":{"previousMonth":"El\u0151z\u0151 h\u00f3nap","nextMonth":"K\u00f6vetkez\u0151 h\u00f3nap","months":["janu\u00e1r","febru\u00e1r","m\u00e1rcius","\u00e1prilis","m\u00e1jus","j\u00fanius","j\u00falius","augusztus","szeptember","okt\u00f3ber","november","december"],"weekdays":["vas\u00e1rnap","h\u00e9tf\u0151","kedd","szerda","cs\u00fct\u00f6rt\u00f6k","p\u00e9ntek","szombat"],"weekdaysShort":["va","h\u00e9","ke","sze","cs","p\u00e9","szo"]},"filter":{"group":{"all":"\u00f6sszes"},"dates":{"all":"\u00f6sszes","filter_button_text":"Sz\u0171r\u00e9s","reset_button_text":"Alaphelyzet","date_placeholder":"D\u00e1tum","after_placeholder":"Kezdete","before_placeholder":"V\u00e9ge"}},"eventlog":{"show_stacktrace":"R\u00e9szletek","hide_stacktrace":"Rejt\u00e9s","tabs":{"formatted":"Form\u00e1zott","raw":"T\u00f6m\u00f6r\u00edtett"},"editor":{"title":"Forr\u00e1sk\u00f3d szerkeszt\u0151","description":"Your operating system should be configured to listen to one of these URL schemes.","openWith":"Megnyit\u00e1s mint","remember_choice":"Kiv\u00e1lasztott be\u00e1ll\u00edt\u00e1sok megjegyz\u00e9se ebben a munkamenetben","open":"Megnyit\u00e1s","cancel":"M\u00e9gsem"}}}
);
//! moment.js locale configuration

View File

@ -249,7 +249,10 @@
}
InputPreset.prototype.formatValue = function() {
if (this.options.inputPresetType == 'namespace') {
if (this.options.inputPresetType == 'exact') {
return this.$src.val();
}
else if (this.options.inputPresetType == 'namespace') {
return this.formatNamespace()
}

View File

@ -3840,7 +3840,7 @@ if(typeof option=='string')data[option].apply(data,args)})}
$.fn.hotKey.Constructor=HotKey
$.fn.hotKey.noConflict=function(){$.fn.hotKey=old
return this}
$(document).render(function(){$('[data-hotkey]').hotKey()})}(window.jQuery);+function($){"use strict";var LATIN_MAP={'À':'A','Á':'A','Â':'A','Ã':'A','Ä':'A','Å':'A','Æ':'AE','Ç':'C','È':'E','É':'E','Ê':'E','Ë':'E','Ì':'I','Í':'I','Î':'I','Ï':'I','Ð':'D','Ñ':'N','Ò':'O','Ó':'O','Ô':'O','Õ':'O','Ö':'O','Ő':'O','Ø':'O','Ù':'U','Ú':'U','Û':'U','Ü':'U','Ű':'U','Ý':'Y','Þ':'TH','Ÿ':'Y','ß':'ss','à':'a','á':'a','â':'a','ã':'a','ä':'a','å':'a','æ':'ae','ç':'c','è':'e','é':'e','ê':'e','ë':'e','ì':'i','í':'i','î':'i','ï':'i','ð':'d','ñ':'n','ò':'o','ó':'o','ô':'o','õ':'o','ö':'o','ő':'o','ø':'o','ō':'o','œ':'oe','ù':'u','ú':'u','û':'u','ü':'u','ű':'u','ý':'y','þ':'th','ÿ':'y'},LATIN_SYMBOLS_MAP={'©':'(c)'},GREEK_MAP={'α':'a','β':'b','γ':'g','δ':'d','ε':'e','ζ':'z','η':'h','θ':'8','ι':'i','κ':'k','λ':'l','μ':'m','ν':'n','ξ':'3','ο':'o','π':'p','ρ':'r','σ':'s','τ':'t','υ':'y','φ':'f','χ':'x','ψ':'ps','ω':'w','ά':'a','έ':'e','ί':'i','ό':'o','ύ':'y','ή':'h','ώ':'w','ς':'s','ϊ':'i','ΰ':'y','ϋ':'y','ΐ':'i','Α':'A','Β':'B','Γ':'G','Δ':'D','Ε':'E','Ζ':'Z','Η':'H','Θ':'8','Ι':'I','Κ':'K','Λ':'L','Μ':'M','Ν':'N','Ξ':'3','Ο':'O','Π':'P','Ρ':'R','Σ':'S','Τ':'T','Υ':'Y','Φ':'F','Χ':'X','Ψ':'PS','Ω':'W','Ά':'A','Έ':'E','Ί':'I','Ό':'O','Ύ':'Y','Ή':'H','Ώ':'W','Ϊ':'I','Ϋ':'Y'},TURKISH_MAP={'ş':'s','Ş':'S','ı':'i','İ':'I','ç':'c','Ç':'C','ü':'u','Ü':'U','ö':'o','Ö':'O','ğ':'g','Ğ':'G'},RUSSIAN_MAP={'а':'a','б':'b','в':'v','г':'g','д':'d','е':'e','ё':'yo','ж':'zh','з':'z','и':'i','й':'j','к':'k','л':'l','м':'m','н':'n','о':'o','п':'p','р':'r','с':'s','т':'t','у':'u','ф':'f','х':'h','ц':'c','ч':'ch','ш':'sh','щ':'sh','ъ':'','ы':'y','ь':'','э':'e','ю':'yu','я':'ya','А':'A','Б':'B','В':'V','Г':'G','Д':'D','Е':'E','Ё':'Yo','Ж':'Zh','З':'Z','И':'I','Й':'J','К':'K','Л':'L','М':'M','Н':'N','О':'O','П':'P','Р':'R','С':'S','Т':'T','У':'U','Ф':'F','Х':'H','Ц':'C','Ч':'Ch','Ш':'Sh','Щ':'Sh','Ъ':'','Ы':'Y','Ь':'','Э':'E','Ю':'Yu','Я':'Ya'},UKRAINIAN_MAP={'Є':'Ye','І':'I','Ї':'Yi','Ґ':'G','є':'ye','і':'i','ї':'yi','ґ':'g'},CZECH_MAP={'č':'c','ď':'d','ě':'e','ň':'n','ř':'r','š':'s','ť':'t','ů':'u','ž':'z','Č':'C','Ď':'D','Ě':'E','Ň':'N','Ř':'R','Š':'S','Ť':'T','Ů':'U','Ž':'Z'},POLISH_MAP={'ą':'a','ć':'c','ę':'e','ł':'l','ń':'n','ó':'o','ś':'s','ź':'z','ż':'z','Ą':'A','Ć':'C','Ę':'E','Ł':'L','Ń':'N','Ó':'O','Ś':'S','Ź':'Z','Ż':'Z'},LATVIAN_MAP={'ā':'a','č':'c','ē':'e','ģ':'g','ī':'i','ķ':'k','ļ':'l','ņ':'n','š':'s','ū':'u','ž':'z','Ā':'A','Č':'C','Ē':'E','Ģ':'G','Ī':'I','Ķ':'K','Ļ':'L','Ņ':'N','Š':'S','Ū':'U','Ž':'Z'},ARABIC_MAP={'أ':'a','ب':'b','ت':'t','ث':'th','ج':'g','ح':'h','خ':'kh','د':'d','ذ':'th','ر':'r','ز':'z','س':'s','ش':'sh','ص':'s','ض':'d','ط':'t','ظ':'th','ع':'aa','غ':'gh','ف':'f','ق':'k','ك':'k','ل':'l','م':'m','ن':'n','ه':'h','و':'o','ي':'y'},PERSIAN_MAP={'آ':'a','ا':'a','پ':'p','چ':'ch','ژ':'zh','ک':'k','گ':'gh','ی':'y'},LITHUANIAN_MAP={'ą':'a','č':'c','ę':'e','ė':'e','į':'i','š':'s','ų':'u','ū':'u','ž':'z','Ą':'A','Č':'C','Ę':'E','Ė':'E','Į':'I','Š':'S','Ų':'U','Ū':'U','Ž':'Z'},SERBIAN_MAP={'ђ':'dj','ј':'j','љ':'lj','њ':'nj','ћ':'c','џ':'dz','đ':'dj','Ђ':'Dj','Ј':'j','Љ':'Lj','Њ':'Nj','Ћ':'C','Џ':'Dz','Đ':'Dj'},AZERBAIJANI_MAP={'ç':'c','ə':'e','ğ':'g','ı':'i','ö':'o','ş':'s','ü':'u','Ç':'C','Ə':'E','Ğ':'G','İ':'I','Ö':'O','Ş':'S','Ü':'U'},SPECIFIC_MAPS={'de':{'Ä':'AE','Ö':'OE','Ü':'UE','ä':'ae','ö':'oe','ü':'ue'}},ALL_MAPS=[LATIN_MAP,LATIN_SYMBOLS_MAP,GREEK_MAP,TURKISH_MAP,RUSSIAN_MAP,UKRAINIAN_MAP,CZECH_MAP,POLISH_MAP,LATVIAN_MAP,ARABIC_MAP,PERSIAN_MAP,LITHUANIAN_MAP,SERBIAN_MAP,AZERBAIJANI_MAP]
$(document).render(function(){$('[data-hotkey]').hotKey()})}(window.jQuery);+function($){"use strict";var LATIN_MAP={'À':'A','Á':'A','Â':'A','Ã':'A','Ä':'A','Å':'A','Æ':'AE','Ç':'C','È':'E','É':'E','Ê':'E','Ë':'E','Ì':'I','Í':'I','Î':'I','Ï':'I','Ð':'D','Ñ':'N','Ò':'O','Ó':'O','Ô':'O','Õ':'O','Ö':'O','Ő':'O','Ø':'O','Ù':'U','Ú':'U','Û':'U','Ü':'U','Ű':'U','Ý':'Y','Þ':'TH','Ÿ':'Y','ß':'ss','à':'a','á':'a','â':'a','ã':'a','ä':'a','å':'a','æ':'ae','ç':'c','è':'e','é':'e','ê':'e','ë':'e','ì':'i','í':'i','î':'i','ï':'i','ð':'d','ñ':'n','ò':'o','ó':'o','ô':'o','õ':'o','ö':'o','ő':'o','ø':'o','ō':'o','œ':'oe','ù':'u','ú':'u','û':'u','ü':'u','ű':'u','ý':'y','þ':'th','ÿ':'y'},LATIN_SYMBOLS_MAP={'©':'(c)'},GREEK_MAP={'α':'a','β':'b','γ':'g','δ':'d','ε':'e','ζ':'z','η':'h','θ':'8','ι':'i','κ':'k','λ':'l','μ':'m','ν':'n','ξ':'3','ο':'o','π':'p','ρ':'r','σ':'s','τ':'t','υ':'y','φ':'f','χ':'x','ψ':'ps','ω':'w','ά':'a','έ':'e','ί':'i','ό':'o','ύ':'y','ή':'h','ώ':'w','ς':'s','ϊ':'i','ΰ':'y','ϋ':'y','ΐ':'i','Α':'A','Β':'B','Γ':'G','Δ':'D','Ε':'E','Ζ':'Z','Η':'H','Θ':'8','Ι':'I','Κ':'K','Λ':'L','Μ':'M','Ν':'N','Ξ':'3','Ο':'O','Π':'P','Ρ':'R','Σ':'S','Τ':'T','Υ':'Y','Φ':'F','Χ':'X','Ψ':'PS','Ω':'W','Ά':'A','Έ':'E','Ί':'I','Ό':'O','Ύ':'Y','Ή':'H','Ώ':'W','Ϊ':'I','Ϋ':'Y'},TURKISH_MAP={'ş':'s','Ş':'S','ı':'i','İ':'I','ç':'c','Ç':'C','ü':'u','Ü':'U','ö':'o','Ö':'O','ğ':'g','Ğ':'G'},RUSSIAN_MAP={'а':'a','б':'b','в':'v','г':'g','д':'d','е':'e','ё':'yo','ж':'zh','з':'z','и':'i','й':'j','к':'k','л':'l','м':'m','н':'n','о':'o','п':'p','р':'r','с':'s','т':'t','у':'u','ф':'f','х':'h','ц':'c','ч':'ch','ш':'sh','щ':'sh','ъ':'','ы':'y','ь':'','э':'e','ю':'yu','я':'ya','А':'A','Б':'B','В':'V','Г':'G','Д':'D','Е':'E','Ё':'Yo','Ж':'Zh','З':'Z','И':'I','Й':'J','К':'K','Л':'L','М':'M','Н':'N','О':'O','П':'P','Р':'R','С':'S','Т':'T','У':'U','Ф':'F','Х':'H','Ц':'C','Ч':'Ch','Ш':'Sh','Щ':'Sh','Ъ':'','Ы':'Y','Ь':'','Э':'E','Ю':'Yu','Я':'Ya'},UKRAINIAN_MAP={'Є':'Ye','І':'I','Ї':'Yi','Ґ':'G','є':'ye','і':'i','ї':'yi','ґ':'g'},CZECH_MAP={'č':'c','ď':'d','ě':'e','ň':'n','ř':'r','š':'s','ť':'t','ů':'u','ž':'z','Č':'C','Ď':'D','Ě':'E','Ň':'N','Ř':'R','Š':'S','Ť':'T','Ů':'U','Ž':'Z'},POLISH_MAP={'ą':'a','ć':'c','ę':'e','ł':'l','ń':'n','ó':'o','ś':'s','ź':'z','ż':'z','Ą':'A','Ć':'C','Ę':'E','Ł':'L','Ń':'N','Ó':'O','Ś':'S','Ź':'Z','Ż':'Z'},LATVIAN_MAP={'ā':'a','č':'c','ē':'e','ģ':'g','ī':'i','ķ':'k','ļ':'l','ņ':'n','š':'s','ū':'u','ž':'z','Ā':'A','Č':'C','Ē':'E','Ģ':'G','Ī':'I','Ķ':'K','Ļ':'L','Ņ':'N','Š':'S','Ū':'U','Ž':'Z'},ARABIC_MAP={'أ':'a','ب':'b','ت':'t','ث':'th','ج':'g','ح':'h','خ':'kh','د':'d','ذ':'th','ر':'r','ز':'z','س':'s','ش':'sh','ص':'s','ض':'d','ط':'t','ظ':'th','ع':'aa','غ':'gh','ف':'f','ق':'k','ك':'k','ل':'l','م':'m','ن':'n','ه':'h','و':'o','ي':'y'},PERSIAN_MAP={'آ':'a','ا':'a','پ':'p','چ':'ch','ژ':'zh','ک':'k','گ':'gh','ی':'y'},LITHUANIAN_MAP={'ą':'a','č':'c','ę':'e','ė':'e','į':'i','š':'s','ų':'u','ū':'u','ž':'z','Ą':'A','Č':'C','Ę':'E','Ė':'E','Į':'I','Š':'S','Ų':'U','Ū':'U','Ž':'Z'},SERBIAN_MAP={'ђ':'dj','ј':'j','љ':'lj','њ':'nj','ћ':'c','џ':'dz','đ':'dj','Ђ':'Dj','Ј':'j','Љ':'Lj','Њ':'Nj','Ћ':'C','Џ':'Dz','Đ':'Dj'},AZERBAIJANI_MAP={'ç':'c','ə':'e','ğ':'g','ı':'i','ö':'o','ş':'s','ü':'u','Ç':'C','Ə':'E','Ğ':'G','İ':'I','Ö':'O','Ş':'S','Ü':'U'},ROMANIAN_MAP={'ă':'a','â':'a','î':'i','ș':'s','ț':'t','Ă':'A','Â':'A','Î':'I','Ș':'S','Ț':'T'},SPECIFIC_MAPS={'de':{'Ä':'AE','Ö':'OE','Ü':'UE','ä':'ae','ö':'oe','ü':'ue'}},ALL_MAPS=[LATIN_MAP,LATIN_SYMBOLS_MAP,GREEK_MAP,TURKISH_MAP,RUSSIAN_MAP,UKRAINIAN_MAP,CZECH_MAP,POLISH_MAP,LATVIAN_MAP,ARABIC_MAP,PERSIAN_MAP,LITHUANIAN_MAP,SERBIAN_MAP,AZERBAIJANI_MAP,ROMANIAN_MAP]
var removeList=["a","an","as","at","before","but","by","for","from","is","in","into","like","of","off","on","onto","per","since","than","the","this","that","to","up","via","with"]
var locale=$('meta[name="backend-locale"]').attr('content')
var Downcoder={Initialize:function(){if(Downcoder.map){return;}
@ -3883,7 +3883,8 @@ $el.val(prefix+self.formatValue())})
this.$el.on('change',function(){self.cancelled=true})}
InputPreset.prototype.formatNamespace=function(){var value=toCamel(this.$src.val())
return value.substr(0,1).toUpperCase()+value.substr(1)}
InputPreset.prototype.formatValue=function(){if(this.options.inputPresetType=='namespace'){return this.formatNamespace()}
InputPreset.prototype.formatValue=function(){if(this.options.inputPresetType=='exact'){return this.$src.val();}
else if(this.options.inputPresetType=='namespace'){return this.formatNamespace()}
if(this.options.inputPresetType=='camel'){var value=toCamel(this.$src.val())}
else{var value=slugify(this.$src.val())}
if(this.options.inputPresetType=='url'){value='/'+value}

View File

@ -100,6 +100,7 @@ class SettingsModel extends ModelBehavior
/**
* Checks if the model has been set up previously, intended as a static method
* @return bool
*/
public function isConfigured()
{

View File

@ -401,7 +401,7 @@ class CombineAssets
$key = '';
$assetFiles = array_map(function($file) {
return $this->localPath.'/'.$file;
return File::symbolizePath($file, null) ?: $this->localPath . $file;
}, $assets);
foreach ($assetFiles as $file) {

View File

@ -2,9 +2,9 @@
use Lang;
use Carbon\Carbon;
use Exception;
use DateTime as PhpDateTime;
use InvalidArgumentException;
use Exception;
class DateTime
{
@ -67,7 +67,9 @@ class DateTime
$value = Carbon::createFromFormat('Y-m-d', $value)->startOfDay();
}
else {
$value = @Carbon::parse($value);
try {
$value = Carbon::parse($value);
} catch (Exception $ex) {}
}
if (!$value instanceof Carbon && $throwException) {

View File

@ -68,23 +68,23 @@ return [
'filter_button_text' => 'Szűrés',
'reset_button_text' => 'Alaphelyzet',
'date_placeholder' => 'Dátum',
'after_placeholder' => 'Utána',
'before_placeholder' => 'Előtte'
'after_placeholder' => 'Kezdete',
'before_placeholder' => 'Vége'
]
],
'eventlog' => [
'show_stacktrace' => 'Mutatás',
'show_stacktrace' => 'Részletek',
'hide_stacktrace' => 'Rejtés',
'tabs' => [
'formatted' => 'Formázott',
'raw' => 'Tömörített',
],
'editor' => [
'title' => 'Válassza ki melyik szerkesztőt szeretné használni',
'description' => 'Your environnement must be configured to listen to one of these URL schemes.',
'title' => 'Forráskód szerkesztő',
'description' => 'Your operating system should be configured to listen to one of these URL schemes.',
'openWith' => 'Megnyitás mint',
'remember_choice' => 'Megnyitás és munkamenet megjegyzése',
'remember_choice' => 'Kiválasztott beállítások megjegyzése ebben a munkamenetben',
'open' => 'Megnyitás',
'cancel' => 'Mégsem'
]

View File

@ -325,7 +325,7 @@ return [
'id' => 'Azonosító',
'id_label' => 'Napló azonosító',
'count' => 'Számláló',
'referer' => 'Hivatkozók',
'referer' => 'Hivatkozás',
'url' => 'Webcím',
'status_code' => 'Állapotkód',
'preview_title' => 'Kérelem'

View File

@ -95,11 +95,20 @@ return [
*/
'attributes' => [
'nev' => 'név',
'email' => 'e-mail',
'telefon' => 'telefon',
'targy' => 'tárgy',
'uzenet' => 'üzenet',
'nev' => 'név',
'vnev' => 'vezetéknév',
'knev' => 'keresztnév',
'email' => 'e-mail',
'telefon' => 'telefonszám',
'mobil' => 'mobilszám',
'targy' => 'tárgy',
'uzenet' => 'üzenet',
'varos' => 'város',
'telepules' => 'település',
'cim' => 'cím',
'utca' => 'útca',
'irszam' => 'irányítószám',
'kep' => 'kép',
],
];

View File

@ -29,7 +29,7 @@ return [
'sk' => 'Slovak (Slovakia)',
'tr' => 'Turkish',
'zh-cn' => '简体中文',
'zh-tw' => 'Chinese (Taiwan)',
'zh-tw' => '繁體中文',
'el' => 'Greek'
],
'directory' => [
@ -300,7 +300,8 @@ return [
'count' => '次数',
'referer' => '来源',
'url' => 'URL',
'status_code' => '状态'
'status_code' => '状态',
'preview_title'=> '预览事件日志'
],
'permissions' => [
'name' => '系统',
@ -310,6 +311,8 @@ return [
'manage_mail_templates' => '管理邮件模板',
'manage_mail_settings' => '管理邮件设置',
'manage_other_administrators' => '管理其他管理员',
'manage_preferences' => '管理后台偏好设置',
'manage_editor' => '管理代码编辑器偏好设置',
'view_the_dashboard' => '查看仪表盘',
'manage_branding' => '自定义后台'
]

View File

@ -62,6 +62,7 @@
<script>
SyntaxHighlighter.defaults['toolbar'] = false;
SyntaxHighlighter.defaults['quick-code'] = false;
SyntaxHighlighter.defaults['html-script'] = true;
SyntaxHighlighter.defaults['first-line'] = <?= $exception->getHighlight()->startLine+1 ?>;
SyntaxHighlighter.defaults['highlight'] = <?= $exception->getLine() ?>;