rademade_admin 0.1.6 → 0.2.0

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: cbf2b035073b7ecd22583c679174032a17198b6f
4
- data.tar.gz: 680b96e301ee4c35cb8b056c9a2dad63525267b1
3
+ metadata.gz: 24b3b644e89d2a74048d589e373e36694a106108
4
+ data.tar.gz: 9c57ddd88451b760959c7a2dc668fdc12b2e5ad8
5
5
  SHA512:
6
- metadata.gz: 4eeb141cfbcbda28277a22f2381190fc23b6567486b5492abff1888bda148b47876a56beb2edaaaa87121b216b8008d757497a5183a8c042e5a9c342939ca00a
7
- data.tar.gz: 9cdac46cb24a8f0bca639994b135ec5380d8db904e8881bc1a046d55205fa32eb5c2abbe19a4867a28d902bc8e3d921bb73be989b70a22942f03076daf08d2f1
6
+ metadata.gz: f302b18cf34bbc2ab2305fb81bbe05caf855ff0d55c00e344cfc287e3e5e17939c0eab330857ab0a54a2a6b550ee13f4c551adc774dfd50104fd809d96cde6bc
7
+ data.tar.gz: 244e26ff5442aeae125d31e18df3889d5e790b0c60eb6426b3e1a3d013bc3eaa8776f2cd2396fa312d9075d4b4ac6128ce0ed065315dcb6fed9254359c39066c
@@ -25,7 +25,7 @@
25
25
  #= require leaflet/dist/leaflet-src
26
26
  #= require moment/moment
27
27
  #= require turbolinks
28
- #= require select2
28
+ #= require select2/dist/js/select2
29
29
  #= require ckeditor/init
30
30
  #= require flot/jquery.flot
31
31
  #= require flot/jquery.flot.resize
@@ -23,12 +23,15 @@ class @Cropper extends Backbone.View
23
23
  initCrop : () ->
24
24
  @$cropAttributes = @$el.find('[data-crop-attribute]')
25
25
  [originalWidth, originalHeight] = @originalDimensions
26
+ self = this
26
27
  $image = @$el.find('.crop-image')
27
28
  $image.on 'load', () =>
28
29
  @horizontalRatio = originalWidth / $image.width()
29
30
  @verticalRatio = originalHeight / $image.height()
30
31
  $image.Jcrop
31
32
  onSelect : @_updateCropAttributes
33
+ , () ->
34
+ self.jcropApi = this
32
35
 
33
36
  crop : (e) ->
34
37
  e.preventDefault()
@@ -23,11 +23,14 @@ class @ImagePreview extends Backbone.View
23
23
  JST['rademade_admin/app/templates/image-preview-popup'](data)
24
24
 
25
25
  @init : () ->
26
- imagePreview = new ImagePreview
26
+ imagePreview = new this
27
27
  $('#pad-wrapper').append imagePreview.$el
28
28
  $('tr .image-preview').click (e) ->
29
29
  fullUrl = $(e.currentTarget).attr('full-url')
30
30
  imagePreview.show(fullUrl) if fullUrl
31
31
 
32
+ @initPlugin : () =>
33
+ @init()
34
+
32
35
  $ ->
33
- $(document).on 'page:load ready init-plugins', ImagePreview.init
36
+ $(document).on 'page:load ready init-plugins', ImagePreview.initPlugin
@@ -47,11 +47,14 @@ class @Location extends Backbone.View
47
47
  location.initMap()
48
48
 
49
49
  @initAll : () ->
50
- $('.location').each () ->
51
- $location = $(this)
50
+ $('.location').each (index, el) =>
51
+ $location = $(el)
52
52
  unless $location.data('initialized')
53
- Location.init $location
53
+ @init $location
54
54
  $location.data('initialized', true)
55
55
 
56
+ @initPlugin : () =>
57
+ @initAll()
58
+
56
59
  $ ->
57
- $(document).on('page:load ready init-plugins', Location.initAll)
60
+ $(document).on 'page:load ready init-plugins', Location.initPlugin
@@ -17,9 +17,12 @@ class @StatusToggler
17
17
  @sending = false
18
18
 
19
19
  @init : () ->
20
- statusToggler = new StatusToggler
20
+ statusToggler = new this
21
21
  statusToggler.bindToggle()
22
22
  statusToggler
23
23
 
24
+ @initPlugin : () =>
25
+ @init()
26
+
24
27
  $ ->
25
- $(document).on 'ready page:load init-plugins', StatusToggler.init
28
+ $(document).on 'ready page:load init-plugins', StatusToggler.initPlugin
@@ -80,11 +80,14 @@ class @Uploader extends Backbone.View
80
80
  uploader
81
81
 
82
82
  @initAll : () ->
83
- $('.uploader-input-file').each (index, el) ->
83
+ $('.uploader-input-file').each (index, el) =>
84
84
  $uploader = $(el)
85
85
  unless $uploader.data('initialized')
86
- Uploader.init $uploader
86
+ @init $uploader
87
87
  $uploader.data('initialized', true)
88
88
 
89
+ @initPlugin : () =>
90
+ @initAll()
91
+
89
92
  $ ->
90
- $(document).on 'page:load ready init-plugins', Uploader.initAll
93
+ $(document).on 'page:load ready init-plugins', Uploader.initPlugin
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  *= require jquery-fileupload/css/jquery.fileupload-ui
3
- *= require select2
3
+ *= require select2/src/scss/core
4
4
  *= require magnific-popup/dist/magnific-popup
5
5
  *= require jquery-ui/themes/base/core
6
6
  *= require jquery-ui/themes/base/slider
@@ -103,4 +103,4 @@
103
103
 
104
104
  @import rademade_admin/modules/errors/error
105
105
 
106
- @import rademade_admin/modules/pagination/main
106
+ @import rademade_admin/modules/pagination/main
@@ -14,7 +14,7 @@ module RademadeAdmin::FieldHelper
14
14
  value
15
15
  end
16
16
 
17
- def display_related_item(data_item, value)
17
+ def display_related_item(data_item, item, value)
18
18
  if data_item.relation.has_many?
19
19
  link_to(data_item.label, admin_related_item(item, data_item.getter))
20
20
  else
@@ -47,7 +47,7 @@ module RademadeAdmin::FieldHelper
47
47
  return data_item.list_preview_handler.call(item) unless data_item.list_preview_handler.nil?
48
48
  value = item.send(data_item.list_preview_accessor)
49
49
  return display_upload_item(data_item, value) if data_item.has_uploader?
50
- return display_related_item(data_item, value) if data_item.has_relation?
50
+ return display_related_item(data_item, item, value) if data_item.has_relation?
51
51
  value.to_s.html_safe
52
52
  end
53
53
 
@@ -6,7 +6,7 @@ require 'carrierwave'
6
6
  require 'cancan'
7
7
  require 'bower-rails'
8
8
  require 'compass-rails'
9
- require 'select2-rails'
9
+ require 'sass-rails'
10
10
 
11
11
  # js assets
12
12
  require 'turbolinks'
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module RademadeAdmin
3
- VERSION = "0.1.6"
3
+ VERSION = "0.2.0"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rademade_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vladislav Melanitskiy
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-06-09 00:00:00.000000000 Z
13
+ date: 2015-06-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -67,9 +67,6 @@ dependencies:
67
67
  - - "~>"
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0.1'
70
- - - ">="
71
- - !ruby/object:Gem::Version
72
- version: 0.1.6
73
70
  type: :runtime
74
71
  prerelease: false
75
72
  version_requirements: !ruby/object:Gem::Requirement
@@ -77,9 +74,6 @@ dependencies:
77
74
  - - "~>"
78
75
  - !ruby/object:Gem::Version
79
76
  version: '0.1'
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: 0.1.6
83
77
  - !ruby/object:Gem::Dependency
84
78
  name: bower-rails
85
79
  requirement: !ruby/object:Gem::Requirement
@@ -100,76 +94,20 @@ dependencies:
100
94
  - - ">="
101
95
  - !ruby/object:Gem::Version
102
96
  version: 0.8.2
103
- - !ruby/object:Gem::Dependency
104
- name: select2-rails
105
- requirement: !ruby/object:Gem::Requirement
106
- requirements:
107
- - - ">="
108
- - !ruby/object:Gem::Version
109
- version: '0'
110
- type: :runtime
111
- prerelease: false
112
- version_requirements: !ruby/object:Gem::Requirement
113
- requirements:
114
- - - ">="
115
- - !ruby/object:Gem::Version
116
- version: '0'
117
- - !ruby/object:Gem::Dependency
118
- name: sprockets-sass
119
- requirement: !ruby/object:Gem::Requirement
120
- requirements:
121
- - - "~>"
122
- - !ruby/object:Gem::Version
123
- version: '1.0'
124
- type: :runtime
125
- prerelease: false
126
- version_requirements: !ruby/object:Gem::Requirement
127
- requirements:
128
- - - "~>"
129
- - !ruby/object:Gem::Version
130
- version: '1.0'
131
- - !ruby/object:Gem::Dependency
132
- name: sprockets
133
- requirement: !ruby/object:Gem::Requirement
134
- requirements:
135
- - - '='
136
- - !ruby/object:Gem::Version
137
- version: 2.11.0
138
- type: :runtime
139
- prerelease: false
140
- version_requirements: !ruby/object:Gem::Requirement
141
- requirements:
142
- - - '='
143
- - !ruby/object:Gem::Version
144
- version: 2.11.0
145
- - !ruby/object:Gem::Dependency
146
- name: sass
147
- requirement: !ruby/object:Gem::Requirement
148
- requirements:
149
- - - "~>"
150
- - !ruby/object:Gem::Version
151
- version: '3.1'
152
- type: :runtime
153
- prerelease: false
154
- version_requirements: !ruby/object:Gem::Requirement
155
- requirements:
156
- - - "~>"
157
- - !ruby/object:Gem::Version
158
- version: '3.1'
159
97
  - !ruby/object:Gem::Dependency
160
98
  name: sass-rails
161
99
  requirement: !ruby/object:Gem::Requirement
162
100
  requirements:
163
101
  - - "~>"
164
102
  - !ruby/object:Gem::Version
165
- version: '4.0'
103
+ version: 4.0.3
166
104
  type: :runtime
167
105
  prerelease: false
168
106
  version_requirements: !ruby/object:Gem::Requirement
169
107
  requirements:
170
108
  - - "~>"
171
109
  - !ruby/object:Gem::Version
172
- version: '4.0'
110
+ version: 4.0.3
173
111
  - !ruby/object:Gem::Dependency
174
112
  name: compass-rails
175
113
  requirement: !ruby/object:Gem::Requirement
@@ -274,14 +212,20 @@ dependencies:
274
212
  requirements:
275
213
  - - "~>"
276
214
  - !ruby/object:Gem::Version
277
- version: '3.11'
215
+ version: 3.9.0
216
+ - - "<"
217
+ - !ruby/object:Gem::Version
218
+ version: 4.0.0
278
219
  type: :runtime
279
220
  prerelease: false
280
221
  version_requirements: !ruby/object:Gem::Requirement
281
222
  requirements:
282
223
  - - "~>"
283
224
  - !ruby/object:Gem::Version
284
- version: '3.11'
225
+ version: 3.9.0
226
+ - - "<"
227
+ - !ruby/object:Gem::Version
228
+ version: 4.0.0
285
229
  - !ruby/object:Gem::Dependency
286
230
  name: simple_form
287
231
  requirement: !ruby/object:Gem::Requirement
@@ -459,7 +403,7 @@ files:
459
403
  - app/assets/javascripts/rademade_admin/library/notifier.custom.min.js
460
404
  - app/assets/javascripts/rademade_admin/settings/ajax-csrf.coffee
461
405
  - app/assets/stylesheets/edit.css
462
- - app/assets/stylesheets/rademade_admin.sass.erb
406
+ - app/assets/stylesheets/rademade_admin.sass
463
407
  - app/assets/stylesheets/rademade_admin/base/main.sass
464
408
  - app/assets/stylesheets/rademade_admin/blocks/buttons/main.sass
465
409
  - app/assets/stylesheets/rademade_admin/blocks/filter/_main.sass