cmstyle 0.0.13 → 0.0.14

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.
Files changed (98) hide show
  1. data/lib/app/assets/images/cm_app.ico +0 -0
  2. data/lib/app/assets/images/cm_app.png +0 -0
  3. data/lib/app/assets/images/cm_app_30x30.png +0 -0
  4. data/lib/app/assets/stylesheets/application.css +9 -78
  5. data/lib/app/views/layouts/_footer.slim +12 -5
  6. data/lib/app/views/layouts/application.slim +27 -18
  7. data/lib/assets/images/glyphicons-halflings-white.png +0 -0
  8. data/lib/assets/images/glyphicons-halflings.png +0 -0
  9. data/lib/assets/javascripts/bootstrap.js +165 -31
  10. data/lib/assets/javascripts/prettify.js +0 -0
  11. data/lib/assets/stylesheets/bootstrap-responsive.css +5 -1
  12. data/lib/assets/stylesheets/bootstrap.css +335 -189
  13. data/lib/assets/stylesheets/prettify.css +0 -0
  14. data/lib/cmstyle.rb +4 -1
  15. data/lib/cmstyle/navigation_helpers.rb +165 -0
  16. data/lib/cmstyle/version.rb +1 -1
  17. metadata +6 -83
  18. data/lib/app/assets/images/novartis-micro.png +0 -0
  19. data/lib/app/assets/images/novartis-small.png +0 -0
  20. data/lib/app/views/cmstyle/_footer.slim +0 -5
  21. data/lib/app/views/cmstyle/_header.slim +0 -40
  22. data/lib/app/views/cmstyle/_modals.slim +0 -62
  23. data/lib/assets/images/8020select.png +0 -0
  24. data/lib/assets/images/adoptahydrant.png +0 -0
  25. data/lib/assets/images/apple-touch-icon-114-precomposed.png +0 -0
  26. data/lib/assets/images/apple-touch-icon-144-precomposed.png +0 -0
  27. data/lib/assets/images/apple-touch-icon-57-precomposed.png +0 -0
  28. data/lib/assets/images/apple-touch-icon-72-precomposed.png +0 -0
  29. data/lib/assets/images/bootstrap-example-carousel.png +0 -0
  30. data/lib/assets/images/bootstrap-example-fluid.jpg +0 -0
  31. data/lib/assets/images/bootstrap-example-hero.jpg +0 -0
  32. data/lib/assets/images/bootstrap-example-marketing-narrow.png +0 -0
  33. data/lib/assets/images/bootstrap-example-signin.png +0 -0
  34. data/lib/assets/images/bootstrap-example-starter.jpg +0 -0
  35. data/lib/assets/images/bootstrap-example-sticky-footer.png +0 -0
  36. data/lib/assets/images/bootstrap-mdo-sfmoma-01.jpg +0 -0
  37. data/lib/assets/images/bootstrap-mdo-sfmoma-02.jpg +0 -0
  38. data/lib/assets/images/bootstrap-mdo-sfmoma-03.jpg +0 -0
  39. data/lib/assets/images/breakingnews.png +0 -0
  40. data/lib/assets/images/browser-icon-chrome.png +0 -0
  41. data/lib/assets/images/browser-icon-firefox.png +0 -0
  42. data/lib/assets/images/browser-icon-safari.png +0 -0
  43. data/lib/assets/images/bs-docs-bootstrap-features.png +0 -0
  44. data/lib/assets/images/bs-docs-masthead-pattern.png +0 -0
  45. data/lib/assets/images/bs-docs-responsive-illustrations.png +0 -0
  46. data/lib/assets/images/bs-docs-twitter-github.png +0 -0
  47. data/lib/assets/images/fleetio.png +0 -0
  48. data/lib/assets/images/gathercontent.png +0 -0
  49. data/lib/assets/images/grid-baseline-20px.png +0 -0
  50. data/lib/assets/images/jshint.png +0 -0
  51. data/lib/assets/images/kippt.png +0 -0
  52. data/lib/assets/images/less-logo-large.png +0 -0
  53. data/lib/assets/images/logo.png +0 -0
  54. data/lib/assets/images/noise.png +0 -0
  55. data/lib/assets/images/responsive-illustrations.png +0 -0
  56. data/lib/assets/images/slide-01.jpg +0 -0
  57. data/lib/assets/images/slide-02.jpg +0 -0
  58. data/lib/assets/images/slide-03.jpg +0 -0
  59. data/lib/assets/images/small-hogan-icon.png +0 -0
  60. data/lib/assets/images/soundready.png +0 -0
  61. data/lib/assets/images/stripes.png +0 -0
  62. data/lib/assets/javascripts/application.js +0 -154
  63. data/lib/assets/javascripts/bootstrap-affix.js +0 -19
  64. data/lib/assets/javascripts/bootstrap-alert.js +0 -56
  65. data/lib/assets/javascripts/bootstrap-button.js +0 -96
  66. data/lib/assets/javascripts/bootstrap-carousel.js +0 -63
  67. data/lib/assets/javascripts/bootstrap-collapse.js +0 -88
  68. data/lib/assets/javascripts/bootstrap-dropdown.js +0 -145
  69. data/lib/assets/javascripts/bootstrap-modal.js +0 -114
  70. data/lib/assets/javascripts/bootstrap-phantom.js +0 -21
  71. data/lib/assets/javascripts/bootstrap-popover.js +0 -107
  72. data/lib/assets/javascripts/bootstrap-scrollspy.js +0 -31
  73. data/lib/assets/javascripts/bootstrap-tab.js +0 -80
  74. data/lib/assets/javascripts/bootstrap-tooltip.js +0 -153
  75. data/lib/assets/javascripts/bootstrap-transition.js +0 -13
  76. data/lib/assets/javascripts/bootstrap-typeahead.js +0 -199
  77. data/lib/assets/javascripts/compiler.js +0 -348
  78. data/lib/assets/javascripts/hogan-1.0.5.amd.js +0 -576
  79. data/lib/assets/javascripts/hogan-1.0.5.common.js +0 -576
  80. data/lib/assets/javascripts/hogan-1.0.5.js +0 -572
  81. data/lib/assets/javascripts/hogan-1.0.5.mustache.js +0 -619
  82. data/lib/assets/javascripts/hogan.js +0 -545
  83. data/lib/assets/javascripts/index.js +0 -848
  84. data/lib/assets/javascripts/jquery.js +0 -2
  85. data/lib/assets/javascripts/mustache.js +0 -90
  86. data/lib/assets/javascripts/phantom.js +0 -63
  87. data/lib/assets/javascripts/qunit.js +0 -1510
  88. data/lib/assets/javascripts/release.js +0 -74
  89. data/lib/assets/javascripts/server.js +0 -14
  90. data/lib/assets/javascripts/spec.js +0 -77
  91. data/lib/assets/javascripts/template-1.0.5.js +0 -233
  92. data/lib/assets/javascripts/template.js +0 -233
  93. data/lib/assets/javascripts/web_templates.js +0 -32
  94. data/lib/assets/stylesheets/css-tests.css +0 -139
  95. data/lib/assets/stylesheets/docs.css +0 -1015
  96. data/lib/assets/stylesheets/layout.css +0 -206
  97. data/lib/assets/stylesheets/qunit.css +0 -232
  98. data/lib/assets/stylesheets/skeleton.css +0 -236
@@ -1,31 +0,0 @@
1
- $(function () {
2
-
3
- module("bootstrap-scrollspy")
4
-
5
- test("should be defined on jquery object", function () {
6
- ok($(document.body).scrollspy, 'scrollspy method is defined')
7
- })
8
-
9
- test("should return element", function () {
10
- ok($(document.body).scrollspy()[0] == document.body, 'document.body returned')
11
- })
12
-
13
- test("should switch active class on scroll", function () {
14
- var sectionHTML = '<div id="masthead"></div>'
15
- , $section = $(sectionHTML).append('#qunit-fixture')
16
- , topbarHTML ='<div class="topbar">'
17
- + '<div class="topbar-inner">'
18
- + '<div class="container">'
19
- + '<h3><a href="#">Bootstrap</a></h3>'
20
- + '<ul class="nav">'
21
- + '<li><a href="#masthead">Overview</a></li>'
22
- + '</ul>'
23
- + '</div>'
24
- + '</div>'
25
- + '</div>'
26
- , $topbar = $(topbarHTML).scrollspy()
27
-
28
- ok($topbar.find('.active', true))
29
- })
30
-
31
- })
@@ -1,80 +0,0 @@
1
- $(function () {
2
-
3
- module("bootstrap-tabs")
4
-
5
- test("should be defined on jquery object", function () {
6
- ok($(document.body).tab, 'tabs method is defined')
7
- })
8
-
9
- test("should return element", function () {
10
- ok($(document.body).tab()[0] == document.body, 'document.body returned')
11
- })
12
-
13
- test("should activate element by tab id", function () {
14
- var tabsHTML =
15
- '<ul class="tabs">'
16
- + '<li><a href="#home">Home</a></li>'
17
- + '<li><a href="#profile">Profile</a></li>'
18
- + '</ul>'
19
-
20
- $('<ul><li id="home"></li><li id="profile"></li></ul>').appendTo("#qunit-fixture")
21
-
22
- $(tabsHTML).find('li:last a').tab('show')
23
- equals($("#qunit-fixture").find('.active').attr('id'), "profile")
24
-
25
- $(tabsHTML).find('li:first a').tab('show')
26
- equals($("#qunit-fixture").find('.active').attr('id'), "home")
27
- })
28
-
29
- test("should activate element by tab id", function () {
30
- var pillsHTML =
31
- '<ul class="pills">'
32
- + '<li><a href="#home">Home</a></li>'
33
- + '<li><a href="#profile">Profile</a></li>'
34
- + '</ul>'
35
-
36
- $('<ul><li id="home"></li><li id="profile"></li></ul>').appendTo("#qunit-fixture")
37
-
38
- $(pillsHTML).find('li:last a').tab('show')
39
- equals($("#qunit-fixture").find('.active').attr('id'), "profile")
40
-
41
- $(pillsHTML).find('li:first a').tab('show')
42
- equals($("#qunit-fixture").find('.active').attr('id'), "home")
43
- })
44
-
45
-
46
- test("should not fire closed when close is prevented", function () {
47
- $.support.transition = false
48
- stop();
49
- $('<div class="tab"/>')
50
- .bind('show', function (e) {
51
- e.preventDefault();
52
- ok(true);
53
- start();
54
- })
55
- .bind('shown', function () {
56
- ok(false);
57
- })
58
- .tab('show')
59
- })
60
-
61
- test("show and shown events should reference correct relatedTarget", function () {
62
- var dropHTML =
63
- '<ul class="drop">'
64
- + '<li class="dropdown"><a data-toggle="dropdown" href="#">1</a>'
65
- + '<ul class="dropdown-menu">'
66
- + '<li><a href="#1-1" data-toggle="tab">1-1</a></li>'
67
- + '<li><a href="#1-2" data-toggle="tab">1-2</a></li>'
68
- + '</ul>'
69
- + '</li>'
70
- + '</ul>'
71
-
72
- $(dropHTML).find('ul>li:first a').tab('show').end()
73
- .find('ul>li:last a').on('show', function(event){
74
- equals(event.relatedTarget.hash, "#1-1")
75
- }).on('shown', function(event){
76
- equals(event.relatedTarget.hash, "#1-1")
77
- }).tab('show')
78
- })
79
-
80
- })
@@ -1,153 +0,0 @@
1
- $(function () {
2
-
3
- module("bootstrap-tooltip")
4
-
5
- test("should be defined on jquery object", function () {
6
- var div = $("<div></div>")
7
- ok(div.tooltip, 'popover method is defined')
8
- })
9
-
10
- test("should return element", function () {
11
- var div = $("<div></div>")
12
- ok(div.tooltip() == div, 'document.body returned')
13
- })
14
-
15
- test("should expose default settings", function () {
16
- ok(!!$.fn.tooltip.defaults, 'defaults is defined')
17
- })
18
-
19
- test("should remove title attribute", function () {
20
- var tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"></a>').tooltip()
21
- ok(!tooltip.attr('title'), 'title tag was removed')
22
- })
23
-
24
- test("should add data attribute for referencing original title", function () {
25
- var tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"></a>').tooltip()
26
- equals(tooltip.attr('data-original-title'), 'Another tooltip', 'original title preserved in data attribute')
27
- })
28
-
29
- test("should place tooltips relative to placement option", function () {
30
- $.support.transition = false
31
- var tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"></a>')
32
- .appendTo('#qunit-fixture')
33
- .tooltip({placement: 'bottom'})
34
- .tooltip('show')
35
-
36
- ok($(".tooltip").is('.fade.bottom.in'), 'has correct classes applied')
37
- tooltip.tooltip('hide')
38
- })
39
-
40
- test("should allow html entities", function () {
41
- $.support.transition = false
42
- var tooltip = $('<a href="#" rel="tooltip" title="<b>@fat</b>"></a>')
43
- .appendTo('#qunit-fixture')
44
- .tooltip({html: true})
45
- .tooltip('show')
46
-
47
- ok($('.tooltip b').length, 'b tag was inserted')
48
- tooltip.tooltip('hide')
49
- ok(!$(".tooltip").length, 'tooltip removed')
50
- })
51
-
52
- test("should respect custom classes", function () {
53
- var tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"></a>')
54
- .appendTo('#qunit-fixture')
55
- .tooltip({ template: '<div class="tooltip some-class"><div class="tooltip-arrow"/><div class="tooltip-inner"/></div>'})
56
- .tooltip('show')
57
-
58
- ok($('.tooltip').hasClass('some-class'), 'custom class is present')
59
- tooltip.tooltip('hide')
60
- ok(!$(".tooltip").length, 'tooltip removed')
61
- })
62
-
63
- test("should not show tooltip if leave event occurs before delay expires", function () {
64
- var tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"></a>')
65
- .appendTo('#qunit-fixture')
66
- .tooltip({ delay: 200 })
67
-
68
- stop()
69
-
70
- tooltip.trigger('mouseenter')
71
-
72
- setTimeout(function () {
73
- ok(!$(".tooltip").is('.fade.in'), 'tooltip is not faded in')
74
- tooltip.trigger('mouseout')
75
- setTimeout(function () {
76
- ok(!$(".tooltip").is('.fade.in'), 'tooltip is not faded in')
77
- start()
78
- }, 200)
79
- }, 100)
80
- })
81
-
82
- test("should not show tooltip if leave event occurs before delay expires, even if hide delay is 0", function () {
83
- var tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"></a>')
84
- .appendTo('#qunit-fixture')
85
- .tooltip({ delay: { show: 200, hide: 0} })
86
-
87
- stop()
88
-
89
- tooltip.trigger('mouseenter')
90
-
91
- setTimeout(function () {
92
- ok(!$(".tooltip").is('.fade.in'), 'tooltip is not faded in')
93
- tooltip.trigger('mouseout')
94
- setTimeout(function () {
95
- ok(!$(".tooltip").is('.fade.in'), 'tooltip is not faded in')
96
- start()
97
- }, 200)
98
- }, 100)
99
- })
100
-
101
- test("should not show tooltip if leave event occurs before delay expires", function () {
102
- var tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"></a>')
103
- .appendTo('#qunit-fixture')
104
- .tooltip({ delay: 100 })
105
- stop()
106
- tooltip.trigger('mouseenter')
107
- setTimeout(function () {
108
- ok(!$(".tooltip").is('.fade.in'), 'tooltip is not faded in')
109
- tooltip.trigger('mouseout')
110
- setTimeout(function () {
111
- ok(!$(".tooltip").is('.fade.in'), 'tooltip is not faded in')
112
- start()
113
- }, 100)
114
- }, 50)
115
- })
116
-
117
- test("should show tooltip if leave event hasn't occured before delay expires", function () {
118
- var tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"></a>')
119
- .appendTo('#qunit-fixture')
120
- .tooltip({ delay: 150 })
121
- stop()
122
- tooltip.trigger('mouseenter')
123
- setTimeout(function () {
124
- ok(!$(".tooltip").is('.fade.in'), 'tooltip is not faded in')
125
- }, 100)
126
- setTimeout(function () {
127
- ok($(".tooltip").is('.fade.in'), 'tooltip has faded in')
128
- start()
129
- }, 200)
130
- })
131
-
132
- test("should destroy tooltip", function () {
133
- var tooltip = $('<div/>').tooltip().on('click.foo', function(){})
134
- ok(tooltip.data('tooltip'), 'tooltip has data')
135
- ok($._data(tooltip[0], 'events').mouseover && $._data(tooltip[0], 'events').mouseout, 'tooltip has hover event')
136
- ok($._data(tooltip[0], 'events').click[0].namespace == 'foo', 'tooltip has extra click.foo event')
137
- tooltip.tooltip('show')
138
- tooltip.tooltip('destroy')
139
- ok(!tooltip.hasClass('in'), 'tooltip is hidden')
140
- ok(!$._data(tooltip[0], 'tooltip'), 'tooltip does not have data')
141
- ok($._data(tooltip[0], 'events').click[0].namespace == 'foo', 'tooltip still has click.foo')
142
- ok(!$._data(tooltip[0], 'events').mouseover && !$._data(tooltip[0], 'events').mouseout, 'tooltip does not have any events')
143
- })
144
-
145
- test("should show tooltip with delegate selector on click", function () {
146
- var div = $('<div><a href="#" rel="tooltip" title="Another tooltip"></a></div>')
147
- var tooltip = div.appendTo('#qunit-fixture')
148
- .tooltip({ selector: 'a[rel=tooltip]',
149
- trigger: 'click' })
150
- div.find('a').trigger('click')
151
- ok($(".tooltip").is('.fade.in'), 'tooltip is faded in')
152
- })
153
- })
@@ -1,13 +0,0 @@
1
- $(function () {
2
-
3
- module("bootstrap-transition")
4
-
5
- test("should be defined on jquery support object", function () {
6
- ok($.support.transition !== undefined, 'transition object is defined')
7
- })
8
-
9
- test("should provide an end object", function () {
10
- ok($.support.transition ? $.support.transition.end : true, 'end string is defined')
11
- })
12
-
13
- })
@@ -1,199 +0,0 @@
1
- $(function () {
2
-
3
- module("bootstrap-typeahead")
4
-
5
- test("should be defined on jquery object", function () {
6
- ok($(document.body).typeahead, 'alert method is defined')
7
- })
8
-
9
- test("should return element", function () {
10
- ok($(document.body).typeahead()[0] == document.body, 'document.body returned')
11
- })
12
-
13
- test("should listen to an input", function () {
14
- var $input = $('<input />')
15
- $input.typeahead()
16
- ok($._data($input[0], 'events').blur, 'has a blur event')
17
- ok($._data($input[0], 'events').keypress, 'has a keypress event')
18
- ok($._data($input[0], 'events').keyup, 'has a keyup event')
19
- })
20
-
21
- test("should create a menu", function () {
22
- var $input = $('<input />')
23
- ok($input.typeahead().data('typeahead').$menu, 'has a menu')
24
- })
25
-
26
- test("should listen to the menu", function () {
27
- var $input = $('<input />')
28
- , $menu = $input.typeahead().data('typeahead').$menu
29
-
30
- ok($._data($menu[0], 'events').mouseover, 'has a mouseover(pseudo: mouseenter)')
31
- ok($._data($menu[0], 'events').click, 'has a click')
32
- })
33
-
34
- test("should show menu when query entered", function () {
35
- var $input = $('<input />').typeahead({
36
- source: ['aa', 'ab', 'ac']
37
- })
38
- , typeahead = $input.data('typeahead')
39
-
40
- $input.val('a')
41
- typeahead.lookup()
42
-
43
- ok(typeahead.$menu.is(":visible"), 'typeahead is visible')
44
- equals(typeahead.$menu.find('li').length, 3, 'has 3 items in menu')
45
- equals(typeahead.$menu.find('.active').length, 1, 'one item is active')
46
-
47
- typeahead.$menu.remove()
48
- })
49
-
50
- test("should accept data source via synchronous function", function () {
51
- var $input = $('<input />').typeahead({
52
- source: function () {
53
- return ['aa', 'ab', 'ac']
54
- }
55
- })
56
- , typeahead = $input.data('typeahead')
57
-
58
- $input.val('a')
59
- typeahead.lookup()
60
-
61
- ok(typeahead.$menu.is(":visible"), 'typeahead is visible')
62
- equals(typeahead.$menu.find('li').length, 3, 'has 3 items in menu')
63
- equals(typeahead.$menu.find('.active').length, 1, 'one item is active')
64
-
65
- typeahead.$menu.remove()
66
- })
67
-
68
- test("should accept data source via asynchronous function", function () {
69
- var $input = $('<input />').typeahead({
70
- source: function (query, process) {
71
- process(['aa', 'ab', 'ac'])
72
- }
73
- })
74
- , typeahead = $input.data('typeahead')
75
-
76
- $input.val('a')
77
- typeahead.lookup()
78
-
79
- ok(typeahead.$menu.is(":visible"), 'typeahead is visible')
80
- equals(typeahead.$menu.find('li').length, 3, 'has 3 items in menu')
81
- equals(typeahead.$menu.find('.active').length, 1, 'one item is active')
82
-
83
- typeahead.$menu.remove()
84
- })
85
-
86
- test("should not explode when regex chars are entered", function () {
87
- var $input = $('<input />').typeahead({
88
- source: ['aa', 'ab', 'ac', 'mdo*', 'fat+']
89
- })
90
- , typeahead = $input.data('typeahead')
91
-
92
- $input.val('+')
93
- typeahead.lookup()
94
-
95
- ok(typeahead.$menu.is(":visible"), 'typeahead is visible')
96
- equals(typeahead.$menu.find('li').length, 1, 'has 1 item in menu')
97
- equals(typeahead.$menu.find('.active').length, 1, 'one item is active')
98
-
99
- typeahead.$menu.remove()
100
- })
101
-
102
- test("should hide menu when query entered", function () {
103
- stop()
104
- var $input = $('<input />').typeahead({
105
- source: ['aa', 'ab', 'ac']
106
- })
107
- , typeahead = $input.data('typeahead')
108
-
109
- $input.val('a')
110
- typeahead.lookup()
111
-
112
- ok(typeahead.$menu.is(":visible"), 'typeahead is visible')
113
- equals(typeahead.$menu.find('li').length, 3, 'has 3 items in menu')
114
- equals(typeahead.$menu.find('.active').length, 1, 'one item is active')
115
-
116
- $input.blur()
117
-
118
- setTimeout(function () {
119
- ok(!typeahead.$menu.is(":visible"), "typeahead is no longer visible")
120
- start()
121
- }, 200)
122
-
123
- typeahead.$menu.remove()
124
- })
125
-
126
- test("should set next item when down arrow is pressed", function () {
127
- var $input = $('<input />').typeahead({
128
- source: ['aa', 'ab', 'ac']
129
- })
130
- , typeahead = $input.data('typeahead')
131
-
132
- $input.val('a')
133
- typeahead.lookup()
134
-
135
- ok(typeahead.$menu.is(":visible"), 'typeahead is visible')
136
- equals(typeahead.$menu.find('li').length, 3, 'has 3 items in menu')
137
- equals(typeahead.$menu.find('.active').length, 1, 'one item is active')
138
- ok(typeahead.$menu.find('li').first().hasClass('active'), "first item is active")
139
-
140
- $input.trigger({
141
- type: 'keydown'
142
- , keyCode: 40
143
- })
144
-
145
- ok(typeahead.$menu.find('li').first().next().hasClass('active'), "second item is active")
146
-
147
-
148
- $input.trigger({
149
- type: 'keydown'
150
- , keyCode: 38
151
- })
152
-
153
- ok(typeahead.$menu.find('li').first().hasClass('active'), "first item is active")
154
-
155
- typeahead.$menu.remove()
156
- })
157
-
158
-
159
- test("should set input value to selected item", function () {
160
- var $input = $('<input />').typeahead({
161
- source: ['aa', 'ab', 'ac']
162
- })
163
- , typeahead = $input.data('typeahead')
164
- , changed = false
165
-
166
- $input.val('a')
167
- typeahead.lookup()
168
-
169
- $input.change(function() { changed = true });
170
-
171
- $(typeahead.$menu.find('li')[2]).mouseover().click()
172
-
173
- equals($input.val(), 'ac', 'input value was correctly set')
174
- ok(!typeahead.$menu.is(':visible'), 'the menu was hidden')
175
- ok(changed, 'a change event was fired')
176
-
177
- typeahead.$menu.remove()
178
- })
179
-
180
- test("should start querying when minLength is met", function () {
181
- var $input = $('<input />').typeahead({
182
- source: ['aaaa', 'aaab', 'aaac'],
183
- minLength: 3
184
- })
185
- , typeahead = $input.data('typeahead')
186
-
187
- $input.val('aa')
188
- typeahead.lookup()
189
-
190
- equals(typeahead.$menu.find('li').length, 0, 'has 0 items in menu')
191
-
192
- $input.val('aaa')
193
- typeahead.lookup()
194
-
195
- equals(typeahead.$menu.find('li').length, 3, 'has 3 items in menu')
196
-
197
- typeahead.$menu.remove()
198
- })
199
- })