Merge branch 'develop' of https://github.com/octobercms/october into fix-extending-plugin
This commit is contained in:
commit
2872e80a14
|
|
@ -1,3 +1,6 @@
|
|||
* **Build 287** (2015-08-03)
|
||||
- Introduced new **MarkdownEditor** form widget (see Backend > Forms docs).
|
||||
|
||||
* **Build 284** (2015-07-25)
|
||||
- Introduced new **ImportExport** controller behavior.
|
||||
- The `export` action has been moved from ListController behavior to Import / Export behavior (see Backend > Importing & Exporting docs).
|
||||
|
|
@ -22,7 +25,7 @@
|
|||
|
||||
* **Build 270** (2015-06-18)
|
||||
- Introduced the October Storm client-side library.
|
||||
- Introduced new *MediaFinder* form widget.
|
||||
- Introduced new **MediaFinder** form widget.
|
||||
- Improved the back-end administrator permissions and `RelationController` UI.
|
||||
- The page setting `hidden` has been renamed to `is_hidden`, this setting may need to be reapplied for some themes.
|
||||
- `FileUpload` form widget has been rebuilt from scratch, it now uses an interface similar to the Media Manager (see Backend > Forms docs).
|
||||
|
|
|
|||
|
|
@ -131,6 +131,10 @@ class ServiceProvider extends ModuleServiceProvider
|
|||
'label' => 'Rich editor',
|
||||
'code' => 'richeditor'
|
||||
]);
|
||||
$manager->registerFormWidget('Backend\FormWidgets\MarkdownEditor', [
|
||||
'label' => 'Markdown editor',
|
||||
'code' => 'markdown'
|
||||
]);
|
||||
$manager->registerFormWidget('Backend\FormWidgets\FileUpload', [
|
||||
'label' => 'File uploader',
|
||||
'code' => 'fileupload'
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
|
@ -15,9 +15,9 @@
|
|||
=require ../vendor/dropzone/dropzone.js
|
||||
=require ../vendor/sweet-alert/sweet-alert.js
|
||||
=require ../vendor/jcrop/js/jquery.Jcrop.js
|
||||
=require ../../../system/assets/vendor/prettify/prettify.js
|
||||
|
||||
=require ../../../system/assets/ui/storm.js
|
||||
|
||||
=require october.lang.js
|
||||
=require october.scrollpad.js
|
||||
=require october.verticalmenu.js
|
||||
=require october.navbar.js
|
||||
|
|
|
|||
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* Client side translations
|
||||
*/
|
||||
|
||||
if ($.oc === undefined)
|
||||
$.oc = {}
|
||||
|
||||
if ($.oc.langMessages === undefined)
|
||||
$.oc.langMessages = {}
|
||||
|
||||
$.oc.lang = (function(lang, messages) {
|
||||
|
||||
lang.load = function(locale) {
|
||||
if (messages[locale] === undefined) {
|
||||
messages[locale] = {}
|
||||
}
|
||||
|
||||
lang.loadedMessages = messages[locale]
|
||||
}
|
||||
|
||||
lang.get = function(name, defaultValue) {
|
||||
if (!name) return
|
||||
|
||||
var result = lang.loadedMessages
|
||||
|
||||
if (!defaultValue) defaultValue = name
|
||||
|
||||
$.each(name.split('.'), function(index, value) {
|
||||
if (result[value] === undefined) {
|
||||
result = defaultValue
|
||||
return false
|
||||
}
|
||||
|
||||
result = result[value]
|
||||
})
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
if (lang.locale === undefined) {
|
||||
lang.locale = 'en'
|
||||
}
|
||||
|
||||
if (lang.loadedMessages === undefined) {
|
||||
lang.load(lang.locale)
|
||||
}
|
||||
|
||||
return lang
|
||||
|
||||
})($.oc.lang || {}, $.oc.langMessages);
|
||||
|
|
@ -13,16 +13,26 @@
|
|||
}
|
||||
|
||||
OctoberLayout.prototype.updateLayout = function(title) {
|
||||
$('.layout-cell.width-fix').each(function(){
|
||||
var $el = $(this).children();
|
||||
if ($el.length > 0) {
|
||||
var margin = $el.data('oc.layoutMargin');
|
||||
if (margin === undefined) {
|
||||
margin = parseInt($el.css('marginRight')) + parseInt($el.css('marginLeft'))
|
||||
$el.data('oc.layoutMargin', margin)
|
||||
}
|
||||
var $children, $el, fixedWidth, margin
|
||||
|
||||
$(this).width($el.get(0).offsetWidth + margin)
|
||||
$('.layout-cell.width-fix').each(function(){
|
||||
$children = $(this).children()
|
||||
|
||||
if ($children.length > 0) {
|
||||
fixedWidth = 0
|
||||
|
||||
$children.each(function() {
|
||||
$el = $(this)
|
||||
margin = $el.data('oc.layoutMargin')
|
||||
|
||||
if (margin === undefined) {
|
||||
margin = parseInt($el.css('marginRight')) + parseInt($el.css('marginLeft'))
|
||||
$el.data('oc.layoutMargin', margin)
|
||||
}
|
||||
fixedWidth += $el.get(0).offsetWidth + margin
|
||||
})
|
||||
|
||||
$(this).width(fixedWidth)
|
||||
$(this).trigger('oc.widthFixed')
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* When the icon is clicked, the menu content is displayed on the left side of the page.
|
||||
* - If the content doesn't fit the navbar, it can be dragged left and right.
|
||||
*
|
||||
* Dependences:
|
||||
* Dependences:
|
||||
* - DragScroll (october.dragscroll.js)
|
||||
* - VerticalMenu (october.verticalmenu.js)
|
||||
*/
|
||||
|
|
@ -25,8 +25,9 @@
|
|||
|
||||
$('.layout-cell.width-fix', navbar).one('oc.widthFixed', function(){
|
||||
var dragScroll = $('[data-control=toolbar]', navbar).data('oc.dragScroll')
|
||||
if (dragScroll)
|
||||
if (dragScroll) {
|
||||
dragScroll.goToElement($('ul.nav > li.active', navbar), undefined, {'duration': 0})
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
background: @color-sidebarnav-bg;
|
||||
|
||||
.control-toolbar {
|
||||
height: auto;
|
||||
padding: 20px 0 20px 20px;
|
||||
|
||||
input.form-control {
|
||||
|
|
@ -195,4 +196,4 @@
|
|||
display: block !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ ul.tree-path {
|
|||
color: #95a5a6;
|
||||
|
||||
&:hover {
|
||||
color: @color-link;
|
||||
color: @link-color;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,15 +7,5 @@
|
|||
// Core variables and mixins
|
||||
@import "../../../../system/assets/ui/less/global.less";
|
||||
|
||||
@import "../../../../system/assets/ui/less/site.mixins.less";
|
||||
@import "../../../../system/assets/ui/less/site.variables.less";
|
||||
|
||||
@import "../../../../system/assets/ui/less/icon.mixins.less";
|
||||
@import "../../../../system/assets/ui/less/icon.variables.less";
|
||||
|
||||
@import "../../../../system/assets/ui/less/form.variables.less";
|
||||
@import "../../../../system/assets/ui/less/button.variables.less";
|
||||
@import "../../../../system/assets/ui/less/dropdown.variables.less";
|
||||
|
||||
@import "variables.less";
|
||||
@import "mixins.less";
|
||||
|
|
|
|||
|
|
@ -2,36 +2,18 @@
|
|||
// Override UI variables
|
||||
// --------------------------------------------------
|
||||
|
||||
@font-family-sans-serif: 'Open Sans', Arial, sans-serif;
|
||||
|
||||
@brand-primary: #5fb6f5;
|
||||
@input-color-placeholder: #cccccc;
|
||||
@border-radius-base: 2px;
|
||||
@dropdown-border: #949ea6;
|
||||
@dropdown-link-color: #39454a;
|
||||
|
||||
@btn-default-color: #666666;
|
||||
@btn-default-bg: #e3e3e3;
|
||||
@btn-default-border: #e3e3e3;
|
||||
|
||||
@link-color: darken(@brand-primary, 15%);
|
||||
@link-hover-color: darken(@link-color, 30%);
|
||||
@font-family-base: 'Open Sans', Arial, sans-serif;
|
||||
|
||||
//
|
||||
// Paths
|
||||
// --------------------------------------------------
|
||||
|
||||
@type-font-path: "../font";
|
||||
@font-path: "../../../system/assets/ui/font";
|
||||
@image-path: "../../../system/assets/ui/images";
|
||||
|
||||
//
|
||||
// Colors
|
||||
// --------------------------------------------------
|
||||
|
||||
@color-link: #0181b9;
|
||||
|
||||
@color-focus: @brand-primary;
|
||||
@color-border: #cccccc;
|
||||
@color-border-light: #e1e1e1;
|
||||
|
||||
|
|
@ -75,12 +57,6 @@
|
|||
@color-scrollpanel-fix-button-light: #eeeeee;
|
||||
@color-scroll-indicator: #bbbbbb;
|
||||
|
||||
@color-richeditor-toolbar: #dddddd;
|
||||
@color-richeditor-toolbar-btn-color: #404040;
|
||||
@color-richeditor-toolbar-btn-bg-hover: #999999;
|
||||
@color-richeditor-toolbar-btn-bg-active: #404040;
|
||||
@color-richeditor-toolbar-btn-color-hover: #ffffff;
|
||||
|
||||
@color-panel-light: #ECF0F1;
|
||||
|
||||
@color-outer-muted-text: rgba(255,255,255,.44);
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ body {
|
|||
|
||||
body {
|
||||
webkit-font-smoothing: antialiased;
|
||||
font-family: @font-family-base;
|
||||
background: @body-bg;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ nav#layout-mainmenu.navbar {
|
|||
// .clearfix();
|
||||
// position: relative;
|
||||
background-color: @color-mainmenu;
|
||||
height: auto;
|
||||
padding: 0 0 0 20px;
|
||||
line-height: 0;
|
||||
white-space: nowrap;
|
||||
|
|
@ -277,4 +278,4 @@ body.mainmenu-open .mainmenu-collapsed ul {
|
|||
@media (min-width: @menu-breakpoint-min) {
|
||||
#layout-canvas {position: static!important;}
|
||||
.mainmenu-collapsed {display: none!important;}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@
|
|||
// Vendor
|
||||
@import "../vendor/sweet-alert/sweet-alert.less";
|
||||
@import "../vendor/jcrop/css/jquery.Jcrop.min.css";
|
||||
@import "../../../system/assets/vendor/prettify/prettify.css";
|
||||
@import "../../../system/assets/vendor/prettify/theme-desert.css";
|
||||
|
||||
//
|
||||
// October Controls
|
||||
|
|
@ -37,7 +39,7 @@
|
|||
// October Storm UI
|
||||
//
|
||||
|
||||
@import "../../../system/assets/ui/storm.less";
|
||||
@import "../../../system/assets/ui/less/global.less";
|
||||
|
||||
//
|
||||
// Combines layout and vendor styles
|
||||
|
|
@ -60,4 +62,3 @@
|
|||
@import "layout/outerlayout.less";
|
||||
@import "layout/fancylayout.less";
|
||||
@import "layout/flyout.less";
|
||||
|
||||
|
|
|
|||
|
|
@ -877,9 +877,9 @@ class RelationController extends ControllerBehavior
|
|||
$this->forceManageMode = 'form';
|
||||
$this->beforeAjax();
|
||||
$saveData = $this->manageWidget->getSaveData();
|
||||
$sessionKey = $this->deferredBinding ? $this->relationGetSessionKey(true) : null;
|
||||
|
||||
if ($this->viewMode == 'multi') {
|
||||
$sessionKey = $this->deferredBinding ? $this->relationGetSessionKey(true) : null;
|
||||
|
||||
if ($this->relationType == 'hasMany') {
|
||||
$newModel = $this->relationObject->create($saveData, $sessionKey);
|
||||
|
|
@ -894,13 +894,24 @@ class RelationController extends ControllerBehavior
|
|||
$newModel = $this->viewModel;
|
||||
$this->viewWidget->setFormValues($saveData);
|
||||
|
||||
if ($this->relationType == 'belongsTo') {
|
||||
/*
|
||||
* Has one relations will save as part of the add() call.
|
||||
*/
|
||||
if ($this->deferredBinding || $this->relationType != 'hasOne') {
|
||||
$newModel->save();
|
||||
$this->relationObject->associate($newModel);
|
||||
$this->relationObject->getParent()->save();
|
||||
}
|
||||
elseif ($this->relationType == 'hasOne') {
|
||||
$this->relationObject->add($newModel);
|
||||
|
||||
$this->relationObject->add($newModel, $sessionKey);
|
||||
|
||||
/*
|
||||
* Belongs to relations won't save when using add() so
|
||||
* it should occur if the conditions are right.
|
||||
*/
|
||||
if (!$this->deferredBinding && $this->relationType == 'belongsTo') {
|
||||
$parentModel = $this->relationObject->getParent();
|
||||
if ($parentModel->exists) {
|
||||
$parentModel->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -975,6 +986,7 @@ class RelationController extends ControllerBehavior
|
|||
$this->beforeAjax();
|
||||
|
||||
$recordId = post('record_id');
|
||||
$sessionKey = $this->deferredBinding ? $this->relationGetSessionKey() : null;
|
||||
|
||||
/*
|
||||
* Add
|
||||
|
|
@ -993,11 +1005,6 @@ class RelationController extends ControllerBehavior
|
|||
|
||||
$models = $this->relationModel->whereIn($foreignKeyName, $checkedIds)->get();
|
||||
foreach ($models as $model) {
|
||||
|
||||
$sessionKey = $this->deferredBinding
|
||||
? $this->relationGetSessionKey()
|
||||
: null;
|
||||
|
||||
$this->relationObject->add($model, $sessionKey);
|
||||
}
|
||||
}
|
||||
|
|
@ -1009,15 +1016,20 @@ class RelationController extends ControllerBehavior
|
|||
elseif ($this->viewMode == 'single') {
|
||||
if ($recordId && ($model = $this->relationModel->find($recordId))) {
|
||||
|
||||
if ($this->relationType == 'belongsTo') {
|
||||
$this->relationObject->associate($model);
|
||||
$this->relationObject->getParent()->save();
|
||||
}
|
||||
elseif ($this->relationType == 'hasOne') {
|
||||
$this->relationObject->add($model);
|
||||
}
|
||||
$this->relationObject->add($model, $sessionKey);
|
||||
$this->viewWidget->setFormValues($model->attributes);
|
||||
|
||||
/*
|
||||
* Belongs to relations won't save when using add() so
|
||||
* it should occur if the conditions are right.
|
||||
*/
|
||||
if (!$this->deferredBinding && $this->relationType == 'belongsTo') {
|
||||
$parentModel = $this->relationObject->getParent();
|
||||
if ($parentModel->exists) {
|
||||
$parentModel->save();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,33 +12,4 @@
|
|||
|
||||
<?php endforeach ?>
|
||||
|
||||
<?php /*
|
||||
<?php if ($relationType == 'hasMany'): ?>
|
||||
|
||||
<?= $this->relationMakePartial('button_create') ?>
|
||||
<?= $this->relationMakePartial('button_delete') ?>
|
||||
|
||||
<?php elseif ($relationType == 'belongsToMany'): ?>
|
||||
|
||||
<?= $this->relationMakePartial('button_add') ?>
|
||||
<?= $this->relationMakePartial('button_remove') ?>
|
||||
|
||||
<?php elseif ($relationType == 'belongsTo'): ?>
|
||||
|
||||
<?= $this->relationMakePartial('button_link') ?>
|
||||
<?= $this->relationMakePartial('button_unlink') ?>
|
||||
|
||||
<?php elseif ($relationType == 'hasOne'): ?>
|
||||
|
||||
<?php if ($relationViewWidget->model->exists): ?>
|
||||
<?= $this->relationMakePartial('button_update', ['relationManageId' => $relationViewWidget->model->id]) ?>
|
||||
<?= $this->relationMakePartial('button_delete') ?>
|
||||
<?php else: ?>
|
||||
<?= $this->relationMakePartial('button_create') ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php endif ?>
|
||||
*/ ?>
|
||||
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ class NavigationManager
|
|||
/*
|
||||
* Sort menu items
|
||||
*/
|
||||
usort($this->items, function ($a, $b) {
|
||||
uasort($this->items, function ($a, $b) {
|
||||
return $a->order - $b->order;
|
||||
});
|
||||
|
||||
|
|
@ -127,7 +127,7 @@ class NavigationManager
|
|||
/*
|
||||
* Sort side menu items
|
||||
*/
|
||||
usort($item->sideMenu, function ($a, $b) {
|
||||
uasort($item->sideMenu, function ($a, $b) {
|
||||
return $a->order - $b->order;
|
||||
});
|
||||
|
||||
|
|
@ -466,6 +466,10 @@ class NavigationManager
|
|||
*/
|
||||
protected function filterItemPermissions($user, array $items)
|
||||
{
|
||||
if (!$user) {
|
||||
return $items;
|
||||
}
|
||||
|
||||
$items = array_filter($items, function ($item) use ($user) {
|
||||
if (!$item->permissions || !count($item->permissions)) {
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,85 @@
|
|||
<?php namespace Backend\FormWidgets;
|
||||
|
||||
use Markdown;
|
||||
use Backend\Models\EditorPreferences;
|
||||
use Backend\Classes\FormWidgetBase;
|
||||
|
||||
/**
|
||||
* Code Editor
|
||||
* Renders a code editor field.
|
||||
*
|
||||
* @package october\backend
|
||||
* @author Alexey Bobkov, Samuel Georges
|
||||
*/
|
||||
class MarkdownEditor extends FormWidgetBase
|
||||
{
|
||||
//
|
||||
// Configurable properties
|
||||
//
|
||||
|
||||
/**
|
||||
* @var bool Display mode: split, tab.
|
||||
*/
|
||||
public $mode = 'tab';
|
||||
|
||||
//
|
||||
// Object properties
|
||||
//
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
protected $defaultAlias = 'markdown';
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
$this->fillFromConfig([
|
||||
'mode',
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
$this->prepareVars();
|
||||
return $this->makePartial('markdowneditor');
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares the widget data
|
||||
*/
|
||||
public function prepareVars()
|
||||
{
|
||||
$this->vars['mode'] = $this->mode;
|
||||
$this->vars['stretch'] = $this->formField->stretch;
|
||||
$this->vars['size'] = $this->formField->size;
|
||||
$this->vars['name'] = $this->formField->getName();
|
||||
$this->vars['value'] = $this->getLoadValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function loadAssets()
|
||||
{
|
||||
$this->addCss('css/markdowneditor.css', 'core');
|
||||
$this->addJs('js/markdowneditor.js', 'core');
|
||||
$this->addJs('/modules/backend/formwidgets/codeeditor/assets/js/build-min.js', 'core');
|
||||
}
|
||||
|
||||
public function onRefresh()
|
||||
{
|
||||
$value = post($this->formField->getName());
|
||||
$previewHtml = Markdown::parse($value);
|
||||
|
||||
return [
|
||||
'preview' => $previewHtml
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -6,7 +6,7 @@
|
|||
*
|
||||
* @see build-min.js
|
||||
*
|
||||
* Current Ace build v1.1.9 using "src-noconflict"
|
||||
* Current Ace build v1.2.0 using "src-noconflict"
|
||||
* https://github.com/ajaxorg/ace-builds/
|
||||
*
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
&.size-giant { min-height: @size-giant; }
|
||||
|
||||
.ace_search {
|
||||
font-family: @font-family-sans-serif;
|
||||
font-family: @font-family-base;
|
||||
font-size: 14px;
|
||||
color: @text-color;
|
||||
z-index: @codeeditor-zindex + 3;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -624,11 +624,11 @@ var TabstopManager = function(editor) {
|
|||
this.editor = null;
|
||||
};
|
||||
|
||||
this.onChange = function(e) {
|
||||
var changeRange = e.data.range;
|
||||
var isRemove = e.data.action[0] == "r";
|
||||
var start = changeRange.start;
|
||||
var end = changeRange.end;
|
||||
this.onChange = function(delta) {
|
||||
var changeRange = delta;
|
||||
var isRemove = delta.action[0] == "r";
|
||||
var start = delta.start;
|
||||
var end = delta.end;
|
||||
var startRow = start.row;
|
||||
var endRow = end.row;
|
||||
var lineDif = endRow - startRow;
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -422,8 +422,8 @@ var CstyleBehaviour = function() {
|
|||
if (leftChar == "\\" && token && /escape/.test(token.type))
|
||||
return null;
|
||||
|
||||
var stringBefore = token && /string/.test(token.type);
|
||||
var stringAfter = !rightToken || /string/.test(rightToken.type);
|
||||
var stringBefore = token && /string|escape/.test(token.type);
|
||||
var stringAfter = !rightToken || /string|escape/.test(rightToken.type);
|
||||
|
||||
var pair;
|
||||
if (rightChar == quote) {
|
||||
|
|
|
|||
|
|
@ -680,8 +680,8 @@ var CstyleBehaviour = function() {
|
|||
if (leftChar == "\\" && token && /escape/.test(token.type))
|
||||
return null;
|
||||
|
||||
var stringBefore = token && /string/.test(token.type);
|
||||
var stringAfter = !rightToken || /string/.test(rightToken.type);
|
||||
var stringBefore = token && /string|escape/.test(token.type);
|
||||
var stringAfter = !rightToken || /string|escape/.test(rightToken.type);
|
||||
|
||||
var pair;
|
||||
if (rightChar == quote) {
|
||||
|
|
|
|||
|
|
@ -680,8 +680,8 @@ var CstyleBehaviour = function() {
|
|||
if (leftChar == "\\" && token && /escape/.test(token.type))
|
||||
return null;
|
||||
|
||||
var stringBefore = token && /string/.test(token.type);
|
||||
var stringAfter = !rightToken || /string/.test(rightToken.type);
|
||||
var stringBefore = token && /string|escape/.test(token.type);
|
||||
var stringAfter = !rightToken || /string|escape/.test(rightToken.type);
|
||||
|
||||
var pair;
|
||||
if (rightChar == quote) {
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ var LessHighlightRules = function() {
|
|||
regex: "\\.[a-z0-9-_]+"
|
||||
}, {
|
||||
token: "variable.language",
|
||||
regex: ":[a-z0-9-_]+"
|
||||
regex: ":[a-z_][a-z0-9-_]*"
|
||||
}, {
|
||||
token: "constant",
|
||||
regex: "[a-z0-9-_]+"
|
||||
|
|
@ -507,8 +507,8 @@ var CstyleBehaviour = function() {
|
|||
if (leftChar == "\\" && token && /escape/.test(token.type))
|
||||
return null;
|
||||
|
||||
var stringBefore = token && /string/.test(token.type);
|
||||
var stringAfter = !rightToken || /string/.test(rightToken.type);
|
||||
var stringBefore = token && /string|escape/.test(token.type);
|
||||
var stringAfter = !rightToken || /string|escape/.test(rightToken.type);
|
||||
|
||||
var pair;
|
||||
if (rightChar == quote) {
|
||||
|
|
|
|||
|
|
@ -680,8 +680,8 @@ var CstyleBehaviour = function() {
|
|||
if (leftChar == "\\" && token && /escape/.test(token.type))
|
||||
return null;
|
||||
|
||||
var stringBefore = token && /string/.test(token.type);
|
||||
var stringAfter = !rightToken || /string/.test(rightToken.type);
|
||||
var stringBefore = token && /string|escape/.test(token.type);
|
||||
var stringAfter = !rightToken || /string|escape/.test(rightToken.type);
|
||||
|
||||
var pair;
|
||||
if (rightChar == quote) {
|
||||
|
|
|
|||
|
|
@ -2163,8 +2163,8 @@ var CstyleBehaviour = function() {
|
|||
if (leftChar == "\\" && token && /escape/.test(token.type))
|
||||
return null;
|
||||
|
||||
var stringBefore = token && /string/.test(token.type);
|
||||
var stringAfter = !rightToken || /string/.test(rightToken.type);
|
||||
var stringBefore = token && /string|escape/.test(token.type);
|
||||
var stringAfter = !rightToken || /string|escape/.test(rightToken.type);
|
||||
|
||||
var pair;
|
||||
if (rightChar == quote) {
|
||||
|
|
|
|||
|
|
@ -532,8 +532,8 @@ var CstyleBehaviour = function() {
|
|||
if (leftChar == "\\" && token && /escape/.test(token.type))
|
||||
return null;
|
||||
|
||||
var stringBefore = token && /string/.test(token.type);
|
||||
var stringAfter = !rightToken || /string/.test(rightToken.type);
|
||||
var stringBefore = token && /string|escape/.test(token.type);
|
||||
var stringAfter = !rightToken || /string|escape/.test(rightToken.type);
|
||||
|
||||
var pair;
|
||||
if (rightChar == quote) {
|
||||
|
|
|
|||
|
|
@ -680,8 +680,8 @@ var CstyleBehaviour = function() {
|
|||
if (leftChar == "\\" && token && /escape/.test(token.type))
|
||||
return null;
|
||||
|
||||
var stringBefore = token && /string/.test(token.type);
|
||||
var stringAfter = !rightToken || /string/.test(rightToken.type);
|
||||
var stringBefore = token && /string|escape/.test(token.type);
|
||||
var stringAfter = !rightToken || /string|escape/.test(rightToken.type);
|
||||
|
||||
var pair;
|
||||
if (rightChar == quote) {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ background: #BDD5FC\
|
|||
}\
|
||||
.ace-clouds.ace_multiselect .ace_selection.ace_start {\
|
||||
box-shadow: 0 0 3px 0px #FFFFFF;\
|
||||
border-radius: 2px\
|
||||
}\
|
||||
.ace-clouds .ace_marker-layer .ace_step {\
|
||||
background: rgb(255, 255, 0)\
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ background: #000000\
|
|||
}\
|
||||
.ace-clouds-midnight.ace_multiselect .ace_selection.ace_start {\
|
||||
box-shadow: 0 0 3px 0px #191919;\
|
||||
border-radius: 2px\
|
||||
}\
|
||||
.ace-clouds-midnight .ace_marker-layer .ace_step {\
|
||||
background: rgb(102, 82, 0)\
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ background: rgba(179, 101, 57, 0.75)\
|
|||
}\
|
||||
.ace-cobalt.ace_multiselect .ace_selection.ace_start {\
|
||||
box-shadow: 0 0 3px 0px #002240;\
|
||||
border-radius: 2px\
|
||||
}\
|
||||
.ace-cobalt .ace_marker-layer .ace_step {\
|
||||
background: rgb(127, 111, 19)\
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ background: rgba(39, 95, 255, 0.30)\
|
|||
}\
|
||||
.ace-dawn.ace_multiselect .ace_selection.ace_start {\
|
||||
box-shadow: 0 0 3px 0px #F9F9F9;\
|
||||
border-radius: 2px\
|
||||
}\
|
||||
.ace-dawn .ace_marker-layer .ace_step {\
|
||||
background: rgb(255, 255, 0)\
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ background: rgba(90, 100, 126, 0.88)\
|
|||
}\
|
||||
.ace-idle-fingers.ace_multiselect .ace_selection.ace_start {\
|
||||
box-shadow: 0 0 3px 0px #323232;\
|
||||
border-radius: 2px\
|
||||
}\
|
||||
.ace-idle-fingers .ace_marker-layer .ace_step {\
|
||||
background: rgb(102, 82, 0)\
|
||||
|
|
|
|||
|
|
@ -27,14 +27,13 @@ background: rgba(100, 5, 208, 0.27)\
|
|||
}\
|
||||
.ace-katzenmilch.ace_multiselect .ace_selection.ace_start {\
|
||||
box-shadow: 0 0 3px 0px #f3f2f3;\
|
||||
border-radius: 2px\
|
||||
}\
|
||||
.ace-katzenmilch .ace_marker-layer .ace_step {\
|
||||
background: rgb(198, 219, 174)\
|
||||
}\
|
||||
.ace-katzenmilch .ace_marker-layer .ace_bracket {\
|
||||
margin: -1px 0 0 -1px;\
|
||||
border: 1px solid #000000\
|
||||
border: 1px solid rgba(0, 0, 0, 0.33);\
|
||||
}\
|
||||
.ace-katzenmilch .ace_marker-layer .ace_active-line {\
|
||||
background: rgb(232, 242, 254)\
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ background: rgba(170, 0, 255, 0.45)\
|
|||
}\
|
||||
.ace-kr-theme.ace_multiselect .ace_selection.ace_start {\
|
||||
box-shadow: 0 0 3px 0px #0B0A09;\
|
||||
border-radius: 2px\
|
||||
}\
|
||||
.ace-kr-theme .ace_marker-layer .ace_step {\
|
||||
background: rgb(102, 82, 0)\
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ background: #454545\
|
|||
}\
|
||||
.ace-merbivore.ace_multiselect .ace_selection.ace_start {\
|
||||
box-shadow: 0 0 3px 0px #161616;\
|
||||
border-radius: 2px\
|
||||
}\
|
||||
.ace-merbivore .ace_marker-layer .ace_step {\
|
||||
background: rgb(102, 82, 0)\
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ background: #494949\
|
|||
}\
|
||||
.ace-merbivore-soft.ace_multiselect .ace_selection.ace_start {\
|
||||
box-shadow: 0 0 3px 0px #1C1C1C;\
|
||||
border-radius: 2px\
|
||||
}\
|
||||
.ace-merbivore-soft .ace_marker-layer .ace_step {\
|
||||
background: rgb(102, 82, 0)\
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ background: rgba(145, 153, 148, 0.40)\
|
|||
}\
|
||||
.ace-mono-industrial.ace_multiselect .ace_selection.ace_start {\
|
||||
box-shadow: 0 0 3px 0px #222C28;\
|
||||
border-radius: 2px\
|
||||
}\
|
||||
.ace-mono-industrial .ace_marker-layer .ace_step {\
|
||||
background: rgb(102, 82, 0)\
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ background: #49483E\
|
|||
}\
|
||||
.ace-monokai.ace_multiselect .ace_selection.ace_start {\
|
||||
box-shadow: 0 0 3px 0px #272822;\
|
||||
border-radius: 2px\
|
||||
}\
|
||||
.ace-monokai .ace_marker-layer .ace_step {\
|
||||
background: rgb(102, 82, 0)\
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ background: rgba(221, 240, 255, 0.20)\
|
|||
}\
|
||||
.ace-pastel-on-dark.ace_multiselect .ace_selection.ace_start {\
|
||||
box-shadow: 0 0 3px 0px #2C2828;\
|
||||
border-radius: 2px\
|
||||
}\
|
||||
.ace-pastel-on-dark .ace_marker-layer .ace_step {\
|
||||
background: rgb(102, 82, 0)\
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ background: rgba(255, 255, 255, 0.1)\
|
|||
}\
|
||||
.ace-solarized-dark.ace_multiselect .ace_selection.ace_start {\
|
||||
box-shadow: 0 0 3px 0px #002B36;\
|
||||
border-radius: 2px\
|
||||
}\
|
||||
.ace-solarized-dark .ace_marker-layer .ace_step {\
|
||||
background: rgb(102, 82, 0)\
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ background: rgba(7, 54, 67, 0.09)\
|
|||
}\
|
||||
.ace-solarized-light.ace_multiselect .ace_selection.ace_start {\
|
||||
box-shadow: 0 0 3px 0px #FDF6E3;\
|
||||
border-radius: 2px\
|
||||
}\
|
||||
.ace-solarized-light .ace_marker-layer .ace_step {\
|
||||
background: rgb(255, 255, 0)\
|
||||
|
|
|
|||
|
|
@ -2,10 +2,7 @@ ace.define("ace/theme/sqlserver",["require","exports","module","ace/lib/dom"], f
|
|||
|
||||
exports.isDark = false;
|
||||
exports.cssClass = "ace-sqlserver";
|
||||
exports.cssText = ".ace_line {\
|
||||
font-family: Consolas;\
|
||||
}\
|
||||
.ace-sqlserver .ace_gutter {\
|
||||
exports.cssText = ".ace-sqlserver .ace_gutter {\
|
||||
background: #ebebeb;\
|
||||
color: #333;\
|
||||
overflow: hidden;\
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ background: #424242\
|
|||
}\
|
||||
.ace-terminal-theme.ace_multiselect .ace_selection.ace_start {\
|
||||
box-shadow: 0 0 3px 0px black;\
|
||||
border-radius: 2px\
|
||||
}\
|
||||
.ace-terminal-theme .ace_marker-layer .ace_step {\
|
||||
background: rgb(0, 0, 0)\
|
||||
|
|
|
|||
|
|
@ -98,7 +98,6 @@ background: rgb(181, 213, 255);\
|
|||
}\
|
||||
.ace-tm.ace_multiselect .ace_selection.ace_start {\
|
||||
box-shadow: 0 0 3px 0px white;\
|
||||
border-radius: 2px;\
|
||||
}\
|
||||
.ace-tm .ace_marker-layer .ace_step {\
|
||||
background: rgb(252, 255, 0);\
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ background: #D6D6D6\
|
|||
}\
|
||||
.ace-tomorrow.ace_multiselect .ace_selection.ace_start {\
|
||||
box-shadow: 0 0 3px 0px #FFFFFF;\
|
||||
border-radius: 2px\
|
||||
}\
|
||||
.ace-tomorrow .ace_marker-layer .ace_step {\
|
||||
background: rgb(255, 255, 0)\
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ background: #373B41\
|
|||
}\
|
||||
.ace-tomorrow-night.ace_multiselect .ace_selection.ace_start {\
|
||||
box-shadow: 0 0 3px 0px #1D1F21;\
|
||||
border-radius: 2px\
|
||||
}\
|
||||
.ace-tomorrow-night .ace_marker-layer .ace_step {\
|
||||
background: rgb(102, 82, 0)\
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ background: #003F8E\
|
|||
}\
|
||||
.ace-tomorrow-night-blue.ace_multiselect .ace_selection.ace_start {\
|
||||
box-shadow: 0 0 3px 0px #002451;\
|
||||
border-radius: 2px\
|
||||
}\
|
||||
.ace-tomorrow-night-blue .ace_marker-layer .ace_step {\
|
||||
background: rgb(127, 111, 19)\
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ background: #424242\
|
|||
}\
|
||||
.ace-tomorrow-night-bright.ace_multiselect .ace_selection.ace_start {\
|
||||
box-shadow: 0 0 3px 0px #000000;\
|
||||
border-radius: 2px\
|
||||
}\
|
||||
.ace-tomorrow-night-bright .ace_marker-layer .ace_step {\
|
||||
background: rgb(102, 82, 0)\
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ background: #515151\
|
|||
}\
|
||||
.ace-tomorrow-night-eighties.ace_multiselect .ace_selection.ace_start {\
|
||||
box-shadow: 0 0 3px 0px #2D2D2D;\
|
||||
border-radius: 2px\
|
||||
}\
|
||||
.ace-tomorrow-night-eighties .ace_marker-layer .ace_step {\
|
||||
background: rgb(102, 82, 0)\
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ background: rgba(221, 240, 255, 0.20)\
|
|||
}\
|
||||
.ace-twilight.ace_multiselect .ace_selection.ace_start {\
|
||||
box-shadow: 0 0 3px 0px #141414;\
|
||||
border-radius: 2px\
|
||||
}\
|
||||
.ace-twilight .ace_marker-layer .ace_step {\
|
||||
background: rgb(102, 82, 0)\
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ background: #6699CC\
|
|||
}\
|
||||
.ace-vibrant-ink.ace_multiselect .ace_selection.ace_start {\
|
||||
box-shadow: 0 0 3px 0px #0F0F0F;\
|
||||
border-radius: 2px\
|
||||
}\
|
||||
.ace-vibrant-ink .ace_marker-layer .ace_step {\
|
||||
background: rgb(102, 82, 0)\
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ background: #B5D5FF\
|
|||
}\
|
||||
.ace-xcode.ace_multiselect .ace_selection.ace_start {\
|
||||
box-shadow: 0 0 3px 0px #FFFFFF;\
|
||||
border-radius: 2px\
|
||||
}\
|
||||
.ace-xcode .ace_marker-layer .ace_step {\
|
||||
background: rgb(198, 219, 174)\
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,194 @@
|
|||
.field-markdowneditor {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
border: 1px solid #e0e0e0;
|
||||
background: #fff;
|
||||
-webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
|
||||
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.field-markdowneditor textarea {
|
||||
opacity: 0;
|
||||
filter: alpha(opacity=0);
|
||||
}
|
||||
.field-markdowneditor .editor-toolbar {
|
||||
border-top-right-radius: 5px;
|
||||
border-top-left-radius: 5px;
|
||||
}
|
||||
.field-markdowneditor.editor-focus {
|
||||
border: 1px solid #808c8d;
|
||||
}
|
||||
.field-markdowneditor.size-tiny .editor-write {
|
||||
min-height: 50px;
|
||||
}
|
||||
.field-markdowneditor.size-tiny .editor-preview {
|
||||
height: 50px;
|
||||
}
|
||||
.field-markdowneditor.size-small .editor-write {
|
||||
min-height: 100px;
|
||||
}
|
||||
.field-markdowneditor.size-small .editor-preview {
|
||||
height: 100px;
|
||||
}
|
||||
.field-markdowneditor.size-large .editor-write {
|
||||
min-height: 200px;
|
||||
}
|
||||
.field-markdowneditor.size-large .editor-preview {
|
||||
height: 200px;
|
||||
}
|
||||
.field-markdowneditor.size-huge .editor-write {
|
||||
min-height: 250px;
|
||||
}
|
||||
.field-markdowneditor.size-huge .editor-preview {
|
||||
height: 250px;
|
||||
}
|
||||
.field-markdowneditor.size-giant .editor-write {
|
||||
min-height: 350px;
|
||||
}
|
||||
.field-markdowneditor.size-giant .editor-preview {
|
||||
height: 350px;
|
||||
}
|
||||
.field-markdowneditor .editor-write {
|
||||
position: relative;
|
||||
}
|
||||
.field-markdowneditor .editor-preview {
|
||||
padding: 15px;
|
||||
overflow: auto;
|
||||
}
|
||||
.field-markdowneditor .editor-preview-loader {
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 10px;
|
||||
margin-top: 40px;
|
||||
background-image: url('../../../../../system/assets/ui/images/loader-transparent.svg');
|
||||
background-size: 20px 20px;
|
||||
background-position: 50% 50%;
|
||||
-webkit-animation: spin 1s linear infinite;
|
||||
animation: spin 1s linear infinite;
|
||||
}
|
||||
.field-markdowneditor.mode-tab .editor-preview {
|
||||
display: none;
|
||||
}
|
||||
.field-markdowneditor.mode-tab.is-preview .editor-write {
|
||||
display: none;
|
||||
}
|
||||
.field-markdowneditor.mode-tab.is-preview .editor-preview {
|
||||
display: block;
|
||||
}
|
||||
.field-markdowneditor.mode-split .editor-preview {
|
||||
float: right;
|
||||
width: 50%;
|
||||
}
|
||||
.field-markdowneditor.mode-split .editor-write {
|
||||
float: left;
|
||||
width: 50%;
|
||||
}
|
||||
.field-markdowneditor.mode-split .editor-write .editor-code {
|
||||
border-right: 2px solid #808C8D;
|
||||
}
|
||||
.field-markdowneditor.stretch,
|
||||
.field-markdowneditor.stretch .editor-toolbar {
|
||||
border-radius: 0 !important;
|
||||
}
|
||||
.field-markdowneditor.stretch .editor-toolbar {
|
||||
height: auto;
|
||||
}
|
||||
.field-markdowneditor.stretch .editor-write,
|
||||
.field-markdowneditor.stretch .editor-preview {
|
||||
float: none;
|
||||
height: auto;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
margin-top: 40px;
|
||||
}
|
||||
.field-markdowneditor.stretch .editor-write {
|
||||
left: 0;
|
||||
right: auto;
|
||||
}
|
||||
.field-markdowneditor.is-fullscreen {
|
||||
z-index: 1020;
|
||||
position: fixed !important;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
}
|
||||
.field-markdowneditor.is-fullscreen,
|
||||
.field-markdowneditor.is-fullscreen .editor-toolbar {
|
||||
border-radius: 0 !important;
|
||||
border: none;
|
||||
}
|
||||
.field-markdowneditor .editor-preview {
|
||||
color: #515c5d;
|
||||
font-family: "Helvetica", sans-serif;
|
||||
line-height: 180%;
|
||||
}
|
||||
.field-markdowneditor .editor-preview h1,
|
||||
.field-markdowneditor .editor-preview h2,
|
||||
.field-markdowneditor .editor-preview h3,
|
||||
.field-markdowneditor .editor-preview h4,
|
||||
.field-markdowneditor .editor-preview h5,
|
||||
.field-markdowneditor .editor-preview h6 {
|
||||
margin-top: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.field-markdowneditor .editor-preview h1:first-child,
|
||||
.field-markdowneditor .editor-preview h2:first-child,
|
||||
.field-markdowneditor .editor-preview h3:first-child,
|
||||
.field-markdowneditor .editor-preview h4:first-child,
|
||||
.field-markdowneditor .editor-preview h5:first-child,
|
||||
.field-markdowneditor .editor-preview h6:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
.field-markdowneditor .editor-preview *:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.field-markdowneditor .editor-preview h1 {
|
||||
font-size: 30px;
|
||||
}
|
||||
.field-markdowneditor .editor-preview h2 {
|
||||
font-size: 26px;
|
||||
}
|
||||
.field-markdowneditor .editor-preview h3 {
|
||||
font-size: 24px;
|
||||
}
|
||||
.field-markdowneditor .editor-preview h4 {
|
||||
font-size: 22px;
|
||||
}
|
||||
.field-markdowneditor .editor-preview h5 {
|
||||
font-size: 20px;
|
||||
}
|
||||
.field-markdowneditor .editor-preview h6 {
|
||||
font-size: 18px;
|
||||
}
|
||||
.field-markdowneditor .editor-preview p,
|
||||
.field-markdowneditor .editor-preview ol,
|
||||
.field-markdowneditor .editor-preview ul {
|
||||
font-size: 14px;
|
||||
}
|
||||
.field-markdowneditor .editor-preview h1,
|
||||
.field-markdowneditor .editor-preview h2,
|
||||
.field-markdowneditor .editor-preview h3,
|
||||
.field-markdowneditor .editor-preview h4,
|
||||
.field-markdowneditor .editor-preview h5,
|
||||
.field-markdowneditor .editor-preview h6,
|
||||
.field-markdowneditor .editor-preview p,
|
||||
.field-markdowneditor .editor-preview ol,
|
||||
.field-markdowneditor .editor-preview ul {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.field-markdowneditor .editor-preview pre.prettyprint {
|
||||
border-width: 0;
|
||||
padding: 13px 16px;
|
||||
border-radius: 3px;
|
||||
line-height: 130%;
|
||||
}
|
||||
.field-markdowneditor .editor-preview img {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
|
@ -0,0 +1,746 @@
|
|||
+function ($) { "use strict";
|
||||
var Base = $.oc.foundation.base,
|
||||
BaseProto = Base.prototype
|
||||
|
||||
var MarkdownEditor = function (element, options) {
|
||||
this.$el = $(element)
|
||||
this.options = options || {}
|
||||
this.$textarea = $('textarea:first', this.$el)
|
||||
this.$toolbar = $('.editor-toolbar:first', this.$el)
|
||||
this.$write = $('.editor-write:first', this.$el)
|
||||
this.$preview = $('.editor-preview:first', this.$el)
|
||||
this.$code = null
|
||||
this.editor = null
|
||||
this.$form = null
|
||||
this.$buttons = null
|
||||
this.$fixedButtons = null
|
||||
this.$indicator = null
|
||||
this.editorPadding = 15
|
||||
|
||||
$.oc.foundation.controlUtils.markDisposable(element)
|
||||
Base.call(this)
|
||||
this.init()
|
||||
}
|
||||
|
||||
MarkdownEditor.prototype = Object.create(BaseProto)
|
||||
MarkdownEditor.prototype.constructor = MarkdownEditor
|
||||
|
||||
MarkdownEditor.prototype.init = function() {
|
||||
this.$el.one('dispose-control', this.proxy(this.dispose))
|
||||
|
||||
/*
|
||||
* Control must have an identifier
|
||||
*/
|
||||
if (!this.$el.attr('id')) {
|
||||
this.$el.attr('id', 'element-' + Math.random().toString(36).substring(7))
|
||||
}
|
||||
|
||||
this.$form = this.$el.closest('form')
|
||||
|
||||
this.createCodeContainer()
|
||||
this.createToolbar()
|
||||
this.createIndicator()
|
||||
this.setViewMode(this.options.viewMode)
|
||||
|
||||
this.$toolbar.on('click', '.btn, .md-dropdown-button', this.proxy(this.onClickToolbarButton))
|
||||
this.$form.on('oc.beforeRequest', this.proxy(this.onBeforeRequest))
|
||||
this.editor.on('change', this.proxy(this.onEditorChange))
|
||||
this.editor.getSession().on('changeScrollTop', this.proxy(this.onEditorScrollTop))
|
||||
|
||||
$('[data-control="tooltip"]', this.$toolbar).tooltip()
|
||||
$('[data-toggle="dropdown"]', this.$toolbar).dropdown()
|
||||
}
|
||||
|
||||
MarkdownEditor.prototype.dispose = function() {
|
||||
this.$el.off('dispose-control', this.proxy(this.dispose))
|
||||
|
||||
this.$toolbar.off('click', '.btn, .md-dropdown-button', this.proxy(this.onClickToolbarButton))
|
||||
this.$form.off('oc.beforeRequest', this.proxy(this.onBeforeRequest))
|
||||
this.editor.off('change', this.proxy(this.onEditorChange))
|
||||
$(window).off('resize', this.proxy(this.updateFullscreen))
|
||||
|
||||
this.$el.removeData('oc.markdownEditor')
|
||||
|
||||
this.$el = null
|
||||
this.$textarea = null
|
||||
this.$toolbar = null
|
||||
this.$write = null
|
||||
this.$preview = null
|
||||
this.$code = null
|
||||
this.editor = null
|
||||
this.$form = null
|
||||
this.$buttons = null
|
||||
this.$fixedButtons = null
|
||||
this.$indicator = null
|
||||
|
||||
this.isSplitMode = null
|
||||
this.isPreview = null
|
||||
this.isFullscreen = null
|
||||
this.dataTrackInputTimer = null
|
||||
|
||||
this.options = null
|
||||
|
||||
BaseProto.dispose.call(this)
|
||||
}
|
||||
|
||||
MarkdownEditor.prototype.createToolbar = function() {
|
||||
var self = this,
|
||||
$button,
|
||||
$buttons = $('<div class="layout-cell toolbar-item" />'),
|
||||
$fixedButtons = $('<div class="layout-cell toolbar-item width-fix" />')
|
||||
|
||||
$.each($.oc.markdownEditorButtons, function(code, button) {
|
||||
$button = $('<button />').attr({
|
||||
'type': "button",
|
||||
'class': 'btn',
|
||||
'title': $.oc.lang.get(button.label),
|
||||
'data-control': "tooltip",
|
||||
'data-placement': "bottom",
|
||||
'data-container': "body",
|
||||
'data-button-code': code,
|
||||
'data-button-action': button.action
|
||||
})
|
||||
|
||||
if (button.template) {
|
||||
$button.attr('data-button-template', button.template)
|
||||
}
|
||||
|
||||
if (button.cssClass) {
|
||||
$button.addClass(button.cssClass)
|
||||
}
|
||||
else {
|
||||
$button.addClass('tb-icon tb-' + button.icon)
|
||||
}
|
||||
|
||||
if (button.fixed) {
|
||||
$fixedButtons.append($button)
|
||||
}
|
||||
else {
|
||||
$buttons.append($button)
|
||||
}
|
||||
|
||||
if (button.dropdown) {
|
||||
$button.attr('data-toggle', 'dropdown')
|
||||
self.createToolbarDropdown(button, $button)
|
||||
}
|
||||
})
|
||||
|
||||
$buttons.wrapInner('<div data-control="toolbar" />')
|
||||
this.$toolbar.append($buttons)
|
||||
this.$toolbar.append($fixedButtons)
|
||||
|
||||
this.$fixedButtons = $fixedButtons
|
||||
this.$buttons = $buttons
|
||||
}
|
||||
|
||||
MarkdownEditor.prototype.createToolbarDropdown = function(button, $el) {
|
||||
var $dropdown = $('<ul class="dropdown-menu" />'),
|
||||
$childButton
|
||||
|
||||
$dropdown.attr('data-dropdown-title', $.oc.lang.get(button.label))
|
||||
$.each(button.dropdown, function(code, childButton) {
|
||||
$childButton = $('<a />').attr({
|
||||
'href': 'javascript:;',
|
||||
'class': 'md-dropdown-button',
|
||||
'tabindex': '-1',
|
||||
'data-button-code': code,
|
||||
'data-button-action': childButton.action
|
||||
})
|
||||
|
||||
if (childButton.template) {
|
||||
$childButton.attr('data-button-template', childButton.template)
|
||||
}
|
||||
|
||||
if (childButton.cssClass) {
|
||||
$childButton.addClass(childButton.cssClass)
|
||||
}
|
||||
|
||||
$childButton.text($.oc.lang.get(childButton.label))
|
||||
|
||||
$dropdown.append($childButton)
|
||||
$childButton.wrap('<li />')
|
||||
})
|
||||
|
||||
$el.wrap('<div class="dropdown dropdown-fixed" />')
|
||||
$el.after($dropdown)
|
||||
}
|
||||
|
||||
MarkdownEditor.prototype.createCodeContainer = function() {
|
||||
/*
|
||||
* Create code container
|
||||
*/
|
||||
this.$code = $('<div />')
|
||||
.addClass('editor-code')
|
||||
.attr('id', this.$el.attr('id') + '-code')
|
||||
.css({
|
||||
position: 'absolute',
|
||||
top: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
left: 0
|
||||
})
|
||||
.appendTo(this.$write)
|
||||
|
||||
/*
|
||||
* Initialize ACE editor
|
||||
*/
|
||||
var editor = this.editor = ace.edit(this.$code.attr('id'))
|
||||
|
||||
// Fixes a weird notice about scrolling
|
||||
editor.$blockScrolling = Infinity
|
||||
|
||||
editor.getSession().setValue(this.$textarea.val())
|
||||
|
||||
/*
|
||||
* Set theme, anticipated languages should be preloaded
|
||||
*/
|
||||
assetManager.load({
|
||||
js:[
|
||||
this.options.vendorPath + '/theme-github.js'
|
||||
]
|
||||
}, function(){
|
||||
editor.setTheme('ace/theme/github')
|
||||
})
|
||||
|
||||
editor.getSession().setMode({ path: 'ace/mode/markdown' })
|
||||
editor.setHighlightActiveLine(false)
|
||||
editor.renderer.setShowGutter(false)
|
||||
editor.renderer.setShowPrintMargin(false)
|
||||
editor.getSession().setUseWrapMode(true)
|
||||
editor.setFontSize(14)
|
||||
editor.on('blur', this.proxy(this.onBlur))
|
||||
editor.on('focus', this.proxy(this.onFocus))
|
||||
|
||||
// Set the vendor path for Ace's require path
|
||||
ace.require('ace/config').set('basePath', this.options.vendorPath)
|
||||
|
||||
editor.renderer.setPadding(this.editorPadding)
|
||||
editor.renderer.setScrollMargin(this.editorPadding, this.editorPadding, 0, 0)
|
||||
|
||||
setTimeout(function() {
|
||||
editor.resize()
|
||||
}, 100)
|
||||
}
|
||||
|
||||
//
|
||||
// Events
|
||||
//
|
||||
|
||||
MarkdownEditor.prototype.onClickToolbarButton = function(ev) {
|
||||
var $button = $(ev.target),
|
||||
action = $button.data('button-action'),
|
||||
template = $button.data('button-template')
|
||||
|
||||
$button.blur()
|
||||
|
||||
if (template) {
|
||||
this[action](template)
|
||||
}
|
||||
else {
|
||||
this[action]()
|
||||
}
|
||||
}
|
||||
|
||||
MarkdownEditor.prototype.onEditorScrollTop = function(scroll) {
|
||||
if (!this.isSplitMode) return
|
||||
|
||||
var canvasHeight = this.$preview.height(),
|
||||
editorHeight,
|
||||
previewHeight,
|
||||
scrollRatio
|
||||
|
||||
if (canvasHeight != this.$el.data('markdowneditor-canvas-height')) {
|
||||
|
||||
editorHeight =
|
||||
(this.editor.getSession().getScreenLength() *
|
||||
this.editor.renderer.lineHeight) -
|
||||
canvasHeight
|
||||
|
||||
previewHeight = this.$preview.get(0).scrollHeight - canvasHeight
|
||||
|
||||
scrollRatio = previewHeight / editorHeight
|
||||
|
||||
this.$el.data('markdowneditor-canvas-height', canvasHeight)
|
||||
this.$el.data('markdowneditor-scroll-ratio', scrollRatio)
|
||||
}
|
||||
else {
|
||||
scrollRatio = this.$el.data('markdowneditor-scroll-ratio')
|
||||
}
|
||||
|
||||
scroll += this.editorPadding
|
||||
this.$preview.scrollTop(scroll * scrollRatio)
|
||||
}
|
||||
|
||||
MarkdownEditor.prototype.onEditorChange = function() {
|
||||
this.$form.trigger('change')
|
||||
|
||||
var self = this
|
||||
|
||||
if (!this.isSplitMode) return
|
||||
|
||||
if (this.loading) {
|
||||
if (this.dataTrackInputTimer === undefined) {
|
||||
this.dataTrackInputTimer = window.setInterval(function(){
|
||||
self.onEditorChange()
|
||||
}, 100)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
window.clearTimeout(this.dataTrackInputTimer)
|
||||
this.dataTrackInputTimer = undefined
|
||||
|
||||
self.updatePreview()
|
||||
}
|
||||
|
||||
MarkdownEditor.prototype.onBeforeRequest = function() {
|
||||
this.$textarea.val(this.editor.getSession().getValue())
|
||||
}
|
||||
|
||||
MarkdownEditor.prototype.onResize = function() {
|
||||
this.editor.resize()
|
||||
}
|
||||
|
||||
MarkdownEditor.prototype.onBlur = function() {
|
||||
this.$el.removeClass('editor-focus')
|
||||
}
|
||||
|
||||
MarkdownEditor.prototype.onFocus = function() {
|
||||
this.$el.addClass('editor-focus')
|
||||
}
|
||||
|
||||
//
|
||||
// Preview
|
||||
//
|
||||
|
||||
MarkdownEditor.prototype.updatePreview = function() {
|
||||
var self = this
|
||||
|
||||
this.loading = true
|
||||
this.showIndicator()
|
||||
|
||||
this.$el.request(this.options.refreshHandler, {
|
||||
success: function(data) {
|
||||
this.success(data)
|
||||
self.$preview.html(data.preview)
|
||||
self.initPreview()
|
||||
}
|
||||
}).done(function() {
|
||||
self.hideIndicator()
|
||||
self.loading = false
|
||||
})
|
||||
}
|
||||
|
||||
MarkdownEditor.prototype.initPreview = function() {
|
||||
$('pre', this.$preview).addClass('prettyprint')
|
||||
prettyPrint()
|
||||
}
|
||||
|
||||
//
|
||||
// Loader
|
||||
//
|
||||
|
||||
MarkdownEditor.prototype.createIndicator = function() {
|
||||
this.$indicator = $('<div class="editor-preview-loader"></div>')
|
||||
this.$el.prepend(this.$indicator)
|
||||
this.$indicator.css('display', 'none')
|
||||
}
|
||||
|
||||
MarkdownEditor.prototype.showIndicator = function() {
|
||||
this.$indicator.css('display', 'block')
|
||||
}
|
||||
|
||||
MarkdownEditor.prototype.hideIndicator = function() {
|
||||
this.$indicator.css('display', 'none')
|
||||
}
|
||||
|
||||
//
|
||||
// View mode
|
||||
//
|
||||
|
||||
MarkdownEditor.prototype.setViewMode = function(value) {
|
||||
this.isSplitMode = value == 'split'
|
||||
|
||||
$('[data-button-code="preview"]', this.$toolbar).toggle(!this.isSplitMode)
|
||||
|
||||
this.$el
|
||||
.removeClass('mode-tab mode-split')
|
||||
.addClass('mode-' + value)
|
||||
|
||||
if (this.isSplitMode) {
|
||||
this.updatePreview()
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Full screen
|
||||
//
|
||||
|
||||
MarkdownEditor.prototype.setFullscreen = function(value) {
|
||||
this.isFullscreen = value
|
||||
this.$el.toggleClass('is-fullscreen', value)
|
||||
|
||||
if (value) {
|
||||
$('body, html').css('overflow', 'hidden')
|
||||
this.updateFullscreen()
|
||||
this.setViewMode('split')
|
||||
$(window).on('resize', this.proxy(this.updateFullscreen))
|
||||
}
|
||||
else {
|
||||
this.setViewMode(this.options.viewMode)
|
||||
|
||||
this.$preview.css('height', '')
|
||||
this.$write.css('height', '')
|
||||
$('body, html').css('overflow', '')
|
||||
|
||||
$(window).off('resize', this.proxy(this.updateFullscreen))
|
||||
this.editor.resize()
|
||||
}
|
||||
|
||||
$(window).trigger('oc.updateUi')
|
||||
}
|
||||
|
||||
MarkdownEditor.prototype.updateFullscreen = function() {
|
||||
if (!this.isFullscreen) return
|
||||
|
||||
var fullscreenCss = {
|
||||
height: $(document).height() - this.$toolbar.outerHeight()
|
||||
}
|
||||
|
||||
this.$preview.css(fullscreenCss)
|
||||
this.$write.css(fullscreenCss)
|
||||
this.editor.resize()
|
||||
}
|
||||
|
||||
//
|
||||
// Media Manager
|
||||
//
|
||||
|
||||
MarkdownEditor.prototype.launchMediaManager = function(onSuccess) {
|
||||
var self = this
|
||||
|
||||
new $.oc.mediaManager.popup({
|
||||
alias: 'ocmediamanager',
|
||||
cropAndInsertButton: true,
|
||||
onInsert: function(items) {
|
||||
if (!items.length) {
|
||||
alert('Please select image(s) to insert.')
|
||||
return
|
||||
}
|
||||
|
||||
if (items.length > 1) {
|
||||
alert('Please select a single item.')
|
||||
return
|
||||
}
|
||||
|
||||
var path, publicUrl
|
||||
for (var i=0, len=items.length; i<len; i++) {
|
||||
path = items[i].path
|
||||
publicUrl = items[i].publicUrl
|
||||
}
|
||||
|
||||
onSuccess(publicUrl)
|
||||
|
||||
this.hide()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//
|
||||
// Button actions
|
||||
//
|
||||
|
||||
MarkdownEditor.prototype.toggleFullscreen = function() {
|
||||
this.setFullscreen(!this.isFullscreen)
|
||||
if (this.isPreview) {
|
||||
this.togglePreview()
|
||||
}
|
||||
|
||||
this.editor.focus()
|
||||
$('[data-button-code="fullscreen"]', this.$toolbar).toggleClass('active')
|
||||
}
|
||||
|
||||
MarkdownEditor.prototype.togglePreview = function() {
|
||||
this.isPreview = !this.isPreview
|
||||
|
||||
if (this.isPreview) {
|
||||
this.updatePreview()
|
||||
}
|
||||
else {
|
||||
this.editor.focus()
|
||||
}
|
||||
|
||||
this.$el.toggleClass('is-preview', this.isPreview)
|
||||
$('.btn', this.$buttons).prop('disabled', this.isPreview)
|
||||
|
||||
$('[data-button-code="preview"]', this.$toolbar).toggleClass('active')
|
||||
}
|
||||
|
||||
MarkdownEditor.prototype.insertLine = function(template) {
|
||||
var editor = this.editor,
|
||||
pos = this.editor.getCursorPosition()
|
||||
|
||||
if (pos.column == 0) {
|
||||
editor.selection.clearSelection()
|
||||
}
|
||||
else {
|
||||
editor.navigateTo(editor.getSelectionRange().start.row, Number.MAX_VALUE)
|
||||
}
|
||||
|
||||
editor.insert(template)
|
||||
editor.focus()
|
||||
}
|
||||
|
||||
MarkdownEditor.prototype.formatInline = function(template) {
|
||||
var editor = this.editor,
|
||||
pos = this.editor.getCursorPosition(),
|
||||
text = editor.session.getTextRange(editor.selection.getRange()).trim()
|
||||
|
||||
if (!text.length) {
|
||||
editor.selection.selectWord()
|
||||
text = editor.session.getTextRange(editor.selection.getRange()).trim()
|
||||
}
|
||||
|
||||
editor.insert(template.replace('$1', text))
|
||||
editor.moveCursorToPosition(pos)
|
||||
|
||||
if (template.indexOf('$1') != -1) {
|
||||
editor.navigateRight(template.indexOf('$1'))
|
||||
}
|
||||
|
||||
editor.focus()
|
||||
}
|
||||
|
||||
MarkdownEditor.prototype.formatBlock = function(template) {
|
||||
var editor = this.editor,
|
||||
pos = this.editor.getCursorPosition(),
|
||||
text = editor.session.getTextRange(editor.selection.getRange()).trim()
|
||||
|
||||
if (!text.length) {
|
||||
editor.navigateTo(editor.getSelectionRange().start.row, 0)
|
||||
editor.selection.selectLineEnd()
|
||||
text = editor.session.getTextRange(editor.selection.getRange()).trim()
|
||||
}
|
||||
else {
|
||||
editor.insert('\n')
|
||||
}
|
||||
|
||||
editor.insert(template.replace('$1', text))
|
||||
editor.moveCursorToPosition(pos)
|
||||
|
||||
if (template.indexOf('$1') != -1) {
|
||||
editor.navigateRight(template.indexOf('$1'))
|
||||
}
|
||||
|
||||
editor.focus()
|
||||
}
|
||||
|
||||
MarkdownEditor.prototype.formatBlockMulti = function(template) {
|
||||
var editor = this.editor,
|
||||
pos = this.editor.getCursorPosition(),
|
||||
text = editor.session.getTextRange(editor.selection.getRange()).trim()
|
||||
|
||||
if (!text.length) {
|
||||
editor.navigateTo(editor.getSelectionRange().start.row, 0)
|
||||
editor.selection.selectLineEnd()
|
||||
}
|
||||
|
||||
var range = editor.selection.getRange()
|
||||
for (var i = range.start.row + 1; i < range.end.row + 2; i++) {
|
||||
editor.gotoLine(i);
|
||||
editor.insert(template.replace('$1', ''));
|
||||
}
|
||||
|
||||
editor.moveCursorToPosition(pos)
|
||||
editor.focus()
|
||||
}
|
||||
|
||||
MarkdownEditor.prototype.formatMediaManager = function(template) {
|
||||
var self = this,
|
||||
editor = this.editor,
|
||||
pos = this.editor.getCursorPosition(),
|
||||
text = editor.session.getTextRange(editor.selection.getRange()).trim()
|
||||
|
||||
if (!text.length) {
|
||||
editor.selection.selectWord()
|
||||
text = editor.session.getTextRange(editor.selection.getRange()).trim()
|
||||
}
|
||||
|
||||
this.launchMediaManager(function(path) {
|
||||
editor.insert(template.replace('$1', text).replace('$2', path));
|
||||
editor.moveCursorToPosition(pos)
|
||||
editor.focus()
|
||||
|
||||
if (!text.length && template.indexOf('$1') != -1) {
|
||||
editor.navigateRight(template.indexOf('$1'))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
MarkdownEditor.DEFAULTS = {
|
||||
vendorPath: '/',
|
||||
refreshHandler: null,
|
||||
buttons: ['formatting', 'bold', 'italic', 'unorderedlist', 'orderedlist', 'link', 'horizontalrule'],
|
||||
viewMode: 'tab'
|
||||
}
|
||||
|
||||
// PLUGIN DEFINITION
|
||||
// ============================
|
||||
|
||||
var old = $.fn.markdownEditor
|
||||
|
||||
$.fn.markdownEditor = function (option) {
|
||||
var args = arguments;
|
||||
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
var data = $this.data('oc.markdownEditor')
|
||||
var options = $.extend({}, MarkdownEditor.DEFAULTS, $this.data(), typeof option == 'object' && option)
|
||||
if (!data) $this.data('oc.markdownEditor', (data = new MarkdownEditor(this, options)))
|
||||
if (typeof option == 'string') data[option].apply(data, args)
|
||||
})
|
||||
}
|
||||
|
||||
$.fn.markdownEditor.Constructor = MarkdownEditor
|
||||
|
||||
$.fn.markdownEditor.noConflict = function () {
|
||||
$.fn.markdownEditor = old
|
||||
return this
|
||||
}
|
||||
|
||||
$(document).render(function (){
|
||||
$('[data-control="markdowneditor"]').markdownEditor()
|
||||
})
|
||||
|
||||
// BUTTON DEFINITIONS
|
||||
// =================
|
||||
|
||||
if ($.oc === undefined)
|
||||
$.oc = {}
|
||||
|
||||
$.oc.markdownEditorButtons = {
|
||||
|
||||
formatting: {
|
||||
label: 'markdowneditor.formatting',
|
||||
icon: 'formatting',
|
||||
dropdown: {
|
||||
quote: {
|
||||
label: 'markdowneditor.quote',
|
||||
cssClass: 'oc-button oc-icon-quote-right',
|
||||
action: 'formatBlockMulti',
|
||||
template: '> $1'
|
||||
},
|
||||
code: {
|
||||
label: 'markdowneditor.code',
|
||||
cssClass: 'oc-button oc-icon-code',
|
||||
action: 'formatBlock',
|
||||
template: '\n```\n$1\n```\n'
|
||||
},
|
||||
header1: {
|
||||
label: 'markdowneditor.header1',
|
||||
cssClass: 'oc-button oc-icon-header',
|
||||
action: 'formatBlock',
|
||||
template: '# $1'
|
||||
},
|
||||
header2: {
|
||||
label: 'markdowneditor.header2',
|
||||
cssClass: 'oc-button oc-icon-header',
|
||||
action: 'formatBlock',
|
||||
template: '## $1'
|
||||
},
|
||||
header3: {
|
||||
label: 'markdowneditor.header3',
|
||||
cssClass: 'oc-button oc-icon-header',
|
||||
action: 'formatBlock',
|
||||
template: '### $1'
|
||||
},
|
||||
header4: {
|
||||
label: 'markdowneditor.header4',
|
||||
cssClass: 'oc-button oc-icon-header',
|
||||
action: 'formatBlock',
|
||||
template: '#### $1'
|
||||
},
|
||||
header5: {
|
||||
label: 'markdowneditor.header5',
|
||||
cssClass: 'oc-button oc-icon-header',
|
||||
action: 'formatBlock',
|
||||
template: '##### $1'
|
||||
},
|
||||
header6: {
|
||||
label: 'markdowneditor.header6',
|
||||
cssClass: 'oc-button oc-icon-header',
|
||||
action: 'formatBlock',
|
||||
template: '###### $1'
|
||||
}
|
||||
}
|
||||
},
|
||||
bold: {
|
||||
label: 'markdowneditor.bold',
|
||||
icon: 'bold',
|
||||
action: 'formatInline',
|
||||
template: '**$1**'
|
||||
},
|
||||
italic: {
|
||||
label: 'markdowneditor.italic',
|
||||
icon: 'italic',
|
||||
action: 'formatInline',
|
||||
template: '*$1*'
|
||||
},
|
||||
unorderedlist: {
|
||||
label: 'markdowneditor.unorderedlist',
|
||||
icon: 'unorderedlist',
|
||||
action: 'formatBlockMulti',
|
||||
template: '* $1'
|
||||
},
|
||||
orderedlist: {
|
||||
label: 'markdowneditor.orderedlist',
|
||||
icon: 'orderedlist',
|
||||
action: 'formatBlockMulti',
|
||||
template: '1. $1'
|
||||
},
|
||||
link: {
|
||||
label: 'markdowneditor.link',
|
||||
icon: 'link',
|
||||
action: 'formatInline',
|
||||
template: '[$1](http://)'
|
||||
},
|
||||
image: {
|
||||
label: 'markdowneditor.image',
|
||||
icon: 'image',
|
||||
action: 'formatInline',
|
||||
template: ''
|
||||
},
|
||||
horizontalrule: {
|
||||
label: 'markdowneditor.horizontalrule',
|
||||
icon: 'horizontalrule',
|
||||
action: 'insertLine',
|
||||
template: '\n\n---\n'
|
||||
},
|
||||
medialink: {
|
||||
label: 'mediamanager.insert_link',
|
||||
cssClass: 'oc-autumn-button oc-icon-link',
|
||||
action: 'formatMediaManager',
|
||||
template: '[$1]($2)'
|
||||
},
|
||||
mediaimage: {
|
||||
label: 'mediamanager.insert_image',
|
||||
cssClass: 'oc-autumn-button oc-icon-image',
|
||||
action: 'formatMediaManager',
|
||||
template: ''
|
||||
},
|
||||
fullscreen: {
|
||||
label: 'markdowneditor.fullscreen',
|
||||
icon: 'fullscreen',
|
||||
action: 'toggleFullscreen',
|
||||
fixed: true
|
||||
},
|
||||
preview: {
|
||||
label: 'markdowneditor.preview',
|
||||
cssClass: 'oc-button oc-icon-eye',
|
||||
action: 'togglePreview',
|
||||
fixed: true
|
||||
}
|
||||
}
|
||||
|
||||
}(window.jQuery);
|
||||
|
|
@ -0,0 +1,225 @@
|
|||
@import "../../../../assets/less/core/boot.less";
|
||||
|
||||
@markdowneditor-zindex: 600;
|
||||
|
||||
@color-markdowneditor-toolbar: #dddddd;
|
||||
@color-markdowneditor-toolbar-btn-color: #404040;
|
||||
@color-markdowneditor-toolbar-btn-bg-hover: #999999;
|
||||
@color-markdowneditor-toolbar-btn-bg-active: #404040;
|
||||
@color-markdowneditor-toolbar-btn-color-hover: #ffffff;
|
||||
|
||||
.field-markdowneditor {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
border: 1px solid @color-form-field-border;
|
||||
background: #fff;
|
||||
textarea { .opacity(0); }
|
||||
.transition(@input-transition);
|
||||
|
||||
.border-radius(5px);
|
||||
.editor-toolbar {
|
||||
.border-top-radius(5px);
|
||||
}
|
||||
|
||||
&.editor-focus { border: 1px solid @color-form-field-border-focus; }
|
||||
|
||||
&.size-tiny {
|
||||
.editor-write { min-height: @size-tiny; }
|
||||
.editor-preview { height: @size-tiny; }
|
||||
}
|
||||
&.size-small {
|
||||
.editor-write { min-height: @size-small; }
|
||||
.editor-preview { height: @size-small; }
|
||||
}
|
||||
&.size-large {
|
||||
.editor-write { min-height: @size-large; }
|
||||
.editor-preview { height: @size-large; }
|
||||
}
|
||||
&.size-huge {
|
||||
.editor-write { min-height: @size-huge; }
|
||||
.editor-preview { height: @size-huge; }
|
||||
}
|
||||
&.size-giant {
|
||||
.editor-write { min-height: @size-giant; }
|
||||
.editor-preview { height: @size-giant; }
|
||||
}
|
||||
|
||||
//
|
||||
// Code
|
||||
//
|
||||
|
||||
.editor-write {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
//
|
||||
// Preview
|
||||
//
|
||||
|
||||
.editor-preview {
|
||||
padding: 15px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.editor-preview-loader {
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 10px;
|
||||
margin-top: 40px; // Toolbar height
|
||||
background-image:url('../../../../../system/assets/ui/images/loader-transparent.svg');
|
||||
background-size: 20px 20px;
|
||||
background-position: 50% 50%;
|
||||
.animation(spin 1s linear infinite);
|
||||
}
|
||||
|
||||
//
|
||||
// Mode: Tab
|
||||
//
|
||||
|
||||
&.mode-tab {
|
||||
|
||||
.editor-preview {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&.is-preview {
|
||||
.editor-write { display: none; }
|
||||
.editor-preview { display: block; }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
// Mode: Split
|
||||
//
|
||||
|
||||
&.mode-split {
|
||||
.editor-preview {
|
||||
float: right;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.editor-write {
|
||||
float: left;
|
||||
width: 50%;
|
||||
|
||||
.editor-code {
|
||||
border-right: 2px solid #808C8D;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Stretch
|
||||
&.stretch {
|
||||
&, .editor-toolbar {
|
||||
border-radius: 0 !important;
|
||||
}
|
||||
|
||||
.editor-toolbar {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.editor-write,
|
||||
.editor-preview {
|
||||
float: none;
|
||||
height: auto;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
.editor-write {
|
||||
left: 0;
|
||||
right: auto;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Full screen
|
||||
//
|
||||
|
||||
&.is-fullscreen {
|
||||
z-index: 1020;
|
||||
position: fixed !important;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
|
||||
&, .editor-toolbar {
|
||||
border-radius: 0 !important;
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Default theme
|
||||
|
||||
.field-markdowneditor .editor-preview {
|
||||
color: #515c5d;
|
||||
font-family: "Helvetica", sans-serif;
|
||||
line-height: 180%;
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
margin-top: 20px;
|
||||
font-weight: bold;
|
||||
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
*:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
p, ol, ul {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6, p, ol, ul {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
pre.prettyprint {
|
||||
border-width: 0;
|
||||
padding: 13px 16px;
|
||||
.border-radius(3px);
|
||||
line-height: 130%;
|
||||
}
|
||||
|
||||
img {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
|
||||
<?php if ($this->previewMode): ?>
|
||||
<div class="form-control"><?= e($value) ?></div>
|
||||
<?php else: ?>
|
||||
<div
|
||||
id="<?= $this->getId() ?>"
|
||||
class="field-markdowneditor size-<?= $size ?> <?= $stretch?'layout-relative stretch':'' ?>"
|
||||
data-control="markdowneditor"
|
||||
data-refresh-handler="<?= $this->getEventHandler('onRefresh') ?>"
|
||||
data-view-mode="<?= $mode ?>"
|
||||
data-vendor-path="<?= URL::asset('/modules/backend/formwidgets/codeeditor/assets/vendor/ace') ?>">
|
||||
|
||||
<div class="layout control-toolbar editor-toolbar"></div>
|
||||
|
||||
|
||||
<div class="editor-write layout-cell">
|
||||
<textarea name="<?= $name ?>" id="<?= $this->getId('textarea') ?>"><?= e($value) ?></textarea>
|
||||
</div>
|
||||
|
||||
<div class="editor-preview layout-cell"></div>
|
||||
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
|
@ -1,213 +0,0 @@
|
|||
figure {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
figure {
|
||||
position: relative;
|
||||
}
|
||||
figcaption {
|
||||
text-align: center;
|
||||
line-height: 24px;
|
||||
font-size: 16px;
|
||||
}
|
||||
figure[data-type=table] {
|
||||
clear: both;
|
||||
}
|
||||
figure[data-type=video] {
|
||||
position: relative;
|
||||
margin-bottom: 24px;
|
||||
text-align: center;
|
||||
clear: both;
|
||||
}
|
||||
figure[data-type=video] p {
|
||||
margin: 0;
|
||||
}
|
||||
figure[data-type=video].oc-figure-full p {
|
||||
position: relative;
|
||||
padding-bottom: 51%;
|
||||
width: 100%;
|
||||
height: 0;
|
||||
}
|
||||
figure[data-type=video].oc-figure-full iframe {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
figure[data-type=image] {
|
||||
position: relative;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
figure[data-type=image] img {
|
||||
width: 100%;
|
||||
}
|
||||
figure[data-type=image].oc-figure-large {
|
||||
width: 100%;
|
||||
clear: both;
|
||||
}
|
||||
figure[data-type=image].oc-figure-medium {
|
||||
width: 50%;
|
||||
}
|
||||
figure[data-type=image].oc-figure-small {
|
||||
width: 33%;
|
||||
}
|
||||
figure[data-type=quote] {
|
||||
font-family: "Georgia", serif;
|
||||
margin-bottom: 24px;
|
||||
margin-left: 24px;
|
||||
font-style: italic;
|
||||
position: relative;
|
||||
border-left: solid 5px #404040;
|
||||
padding-left: 24px;
|
||||
}
|
||||
figure[data-type=quote] figcaption {
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
}
|
||||
figure[data-type=quote].oc-figure-medium {
|
||||
font-size: 20px;
|
||||
}
|
||||
figure[data-type=quote].oc-figure-large {
|
||||
font-size: 24px;
|
||||
}
|
||||
figure[data-type=quote].oc-figure-right {
|
||||
width: 33%;
|
||||
}
|
||||
figure[data-type=quote].oc-figure-left {
|
||||
width: 33%;
|
||||
border-left: none;
|
||||
border-right: solid 5px #404040;
|
||||
padding-left: 0;
|
||||
padding-right: 24px;
|
||||
margin-left: 0;
|
||||
margin-right: 24px;
|
||||
}
|
||||
figure[data-type=quote] cite {
|
||||
display: block;
|
||||
text-align: left;
|
||||
font-weight: bold;
|
||||
}
|
||||
figure[data-type=quote] cite:before {
|
||||
content: "\2014\00a0";
|
||||
}
|
||||
.oc-figure-right {
|
||||
float: right;
|
||||
margin-left: 24px;
|
||||
}
|
||||
.oc-figure-right .oc-figure-controls {
|
||||
right: 0;
|
||||
}
|
||||
.oc-figure-left {
|
||||
float: left;
|
||||
margin-right: 24px;
|
||||
}
|
||||
@media screen and (max-width: 480px) {
|
||||
figure[data-type=image] {
|
||||
width: 100% !important;
|
||||
float: none !important;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
figure[data-type=video] iframe {
|
||||
width: 100% !important;
|
||||
height: auto !important;
|
||||
}
|
||||
}
|
||||
.oc-table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
empty-cells: show;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.oc-table caption {
|
||||
color: #000;
|
||||
font: italic 85%/1 arial, sans-serif;
|
||||
padding: 1em 0;
|
||||
text-align: center;
|
||||
}
|
||||
.oc-table td,
|
||||
.oc-table th {
|
||||
font-size: 90%;
|
||||
margin: 0;
|
||||
overflow: visible;
|
||||
padding: 8px;
|
||||
}
|
||||
.oc-table td:first-child,
|
||||
.oc-table th:first-child {
|
||||
border-left-width: 0;
|
||||
}
|
||||
.oc-table thead {
|
||||
color: #000;
|
||||
text-align: left;
|
||||
vertical-align: bottom;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.oc-table thead th {
|
||||
font-weight: bold;
|
||||
border-bottom: solid 2px #dddddd;
|
||||
}
|
||||
.oc-table td {
|
||||
background-color: transparent;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.oc-table td p {
|
||||
line-height: 15px;
|
||||
}
|
||||
.oc-table td p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.oc-table .oc-table-cell-min {
|
||||
width: 1%;
|
||||
padding-right: 0;
|
||||
}
|
||||
.oc-table .oc-table-cell-min input[type=checkbox],
|
||||
.oc-table .oc-table-cell-min input[type=checkbox] {
|
||||
margin: 0;
|
||||
}
|
||||
.oc-table-secondary {
|
||||
color: #333333;
|
||||
font-size: 90%;
|
||||
}
|
||||
.oc-table-tertiary {
|
||||
color: #333333;
|
||||
font-size: 80%;
|
||||
}
|
||||
.oc-table-odd td,
|
||||
.oc-table-striped tr:nth-child(2n-1) td {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
.oc-table-backed {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
.oc-table-bordered-all {
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
.oc-table-bordered-all td {
|
||||
border-bottom: 1px solid #dddddd;
|
||||
border-left: 1px solid #dddddd;
|
||||
}
|
||||
.oc-table-bordered-all tbody > tr:last-child td {
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
.oc-table-bordered {
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
.oc-table-bordered-rows td {
|
||||
border-bottom: 1px solid #dddddd;
|
||||
}
|
||||
.oc-table-bordered-rows tbody > tr:last-child td {
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
.oc-table-horizontal tbody > tr:last-child td {
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
.oc-table-horizontal td,
|
||||
.oc-table-horizontal th {
|
||||
border-width: 0 0 1px 0;
|
||||
border-bottom: 1px solid #dddddd;
|
||||
}
|
||||
.oc-table-horizontal tbody > tr:last-child td {
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -36,6 +36,8 @@ if (!RedactorPlugins) var RedactorPlugins = {};
|
|||
|
||||
var button = this.button.addBefore('link', 'table', this.lang.get('table'));
|
||||
this.button.addDropdown(button, dropdown);
|
||||
|
||||
button.addClass('redactor_btn_table').removeClass('redactor-btn-image')
|
||||
},
|
||||
show: function()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,6 +4,12 @@
|
|||
@richeditor-zindex: 600;
|
||||
@richeditor-gutter: 20px;
|
||||
|
||||
@color-richeditor-toolbar: #dddddd;
|
||||
@color-richeditor-toolbar-btn-color: #404040;
|
||||
@color-richeditor-toolbar-btn-bg-hover: #999999;
|
||||
@color-richeditor-toolbar-btn-bg-active: #404040;
|
||||
@color-richeditor-toolbar-btn-color-hover: #ffffff;
|
||||
|
||||
@import "_figures.less";
|
||||
@import "../vendor/redactor/redactor.less";
|
||||
|
||||
|
|
@ -15,11 +21,13 @@
|
|||
|
||||
.field-richeditor {
|
||||
border: 1px solid @color-form-field-border;
|
||||
.transition(@input-transition);
|
||||
|
||||
&, .redactor-box {
|
||||
.border-radius(5px);
|
||||
}
|
||||
.redactor-toolbar {
|
||||
.border-top-radius(3px);
|
||||
.border-top-radius(5px);
|
||||
}
|
||||
|
||||
&.editor-focus {
|
||||
|
|
@ -64,12 +72,12 @@
|
|||
.box-shadow(none);
|
||||
z-index: 410 !important;
|
||||
|
||||
& li.redactor-btn-right {
|
||||
li.redactor-btn-right {
|
||||
float: right;
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
& li a {
|
||||
li a {
|
||||
color: @color-richeditor-toolbar-btn-color;
|
||||
font-size: 14px;
|
||||
width: 20px;
|
||||
|
|
@ -88,22 +96,20 @@
|
|||
color: @color-richeditor-toolbar-btn-color-hover;
|
||||
}
|
||||
|
||||
// For some reasin the line height for fa- buttons was set to 1
|
||||
// and padding was not matching other buttons. -ab Apr 01 2015
|
||||
&.fa-redactor-btn {
|
||||
padding: 9px 10px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
&.oc-redactor-button i:before {
|
||||
font-size: 16px!important;
|
||||
font-size: 16px !important;
|
||||
}
|
||||
|
||||
&.oc-autumn-button {
|
||||
color: #c03f31;
|
||||
|
||||
&:hover {
|
||||
color: white!important;
|
||||
color: white !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -191,7 +197,7 @@ body .redactor-box-fullscreen {
|
|||
position: relative;
|
||||
cursor: pointer;
|
||||
color: #6c7071;
|
||||
font: 15px @font-family-sans-serif;
|
||||
font: 15px @font-family-base;
|
||||
font-weight: 500;
|
||||
line-height: 150%;
|
||||
.border-radius(3px);
|
||||
|
|
|
|||
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
|
@ -19,6 +19,9 @@ return [
|
|||
'help' => 'Você não tem as permissões necessárias para visualizar esta página.',
|
||||
'cms_link' => 'Retornar à área administrativa',
|
||||
],
|
||||
'invalid_token' => [
|
||||
'label' => 'Token de segurança inválido'
|
||||
]
|
||||
],
|
||||
'partial' => [
|
||||
'not_found_name' => 'O bloco ":name" não foi encontrado.',
|
||||
|
|
@ -86,6 +89,7 @@ return [
|
|||
'password' => 'Senha',
|
||||
'password_confirmation' => 'Confirme a senha',
|
||||
'permissions' => 'Permissões',
|
||||
'account' => 'Conta',
|
||||
'superuser' => 'Super Usuário',
|
||||
'superuser_comment' => 'Marque para liberar o acesso irrestrito para este usuário.',
|
||||
'send_invite' => 'Enviar convite por e-mail',
|
||||
|
|
@ -107,6 +111,7 @@ return [
|
|||
'new' => 'Novo grupo administrador',
|
||||
'delete_confirm' => 'Você realmente deseja excluir este grupo?',
|
||||
'return' => 'Voltar para a lista de grupos',
|
||||
'users_count' => 'Usuários'
|
||||
],
|
||||
'preferences' => [
|
||||
'not_authenticated' => 'Nenhum usuário autenticado para carregar as preferências.',
|
||||
|
|
@ -140,6 +145,12 @@ return [
|
|||
'help' => 'Adicione um título e descrição a este anexo.',
|
||||
'title_label' => 'Título',
|
||||
'description_label' => 'Descrição',
|
||||
'default_prompt' => 'Clique em %s ou arraste um arquivo para cá para enviar',
|
||||
'attachment_url' => 'Anexar URL',
|
||||
'upload_file' => 'Enviar arquivo',
|
||||
'upload_error' => 'Erro ao enviar',
|
||||
'remove_confirm' => 'Você tem certeza?',
|
||||
'remove_file' => 'Remover arquivo'
|
||||
],
|
||||
'form' => [
|
||||
'create_title' => 'Novo :name',
|
||||
|
|
@ -176,11 +187,13 @@ return [
|
|||
'close' => 'Fechar',
|
||||
'confirm' => 'Confirmar',
|
||||
'reload' => 'Recarregar',
|
||||
'complete' => 'Concluído',
|
||||
'ok' => 'Ok',
|
||||
'or' => 'ou',
|
||||
'confirm_tab_close' => 'Tem certeza que deseja fechar essa aba? As alterações que não foram salvas serão perdidas',
|
||||
'behavior_not_ready' => 'O formulário não foi inicializado. Confira se você chamou initForm() no controller.',
|
||||
'preview_no_files_message' => 'Os arquivos não foram carregados',
|
||||
'preview_no_record_message' => 'Nenhum registro selecionado.',
|
||||
'select' => 'Selecionar',
|
||||
'select_all' => 'todos',
|
||||
'select_none' => 'nenhum',
|
||||
|
|
|
|||
|
|
@ -7,12 +7,17 @@
|
|||
<title data-title-template="<?= empty($this->pageTitleTemplate) ? '%s' : e($this->pageTitleTemplate) ?> | <?= e(Backend\Models\BrandSettings::get('app_name')) ?>">
|
||||
<?= e(trans($this->pageTitle)) ?> | <?= e(Backend\Models\BrandSettings::get('app_name')) ?>
|
||||
</title>
|
||||
|
||||
<link href="<?= Backend::skinAsset('assets/css/october.css') ?>?v<?= System\Models\Parameters::get('system::core.build', 1) ?>" rel="stylesheet">
|
||||
<script src="<?= Backend::skinAsset('assets/js/vendor/jquery.min.js') ?>"></script>
|
||||
<script src="<?= URL::asset('modules/system/assets/js/framework.js') ?>"></script>
|
||||
<script src="<?= Backend::skinAsset('assets/js/october-min.js') ?>?v<?= System\Models\Parameters::get('system::core.build', 1) ?>"></script>
|
||||
<?php
|
||||
$coreBuild = System\Models\Parameters::get('system::core.build', 1);
|
||||
?>
|
||||
<link href="<?= URL::asset('modules/system/assets/ui/storm.css') ?>?v<?= $coreBuild ?>" rel="stylesheet">
|
||||
<link href="<?= Backend::skinAsset('assets/css/october.css') ?>?v<?= $coreBuild ?>" rel="stylesheet">
|
||||
<script src="<?= Backend::skinAsset('assets/js/vendor/jquery.min.js') ?>?v<?= $coreBuild ?>"></script>
|
||||
<script src="<?= URL::asset('modules/system/assets/js/framework.js') ?>?v<?= $coreBuild ?>"></script>
|
||||
<script src="<?= URL::asset('modules/system/assets/ui/storm-min.js') ?>?v<?= $coreBuild ?>"></script>
|
||||
<script src="<?= Backend::skinAsset('assets/js/october-min.js') ?>?v<?= $coreBuild ?>"></script>
|
||||
<script src="<?= URL::asset('modules/cms/widgets/mediamanager/assets/js/mediamanager-global-min.js') ?>"></script>
|
||||
<script src="<?= URL::asset('modules/system/assets/js/lang/lang.'.App::getLocale().'.js') ?>?v<?= $coreBuild ?>"></script>
|
||||
|
||||
<script src="<?= Backend::skinAsset('assets/js/october.flyout.js') ?>"></script>
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,12 @@ abstract class ImportModel extends Model
|
|||
'firstRowTitles' => true
|
||||
], $options));
|
||||
|
||||
$reader = CsvReader::createFromPath($filePath);
|
||||
$reader = CsvReader::createFromPath($filePath, 'r');
|
||||
|
||||
// Filter out empty rows
|
||||
$reader->addFilter(function(array $row) {
|
||||
return count($row) > 1 || reset($row) !== null;
|
||||
});
|
||||
|
||||
if ($firstRowTitles) {
|
||||
$reader->setOffset(1);
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
outline: none;
|
||||
|
||||
&:hover {
|
||||
color: @color-link;
|
||||
color: @link-color;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -154,9 +154,9 @@
|
|||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
background-color: @color-link;
|
||||
background-color: @link-color;
|
||||
color: white;
|
||||
border: 1px solid @color-link;
|
||||
border: 1px solid @link-color;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -349,7 +349,7 @@
|
|||
}
|
||||
|
||||
&:hover:after {
|
||||
color: @color-link;
|
||||
color: @link-color;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ return [
|
|||
],
|
||||
'settings_menu' => 'Temas',
|
||||
'settings_menu_description' => 'Veja a lista de temas instalados e selecione o tema ativo.',
|
||||
'default_tab' => 'Propriedades',
|
||||
'name_label' => 'Nome',
|
||||
'name_create_placeholder' => 'Nome do novo tema',
|
||||
'author_label' => 'Autor',
|
||||
|
|
@ -38,9 +39,11 @@ return [
|
|||
'dir_name_label' => 'Nome do diretório',
|
||||
'dir_name_create_label' => 'O diretório-alvo de temas',
|
||||
'theme_label' => 'Tema',
|
||||
'theme_title' => 'Temas',
|
||||
'activate_button' => 'Ativar',
|
||||
'active_button' => 'Ativado',
|
||||
'customize_button' => 'Customizar',
|
||||
'customize_theme' => 'Personalizar Tema',
|
||||
'customize_button' => 'Personalizar',
|
||||
'duplicate_button' => 'Duplicar',
|
||||
'duplicate_title' => 'Duplicar tema',
|
||||
'duplicate_theme_success' => 'Tema duplicado com sucesso!',
|
||||
|
|
@ -61,10 +64,10 @@ return [
|
|||
'export_title' => 'Exportar tema',
|
||||
'export_folders_label' => 'Pastas',
|
||||
'export_folders_comment' => 'Por favor selecione as pastas de temas que deseja exportar',
|
||||
'delete_button' => 'Deletar',
|
||||
'delete_confirm' => 'Tem certeza que deseja deletar este tema? Isto não pode ser revertido!',
|
||||
'delete_active_theme_failed' => 'Não é possível deletar o tema ativo, torne outro tema ativo antes.',
|
||||
'delete_theme_success' => 'Tema deletado com sucesso!',
|
||||
'delete_button' => 'Excluir',
|
||||
'delete_confirm' => 'Tem certeza que deseja excluir este tema? Isto não pode ser revertido!',
|
||||
'delete_active_theme_failed' => 'Não é possível excluir o tema ativo, torne outro tema ativo antes.',
|
||||
'delete_theme_success' => 'Tema excluído com sucesso!',
|
||||
'create_title' => 'Criar tema',
|
||||
'create_button' => 'Criar',
|
||||
'create_new_blank_theme' => 'Criar novo tema em branco',
|
||||
|
|
@ -75,6 +78,7 @@ return [
|
|||
'dir_name_invalid' => 'O nome só pode conter letras, números, e os símbolos: _-',
|
||||
'dir_name_taken' => 'Diretório de tema escolhido já existe.',
|
||||
'find_more_themes' => 'Encontrar mais temas.',
|
||||
'saving' => 'Salvando tema...',
|
||||
'return' => 'Retornar à lista de temas',
|
||||
],
|
||||
'maintenance' => [
|
||||
|
|
@ -228,5 +232,70 @@ return [
|
|||
'manage_layouts' => 'Gerenciar layouts',
|
||||
'manage_partials' => 'Gerenciar blocos',
|
||||
'manage_themes' => 'Gerenciar temas',
|
||||
'manage_media' => 'Gerenciar mídias'
|
||||
],
|
||||
'mediafinder' => [
|
||||
'default_prompt' => 'Clique no botão %s para localizar um arquivo de mídia'
|
||||
],
|
||||
'media' => [
|
||||
'invalid_path' => "Caminho especificado inválido: ':path'.",
|
||||
'menu_label' => 'Mídias',
|
||||
'upload' => 'Enviar',
|
||||
'move' => 'Mover',
|
||||
'delete' => 'Excluir',
|
||||
'add_folder' => 'Adicionar pasta',
|
||||
'search' => 'Buscar',
|
||||
'display' => 'Exibir',
|
||||
'filter_everything' => 'Tudo',
|
||||
'filter_images' => 'Imagens',
|
||||
'filter_video' => 'Vídeos',
|
||||
'filter_audio' => 'Áudios',
|
||||
'filter_documents' => 'Documentos',
|
||||
'library' => 'Biblioteca',
|
||||
'folder_size_items' => 'item(s)',
|
||||
'size' => 'Tamanho',
|
||||
'title' => 'Título',
|
||||
'last_modified' => 'Última modificação',
|
||||
'public_url' => 'URL pública',
|
||||
'click_here' => 'Clique aqui',
|
||||
'thumbnail_error' => 'Erro ao gerar a miniatura.',
|
||||
'return_to_parent' => 'Retornar ao diretório anterior',
|
||||
'return_to_parent_label' => 'Vá para ..',
|
||||
'nothing_selected' => 'Nenhum item selecionado.',
|
||||
'multiple_selected' => 'Múltiplos itens selecionados.',
|
||||
'uploading_file_num' => 'Enviando :number arquivo(s)...',
|
||||
'uploading_complete' => 'Envio finalizado',
|
||||
'order_by' => 'Ordenar por',
|
||||
'search' => 'Buscar',
|
||||
'folder' => 'Pasta',
|
||||
'no_files_found' => 'Nenhum arquivo encontrado.',
|
||||
'delete_empty' => 'Por favor, selecione um item para excluir.',
|
||||
'delete_confirm' => 'Você deseja mesmo excluir o(s) arquivo(s) selecionado(s)?',
|
||||
'error_renaming_file' => 'Erro ao renomear o arquivo.',
|
||||
'new_folder_title' => 'Nova pasta',
|
||||
'folder_name' => 'Nome da pasta',
|
||||
'error_creating_folder' => 'Erro ao criar a pasta',
|
||||
'folder_or_file_exist' => 'Uma pasta ou arquivo já existe com o nome especificado.',
|
||||
'move_empty' => 'Por favor, selecione um item para mover.',
|
||||
'move_popup_title' => 'Mover arquivos ou pastas',
|
||||
'move_destination' => 'Pasta destino',
|
||||
'please_select_move_dest' => 'Por favor, selecione a pasta destino.',
|
||||
'move_dest_src_match' => 'Por favor, selecione outra pasta destino.',
|
||||
'empty_library' => 'A biblioteca de mídias está vazia. Envie arquivos ou crie pastas para iniciar.',
|
||||
'insert' => 'Inserir',
|
||||
'crop_and_insert' => 'Cortar & Inserir',
|
||||
'select_single_image' => 'Por favor, selecione uma única imagem.',
|
||||
'selection_not_image' => 'O arquivo selecionado não é uma imagem.',
|
||||
'restore' => 'Desfazer todas as alterações',
|
||||
'resize' => 'Redimensionar...',
|
||||
'selection_mode_normal' => 'Normal',
|
||||
'selection_mode_fixed_ratio' => 'Proporção fixa',
|
||||
'selection_mode_fixed_size' => 'Tamanho fixo',
|
||||
'height' => 'Altura',
|
||||
'width' => 'Largura',
|
||||
'selection_mode' => 'Modo de seleção',
|
||||
'resize_image' => 'Redimensionar imagem',
|
||||
'image_size' => 'Tamanho da imagem:',
|
||||
'selected_size' => 'Selecionado:'
|
||||
]
|
||||
];
|
||||
|
|
|
|||
|
|
@ -2,20 +2,20 @@
|
|||
if(!RedactorPlugins)var RedactorPlugins={};RedactorPlugins.mediamanager=function()
|
||||
{function hideLinkTooltips(){$('.redactor-link-tooltip').remove()}
|
||||
return{init:function()
|
||||
{var buttonInsertLink=this.button.add('mmInsertMediaLink','Insert Media Link');this.button.setAwesome('mmInsertMediaLink','icon-link');buttonInsertLink.addClass('oc-redactor-button oc-autumn-button')
|
||||
this.button.addCallback(buttonInsertLink,this.mediamanager.onInsertLink);var buttonInsertImage=this.button.add('mmInsertImageLink','Insert Media Image');buttonInsertImage.addClass('re-image oc-autumn-button')
|
||||
{var buttonInsertLink=this.button.add('mmInsertMediaLink',$.oc.lang.get('mediamanager.insert_link'));this.button.setAwesome('mmInsertMediaLink','icon-link');buttonInsertLink.addClass('oc-redactor-button oc-autumn-button')
|
||||
this.button.addCallback(buttonInsertLink,this.mediamanager.onInsertLink);var buttonInsertImage=this.button.add('mmInsertImageLink',$.oc.lang.get('mediamanager.insert_image'));buttonInsertImage.addClass('re-image oc-autumn-button')
|
||||
buttonInsertImage.removeClass('redactor-btn-image')
|
||||
this.button.addCallback(buttonInsertImage,this.mediamanager.onInsertImage);var buttonInsertVideo=this.button.add('mmInsertVideoLink','Insert Media Video');buttonInsertVideo.addClass('re-video oc-autumn-button')
|
||||
this.button.addCallback(buttonInsertImage,this.mediamanager.onInsertImage);var buttonInsertVideo=this.button.add('mmInsertVideoLink',$.oc.lang.get('mediamanager.insert_video'));buttonInsertVideo.addClass('re-video oc-autumn-button')
|
||||
buttonInsertVideo.removeClass('redactor-btn-image')
|
||||
this.button.addCallback(buttonInsertVideo,this.mediamanager.onInsertVideo);var buttonInsertAudio=this.button.add('mmInsertAudioLink','Insert Media Audio');this.button.setAwesome('mmInsertAudioLink','icon-volume-up');buttonInsertAudio.addClass('oc-redactor-button oc-autumn-button')
|
||||
this.button.addCallback(buttonInsertVideo,this.mediamanager.onInsertVideo);var buttonInsertAudio=this.button.add('mmInsertAudioLink',$.oc.lang.get('mediamanager.insert_audio'));this.button.setAwesome('mmInsertAudioLink','icon-volume-up');buttonInsertAudio.addClass('oc-redactor-button oc-autumn-button')
|
||||
this.button.addCallback(buttonInsertAudio,this.mediamanager.onInsertAudio);},onInsertLink:function(buttonName)
|
||||
{var that=this
|
||||
hideLinkTooltips()
|
||||
this.selection.save()
|
||||
this.link.getData()
|
||||
new $.oc.mediaManager.popup({alias:'ocmediamanager',cropAndInsertButton:false,onInsert:function(items){if(!items.length){alert('Please select file to insert a links to.')
|
||||
new $.oc.mediaManager.popup({alias:'ocmediamanager',cropAndInsertButton:false,onInsert:function(items){if(!items.length){alert($.oc.lang.get('mediamanager.invalid_file_empty_insert'))
|
||||
return}
|
||||
if(items.length>1){alert('Please select a single file.')
|
||||
if(items.length>1){alert($.oc.lang.get('mediamanager.invalid_file_single_insert'))
|
||||
return}
|
||||
var text=that.link.text,textIsEmpty=$.trim(text)===''
|
||||
for(var i=0,len=items.length;i<len;i++){var text=textIsEmpty?items[i].title:text
|
||||
|
|
|
|||
|
|
@ -14,26 +14,26 @@ RedactorPlugins.mediamanager = function()
|
|||
init: function()
|
||||
{
|
||||
// Insert link button
|
||||
var buttonInsertLink = this.button.add('mmInsertMediaLink', 'Insert Media Link');
|
||||
var buttonInsertLink = this.button.add('mmInsertMediaLink', $.oc.lang.get('mediamanager.insert_link'));
|
||||
|
||||
this.button.setAwesome('mmInsertMediaLink', 'icon-link');
|
||||
buttonInsertLink.addClass('oc-redactor-button oc-autumn-button')
|
||||
this.button.addCallback(buttonInsertLink, this.mediamanager.onInsertLink);
|
||||
|
||||
// Insert image button
|
||||
var buttonInsertImage = this.button.add('mmInsertImageLink', 'Insert Media Image');
|
||||
var buttonInsertImage = this.button.add('mmInsertImageLink', $.oc.lang.get('mediamanager.insert_image'));
|
||||
buttonInsertImage.addClass('re-image oc-autumn-button')
|
||||
buttonInsertImage.removeClass('redactor-btn-image')
|
||||
this.button.addCallback(buttonInsertImage, this.mediamanager.onInsertImage);
|
||||
|
||||
// Insert video button
|
||||
var buttonInsertVideo = this.button.add('mmInsertVideoLink', 'Insert Media Video');
|
||||
var buttonInsertVideo = this.button.add('mmInsertVideoLink', $.oc.lang.get('mediamanager.insert_video'));
|
||||
buttonInsertVideo.addClass('re-video oc-autumn-button')
|
||||
buttonInsertVideo.removeClass('redactor-btn-image')
|
||||
this.button.addCallback(buttonInsertVideo, this.mediamanager.onInsertVideo);
|
||||
|
||||
// Insert audio button
|
||||
var buttonInsertAudio = this.button.add('mmInsertAudioLink', 'Insert Media Audio');
|
||||
var buttonInsertAudio = this.button.add('mmInsertAudioLink', $.oc.lang.get('mediamanager.insert_audio'));
|
||||
this.button.setAwesome('mmInsertAudioLink', 'icon-volume-up');
|
||||
buttonInsertAudio.addClass('oc-redactor-button oc-autumn-button')
|
||||
this.button.addCallback(buttonInsertAudio, this.mediamanager.onInsertAudio);
|
||||
|
|
@ -52,12 +52,12 @@ RedactorPlugins.mediamanager = function()
|
|||
cropAndInsertButton: false,
|
||||
onInsert: function(items) {
|
||||
if (!items.length) {
|
||||
alert('Please select file to insert a links to.')
|
||||
alert($.oc.lang.get('mediamanager.invalid_file_empty_insert'))
|
||||
return
|
||||
}
|
||||
|
||||
if (items.length > 1) {
|
||||
alert('Please select a single file.')
|
||||
alert($.oc.lang.get('mediamanager.invalid_file_single_insert'))
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ div[data-control="media-manager"] {
|
|||
display: none;
|
||||
|
||||
&:hover {
|
||||
color: @color-link;
|
||||
color: @link-color;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
|
@ -281,7 +281,7 @@ div[data-control="media-manager"] {
|
|||
}
|
||||
|
||||
p {
|
||||
font-family: @font-family-sans-serif;
|
||||
font-family: @font-family-base;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -465,7 +465,7 @@ div[data-control="media-manager"] {
|
|||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
color: @color-link;
|
||||
color: @link-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ use Event;
|
|||
use Config;
|
||||
use Backend;
|
||||
use Request;
|
||||
use DbDongle;
|
||||
use Validator;
|
||||
use BackendMenu;
|
||||
use BackendAuth;
|
||||
|
|
@ -244,7 +243,7 @@ class ServiceProvider extends ModuleServiceProvider
|
|||
protected function registerLogging()
|
||||
{
|
||||
Event::listen('illuminate.log', function ($level, $message, $context) {
|
||||
if (DbDongle::hasDatabase() && !defined('OCTOBER_NO_EVENT_LOGGING')) {
|
||||
if (EventLog::useLogging()) {
|
||||
EventLog::add($message, $level);
|
||||
}
|
||||
});
|
||||
|
|
@ -448,6 +447,8 @@ class ServiceProvider extends ModuleServiceProvider
|
|||
*/
|
||||
CombineAssets::registerCallback(function($combiner) {
|
||||
$combiner->registerBundle('~/modules/system/assets/less/styles.less');
|
||||
$combiner->registerBundle('~/modules/system/assets/ui/storm.less');
|
||||
$combiner->registerBundle('~/modules/system/assets/ui/storm.js');
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,8 +43,8 @@ html{font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}
|
|||
body{font-family:'Open Sans',Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333333;background-color:#f9f9f9}
|
||||
input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}
|
||||
button,input,select[multiple],textarea{background-image:none}
|
||||
a{color:#428bca;text-decoration:none}
|
||||
a:hover,a:focus{color:#2a6496;text-decoration:underline}
|
||||
a{color:#0181b9;text-decoration:none}
|
||||
a:hover,a:focus{color:#001721;text-decoration:underline}
|
||||
a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}
|
||||
img{vertical-align:middle}
|
||||
.img-responsive{display:block;max-width:100%;height:auto}
|
||||
|
|
@ -365,8 +365,8 @@ cite{font-style:normal}
|
|||
.text-center{text-align:center}
|
||||
.text-justify{text-align:justify}
|
||||
.text-muted{color:#999999}
|
||||
.text-primary{color:#428bca}
|
||||
a.text-primary:hover{color:#3071a9}
|
||||
.text-primary{color:#5fb6f5}
|
||||
a.text-primary:hover{color:#2fa0f2}
|
||||
.text-success{color:#3c763d}
|
||||
a.text-success:hover{color:#2b542c}
|
||||
.text-info{color:#31708f}
|
||||
|
|
@ -375,8 +375,8 @@ a.text-info:hover{color:#245269}
|
|||
a.text-warning:hover{color:#66512c}
|
||||
.text-danger{color:#a94442}
|
||||
a.text-danger:hover{color:#843534}
|
||||
.bg-primary{color:#fff;background-color:#428bca}
|
||||
a.bg-primary:hover{background-color:#3071a9}
|
||||
.bg-primary{color:#fff;background-color:#5fb6f5}
|
||||
a.bg-primary:hover{background-color:#2fa0f2}
|
||||
.bg-success{background-color:#dff0d8}
|
||||
a.bg-success:hover{background-color:#c1e2b3}
|
||||
.bg-info{background-color:#d9edf7}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* This file has been compiled from: /modules/system/lang/de/client.php
|
||||
*/
|
||||
if ($.oc === undefined) $.oc = {}
|
||||
if ($.oc.langMessages === undefined) $.oc.langMessages = {}
|
||||
$.oc.langMessages['de'] = $.extend(
|
||||
$.oc.langMessages['de'] || {},
|
||||
{"markdowneditor":{"formatting":"Formatting","quote":"Quote","code":"Code","header1":"Header 1","header2":"Header 2","header3":"Header 3","header4":"Header 4","header5":"Header 5","header6":"Header 6","bold":"Bold","italic":"Italic","unorderedlist":"Unordered List","orderedlist":"Ordered List","image":"Image","link":"Link","horizontalrule":"Insert Horizontal Rule","fullscreen":"Full screen","preview":"Preview"},"mediamanager":{"insert_link":"Insert Media Link","insert_image":"Insert Media Image","insert_video":"Insert Media Video","insert_audio":"Insert Media Audio","invalid_file_empty_insert":"Please select file to insert a links to.","invalid_file_single_insert":"Please select a single file."}}
|
||||
);
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* This file has been compiled from: /modules/system/lang/el/client.php
|
||||
*/
|
||||
if ($.oc === undefined) $.oc = {}
|
||||
if ($.oc.langMessages === undefined) $.oc.langMessages = {}
|
||||
$.oc.langMessages['el'] = $.extend(
|
||||
$.oc.langMessages['el'] || {},
|
||||
{"markdowneditor":{"formatting":"Formatting","quote":"Quote","code":"Code","header1":"Header 1","header2":"Header 2","header3":"Header 3","header4":"Header 4","header5":"Header 5","header6":"Header 6","bold":"Bold","italic":"Italic","unorderedlist":"Unordered List","orderedlist":"Ordered List","image":"Image","link":"Link","horizontalrule":"Insert Horizontal Rule","fullscreen":"Full screen","preview":"Preview"},"mediamanager":{"insert_link":"Insert Media Link","insert_image":"Insert Media Image","insert_video":"Insert Media Video","insert_audio":"Insert Media Audio","invalid_file_empty_insert":"Please select file to insert a links to.","invalid_file_single_insert":"Please select a single file."}}
|
||||
);
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* This file has been compiled from: /modules/system/lang/en/client.php
|
||||
*/
|
||||
if ($.oc === undefined) $.oc = {}
|
||||
if ($.oc.langMessages === undefined) $.oc.langMessages = {}
|
||||
$.oc.langMessages['en'] = $.extend(
|
||||
$.oc.langMessages['en'] || {},
|
||||
{"markdowneditor":{"formatting":"Formatting","quote":"Quote","code":"Code","header1":"Header 1","header2":"Header 2","header3":"Header 3","header4":"Header 4","header5":"Header 5","header6":"Header 6","bold":"Bold","italic":"Italic","unorderedlist":"Unordered List","orderedlist":"Ordered List","image":"Image","link":"Link","horizontalrule":"Insert Horizontal Rule","fullscreen":"Full screen","preview":"Preview"},"mediamanager":{"insert_link":"Insert Media Link","insert_image":"Insert Media Image","insert_video":"Insert Media Video","insert_audio":"Insert Media Audio","invalid_file_empty_insert":"Please select file to insert a links to.","invalid_file_single_insert":"Please select a single file."}}
|
||||
);
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* This file has been compiled from: /modules/system/lang/es-ar/client.php
|
||||
*/
|
||||
if ($.oc === undefined) $.oc = {}
|
||||
if ($.oc.langMessages === undefined) $.oc.langMessages = {}
|
||||
$.oc.langMessages['es-ar'] = $.extend(
|
||||
$.oc.langMessages['es-ar'] || {},
|
||||
{"markdowneditor":{"formatting":"Formatting","quote":"Quote","code":"Code","header1":"Header 1","header2":"Header 2","header3":"Header 3","header4":"Header 4","header5":"Header 5","header6":"Header 6","bold":"Bold","italic":"Italic","unorderedlist":"Unordered List","orderedlist":"Ordered List","image":"Image","link":"Link","horizontalrule":"Insert Horizontal Rule","fullscreen":"Full screen","preview":"Preview"},"mediamanager":{"insert_link":"Insert Media Link","insert_image":"Insert Media Image","insert_video":"Insert Media Video","insert_audio":"Insert Media Audio","invalid_file_empty_insert":"Please select file to insert a links to.","invalid_file_single_insert":"Please select a single file."}}
|
||||
);
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* This file has been compiled from: /modules/system/lang/es/client.php
|
||||
*/
|
||||
if ($.oc === undefined) $.oc = {}
|
||||
if ($.oc.langMessages === undefined) $.oc.langMessages = {}
|
||||
$.oc.langMessages['es'] = $.extend(
|
||||
$.oc.langMessages['es'] || {},
|
||||
{"markdowneditor":{"formatting":"Formatting","quote":"Quote","code":"Code","header1":"Header 1","header2":"Header 2","header3":"Header 3","header4":"Header 4","header5":"Header 5","header6":"Header 6","bold":"Bold","italic":"Italic","unorderedlist":"Unordered List","orderedlist":"Ordered List","image":"Image","link":"Link","horizontalrule":"Insert Horizontal Rule","fullscreen":"Full screen","preview":"Preview"},"mediamanager":{"insert_link":"Insert Media Link","insert_image":"Insert Media Image","insert_video":"Insert Media Video","insert_audio":"Insert Media Audio","invalid_file_empty_insert":"Please select file to insert a links to.","invalid_file_single_insert":"Please select a single file."}}
|
||||
);
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* This file has been compiled from: /modules/system/lang/fa/client.php
|
||||
*/
|
||||
if ($.oc === undefined) $.oc = {}
|
||||
if ($.oc.langMessages === undefined) $.oc.langMessages = {}
|
||||
$.oc.langMessages['fa'] = $.extend(
|
||||
$.oc.langMessages['fa'] || {},
|
||||
{"markdowneditor":{"formatting":"Formatting","quote":"Quote","code":"Code","header1":"Header 1","header2":"Header 2","header3":"Header 3","header4":"Header 4","header5":"Header 5","header6":"Header 6","bold":"Bold","italic":"Italic","unorderedlist":"Unordered List","orderedlist":"Ordered List","image":"Image","link":"Link","horizontalrule":"Insert Horizontal Rule","fullscreen":"Full screen","preview":"Preview"},"mediamanager":{"insert_link":"Insert Media Link","insert_image":"Insert Media Image","insert_video":"Insert Media Video","insert_audio":"Insert Media Audio","invalid_file_empty_insert":"Please select file to insert a links to.","invalid_file_single_insert":"Please select a single file."}}
|
||||
);
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* This file has been compiled from: /modules/system/lang/fr/client.php
|
||||
*/
|
||||
if ($.oc === undefined) $.oc = {}
|
||||
if ($.oc.langMessages === undefined) $.oc.langMessages = {}
|
||||
$.oc.langMessages['fr'] = $.extend(
|
||||
$.oc.langMessages['fr'] || {},
|
||||
{"markdowneditor":{"formatting":"Formatting","quote":"Quote","code":"Code","header1":"Header 1","header2":"Header 2","header3":"Header 3","header4":"Header 4","header5":"Header 5","header6":"Header 6","bold":"Bold","italic":"Italic","unorderedlist":"Unordered List","orderedlist":"Ordered List","image":"Image","link":"Link","horizontalrule":"Insert Horizontal Rule","fullscreen":"Full screen","preview":"Preview"},"mediamanager":{"insert_link":"Insert Media Link","insert_image":"Insert Media Image","insert_video":"Insert Media Video","insert_audio":"Insert Media Audio","invalid_file_empty_insert":"Please select file to insert a links to.","invalid_file_single_insert":"Please select a single file."}}
|
||||
);
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* This file has been compiled from: /modules/system/lang/hu/client.php
|
||||
*/
|
||||
if ($.oc === undefined) $.oc = {}
|
||||
if ($.oc.langMessages === undefined) $.oc.langMessages = {}
|
||||
$.oc.langMessages['hu'] = $.extend(
|
||||
$.oc.langMessages['hu'] || {},
|
||||
{"markdowneditor":{"formatting":"Formatting","quote":"Quote","code":"Code","header1":"Header 1","header2":"Header 2","header3":"Header 3","header4":"Header 4","header5":"Header 5","header6":"Header 6","bold":"Bold","italic":"Italic","unorderedlist":"Unordered List","orderedlist":"Ordered List","image":"Image","link":"Link","horizontalrule":"Insert Horizontal Rule","fullscreen":"Full screen","preview":"Preview"},"mediamanager":{"insert_link":"Insert Media Link","insert_image":"Insert Media Image","insert_video":"Insert Media Video","insert_audio":"Insert Media Audio","invalid_file_empty_insert":"Please select file to insert a links to.","invalid_file_single_insert":"Please select a single file."}}
|
||||
);
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* This file has been compiled from: /modules/system/lang/id/client.php
|
||||
*/
|
||||
if ($.oc === undefined) $.oc = {}
|
||||
if ($.oc.langMessages === undefined) $.oc.langMessages = {}
|
||||
$.oc.langMessages['id'] = $.extend(
|
||||
$.oc.langMessages['id'] || {},
|
||||
{"markdowneditor":{"formatting":"Formatting","quote":"Quote","code":"Code","header1":"Header 1","header2":"Header 2","header3":"Header 3","header4":"Header 4","header5":"Header 5","header6":"Header 6","bold":"Bold","italic":"Italic","unorderedlist":"Unordered List","orderedlist":"Ordered List","image":"Image","link":"Link","horizontalrule":"Insert Horizontal Rule","fullscreen":"Full screen","preview":"Preview"},"mediamanager":{"insert_link":"Insert Media Link","insert_image":"Insert Media Image","insert_video":"Insert Media Video","insert_audio":"Insert Media Audio","invalid_file_empty_insert":"Please select file to insert a links to.","invalid_file_single_insert":"Please select a single file."}}
|
||||
);
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* This file has been compiled from: /modules/system/lang/it/client.php
|
||||
*/
|
||||
if ($.oc === undefined) $.oc = {}
|
||||
if ($.oc.langMessages === undefined) $.oc.langMessages = {}
|
||||
$.oc.langMessages['it'] = $.extend(
|
||||
$.oc.langMessages['it'] || {},
|
||||
{"markdowneditor":{"formatting":"Formatting","quote":"Quote","code":"Code","header1":"Header 1","header2":"Header 2","header3":"Header 3","header4":"Header 4","header5":"Header 5","header6":"Header 6","bold":"Bold","italic":"Italic","unorderedlist":"Unordered List","orderedlist":"Ordered List","image":"Image","link":"Link","horizontalrule":"Insert Horizontal Rule","fullscreen":"Full screen","preview":"Preview"},"mediamanager":{"insert_link":"Insert Media Link","insert_image":"Insert Media Image","insert_video":"Insert Media Video","insert_audio":"Insert Media Audio","invalid_file_empty_insert":"Please select file to insert a links to.","invalid_file_single_insert":"Please select a single file."}}
|
||||
);
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* This file has been compiled from: /modules/system/lang/ja/client.php
|
||||
*/
|
||||
if ($.oc === undefined) $.oc = {}
|
||||
if ($.oc.langMessages === undefined) $.oc.langMessages = {}
|
||||
$.oc.langMessages['ja'] = $.extend(
|
||||
$.oc.langMessages['ja'] || {},
|
||||
{"markdowneditor":{"formatting":"Formatting","quote":"Quote","code":"Code","header1":"Header 1","header2":"Header 2","header3":"Header 3","header4":"Header 4","header5":"Header 5","header6":"Header 6","bold":"Bold","italic":"Italic","unorderedlist":"Unordered List","orderedlist":"Ordered List","image":"Image","link":"Link","horizontalrule":"Insert Horizontal Rule","fullscreen":"Full screen","preview":"Preview"},"mediamanager":{"insert_link":"Insert Media Link","insert_image":"Insert Media Image","insert_video":"Insert Media Video","insert_audio":"Insert Media Audio","invalid_file_empty_insert":"Please select file to insert a links to.","invalid_file_single_insert":"Please select a single file."}}
|
||||
);
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* This file has been compiled from: /modules/system/lang/lv/client.php
|
||||
*/
|
||||
if ($.oc === undefined) $.oc = {}
|
||||
if ($.oc.langMessages === undefined) $.oc.langMessages = {}
|
||||
$.oc.langMessages['lv'] = $.extend(
|
||||
$.oc.langMessages['lv'] || {},
|
||||
{"markdowneditor":{"formatting":"Formatting","quote":"Quote","code":"Code","header1":"Header 1","header2":"Header 2","header3":"Header 3","header4":"Header 4","header5":"Header 5","header6":"Header 6","bold":"Bold","italic":"Italic","unorderedlist":"Unordered List","orderedlist":"Ordered List","image":"Image","link":"Link","horizontalrule":"Insert Horizontal Rule","fullscreen":"Full screen","preview":"Preview"},"mediamanager":{"insert_link":"Insert Media Link","insert_image":"Insert Media Image","insert_video":"Insert Media Video","insert_audio":"Insert Media Audio","invalid_file_empty_insert":"Please select file to insert a links to.","invalid_file_single_insert":"Please select a single file."}}
|
||||
);
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* This file has been compiled from: /modules/system/lang/nb-no/client.php
|
||||
*/
|
||||
if ($.oc === undefined) $.oc = {}
|
||||
if ($.oc.langMessages === undefined) $.oc.langMessages = {}
|
||||
$.oc.langMessages['nb-no'] = $.extend(
|
||||
$.oc.langMessages['nb-no'] || {},
|
||||
{"markdowneditor":{"formatting":"Formatting","quote":"Quote","code":"Code","header1":"Header 1","header2":"Header 2","header3":"Header 3","header4":"Header 4","header5":"Header 5","header6":"Header 6","bold":"Bold","italic":"Italic","unorderedlist":"Unordered List","orderedlist":"Ordered List","image":"Image","link":"Link","horizontalrule":"Insert Horizontal Rule","fullscreen":"Full screen","preview":"Preview"},"mediamanager":{"insert_link":"Insert Media Link","insert_image":"Insert Media Image","insert_video":"Insert Media Video","insert_audio":"Insert Media Audio","invalid_file_empty_insert":"Please select file to insert a links to.","invalid_file_single_insert":"Please select a single file."}}
|
||||
);
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* This file has been compiled from: /modules/system/lang/nl/client.php
|
||||
*/
|
||||
if ($.oc === undefined) $.oc = {}
|
||||
if ($.oc.langMessages === undefined) $.oc.langMessages = {}
|
||||
$.oc.langMessages['nl'] = $.extend(
|
||||
$.oc.langMessages['nl'] || {},
|
||||
{"markdowneditor":{"formatting":"Formatting","quote":"Quote","code":"Code","header1":"Header 1","header2":"Header 2","header3":"Header 3","header4":"Header 4","header5":"Header 5","header6":"Header 6","bold":"Bold","italic":"Italic","unorderedlist":"Unordered List","orderedlist":"Ordered List","image":"Image","link":"Link","horizontalrule":"Insert Horizontal Rule","fullscreen":"Full screen","preview":"Preview"},"mediamanager":{"insert_link":"Insert Media Link","insert_image":"Insert Media Image","insert_video":"Insert Media Video","insert_audio":"Insert Media Audio","invalid_file_empty_insert":"Please select file to insert a links to.","invalid_file_single_insert":"Please select a single file."}}
|
||||
);
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue