loft 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +7 -7
- data/app/assets/javascripts/loft/module.coffee +13 -1
- data/app/assets/stylesheets/loft.scss +8 -24
- data/lib/loft/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a805f7d8ef5af5bd61c9d7138616c681c3c8abed
|
4
|
+
data.tar.gz: d3395c88f3e62ac78f9ef732463b1a8a22ad5f87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7d6f1fba61f3b602ffa1f6a36e7fdfd264939b56cc39538feca0b61d939d535f97b39b22d4da7339d8e4bb2fd938c1f2716086a568ec9790e61fe1a92a6418a
|
7
|
+
data.tar.gz: 7b762f23b23ced06b01ab4f328d740251396f7248b0ca5a1fc137438c902a0328075be090f62dae7bc51fc19db02e159491d56bab27af2541dd2ec203cbf5f8f
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
loft (0.2.
|
4
|
+
loft (0.2.8)
|
5
5
|
ants (>= 0.2.0)
|
6
6
|
carrierwave-mongoid (>= 0.7.1)
|
7
7
|
chr (>= 0.4.19)
|
@@ -49,7 +49,7 @@ GEM
|
|
49
49
|
minitest (~> 5.1)
|
50
50
|
thread_safe (~> 0.3, >= 0.3.4)
|
51
51
|
tzinfo (~> 1.1)
|
52
|
-
ants (0.3.
|
52
|
+
ants (0.3.3)
|
53
53
|
devise
|
54
54
|
mongoid (>= 4.0)
|
55
55
|
mongoid-slug (>= 4.0.0)
|
@@ -69,7 +69,7 @@ GEM
|
|
69
69
|
carrierwave (>= 0.8.0, < 0.11.0)
|
70
70
|
mongoid (>= 3.0, < 6.0)
|
71
71
|
mongoid-grid_fs (>= 1.3, < 3.0)
|
72
|
-
chr (0.4.
|
72
|
+
chr (0.4.25)
|
73
73
|
bourbon
|
74
74
|
coffee-rails (>= 4.0)
|
75
75
|
font-awesome-rails
|
@@ -96,9 +96,9 @@ GEM
|
|
96
96
|
erubis (2.7.0)
|
97
97
|
execjs (2.6.0)
|
98
98
|
fast-stemmer (1.0.2)
|
99
|
-
font-awesome-rails (4.
|
99
|
+
font-awesome-rails (4.5.0.0)
|
100
100
|
railties (>= 3.2, < 5.0)
|
101
|
-
formagic (0.3.
|
101
|
+
formagic (0.3.3)
|
102
102
|
bourbon (>= 3.2)
|
103
103
|
normalize-rails (>= 3.0)
|
104
104
|
globalid (0.3.6)
|
@@ -124,7 +124,7 @@ GEM
|
|
124
124
|
nokogiri (>= 1.5.9)
|
125
125
|
mail (2.6.3)
|
126
126
|
mime-types (>= 1.16, < 3)
|
127
|
-
mime-types (2.
|
127
|
+
mime-types (2.99)
|
128
128
|
mini_magick (4.3.6)
|
129
129
|
mini_portile (0.6.2)
|
130
130
|
minitest (5.8.3)
|
@@ -207,7 +207,7 @@ GEM
|
|
207
207
|
sprockets (>= 2.8, < 4.0)
|
208
208
|
sprockets-rails (>= 2.0, < 4.0)
|
209
209
|
tilt (>= 1.1, < 3)
|
210
|
-
sprockets (3.4.
|
210
|
+
sprockets (3.4.1)
|
211
211
|
rack (> 1, < 3)
|
212
212
|
sprockets-rails (2.3.3)
|
213
213
|
actionpack (>= 3.0)
|
@@ -55,6 +55,9 @@ class @Loft
|
|
55
55
|
_initialize_module: (module) ->
|
56
56
|
@module = module
|
57
57
|
@store = @module.nestedLists.loft_all.config.arrayStore
|
58
|
+
@nestedLists = @module.nestedLists
|
59
|
+
moduleName = @module.name
|
60
|
+
firstNestedListPath = _firstNonEmptyValue(@nestedLists).path
|
58
61
|
|
59
62
|
# API method
|
60
63
|
@module.showModal = (assetType, selectMultipleAssets, callback, closeOnAccept) =>
|
@@ -85,6 +88,12 @@ class @Loft
|
|
85
88
|
if ! chr.isMobile()
|
86
89
|
@module.$el.addClass('grid-mode')
|
87
90
|
|
91
|
+
@module.$el.addClass("module-categories")
|
92
|
+
if chr.isDesktop()
|
93
|
+
chr.$mainMenu
|
94
|
+
.find(".menu-#{moduleName}")
|
95
|
+
.attr("href", firstNestedListPath)
|
96
|
+
|
88
97
|
|
89
98
|
_nested_list_config: (moduleName, assetType) ->
|
90
99
|
storeConfig = {}
|
@@ -119,7 +128,10 @@ class @Loft
|
|
119
128
|
list.groupActions = new LoftGroupActions(list, this)
|
120
129
|
|
121
130
|
# grid/list checkbox
|
122
|
-
list.$switchMode =$ "<a class='assets-switch-mode' href='#'
|
131
|
+
list.$switchMode =$ """<a class='assets-switch-mode' href='#'>
|
132
|
+
<i class='fa fa-fw fa-th-large'></i>
|
133
|
+
<i class='fa fa-fw fa-th-list'></i>
|
134
|
+
</a>"""
|
123
135
|
list.$backBtn.after list.$switchMode
|
124
136
|
list.$switchMode.on 'click', (e) => e.preventDefault() ; @module.$el.toggleClass('grid-mode')
|
125
137
|
|
@@ -2,11 +2,9 @@
|
|
2
2
|
// Basic styles for Loft Character CMS plugin, this should be included in
|
3
3
|
// admin.scss (default)
|
4
4
|
// -----------------------------------------------------------------------
|
5
|
-
|
6
5
|
@import "inputs/loft-image";
|
7
6
|
|
8
7
|
// MIXINS
|
9
|
-
|
10
8
|
@mixin loft-icon-label($title) {
|
11
9
|
&:before {
|
12
10
|
display: block; margin-top: 2.6em;
|
@@ -22,7 +20,6 @@
|
|
22
20
|
}
|
23
21
|
|
24
22
|
// ASSET TYPE ICONS
|
25
|
-
|
26
23
|
.loft .list:first-child .items {
|
27
24
|
.item {
|
28
25
|
.item-title { margin-left: 2.05em; }
|
@@ -59,9 +56,7 @@
|
|
59
56
|
}
|
60
57
|
}
|
61
58
|
|
62
|
-
|
63
59
|
// LIST MODE
|
64
|
-
|
65
60
|
.loft .list:not(:first-child) .items .item.asset {
|
66
61
|
padding-left: 6.25em; // 100px;
|
67
62
|
|
@@ -105,14 +100,10 @@
|
|
105
100
|
&.edit-name .asset-name { display: block; }
|
106
101
|
}
|
107
102
|
|
108
|
-
|
109
103
|
// LIST-GRID MODE SWITCHER
|
110
|
-
|
111
104
|
.assets-switch-mode { display: none; }
|
112
105
|
|
113
|
-
|
114
106
|
// GROUP ACTIONS
|
115
|
-
|
116
107
|
.assets-group-actions {
|
117
108
|
@include position(absolute, 0 0 0 0); background: white;
|
118
109
|
.accept { color: $positive-color; float: right; margin-right: 1em; }
|
@@ -124,9 +115,7 @@
|
|
124
115
|
.module-modal .assets-group-actions .accept { display: inline; }
|
125
116
|
.module-modal .assets-group-actions .delete { display: none; }
|
126
117
|
|
127
|
-
|
128
118
|
// UPLOAD BUTTON
|
129
|
-
|
130
119
|
.loft .list-aside .header:before {
|
131
120
|
@include position(absolute, 0px 0px null null);
|
132
121
|
@include header-icon-base;
|
@@ -149,9 +138,7 @@
|
|
149
138
|
.list.list-search header .asset-upload + .search { @include position(absolute, 0 0 null 0); }
|
150
139
|
.loft.assets-uploading .list:not(:first-child) header .spinner { display: inline-block; }
|
151
140
|
|
152
|
-
|
153
141
|
// MODAL MODE
|
154
|
-
|
155
142
|
.loft {
|
156
143
|
.modal-close { display: none; }
|
157
144
|
&.module-modal {
|
@@ -172,7 +159,6 @@
|
|
172
159
|
}
|
173
160
|
}
|
174
161
|
|
175
|
-
|
176
162
|
/* Tablet ------------------------------------------------------------------ */
|
177
163
|
@media #{$tablet} {
|
178
164
|
// ITEMS
|
@@ -191,17 +177,20 @@
|
|
191
177
|
.loft.module-modal { @include position(absolute, 1.5em 1.5em 0em 1.5em) }
|
192
178
|
.loft.module-modal .header { top: 0; left: 0; right: 0; width: auto; }
|
193
179
|
|
194
|
-
|
195
180
|
// GRID MODE
|
196
181
|
.assets-switch-mode {
|
197
182
|
@include position(absolute, null null null 1em);
|
198
183
|
display: inline; line-height: 2.5; left: 3em;
|
199
|
-
|
200
|
-
|
184
|
+
i:first-child { color: $border-color; }
|
185
|
+
i:last-child { color: rgba($base-font-color, .4); }
|
186
|
+
// &:before { content: 'Grid'; color: lighten($base-font-color, 50%); margin-right: .25em; }
|
187
|
+
// &:after { content: 'List'; color: lighten($base-font-color, 35%); }
|
201
188
|
}
|
202
189
|
.loft.grid-mode .assets-switch-mode {
|
203
|
-
|
204
|
-
|
190
|
+
i:first-child { color: rgba($base-font-color, .4); }
|
191
|
+
i:last-child { color: $border-color; }
|
192
|
+
// &:before { color: lighten($base-font-color, 35%); }
|
193
|
+
// &:after { color: lighten($base-font-color, 50%); }
|
205
194
|
}
|
206
195
|
|
207
196
|
.loft.grid-mode {
|
@@ -245,7 +234,6 @@
|
|
245
234
|
}
|
246
235
|
}
|
247
236
|
|
248
|
-
|
249
237
|
/* Desktop ----------------------------------------------------------------- */
|
250
238
|
@media #{$desktop} {
|
251
239
|
// BACK
|
@@ -254,7 +242,3 @@
|
|
254
242
|
// GRID MODE
|
255
243
|
.assets-switch-mode { left: 1em; }
|
256
244
|
}
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
data/lib/loft/version.rb
CHANGED
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
|
+
version: 0.2.8
|
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-11-
|
11
|
+
date: 2015-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chr
|