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