populate-me 0.17.0 → 0.18.1

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
  SHA256:
3
- metadata.gz: ab01b0340f42771cfda2e496e4dee387c3e098ee2757ee374f5fb9a95fda48b0
4
- data.tar.gz: b74800276c349db0d4dcc74f46f36d5b6fb6a46cb4d727c5dbfb9e46d35d0aa4
3
+ metadata.gz: cbde94afb511faf76bbcf73fab4fcb0dba7109ac042df9eb76c2ea128de4b4a9
4
+ data.tar.gz: bc404f7572fc3a161942a88a403cab1e4d19a2c7042dcb84c285835b7fc7b30f
5
5
  SHA512:
6
- metadata.gz: 7621910d4fec3622e2bad85742c0877fbe6bafdf9dcb28f804e40d5ae255b362de66cdf6d978a1d49fa27874527705d2cec80146e2624f71ac4783a4bd8b5554
7
- data.tar.gz: c65c5db1c8361cb50ada68e63cc246325590a0e8ca00a2f6a3e90e047f73cbc4a0072293ab52a60317a9b0710e96d7439ac3efd1860d3d134edd848ae144670f
6
+ metadata.gz: 5e582594884b90d45f5a9e9894d73401cce46615818b7720c42f60e1ffb63084c45ddad9bfa53fd5c7e04d421b4da8145bbd1e49eed027e1f2c66fc4a752c7bd
7
+ data.tar.gz: 640d6e131ce2b2c8aba0f31669914249a64d1bb29a838e90a08519c5e8cefcbb359ef65f9d2fe3260b4bf19fb2d6e43c513dcd7ad8868f639def86b9d9666b37
@@ -44,6 +44,12 @@
44
44
  background-color: #e5e5e5;
45
45
  }
46
46
 
47
+ .asmListItemPreview {
48
+ height: 3em;
49
+ display: inline-block;
50
+ margin-right: 1em;
51
+ }
52
+
47
53
  .asmListItemLabel {
48
54
  /* this is a span that surrounds the text in the item, except for the remove link */
49
55
  padding: 5px;
@@ -4,13 +4,13 @@ html, body {
4
4
  margin: 0;
5
5
  padding: 0;
6
6
  color: #002b36;
7
- background-color: #eee8d5;
7
+ background-color: #ffffff;
8
8
  height: 100%;
9
9
  font-family: 'Avenir', sans-serif;
10
10
  }
11
11
 
12
12
  body {
13
- line-height: 1.5em;
13
+ line-height: 1.5;
14
14
  }
15
15
 
16
16
  #finder {
@@ -18,11 +18,12 @@ body {
18
18
  }
19
19
 
20
20
  .column {
21
- background: #fdf6e3;
21
+ position: relative;
22
+ background: #eeeeee;
22
23
  height: 100%;
23
24
  min-width: 250px;
24
25
  overflow: auto;
25
- box-shadow: 0px 0px 10px #586e75;
26
+ box-shadow: 0px 0px 10px #555555;
26
27
  }
27
28
 
28
29
  .column > h1, .column > ol,
@@ -63,6 +64,16 @@ body {
63
64
  border: 1px solid #002b36;
64
65
  }
65
66
 
67
+ .column > footer.main-footer {
68
+ position: absolute;
69
+ left: 0;
70
+ bottom: 0;
71
+ width: 100%;
72
+ font-size: 0.5em;
73
+ padding: 20px;
74
+ box-sizing: border-box;
75
+ }
76
+
66
77
  ol {
67
78
  list-style: none;
68
79
  margin: 0;
@@ -75,10 +86,7 @@ a {
75
86
  /* border-bottom: 1px solid #002b36; */
76
87
  }
77
88
  a:hover, a.selected {
78
- /* Blue */
79
89
  color: #268bd2;
80
- /* Green/Blue */
81
- /* color: #2aa198; */
82
90
  }
83
91
 
84
92
  button { cursor: pointer; }
@@ -116,7 +124,7 @@ button.admin-delete:focus, button.admin-delete-nested:focus, .handle-button:focu
116
124
  cursor: -webkit-grab;
117
125
  cursor: grab;
118
126
  }
119
- .handle:active {
127
+ .handle:active {
120
128
  cursor: -moz-grabbing;
121
129
  cursor: -webkit-grabbing;
122
130
  cursor: grabbing;
@@ -125,7 +133,7 @@ button.admin-delete:focus, button.admin-delete-nested:focus, .handle-button:focu
125
133
  [type=submit] {
126
134
  border: 0px;
127
135
  cursor: pointer;
128
- color: #fdf6e3;
136
+ color: #ffffff;
129
137
  background-color: #859900;
130
138
  }
131
139
  [type=submit]:hover {
@@ -141,11 +149,12 @@ button.admin-delete:focus, button.admin-delete-nested:focus, .handle-button:focu
141
149
  user-select: none;
142
150
  }
143
151
  .documents.grid {
144
- width: 90%; width: 90vw;
152
+ width: 80%; width: 80vw;
145
153
  }
146
154
  .documents > li, .nested-documents > li {
147
155
  display: block;
148
156
  margin-bottom: 1em;
157
+ border-top: 1px solid #dddddd;
149
158
  }
150
159
  .documents.grid > li {
151
160
  display: inline-block;
@@ -160,8 +169,8 @@ button.admin-delete:focus, button.admin-delete-nested:focus, .handle-button:focu
160
169
  width: 200px;
161
170
  }
162
171
  .documents > li:hover, .nested-documents > li:hover {
163
- background-color: #eee8d5;
164
- outline: 0.5em solid #eee8d5;
172
+ background-color: #dddddd;
173
+ outline: 0.5em solid #dddddd;
165
174
  }
166
175
  .nested-documents > li > header {
167
176
  background: #002b36;
@@ -172,7 +181,7 @@ button.admin-delete:focus, button.admin-delete-nested:focus, .handle-button:focu
172
181
  border: 1px dashed #839496;
173
182
  background-color: #eee8d5;
174
183
  }
175
- .local-menu { font-size: 0.7em; }
184
+ .local-menu { font-size: 0.8em; margin-top: 0.5em; }
176
185
 
177
186
  /* Forms */
178
187
 
@@ -187,7 +196,7 @@ form {
187
196
  input[type=text], input[type=email], input[type=search],
188
197
  textarea {
189
198
  border: 0px;
190
- color: #839496;
199
+ color: #555555;
191
200
  background-color: #ffffff;
192
201
  width: 400px;
193
202
  padding: 0.5em;
@@ -202,8 +211,9 @@ textarea:focus {
202
211
  /* color: #002b36; */
203
212
  }
204
213
 
205
- textarea { height: 6em; resize: vertical; }
214
+ textarea { height: 4em; resize: vertical; transition: 0.2s; }
206
215
  textarea.oneline { height: 1em; resize: none; }
216
+ textarea:focus { height: 50vh; }
207
217
 
208
218
  fieldset {
209
219
  border: 0;
@@ -226,9 +236,9 @@ fieldset {
226
236
 
227
237
  .asmListItem {
228
238
  background-color: #ffffff;
229
- border: 1px solid #fdf6e3;
239
+ border: 1px solid #eeeeee;
230
240
  }
231
- .asmListItem:hover { background-color: #eee8d5; }
241
+ .asmListItem:hover { background-color: #dddddd; }
232
242
  .asmListItemLabel { padding-right: 2em; }
233
243
  .asmListSortable .asmListItemLabel {
234
244
  cursor: move;
@@ -263,6 +263,17 @@
263
263
  .addClass(options.listItemLabelClass)
264
264
  .html($O.html());
265
265
 
266
+ if ( $O.data('preview') ) {
267
+
268
+ var $itemPreview = $("<img/>")
269
+ .attr("alt", '')
270
+ .attr("src", $O.data('preview'))
271
+ .addClass('asmListItemPreview');
272
+
273
+ $itemLabel.prepend($itemPreview);
274
+
275
+ }
276
+
266
277
  var $item = $("<li></li>")
267
278
  .attr('rel', optionId)
268
279
  .addClass(options.listItemClass)
@@ -19,6 +19,9 @@
19
19
  <% if settings.logout_path? %>
20
20
  <p><a href="<%= request.script_name %><%= settings.logout_path %>">Logout</a></p>
21
21
  <% end %>
22
+ <footer class='main-footer'>
23
+ Populate Me is Content Managment System for premium design-led websites coded by <a href="https://www.rive.studio" target="_blank">Rive Studio</a>.<br/>&copy; <%= Time.now.year %> Mickaël Riga
24
+ </footer>
22
25
  </li></ol>
23
26
 
24
27
  <!-- Templates -->
@@ -36,20 +39,24 @@
36
39
  <h1>
37
40
  {{page_title}}
38
41
  </h1>
39
- <p class='new-document-btn-wrap'>
40
- {{#is_polymorphic}}
41
- <select class='polymorphic_type_values'>
42
- {{#polymorphic_type_values}}
43
- <option value='{{.}}'>{{.}}</option>
44
- {{/polymorphic_type_values}}
45
- </select>
46
- &nbsp;
47
- {{/is_polymorphic}}
48
- <a href="<%= request.script_name %>/form/{{dasherized_class_name}}{{#new_data}}?{{new_data}}{{/new_data}}" class='column-push new-document-btn' title='Create'>+</a>
49
- </p>
50
- <form class='form-search-items'>
51
- <input type='text' class='search-items' placeholder='Search'>
52
- </form>
42
+ {{^disable_plus}}
43
+ <p class='new-document-btn-wrap'>
44
+ {{#is_polymorphic}}
45
+ <select class='polymorphic_type_values'>
46
+ {{#polymorphic_type_values}}
47
+ <option value='{{.}}'>{{.}}</option>
48
+ {{/polymorphic_type_values}}
49
+ </select>
50
+ &nbsp;
51
+ {{/is_polymorphic}}
52
+ <a href="<%= request.script_name %>/form/{{dasherized_class_name}}{{#new_data}}?{{new_data}}{{/new_data}}" class='column-push new-document-btn' title='Create'>+</a>
53
+ </p>
54
+ {{/disable_plus}}
55
+ {{^disable_search}}
56
+ <form class='form-search-items'>
57
+ <input type='text' class='search-items' placeholder='Search'>
58
+ </form>
59
+ {{/disable_search}}
53
60
  <ol class='documents {{#grid_view}}grid{{/grid_view}}' data-sort-field='{{sort_field}}' data-sort-url='<%= request.script_name %>/api/{{dasherized_class_name}}'>
54
61
  {{#items}}{{#custom_partial_or_default}}template_document{{/custom_partial_or_default}}{{/items}}
55
62
  </ol>
@@ -57,21 +64,23 @@
57
64
 
58
65
  <script id="template-document" type="x-tmpl-mustache">
59
66
  <li class='admin-list-item' data-id='{{id}}'>
60
- <header class='{{#sort_field}}handle{{/sort_field}}' title='{{#sort_field}}Drag and drop{{/sort_field}}'>
61
- <button type='button' class='admin-delete' title='Delete' value='<%= request.script_name %>/api/{{admin_url}}'>&times;</button>
62
- </header>
63
- <a href="<%= request.script_name %>/form/{{admin_url}}" class='column-push' title='Edit'>
64
- <span class='item-title'>{{title}}</span>
65
- {{#image_url}}
66
- <br />
67
- <img src='{{image_url}}{{cache_buster}}' alt='{{title}}' width='300' />
68
- {{/image_url}}
69
- </a>
70
- <ol class='local-menu'>
71
- {{#local_menu}}
72
- <li>&rarr; <a href="{{href}}" {{#new_page}}target='_blank'{{/new_page}}{{^new_page}}class='column-push'{{/new_page}} title='Open'>{{title}}</a></li>
73
- {{/local_menu}}
74
- </ol>
67
+ <div class="{{#sort_field}}handle{{/sort_field}}" title='{{#sort_field}}Drag and drop{{/sort_field}}'>
68
+ <header>
69
+ <button type='button' class='admin-delete' title='Delete' value='<%= request.script_name %>/api/{{admin_url}}'>&times;</button>
70
+ </header>
71
+ <a href="<%= request.script_name %>/form/{{admin_url}}" class='column-push' title='Edit'>
72
+ <span class='item-title'>{{title}}</span>
73
+ {{#image_url}}
74
+ <br />
75
+ <img src='{{image_url}}{{cache_buster}}' alt='{{title}}' width='300' />
76
+ {{/image_url}}
77
+ </a>
78
+ <ol class='local-menu'>
79
+ {{#local_menu}}
80
+ <li>&rarr; <a href="{{href}}" {{#new_page}}target='_blank'{{/new_page}}{{^new_page}}class='column-push'{{/new_page}} title='Open'>{{title}}</a></li>
81
+ {{/local_menu}}
82
+ </ol>
83
+ </div>
75
84
  </li>
76
85
  </script>
77
86
 
@@ -138,10 +138,10 @@ module PopulateMe
138
138
  is_polymorphic: self.polymorphic?,
139
139
  polymorphic_type_values: self.polymorphic? ? self.fields[:polymorphic_type][:values] : nil,
140
140
  sort_field: self.sort_field_for(o),
141
- # 'command_plus'=> !self.populate_config[:no_plus],
142
- # 'command_search'=> !self.populate_config[:no_search],
143
- items: items.map do |d|
144
- d.to_admin_list_item(o)
141
+ disable_plus: self.settings[:disable_plus]==true,
142
+ disable_search: self.settings[:disable_search]==true,
143
+ items: items.map do |d|
144
+ d.to_admin_list_item(o)
145
145
  end
146
146
  }
147
147
  end
@@ -1,4 +1,4 @@
1
1
  module PopulateMe
2
- VERSION = '0.17.0'
2
+ VERSION = '0.18.1'
3
3
  end
4
4
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: populate-me
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.18.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mickael Riga
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-22 00:00:00.000000000 Z
11
+ date: 2023-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: web-utils