Merge branch 'develop' into media-manager
This commit is contained in:
commit
814c0ddc17
|
|
@ -293,6 +293,8 @@ table.table.data tr.list-tree-level-25 td.list-cell-index-1{padding-left:275px}
|
|||
.control-simplelist.is-selectable li:hover,.control-simplelist.is-selectable li:hover a{color:white}
|
||||
.control-simplelist.is-selectable li:hover a{text-decoration:none}
|
||||
.control-simplelist.is-selectable li:last-child{border-bottom:none}
|
||||
.control-simplelist.is-selectable li.active a{background:#f0f0f0}
|
||||
.control-simplelist.is-selectable li.active a:hover{background:#4da7e8}
|
||||
.list-preview .control-simplelist.is-selectable ul{margin-bottom:0}
|
||||
.control-filter{padding:0 10px;font-size:13px;color:#949ea6;background-color:#f3f3f3;border-top:1px solid #949ea6;border-bottom:1px solid #949ea6}
|
||||
.control-filter a{text-decoration:none;color:#949ea6}
|
||||
|
|
@ -1155,4 +1157,4 @@ div.progress{height:9px;-webkit-box-shadow:none;box-shadow:none;background:#d9de
|
|||
.progress-bar.progress-bar-success{background-color:#31ac5f}
|
||||
.sweet-alert{text-align:left}
|
||||
.sweet-alert h4{margin:10px 0 20px 0;color:#2b3e50;font-size:18px}
|
||||
.sweet-alert p.text-muted{margin-bottom:20px;color:#555555}
|
||||
.sweet-alert p.text-muted{margin-bottom:20px;color:#555555}
|
||||
|
|
|
|||
|
|
@ -2226,6 +2226,7 @@ body{webkit-font-smoothing:antialiased;background:#f9f9f9}
|
|||
.layout > .layout-row > .layout-cell.width-200{width:200px}
|
||||
.layout > .layout-row > .layout-cell.width-300{width:300px}
|
||||
.layout > .layout-row > .layout-cell.layout-container,.layout > .layout-row > .layout-cell .layout-container,.layout > .layout-row > .layout-cell.padded-container,.layout > .layout-row > .layout-cell .padded-container{padding:20px 20px 0 20px}
|
||||
.layout > .layout-row > .layout-cell.layout-container .container-flush,.layout > .layout-row > .layout-cell .layout-container .container-flush,.layout > .layout-row > .layout-cell.padded-container .container-flush,.layout > .layout-row > .layout-cell .padded-container .container-flush{padding-top:0}
|
||||
.layout > .layout-row > .layout-cell .layout-relative{position:relative;height:100%}
|
||||
.layout > .layout-row > .layout-cell .layout-absolute{position:absolute;height:100%;width:100%}
|
||||
.layout > .layout-row > .layout-cell.min-size{width:0}
|
||||
|
|
@ -2238,6 +2239,7 @@ body{webkit-font-smoothing:antialiased;background:#f9f9f9}
|
|||
.layout > .layout-row > .layout-cell.width-200{width:200px}
|
||||
.layout > .layout-row > .layout-cell.width-300{width:300px}
|
||||
.layout > .layout-row > .layout-cell.layout-container,.layout > .layout-row > .layout-cell .layout-container,.layout > .layout-row > .layout-cell.padded-container,.layout > .layout-row > .layout-cell .padded-container{padding:20px 20px 0 20px}
|
||||
.layout > .layout-row > .layout-cell.layout-container .container-flush,.layout > .layout-row > .layout-cell .layout-container .container-flush,.layout > .layout-row > .layout-cell.padded-container .container-flush,.layout > .layout-row > .layout-cell .padded-container .container-flush{padding-top:0}
|
||||
.layout > .layout-row > .layout-cell .layout-relative{position:relative;height:100%}
|
||||
.layout > .layout-row > .layout-cell .layout-absolute{position:absolute;height:100%;width:100%}
|
||||
.layout > .layout-row > .layout-cell.min-size{width:0}
|
||||
|
|
@ -2252,6 +2254,7 @@ body{webkit-font-smoothing:antialiased;background:#f9f9f9}
|
|||
.layout > .layout-cell.width-200{width:200px}
|
||||
.layout > .layout-cell.width-300{width:300px}
|
||||
.layout > .layout-cell.layout-container,.layout > .layout-cell .layout-container,.layout > .layout-cell.padded-container,.layout > .layout-cell .padded-container{padding:20px 20px 0 20px}
|
||||
.layout > .layout-cell.layout-container .container-flush,.layout > .layout-cell .layout-container .container-flush,.layout > .layout-cell.padded-container .container-flush,.layout > .layout-cell .padded-container .container-flush{padding-top:0}
|
||||
.layout > .layout-cell .layout-relative{position:relative;height:100%}
|
||||
.layout > .layout-cell .layout-absolute{position:absolute;height:100%;width:100%}
|
||||
.layout > .layout-cell.min-size{width:0}
|
||||
|
|
@ -2282,7 +2285,7 @@ nav#layout-mainmenu.navbar ul li.icon a{padding:14px}
|
|||
nav#layout-mainmenu.navbar ul li.power-off i,nav#layout-mainmenu.navbar ul li.preview i{font-size:20px}
|
||||
nav#layout-mainmenu.navbar ul li.power-off a,nav#layout-mainmenu.navbar ul li.preview a{padding:22px 20px 20px 20px}
|
||||
nav#layout-mainmenu.navbar ul li.account{margin-right:0;line-height:23px}
|
||||
nav#layout-mainmenu.navbar ul li.account a{padding-left:35px;padding-right:5px;position:relative;z-index:900}
|
||||
nav#layout-mainmenu.navbar ul li.account a{padding-right:20px;position:relative;z-index:900}
|
||||
nav#layout-mainmenu.navbar ul li.account img{width:25px;margin-right:7px;position:relative;top:-2px}
|
||||
nav#layout-mainmenu.navbar ul.nav{display:inline-block}
|
||||
nav#layout-mainmenu.navbar .menu-toggle{display:none}
|
||||
|
|
@ -2292,14 +2295,14 @@ nav#layout-mainmenu.navbar .toolbar-item:before{left:-12px}
|
|||
nav#layout-mainmenu.navbar .toolbar-item:after{right:-12px}
|
||||
nav#layout-mainmenu.navbar .toolbar-item.scroll-active-before:before{color:#ffffff}
|
||||
nav#layout-mainmenu.navbar .toolbar-item.scroll-active-after:after{color:#ffffff}
|
||||
nav#layout-mainmenu.navbar ul li .mainmenu-accountmenu{position:fixed;top:63px;right:0;width:225px;background:#3d3d3d;z-index:900;display:none}
|
||||
nav#layout-mainmenu.navbar ul li .mainmenu-accountmenu{position:fixed;top:63px;right:0;width:225px;background:#2b3e50;z-index:900;display:none}
|
||||
nav#layout-mainmenu.navbar ul li .mainmenu-accountmenu.active{display:block}
|
||||
nav#layout-mainmenu.navbar ul li .mainmenu-accountmenu:after{content:'';display:block;width:0;height:0;border-left:11px solid transparent;border-right:11px solid transparent;border-bottom:12px solid #3d3d3d;right:101px;top:-12px;position:absolute}
|
||||
nav#layout-mainmenu.navbar ul li .mainmenu-accountmenu ul{padding:12px 30px;float:none;display:block}
|
||||
nav#layout-mainmenu.navbar ul li .mainmenu-accountmenu li{padding:0;font-weight:200;text-align:left;display:block}
|
||||
nav#layout-mainmenu.navbar ul li .mainmenu-accountmenu li a{display:block;padding:9px 0;text-align:left;opacity:.9}
|
||||
nav#layout-mainmenu.navbar ul li .mainmenu-accountmenu li a:hover{opacity:.6}
|
||||
nav#layout-mainmenu.navbar ul li .mainmenu-accountmenu li.divider{height:1px;width:100%;margin:9px 0;overflow:hidden;background-color:transparent;border-top:1px solid #343434}
|
||||
nav#layout-mainmenu.navbar ul li .mainmenu-accountmenu:after{content:'';display:block;width:0;height:0;border-left:11px solid transparent;border-right:11px solid transparent;border-bottom:12px solid #2b3e50;right:40px;top:-12px;position:absolute}
|
||||
nav#layout-mainmenu.navbar ul li .mainmenu-accountmenu ul{float:none;display:block}
|
||||
nav#layout-mainmenu.navbar ul li .mainmenu-accountmenu li{padding:0;margin:0;font-weight:400;text-align:left;display:block}
|
||||
nav#layout-mainmenu.navbar ul li .mainmenu-accountmenu li a{display:block;padding:12px 30px;text-align:left}
|
||||
nav#layout-mainmenu.navbar ul li .mainmenu-accountmenu li:hover{background:#3d5265 !important}
|
||||
nav#layout-mainmenu.navbar ul li .mainmenu-accountmenu li.divider{height:1px;width:100%;background-color:#4b6372}
|
||||
@media (max-width:768px){nav#layout-mainmenu.navbar ul li .mainmenu-accountmenu:after{right:71px}
|
||||
}
|
||||
nav#layout-mainmenu.navbar ul li a,nav#layout-mainmenu .menu-toggle,.mainmenu-collapsed li a{padding:14px 0;display:inline-block;font-size:14px;color:inherit;outline:none}
|
||||
|
|
|
|||
|
|
@ -107,6 +107,15 @@
|
|||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
&.active {
|
||||
a {
|
||||
background: #f0f0f0;
|
||||
&:hover {
|
||||
background: @color-list-hover-bg;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -64,8 +64,8 @@
|
|||
@color-mainmenu-active: #ffffff;
|
||||
@color-mainmenu-collapsed: #333333;
|
||||
|
||||
@color-accountmenu-bg: #3d3d3d;
|
||||
@color-accountmenu-divider: #343434;
|
||||
@color-accountmenu-bg: #2b3e50;
|
||||
@color-accountmenu-divider: #4b6372;
|
||||
|
||||
@color-footer: rgba(255,255,255,.8);
|
||||
@color-footer-border: #dfdfdf;
|
||||
|
|
|
|||
|
|
@ -59,6 +59,11 @@ body {
|
|||
|
||||
&.layout-container, .layout-container, &.padded-container, .padded-container {
|
||||
padding: 20px 20px 0 20px;
|
||||
|
||||
// Container to sit flush to the element above
|
||||
.container-flush {
|
||||
padding-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.layout-relative {
|
||||
|
|
|
|||
|
|
@ -64,8 +64,7 @@ nav#layout-mainmenu.navbar {
|
|||
line-height: 23px;
|
||||
|
||||
a {
|
||||
padding-left: 35px;
|
||||
padding-right: 5px;
|
||||
padding-right: 20px;
|
||||
position: relative;
|
||||
z-index: 900;
|
||||
}
|
||||
|
|
@ -110,41 +109,38 @@ nav#layout-mainmenu.navbar ul li .mainmenu-accountmenu {
|
|||
|
||||
&:after {
|
||||
.triangle(up, 22px, 12px, @color-accountmenu-bg);
|
||||
right: 101px;
|
||||
right: 40px;
|
||||
top: -12px;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding: 12px 30px;
|
||||
float: none;
|
||||
display: block;
|
||||
}
|
||||
|
||||
li {
|
||||
padding: 0;
|
||||
font-weight: 200;
|
||||
margin: 0;
|
||||
font-weight: 400;
|
||||
text-align: left;
|
||||
display: block;
|
||||
|
||||
a {
|
||||
display: block;
|
||||
padding: 9px 0;
|
||||
padding: 12px 30px;
|
||||
text-align: left;
|
||||
opacity: .9;
|
||||
&:hover {
|
||||
opacity: .6;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: #3d5265!important;
|
||||
}
|
||||
}
|
||||
|
||||
li.divider {
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
margin: 9px 0;
|
||||
overflow: hidden;
|
||||
background-color: transparent;
|
||||
border-top: 1px solid @color-accountmenu-divider;
|
||||
background-color: @color-accountmenu-divider;
|
||||
}
|
||||
|
||||
@media (max-width: @screen-sm) {
|
||||
|
|
|
|||
|
|
@ -132,6 +132,16 @@ class RelationController extends ControllerBehavior
|
|||
*/
|
||||
protected $manageMode;
|
||||
|
||||
/**
|
||||
* @var string Force a certain view mode.
|
||||
*/
|
||||
protected $forceViewMode;
|
||||
|
||||
/**
|
||||
* @var string Force a certain manage mode.
|
||||
*/
|
||||
protected $forceManageMode;
|
||||
|
||||
/**
|
||||
* @var string The target that triggered an AJAX event (button, list)
|
||||
*/
|
||||
|
|
@ -227,8 +237,8 @@ class RelationController extends ControllerBehavior
|
|||
$this->readOnly = $this->getConfig('readOnly');
|
||||
$this->deferredBinding = $this->getConfig('deferredBinding') || !$this->model->exists;
|
||||
$this->toolbarButtons = $this->evalToolbarButtons();
|
||||
$this->viewMode = $this->viewMode ?: $this->evalViewMode();
|
||||
$this->manageMode = $this->manageMode ?: $this->evalManageMode();
|
||||
$this->viewMode = $this->evalViewMode();
|
||||
$this->manageMode = $this->evalManageMode();
|
||||
$this->manageId = post('manage_id');
|
||||
|
||||
/*
|
||||
|
|
@ -291,6 +301,10 @@ class RelationController extends ControllerBehavior
|
|||
*/
|
||||
protected function evalViewMode()
|
||||
{
|
||||
if ($this->forceViewMode) {
|
||||
return $this->forceViewMode;
|
||||
}
|
||||
|
||||
switch ($this->relationType) {
|
||||
case 'hasMany':
|
||||
case 'belongsToMany':
|
||||
|
|
@ -312,6 +326,10 @@ class RelationController extends ControllerBehavior
|
|||
return $mode;
|
||||
}
|
||||
|
||||
if ($this->forceManageMode) {
|
||||
return $this->forceManageMode;
|
||||
}
|
||||
|
||||
switch ($this->eventTarget) {
|
||||
case 'button-create':
|
||||
case 'button-update':
|
||||
|
|
@ -385,11 +403,15 @@ class RelationController extends ControllerBehavior
|
|||
{
|
||||
$field = $this->validateField($field);
|
||||
|
||||
$result = ['#'.$this->relationGetId('view') => $this->relationRenderView()];
|
||||
if ($toolbar = $this->relationRenderToolbar()) {
|
||||
$result = ['#'.$this->relationGetId('view') => $this->relationRenderView($field)];
|
||||
if ($toolbar = $this->relationRenderToolbar($field)) {
|
||||
$result['#'.$this->relationGetId('toolbar')] = $toolbar;
|
||||
}
|
||||
|
||||
if ($eventResult = $this->controller->relationExtendRefreshResults($field)) {
|
||||
$result = $eventResult + $result;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
|
@ -539,6 +561,10 @@ class RelationController extends ControllerBehavior
|
|||
{
|
||||
}
|
||||
|
||||
public function relationExtendRefreshResults($field)
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
// AJAX (Buttons)
|
||||
//
|
||||
|
|
@ -626,7 +652,7 @@ class RelationController extends ControllerBehavior
|
|||
*/
|
||||
public function onRelationManageCreate()
|
||||
{
|
||||
$this->manageMode = 'form';
|
||||
$this->forceManageMode = 'form';
|
||||
$this->beforeAjax();
|
||||
$saveData = $this->manageWidget->getSaveData();
|
||||
|
||||
|
|
@ -664,7 +690,7 @@ class RelationController extends ControllerBehavior
|
|||
*/
|
||||
public function onRelationManageUpdate()
|
||||
{
|
||||
$this->manageMode = 'form';
|
||||
$this->forceManageMode = 'form';
|
||||
$this->beforeAjax();
|
||||
$saveData = $this->manageWidget->getSaveData();
|
||||
|
||||
|
|
@ -1025,12 +1051,29 @@ class RelationController extends ControllerBehavior
|
|||
$config->model = $this->relationModel;
|
||||
$config->alias = $this->alias . 'ManagePivotList';
|
||||
$config->showSetup = false;
|
||||
$config->defaultSort = $this->getConfig('pivot[defaultSort]');
|
||||
$config->recordsPerPage = $this->getConfig('pivot[recordsPerPage]');
|
||||
$config->recordOnClick = sprintf(
|
||||
"$.oc.relationBehavior.clickManagePivotListRecord(:id, '%s', '%s')",
|
||||
$this->field,
|
||||
$this->relationGetSessionKey()
|
||||
);
|
||||
|
||||
$widget = $this->makeWidget('Backend\Widgets\Lists', $config);
|
||||
|
||||
/*
|
||||
* Link the Search Widget to the List Widget
|
||||
*/
|
||||
if ($this->getConfig('pivot[showSearch]')) {
|
||||
$this->searchWidget = $this->makeSearchWidget();
|
||||
$this->searchWidget->bindToController();
|
||||
$this->searchWidget->bindEvent('search.submit', function () use ($widget) {
|
||||
$widget->setSearchTerm($this->searchWidget->getActiveTerm());
|
||||
return $widget->onRefresh();
|
||||
});
|
||||
|
||||
$this->searchWidget->setActiveTerm(null);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* List
|
||||
|
|
|
|||
|
|
@ -4,12 +4,18 @@
|
|||
<button type="button" class="close" data-dismiss="popup">×</button>
|
||||
<h4 class="modal-title"><?= e(trans('backend::lang.relation.add_a_new', ['name'=>$relationLabel])) ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><?= e(trans('backend::lang.relation.help')) ?></p>
|
||||
<?php if (!$relationSearchWidget): ?>
|
||||
<div class="modal-body">
|
||||
<p><?= e(trans('backend::lang.relation.help')) ?></p>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<div class="list-flush">
|
||||
<?php if ($relationSearchWidget): ?>
|
||||
<?= $relationSearchWidget->render() ?>
|
||||
<?php endif ?>
|
||||
<?= $relationManageWidget->render() ?>
|
||||
</div>
|
||||
|
||||
<?= $relationManageWidget->render() ?>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button
|
||||
type="button"
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
<button
|
||||
class="btn btn-default"
|
||||
data-control="popup"
|
||||
data-size="huge"
|
||||
data-handler="<?= $this->getEventHandler('onFindRecord') ?>"
|
||||
data-request-data="recordfinder_flag: 1"
|
||||
type="button">
|
||||
|
|
|
|||
|
|
@ -25,6 +25,14 @@
|
|||
</div>
|
||||
<div class="layout-cell width-fix">
|
||||
<ul>
|
||||
<li class="icon preview with-tooltip">
|
||||
<a
|
||||
href="<?= URL::to('/') ?>"
|
||||
target="_blank"
|
||||
title="<?= e(trans('backend::lang.tooltips.preview_website')) ?>">
|
||||
<i class="icon-crosshairs"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="highlight account">
|
||||
<a href="javascript:;" onclick="$.oc.layout.toggleAccountMenu(this)">
|
||||
<img src="<?= $this->user->getAvatarThumb() ?>">
|
||||
|
|
@ -34,13 +42,7 @@
|
|||
</a>
|
||||
<div class="mainmenu-accountmenu">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="<?= Backend::url('backend/auth/signout') ?>">
|
||||
<?= e(trans('backend::lang.account.sign_out')) ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php foreach ($mySettings as $category => $items): ?>
|
||||
<li class="divider"></li>
|
||||
<?php foreach ($items as $item): ?>
|
||||
<li>
|
||||
<a href="<?= $item->url ?>">
|
||||
|
|
@ -48,19 +50,17 @@
|
|||
</a>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
<li class="divider"></li>
|
||||
<?php endforeach ?>
|
||||
|
||||
<li>
|
||||
<a href="<?= Backend::url('backend/auth/signout') ?>">
|
||||
<?= e(trans('backend::lang.account.sign_out')) ?>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<li class="icon preview with-tooltip">
|
||||
<a
|
||||
href="<?= URL::to('/') ?>"
|
||||
target="_blank"
|
||||
title="<?= e(trans('backend::lang.tooltips.preview_website')) ?>">
|
||||
<i class="icon-crosshairs"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
|
|
|||
|
|
@ -203,6 +203,14 @@ class Form extends WidgetBase
|
|||
}
|
||||
|
||||
$this->prepareVars();
|
||||
|
||||
/*
|
||||
* Apply preview mode to widgets
|
||||
*/
|
||||
foreach ($this->formWidgets as $widget) {
|
||||
$widget->previewMode = $this->previewMode;
|
||||
}
|
||||
|
||||
return $this->makePartial($targetPartial, $extraVars);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
value="0"
|
||||
<?= $this->previewMode ? 'disabled="disabled"' : '' ?>>
|
||||
|
||||
<label class="custom-switch">
|
||||
<label class="custom-switch" <?= $this->previewMode ? 'onclick="return false"' : '' ?>>
|
||||
<input
|
||||
type="checkbox"
|
||||
id="<?= $field->getId() ?>"
|
||||
|
|
|
|||
Loading…
Reference in New Issue