Merge remote-tracking branch 'origin/staging' into staging

pull/1/head
David Benqué 3 years ago
commit 968edf396c

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

@ -37,6 +37,31 @@
} }
} }
&.cp-readonly {
.cp-form-creator-inline-add {
display: none;
}
.cp-form-creator-add-full {
display: none !important;
}
.cp-form-edit-buttons-container button {
display: none;
}
.cp-form-edit-save {
display: none;
}
.cp-form-block {
cursor: default !important;
.cp-form-block-drag-handle {
display: none !important;
}
}
}
#cp-toolbar .cp-toolbar-title-readonly {
display: none;
}
#cp-app-form-container { #cp-app-form-container {
display: flex; display: flex;
flex: 1; flex: 1;

@ -2279,7 +2279,7 @@ define([
updateAddInline(); updateAddInline();
if (editable) { if (editable) {
Sortable.create($container[0], { APP.mainSortable = Sortable.create($container[0], {
direction: "vertical", direction: "vertical",
filter: "input, button, .CodeMirror, .cp-form-type-sort", filter: "input, button, .CodeMirror, .cp-form-type-sort",
preventOnFilter: false, preventOnFilter: false,
@ -2334,6 +2334,23 @@ define([
var helpMenu = framework._.sfCommon.createHelpMenu(['text', 'pad']); var helpMenu = framework._.sfCommon.createHelpMenu(['text', 'pad']);
$toolbarContainer.after(helpMenu.menu); $toolbarContainer.after(helpMenu.menu);
var offlineEl = h('div.alert.alert-danger.cp-burn-after-reading', Messages.disconnected);
var oldFilter;
framework.onEditableChange(function (editable) {
if (editable) {
if (APP.mainSortable) { APP.mainSortable.options.filter = oldFilter; }
if (!APP.isEditor) { $(offlineEl).remove(); }
$body.removeClass('cp-readonly');
} else {
if (APP.mainSortable) {
oldFilter = APP.mainSortable.options.filter;
APP.mainSortable.options.filter = function () { return true; };
}
if (!APP.isEditor) { $('.cp-help-container').before(offlineEl); }
$body.addClass('cp-readonly');
}
});
if (!APP.isEditor) { if (!APP.isEditor) {
framework._.toolbar.alone(); framework._.toolbar.alone();
} }

@ -182,7 +182,7 @@ define([
validateKey: keys.secondaryValidateKey, validateKey: keys.secondaryValidateKey,
owners: [myKeys.edPublic], owners: [myKeys.edPublic],
crypto: crypto, crypto: crypto,
// XXX Cache Cache: Utils.Cache
}; };
var results = {}; var results = {};
config.onError = function (info) { config.onError = function (info) {
@ -346,7 +346,7 @@ define([
SFCommonO.start({ SFCommonO.start({
addData: addData, addData: addData,
addRpc: addRpc, addRpc: addRpc,
cache: true, //cache: true,
noDrive: true, noDrive: true,
hash: hash, hash: hash,
href: href, href: href,

Loading…
Cancel
Save