letter_opener_web 2.0.0.pre.alpha1 → 2.0.0.pre.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -1
- data/app/controllers/letter_opener_web/application_controller.rb +1 -1
- data/app/controllers/letter_opener_web/letters_controller.rb +4 -1
- data/app/views/layouts/letter_opener_web/_javascripts.html.erb +2 -2
- data/app/views/layouts/letter_opener_web/styles/_letters.html.erb +8 -0
- data/app/views/letter_opener_web/letters/_item.html.erb +8 -3
- data/app/views/letter_opener_web/letters/index.html.erb +2 -2
- data/lib/letter_opener_web/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 285be7616fcef875c214cf862ce009bad30562c1de5f0cd7ea65348ef9201233
|
4
|
+
data.tar.gz: ad8acc2f43564626b87a5950debe40700f3f492f29a397fb5f8d88f6ae516747
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7355ec8c5c8ec6dbaa7b459475983a6da804d3f35ca30cdcb15d9b1b206877b2a92af5f0e02adc4850cebd1045c0f9ea57399d45cb883c6d357a3f9cf786cc80
|
7
|
+
data.tar.gz: f001b0b9f78aa875f6130bfb0b7443c3647f2b1edff3fc582d44890cbfafb7e0bdc55aa18ae4da30f8e936a6dda5168922414047b984f266fbbaba3a363bc604
|
data/CHANGELOG.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
- Require Rails >= 5.2, run tests against Rails 6.1 [#113](https://github.com/fgrehm/letter_opener_web/pull/113)
|
4
4
|
- Upgrade to Bootstrap 4.2 [#113](https://github.com/fgrehm/letter_opener_web/pull/113)
|
5
5
|
- Inline CSS and Javascript [#113](https://github.com/fgrehm/letter_opener_web/pull/113)
|
6
|
-
- Add rexml gem into dependency for Ruby 3.0 [#
|
6
|
+
- Add rexml gem into dependency for Ruby 3.0 [#106](https://github.com/fgrehm/letter_opener_web/pull/106)
|
7
7
|
- Add routes for Rails API mode [#69](https://github.com/fgrehm/letter_opener_web/pull/69)
|
8
8
|
- Prevent name conflict with `Letter` class [#108](https://github.com/fgrehm/letter_opener_web/pull/108)
|
9
9
|
- Add Rails' built-in CSRF protection [#111](https://github.com/fgrehm/letter_opener_web/pull/111)
|
@@ -37,7 +37,10 @@ module LetterOpenerWeb
|
|
37
37
|
|
38
38
|
def destroy
|
39
39
|
@letter.delete
|
40
|
-
|
40
|
+
respond_to do |format|
|
41
|
+
format.html { redirect_to routes.letters_path }
|
42
|
+
format.js { render js: "window.location='#{routes.letters_path}'" }
|
43
|
+
end
|
41
44
|
end
|
42
45
|
|
43
46
|
private
|
@@ -13,8 +13,8 @@ jQuery(function($) {
|
|
13
13
|
$('.letter-opener').on('click', 'a', function() {
|
14
14
|
var $this = $(this);
|
15
15
|
$('iframe').attr('src', $this.attr('href'));
|
16
|
-
$this.
|
17
|
-
$this.addClass('active');
|
16
|
+
$this.parents('.list-group').find('.active').removeClass('active');
|
17
|
+
$this.parent().addClass('active');
|
18
18
|
});
|
19
19
|
|
20
20
|
$('.refresh').click(function(e) {
|
@@ -1,5 +1,10 @@
|
|
1
|
-
<% classes = %w(list-group-item list-group-action
|
1
|
+
<% classes = %w(list-group-item list-group-action d-flex justify-content-between align-items-start p-2 message-headers) %>
|
2
2
|
<% classes << 'active' if active %>
|
3
|
-
<%=
|
4
|
-
<%= letter.
|
3
|
+
<%= content_tag :li, class: classes do %>
|
4
|
+
<%= link_to(letter_path(letter, style: letter.default_style), target: 'mail') do %>
|
5
|
+
<%= letter.headers %>
|
6
|
+
<% end %>
|
7
|
+
<button class="btn btn-danger btn-sm" data-remote="true" data-url="<%= delete_letter_path(letter) %>" data-method="post" data-confirm="Are you sure?">
|
8
|
+
<strong><small>X</small></strong>
|
9
|
+
</button>
|
5
10
|
<% end %>
|
@@ -11,12 +11,12 @@
|
|
11
11
|
</span>
|
12
12
|
</h1>
|
13
13
|
<div class="letter-opener" data-letters-path="<%= letters_path %>">
|
14
|
-
<
|
14
|
+
<ul class="list-group rounded-0 pt-2">
|
15
15
|
<% if first_letter = @letters.shift %>
|
16
16
|
<%= render partial: "item", locals: { letter: first_letter, active: true } %>
|
17
17
|
<% end %>
|
18
18
|
<%= render partial: "item", collection: @letters, as: :letter, locals: { active: false } %>
|
19
|
-
</
|
19
|
+
</ul>
|
20
20
|
</div>
|
21
21
|
</div>
|
22
22
|
<div class="col right">
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: letter_opener_web
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.pre.
|
4
|
+
version: 2.0.0.pre.beta
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fabio Rehm
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-
|
12
|
+
date: 2021-11-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionmailer
|