voluntary-ember_js 0.0.3 → 0.0.4

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: 12feba527db6518bb1f63d0f40915dcc1cc667dc
4
- data.tar.gz: 62fa2bfdd5e115bebd0587d249f1482e8a80e290
3
+ metadata.gz: 91dbcdb3b60470b666cd9fda5c3db66540db2f76
4
+ data.tar.gz: bafa0db299a76e398ba249f77e7b68b204dda824
5
5
  SHA512:
6
- metadata.gz: 874e49ccc8cc35979e755f395ae829e61ad732df91bbe5cf86cfafed5eda8388621546f974b8dc547b8b7078748c2b67aef81b5fc20a30553316a982445d05cc
7
- data.tar.gz: a3857b9418e38fc451e07dc62b51e5468a0b6c9afe2cddf2f299fd7a2063ff6a40d08e3c70fee0b2d1d7b2cd5103f8481b06c7e2e62152907ae1b541d21d9c67
6
+ metadata.gz: dc06907e7d49203bcdb8c3034fdc70a1cf9c0b8cb9bc625e23679fca15fc3782f9a0d4288d046944b4a59b6dbafd4619804b6631854c921ebfacfe997a9ff340
7
+ data.tar.gz: e28b4b884e0e91da2a35a4d6c079f4bb46f843985a86e848de4ca55ba2ce079ee705f54b5074b72df179826f7dd0fdde466666e644b57586289e316cb96ba489
@@ -8,41 +8,10 @@
8
8
  #= require_tree ./routes
9
9
  #= require_tree ./helpers
10
10
  #= require_tree ./components
11
+ #= require ./lib
11
12
  #= require ./router
12
13
  #= require_self
13
14
 
14
15
  Ember.TextField.reopen attributeBindings: [
15
16
  'data-autocomplete', 'data-append-autocomplete', 'data-append-to'
16
- ]
17
-
18
- Volontariat.alert = (type, message) ->
19
- $('#alert_message').text message
20
- $('#alert').addClass "alert-#{type}"
21
- $("#alert").slideDown()
22
-
23
- setTimeout (->
24
- $("#alert").slideUp(400, ->
25
- $('#alert').removeClass "alert-#{type}"
26
- )
27
- ), 5000
28
-
29
- Volontariat.reload_alert = (message) ->
30
- $('#reload_alert_message').text message
31
- $('#reload_alert').slideDown()
32
-
33
- Volontariat.t = (key) ->
34
- keyArray = key.split('.')
35
- text = Volontariat.translations[keyArray.shift()]
36
-
37
- unless text == undefined || typeof(text) == 'string'
38
- $.each keyArray, (index, value) ->
39
- if text[value] == undefined
40
- text = undefined
41
-
42
- return false
43
-
44
- text = text[value]
45
-
46
- return false if typeof(text) == 'string'
47
-
48
- text
17
+ ]
@@ -0,0 +1,31 @@
1
+ Volontariat.alert = (type, message) ->
2
+ $('#alert_message').text message
3
+ $('#alert').addClass "alert-#{type}"
4
+ $("#alert").slideDown()
5
+
6
+ setTimeout (->
7
+ $("#alert").slideUp(400, ->
8
+ $('#alert').removeClass "alert-#{type}"
9
+ )
10
+ ), 5000
11
+
12
+ Volontariat.reload_alert = (message) ->
13
+ $('#reload_alert_message').text message
14
+ $('#reload_alert').slideDown()
15
+
16
+ Volontariat.t = (key) ->
17
+ keyArray = key.split('.')
18
+ text = Volontariat.translations[keyArray.shift()]
19
+
20
+ unless text == undefined || typeof(text) == 'string'
21
+ $.each keyArray, (index, value) ->
22
+ if text[value] == undefined
23
+ text = undefined
24
+
25
+ return false
26
+
27
+ text = text[value]
28
+
29
+ return false if typeof(text) == 'string'
30
+
31
+ text
@@ -0,0 +1,5 @@
1
+ <script type="text/javascript">
2
+ Volontariat.locale = '<%= I18n.locale.to_s %>';
3
+ moment.locale('<%= I18n.locale.to_s %>');
4
+ Volontariat.translations = <%= I18n.backend.send(:translations)[I18n.locale].to_json.html_safe %>;
5
+ </script>
@@ -59,11 +59,7 @@
59
59
  #= javascript_include_tag *voluntary_ember_js_javascripts %>
60
60
  -->
61
61
  <%= javascript_include_tag *voluntary_ember_js_javascripts %>
62
- <script type="text/javascript">
63
- Volontariat.locale = '<%= I18n.locale.to_s %>';
64
- moment.locale('<%= I18n.locale.to_s %>');
65
- Volontariat.translations = <%= I18n.backend.send(:translations)[I18n.locale].to_json.html_safe %>;
66
- </script>
62
+ <%= render partial: 'layouts/voluntary/translations_javascript' %>
67
63
  <%= javascript_tag do %>
68
64
  <%= yield :top_javascript %>
69
65
 
@@ -1,5 +1,5 @@
1
1
  module Voluntary
2
2
  module EmberJs
3
- VERSION = '0.0.3'
3
+ VERSION = '0.0.4'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: voluntary-ember_js
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mathias Gawlista
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-02 00:00:00.000000000 Z
11
+ date: 2015-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: voluntary
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.5.0
19
+ version: '0.5'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.5.0
26
+ version: '0.5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: ember-rails
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -318,7 +318,7 @@ dependencies:
318
318
  - - "~>"
319
319
  - !ruby/object:Gem::Version
320
320
  version: 0.7.1
321
- description: 'Ember.js support for #crowdsourcing management system voluntary: bit.ly/vej-0-0-2'
321
+ description: 'Ember.js support for #crowdsourcing management system voluntary: bit.ly/vej-0-0-4'
322
322
  email:
323
323
  - gawlista@gmail.com
324
324
  executables: []
@@ -341,6 +341,7 @@ files:
341
341
  - app/assets/javascripts/voluntary/ember_js/helpers/formatted_datetime_helper.js.coffee
342
342
  - app/assets/javascripts/voluntary/ember_js/helpers/name_with_apostrophe_helper.js.coffee
343
343
  - app/assets/javascripts/voluntary/ember_js/helpers/t_helper.js.coffee
344
+ - app/assets/javascripts/voluntary/ember_js/lib.js.coffee
344
345
  - app/assets/javascripts/voluntary/ember_js/mixins/has_current_user.js.coffee
345
346
  - app/assets/javascripts/voluntary/ember_js/mixins/singleton.js.coffee
346
347
  - app/assets/javascripts/voluntary/ember_js/models/argument.js.coffee
@@ -354,6 +355,7 @@ files:
354
355
  - app/assets/javascripts/voluntary/ember_js/views/application_view.js.coffee
355
356
  - app/assets/stylesheets/voluntary/ember_js/application.css
356
357
  - app/controllers/voluntary/ember_js/application_controller.rb
358
+ - app/views/layouts/voluntary/_translations_javascript.html.erb
357
359
  - app/views/layouts/voluntary/ember_js.html.erb
358
360
  - config/routes.rb
359
361
  - lib/voluntary/ember_js.rb