lalala 4.0.0.dev.90 → 4.0.0.dev.92

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: d2c265d0b510bf9f63a4490628305820b2e1eae4
4
- data.tar.gz: c766e57c2bc3b3ec626f299f6dd49abb47a7301c
3
+ metadata.gz: 05c7393296cfd28f3a17f148eaa3826c349eba86
4
+ data.tar.gz: f99ba6009a6c4892a48d1386cdc7a24b7f5d184c
5
5
  SHA512:
6
- metadata.gz: e7b90abba2b1f16a0e5023215d0b33b2ee1559bf8831141c4cd16b1fb92f0fa0e0a58c56a83c56972949765c86bff1dfb813cfb70791cd680a109d028a0aa60d
7
- data.tar.gz: 7bd7c867cbe5d490f09696bdd38e9046bb4da6fb166a23103e910cf588cc8a4875405bad0020cb7cd3c83227b567656de9efafd53d8a42f3e7ec8379d51d6d5e
6
+ metadata.gz: 63343012a51c001837f3eac3f8e63105c1579332e2d145980ca1c17fd1ade68aef4d1983496365ab56d4df3bd2e053176f107e76a6180a4ce3484a8993e6ff60
7
+ data.tar.gz: 57f4ec701ab3ad66e5085845f2c56f9e755e912cd631a5a51a2fa57ca9aa51947f219695c9b65ac3d1b507fd5f04c0564c0cfb919fceda90abe5d54d97b355cc
@@ -1,7 +1,7 @@
1
1
  var markdown_settings;
2
2
 
3
3
  exports.init = function(){
4
- $("textarea").each(setup);
4
+ $("textarea.markdown").each(setup);
5
5
  };
6
6
 
7
7
  function setup() {
@@ -64,6 +64,8 @@ select {
64
64
 
65
65
  // textarea, only vertically resizable
66
66
  textarea {
67
+ font-size: 12px;
68
+ line-height: 1.2em;
67
69
  resize: vertical;
68
70
  }
69
71
 
@@ -59,7 +59,7 @@
59
59
  &:hover {
60
60
 
61
61
  & > td > .member_link {
62
- display: inline-block;
62
+ @include opacity(1);
63
63
  }
64
64
 
65
65
  }
@@ -86,7 +86,7 @@
86
86
  }
87
87
 
88
88
  &:last-child {
89
- width: 75px;
89
+ //width: 75px;
90
90
  }
91
91
 
92
92
  }
@@ -96,7 +96,9 @@
96
96
  text-decoration: none;
97
97
 
98
98
  &.member_link {
99
- display: none; // Will be shown on <tr:hover>
99
+ @include opacity(0);
100
+ @include transition(opacity 300ms);
101
+ display: inline-block; // Will be shown on <tr:hover>
100
102
  height: 16px;
101
103
  margin: 0 3px;
102
104
  text-indent: -9999px;
@@ -153,4 +155,24 @@
153
155
  margin: 0;
154
156
  }
155
157
 
158
+ &.index_table {
159
+
160
+ td {
161
+
162
+ &:last-child {
163
+ width: 75px;
164
+ }
165
+
166
+ }
167
+
168
+ }
169
+
170
+ }
171
+
172
+ #active_admin_content .attributes_table table {
173
+
174
+ th {
175
+ width: 25%;
176
+ }
177
+
156
178
  }
@@ -1,7 +1,7 @@
1
1
  .flashes {
2
2
  @include animation-name(flash-slide-up);
3
3
  @include animation-duration(500ms);
4
- @include animation-delay(3s);
4
+ @include animation-delay(1.5s);
5
5
  @include animation-fill-mode(forwards);
6
6
  left: 0;
7
7
  height: $top_nav_height;
data/lib/lalala/engine.rb CHANGED
@@ -53,6 +53,9 @@ module Lalala
53
53
  Lalala::ExtWithAdvisoryLock.patch!
54
54
  end
55
55
 
56
+ Formtastic::FormBuilder.send(
57
+ :include, Lalala::Markdown::InputHelper)
58
+
56
59
  Formtastic::FormBuilder.send(
57
60
  :include, Lalala::ExtI18n::InputHelper)
58
61
 
@@ -0,0 +1,14 @@
1
+ module Lalala::Markdown::InputHelper
2
+ extend ActiveSupport::Concern
3
+
4
+ def input(method, options = {})
5
+
6
+ if ( @object.respond_to?("#{method}_html") )
7
+ input_html = options[:input_html] || {}
8
+ input_html[:class] = [input_html[:class], 'markdown'].flatten.compact.join(" ")
9
+ options[:input_html] = input_html
10
+ end
11
+
12
+ super(method, options)
13
+ end
14
+ end
@@ -26,8 +26,32 @@ module Lalala::Markdown::Preview
26
26
  key = instance_params.keys.first
27
27
  val = instance_params[key]
28
28
 
29
+ if key.to_s == 'translations_writer'
30
+ instance_params = val
31
+
32
+ if instance_params.size > 1
33
+ raise "Expects exactly 1 param"
34
+ end
35
+
36
+ key = instance_params.keys.first
37
+ val = instance_params[key]
38
+
39
+ instance_params = val
40
+
41
+ if instance_params.size > 1
42
+ raise "Expects exactly 1 param"
43
+ end
44
+
45
+ key = instance_params.keys.first
46
+ val = instance_params[key]
47
+ end
48
+
29
49
  resource[key] = val
30
50
 
51
+ unless resource.respond_to?("#{key}_html")
52
+ raise "Column (#{key}) is not a markdown column"
53
+ end
54
+
31
55
  @content = resource.send("#{key}_html")
32
56
 
33
57
  render layout: 'lalala/markdown', template: 'lalala/markdown/preview'
@@ -4,6 +4,7 @@ class Lalala::Markdown
4
4
  require 'lalala/markdown/active_model'
5
5
  require 'lalala/markdown/html_renderer'
6
6
  require 'lalala/markdown/markdown_renderer'
7
+ require 'lalala/markdown/input_helper'
7
8
 
8
9
  module Handlers
9
10
  require 'lalala/markdown/handlers/base'
@@ -1,6 +1,6 @@
1
1
  module Lalala
2
2
  VERSION = "4.0.0"
3
- BUILD = "90"
3
+ BUILD = "92"
4
4
 
5
5
  if BUILD != ("{{BUILD_NUMBER" + "}}") # prevent sed replacement (see script/ci)
6
6
  BUILD_VERSION = "#{VERSION}.dev.#{BUILD}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lalala
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.dev.90
4
+ version: 4.0.0.dev.92
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Menke
@@ -1486,6 +1486,7 @@ files:
1486
1486
  - lib/lalala/markdown/handlers/base.rb
1487
1487
  - lib/lalala/markdown/handlers/youtube.rb
1488
1488
  - lib/lalala/markdown/html_renderer.rb
1489
+ - lib/lalala/markdown/input_helper.rb
1489
1490
  - lib/lalala/markdown/markdown_renderer.rb
1490
1491
  - lib/lalala/markdown/preview.rb
1491
1492
  - lib/lalala/pages.rb