Blame view
__public/js/dist/9ba4.647e7fd4c29c21da4db0.js
883 Bytes
e77200db5 Initial commit |
1 |
(window.webpackJsonp=window.webpackJsonp||[]).push([["9ba4"],{"d6+2":function(e,a,t){},"m/V4":function(e,a,t){"use strict";t("K01x"),t("d6+2");a.a=angular.module("fr.teamTypeahead",[]).directive("teamTypeahead",["$http","$interpolate",function(e,a){return{restrict:"A",require:"^ngModel",link:function(t,n,i,u){$(n).typeahead({highlight:!0},{displayKey:"team_name",templates:{suggestion:function(e){return"national"===i.teamTypeahead?a("{{ team_name }}")(e):a("{{ team_name }} - {{ country }}")(e)}},source:function(a,t){return e.get("/suggest/team",{params:{q:a,teamType:i.teamTypeahead}}).then(function(e){t(e.data)})}}).on("typeahead:selected typeahead:autocompleted",function(e,a){u.$setViewValue(a)}),u.$parsers.push(function(e){return u.$setValidity("typeahead",u.$isEmpty(e)||angular.isObject(e)||e===u.$modelValue&&u.$valid),angular.isObject(e)?e.team_name:e})}}}]).name}}]); |