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

Feature Request / Suggestion - Layout Control Reset (restores defaults) #10

Open
theperfectwill opened this issue May 30, 2018 · 1 comment

Comments

@theperfectwill
Copy link

Hi. So I came up with this, I think would be pretty well. Thoughts?

There is a need for a reset in the panels. I think this could be done in conjunction with the Layout Control Field. And also just a Reset button as mentioned (I think) in the Admin Pages near the "Save" button.

Here is my the idea from in using the Layout Control field. Thoughts?

image

To... upon which clicking the "Reset" icon it would clear all options entered of that layout_control field and load any defaults if any are supplied for that controlled field.

image

@theperfectwill
Copy link
Author

By the way, the implementation of this is PERFECT. I mean the Layout Control option itself. Very VERY savvy.

Also, I would add this myself and do a push, but I haven't played with JS enough yet to really work that. Perhaps if you add it, I will look at the JS then to understand what was really done. JS is on my list of classes to take, skills to add.

So for now, I just hardcoded it in the div itself in layout-control.php under .layout-control__load-reset. The icon class is dashicons-image-rotate.

image

You can see the css as well...

.layout-control__load-reset a.uf-button.button-primary span {
    margin: 6px 0px 0px 0px;
    font-size: 15px;
}

.layout-control__load-reset a.uf-button.button-primary {
    padding: 0px 5px 0px 5px;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant