Sha256: e132ed84080eed1236b1df39dddaadc17c24f1038199a7c98a260357728ba18d
Contents?: true
Size: 1.05 KB
Versions: 15
Compression:
Stored size: 1.05 KB
Contents
// = require_self (() => { const initConstraintFields = ($section) => { const $select = $("select.constraint-subject-selector", $section); const $modelSelect = $("select.constraint-subject-model-selector", $section); $select.on( "change init", /* @this HTMLElement */ function() { const val = $(this).val(); $("[data-manifest]", $section).hide(); $(`[data-manifest="${val}"]`, $section).show(); } ).trigger("init"); $modelSelect.on( "change init", /* @this HTMLElement */ function() { const $container = $(this).parents(".manifest-container"); const val = $(this).val(); $("[data-components]", $container).hide(); $(`[data-components="${val}"]`, $container).show(); } ).trigger("init"); }; $.fn.constraintSection = function() { $(this).each( /** * @this HTMLElement * @return {void} */ function() { const $section = $(this); initConstraintFields($section); } ) } })();
Version data entries
15 entries across 15 versions & 1 rubygems