angular-smart-search 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: afff81d3439ad898dec44a779c50b7769794b23c
4
- data.tar.gz: 1788b8c122639ff58903ac440b4045ec6e29c710
3
+ metadata.gz: f483c15f6ef9a4fc4d1ae0ee2e03fbe7f5cb842a
4
+ data.tar.gz: abab44645da330fe46cceea4b94c6000fe7dd263
5
5
  SHA512:
6
- metadata.gz: d1500a865df18c577b7394f59386d38713e7931da3e61929fe1ba74660eeaebd929a62de0f739564437e48db16babef5737bf1551333dedfbf5beb696bbe24ce
7
- data.tar.gz: 753a5e390b639b5b5faa30b148d810a8dd257fd5478058c38cf3661eae54a4aa24f92a2936fc0b3b6ffe613088d16b7ad5d91f78f0246b491ff90b9e77f7bf78
6
+ metadata.gz: b71dedf29680565ee810a1bb990b9e6722dde2983e777ac8bae464949ff74e2e9acd44f54732f6bd42ac19146fa4fc57d5486efa58a58d5dc29228d30f43145b
7
+ data.tar.gz: 6082e91a1e166cd158194eb256e47b8809dbbadbc7ed2c4ebcdbd61f0379c449127e3a2aac21590fa4c8b5dae1c8aee378d53882e0e9c5044a04614fdc12626e
@@ -1,5 +1,5 @@
1
1
  // author: Samuel Mueller
2
- // version: 0.0.8
2
+ // version: 0.0.9
3
3
  // license: MIT
4
4
  // homepage: http://github.com/ssmm/angular-smart-search
5
5
  (function() {
@@ -11,7 +11,8 @@
11
11
 
12
12
  angular.module("angular-smart-search").directive("smartSearch", [
13
13
  "$http", "searchQueryFactory", "templateFactory", function($http, searchQueryFactory, templateFactory) {
14
- var QueryState, successCallbacks;
14
+ var QueryState;
15
+
15
16
  QueryState = function() {
16
17
  this.state = 'initial';
17
18
  this.query = void 0;
@@ -22,7 +23,6 @@
22
23
  return this.state = state;
23
24
  };
24
25
  };
25
- successCallbacks = [];
26
26
  return {
27
27
  restrict: "A",
28
28
  scope: {
@@ -30,6 +30,7 @@
30
30
  },
31
31
  compile: function(element, attributes, transclude) {
32
32
  var detailOverlay, id_field, template;
33
+
33
34
  if (attributes.detailOverlay) {
34
35
  detailOverlay = jQuery("#" + attributes.detailOverlay);
35
36
  if (!detailOverlay[0]) {
@@ -47,7 +48,9 @@
47
48
  element.replaceWith(template);
48
49
  return {
49
50
  post: function($scope, $element, $attributes) {
50
- var allowedFormats, detailOverlayTrigger, hideOverlay, outerQueryTimeout, queryState, quickQueryInput, searchInput, searchOverlay, service, setResult, showOverlay;
51
+ var allowedFormats, detailOverlayTrigger, hideOverlay, outerQueryTimeout, queryState, quickQueryInput, searchInput, searchOverlay, service, setResult, showOverlay, successCallbacks;
52
+
53
+ successCallbacks = [];
51
54
  queryState = new QueryState();
52
55
  $scope.queryState = queryState;
53
56
  $scope.resultList = [];
@@ -132,6 +135,7 @@
132
135
  };
133
136
  setResult = function(result) {
134
137
  var callback, _i, _len, _results;
138
+
135
139
  queryState.setTo("successful");
136
140
  $scope.result = result;
137
141
  if (successCallbacks.length > 0) {
@@ -168,6 +172,7 @@
168
172
  angular.module("angular-smart-search").provider("markupStore", [
169
173
  function() {
170
174
  var infoIconClass, overlayClass, searchIconClass, successIconClass;
175
+
171
176
  successIconClass = "icon-info-sign icon-large";
172
177
  infoIconClass = "icon-info-sign";
173
178
  searchIconClass = "icon-search";
@@ -206,6 +211,7 @@
206
211
  angular.module("angular-smart-search").provider("searchQueryFactory", [
207
212
  function() {
208
213
  var Query, detectFormat, formats;
214
+
209
215
  Query = function(query, format) {
210
216
  this.format = format;
211
217
  this.query = query;
@@ -213,6 +219,7 @@
213
219
  formats = {};
214
220
  detectFormat = function(query, allowedFormats) {
215
221
  var name, _i, _len;
222
+
216
223
  for (_i = 0, _len = allowedFormats.length; _i < _len; _i++) {
217
224
  name = allowedFormats[_i];
218
225
  if (formats[name] && formats[name].pattern.exec(query)) {
@@ -222,6 +229,7 @@
222
229
  };
223
230
  this.registerFormats = function(formats) {
224
231
  var format, _i, _len, _results;
232
+
225
233
  _results = [];
226
234
  for (_i = 0, _len = formats.length; _i < _len; _i++) {
227
235
  format = formats[_i];
@@ -235,6 +243,7 @@
235
243
  return this.$get = function() {
236
244
  return function(query, allowedFormats) {
237
245
  var format;
246
+
238
247
  format = detectFormat(query, allowedFormats);
239
248
  if (format) {
240
249
  return new Query(query, format);
@@ -247,6 +256,7 @@
247
256
  angular.module("angular-smart-search").service("templateFactory", [
248
257
  "markupStore", function(markupStore) {
249
258
  var detailOverlay, detailOverlayTrigger, inputSection, overlayStyle, resultIcon, searchOverlay, showDetailOverlayAction, successIcon;
259
+
250
260
  overlayStyle = "style=' display: none; position: absolute; background-color: white; padding: 30px; border: solid; border-width: 1px; border-color: rgb(221, 221, 221); border-radius: 10px; '";
251
261
  detailOverlayTrigger = "<i detail-overlay-trigger class='" + (markupStore.infoIconClass()) + "' ng-click='showDetailOverlay()'></i>";
252
262
  successIcon = "<i class='" + (markupStore.successIconClass()) + "'></i>";
File without changes
@@ -1,3 +1,3 @@
1
1
  module AngularSmartSearch
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: angular-smart-search
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Mueller
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-16 00:00:00.000000000 Z
11
+ date: 2013-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler