Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IDEA] Revert single language overwrite to master content document #5546

Open
nwijnNobears opened this issue Jan 8, 2020 · 0 comments
Open

[IDEA] Revert single language overwrite to master content document #5546

nwijnNobears opened this issue Jan 8, 2020 · 0 comments

Comments

@nwijnNobears
Copy link

@nwijnNobears nwijnNobears commented Jan 8, 2020

It would be a nice feature if it was possible to revert a single overwrite you made in inherited document.

As use case: A client of ours, made an overwrite on a single image on the page for a special event specific to this language / site. And after this change he also made some textual changes.

A week or so has passed, and the special event has ended. And my client would like to revert back to the original inherited image, but not the textual changes that where made after the image overwrite.

Code example

Added Context menu item to Image.js in AdminModule ext

    menu.add(new Ext.menu.Item({
        text: t('reset_overwrite'),
        iconCls: "pimcore_icon_overwrite",
        handler: function (item) {
            item.parentMenu.destroy();

            this.resetOverwrite();
        }.bind(this)
    }))

And added the following function.

resetOverwrite: function () {
    this.inherited = true;
    this.empty();
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.