mirror of
https://github.com/strapi/strapi.git
synced 2025-08-06 07:50:02 +00:00
Merge branch 'master' into patch-1
This commit is contained in:
commit
f729bb39cb
@ -183,6 +183,18 @@ module.exports = {
|
||||
return ctx.badRequest(null, [{ messages: removeModelErrors }]);
|
||||
}
|
||||
|
||||
const pluginStore = strapi.store({
|
||||
environment: '',
|
||||
type: 'plugin',
|
||||
name: 'content-manager'
|
||||
});
|
||||
|
||||
const schema = await pluginStore.get({ key: 'schema' });
|
||||
|
||||
delete schema.layout[model];
|
||||
|
||||
await pluginStore.set({ key: 'schema', value: schema });
|
||||
|
||||
ctx.send({ ok: true });
|
||||
|
||||
strapi.reload();
|
||||
|
@ -84,7 +84,7 @@ module.exports = {
|
||||
newList = newList
|
||||
.delete(attrToRemoveInfos.index);
|
||||
} else {
|
||||
const random = Math.floor(Math.random() * 1000);
|
||||
const random = Math.random().toString(36).substring(7);
|
||||
newList = newList
|
||||
.delete(attrToRemoveInfos.index)
|
||||
.insert(rightBoundIndex, `__col-md-${attrToRemoveInfos.bootstrapCol}__${random}`);
|
||||
@ -97,7 +97,6 @@ module.exports = {
|
||||
newList = reorderList(lastManager, lastManager.getLayout());
|
||||
});
|
||||
|
||||
|
||||
// Delete them from the available fields
|
||||
fieldsToRemove.forEach(field => {
|
||||
_.unset(schema, [...schemaPath, 'editDisplay', 'availableFields', field]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user