Skip to content

Commit

Permalink
Merge pull request #217 from wonknu/fix_drag_drop_block_each
Browse files Browse the repository at this point in the history
fix: drag and drop block w type image and thumb
  • Loading branch information
gregorybesson committed May 12, 2017
2 parents 2a9d656 + 6d2c894 commit dac5605
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/server/public/abecms/scripts/modules/EditorSave.js
Expand Up @@ -101,6 +101,13 @@ export default class EditorSave {
delete this._json.data[obj][index]
if(this._json.data[obj].length == 1) delete this._json.data[obj]
}
else if(typeof input.getAttribute('data-size') !== null && input.getAttribute('data-size') !== null){
var sizes = input.getAttribute('data-size').split(',')
for (var i = 0; i < sizes.length; i++) {
var sizeValue = value.replace(/\.(jpg|jpeg|png|gif|svg)/, '_' + sizes[i] + '.$1');
setObjByString(this._json.data[obj][index], `${keyJson}_${sizes[i]}`, sizeValue)
}
}
} else {
if (input.getAttribute('data-autocomplete') === 'true' || input.getAttribute('data-multiple') === 'multiple') {
var results = input.parentNode.querySelectorAll('.autocomplete-result-wrapper .autocomplete-result')
Expand Down

0 comments on commit dac5605

Please sign in to comment.