Skip to content

Commit

Permalink
Fix EZP-24369: block names swapped on publish when switching block or…
Browse files Browse the repository at this point in the history
…der.
  • Loading branch information
Joao Inacio committed May 15, 2015
1 parent 6df33f9 commit dd0f9bf
Showing 1 changed file with 9 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -429,19 +429,15 @@ var BlockDDInit = function() {
var data = '',
form = Y.one('#zone-' + BlockDDInit.cfg.zone + '-blocks').ancestor('form');

if ( Y.Global.Autosave && Y.Global.Autosave[form.get('id')] ) {
Y.Global.Autosave[form.get('id')].submit('FlowForceSave=' + (new Date()));
} else {
blocks.each(function(v, k) {
data += 'block_order%5B%5D=' + v.get('id');
data += '&';
});

data += 'contentobject_attribute_id=' + BlockDDInit.cfg.attributeid;
data += '&version=' + BlockDDInit.cfg.version;
data += '&zone=' + BlockDDInit.cfg.zone;
Y.io.ez( 'ezflow::updateblockorder', { on: { success: _callBack }, method: 'POST', data: data } );
}
blocks.each(function(v, k) {
data += 'block_order%5B%5D=' + v.get('id');
data += '&';
});

data += 'contentobject_attribute_id=' + BlockDDInit.cfg.attributeid;
data += '&version=' + BlockDDInit.cfg.version;
data += '&zone=' + BlockDDInit.cfg.zone;
Y.io.ez( 'ezflow::updateblockorder', { on: { success: _callBack }, method: 'POST', data: data } );
}

function updateInputIndex(blocks) {
Expand Down

0 comments on commit dd0f9bf

Please sign in to comment.