turned off page edit options scroll adjustment, fixed page creation redirect
This commit is contained in:
parent
eae80b0014
commit
3f4089a6d3
7 changed files with 19 additions and 9 deletions
|
@ -79,6 +79,8 @@ export default class Book {
|
|||
switch (task) {
|
||||
case DataEvent.API_PAGE_CREATE:
|
||||
case DataEvent.API_PAGE_WRITE:
|
||||
var layout = 'page';
|
||||
if (body.layout !== 'page') layout = body.layout;
|
||||
var pageWrite =
|
||||
'---\n' +
|
||||
'id: ' +
|
||||
|
@ -94,7 +96,7 @@ export default class Book {
|
|||
body.feature +
|
||||
'\n' +
|
||||
'layout: ' +
|
||||
'page' +
|
||||
layout +
|
||||
'\n' +
|
||||
'tags: ' +
|
||||
body.tags +
|
||||
|
@ -139,8 +141,9 @@ export default class Book {
|
|||
response = {
|
||||
type: DataEvent.PAGE_ADDED,
|
||||
message: 'New Page Created',
|
||||
id: body.page_uuid
|
||||
id: body.uuid
|
||||
};
|
||||
resolve(response);
|
||||
} else {
|
||||
response = {
|
||||
type: DataEvent.PAGE_UPDATED,
|
||||
|
@ -210,8 +213,7 @@ export default class Book {
|
|||
}
|
||||
}
|
||||
tags = _.orderBy(tags, ['tag_name'], ['asc']);
|
||||
settings.saveTags(tags).then(response => {
|
||||
console.log('RESPONSE', response);
|
||||
settings.saveTags(tags).then(() => {
|
||||
render
|
||||
.publishTags(pages)
|
||||
.then(response => {
|
||||
|
|
|
@ -122,6 +122,7 @@ router.get('/edit/:id', function (req, res) {
|
|||
welcome: 'Edit Page',
|
||||
page: page.metadata,
|
||||
date: moment(page.metadata.created).format('YYYY MMM DD'),
|
||||
layout: page.metadata.layout,
|
||||
rawDate: page.metadata.created,
|
||||
content: page.content,
|
||||
feature: page.metadata.feature,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
extends frame
|
||||
block main-content
|
||||
#post-edit-index(data-index=id data-uuid=uuid)
|
||||
#post-edit-index(data-index=id data-uuid=uuid data-layout=layout)
|
||||
#post-edit-index-wrapper
|
||||
//h2 EDIT
|
||||
=post_title
|
||||
|
|
|
@ -26,6 +26,10 @@ export default class PostActions {
|
|||
'uuid',
|
||||
document.getElementById('post-edit-index').getAttribute('data-uuid')
|
||||
);
|
||||
pageInfo.append(
|
||||
'layout',
|
||||
document.getElementById('post-edit-index').getAttribute('data-layout')
|
||||
);
|
||||
pageInfo.append('content', html);
|
||||
pageInfo.append('title', document.getElementById('post_title').value);
|
||||
pageInfo.append(
|
||||
|
|
|
@ -21,12 +21,15 @@ class TextEditor extends EventEmitter {
|
|||
this.url = '';
|
||||
this.setInputs();
|
||||
window.addEventListener('scroll', () => {
|
||||
var fixLimit = this.fixLimit;
|
||||
//var fixLimit = this.fixLimit;
|
||||
/**
|
||||
* edit scroller needs work
|
||||
if (window.pageYOffset >= fixLimit) {
|
||||
document.getElementById('edit-control').style.position = 'fixed';
|
||||
} else {
|
||||
document.getElementById('edit-control').style.position = 'relative';
|
||||
}
|
||||
*/
|
||||
});
|
||||
this.refresh();
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ $black = #32302f;
|
|||
$eventCool = #32cd32
|
||||
$eventLame = #F64747
|
||||
|
||||
$editorPrimary = #bebebe;
|
||||
$editorPrimary = #fde3a7;
|
||||
$editorSecondary = #ffa07a;
|
||||
$editorTertiary = #89c4f4;
|
||||
$editorString = #f6dd74;
|
||||
|
|
Loading…
Reference in a new issue