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

SimpleHtmlEditorField breaks JavaScript #4

Open
jrast opened this issue Aug 17, 2012 · 1 comment
Open

SimpleHtmlEditorField breaks JavaScript #4

jrast opened this issue Aug 17, 2012 · 1 comment

Comments

@jrast
Copy link
Contributor

jrast commented Aug 17, 2012

If I add a SimpleHtmlEditorField to my Form (with SimpleHtmlEditorField::create('TestField')) the javascript breaks as it tries to load a file from the location http://localhost/undefined.

@jrast
Copy link
Contributor Author

jrast commented Aug 17, 2012

Ok, I have found the part which leads to this problem:
In bootstrap_forms.js Line 14 we want to set the content_css, but in the second part

$t.attr('data-css')

is undefined as I don't set it on the field with

->setCSS('file');

So what is the best solution to only set this if it's not undefined?

jrast added a commit to jrast/silverstripe-bootstrap-forms that referenced this issue Jun 11, 2013
Added a check to see if data-css attribute is set. If not, content_css is set to 'NULL'
unclecheese pushed a commit that referenced this issue Jun 19, 2013
BUGFIX: SimpleHtmlEditorFiled breaks JavaScript (Issue #4)
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