Minor changes in the back-end UI. The front-end router now triggers an event allowing to override the default routes. The CMS back-end UI now supports view bags in content files.

This commit is contained in:
alekseybobkov 2014-09-03 19:58:21 -07:00
parent fdd83b53c9
commit 9572c17253
7 changed files with 52 additions and 5 deletions

View File

@ -13667,6 +13667,11 @@ div[data-control="balloon-selector"]:not(.control-disabled) ul li:hover {
.control-treeview ol > li > div:hover span.borders {
display: none;
}
.control-treeview ol > li[data-no-drag-mode] div:hover span.drag-handle {
cursor: default!important;
opacity: 0.3 !important;
filter: alpha(opacity=30) !important;
}
.control-treeview ol > li.dragged li.has-subitems > div:before,
.control-treeview ol > li.dragged.has-subitems > div:before {
background-position: 0px -52px;
@ -13935,6 +13940,14 @@ div[data-control="balloon-selector"]:not(.control-disabled) ul li:hover {
.control-treeview ol > li > ol > li > ol > li > ol > li > ol > li > ol > li > ol > li > ol > li > ol > li > ol > li > ol > li > div > span.expand {
left: 102px;
}
.control-treeview p.no-data {
padding: 18px 0;
margin: 0;
color: #666666;
font-size: 12px;
text-align: center;
font-weight: 400;
}
@media only screen and (-moz-min-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 3/2), only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-devicepixel-ratio: 1.5), only screen and (min-resolution: 1.5dppx) {
.control-treeview ol > li > div:before {
background-position: 0px -79px;

View File

@ -83,6 +83,9 @@
$container.append($('<span class="drag-handle">Drag</span>'))
$container.append($('<span class="borders"></span>'))
if ($(this).attr('data-no-drag-mode') !== undefined)
$('span.drag-handle', this).attr('title', 'Dragging is disabled when the Search is active')
})
}
@ -171,7 +174,11 @@
}
TreeView.prototype.initSortable = function() {
var self = this
var self = this,
$noDragItems = $('[data-no-drag-mode]', this.$el)
if ($noDragItems.length > 0)
return
if (this.$el.data('oc.treelist'))
this.$el.treeListWidget('unbind')

View File

@ -196,6 +196,13 @@
}
}
&[data-no-drag-mode] div:hover {
span.drag-handle {
cursor: default!important;
.opacity(0.3)!important;
}
}
&.dragged {
li.has-subitems, &.has-subitems {
> div:before {
@ -370,6 +377,15 @@
.tree-view-paddings (@max-level);
}
p.no-data {
padding: 18px 0;
margin: 0;
color: @color-filelist-norecords-text;
font-size: 12px;
text-align: center;
font-weight: 400;
}
}
// Retina

View File

@ -164,7 +164,10 @@ return [
'select_all' => 'all',
'select_none' => 'none',
'insert_row' => 'Insert Row',
'delete_row' => 'Delete Row'
'delete_row' => 'Delete Row',
'concurrency-file-changed-title' => 'File was changed',
'concurrency-file-changed-description' => 'The file you\'re editing has been changed on disk by another user. You can either reload the file and lose your changes or override the file on the disk.',
'reload' => 'Reload',
],
'relation' => [
'missing_definition' => "Relation behavior does not contain a definition for ':field'.",

View File

@ -4,6 +4,7 @@ use Lang;
use File;
use Cache;
use Config;
use Event;
use System\Classes\SystemException;
use October\Rain\Router\Router as RainRouter;
use October\Rain\Router\Helper as RouterHelper;
@ -72,6 +73,10 @@ class Router
{
$url = RouterHelper::normalizeUrl($url);
$apiResult = Event::fire('cms.router.beforeRoute', [$url], true);
if ($apiResult !== null)
return $apiResult;
for ($pass = 1; $pass <= 2; $pass++) {
$fileName = null;
$urlList = [];

View File

@ -9,10 +9,12 @@ fields:
path: content_toolbar
cssClass: collapse-visible
components: Cms\FormWidgets\Components
secondaryTabs:
stretch: true
fields:
content:
markup:
tab: cms::lang.editor.content
stretch: true
type: codeeditor

View File

@ -135,10 +135,11 @@ class Index extends Controller
$templatePath = trim(Request::input('templatePath'));
$template = $templatePath ? $this->loadTemplate($type, $templatePath) : $this->createTemplate($type);
$settings = $this->upgradeSettings(Request::input('settings'));
$settings = Request::input('settings') ?: [];
$settings = $this->upgradeSettings($settings);
$templateData = [];
if (Request::input('settings'))
if ($settings)
$templateData['settings'] = $settings;
$fields = ['markup', 'code', 'fileName', 'content'];