binda 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -0
- data/app/assets/javascripts/binda/components/fileupload.js +19 -0
- data/app/assets/javascripts/binda/dist/binda.bundle.js +161 -139
- data/app/controllers/binda/svgs_controller.rb +71 -0
- data/app/controllers/concerns/binda/fieldable_helpers.rb +48 -20
- data/app/models/binda/binda.rb +7 -0
- data/app/models/binda/field_setting.rb +8 -6
- data/app/models/binda/image.rb +2 -2
- data/app/models/binda/svg.rb +7 -0
- data/app/models/concerns/binda/fieldable_association_helpers.rb +10 -454
- data/app/models/concerns/binda/fieldable_association_helpers/fieldable_audio_helpers.rb +55 -0
- data/app/models/concerns/binda/fieldable_association_helpers/fieldable_date_helpers.rb +30 -0
- data/app/models/concerns/binda/fieldable_association_helpers/fieldable_image_helpers.rb +95 -0
- data/app/models/concerns/binda/fieldable_association_helpers/fieldable_relation_helpers.rb +68 -0
- data/app/models/concerns/binda/fieldable_association_helpers/fieldable_repeater_helpers.rb +32 -0
- data/app/models/concerns/binda/fieldable_association_helpers/fieldable_selection_helpers.rb +60 -0
- data/app/models/concerns/binda/fieldable_association_helpers/fieldable_string_helpers.rb +56 -0
- data/app/models/concerns/binda/fieldable_association_helpers/fieldable_svg_helpers.rb +74 -0
- data/app/models/concerns/binda/fieldable_association_helpers/fieldable_text_helpers.rb +59 -0
- data/app/models/concerns/binda/fieldable_association_helpers/fieldable_video_helpers.rb +56 -0
- data/app/models/concerns/binda/fieldable_associations.rb +4 -2
- data/app/uploaders/binda/svg_uploader.rb +62 -0
- data/app/views/binda/fieldable/_form_item_svg.html.erb +33 -0
- data/app/views/binda/fieldable/_form_item_video.html.erb +9 -8
- data/app/views/binda/fieldable/_form_section.html.erb +1 -1
- data/app/views/binda/structures/form_section/_form_section_header.html.erb +1 -1
- data/config/initializers/simple_form__fileupload.rb +14 -9
- data/config/initializers/simple_form_custom.rb +1 -1
- data/config/locales/en.yml +1 -0
- data/config/routes.rb +5 -0
- data/db/migrate/1_create_binda_tables.rb +1 -0
- data/lib/binda/version.rb +1 -1
- data/lib/generators/binda/setup/setup_generator.rb +5 -1
- data/lib/tasks/update_image_details_task.rake +1 -1
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53cde4479786e2c592e11052109e6362dd8f7f7e
|
4
|
+
data.tar.gz: accd202eaa2c680a4758baa06386274a9a5e6634
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ad573ff274813badf16f692a9a345a427016051689987e84e932749e7fbcfc58ee73ab4eb992a1979c16e9211fa687097eac580b1cf0763f54c185007963d5d
|
7
|
+
data.tar.gz: fb4d4ad2059cfcc5feb9337cf580f497386de1ecb5712bbd46a099d1cb97b80740490a9a5d398040de27c07a4b108f901fd5e353f931a4dc55bb2e7d9c45d735
|
data/README.md
CHANGED
@@ -364,6 +364,7 @@ Here below a list of field types available and their use:
|
|
364
364
|
| string | Store a string. No formatting options available. | [source](http://www.rubydoc.info/gems/binda/Binda/String) |
|
365
365
|
| text | Store a text. TinyMCE let's you format the text as you like. | [source](http://www.rubydoc.info/gems/binda/Binda/Text) |
|
366
366
|
| image | Store image. | [source](http://www.rubydoc.info/gems/binda/Binda/Image) |
|
367
|
+
| svg | Store svg. | [source](http://www.rubydoc.info/gems/binda/Binda/Svg) |
|
367
368
|
| video | Store video. | [source](http://www.rubydoc.info/gems/binda/Binda/Video) |
|
368
369
|
| audio | Store audio. | [source](http://www.rubydoc.info/gems/binda/Binda/Audio) |
|
369
370
|
| date | Store a date. | [source](http://www.rubydoc.info/gems/binda/Binda/Date) |
|
@@ -440,6 +441,12 @@ You can retrieve field content from a instance of `Binda::Component`, `Binda::Bo
|
|
440
441
|
|`get_image_size`| Returns the image size in MB. | [source](http://www.rubydoc.info/gems/binda/Binda/FieldableAssociationHelpers:get_image_size) |
|
441
442
|
|`get_image_dimension`| Returns a hash { width: xxx, height: xxx } with image dimension. | [source](http://www.rubydoc.info/gems/binda/Binda/FieldableAssociationHelpers:get_image_dimension) |
|
442
443
|
|`get_image_mime_type`| Returns the mime type of the image. | [source](http://www.rubydoc.info/gems/binda/Binda/FieldableAssociationHelpers:get_image_mime_type) |
|
444
|
+
|`has_svg`| Returns `true/false`.| [source](http://www.rubydoc.info/gems/binda/Binda/FieldableAssociationHelpers:has_svg) |
|
445
|
+
|`get_svg_url`| Returns the url of the svg. | [source](http://www.rubydoc.info/gems/binda/Binda/FieldableAssociationHelpers:get_svg_url) |
|
446
|
+
|`get_svg_path`| Returns the path of the svg. | [source](http://www.rubydoc.info/gems/binda/Binda/FieldableAssociationHelpers:get_svg_path) |
|
447
|
+
|`get_svg_size`| Returns the svg size in MB. | [source](http://www.rubydoc.info/gems/binda/Binda/FieldableAssociationHelpers:get_svg_size) |
|
448
|
+
|`get_svg_mime_type`| Returns the mime type of the svg. | [source](http://www.rubydoc.info/gems/binda/Binda/FieldableAssociationHelpers:get_svg_mime_type) |
|
449
|
+
|
443
450
|
|`has_video`| Returns `true/false`.| [source](http://www.rubydoc.info/gems/binda/Binda/FieldableAssociationHelpers:has_video) |
|
444
451
|
|`get_video_url`| Returns the url of the video. | [source](http://www.rubydoc.info/gems/binda/Binda/FieldableAssociationHelpers:get_video_url) |
|
445
452
|
|`get_video_path`| Returns the path of the video. | [source](http://www.rubydoc.info/gems/binda/Binda/FieldableAssociationHelpers:get_video_path) |
|
@@ -118,6 +118,8 @@ function updateFileuploadField(data, id) {
|
|
118
118
|
setup_video_preview(data, id);
|
119
119
|
} else if (data.type == "audio") {
|
120
120
|
setup_audio_preview(data, id);
|
121
|
+
} else if (data.type == "svg") {
|
122
|
+
setup_svg_preview(data, id);
|
121
123
|
} else {
|
122
124
|
alert("Something went wrong. No preview has been received.");
|
123
125
|
}
|
@@ -243,3 +245,20 @@ function setup_audio_preview(data, id) {
|
|
243
245
|
$parent.find(".fileupload--filename").text(data.name);
|
244
246
|
$parent.find(".fileupload--previewlink a").attr("href", data.url);
|
245
247
|
}
|
248
|
+
|
249
|
+
function setup_svg_preview(data, id) {
|
250
|
+
let $parent = $("#fileupload-" + id);
|
251
|
+
let $preview = $("#fileupload-" + id + " .fileupload--preview");
|
252
|
+
|
253
|
+
// Update thumbnail
|
254
|
+
$preview.css("background-image", `url(${data.thumbnailUrl})`);
|
255
|
+
|
256
|
+
// Remove and add class to trigger css animation
|
257
|
+
let uploadedClass = "fileupload--preview--uploaded";
|
258
|
+
$preview.removeClass(uploadedClass).addClass(uploadedClass);
|
259
|
+
|
260
|
+
// Update details
|
261
|
+
$parent.find(".fileupload--filesize").text(data.size);
|
262
|
+
$parent.find(".fileupload--filename").text(data.name);
|
263
|
+
$parent.find(".fileupload--previewlink a").attr("href", data.url);
|
264
|
+
}
|
@@ -33,6 +33,9 @@
|
|
33
33
|
/******/ // expose the module cache
|
34
34
|
/******/ __webpack_require__.c = installedModules;
|
35
35
|
/******/
|
36
|
+
/******/ // identity function for calling harmony imports with the correct context
|
37
|
+
/******/ __webpack_require__.i = function(value) { return value; };
|
38
|
+
/******/
|
36
39
|
/******/ // define getter function for harmony exports
|
37
40
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
38
41
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
@@ -60,7 +63,7 @@
|
|
60
63
|
/******/ __webpack_require__.p = "";
|
61
64
|
/******/
|
62
65
|
/******/ // Load entry module and return exports
|
63
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
66
|
+
/******/ return __webpack_require__(__webpack_require__.s = 11);
|
64
67
|
/******/ })
|
65
68
|
/************************************************************************/
|
66
69
|
/******/ ([
|
@@ -165,7 +168,7 @@ function setupAndAppend(newItem, $list) {
|
|
165
168
|
var collapsable = $list.find(".form-item--collapsable").get(0);
|
166
169
|
|
167
170
|
// Update select input for Select2 plugin
|
168
|
-
|
171
|
+
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__select2__["b" /* setupSelect2 */])($list.find("select"));
|
169
172
|
|
170
173
|
setupTinyMCE($list.find("textarea"));
|
171
174
|
|
@@ -355,66 +358,13 @@ function setupSelect2(target) {
|
|
355
358
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
356
359
|
|
357
360
|
"use strict";
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_field_setting_choices__ = __webpack_require__(4);
|
362
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__components_fileupload__ = __webpack_require__(5);
|
363
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__components_login_shader__ = __webpack_require__(6);
|
364
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__components_login_form__ = __webpack_require__(7);
|
365
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__components_sortable__ = __webpack_require__(8);
|
366
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__components_field_group_editor__ = __webpack_require__(9);
|
367
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__components_bootstrap__ = __webpack_require__(10);
|
368
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__components_select2__ = __webpack_require__(1);
|
369
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__components_radio_toggle__ = __webpack_require__(11);
|
370
|
-
///- - - - - - - - - - - - - - - - - - - -
|
371
|
-
/// INDEX OF BINDA'S SCRIPTS
|
372
|
-
///- - - - - - - - - - - - - - - - - - - -
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
$(document).ready(function () {
|
387
|
-
if (__WEBPACK_IMPORTED_MODULE_0__components_form_item_collapsable__["a" /* _FormItemCollapsable */].isPresent()) {
|
388
|
-
__WEBPACK_IMPORTED_MODULE_0__components_form_item_collapsable__["a" /* _FormItemCollapsable */].setEvents();
|
389
|
-
}
|
390
|
-
if (__WEBPACK_IMPORTED_MODULE_1__components_form_item_image__["a" /* _FormItemImage */].isPresent()) {
|
391
|
-
__WEBPACK_IMPORTED_MODULE_1__components_form_item_image__["a" /* _FormItemImage */].setEvents();
|
392
|
-
}
|
393
|
-
if (__WEBPACK_IMPORTED_MODULE_2__components_field_setting_choices__["a" /* _FieldSettingChoices */].isPresent()) {
|
394
|
-
__WEBPACK_IMPORTED_MODULE_2__components_field_setting_choices__["a" /* _FieldSettingChoices */].setEvents();
|
395
|
-
}
|
396
|
-
if (__WEBPACK_IMPORTED_MODULE_3__components_fileupload__["a" /* _FileUpload */].isPresent()) {
|
397
|
-
__WEBPACK_IMPORTED_MODULE_3__components_fileupload__["a" /* _FileUpload */].setEvents();
|
398
|
-
}
|
399
|
-
if (__WEBPACK_IMPORTED_MODULE_5__components_login_form__["a" /* _LoginForm */].isPresent()) {
|
400
|
-
__WEBPACK_IMPORTED_MODULE_5__components_login_form__["a" /* _LoginForm */].init();
|
401
|
-
}
|
402
|
-
if (__WEBPACK_IMPORTED_MODULE_4__components_login_shader__["a" /* _Shader */].isPresent()) {
|
403
|
-
__WEBPACK_IMPORTED_MODULE_4__components_login_shader__["a" /* _Shader */].setup();
|
404
|
-
__WEBPACK_IMPORTED_MODULE_4__components_login_shader__["a" /* _Shader */].start();
|
405
|
-
}
|
406
|
-
Object(__WEBPACK_IMPORTED_MODULE_10__components_radio_toggle__["a" /* default */])();
|
407
|
-
Object(__WEBPACK_IMPORTED_MODULE_6__components_sortable__["a" /* default */])();
|
408
|
-
Object(__WEBPACK_IMPORTED_MODULE_7__components_field_group_editor__["a" /* default */])();
|
409
|
-
Object(__WEBPACK_IMPORTED_MODULE_8__components_bootstrap__["a" /* default */])();
|
410
|
-
Object(__WEBPACK_IMPORTED_MODULE_9__components_select2__["a" /* default */])();
|
411
|
-
});
|
361
|
+
/**
|
362
|
+
* BOOSTRAP SCRIPT
|
363
|
+
*/
|
412
364
|
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
__WEBPACK_IMPORTED_MODULE_4__components_login_shader__["a" /* _Shader */].resize();
|
417
|
-
}
|
365
|
+
/* harmony default export */ __webpack_exports__["a"] = (function () {
|
366
|
+
// See https://v4-alpha.getbootstrap.com/components/tooltips/#example-enable-tooltips-everywhere
|
367
|
+
$('[data-toggle="tooltip"]').tooltip();
|
418
368
|
});
|
419
369
|
|
420
370
|
/***/ }),
|
@@ -422,40 +372,22 @@ window.addEventListener("optimizedResize", function () {
|
|
422
372
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
423
373
|
|
424
374
|
"use strict";
|
425
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _FormItemImage; });
|
426
|
-
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; }; }();
|
427
|
-
|
428
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
429
|
-
|
430
375
|
/**
|
431
|
-
*
|
376
|
+
* FIELD GROUP EDITOR
|
432
377
|
*/
|
433
378
|
|
434
|
-
|
435
|
-
function
|
436
|
-
|
437
|
-
|
438
|
-
this.target = ".form-item--image--uploader";
|
439
|
-
}
|
379
|
+
/* harmony default export */ __webpack_exports__["a"] = (function () {
|
380
|
+
$(".field_groups-edit #save").on("click", function (event) {
|
381
|
+
var instanceType = $(this).data("instance-type");
|
382
|
+
var entriesNumber = $(this).data("entries-number");
|
440
383
|
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
return true;
|
446
|
-
} else {
|
447
|
-
return false;
|
448
|
-
}
|
384
|
+
// If the current structure have many entries updating the field group
|
385
|
+
// might be a slow operation, therefore it's good practice to inform the user
|
386
|
+
if (entriesNumber > 500) {
|
387
|
+
alert("You have " + entriesNumber + " " + instanceType + ". This operation might take some time to complete. To avoid unexpected behaviour don't leave or refresh the page");
|
449
388
|
}
|
450
|
-
}
|
451
|
-
|
452
|
-
value: function setEvents() {}
|
453
|
-
}]);
|
454
|
-
|
455
|
-
return FormItemImage;
|
456
|
-
}();
|
457
|
-
|
458
|
-
var _FormItemImage = new FormItemImage();
|
389
|
+
});
|
390
|
+
});
|
459
391
|
|
460
392
|
/***/ }),
|
461
393
|
/* 4 */
|
@@ -501,7 +433,7 @@ var FieldSettingChoices = function () {
|
|
501
433
|
event.preventDefault();
|
502
434
|
$(this).closest(".field-setting-choices--choice").remove();
|
503
435
|
// Update form item editor size
|
504
|
-
|
436
|
+
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__form_item_collapsable__["d" /* resizeCollapsableStacks */])();
|
505
437
|
});
|
506
438
|
}
|
507
439
|
}]);
|
@@ -526,7 +458,7 @@ function addChoice(event) {
|
|
526
458
|
// Append the clone right after
|
527
459
|
choices.prepend(clone);
|
528
460
|
// Update form item editor size
|
529
|
-
|
461
|
+
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__form_item_collapsable__["d" /* resizeCollapsableStacks */])();
|
530
462
|
}
|
531
463
|
|
532
464
|
function deleteChoice(event) {
|
@@ -542,7 +474,7 @@ function deleteChoice(event) {
|
|
542
474
|
}).done(function () {
|
543
475
|
choice.remove();
|
544
476
|
// Update form item editor size
|
545
|
-
|
477
|
+
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__form_item_collapsable__["d" /* resizeCollapsableStacks */])();
|
546
478
|
}).fail(function (data) {
|
547
479
|
alert(data.responseJSON.errors);
|
548
480
|
});
|
@@ -683,6 +615,8 @@ function updateFileuploadField(data, id) {
|
|
683
615
|
setup_video_preview(data, id);
|
684
616
|
} else if (data.type == "audio") {
|
685
617
|
setup_audio_preview(data, id);
|
618
|
+
} else if (data.type == "svg") {
|
619
|
+
setup_svg_preview(data, id);
|
686
620
|
} else {
|
687
621
|
alert("Something went wrong. No preview has been received.");
|
688
622
|
}
|
@@ -780,10 +714,67 @@ function setup_audio_preview(data, id) {
|
|
780
714
|
$parent.find(".fileupload--previewlink a").attr("href", data.url);
|
781
715
|
}
|
782
716
|
|
717
|
+
function setup_svg_preview(data, id) {
|
718
|
+
var $parent = $("#fileupload-" + id);
|
719
|
+
var $preview = $("#fileupload-" + id + " .fileupload--preview");
|
720
|
+
|
721
|
+
// Update thumbnail
|
722
|
+
$preview.css("background-image", "url(" + data.thumbnailUrl + ")");
|
723
|
+
|
724
|
+
// Remove and add class to trigger css animation
|
725
|
+
var uploadedClass = "fileupload--preview--uploaded";
|
726
|
+
$preview.removeClass(uploadedClass).addClass(uploadedClass);
|
727
|
+
|
728
|
+
// Update details
|
729
|
+
$parent.find(".fileupload--filesize").text(data.size);
|
730
|
+
$parent.find(".fileupload--filename").text(data.name);
|
731
|
+
$parent.find(".fileupload--previewlink a").attr("href", data.url);
|
732
|
+
}
|
733
|
+
|
783
734
|
/***/ }),
|
784
735
|
/* 6 */
|
785
736
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
786
737
|
|
738
|
+
"use strict";
|
739
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _FormItemImage; });
|
740
|
+
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; }; }();
|
741
|
+
|
742
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
743
|
+
|
744
|
+
/**
|
745
|
+
* FORM ITEM IMAGE
|
746
|
+
*/
|
747
|
+
|
748
|
+
var FormItemImage = function () {
|
749
|
+
function FormItemImage() {
|
750
|
+
_classCallCheck(this, FormItemImage);
|
751
|
+
|
752
|
+
this.target = ".form-item--image--uploader";
|
753
|
+
}
|
754
|
+
|
755
|
+
_createClass(FormItemImage, [{
|
756
|
+
key: "isPresent",
|
757
|
+
value: function isPresent() {
|
758
|
+
if ($(this.target).length > 0) {
|
759
|
+
return true;
|
760
|
+
} else {
|
761
|
+
return false;
|
762
|
+
}
|
763
|
+
}
|
764
|
+
}, {
|
765
|
+
key: "setEvents",
|
766
|
+
value: function setEvents() {}
|
767
|
+
}]);
|
768
|
+
|
769
|
+
return FormItemImage;
|
770
|
+
}();
|
771
|
+
|
772
|
+
var _FormItemImage = new FormItemImage();
|
773
|
+
|
774
|
+
/***/ }),
|
775
|
+
/* 7 */
|
776
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
777
|
+
|
787
778
|
"use strict";
|
788
779
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _Shader; });
|
789
780
|
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; }; }();
|
@@ -998,7 +989,7 @@ function hexToShaderRgb(hex) {
|
|
998
989
|
})();
|
999
990
|
|
1000
991
|
/***/ }),
|
1001
|
-
/*
|
992
|
+
/* 8 */
|
1002
993
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1003
994
|
|
1004
995
|
"use strict";
|
@@ -1127,7 +1118,27 @@ var LoginForm = function () {
|
|
1127
1118
|
var _LoginForm = new LoginForm();
|
1128
1119
|
|
1129
1120
|
/***/ }),
|
1130
|
-
/*
|
1121
|
+
/* 9 */
|
1122
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1123
|
+
|
1124
|
+
"use strict";
|
1125
|
+
/* harmony default export */ __webpack_exports__["a"] = (function () {
|
1126
|
+
$('input[name="login"]').click(function () {
|
1127
|
+
var $radio = $(this);
|
1128
|
+
|
1129
|
+
// if this was previously checked
|
1130
|
+
if ($radio.data("waschecked") === true) {
|
1131
|
+
$radio.prop("checked", false);
|
1132
|
+
$radio.data("waschecked", false);
|
1133
|
+
} else $radio.data("waschecked", true);
|
1134
|
+
|
1135
|
+
// remove was checked from other radios
|
1136
|
+
$radio.siblings('input[name="login"]').data("waschecked", false);
|
1137
|
+
});
|
1138
|
+
});
|
1139
|
+
|
1140
|
+
/***/ }),
|
1141
|
+
/* 10 */
|
1131
1142
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1132
1143
|
|
1133
1144
|
"use strict";
|
@@ -1184,7 +1195,7 @@ var sortableOptions = {
|
|
1184
1195
|
function setupSortableToggle() {
|
1185
1196
|
$(".sortable--toggle").each(function () {
|
1186
1197
|
var id = "#" + $(this).data("sortable-target-id");
|
1187
|
-
|
1198
|
+
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__form_item_collapsable__["b" /* closeCollapsableStacks */])(id);
|
1188
1199
|
});
|
1189
1200
|
// Add event to any sortable toggle button
|
1190
1201
|
$(document).on("click", ".sortable--toggle", toggleSortable);
|
@@ -1196,10 +1207,10 @@ function toggleSortable(event) {
|
|
1196
1207
|
|
1197
1208
|
if ($(id).hasClass("sortable--disabled")) {
|
1198
1209
|
$(id).sortable("enable");
|
1199
|
-
|
1210
|
+
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__form_item_collapsable__["b" /* closeCollapsableStacks */])(id);
|
1200
1211
|
} else {
|
1201
1212
|
$(id).sortable("disable");
|
1202
|
-
|
1213
|
+
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__form_item_collapsable__["c" /* openCollapsableStacks */])(id);
|
1203
1214
|
}
|
1204
1215
|
|
1205
1216
|
$(id).toggleClass("sortable--disabled");
|
@@ -1229,59 +1240,70 @@ function updateSortable() {
|
|
1229
1240
|
}
|
1230
1241
|
|
1231
1242
|
/***/ }),
|
1232
|
-
/*
|
1243
|
+
/* 11 */
|
1233
1244
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1234
1245
|
|
1235
1246
|
"use strict";
|
1236
|
-
|
1237
|
-
|
1238
|
-
*/
|
1247
|
+
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
1248
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_form_item_collapsable__ = __webpack_require__(0);
|
1249
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_form_item_image__ = __webpack_require__(6);
|
1250
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_field_setting_choices__ = __webpack_require__(4);
|
1251
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__components_fileupload__ = __webpack_require__(5);
|
1252
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__components_login_shader__ = __webpack_require__(7);
|
1253
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__components_login_form__ = __webpack_require__(8);
|
1254
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__components_sortable__ = __webpack_require__(10);
|
1255
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__components_field_group_editor__ = __webpack_require__(3);
|
1256
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__components_bootstrap__ = __webpack_require__(2);
|
1257
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__components_select2__ = __webpack_require__(1);
|
1258
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__components_radio_toggle__ = __webpack_require__(9);
|
1259
|
+
///- - - - - - - - - - - - - - - - - - - -
|
1260
|
+
/// INDEX OF BINDA'S SCRIPTS
|
1261
|
+
///- - - - - - - - - - - - - - - - - - - -
|
1239
1262
|
|
1240
|
-
/* harmony default export */ __webpack_exports__["a"] = (function () {
|
1241
|
-
$(".field_groups-edit #save").on("click", function (event) {
|
1242
|
-
var instanceType = $(this).data("instance-type");
|
1243
|
-
var entriesNumber = $(this).data("entries-number");
|
1244
1263
|
|
1245
|
-
// If the current structure have many entries updating the field group
|
1246
|
-
// might be a slow operation, therefore it's good practice to inform the user
|
1247
|
-
if (entriesNumber > 500) {
|
1248
|
-
alert("You have " + entriesNumber + " " + instanceType + ". This operation might take some time to complete. To avoid unexpected behaviour don't leave or refresh the page");
|
1249
|
-
}
|
1250
|
-
});
|
1251
|
-
});
|
1252
1264
|
|
1253
|
-
/***/ }),
|
1254
|
-
/* 10 */
|
1255
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1256
1265
|
|
1257
|
-
"use strict";
|
1258
|
-
/**
|
1259
|
-
* BOOSTRAP SCRIPT
|
1260
|
-
*/
|
1261
1266
|
|
1262
|
-
/* harmony default export */ __webpack_exports__["a"] = (function () {
|
1263
|
-
// See https://v4-alpha.getbootstrap.com/components/tooltips/#example-enable-tooltips-everywhere
|
1264
|
-
$('[data-toggle="tooltip"]').tooltip();
|
1265
|
-
});
|
1266
1267
|
|
1267
|
-
/***/ }),
|
1268
|
-
/* 11 */
|
1269
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1270
1268
|
|
1271
|
-
"use strict";
|
1272
|
-
/* harmony default export */ __webpack_exports__["a"] = (function () {
|
1273
|
-
$('input[name="login"]').click(function () {
|
1274
|
-
var $radio = $(this);
|
1275
1269
|
|
1276
|
-
// if this was previously checked
|
1277
|
-
if ($radio.data("waschecked") === true) {
|
1278
|
-
$radio.prop("checked", false);
|
1279
|
-
$radio.data("waschecked", false);
|
1280
|
-
} else $radio.data("waschecked", true);
|
1281
1270
|
|
1282
|
-
|
1283
|
-
|
1284
|
-
|
1271
|
+
|
1272
|
+
|
1273
|
+
|
1274
|
+
|
1275
|
+
$(document).ready(function () {
|
1276
|
+
if (__WEBPACK_IMPORTED_MODULE_0__components_form_item_collapsable__["a" /* _FormItemCollapsable */].isPresent()) {
|
1277
|
+
__WEBPACK_IMPORTED_MODULE_0__components_form_item_collapsable__["a" /* _FormItemCollapsable */].setEvents();
|
1278
|
+
}
|
1279
|
+
if (__WEBPACK_IMPORTED_MODULE_1__components_form_item_image__["a" /* _FormItemImage */].isPresent()) {
|
1280
|
+
__WEBPACK_IMPORTED_MODULE_1__components_form_item_image__["a" /* _FormItemImage */].setEvents();
|
1281
|
+
}
|
1282
|
+
if (__WEBPACK_IMPORTED_MODULE_2__components_field_setting_choices__["a" /* _FieldSettingChoices */].isPresent()) {
|
1283
|
+
__WEBPACK_IMPORTED_MODULE_2__components_field_setting_choices__["a" /* _FieldSettingChoices */].setEvents();
|
1284
|
+
}
|
1285
|
+
if (__WEBPACK_IMPORTED_MODULE_3__components_fileupload__["a" /* _FileUpload */].isPresent()) {
|
1286
|
+
__WEBPACK_IMPORTED_MODULE_3__components_fileupload__["a" /* _FileUpload */].setEvents();
|
1287
|
+
}
|
1288
|
+
if (__WEBPACK_IMPORTED_MODULE_5__components_login_form__["a" /* _LoginForm */].isPresent()) {
|
1289
|
+
__WEBPACK_IMPORTED_MODULE_5__components_login_form__["a" /* _LoginForm */].init();
|
1290
|
+
}
|
1291
|
+
if (__WEBPACK_IMPORTED_MODULE_4__components_login_shader__["a" /* _Shader */].isPresent()) {
|
1292
|
+
__WEBPACK_IMPORTED_MODULE_4__components_login_shader__["a" /* _Shader */].setup();
|
1293
|
+
__WEBPACK_IMPORTED_MODULE_4__components_login_shader__["a" /* _Shader */].start();
|
1294
|
+
}
|
1295
|
+
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__components_radio_toggle__["a" /* default */])();
|
1296
|
+
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__components_sortable__["a" /* default */])();
|
1297
|
+
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__components_field_group_editor__["a" /* default */])();
|
1298
|
+
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__components_bootstrap__["a" /* default */])();
|
1299
|
+
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__components_select2__["a" /* default */])();
|
1300
|
+
});
|
1301
|
+
|
1302
|
+
// handle event
|
1303
|
+
window.addEventListener("optimizedResize", function () {
|
1304
|
+
if (__WEBPACK_IMPORTED_MODULE_4__components_login_shader__["a" /* _Shader */].isPresent()) {
|
1305
|
+
__WEBPACK_IMPORTED_MODULE_4__components_login_shader__["a" /* _Shader */].resize();
|
1306
|
+
}
|
1285
1307
|
});
|
1286
1308
|
|
1287
1309
|
/***/ })
|