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

Made many fields work in group #99

Closed
wants to merge 10 commits into from
Closed

Conversation

askanhesse
Copy link

  • Added full support for wysiwyg fields and init of QTags (group lists)
  • Added full fix for ids, classes and values if an new group row will
    create (prevent first creation bug of selects, radios and checkboxes)
  • Make ShiftRow work for wysiwyg, checkboxes, selects, radios, color
    pickers (untested but should work as before because there is no change: time pickers, datepickers)

cleanRow : Handling for Divs added, Filter for Wysiwyg added, Label

handling changed, wysiwyg handling changed, id and class handling
changed

afterRowInsert : Added handling for init wysiwyg tinymce and qtags,

handling to call tinymce or qtags based on last state or activated mode
(wp global: no wysiwyg)

shiftRows : Added handling for wysiwyg, added handling for radios,

changed handling for selects

initColorPickers : Added reinit handling after color changed

+ Added full support for wysiwyg fields and init of QTags
+ Added full fix for ids, classes and values if an new group row will
create (prevent first creation bug of selects, radios and checkboxes)
+ Make ShiftRow work for wysiwyg, checkboxes, selects, radios, color
pickers (untested: time pickers, datepickers)

#CleanRow : Handling for Divs added, Filter for Wysiwyg added, Label
handling changed, wysiwyg handling changed, id and class handling
changed
#afterRowInsert : Added handling for init wysiwyg tinymce and qtags,
handling to call tinymce or qtags based on last state or activated mode
(wp global: no wysiwyg)
#shiftRows : Added handling for wysiwyg, added handling for radios,
changed handling for selects
#initColorPickers : Added reinit handling after color changed
@askanhesse askanhesse changed the title Make some Group List Fields work Make many fields work in group Nov 27, 2014
@askanhesse askanhesse changed the title Make many fields work in group Made many fields work in group Nov 27, 2014
In last commit I just forgotten to set this back. Now the values will
be saved by creating a new row.
@jtsternberg
Copy link
Member

This looks like a nice addition. Can you please get your branch up-to-date w/ master so I can check it out? Also, would be great if you could give a list of scenarios/field-types you tested this with.

@askanhesse
Copy link
Author

Merge done. I will try to test all in the couple of next days (if you are not faster than me :D).

@jtsternberg
Copy link
Member

@asknaskan I've checked out your branch. You did not run grunt watch while editing the JS file, so there are quite a lot of things to be fixed. Please run grunt and fix all the jshint issues, as well as update your code to match the rest of the files coding style/standards (i.e. use single quotes, inline comments go on a sep. line ABOVE the line to be commented, etc). There are also a few things that won't 'break', but should be updated anyway, like using 'jQuery' where the '$' shorthand is used in the rest of the file.

As it is now, this PR will need a lot of work before I can even begin testing it. If you can update these things, I'll try to start testing.

@askanhesse
Copy link
Author

@jtsternberg The issues are fixed (without one) - sorry; you're right of course; in speed of my project i just forget to use grunt and just try to fix the JS.
I can't successfully fix the Issue of QTags function at the time (cause it can't init with 'new' operator, it don't return something; more: https://core.trac.wordpress.org/ticket/25947). I will try that when im home.

@jtsternberg
Copy link
Member

Still some issues going on.
broken

@askanhesse
Copy link
Author

At the moment I can't reproduce that at our live system. But I will try it again.

But I just see some new bugs (also cause the new features were integrated) by delete an row and add a new again. The editor will not init again. (TinyMce have to know when an editor have to be destroyed) - I just fix it, if I get some free time.

@ptt-homme
Copy link

Hi @asknaskan,

Any chance to see this PR pushed by the end of the week?

I really need WYSIWYG with groups :(

Maybe I can help, just let me know how?

@askanhesse
Copy link
Author

@ptt-homme

I think there will be no way for this week. Im in Holiday's.
Next year I will do the last steps.

Conflicts:
	css/cmb2.css
	js/cmb2.js
	js/cmb2.min.js

Known Bugs:
- Deleting the last Group and create an new again will cause an javascript crash
- Deleting an group is not last will destroy the next new created group
- (there should be an way to unload preloaded tinymce editors in code)
@askanhesse
Copy link
Author

Merged to current upstream.

Known Bugs last in CMB2 I see:

  • Deleting the last Group and create an new again will cause an javascript crash
  • Deleting an group is not last will destroy the next new created group
  • (there should be an way to unload preloaded tinymce editors in code for deleting things)

I will see the next couple of days.

@DevinWalker
Copy link
Contributor

@asknaskan nice pull request. I'm looking forward to this merge also.

@Blindmikey
Copy link

Looking forward to this merge, sounds like it could fix #148

@askanhesse
Copy link
Author

Thanks for the feedback.

Im currently thinking about how to prevent order errors by deleting groups that not at end of row. I will try the next couple of days to find a workable solution (and some time).

@Blindmikey
For issue 148 - I don't know at the moment, I'd never test this szenario, but I think so.

Conflicts:
	js/cmb2.js
	js/cmb2.min.js
@askanhesse
Copy link
Author

Everything "silent merged" as needed.

@askanhesse askanhesse closed this Jan 19, 2016
jtsternberg added a commit that referenced this pull request Aug 1, 2016
Fixes #26, fixes #99, fixes #260, fixes #264, fixes #356,
fixes #431, fixes #462, fixes #657, fixes #693
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

Successfully merging this pull request may close these issues.

5 participants