mice 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ffefbc2cd5b26016c6c934bc5e09fb780c33c91c
4
- data.tar.gz: 69520a13bddc0b493f32847ba2d407dd7d3503f7
3
+ metadata.gz: 2f6e573887bc35d8edb28f891db4f88c0963987b
4
+ data.tar.gz: a5d9a9c4d66c280aabae88c0446e09c9a66743cd
5
5
  SHA512:
6
- metadata.gz: d610ca686a559a75ba77bd257b1d4377fdfc6f5a243c4d994a2c5d460bc19f5dfe3f3fd6a6fd207e92e21cd320dd384358e812f23175d6dfba672ec31aec2b46
7
- data.tar.gz: 3ba91a1a12ee19efd0045fadd2529f1b87cbb2cf240c2315b655f1be9cda7d35e86faee525c60debb3950cee341e7e709acfd89190d7f4bcf07c20202e0d3b43
6
+ metadata.gz: 4540f292de0b85f63e62048f857e3b2558acc673bc337208fb9ace5bdaa53c764b08f34d371597e2d6488f8d4218b297a397d00a5b5c9f5c626a2a4233e4e303
7
+ data.tar.gz: 4a2b10949d9c5d41aca33f4fab7760b3ef720f2758b05b5b50c7ceb27a690f72522ef2fb6f5ee958ea96fad9f091ca5a44d33dc610c2075727b5b29fd1f55df0
@@ -1,31 +1,31 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mice (0.1.4)
4
+ mice (0.1.5)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- activesupport (4.0.4)
9
+ activesupport (4.0.5)
10
10
  i18n (~> 0.6, >= 0.6.9)
11
11
  minitest (~> 4.2)
12
12
  multi_json (~> 1.3)
13
13
  thread_safe (~> 0.1)
14
14
  tzinfo (~> 0.3.37)
15
- chunky_png (1.3.0)
15
+ chunky_png (1.3.1)
16
16
  coffee-script (2.2.0)
17
17
  coffee-script-source
18
18
  execjs
19
19
  coffee-script-source (1.7.0)
20
- compass (0.12.5)
20
+ compass (0.12.6)
21
21
  chunky_png (~> 1.2)
22
22
  fssm (>= 0.2.7)
23
23
  sass (~> 3.2.19)
24
24
  compass-import-once (1.0.4)
25
25
  sass (>= 3.2, < 3.5)
26
- em-websocket (0.5.0)
26
+ em-websocket (0.5.1)
27
27
  eventmachine (>= 0.12.9)
28
- http_parser.rb (~> 0.5.3)
28
+ http_parser.rb (~> 0.6.0)
29
29
  erubis (2.7.0)
30
30
  eventmachine (1.0.3)
31
31
  execjs (2.0.2)
@@ -36,7 +36,7 @@ GEM
36
36
  hike (1.2.3)
37
37
  hooks (0.4.0)
38
38
  uber (~> 0.0.4)
39
- http_parser.rb (0.5.3)
39
+ http_parser.rb (0.6.0)
40
40
  i18n (0.6.9)
41
41
  json (1.8.1)
42
42
  kramdown (1.3.3)
@@ -72,16 +72,16 @@ GEM
72
72
  middleman-core (>= 3.0.2)
73
73
  multi_json (~> 1.0)
74
74
  rack-livereload
75
- middleman-sprockets (3.3.2)
75
+ middleman-sprockets (3.3.3)
76
76
  middleman-core (>= 3.2)
77
77
  sprockets (~> 2.2)
78
78
  sprockets-helpers (~> 1.1.0)
79
- sprockets-sass (~> 1.0.0)
79
+ sprockets-sass (~> 1.1.0)
80
80
  middleman-syntax (2.0.0)
81
81
  middleman-core (~> 3.2)
82
82
  rouge (~> 1.0)
83
83
  minitest (4.7.5)
84
- multi_json (1.9.2)
84
+ multi_json (1.10.0)
85
85
  padrino-helpers (0.12.1)
86
86
  i18n (~> 0.6, >= 0.6.7)
87
87
  padrino-support (= 0.12.1)
@@ -94,20 +94,20 @@ GEM
94
94
  rack-test (0.6.2)
95
95
  rack (>= 1.0)
96
96
  rb-fsevent (0.9.4)
97
- rb-inotify (0.9.3)
97
+ rb-inotify (0.9.4)
98
98
  ffi (>= 0.5.0)
99
99
  rb-kqueue (0.2.2)
100
100
  ffi (>= 0.5.0)
101
- rouge (1.3.3)
101
+ rouge (1.3.4)
102
102
  sass (3.2.19)
103
- sprockets (2.12.0)
103
+ sprockets (2.12.1)
104
104
  hike (~> 1.2)
105
105
  multi_json (~> 1.0)
106
106
  rack (~> 1.0)
107
107
  tilt (~> 1.1, != 1.3.0)
108
108
  sprockets-helpers (1.1.0)
109
109
  sprockets (~> 2.0)
110
- sprockets-sass (1.0.3)
110
+ sprockets-sass (1.1.0)
111
111
  sprockets (~> 2.0)
112
112
  tilt (~> 1.1)
113
113
  thor (0.19.1)
@@ -1,3 +1,3 @@
1
1
  module Mice
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Ajax Autocomplete for jQuery, version 1.2.9
3
+ * (c) 2013 Tomas Kirda
4
+ *
5
+ * Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license.
6
+ * For details, see the web site: https://github.com/devbridge/jQuery-Autocomplete
7
+ *
8
+ */
9
+ (function(d){"function"===typeof define&&define.amd?define(["jquery"],d):d(jQuery)})(function(d){function g(a,b){var c=function(){},c={autoSelectFirst:!1,appendTo:"body",serviceUrl:null,lookup:null,onSelect:null,width:"auto",minChars:1,maxHeight:300,deferRequestBy:0,params:{},formatResult:g.formatResult,delimiter:null,zIndex:9999,type:"GET",noCache:!1,onSearchStart:c,onSearchComplete:c,onSearchError:c,containerClass:"autocomplete-suggestions",tabDisabled:!1,dataType:"text",currentRequest:null,triggerSelectOnValidInput:!0,
10
+ lookupFilter:function(a,b,c){return-1!==a.value.toLowerCase().indexOf(c)},paramName:"query",transformResult:function(a){return"string"===typeof a?d.parseJSON(a):a}};this.element=a;this.el=d(a);this.suggestions=[];this.badQueries=[];this.selectedIndex=-1;this.currentValue=this.element.value;this.intervalId=0;this.cachedResponse={};this.onChange=this.onChangeInterval=null;this.isLocal=!1;this.suggestionsContainer=null;this.options=d.extend({},c,b);this.classes={selected:"autocomplete-selected",suggestion:"autocomplete-suggestion"};
11
+ this.hint=null;this.hintValue="";this.selection=null;this.initialize();this.setOptions(b)}var k=function(){return{escapeRegExChars:function(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},createNode:function(a){var b=document.createElement("div");b.className=a;b.style.position="absolute";b.style.display="none";return b}}}();g.utils=k;d.Autocomplete=g;g.formatResult=function(a,b){var c="("+k.escapeRegExChars(b)+")";return a.value.replace(RegExp(c,"gi"),"<strong>$1</strong>")};g.prototype=
12
+ {killerFn:null,initialize:function(){var a=this,b="."+a.classes.suggestion,c=a.classes.selected,e=a.options,f;a.element.setAttribute("autocomplete","off");a.killerFn=function(b){0===d(b.target).closest("."+a.options.containerClass).length&&(a.killSuggestions(),a.disableKillerFn())};a.suggestionsContainer=g.utils.createNode(e.containerClass);f=d(a.suggestionsContainer);f.appendTo(e.appendTo);"auto"!==e.width&&f.width(e.width);f.on("mouseover.autocomplete",b,function(){a.activate(d(this).data("index"))});
13
+ f.on("mouseout.autocomplete",function(){a.selectedIndex=-1;f.children("."+c).removeClass(c)});f.on("click.autocomplete",b,function(){a.select(d(this).data("index"))});a.fixPosition();a.fixPositionCapture=function(){a.visible&&a.fixPosition()};d(window).on("resize.autocomplete",a.fixPositionCapture);a.el.on("keydown.autocomplete",function(b){a.onKeyPress(b)});a.el.on("keyup.autocomplete",function(b){a.onKeyUp(b)});a.el.on("blur.autocomplete",function(){a.onBlur()});a.el.on("focus.autocomplete",function(){a.onFocus()});
14
+ a.el.on("change.autocomplete",function(b){a.onKeyUp(b)})},onFocus:function(){this.fixPosition();if(this.options.minChars<=this.el.val().length)this.onValueChange()},onBlur:function(){this.enableKillerFn()},setOptions:function(a){var b=this.options;d.extend(b,a);if(this.isLocal=d.isArray(b.lookup))b.lookup=this.verifySuggestionsFormat(b.lookup);d(this.suggestionsContainer).css({"max-height":b.maxHeight+"px",width:b.width+"px","z-index":b.zIndex})},clearCache:function(){this.cachedResponse={};this.badQueries=
15
+ []},clear:function(){this.clearCache();this.currentValue="";this.suggestions=[]},disable:function(){this.disabled=!0;this.currentRequest&&this.currentRequest.abort()},enable:function(){this.disabled=!1},fixPosition:function(){var a;"body"===this.options.appendTo&&(a=this.el.offset(),a={top:a.top+this.el.outerHeight()+"px",left:a.left+"px"},"auto"===this.options.width&&(a.width=this.el.outerWidth()-2+"px"),d(this.suggestionsContainer).css(a))},enableKillerFn:function(){d(document).on("click.autocomplete",
16
+ this.killerFn)},disableKillerFn:function(){d(document).off("click.autocomplete",this.killerFn)},killSuggestions:function(){var a=this;a.stopKillSuggestions();a.intervalId=window.setInterval(function(){a.hide();a.stopKillSuggestions()},50)},stopKillSuggestions:function(){window.clearInterval(this.intervalId)},isCursorAtEnd:function(){var a=this.el.val().length,b=this.element.selectionStart;return"number"===typeof b?b===a:document.selection?(b=document.selection.createRange(),b.moveStart("character",
17
+ -a),a===b.text.length):!0},onKeyPress:function(a){if(!this.disabled&&!this.visible&&40===a.which&&this.currentValue)this.suggest();else if(!this.disabled&&this.visible){switch(a.which){case 27:this.el.val(this.currentValue);this.hide();break;case 39:if(this.hint&&this.options.onHint&&this.isCursorAtEnd()){this.selectHint();break}return;case 9:if(this.hint&&this.options.onHint){this.selectHint();return}case 13:if(-1===this.selectedIndex){this.hide();return}this.select(this.selectedIndex);if(9===a.which&&
18
+ !1===this.options.tabDisabled)return;break;case 38:this.moveUp();break;case 40:this.moveDown();break;default:return}a.stopImmediatePropagation();a.preventDefault()}},onKeyUp:function(a){var b=this;if(!b.disabled){switch(a.which){case 38:case 40:return}clearInterval(b.onChangeInterval);if(b.currentValue!==b.el.val())if(b.findBestHint(),0<b.options.deferRequestBy)b.onChangeInterval=setInterval(function(){b.onValueChange()},b.options.deferRequestBy);else b.onValueChange()}},onValueChange:function(){var a=
19
+ this.options,b=this.el.val(),c=this.getQuery(b);this.selection&&(this.selection=null,(a.onInvalidateSelection||d.noop).call(this.element));clearInterval(this.onChangeInterval);this.currentValue=b;this.selectedIndex=-1;if(a.triggerSelectOnValidInput&&(b=this.findSuggestionIndex(c),-1!==b)){this.select(b);return}c.length<a.minChars?this.hide():this.getSuggestions(c)},findSuggestionIndex:function(a){var b=-1,c=a.toLowerCase();d.each(this.suggestions,function(a,d){if(d.value.toLowerCase()===c)return b=
20
+ a,!1});return b},getQuery:function(a){var b=this.options.delimiter;if(!b)return a;a=a.split(b);return d.trim(a[a.length-1])},getSuggestionsLocal:function(a){var b=this.options,c=a.toLowerCase(),e=b.lookupFilter,f=parseInt(b.lookupLimit,10),b={suggestions:d.grep(b.lookup,function(b){return e(b,a,c)})};f&&b.suggestions.length>f&&(b.suggestions=b.suggestions.slice(0,f));return b},getSuggestions:function(a){var b,c=this,e=c.options,f=e.serviceUrl,l,g;e.params[e.paramName]=a;l=e.ignoreParams?null:e.params;
21
+ c.isLocal?b=c.getSuggestionsLocal(a):(d.isFunction(f)&&(f=f.call(c.element,a)),g=f+"?"+d.param(l||{}),b=c.cachedResponse[g]);b&&d.isArray(b.suggestions)?(c.suggestions=b.suggestions,c.suggest()):c.isBadQuery(a)||!1===e.onSearchStart.call(c.element,e.params)||(c.currentRequest&&c.currentRequest.abort(),c.currentRequest=d.ajax({url:f,data:l,type:e.type,dataType:e.dataType}).done(function(b){c.currentRequest=null;c.processResponse(b,a,g);e.onSearchComplete.call(c.element,a)}).fail(function(b,d,f){e.onSearchError.call(c.element,
22
+ a,b,d,f)}))},isBadQuery:function(a){for(var b=this.badQueries,c=b.length;c--;)if(0===a.indexOf(b[c]))return!0;return!1},hide:function(){this.visible=!1;this.selectedIndex=-1;d(this.suggestionsContainer).hide();this.signalHint(null)},suggest:function(){if(0===this.suggestions.length)this.hide();else{var a=this.options,b=a.formatResult,c=this.getQuery(this.currentValue),e=this.classes.suggestion,f=this.classes.selected,g=d(this.suggestionsContainer),k=a.beforeRender,m="",h;if(a.triggerSelectOnValidInput&&
23
+ (h=this.findSuggestionIndex(c),-1!==h)){this.select(h);return}d.each(this.suggestions,function(a,d){m+='<div class="'+e+'" data-index="'+a+'">'+b(d,c)+"</div>"});"auto"===a.width&&(h=this.el.outerWidth()-2,g.width(0<h?h:300));g.html(m);a.autoSelectFirst&&(this.selectedIndex=0,g.children().first().addClass(f));d.isFunction(k)&&k.call(this.element,g);g.show();this.visible=!0;this.findBestHint()}},findBestHint:function(){var a=this.el.val().toLowerCase(),b=null;a&&(d.each(this.suggestions,function(c,
24
+ d){var f=0===d.value.toLowerCase().indexOf(a);f&&(b=d);return!f}),this.signalHint(b))},signalHint:function(a){var b="";a&&(b=this.currentValue+a.value.substr(this.currentValue.length));this.hintValue!==b&&(this.hintValue=b,this.hint=a,(this.options.onHint||d.noop)(b))},verifySuggestionsFormat:function(a){return a.length&&"string"===typeof a[0]?d.map(a,function(a){return{value:a,data:null}}):a},processResponse:function(a,b,c){var d=this.options;a=d.transformResult(a,b);a.suggestions=this.verifySuggestionsFormat(a.suggestions);
25
+ d.noCache||(this.cachedResponse[c]=a,0===a.suggestions.length&&this.badQueries.push(c));b===this.getQuery(this.currentValue)&&(this.suggestions=a.suggestions,this.suggest())},activate:function(a){var b=this.classes.selected,c=d(this.suggestionsContainer),e=c.children();c.children("."+b).removeClass(b);this.selectedIndex=a;return-1!==this.selectedIndex&&e.length>this.selectedIndex?(a=e.get(this.selectedIndex),d(a).addClass(b),a):null},selectHint:function(){var a=d.inArray(this.hint,this.suggestions);
26
+ this.select(a)},select:function(a){this.hide();this.onSelect(a)},moveUp:function(){-1!==this.selectedIndex&&(0===this.selectedIndex?(d(this.suggestionsContainer).children().first().removeClass(this.classes.selected),this.selectedIndex=-1,this.el.val(this.currentValue),this.findBestHint()):this.adjustScroll(this.selectedIndex-1))},moveDown:function(){this.selectedIndex!==this.suggestions.length-1&&this.adjustScroll(this.selectedIndex+1)},adjustScroll:function(a){var b=this.activate(a),c,e;b&&(b=b.offsetTop,
27
+ c=d(this.suggestionsContainer).scrollTop(),e=c+this.options.maxHeight-25,b<c?d(this.suggestionsContainer).scrollTop(b):b>e&&d(this.suggestionsContainer).scrollTop(b-this.options.maxHeight+25),this.el.val(this.getValue(this.suggestions[a].value)),this.signalHint(null))},onSelect:function(a){var b=this.options.onSelect;a=this.suggestions[a];this.currentValue=this.getValue(a.value);this.el.val(this.currentValue);this.signalHint(null);this.suggestions=[];this.selection=a;d.isFunction(b)&&b.call(this.element,
28
+ a)},getValue:function(a){var b=this.options.delimiter,c;if(!b)return a;c=this.currentValue;b=c.split(b);return 1===b.length?a:c.substr(0,c.length-b[b.length-1].length)+a},dispose:function(){this.el.off(".autocomplete").removeData("autocomplete");this.disableKillerFn();d(window).off("resize.autocomplete",this.fixPositionCapture);d(this.suggestionsContainer).remove()}};d.fn.autocomplete=function(a,b){return 0===arguments.length?this.first().data("autocomplete"):this.each(function(){var c=d(this),e=
29
+ c.data("autocomplete");if("string"===typeof a){if(e&&"function"===typeof e[a])e[a](b)}else e&&e.dispose&&e.dispose(),e=new g(this,a),c.data("autocomplete",e)})}});
@@ -225,6 +225,7 @@ textarea{
225
225
 
226
226
  // Inline form
227
227
  // -------------------------
228
+ .navbar form,
228
229
  form.inline{
229
230
  .field{
230
231
  display: inline-block;
@@ -243,6 +244,10 @@ form.inline{
243
244
  label{ display: none;}
244
245
  }
245
246
  }
247
+
248
+ > button{
249
+ margin-top: -3px;
250
+ }
246
251
  }
247
252
 
248
253
  // Horizontal Form
@@ -35,11 +35,11 @@
35
35
  margin-left: 0;
36
36
  }
37
37
 
38
- &.right{
38
+ &.righted{
39
39
  float: right;
40
40
  }
41
41
 
42
- &.center{
42
+ &.centered{
43
43
  float: none;
44
44
  margin-left: auto;
45
45
  margin-right: auto;
@@ -87,4 +87,10 @@
87
87
 
88
88
  }
89
89
 
90
+
91
+ form{
92
+ float: left;
93
+ padding-top: 5px;
94
+ }
95
+
90
96
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mice
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - miclle
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-13 00:00:00.000000000 Z
11
+ date: 2014-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -48,6 +48,7 @@ files:
48
48
  - vendor/assets/javascripts/mice.js
49
49
  - vendor/assets/javascripts/mice/ZeroClipboard.js
50
50
  - vendor/assets/javascripts/mice/ZeroClipboard.min.js
51
+ - vendor/assets/javascripts/mice/jquery.autocomplete.min.js
51
52
  - vendor/assets/javascripts/mice/jquery.email-autocomplete.js
52
53
  - vendor/assets/javascripts/mice/jquery.js
53
54
  - vendor/assets/javascripts/mice/jquery.min.js