binda 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/javascripts/binda/components/fileupload.js +12 -9
- data/app/assets/javascripts/binda/components/sortable.js +26 -18
- data/app/assets/javascripts/binda/dist/binda.bundle.js +35 -19
- data/app/assets/stylesheets/binda/components/fileupload.scss +4 -0
- data/app/assets/stylesheets/binda/components/main_table.scss +4 -0
- data/app/controllers/binda/components_controller.rb +4 -8
- data/app/controllers/binda/images_controller.rb +5 -2
- data/app/controllers/binda/videos_controller.rb +5 -2
- data/app/views/binda/components/sort_index.html.erb +3 -10
- data/app/views/binda/field_groups/_form_body.html.erb +2 -0
- data/app/views/binda/fieldable/_form_body.html.erb +1 -9
- data/app/views/binda/fieldable/_form_item_image.html.erb +4 -2
- data/app/views/binda/fieldable/_form_item_repeater.html.erb +1 -1
- data/app/views/binda/fieldable/_form_item_video.html.erb +4 -2
- data/app/views/binda/structures/sort_index.html.erb +3 -10
- data/app/views/layouts/binda/_popup_warning.html.erb +9 -0
- data/config/initializers/simple_form__fileupload.rb +8 -1
- data/config/locales/en.yml +5 -3
- data/lib/binda/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5694e1440f4d1444a866b3585c015a505b1916c9
|
4
|
+
data.tar.gz: fbb826b32c32544817670db8c40b2c17b4e0fa0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e6fad4efa8654fd96281eba1cc2d952b06ab2c295e8c5647578dcf9fca72a9c56ac2815531f7a3a63bec2691e771181084b8f0bf5891f5cbfd5e6f470b0038e
|
7
|
+
data.tar.gz: 8e0b3daf423b42e5a0b381678ddd41f62d79dc54c99f359fdf5dbad30958c6f31c38a0d005717b18c77c8279e989f481d532c6e61610334440dc4883814a151f
|
@@ -78,6 +78,7 @@ function handle_file(event)
|
|
78
78
|
// formData.append('authenticity_token', token)
|
79
79
|
|
80
80
|
// Display loader
|
81
|
+
$('.popup-warning--message').text( $parent.data('message') )
|
81
82
|
$('.popup-warning').removeClass('popup-warning--hidden')
|
82
83
|
|
83
84
|
// Once form data are gathered make the request
|
@@ -109,19 +110,17 @@ function makeRequest(event, formData )
|
|
109
110
|
// Display details and buttons
|
110
111
|
$parent.find('.fileupload--details').removeClass('fileupload--details--hidden')
|
111
112
|
$parent.find('.fileupload--remove-image-btn').removeClass('fileupload--remove-image-btn--hidden')
|
112
|
-
}).fail( function()
|
113
|
+
}).fail( function(dataFail)
|
113
114
|
{
|
115
|
+
console.error("Error:", dataFail.responseJSON)
|
114
116
|
// Hide loaded
|
115
117
|
$('.popup-warning').addClass('popup-warning--hidden')
|
116
|
-
alert(
|
118
|
+
alert($parent.data('error'))
|
117
119
|
})
|
118
120
|
}
|
119
121
|
|
120
|
-
|
121
|
-
|
122
|
-
{
|
123
|
-
let input = event.target
|
124
|
-
|
122
|
+
function reset_file(input)
|
123
|
+
{
|
125
124
|
input.value = ''
|
126
125
|
|
127
126
|
if(!/safari/i.test(navigator.userAgent)){
|
@@ -137,7 +136,10 @@ function remove_preview(event)
|
|
137
136
|
|
138
137
|
// Reset previews (either image or video)
|
139
138
|
$parent.find('.fileupload--preview').css('background-image','').removeClass('fileupload--preview--uploaded')
|
140
|
-
$parent.find('video source').
|
139
|
+
$parent.find('video source').removeAttr('src')
|
140
|
+
|
141
|
+
// Clear input field
|
142
|
+
reset_file( $parent.find('input[type=file]').get(0) )
|
141
143
|
|
142
144
|
// Reset buttons to initial state
|
143
145
|
$parent.find('.fileupload--remove-image-btn').addClass('fileupload--remove-image-btn--hidden')
|
@@ -176,7 +178,7 @@ function setup_video_preview(data, id)
|
|
176
178
|
.attr('type', 'video/' + data.ext)
|
177
179
|
|
178
180
|
// If video source isn't blank load it (consider that a video tag is always present)
|
179
|
-
if ( $preview.find('video source').attr('src')
|
181
|
+
if ( typeof $preview.find('video source').attr('src') != undefined )
|
180
182
|
{
|
181
183
|
$preview.find('video').get(0).load()
|
182
184
|
}
|
@@ -188,4 +190,5 @@ function setup_video_preview(data, id)
|
|
188
190
|
// Update details
|
189
191
|
$parent.find('.fileupload--filesize').text(data.size)
|
190
192
|
$parent.find('.fileupload--filename').text(data.name)
|
193
|
+
$parent.find('.fileupload--videolink a').attr('href', data.url)
|
191
194
|
}
|
@@ -4,25 +4,9 @@
|
|
4
4
|
|
5
5
|
|
6
6
|
var sortableOptions = {
|
7
|
-
stop: function(event, ui)
|
8
|
-
{
|
9
|
-
ui.item.css('z-index', 0)
|
10
|
-
},
|
7
|
+
stop: function(event, ui){ ui.item.css('z-index', 0) },
|
11
8
|
placeholder: "ui-state-highlight",
|
12
|
-
update:
|
13
|
-
{
|
14
|
-
if ( $('.popup-warning').length > 0 )
|
15
|
-
{
|
16
|
-
$('.sortable').addClass('sortable--disabled')
|
17
|
-
$('.popup-warning').removeClass('popup-warning--hidden')
|
18
|
-
$(this).sortable('option','disabled', true)
|
19
|
-
}
|
20
|
-
let url = $(this).data('update-url')
|
21
|
-
let data = $(this).sortable('serialize')
|
22
|
-
// If there is a pagination update accordingly
|
23
|
-
data = data.concat(`&id=${$(this).attr('id')}`)
|
24
|
-
$.post( url, data )
|
25
|
-
}
|
9
|
+
update: updateSortable
|
26
10
|
}
|
27
11
|
|
28
12
|
export default function()
|
@@ -92,4 +76,28 @@ function toggleSortable(event)
|
|
92
76
|
$( id ).toggleClass('sortable--disabled')
|
93
77
|
$( id ).toggleClass('sortable--enabled')
|
94
78
|
$( this ).children('.sortable--toggle-text').toggle()
|
79
|
+
}
|
80
|
+
|
81
|
+
function updateSortable()
|
82
|
+
{
|
83
|
+
if ( $('.popup-warning').length > 0 )
|
84
|
+
{
|
85
|
+
$(this).addClass('sortable--disabled')
|
86
|
+
$('.popup-warning--message').text( $(this).data('message') )
|
87
|
+
$('.popup-warning').removeClass('popup-warning--hidden')
|
88
|
+
$(this).sortable('option','disabled', true)
|
89
|
+
}
|
90
|
+
let url = $(this).data('update-url')
|
91
|
+
let data = $(this).sortable('serialize')
|
92
|
+
// If there is a pagination update accordingly
|
93
|
+
data = data.concat(`&id=${$(this).attr('id')}`)
|
94
|
+
$.post( url, data ).done( function(doneData)
|
95
|
+
{
|
96
|
+
$(doneData.id).sortable('option', 'disabled', false)
|
97
|
+
$('.popup-warning').addClass('popup-warning--hidden')
|
98
|
+
$(doneData.id).removeClass('sortable--disabled')
|
99
|
+
}).fail(function(failData){
|
100
|
+
$('.popup-warning').addClass('popup-warning--hidden')
|
101
|
+
alert('Error: ' + failData.message)
|
102
|
+
})
|
95
103
|
}
|
@@ -286,6 +286,8 @@ function deleteChoice(event) {
|
|
286
286
|
|
287
287
|
"use strict";
|
288
288
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _FileUpload; });
|
289
|
+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
290
|
+
|
289
291
|
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
290
292
|
|
291
293
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
@@ -374,6 +376,7 @@ function handle_file(event) {
|
|
374
376
|
// formData.append('authenticity_token', token)
|
375
377
|
|
376
378
|
// Display loader
|
379
|
+
$('.popup-warning--message').text($parent.data('message'));
|
377
380
|
$('.popup-warning').removeClass('popup-warning--hidden');
|
378
381
|
|
379
382
|
// Once form data are gathered make the request
|
@@ -405,16 +408,15 @@ function makeRequest(event, formData) {
|
|
405
408
|
// Display details and buttons
|
406
409
|
$parent.find('.fileupload--details').removeClass('fileupload--details--hidden');
|
407
410
|
$parent.find('.fileupload--remove-image-btn').removeClass('fileupload--remove-image-btn--hidden');
|
408
|
-
}).fail(function () {
|
411
|
+
}).fail(function (dataFail) {
|
412
|
+
console.error("Error:", dataFail.responseJSON);
|
409
413
|
// Hide loaded
|
410
414
|
$('.popup-warning').addClass('popup-warning--hidden');
|
411
|
-
alert(
|
415
|
+
alert($parent.data('error'));
|
412
416
|
});
|
413
417
|
}
|
414
418
|
|
415
|
-
function reset_file(
|
416
|
-
var input = event.target;
|
417
|
-
|
419
|
+
function reset_file(input) {
|
418
420
|
input.value = '';
|
419
421
|
|
420
422
|
if (!/safari/i.test(navigator.userAgent)) {
|
@@ -429,7 +431,10 @@ function remove_preview(event) {
|
|
429
431
|
|
430
432
|
// Reset previews (either image or video)
|
431
433
|
$parent.find('.fileupload--preview').css('background-image', '').removeClass('fileupload--preview--uploaded');
|
432
|
-
$parent.find('video source').
|
434
|
+
$parent.find('video source').removeAttr('src');
|
435
|
+
|
436
|
+
// Clear input field
|
437
|
+
reset_file($parent.find('input[type=file]').get(0));
|
433
438
|
|
434
439
|
// Reset buttons to initial state
|
435
440
|
$parent.find('.fileupload--remove-image-btn').addClass('fileupload--remove-image-btn--hidden');
|
@@ -461,7 +466,7 @@ function setup_video_preview(data, id) {
|
|
461
466
|
$preview.removeClass('fileupload--preview--uploaded').find('video').attr('id', 'video-' + id).find('source').attr('src', data.url).attr('type', 'video/' + data.ext);
|
462
467
|
|
463
468
|
// If video source isn't blank load it (consider that a video tag is always present)
|
464
|
-
if ($preview.find('video source').attr('src')
|
469
|
+
if (_typeof($preview.find('video source').attr('src')) != undefined) {
|
465
470
|
$preview.find('video').get(0).load();
|
466
471
|
}
|
467
472
|
|
@@ -472,6 +477,7 @@ function setup_video_preview(data, id) {
|
|
472
477
|
// Update details
|
473
478
|
$parent.find('.fileupload--filesize').text(data.size);
|
474
479
|
$parent.find('.fileupload--filename').text(data.name);
|
480
|
+
$parent.find('.fileupload--videolink a').attr('href', data.url);
|
475
481
|
}
|
476
482
|
|
477
483
|
/***/ }),
|
@@ -1164,18 +1170,7 @@ var sortableOptions = {
|
|
1164
1170
|
ui.item.css('z-index', 0);
|
1165
1171
|
},
|
1166
1172
|
placeholder: "ui-state-highlight",
|
1167
|
-
update:
|
1168
|
-
if ($('.popup-warning').length > 0) {
|
1169
|
-
$('.sortable').addClass('sortable--disabled');
|
1170
|
-
$('.popup-warning').removeClass('popup-warning--hidden');
|
1171
|
-
$(this).sortable('option', 'disabled', true);
|
1172
|
-
}
|
1173
|
-
var url = $(this).data('update-url');
|
1174
|
-
var data = $(this).sortable('serialize');
|
1175
|
-
// If there is a pagination update accordingly
|
1176
|
-
data = data.concat('&id=' + $(this).attr('id'));
|
1177
|
-
$.post(url, data);
|
1178
|
-
}
|
1173
|
+
update: updateSortable
|
1179
1174
|
};
|
1180
1175
|
|
1181
1176
|
/* harmony default export */ __webpack_exports__["a"] = (function () {
|
@@ -1238,6 +1233,27 @@ function toggleSortable(event) {
|
|
1238
1233
|
$(this).children('.sortable--toggle-text').toggle();
|
1239
1234
|
}
|
1240
1235
|
|
1236
|
+
function updateSortable() {
|
1237
|
+
if ($('.popup-warning').length > 0) {
|
1238
|
+
$(this).addClass('sortable--disabled');
|
1239
|
+
$('.popup-warning--message').text($(this).data('message'));
|
1240
|
+
$('.popup-warning').removeClass('popup-warning--hidden');
|
1241
|
+
$(this).sortable('option', 'disabled', true);
|
1242
|
+
}
|
1243
|
+
var url = $(this).data('update-url');
|
1244
|
+
var data = $(this).sortable('serialize');
|
1245
|
+
// If there is a pagination update accordingly
|
1246
|
+
data = data.concat('&id=' + $(this).attr('id'));
|
1247
|
+
$.post(url, data).done(function (doneData) {
|
1248
|
+
$(doneData.id).sortable('option', 'disabled', false);
|
1249
|
+
$('.popup-warning').addClass('popup-warning--hidden');
|
1250
|
+
$(doneData.id).removeClass('sortable--disabled');
|
1251
|
+
}).fail(function (failData) {
|
1252
|
+
$('.popup-warning').addClass('popup-warning--hidden');
|
1253
|
+
alert('Error: ' + failData.message);
|
1254
|
+
});
|
1255
|
+
}
|
1256
|
+
|
1241
1257
|
/***/ }),
|
1242
1258
|
/* 13 */
|
1243
1259
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
@@ -64,15 +64,14 @@ module Binda
|
|
64
64
|
params[:repeater].each_with_index do |id, i|
|
65
65
|
Repeater.find( id ).update({ position: i + 1 })
|
66
66
|
end
|
67
|
-
render
|
68
|
-
head :ok
|
67
|
+
render json: { id: "##{params[:id]}" }, status: 200
|
69
68
|
end
|
70
69
|
|
71
70
|
def sort
|
72
71
|
params[:component].each_with_index do |id, i|
|
73
72
|
Component.find( id ).update_column('position', i + 1) # use update_column to skip callbacks (which leads to huge useless memory consumption)
|
74
73
|
end
|
75
|
-
render
|
74
|
+
render json: { id: "##{params[:id]}" }, status: 200
|
76
75
|
end
|
77
76
|
|
78
77
|
def sort_index
|
@@ -82,12 +81,9 @@ module Binda
|
|
82
81
|
|
83
82
|
def upload
|
84
83
|
if @component.update( upload_params(:component) )
|
85
|
-
|
86
|
-
format.json { render json: upload_details }
|
87
|
-
end
|
84
|
+
render json: upload_details, status: 200
|
88
85
|
else
|
89
|
-
|
90
|
-
head :bad_request
|
86
|
+
render json: @component.errors.full_messages, status: 400
|
91
87
|
end
|
92
88
|
end
|
93
89
|
|
@@ -50,8 +50,11 @@ module Binda
|
|
50
50
|
|
51
51
|
def remove_video
|
52
52
|
@video.remove_video!
|
53
|
-
@video.save
|
54
|
-
|
53
|
+
if @video.save
|
54
|
+
head :ok
|
55
|
+
else
|
56
|
+
render json: @video.errors.full_messages, status: 400
|
57
|
+
end
|
55
58
|
end
|
56
59
|
|
57
60
|
private
|
@@ -8,15 +8,8 @@
|
|
8
8
|
<% end %>
|
9
9
|
|
10
10
|
<% content_for :content do %>
|
11
|
-
|
12
|
-
|
13
|
-
<span></span>
|
14
|
-
<span></span>
|
15
|
-
<span></span>
|
16
|
-
<span></span>
|
17
|
-
</div>
|
18
|
-
<p><%= t 'binda.sort_items_loader', { arg1: t('binda.components').downcase } %></p>
|
19
|
-
</div>
|
11
|
+
|
12
|
+
<%= render 'layouts/binda/popup_warning' %>
|
20
13
|
|
21
14
|
<div class="main-sortable-table">
|
22
15
|
|
@@ -25,7 +18,7 @@
|
|
25
18
|
<div class="main-sortable-table--header-title"><p>Publish State</p></div>
|
26
19
|
</div>
|
27
20
|
|
28
|
-
<div id="<%= @structure.slug %>-components--sort-index" class="sortable" data-update-url="<%= structure_components_sort_path( @structure.slug ) %>">
|
21
|
+
<div id="<%= @structure.slug %>-components--sort-index" class="sortable" data-update-url="<%= structure_components_sort_path( @structure.slug ) %>" data-message="<%= t 'binda.sort_items_loader', { arg1: t('binda.components').downcase } %>">
|
29
22
|
<% @components.order( :position, :name ).each do |component| %>
|
30
23
|
<div class="main-sortable-table--row ui-sortable-handle" id="component_<%= component.id %>">
|
31
24
|
<div class="main-sortable-table--row-cell"><%= link_to component.name, structure_component_path( @structure.slug, component ) %></div>
|
@@ -1,12 +1,4 @@
|
|
1
|
-
|
2
|
-
<div class="popup-warning--loader">
|
3
|
-
<span></span>
|
4
|
-
<span></span>
|
5
|
-
<span></span>
|
6
|
-
<span></span>
|
7
|
-
</div>
|
8
|
-
<p><%= t 'binda.upload_loading_message' %></p>
|
9
|
-
</div>
|
1
|
+
<%= render 'layouts/binda/popup_warning' %>
|
10
2
|
|
11
3
|
<%= simple_form_for [ @instance.structure, @instance ], html: { class: 'form-body', multipart: true } do |f| %>
|
12
4
|
|
@@ -1,6 +1,8 @@
|
|
1
1
|
<div id="standard-form--image-<%= field_setting.id %>" class="standard-form--image form-item">
|
2
2
|
<div id="fileupload-<%= ff.object.id %>"
|
3
|
-
class="fileupload form-group"
|
3
|
+
class="fileupload form-group"
|
4
|
+
data-message="<%= t('binda.upload_loading_message') %>"
|
5
|
+
data-error="<%= t('binda.upload_error_message')%>">
|
4
6
|
|
5
7
|
<p class="control-label"><%= field_setting.name.capitalize %></p>
|
6
8
|
|
@@ -19,7 +21,7 @@
|
|
19
21
|
@instance,
|
20
22
|
action: :upload,
|
21
23
|
repeater: { id: "#{field_setting.parent_id}" }]),
|
22
|
-
'data-id': ff.object.id
|
24
|
+
'data-id': ff.object.id
|
23
25
|
} %>
|
24
26
|
|
25
27
|
</div>
|
@@ -23,7 +23,7 @@
|
|
23
23
|
|
24
24
|
</div>
|
25
25
|
|
26
|
-
<ul id="form-item--repeater-setting-<%= repeater_setting.id %>" class="sortable sortable--disabled" data-update-url="<%= url_for([@structure, @instance, :sort_repeaters]) %>">
|
26
|
+
<ul id="form-item--repeater-setting-<%= repeater_setting.id %>" class="sortable sortable--disabled" data-update-url="<%= url_for([@structure, @instance, :sort_repeaters]) %>" data-message="<%= t 'binda.sort_items_loader', { arg1: t('binda.components').downcase } %>">
|
27
27
|
|
28
28
|
<% if repeaters.size == 0 %>
|
29
29
|
|
@@ -1,6 +1,8 @@
|
|
1
1
|
<div id="standard-form--video-<%= field_setting.id %>" class="standard-form--video form-item">
|
2
2
|
<div id="fileupload-<%= ff.object.id %>"
|
3
|
-
class="fileupload form-group"
|
3
|
+
class="fileupload form-group"
|
4
|
+
data-message="<%= t('binda.upload_loading_message') %>"
|
5
|
+
data-error="<%= t('binda.upload_error_message')%>">
|
4
6
|
|
5
7
|
<p class="control-label"><%= field_setting.name.capitalize %></p>
|
6
8
|
|
@@ -15,7 +17,7 @@
|
|
15
17
|
input_html: {
|
16
18
|
class: 'form-item--video--uploader',
|
17
19
|
'data-url': url_for([@instance.structure, @instance, action: :upload]),
|
18
|
-
'data-id': ff.object.id
|
20
|
+
'data-id': ff.object.id,
|
19
21
|
} %>
|
20
22
|
|
21
23
|
|
@@ -6,15 +6,8 @@
|
|
6
6
|
<% end %>
|
7
7
|
|
8
8
|
<% content_for :content do %>
|
9
|
-
|
10
|
-
|
11
|
-
<span></span>
|
12
|
-
<span></span>
|
13
|
-
<span></span>
|
14
|
-
<span></span>
|
15
|
-
</div>
|
16
|
-
<p><%= t 'binda.sort_items_loader', { arg1: t('binda.structures').downcase } %></p>
|
17
|
-
</div>
|
9
|
+
|
10
|
+
<%= render 'layouts/binda/popup_warning' %>
|
18
11
|
|
19
12
|
<div class="main-table--container">
|
20
13
|
<h5 class="text-muted"><%= t('binda.sort_index_hint', { arg1: t('binda.structures').downcase }).html_safe %></h5>
|
@@ -25,7 +18,7 @@
|
|
25
18
|
<p>Structures</p>
|
26
19
|
</div>
|
27
20
|
</div>
|
28
|
-
<div id="structures--sort-index" class="sortable" data-update-url="<%= structures_sort_path() %>">
|
21
|
+
<div id="structures--sort-index" class="sortable" data-update-url="<%= structures_sort_path() %>" data-message="<%= t 'binda.sort_items_loader', { arg1: t('binda.components').downcase } %>">
|
29
22
|
<% @structures.order( :name ).each do |structure| %>
|
30
23
|
<div id="structure_<%= structure.id %>" class="main-sortable-table--row ui-sortable-handle">
|
31
24
|
<div class="main-sortable-table--row-cell">
|
@@ -54,7 +54,8 @@ module SimpleForm
|
|
54
54
|
html << '" data-id="'
|
55
55
|
html << obj.id.to_s
|
56
56
|
html << '">'
|
57
|
-
html << '<i class="fa fa-trash-alt" aria-hidden="true"></i>
|
57
|
+
html << '<i class="fa fa-trash-alt" aria-hidden="true"></i>'
|
58
|
+
html << t('binda.delete')
|
58
59
|
html << '</a>'
|
59
60
|
html << '<div class="clearfix"></div>'
|
60
61
|
end
|
@@ -100,6 +101,12 @@ module SimpleForm
|
|
100
101
|
html << '</span> x <span class="fileupload--height">'
|
101
102
|
html << image[:height].to_s unless image.nil?
|
102
103
|
html << '</span> px</p>'
|
104
|
+
html << '<p class="fileupload--videolink"><a href="'
|
105
|
+
html << obj.video.url if obj.video.present?
|
106
|
+
html << '" target="_blank"><i class="fas fa-external-link-alt"></i> <strong>'
|
107
|
+
html << t('binda.filevideolink')
|
108
|
+
html << '</strong></a></p>'
|
109
|
+
|
103
110
|
html << '</div>'
|
104
111
|
end
|
105
112
|
end
|
data/config/locales/en.yml
CHANGED
@@ -50,12 +50,14 @@ en:
|
|
50
50
|
confirm_delete: Do you really want to remove it?
|
51
51
|
upload_button: Upload
|
52
52
|
upload_loading_message: Uploading file...
|
53
|
+
upload_error_message: Ops! Something went wrong. Make sure the file you are uploading is correct.
|
53
54
|
choose_file_button: Choose a file
|
54
55
|
preview: Preview
|
55
56
|
no_preview: No file selected
|
56
57
|
filename: Name
|
57
58
|
filesize: Size
|
58
59
|
filedimension: Dimension
|
60
|
+
filevideolink: Preview video
|
59
61
|
select_placeholder: Select a option
|
60
62
|
new_item_in_repeater: New %{arg1} item
|
61
63
|
null_is_not_allowed: You need to select at least one choice
|
@@ -103,6 +105,6 @@ en:
|
|
103
105
|
login_credit: Built with Binda %{arg1}
|
104
106
|
choice_label: label
|
105
107
|
choice_value: value
|
106
|
-
allow_null:
|
107
|
-
allow_null_true:
|
108
|
-
allow_null_false:
|
108
|
+
allow_null: Require a choice
|
109
|
+
allow_null_true: Choosing is not required
|
110
|
+
allow_null_false: Require to choose among the available choices
|
data/lib/binda/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: binda
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alessandro Barbieri
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -764,6 +764,7 @@ files:
|
|
764
764
|
- app/views/kaminari/_prev_page.html.erb
|
765
765
|
- app/views/layouts/binda/_flash.html.erb
|
766
766
|
- app/views/layouts/binda/_header.html.erb
|
767
|
+
- app/views/layouts/binda/_popup_warning.html.erb
|
767
768
|
- app/views/layouts/binda/_sidebar.html.erb
|
768
769
|
- app/views/layouts/binda/application.html.erb
|
769
770
|
- config/autoprefixer.yml
|