Skip to content
New issue

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

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

Already on GitHub? # to your account

Add new option 'showCommandButtons' #244

Merged
merged 3 commits into from
Sep 12, 2016
Merged

Add new option 'showCommandButtons' #244

merged 3 commits into from
Sep 12, 2016

Conversation

srachner
Copy link
Contributor

I've added a new option which allows deactivating the clear, preview and save buttons in the controls. I need this for a project which already has separate controls for some actions. I also made the preview dialog action accessible, so that all three commands can be triggered from an external script.

Adds a new option to hide the clear, preview and save buttons from the controls.
@kevinchappell
Copy link
Owner

This is a great PR, everything is where is should be and no linting errors, excellent work @srachner .

My only 2 questions are if showCommandButtons could be showActionButtons, and thats only because its referred to as actions and formActions in the jQuery data() and code respectively.

Also maybe showXML should be showData since formBuilder now has JSON support and showData could refer to XML or JSON.

Seriously, fantastic PR.

* Renamed 'showCommandButtons' option to 'showActionButtons'.
* Changed exported action and helper name from 'showXML' to 'showData'.
@@ -1510,6 +1519,7 @@ function formBuilderEventsFn() {
},
sortableControls: false,
stickyControls: false,
showActionButtons: true,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfect

@srachner
Copy link
Contributor Author

Thank you!

You're right about the naming, I've changed it according to your suggestions .

@kevinchappell kevinchappell merged commit 2afc27f into kevinchappell:master Sep 12, 2016
kevinchappell pushed a commit that referenced this pull request Sep 12, 2016
* Add 'showCommandButtons' option.

Adds a new option to hide the clear, preview and save buttons from the controls.

* Add helper for the showXML data dialog and export it as an action.

* Rename newly added option and helper method.

* Renamed 'showCommandButtons' option to 'showActionButtons'.
* Changed exported action and helper name from 'showXML' to 'showData'.
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants