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

Added markdown preview for event email feature #88

Merged
merged 2 commits into from Jul 31, 2017

Conversation

Projects
None yet
3 participants
@nikhilgupta1211
Contributor

nikhilgupta1211 commented Jul 27, 2017

Created new.js.erb for the ajax request and preview for the response

Fixes #60

@coveralls

This comment has been minimized.

coveralls commented Jul 27, 2017

Coverage Status

Coverage decreased (-0.2%) to 92.269% when pulling 8523259 on nikhilgupta1211:preview into 25bd8e6 on openSUSE:master.

@nikhilgupta1211

This comment has been minimized.

Contributor

nikhilgupta1211 commented Jul 27, 2017

image

image

@coveralls

This comment has been minimized.

coveralls commented Jul 27, 2017

Coverage Status

Coverage decreased (-0.2%) to 92.269% when pulling 8523259 on nikhilgupta1211:preview into 25bd8e6 on openSUSE:master.

@nikhilgupta1211

This comment has been minimized.

Contributor

nikhilgupta1211 commented Jul 28, 2017

@ChrisBr @bgeuken I have completed the markdown preview feature please have a look at it :)

@coveralls

This comment has been minimized.

coveralls commented Jul 28, 2017

Coverage Status

Coverage decreased (-0.05%) to 92.458% when pulling 6bedbaa on nikhilgupta1211:preview into 25bd8e6 on openSUSE:master.

@coveralls

This comment has been minimized.

coveralls commented Jul 28, 2017

Coverage Status

Coverage decreased (-0.05%) to 92.458% when pulling 6bedbaa on nikhilgupta1211:preview into 25bd8e6 on openSUSE:master.

@coveralls

This comment has been minimized.

coveralls commented Jul 28, 2017

Coverage Status

Coverage decreased (-0.05%) to 92.458% when pulling 6bedbaa on nikhilgupta1211:preview into 25bd8e6 on openSUSE:master.

@@ -1,7 +1,12 @@
class EventEmailsController < InheritedResources::Base
respond_to :html, :js

This comment has been minimized.

@ChrisBr

ChrisBr Jul 28, 2017

Member

Why is that necessary?

This comment has been minimized.

@nikhilgupta1211

nikhilgupta1211 Jul 28, 2017

Contributor

Yes sorry I forgot to remove this

@@ -27,3 +27,17 @@ $("input[type='checkbox']").each ->
$('#state-menu').click (event) ->
event.stopPropagation()
# To limit the ajax call to only when the content of body is changed
flag = true

This comment has been minimized.

@ChrisBr

ChrisBr Jul 28, 2017

Member

Drop it, I don't think this will be an issue and makes the code more complicated

This comment has been minimized.

@nikhilgupta1211
= f.input :body, as: :text, hint: 'This field supports markdown', input_html: {rows: 12}, label: false
#preview.tab-pane{:role => "tabpanel"}
.panel.panel-default
.panel-body#preview_screen
%a{:href => "https://daringfireball.net/projects/markdown/syntax"}

This comment has been minimized.

@ChrisBr

ChrisBr Jul 28, 2017

Member

Hm, doesn't this belong to the #body tab?

This comment has been minimized.

@nikhilgupta1211
= f.input :body, as: :text, hint: 'This field supports markdown', input_html: {rows: 12}, label: false
#preview.tab-pane{:role => "tabpanel"}
.panel.panel-default
.panel-body#preview_screen

This comment has been minimized.

@ChrisBr

ChrisBr Jul 28, 2017

Member

What about adding some "loading" message?

This comment has been minimized.

@nikhilgupta1211

nikhilgupta1211 Jul 28, 2017

Contributor

Adding it.

@nikhilgupta1211

This comment has been minimized.

Contributor

nikhilgupta1211 commented Jul 28, 2017

@ChrisBr I have made the changes :)

@coveralls

This comment has been minimized.

coveralls commented Jul 28, 2017

Coverage Status

Coverage decreased (-0.05%) to 92.453% when pulling be66c55 on nikhilgupta1211:preview into 25bd8e6 on openSUSE:master.

Added markdown preview for event email feature
Added the click event on preview link to send an ajax request and created the preview action

Fixes #60
@coveralls

This comment has been minimized.

coveralls commented Jul 31, 2017

Coverage Status

Coverage increased (+0.009%) to 92.516% when pulling 2b74477 on nikhilgupta1211:preview into d9364af on openSUSE:master.

@coveralls

This comment has been minimized.

coveralls commented Jul 31, 2017

Coverage Status

Coverage increased (+0.009%) to 92.516% when pulling 2b74477 on nikhilgupta1211:preview into d9364af on openSUSE:master.

@coveralls

This comment has been minimized.

coveralls commented Jul 31, 2017

Coverage Status

Coverage increased (+0.009%) to 92.516% when pulling 2b74477 on nikhilgupta1211:preview into d9364af on openSUSE:master.

@@ -27,3 +27,10 @@ $("input[type='checkbox']").each ->
$('#state-menu').click (event) ->
event.stopPropagation()
$('a[href=#preview]').click ->
$("#preview_screen").html("<h3>Loading...</h3>")

This comment has been minimized.

@ChrisBr

ChrisBr Jul 31, 2017

Member

Please add a screenshot

This comment has been minimized.

@nikhilgupta1211
Updated the event emails spec
Changed the fill_in selector of body from label to id because label is removed in the view

Added tests for markdown preview
@coveralls

This comment has been minimized.

coveralls commented Jul 31, 2017

Coverage Status

Coverage increased (+0.009%) to 92.516% when pulling 3807505 on nikhilgupta1211:preview into d9364af on openSUSE:master.

@ChrisBr ChrisBr merged commit bc75e22 into openSUSE:master Jul 31, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.009%) to 92.516%
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment