Skip to content

Commit

Permalink
1001 #279 繼續
Browse files Browse the repository at this point in the history
  • Loading branch information
Pulipuli Chen committed Oct 1, 2019
1 parent d65e526 commit 74bc36e
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
14 changes: 13 additions & 1 deletion dist/footer.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -8745,6 +8745,8 @@ let FieldPostDate = {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _SummerNote_SummerNoteConfig_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SummerNote/SummerNoteConfig.js */ "./src/views/EditorManager/SummerNote/SummerNoteConfig.js");
/* global ConfigHelper, FunctionHelper, DelayExecHelper */



let FieldPostLabels = {
Expand Down Expand Up @@ -8871,7 +8873,7 @@ let FieldPostLabels = {
}

if (doAdd === false) {
return
return false
}

if (labels.trim() !== '') {
Expand All @@ -8897,6 +8899,11 @@ let FieldPostLabels = {
onPostLabelsChange: function (contents) {
let fieldName = 'labels'

console.log(contents)
if (Array.isArray(contents)) {
contents = contents.join(', ')
}

contents = contents.trim()
while (contents.endsWith(' ')) {
contents = contents.slice(0, -6).trim()
Expand Down Expand Up @@ -16618,6 +16625,11 @@ let config = {
//console.log('afterUploadPost')
//console.log(post)

if (typeof(post) !== 'object') {
console.log('This is not a valided post data.')
return false
}

this.postTitle = post.title
this.postLabels = post.labels
this.editURL = post.editURL
Expand Down
2 changes: 1 addition & 1 deletion dist/footer.min.js.map

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion src/views/EditorManager/FieldPostLabels.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* global ConfigHelper, FunctionHelper, DelayExecHelper */

import SummerNoteConfig from './SummerNote/SummerNoteConfig.js'

let FieldPostLabels = {
Expand Down Expand Up @@ -124,7 +126,7 @@ let FieldPostLabels = {
}

if (doAdd === false) {
return
return false
}

if (labels.trim() !== '') {
Expand All @@ -150,6 +152,11 @@ let FieldPostLabels = {
onPostLabelsChange: function (contents) {
let fieldName = 'labels'

console.log(contents)
if (Array.isArray(contents)) {
contents = contents.join(', ')
}

contents = contents.trim()
while (contents.endsWith(' ')) {
contents = contents.slice(0, -6).trim()
Expand Down
5 changes: 5 additions & 0 deletions src/views/PublishManager/PublishManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@ let config = {
//console.log('afterUploadPost')
//console.log(post)

if (typeof(post) !== 'object') {
console.log('This is not a valided post data.')
return false
}

this.postTitle = post.title
this.postLabels = post.labels
this.editURL = post.editURL
Expand Down

0 comments on commit 74bc36e

Please sign in to comment.