Lines Matching full:strategy
61 warn(name + 'as a strategy param is deprecated. Use option.');
66 completer.register($.fn.textcomplete.Strategy.parse(strategies, {
287 // strategy - The Strategy object.
289 select: function (value, strategy, e) { argument
291 this.adapter.select(value, strategy, e);
292 this.fire('change').fire('textComplete:select', value, strategy);
305 // Parse the given text and extract the first matching strategy.
307 // Returns an array including the strategy, the query term and the match
308 // object if the text matches an strategy; otherwise returns an empty array.
311 var strategy = this.strategies[i];
312 var context = strategy.context(text);
314 var matchRegexp = $.isFunction(strategy.match) ? strategy.match(text) : strategy.match;
317 if (match) { return [strategy, match[strategy.index], match]; }
323 // Call the search method of selected strategy..
324 _search: lock(function (free, strategy, term, match) {
326 strategy.search(term, function (data, stillSearching) {
336 self.dropdown.render(self._zip(data, strategy, term));
350 // //=> [{ value: 'a', strategy: 's' }, { value: 'b', strategy: 's' }]
351 _zip: function (data, strategy, term) { argument
353 return { value: value, strategy: strategy, term: term };
384 var idProperty = datum.strategy.idProperty;
387 if (elem.strategy !== datum.strategy) continue;
496 var strategy = zippedData[0].strategy;
497 if (strategy.id) {
498 this.$el.attr('data-strategy', strategy.id);
500 this.$el.removeAttr('data-strategy');
620 this.completer.select(datum.value, datum.strategy, e);
720 this.completer.select(datum.value, datum.strategy, e);
784 html += datum.strategy.template(datum.value, datum.term);
901 function Strategy(options) { class
906 Strategy.parse = function (strategiesArray, params) {
907 return $.map(strategiesArray, function (strategy) { argument
908 var strategyObj = new Strategy(strategy);
915 $.extend(Strategy.prototype, {
933 $.fn.textcomplete.Strategy = Strategy;
1005 // Update the element with the given value and strategy.
1009 // strategy - The Strategy associated with the selected value.
1010 select: function (/* value, strategy */) {
1091 // Update the textarea with the given value and strategy.
1092 select: function (value, strategy, e) { argument
1095 var newSubstr = strategy.replace(value, e);
1102 regExp = $.isFunction(strategy.match) ? strategy.match(pre) : strategy.match;
1166 select: function (value, strategy, e) { argument
1169 var newSubstr = strategy.replace(value, e);
1176 regExp = $.isFunction(strategy.match) ? strategy.match(pre) : strategy.match;
1219 // Update the content with the given value and strategy.
1221 select: function (value, strategy, e) { argument
1231 var newSubstr = strategy.replace(value, e);
1238 regExp = $.isFunction(strategy.match) ? strategy.match(pre) : strategy.match;