refinery / refinerycms-page-images

Adds an images tab to your pages so you can format a group of images really nicely on the frontend
104 stars 120 forks source link

Allowing text-only (vs WYSIWYG) captions? #90

Closed jbourassa closed 11 years ago

jbourassa commented 11 years ago

Hi,

Would you be open to enabling a flag that changes the WYM editor to a simple textarea so that a user can only enter plaintext?

I think we will implement this in our fork. If you think that could be interesting for everyone, I could turn this into a configuration and allow both behavior to co-exist.

Thanks!

parndt commented 11 years ago

Yeah, sounds useful to me, thanks :)

jbourassa commented 11 years ago

Here's a first prototype.

It also includes other fixes (the images path and fixing caption feature overall). This is not the best code I have written, but honestly the frontend code for this plugin is very difficult to maintain. I think it's much better than what is was before I jumped in, but still far from pretty.

Also, I couldn't get the test-suite to run. Hopefully that doesn't break anything. Here's the error I got:

`require': cannot load such file -- zip/zip (LoadError)

... long stack trace ...

vendor/extensions/refinerycms-page-images/spec/spec_helper.rb:29:in `block in <top (required)>'

Let me know what you think.

parndt commented 11 years ago

I think Selenium itself is broken, I have been getting that error across a few projects lately.

parndt commented 11 years ago

@jbourassa if you rebase against master I switched the test suite to poltergeist which should work fine.

jbourassa commented 11 years ago

Yay, the tests are passing.

I'll see if I can write some to cover this (albeit minor) change.

parndt commented 11 years ago

I appreciate it :smile:

jbourassa commented 11 years ago

There you go. I am not going to say it's pretty, but it's some tests. It seems that both js and non-js tests do not play that well together.

Hopefully that's good enough!

parndt commented 11 years ago

Seems to test the feature and looks like it'd avoid regressions. I'll wait for the builds on CI :)

parndt commented 11 years ago

Just JRuby being weird, thanks!

jbourassa commented 11 years ago

Wew! Thanks for being so fast.