rails_email_preview 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 37f26bca79a358d23b5558ccdf69ec9d14806c8c
4
- data.tar.gz: 212af63e4f7389f0c7b10170ccd09c382fa1a0b9
3
+ metadata.gz: fc3115e421a24ec4e6b1a2938b30dfbbe606883a
4
+ data.tar.gz: 83445266db534612bd1d8dbf85565c8b75cb882b
5
5
  SHA512:
6
- metadata.gz: 1b52eef72bf07ada652564f93e1a068ae7ad5046c2fa927a6f47cebc96e8b567da4726ff124d6857c6c097b95970b710a1a8d68601b17e07ea18a07a5aaf1b0c
7
- data.tar.gz: 8b9a369c78e56782055e007cdc1b732230207318b98d1e0b50e10536062b3f04611d64eac600028c3a8725faf4bdd42b7c201b22da8693f88b903971886a00ab
6
+ metadata.gz: 018be5b125c75e3fb0996592e9405f1592d07aca9e05ef8bb099980c0f76ec107dbe449a6f7f4d2c23832296153aa31801a0831ff1c6df419749c86f11f222ae
7
+ data.tar.gz: a1844e61dcb13eb0f083a95dc8e9117744348ccf42876c4609506c7769a49dbf691a197bb196efca564433b54fbefdcfa133539a3aafaef106533b4c923923c5
@@ -1,17 +1,18 @@
1
- -# Hide nav when rendering inside rails_email_preview
1
+ -# When rendering inside rails_email_preview hide nav, and hide irrelevant things from the form
2
2
  javascript:
3
3
  jQuery(function($) {
4
4
  if (window.parent && /email/.test(parent.location.href)) {
5
+ // Hide nav:
5
6
  $('.left-column,.right-column').hide();
6
7
  $('.center-column').css('margin', 0);
8
+
9
+ // Snippet form:
10
+ // * Hide identifier and categories
11
+ $('[name="snippet[identifier]"]').closest('.control-group').hide();
12
+ $('label[for="snippet_"]').closest('.control-group').hide();
13
+ // * Label -> Subject
14
+ $('[name="snippet[label]"]').closest('.control-group').find('.control-label').text("Subject");
15
+ // * Content -> Body
16
+ $('[name="snippet[content]"]').closest('.control-group').find('.control-label').text("Body");
7
17
  }
8
- // Snippet form:
9
- // * Label -> Subject
10
- $('[name="snippet[label]"]').closest('.control-group').find('.control-label').text("Subject");
11
- // * Content -> Body
12
- $('[name="snippet[content]"]').closest('.control-group').find('.control-label').text("Body");
13
- // * Hide identifier
14
- $('[name="snippet[identifier]"]').closest('.control-group').hide();
15
- // * Hide categories
16
- $('label[for="snippet_"]').closest('.control-group').hide();
17
18
  });
@@ -1,3 +1,3 @@
1
1
  module RailsEmailPreview
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_email_preview
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gleb Mazovetskiy