Skip to content

Commit

Permalink
Merge pull request #238 from wonknu/2.16.x
Browse files Browse the repository at this point in the history
bug: image doesn't move on drag and drop Fixes #228
  • Loading branch information
gregorybesson committed Oct 12, 2017
2 parents 8f2c811 + cc6663a commit f3869b1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/server/public/abecms/scripts/modules/EditorSave.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,14 @@ export default class EditorSave {
}

setObjByString(this._json.data[obj][index], keyJson, value)

if(input.classList.contains('file-input') && input.getAttribute('data-size')) {
var sizes = input.getAttribute('data-size').split(',')
Array.prototype.forEach.call(sizes, (size) => {
setObjByString(this._json.data[obj][index], `${keyJson}_${size}`, value.replace(/\.(jpg|jpeg|png|gif|svg)/, `_${size}.$1`))
})
}

var emptyObject = 0
for(var prop in this._json.data[obj][index]) {
if(typeof this._json.data[obj][index][prop] !== 'string' || this._json.data[obj][index][prop].trim() !== '') emptyObject++
Expand Down

0 comments on commit f3869b1

Please sign in to comment.