|
|
@ -163,11 +163,10 @@ define([
|
|
|
|
var sortColumns = function (order, firstcol) {
|
|
|
|
var sortColumns = function (order, firstcol) {
|
|
|
|
var colsOrder = order.slice();
|
|
|
|
var colsOrder = order.slice();
|
|
|
|
// Never put at the first position an uncommitted column
|
|
|
|
// Never put at the first position an uncommitted column
|
|
|
|
if (APP.proxy.content.colsOrder.indexOf(firstcol) === -1) { return colsOrder; }
|
|
|
|
var idx = APP.proxy.content.colsOrder.indexOf(firstcol);
|
|
|
|
colsOrder.sort(function (a, b) {
|
|
|
|
if (!firstcol || idx === -1) { return colsOrder; }
|
|
|
|
return (a === firstcol) ? -1 :
|
|
|
|
colsOrder.splice(idx, 1);
|
|
|
|
((b === firstcol) ? 1 : 0);
|
|
|
|
colsOrder.unshift(firstcol);
|
|
|
|
});
|
|
|
|
|
|
|
|
return colsOrder;
|
|
|
|
return colsOrder;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
@ -618,7 +617,6 @@ define([
|
|
|
|
// If readOnly, always put the app in published mode
|
|
|
|
// If readOnly, always put the app in published mode
|
|
|
|
bool = true;
|
|
|
|
bool = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
console.log(bool);
|
|
|
|
|
|
|
|
$(APP.$mediaTagButton).toggle(!bool);
|
|
|
|
$(APP.$mediaTagButton).toggle(!bool);
|
|
|
|
setTablePublished(bool);
|
|
|
|
setTablePublished(bool);
|
|
|
|
/*['textarea'].forEach(function (sel) {
|
|
|
|
/*['textarea'].forEach(function (sel) {
|
|
|
@ -1270,7 +1268,6 @@ define([
|
|
|
|
}).nThen(function (waitFor) {
|
|
|
|
}).nThen(function (waitFor) {
|
|
|
|
common.handleNewFile(waitFor);
|
|
|
|
common.handleNewFile(waitFor);
|
|
|
|
}).nThen(function (/* waitFor */) {
|
|
|
|
}).nThen(function (/* waitFor */) {
|
|
|
|
console.log('here');
|
|
|
|
|
|
|
|
Test.registerInner(common.getSframeChannel());
|
|
|
|
Test.registerInner(common.getSframeChannel());
|
|
|
|
var metadataMgr = common.getMetadataMgr();
|
|
|
|
var metadataMgr = common.getMetadataMgr();
|
|
|
|
APP.locked = APP.readOnly = metadataMgr.getPrivateData().readOnly;
|
|
|
|
APP.locked = APP.readOnly = metadataMgr.getPrivateData().readOnly;
|
|
|
|