Skip to content

Commit

Permalink
Merge branch 'master' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
mrzapp committed Nov 2, 2017
2 parents 2462d94 + 5dee10b commit 0739332
Show file tree
Hide file tree
Showing 14 changed files with 53 additions and 106 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "hashbrown-cms",
"repository": "https://github.com/Putaitu/hashbrown-cms.git",
"version": "0.10.1",
"version": "0.10.2",
"description": "The pluggable CMS",
"main": "hashbrown.js",
"scripts": {
Expand Down
4 changes: 4 additions & 0 deletions public/css/client.css
Original file line number Diff line number Diff line change
Expand Up @@ -1034,6 +1034,8 @@ h1, h2, h3, h4, h5, h6 {
font-family: 'FontAwesome';
content: '\F1C5';
margin-right: 0.5rem; }
.editor__field--rich-text-editor__body {
min-height: 462px; }
.editor__field--rich-text-editor .CodeMirror {
min-height: 462px; }
.editor__field--rich-text-editor .CodeMirror p, .editor__field--rich-text-editor .CodeMirror pre, .editor__field--rich-text-editor .CodeMirror span, .editor__field--rich-text-editor .CodeMirror .cke_editable {
Expand All @@ -1045,6 +1047,8 @@ h1, h2, h3, h4, h5, h6 {
border-radius: 0px;
box-shadow: none;
min-height: 462px; }
.editor__field--rich-text-editor .cke .cke_editable img {
max-width: 20rem; }
.editor__field--rich-text-editor .cke .cke_inner {
border-radius: 0px; }
.editor__field--rich-text-editor .cke .cke_inner .cke_top, .editor__field--rich-text-editor .cke .cke_inner .cke_contents, .editor__field--rich-text-editor .cke .cke_inner .cke_bottom {
Expand Down
81 changes: 19 additions & 62 deletions public/js/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -40775,7 +40775,7 @@ module.exports = ["address", "article", "aside", "blockquote", "canvas", "dd", "
module.exports = {
"name": "hashbrown-cms",
"repository": "https://github.com/Putaitu/hashbrown-cms.git",
"version": "0.10.1",
"version": "0.10.2",
"description": "The pluggable CMS",
"main": "hashbrown.js",
"scripts": {
Expand Down Expand Up @@ -43012,7 +43012,6 @@ module.exports = {
NavbarMain: __webpack_require__(45),
NavbarPane: __webpack_require__(44),
SchemaPane: __webpack_require__(246),
SettingsPane: __webpack_require__(247),
TemplatePane: __webpack_require__(248)
};

Expand Down Expand Up @@ -43224,7 +43223,7 @@ var ConnectionPane = function (_NavbarPane) {

// General context menu
paneContextMenu: {
'General': '---',
'Connections': '---',
'New connection': function NewConnection() {
_this3.onClickNewConnection();
},
Expand Down Expand Up @@ -43783,7 +43782,7 @@ var ContentPane = function (_NavbarPane) {

// Set general context menu items
paneContextMenu: {
'General': '---',
'Content': '---',
'New content': function NewContent() {
_this2.onClickNewContent();
},
Expand Down Expand Up @@ -43994,7 +43993,7 @@ var FormsPane = function (_NavbarPane) {
}
}

menu['Forms'] = '---';
menu['General'] = '---';
menu['New form'] = function () {
_this2.onClickNewForm();
};
Expand Down Expand Up @@ -44389,14 +44388,15 @@ var MediaPane = function (_NavbarPane) {
'Upload new media': function UploadNewMedia() {
_this2.onClickUploadMedia();
},
'General': '---',
'Refresh': function Refresh() {
_this2.onClickRefreshResource('media');
}
},

// General context menu
paneContextMenu: {
'General': '---',
'Media': '---',
'Upload new media': function UploadNewMedia() {
_this2.onClickUploadMedia();
},
Expand Down Expand Up @@ -44605,12 +44605,17 @@ var SchemaPane = function (_NavbarPane) {
}
}

menu['General'] = '---';
menu['Refresh'] = function () {
_this3.onClickRefreshResource('schemas');
};

return menu;
},

// Set general context menu items
paneContextMenu: {
'General': '---',
'Schemas': '---',
'Refresh': function Refresh() {
_this3.onClickRefreshResource('schemas');
}
Expand All @@ -44635,55 +44640,7 @@ var SchemaPane = function (_NavbarPane) {
module.exports = SchemaPane;

/***/ }),
/* 247 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var NavbarPane = __webpack_require__(44);
var NavbarMain = __webpack_require__(45);

/**
* The Settings navbar pane
*
* @memberof HashBrown.Client.Views.Navigation
*/

var SettingsPane = function (_NavbarPane) {
_inherits(SettingsPane, _NavbarPane);

function SettingsPane() {
_classCallCheck(this, SettingsPane);

return _possibleConstructorReturn(this, _NavbarPane.apply(this, arguments));
}

/**
* Init
*/
SettingsPane.init = function init() {
NavbarMain.addTabPane('/settings/', 'Settings', 'wrench', {
items: [{
name: 'Providers',
path: 'providers',
icon: 'gift'
}]
});
};

return SettingsPane;
}(NavbarPane);

module.exports = SettingsPane;

/***/ }),
/* 247 */,
/* 248 */
/***/ (function(module, exports, __webpack_require__) {

Expand Down Expand Up @@ -44954,7 +44911,7 @@ var TemplatePane = function (_NavbarPane) {

// General context menu
paneContextMenu: {
'General': '---',
'Templates': '---',
'Add template': function AddTemplate() {
_this2.onClickAddTemplate();
},
Expand Down Expand Up @@ -47080,7 +47037,7 @@ var RichTextEditor = function (_FieldEditor) {
RichTextEditor.prototype.onClickTab = function onClickTab(source) {
this.silentChange = true;

document.cookie = 'rteview = ' + source;
this.activeView = source;

this.fetch();
};
Expand All @@ -47105,9 +47062,9 @@ var RichTextEditor = function (_FieldEditor) {
html = '<video data-id="' + id + '" alt="' + media.name + '" src="/' + media.url + '">';
}

var source = getCookie('rteview');
var activeView = _this2.activeView || 'wysiwyg';

switch (source) {
switch (activeView) {
case 'wysiwyg':
_this2.wysiwyg.insertHtml(html);
break;
Expand Down Expand Up @@ -47313,7 +47270,7 @@ var RichTextEditor = function (_FieldEditor) {
RichTextEditor.prototype.template = function template() {
var _this6 = this;

var activeView = getCookie('rteview') || 'wysiwyg';
var activeView = this.activeView || 'wysiwyg';

return _.div({ class: 'editor__field__value editor__field--rich-text-editor', title: this.description || '' }, _.div({ class: 'editor__field--rich-text-editor__header' }, _.each({ wysiwyg: 'Visual', markdown: 'Markdown', html: 'HTML' }, function (alias, label) {
return _.button({ class: (activeView === alias ? 'active ' : '') + 'editor__field--rich-text-editor__header__tab' }, label).click(function () {
Expand All @@ -47330,7 +47287,7 @@ var RichTextEditor = function (_FieldEditor) {


RichTextEditor.prototype.postrender = function postrender() {
var activeView = getCookie('rteview') || 'wysiwyg';
var activeView = this.activeView || 'wysiwyg';

switch (activeView) {
case 'html':
Expand Down
2 changes: 1 addition & 1 deletion public/js/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -35949,7 +35949,7 @@ module.exports = ["address", "article", "aside", "blockquote", "canvas", "dd", "
module.exports = {
"name": "hashbrown-cms",
"repository": "https://github.com/Putaitu/hashbrown-cms.git",
"version": "0.10.1",
"version": "0.10.2",
"description": "The pluggable CMS",
"main": "hashbrown.js",
"scripts": {
Expand Down
13 changes: 12 additions & 1 deletion src/Client/Style/Views/Editors/FieldEditors/RichTextEditor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@
}
}

// Body
&__body {
min-height: 462px;
}

// CodeMirror styling
.CodeMirror {
min-height: 462px;
Expand All @@ -90,7 +95,13 @@
border-radius: 0px;
box-shadow: none;
min-height: 462px;


.cke_editable {
img {
max-width: 20rem;
}
}

.cke_inner {
border-radius: 0px;

Expand Down
12 changes: 6 additions & 6 deletions src/Client/Views/Editors/FieldEditors/RichTextEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ class RichTextEditor extends FieldEditor {
onClickTab(source) {
this.silentChange = true;

document.cookie = 'rteview = ' + source;
this.activeView = source;

this.fetch();
}

Expand All @@ -91,9 +91,9 @@ class RichTextEditor extends FieldEditor {
html = '<video data-id="' + id + '" alt="' + media.name + '" src="/' + media.url + '">';
}

let source = getCookie('rteview');
let activeView = this.activeView || 'wysiwyg';

switch(source) {
switch(activeView) {
case 'wysiwyg':
this.wysiwyg.insertHtml(html);
break;
Expand Down Expand Up @@ -297,7 +297,7 @@ class RichTextEditor extends FieldEditor {
* Renders this editor
*/
template() {
let activeView = getCookie('rteview') || 'wysiwyg';
let activeView = this.activeView || 'wysiwyg';

return _.div({class: 'editor__field__value editor__field--rich-text-editor', title: this.description || ''},
_.div({class: 'editor__field--rich-text-editor__header'},
Expand Down Expand Up @@ -333,7 +333,7 @@ class RichTextEditor extends FieldEditor {
* Post render
*/
postrender() {
let activeView = getCookie('rteview') || 'wysiwyg';
let activeView = this.activeView || 'wysiwyg';

switch(activeView) {
case 'html':
Expand Down
2 changes: 1 addition & 1 deletion src/Client/Views/Navigation/ConnectionPane.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class ConnectionPane extends NavbarPane {

// General context menu
paneContextMenu: {
'General': '---',
'Connections': '---',
'New connection': () => { this.onClickNewConnection(); },
'Refresh': () => { this.onClickRefreshResource('connections'); }
}
Expand Down
2 changes: 1 addition & 1 deletion src/Client/Views/Navigation/ContentPane.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ class ContentPane extends NavbarPane {

// Set general context menu items
paneContextMenu: {
'General': '---',
'Content': '---',
'New content': () => { this.onClickNewContent(); },
'Refresh': () => { this.onClickRefreshResource('content'); }
},
Expand Down
2 changes: 1 addition & 1 deletion src/Client/Views/Navigation/FormsPane.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class FormsPane extends NavbarPane {
}
}

menu['Forms'] = '---';
menu['General'] = '---';
menu['New form'] = () => { this.onClickNewForm(); };
menu['Refresh'] = () => { this.onClickRefreshResource('forms'); };

Expand Down
3 changes: 2 additions & 1 deletion src/Client/Views/Navigation/MediaPane.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,13 @@ class MediaPane extends NavbarPane {
dirContextMenu: {
'Directory': '---',
'Upload new media': () => { this.onClickUploadMedia(); },
'General': '---',
'Refresh': () => { this.onClickRefreshResource('media'); }
},

// General context menu
paneContextMenu: {
'General': '---',
'Media': '---',
'Upload new media': () => { this.onClickUploadMedia(); },
'Refresh': () => { this.onClickRefreshResource('media'); }
}
Expand Down
5 changes: 4 additions & 1 deletion src/Client/Views/Navigation/SchemaPane.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,15 @@ class SchemaPane extends NavbarPane {
}
}

menu['General'] = '---';
menu['Refresh'] = () => { this.onClickRefreshResource('schemas'); };

return menu;
},

// Set general context menu items
paneContextMenu: {
'General': '---',
'Schemas': '---',
'Refresh': () => { this.onClickRefreshResource('schemas'); }
},

Expand Down
28 changes: 0 additions & 28 deletions src/Client/Views/Navigation/SettingsPane.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/Client/Views/Navigation/TemplatePane.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class TemplatePane extends NavbarPane {

// General context menu
paneContextMenu: {
'General': '---',
'Templates': '---',
'Add template': () => { this.onClickAddTemplate(); },
'Refresh': () => { this.onClickRefreshResource('templates'); }
}
Expand Down
1 change: 0 additions & 1 deletion src/Client/Views/Navigation/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ module.exports = {
NavbarMain: require('./NavbarMain'),
NavbarPane: require('./NavbarPane'),
SchemaPane: require('./SchemaPane'),
SettingsPane: require('./SettingsPane'),
TemplatePane: require('./TemplatePane')
};

0 comments on commit 0739332

Please sign in to comment.