beyond_canvas 0.15.1.pre → 0.15.2.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/beyond_canvas/base.js +248 -99
- data/app/javascript/beyond_canvas/base.js +0 -2
- data/app/javascript/beyond_canvas/initializers/buttons.js +7 -40
- data/app/javascript/beyond_canvas/initializers/flash.js +5 -13
- data/app/javascript/beyond_canvas/initializers/functions.js +41 -0
- data/app/javascript/beyond_canvas/initializers/inputs.js +3 -7
- data/lib/beyond_canvas/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70836ce40a293f66cd6e356d731409917770f7a0f491778d4fa9571132454741
|
4
|
+
data.tar.gz: 1c9c24f161e23c8009a463c30ccde514e84277d47db0c2f0f645915b0c716e38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 702fe9f4ea8fc0d26c791e2944dd0271ac3ccb3ba861d04d8f515177098513f1f694f3a758fe2d4d70cccf4adfc798b35b4e6a87bfed69f89ba6792d555a291f
|
7
|
+
data.tar.gz: 97a8105ded178daa6e013b1163bd3474938248e2471091f2cd543f02336b578f061cd7ddf0757bbe77e346c042be92115c2d9ce166943cb885673a0bee01d2a7
|
@@ -1,106 +1,255 @@
|
|
1
|
-
|
2
|
-
*
|
1
|
+
/*!
|
2
|
+
*
|
3
|
+
* Warning: This file is auto-generated, do not modify. Instead, make your changes in 'app/javascript/beyond_canvas/' and run `yarn build`
|
4
|
+
*
|
5
|
+
* //= require jquery3
|
6
|
+
* //= require_self
|
7
|
+
*
|
3
8
|
*/
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
9
|
+
(function(e, a) { for(var i in a) e[i] = a[i]; }(window, /******/ (function(modules) { // webpackBootstrap
|
10
|
+
/******/ // The module cache
|
11
|
+
/******/ var installedModules = {};
|
12
|
+
/******/
|
13
|
+
/******/ // The require function
|
14
|
+
/******/ function __webpack_require__(moduleId) {
|
15
|
+
/******/
|
16
|
+
/******/ // Check if module is in cache
|
17
|
+
/******/ if(installedModules[moduleId]) {
|
18
|
+
/******/ return installedModules[moduleId].exports;
|
19
|
+
/******/ }
|
20
|
+
/******/ // Create a new module (and put it into the cache)
|
21
|
+
/******/ var module = installedModules[moduleId] = {
|
22
|
+
/******/ i: moduleId,
|
23
|
+
/******/ l: false,
|
24
|
+
/******/ exports: {}
|
25
|
+
/******/ };
|
26
|
+
/******/
|
27
|
+
/******/ // Execute the module function
|
28
|
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
29
|
+
/******/
|
30
|
+
/******/ // Flag the module as loaded
|
31
|
+
/******/ module.l = true;
|
32
|
+
/******/
|
33
|
+
/******/ // Return the exports of the module
|
34
|
+
/******/ return module.exports;
|
35
|
+
/******/ }
|
36
|
+
/******/
|
37
|
+
/******/
|
38
|
+
/******/ // expose the modules object (__webpack_modules__)
|
39
|
+
/******/ __webpack_require__.m = modules;
|
40
|
+
/******/
|
41
|
+
/******/ // expose the module cache
|
42
|
+
/******/ __webpack_require__.c = installedModules;
|
43
|
+
/******/
|
44
|
+
/******/ // define getter function for harmony exports
|
45
|
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
46
|
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
47
|
+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
48
|
+
/******/ }
|
49
|
+
/******/ };
|
50
|
+
/******/
|
51
|
+
/******/ // define __esModule on exports
|
52
|
+
/******/ __webpack_require__.r = function(exports) {
|
53
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
54
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
55
|
+
/******/ }
|
56
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
57
|
+
/******/ };
|
58
|
+
/******/
|
59
|
+
/******/ // create a fake namespace object
|
60
|
+
/******/ // mode & 1: value is a module id, require it
|
61
|
+
/******/ // mode & 2: merge all properties of value into the ns
|
62
|
+
/******/ // mode & 4: return value when already ns object
|
63
|
+
/******/ // mode & 8|1: behave like require
|
64
|
+
/******/ __webpack_require__.t = function(value, mode) {
|
65
|
+
/******/ if(mode & 1) value = __webpack_require__(value);
|
66
|
+
/******/ if(mode & 8) return value;
|
67
|
+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
68
|
+
/******/ var ns = Object.create(null);
|
69
|
+
/******/ __webpack_require__.r(ns);
|
70
|
+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
71
|
+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
72
|
+
/******/ return ns;
|
73
|
+
/******/ };
|
74
|
+
/******/
|
75
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
76
|
+
/******/ __webpack_require__.n = function(module) {
|
77
|
+
/******/ var getter = module && module.__esModule ?
|
78
|
+
/******/ function getDefault() { return module['default']; } :
|
79
|
+
/******/ function getModuleExports() { return module; };
|
80
|
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
81
|
+
/******/ return getter;
|
82
|
+
/******/ };
|
83
|
+
/******/
|
84
|
+
/******/ // Object.prototype.hasOwnProperty.call
|
85
|
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
86
|
+
/******/
|
87
|
+
/******/ // __webpack_public_path__
|
88
|
+
/******/ __webpack_require__.p = "";
|
89
|
+
/******/
|
90
|
+
/******/
|
91
|
+
/******/ // Load entry module and return exports
|
92
|
+
/******/ return __webpack_require__(__webpack_require__.s = 1);
|
93
|
+
/******/ })
|
94
|
+
/************************************************************************/
|
95
|
+
/******/ ([
|
96
|
+
/* 0 */
|
97
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
98
|
+
|
99
|
+
"use strict";
|
100
|
+
__webpack_require__.r(__webpack_exports__);
|
101
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "showSpinner", function() { return showSpinner; });
|
102
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hideSpinner", function() { return hideSpinner; });
|
103
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "disableActionElements", function() { return disableActionElements; });
|
104
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "enableActionElements", function() { return enableActionElements; });
|
105
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "closeAlert", function() { return closeAlert; });
|
106
|
+
var SPINNER_ANIMATION_TIMEOUT = 125;
|
107
|
+
function showSpinner(button) {
|
108
|
+
// Adjust the width of the button
|
109
|
+
button.width(button.width() + $('.spinner').outerWidth(true)); // Show the spinner
|
110
|
+
|
111
|
+
setTimeout(function () {
|
112
|
+
button.find('.spinner').css('display', 'flex');
|
113
|
+
}, SPINNER_ANIMATION_TIMEOUT);
|
114
|
+
}
|
115
|
+
function hideSpinner() {
|
116
|
+
$('button[class^="button"]').each(function (_, button) {
|
117
|
+
setTimeout(function () {
|
118
|
+
// Hide the spinner
|
119
|
+
$(button).find('.spinner').hide(); // Adjust the width of the button
|
120
|
+
|
121
|
+
$(button).width($(button).data('oldWidth'));
|
57
122
|
}, SPINNER_ANIMATION_TIMEOUT);
|
58
|
-
}
|
59
|
-
|
60
|
-
|
61
|
-
|
123
|
+
});
|
124
|
+
}
|
125
|
+
function disableActionElements() {
|
126
|
+
$('a, input[type="submit"], input[type="button"], input[type="reset"], button').each(function (_, button) {
|
127
|
+
$(button).addClass('actions--disabled');
|
128
|
+
});
|
129
|
+
}
|
130
|
+
function enableActionElements() {
|
131
|
+
$('a, input[type="submit"], input[type="button"], input[type="reset"], button').each(function (_, button) {
|
132
|
+
$(button).removeClass('actions--disabled');
|
133
|
+
});
|
134
|
+
}
|
135
|
+
function closeAlert() {
|
136
|
+
$('.flash').removeClass('flash--shown').delay(700).queue(function () {
|
137
|
+
$(this).remove();
|
138
|
+
});
|
139
|
+
}
|
140
|
+
|
141
|
+
/***/ }),
|
142
|
+
/* 1 */
|
143
|
+
/***/ (function(module, exports, __webpack_require__) {
|
144
|
+
|
145
|
+
__webpack_require__(3);
|
146
|
+
module.exports = __webpack_require__(0);
|
147
|
+
|
148
|
+
|
149
|
+
/***/ }),
|
150
|
+
/* 2 */
|
151
|
+
/***/ (function(module, exports) {
|
152
|
+
|
153
|
+
(function ($) {
|
154
|
+
var onDOMReady = function onDOMReady() {
|
155
|
+
$('input[type="file"]').each(function () {
|
156
|
+
var $input = $(this),
|
157
|
+
$label = $(".input__file__text." + $input.attr('id')),
|
158
|
+
labelVal = $label.html();
|
159
|
+
$input.on('change', function (e) {
|
160
|
+
var fileName = '';
|
161
|
+
if (this.files && this.files.length > 1) fileName = (this.getAttribute('data-multiple-caption') || '').replace('{count}', this.files.length);else if (e.target.value) fileName = e.target.value.split('\\').pop();
|
162
|
+
if (fileName) $label.html("<svg class=\"input__file__icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M15 2v5h5v15h-16v-20h11zm1-2h-14v24h20v-18l-6-6z\"/></svg>" + fileName);else $label.html(labelVal);
|
163
|
+
}); // Firefox bug fix
|
164
|
+
|
165
|
+
$input.on('focus', function () {
|
166
|
+
$input.addClass('has-focus');
|
167
|
+
}).on('blur', function () {
|
168
|
+
$input.removeClass('has-focus');
|
169
|
+
});
|
62
170
|
});
|
63
|
-
}
|
64
|
-
|
65
|
-
|
66
|
-
|
171
|
+
};
|
172
|
+
|
173
|
+
$(document).on('ready page:load turbolinks:load', onDOMReady);
|
174
|
+
})(jQuery);
|
175
|
+
|
176
|
+
/***/ }),
|
177
|
+
/* 3 */
|
178
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
179
|
+
|
180
|
+
"use strict";
|
181
|
+
// ESM COMPAT FLAG
|
182
|
+
__webpack_require__.r(__webpack_exports__);
|
183
|
+
|
184
|
+
// EXTERNAL MODULE: ./app/javascript/beyond_canvas/initializers/functions.js
|
185
|
+
var functions = __webpack_require__(0);
|
186
|
+
|
187
|
+
// CONCATENATED MODULE: ./app/javascript/beyond_canvas/initializers/buttons.js
|
188
|
+
|
189
|
+
|
190
|
+
(function ($) {
|
191
|
+
var onDOMReady = function onDOMReady() {
|
192
|
+
var inputs = $('input, textarea, select').not(':input[type=button], :input[type=submit], :input[type=reset]');
|
193
|
+
inputs.each(function () {
|
194
|
+
var input = $(this);
|
195
|
+
input.bind('invalid', function (e) {
|
196
|
+
if ($(input).is(':hidden')) {
|
197
|
+
e.preventDefault();
|
198
|
+
}
|
199
|
+
|
200
|
+
Object(functions["hideSpinner"])();
|
201
|
+
Object(functions["enableActionElements"])();
|
202
|
+
});
|
67
203
|
});
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
204
|
+
$('button[class^="button"]').each(function () {
|
205
|
+
var button = $(this); // Add width attribute and save old width
|
206
|
+
|
207
|
+
button.width(button.width());
|
208
|
+
button.data('oldWidth', button.width()); // Add the spinner
|
209
|
+
|
210
|
+
button.prepend("\n <div class=\"spinner\">\n <div class=\"bounce1\"></div>\n <div class=\"bounce2\"></div>\n <div class=\"bounce3\"></div>\n </div>"); // Bind ajax:success and ajax:error to the form the button belongs to
|
211
|
+
|
212
|
+
button.closest('form').on('ajax:success', function () {
|
213
|
+
Object(functions["hideSpinner"])();
|
214
|
+
Object(functions["enableActionElements"])();
|
215
|
+
}).on('ajax:error', function () {
|
216
|
+
Object(functions["hideSpinner"])();
|
217
|
+
Object(functions["enableActionElements"])();
|
73
218
|
});
|
74
|
-
setTimeout(function() {
|
75
|
-
$(".flash").addClass("flash--shown");
|
76
|
-
}, 100);
|
77
|
-
};
|
78
|
-
$(document).on("click", ".flash", function() {
|
79
|
-
closeAlert();
|
80
219
|
});
|
81
|
-
|
82
|
-
|
83
|
-
function
|
84
|
-
|
85
|
-
|
220
|
+
};
|
221
|
+
|
222
|
+
$(document).on('click', '[class^="button"]', function () {
|
223
|
+
Object(functions["disableActionElements"])();
|
224
|
+
Object(functions["showSpinner"])($(this));
|
225
|
+
});
|
226
|
+
$(document).on('ready page:load turbolinks:load', onDOMReady);
|
227
|
+
})(jQuery);
|
228
|
+
// CONCATENATED MODULE: ./app/javascript/beyond_canvas/initializers/flash.js
|
229
|
+
|
230
|
+
|
231
|
+
(function ($) {
|
232
|
+
var onDOMReady = function onDOMReady() {
|
233
|
+
$('.flash').each(function () {
|
234
|
+
$(this).css('right', -$(this).width() + 'px');
|
86
235
|
});
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
236
|
+
setTimeout(function () {
|
237
|
+
$('.flash').addClass('flash--shown');
|
238
|
+
}, 100);
|
239
|
+
};
|
240
|
+
|
241
|
+
$(document).on('click', '.flash', function () {
|
242
|
+
Object(functions["closeAlert"])();
|
243
|
+
});
|
244
|
+
$(document).on('ready page:load turbolinks:load', onDOMReady);
|
245
|
+
})(jQuery);
|
246
|
+
// EXTERNAL MODULE: ./app/javascript/beyond_canvas/initializers/inputs.js
|
247
|
+
var initializers_inputs = __webpack_require__(2);
|
248
|
+
|
249
|
+
// CONCATENATED MODULE: ./app/javascript/beyond_canvas/base.js
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
/***/ })
|
255
|
+
/******/ ])));
|
@@ -1,6 +1,6 @@
|
|
1
|
-
|
1
|
+
import { disableActionElements, enableActionElements, hideSpinner, showSpinner } from './functions';
|
2
2
|
|
3
|
-
(function($) {
|
3
|
+
(function ($) {
|
4
4
|
const onDOMReady = function () {
|
5
5
|
const inputs = $('input, textarea, select').not(':input[type=button], :input[type=submit], :input[type=reset]');
|
6
6
|
|
@@ -11,9 +11,7 @@ const SPINNER_ANIMATION_TIMEOUT = 125;
|
|
11
11
|
if ($(input).is(':hidden')) {
|
12
12
|
e.preventDefault();
|
13
13
|
}
|
14
|
-
|
15
|
-
hideSpinner($(this));
|
16
|
-
});
|
14
|
+
hideSpinner();
|
17
15
|
enableActionElements();
|
18
16
|
});
|
19
17
|
});
|
@@ -31,18 +29,17 @@ const SPINNER_ANIMATION_TIMEOUT = 125;
|
|
31
29
|
<div class="bounce1"></div>
|
32
30
|
<div class="bounce2"></div>
|
33
31
|
<div class="bounce3"></div>
|
34
|
-
</div>`
|
35
|
-
);
|
32
|
+
</div>`);
|
36
33
|
|
37
34
|
// Bind ajax:success and ajax:error to the form the button belongs to
|
38
35
|
button
|
39
36
|
.closest('form')
|
40
37
|
.on('ajax:success', function () {
|
41
|
-
hideSpinner(
|
38
|
+
hideSpinner();
|
42
39
|
enableActionElements();
|
43
40
|
})
|
44
41
|
.on('ajax:error', function () {
|
45
|
-
hideSpinner(
|
42
|
+
hideSpinner();
|
46
43
|
enableActionElements();
|
47
44
|
});
|
48
45
|
});
|
@@ -53,35 +50,5 @@ const SPINNER_ANIMATION_TIMEOUT = 125;
|
|
53
50
|
showSpinner($(this));
|
54
51
|
});
|
55
52
|
|
56
|
-
$(document)
|
57
|
-
.on('ready page:load turbolinks:load', onDOMReady);
|
53
|
+
$(document).on('ready page:load turbolinks:load', onDOMReady);
|
58
54
|
})(jQuery);
|
59
|
-
|
60
|
-
function showSpinner(button) {
|
61
|
-
// Adjust the width of the button
|
62
|
-
button.width(button.width() + $('.spinner').outerWidth(true));
|
63
|
-
// Show the spinner
|
64
|
-
setTimeout(function() {
|
65
|
-
button.find('.spinner').css('display', 'flex');
|
66
|
-
}, SPINNER_ANIMATION_TIMEOUT);
|
67
|
-
}
|
68
|
-
|
69
|
-
function hideSpinner(button) {
|
70
|
-
setTimeout(function () {
|
71
|
-
// Hide the spinner
|
72
|
-
button.find('.spinner').hide();
|
73
|
-
// Adjust the width of the button
|
74
|
-
button.width(button.data('oldWidth'));
|
75
|
-
}, SPINNER_ANIMATION_TIMEOUT);
|
76
|
-
}
|
77
|
-
|
78
|
-
function disableActionElements() {
|
79
|
-
$('a, input[type="submit"], input[type="button"], input[type="reset"], button').each(function() {
|
80
|
-
$(this).addClass('actions--disabled');
|
81
|
-
});
|
82
|
-
}
|
83
|
-
function enableActionElements() {
|
84
|
-
$('a, input[type="submit"], input[type="button"], input[type="reset"], button').each(function() {
|
85
|
-
$(this).removeClass('actions--disabled');
|
86
|
-
});
|
87
|
-
}
|
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
import { closeAlert } from './functions';
|
2
|
+
|
3
|
+
(function ($) {
|
2
4
|
const onDOMReady = function () {
|
3
5
|
$('.flash').each(function () {
|
4
6
|
$(this).css('right', -$(this).width() + 'px');
|
@@ -9,19 +11,9 @@
|
|
9
11
|
}, 100);
|
10
12
|
};
|
11
13
|
|
12
|
-
$(document).on('click', '.flash', function() {
|
14
|
+
$(document).on('click', '.flash', function () {
|
13
15
|
closeAlert();
|
14
16
|
});
|
15
17
|
|
16
|
-
$(document)
|
17
|
-
.on('ready page:load turbolinks:load', onDOMReady);
|
18
|
+
$(document).on('ready page:load turbolinks:load', onDOMReady);
|
18
19
|
})(jQuery);
|
19
|
-
|
20
|
-
function closeAlert() {
|
21
|
-
$('.flash')
|
22
|
-
.removeClass('flash--shown')
|
23
|
-
.delay(700)
|
24
|
-
.queue(function() {
|
25
|
-
$(this).remove();
|
26
|
-
});
|
27
|
-
}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
const SPINNER_ANIMATION_TIMEOUT = 125;
|
2
|
+
|
3
|
+
export function showSpinner(button) {
|
4
|
+
// Adjust the width of the button
|
5
|
+
button.width(button.width() + $('.spinner').outerWidth(true));
|
6
|
+
// Show the spinner
|
7
|
+
setTimeout(function () {
|
8
|
+
button.find('.spinner').css('display', 'flex');
|
9
|
+
}, SPINNER_ANIMATION_TIMEOUT);
|
10
|
+
}
|
11
|
+
|
12
|
+
export function hideSpinner() {
|
13
|
+
$('button[class^="button"]').each(function (_, button) {
|
14
|
+
setTimeout(function () {
|
15
|
+
// Hide the spinner
|
16
|
+
$(button).find('.spinner').hide();
|
17
|
+
// Adjust the width of the button
|
18
|
+
$(button).width($(button).data('oldWidth'));
|
19
|
+
}, SPINNER_ANIMATION_TIMEOUT);
|
20
|
+
});
|
21
|
+
}
|
22
|
+
|
23
|
+
export function disableActionElements() {
|
24
|
+
$('a, input[type="submit"], input[type="button"], input[type="reset"], button').each(function (_, button) {
|
25
|
+
$(button).addClass('actions--disabled');
|
26
|
+
});
|
27
|
+
}
|
28
|
+
export function enableActionElements() {
|
29
|
+
$('a, input[type="submit"], input[type="button"], input[type="reset"], button').each(function (_, button) {
|
30
|
+
$(button).removeClass('actions--disabled');
|
31
|
+
});
|
32
|
+
}
|
33
|
+
|
34
|
+
export function closeAlert() {
|
35
|
+
$('.flash')
|
36
|
+
.removeClass('flash--shown')
|
37
|
+
.delay(700)
|
38
|
+
.queue(function () {
|
39
|
+
$(this).remove();
|
40
|
+
});
|
41
|
+
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
(function($) {
|
1
|
+
(function ($) {
|
2
2
|
const onDOMReady = function () {
|
3
3
|
$('input[type="file"]').each(function () {
|
4
4
|
var $input = $(this),
|
@@ -9,10 +9,7 @@
|
|
9
9
|
var fileName = '';
|
10
10
|
|
11
11
|
if (this.files && this.files.length > 1)
|
12
|
-
fileName = (this.getAttribute('data-multiple-caption') || '').replace(
|
13
|
-
'{count}',
|
14
|
-
this.files.length
|
15
|
-
);
|
12
|
+
fileName = (this.getAttribute('data-multiple-caption') || '').replace('{count}', this.files.length);
|
16
13
|
else if (e.target.value) fileName = e.target.value.split('\\').pop();
|
17
14
|
|
18
15
|
if (fileName)
|
@@ -33,6 +30,5 @@
|
|
33
30
|
});
|
34
31
|
};
|
35
32
|
|
36
|
-
$(document)
|
37
|
-
.on('ready page:load turbolinks:load', onDOMReady);
|
33
|
+
$(document).on('ready page:load turbolinks:load', onDOMReady);
|
38
34
|
})(jQuery);
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beyond_canvas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.15.
|
4
|
+
version: 0.15.2.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Unai Abrisketa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-06-
|
11
|
+
date: 2020-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: beyond_api
|
@@ -217,6 +217,7 @@ files:
|
|
217
217
|
- app/javascript/beyond_canvas/base.js
|
218
218
|
- app/javascript/beyond_canvas/initializers/buttons.js
|
219
219
|
- app/javascript/beyond_canvas/initializers/flash.js
|
220
|
+
- app/javascript/beyond_canvas/initializers/functions.js
|
220
221
|
- app/javascript/beyond_canvas/initializers/inputs.js
|
221
222
|
- app/views/beyond_canvas/custom/_public_head.html.erb
|
222
223
|
- app/views/beyond_canvas/locales/_edit.html.erb
|
@@ -268,7 +269,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
268
269
|
- !ruby/object:Gem::Version
|
269
270
|
version: 1.3.1
|
270
271
|
requirements: []
|
271
|
-
rubygems_version: 3.0.
|
272
|
+
rubygems_version: 3.0.1
|
272
273
|
signing_key:
|
273
274
|
specification_version: 4
|
274
275
|
summary: Open-source framework that provides CSS styles
|