{:uriI"Òfile:///Library/WebServer/Documents/work/fine/_fae/app/assets/javascripts/fae/form/inputs/_select.js?type=application/javascript&pipeline=self&id=f710e191c33c0d83298eadab4674be28fa538c1fcfd9862c130169c222e3c2bf:ET:load_pathI"G/Library/WebServer/Documents/work/fine/_fae/app/assets/javascripts;T: 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"rails-env;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<:dependencies_digest"%߃z–­>¢zS#W ¿TKb=ç7!²dÃR¶:idI"Ef710e191c33c0d83298eadab4674be28fa538c1fcfd9862c130169c222e3c2bf;F: mtimel+ÉZ Y