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

Allow inplace widget to honor disable_upload setting. #158

Merged
merged 1 commit into from
Sep 6, 2016

Conversation

cdrice
Copy link
Contributor

@cdrice cdrice commented Sep 5, 2016

This is a fixup for PR #126 commits 4faa7e4 - Ability to enable/disable
upload images.

That update provided a 'disable_upload' setting which is then honored
in the iframe widget, but did not include cooresponding updates for the
inplace widget.

This commit includes two changes:

  1. widget_inplace.html: Mirror the if..endif logic from
    widget_iframe_editor.html to prevent defining onImageUpload if
    disable_upload is True.
  2. widgets.SummernoteInplaceWidget.render: Mirror the update to
    views.editor, placing the value of disable_upload in the render context
    for the inplace widget.

This is a fixup for PR lqez#126 commits 4faa7e4 - Ability to enable/disable
upload images.

That update provided a 'disable_upload' setting which is then honored
in the iframe widget, but did not include cooresponding updates for the
inplace widget.

This commit includes two changes:
1. widget_inplace.html: Mirror the if..endif logic from
   widget_iframe_editor.html to prevent defining onImageUpload if
   disable_upload is True.
2. widgets.SummernoteInplaceWidget.render: Mirror the update to
   views.editor, placing the value of disable_upload in the render context
   for the inplace widget.
@codecov-io
Copy link

codecov-io commented Sep 5, 2016

Current coverage is 96.89% (diff: 100%)

Merging #158 into master will not change coverage

@@             master       #158   diff @@
==========================================
  Files            10         10          
  Lines           193        193          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits            187        187          
  Misses            6          6          
  Partials          0          0          

Powered by Codecov. Last update 63d2f2c...a5c6f0d

@lqez lqez merged commit 8eca1c6 into lqez:master Sep 6, 2016
@lqez
Copy link
Owner

lqez commented Sep 6, 2016

Very reasonable. Thanks!

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.

3 participants