loft 0.2.4 → 0.2.5

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: e8b9a117b09ce200d56515481cb519409596bc08
4
- data.tar.gz: c13408a45069a156bb785670d9a8392b41529f45
3
+ metadata.gz: a2c666854c519f0e34f2f5ff2f4fad7e1a8bce34
4
+ data.tar.gz: 9a35e19e5f613ae97368c74cff44f4e5d20a1972
5
5
  SHA512:
6
- metadata.gz: 1c1ff5b7c51376b27a239822053261959ab97e06a0587ece747b94803cde516c414ac37e330280780bd359ec06e7d6fcff81ea8ef336fc10bcdb51c4cc44383a
7
- data.tar.gz: cf268fc05a8ace3ae6312575bc3bd82bc30cecd20ce47a161928b6e211b1cf822e2bd7119a56fcb0d38d26f0afd5b7d7c306b6177ca44c10e816279fe04d197d
6
+ metadata.gz: 951abd088fc66398bab9cd325bbecb005fa9c263ea6ee63fc5ccb49b64c97b6195f5e6d8c228db299021e98fc3174eeb8275759d541c96abb68288c2881d3073
7
+ data.tar.gz: 26b07765453f58718375d709872caa905e91091a3db79dd4d9d56f1ab113c5cb55b331031fd2027dcb813ba41b921d56e8a40a26c0af110f1c907611a4915e32
data/README.md CHANGED
@@ -28,7 +28,7 @@ Add to ```admin.scss``` and ```admin.coffee```:
28
28
  Add to ```admin.coffee``` character configuration object:
29
29
 
30
30
  ```coffee
31
- loft: new Loft('Files', 'asset', '/admin/assets')
31
+ loft: new Loft()
32
32
  ```
33
33
 
34
34
 
@@ -2,8 +2,10 @@
2
2
  #= require loft/asset-item
3
3
  #= require loft/module
4
4
 
5
- #= require loft/redactor-loft
6
5
  #= require loft/inputs/loft-image
7
6
 
7
+ ## OPTIONAL
8
+ # require loft/redactor-loft
9
+
8
10
  # TODOs:
9
11
  # - refactor group remove action: delete a bunch first, then reload the page
@@ -11,18 +11,18 @@
11
11
  # -----------------------------------------------------------------------------
12
12
  #
13
13
  # Public methods:
14
- # new Loft(title, resource, resourcePath, @arrayStoreClass, @arrayStoreConfig)
14
+ # new Loft(title, resource, resourcePath)
15
15
  # showModal(assetType, @selectMultipleAssets, @onAcceptCallback, @closeOnAccept)
16
16
  # closeModal()
17
17
  #
18
18
  # -----------------------------------------------------------------------------
19
19
  class @Loft
20
- constructor: (title, resource, resourcePath, @arrayStoreClass, @arrayStoreConfig) ->
20
+ constructor: (title='Media', resource='asset', resourcePath='/admin/assets') ->
21
21
  @module = {}
22
22
  @store = {}
23
23
 
24
- @arrayStoreClass ?= RailsArrayStore
25
- @arrayStoreConfig ?=
24
+ @arrayStoreClass = RailsArrayStore
25
+ @arrayStoreConfig =
26
26
  resource: resource
27
27
  path: resourcePath
28
28
  sortBy: 'created_at'
@@ -134,7 +134,6 @@
134
134
  cursor : pointer;
135
135
  padding-left : 80px;
136
136
  &:before { @include position(absolute, null null null 0); }
137
- &:hover { opacity : .5; }
138
137
  }
139
138
 
140
139
  .list header .asset-upload + .search { @include position(absolute, 0 40px null null); }
@@ -198,7 +197,7 @@
198
197
 
199
198
  .loft.grid-mode {
200
199
  .list:not(:first-child) .items {
201
- padding: .25em .25em 5em .75em;
200
+ padding: 1em .25em 5em .75em;
202
201
  .item.asset { margin: 0 .75em 1.5em; float: left; display: inline-block; }
203
202
 
204
203
  .item.asset {
@@ -1,5 +1,4 @@
1
1
  require 'autoinc'
2
- require 'mongoid_search'
3
2
 
4
3
  module LoftAsset
5
4
  extend ActiveSupport::Concern
data/lib/loft.rb CHANGED
@@ -2,6 +2,7 @@ require 'chr'
2
2
  require 'ants'
3
3
  require 'mongosteen'
4
4
  require 'mini_magick'
5
+ require 'mongoid_search'
5
6
  require 'mongoid-grid_fs'
6
7
  require 'carrierwave/mongoid'
7
8
 
data/lib/loft/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Loft
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.5"
3
3
  end
data/loft.gemspec CHANGED
@@ -25,6 +25,7 @@ to upload, manage and insert files into documents.
25
25
  s.add_dependency("ants", ">= 0.2.0")
26
26
  s.add_dependency("mongosteen", ">= 0.1.8")
27
27
  s.add_dependency("mongoid-autoinc", ">= 4.0.0")
28
+ s.add_dependency('mongoid_search', ">= 0.3")
28
29
  s.add_dependency("mini_magick", ">= 4.1.0")
29
30
  s.add_dependency("mongoid-grid_fs", ">= 2.1.0")
30
31
  s.add_dependency("carrierwave-mongoid", ">= 0.7.1")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: loft
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Kravets
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-09 00:00:00.000000000 Z
11
+ date: 2015-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chr
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: 4.0.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: mongoid_search
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0.3'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0.3'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: mini_magick
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -188,7 +202,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
202
  version: '0'
189
203
  requirements: []
190
204
  rubyforge_project: loft
191
- rubygems_version: 2.4.6
205
+ rubygems_version: 2.4.5.1
192
206
  signing_key:
193
207
  specification_version: 4
194
208
  summary: Media assets manager for Character CMS