{:uriI"Òfile:///Library/WebServer/Documents/work/fine/_fae/app/assets/javascripts/fae/form/inputs/_select.js?type=application/javascript&pipeline=self&id=620bde0cb07da43233a4f88902a0bdeeb8a43f93900f2b3b09945fcf9a3a7b41:ET:load_pathI"G/Library/WebServer/Documents/work/fine/_fae/app/assets/javascripts;F: filenameI"b/Library/WebServer/Documents/work/fine/_fae/app/assets/javascripts/fae/form/inputs/_select.js;T: nameI"fae/form/inputs/_select;T:logical_pathI"$fae/form/inputs/_select.self.js;T:content_typeI"application/javascript;T:sourceI"</* global Fae, multiSelect, fae_chosen */ /** * Fae form select * @namespace form.select * @memberof form */ Fae.form.select = { init: function() { this.multiselectOrChosen(); }, /** * Initialize multi select fields or regular select fields and add appropriate available/added item helper text */ multiselectOrChosen: function() { var _this = this; var availableItemsStr = ' Available Items'; var addedItemsStr = ' Added Items'; /** * On selection change, update items left and currently added * @private */ function updateMultiselectHeader() { var $instance = $(this)[0]; $('.ms-selectable .custom-header').text( $instance.$selectableContainer.find($instance.elemsSelector).length + availableItemsStr); $('.ms-selection .custom-header').text( $instance.$selectionContainer.find($instance.elemsSelector).length + addedItemsStr); } $('select').each(function(index, elm){ var $this = $(this); if ($this.hasClass('multiselect')) { $this.multiSelect({ selectableHeader: '
', selectionHeader: '', afterSelect: function(values) { updateMultiselectHeader.call(this); }, afterDeselect: function(values) { updateMultiselectHeader.call(this); } }); var selectableCount = $this.next('.ms-container').find('.ms-selectable li').not('.ms-selected').length var selectedCount = $this.next('.ms-container').find('.ms-selection .ms-selected').length; $('.ms-selectable .custom-header').text(selectableCount + availableItemsStr); $('.ms-selection .custom-header').text(selectedCount + addedItemsStr); } else { $this.fae_chosen(); } }); } }; ;T: metadata{:dependencieso:Set: @hash} I"environment-version;TTI"environment-paths;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"pfile-digest:///Library/WebServer/Documents/work/fine/_fae/app/assets/javascripts/fae/form/inputs/_select.js;TTF: requiredo;;} F:stubbedo;;} F: linkso;;} F:charsetI" utf-8;F:digest"%¤ß~ÊP‰S`¤:$Kéà^Xw¸4cÛ·V¾ûÚéÅ¢:lengthi<:integrityI"Xni:///sha-256;pB3ffg7KUIlTYKQ6JEvp4F5Yd7g0Y9u3Vr772g_pxaI?ct=application/javascript;T:dependencies_digest"%X&‡›Q)ÖY˜HyD|€Ó]ïêº|ŽïÙÉ+M§¥Žö?‡:idI"E620bde0cb07da43233a4f88902a0bdeeb8a43f93900f2b3b09945fcf9a3a7b41;F: mtimel+FlRW