jombo 0.0.1.beta7

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.
@@ -0,0 +1,75 @@
1
+ /* ============================================================
2
+ * bootstrap-dropdown.js v2.0.0
3
+ * http://twitter.github.com/bootstrap/javascript.html#dropdown
4
+ * ============================================================
5
+ * Copyright 2011 Twitter, Inc.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ * ============================================================ */
19
+
20
+
21
+ !function( $ ){
22
+
23
+ "use strict"
24
+
25
+ /* DROPDOWN CLASS DEFINITION
26
+ * ========================= */
27
+
28
+ var toggle = '[data-toggle="dropdown"]'
29
+ , Dropdown = function ( element ) {
30
+ $(element).bind('click', this.toggle)
31
+ }
32
+
33
+ Dropdown.prototype = {
34
+
35
+ constructor: Dropdown
36
+
37
+ , toggle: function ( e ) {
38
+ var li = $(this).parent('li')
39
+ , isActive = li.hasClass('open')
40
+
41
+ clearMenus()
42
+ !isActive && li.toggleClass('open')
43
+
44
+ return false
45
+ }
46
+
47
+ }
48
+
49
+ function clearMenus() {
50
+ $(toggle).parent('li').removeClass('open')
51
+ }
52
+
53
+
54
+ /* DROPDOWN PLUGIN DEFINITION
55
+ * ========================== */
56
+
57
+ $.fn.dropdown = function ( option ) {
58
+ return this.each(function () {
59
+ var $this = $(this)
60
+ , data = $this.data('dropdown')
61
+ if (!data) $this.data('dropdown', (data = new Dropdown(this)))
62
+ if (typeof option == 'string') data[option].call($this)
63
+ })
64
+ }
65
+
66
+
67
+ /* APPLY TO STANDARD DROPDOWN ELEMENTS
68
+ * =================================== */
69
+
70
+ $(function () {
71
+ $('html').bind('click.dropdown.data-api', clearMenus)
72
+ $('body').delegate(toggle, 'click.dropdown.data-api', Dropdown.prototype.toggle)
73
+ })
74
+
75
+ }( window.jQuery || window.ender )
@@ -0,0 +1,204 @@
1
+ /* =========================================================
2
+ * bootstrap-modal.js v2.0.0
3
+ * http://twitter.github.com/bootstrap/javascript.html#modal
4
+ * =========================================================
5
+ * Copyright 2011 Twitter, Inc.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ * ========================================================= */
19
+
20
+
21
+ !function( $ ){
22
+
23
+ "use strict"
24
+
25
+ /* MODAL CLASS DEFINITION
26
+ * ====================== */
27
+
28
+ var Modal = function ( content, options ) {
29
+ this.settings = $.extend({}, $.fn.modal.defaults, options)
30
+ this.$element = $(content)
31
+ .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
32
+ this.settings.show && this.show()
33
+ }
34
+
35
+ Modal.prototype = {
36
+
37
+ constructor: Modal
38
+
39
+ , toggle: function () {
40
+ return this[!this.isShown ? 'show' : 'hide']()
41
+ }
42
+
43
+ , show: function () {
44
+ var that = this
45
+
46
+ if (this.isShown) return
47
+
48
+ this.isShown = true
49
+ this.$element.trigger('show')
50
+
51
+ escape.call(this)
52
+ backdrop.call(this, function () {
53
+ var transition = $.support.transition && that.$element.hasClass('fade')
54
+
55
+ that.$element
56
+ .appendTo(document.body)
57
+ .show()
58
+
59
+ if (transition) {
60
+ that.$element[0].offsetWidth // force reflow
61
+ }
62
+
63
+ that.$element.addClass('in')
64
+
65
+ transition ?
66
+ that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
67
+ that.$element.trigger('shown')
68
+
69
+ })
70
+ }
71
+
72
+ , hide: function ( e ) {
73
+ e && e.preventDefault()
74
+
75
+ if (!this.isShown) return
76
+
77
+ var that = this
78
+ this.isShown = false
79
+
80
+ escape.call(this)
81
+
82
+ this.$element
83
+ .trigger('hide')
84
+ .removeClass('in')
85
+
86
+ $.support.transition && this.$element.hasClass('fade') ?
87
+ hideWithTransition.call(this) :
88
+ hideModal.call(this)
89
+ }
90
+
91
+ }
92
+
93
+
94
+ /* MODAL PRIVATE METHODS
95
+ * ===================== */
96
+
97
+ function hideWithTransition() {
98
+ var that = this
99
+ , timeout = setTimeout(function () {
100
+ that.$element.unbind($.support.transition.end)
101
+ hideModal.call(that)
102
+ }, 500)
103
+
104
+ this.$element.one($.support.transition.end, function () {
105
+ clearTimeout(timeout)
106
+ hideModal.call(that)
107
+ })
108
+ }
109
+
110
+ function hideModal (that) {
111
+ this.$element
112
+ .hide()
113
+ .trigger('hidden')
114
+
115
+ backdrop.call(this)
116
+ }
117
+
118
+ function backdrop ( callback ) {
119
+ var that = this
120
+ , animate = this.$element.hasClass('fade') ? 'fade' : ''
121
+
122
+ if (this.isShown && this.settings.backdrop) {
123
+ var doAnimate = $.support.transition && animate
124
+
125
+ this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
126
+ .appendTo(document.body)
127
+
128
+ if (this.settings.backdrop != 'static') {
129
+ this.$backdrop.click($.proxy(this.hide, this))
130
+ }
131
+
132
+ if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
133
+
134
+ this.$backdrop.addClass('in')
135
+
136
+ doAnimate ?
137
+ this.$backdrop.one($.support.transition.end, callback) :
138
+ callback()
139
+
140
+ } else if (!this.isShown && this.$backdrop) {
141
+ this.$backdrop.removeClass('in')
142
+
143
+ $.support.transition && this.$element.hasClass('fade')?
144
+ this.$backdrop.one($.support.transition.end, $.proxy(removeBackdrop, this)) :
145
+ removeBackdrop.call(this)
146
+
147
+ } else if (callback) {
148
+ callback()
149
+ }
150
+ }
151
+
152
+ function removeBackdrop() {
153
+ this.$backdrop.remove()
154
+ this.$backdrop = null
155
+ }
156
+
157
+ function escape() {
158
+ var that = this
159
+ if (this.isShown && this.settings.keyboard) {
160
+ $(document).bind('keyup.dismiss.modal', function ( e ) {
161
+ e.which == 27 && that.hide()
162
+ })
163
+ } else if (!this.isShown) {
164
+ $(document).unbind('keyup.dismiss.modal')
165
+ }
166
+ }
167
+
168
+
169
+ /* MODAL PLUGIN DEFINITION
170
+ * ======================= */
171
+
172
+ $.fn.modal = function ( option ) {
173
+ return this.each(function () {
174
+ var $this = $(this)
175
+ , data = $this.data('modal')
176
+ , options = typeof option == 'object' && option
177
+ if (!data) $this.data('modal', (data = new Modal(this, options)))
178
+ if (typeof option == 'string') data[option]()
179
+ })
180
+ }
181
+
182
+ $.fn.modal.defaults = {
183
+ backdrop: true
184
+ , keyboard: true
185
+ , show: true
186
+ }
187
+
188
+ $.fn.modal.Modal = Modal
189
+
190
+
191
+ /* MODAL DATA-API
192
+ * ============== */
193
+
194
+ $(document).ready(function () {
195
+ $('body').delegate('[data-toggle="modal"]', 'click.modal.data-api', function ( e ) {
196
+ var $this = $(this)
197
+ , target = $this.attr('data-target') || $this.attr('href')
198
+ , option = $(target).data('modal') ? 'toggle' : $this.data()
199
+ e.preventDefault()
200
+ $(target).modal(option)
201
+ })
202
+ })
203
+
204
+ }( window.jQuery || window.ender )
@@ -0,0 +1,96 @@
1
+ /* ===========================================================
2
+ * bootstrap-popover.js v2.0.0
3
+ * http://twitter.github.com/bootstrap/javascript.html#popover
4
+ * ===========================================================
5
+ * Copyright 2011 Twitter, Inc.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ * =========================================================== */
19
+
20
+
21
+ !function( $ ) {
22
+
23
+ "use strict"
24
+
25
+ var Popover = function ( element, options ) {
26
+ this.$element = $(element)
27
+ this.options = options
28
+ this.enabled = true
29
+ this.fixTitle()
30
+ }
31
+
32
+ /* NOTE: POPOVER EXTENDS BOOTSTRAP-TWIPSY.js
33
+ ========================================= */
34
+
35
+ Popover.prototype = $.extend({}, $.fn.twipsy.Twipsy.prototype, {
36
+
37
+ constructor: Popover
38
+
39
+ , setContent: function () {
40
+ var $tip = this.tip()
41
+ , title = this.getTitle()
42
+ , content = this.getContent()
43
+
44
+ $tip.find('.title')[ $.type(title) == 'object' ? 'append' : 'html' ](title)
45
+ $tip.find('.content > *')[ $.type(content) == 'object' ? 'append' : 'html' ](content)
46
+
47
+ $tip[0].className = 'popover'
48
+ }
49
+
50
+ , hasContent: function () {
51
+ return this.getTitle() || this.getContent()
52
+ }
53
+
54
+ , getContent: function () {
55
+ var content
56
+ , $e = this.$element
57
+ , o = this.options
58
+
59
+ if (typeof this.options.content == 'string') {
60
+ content = $e.attr(this.options.content)
61
+ } else if (typeof this.options.content == 'function') {
62
+ content = this.options.content.call(this.$element[0])
63
+ }
64
+
65
+ return content
66
+ }
67
+
68
+ , tip: function() {
69
+ if (!this.$tip) {
70
+ this.$tip = $('<div class="popover" />')
71
+ .html(this.options.template)
72
+ }
73
+ return this.$tip
74
+ }
75
+
76
+ })
77
+
78
+
79
+ /* POPOVER PLUGIN DEFINITION
80
+ * ======================= */
81
+
82
+ $.fn.popover = function (options) {
83
+ if (typeof options == 'object') options = $.extend({}, $.fn.popover.defaults, options)
84
+ $.fn.twipsy.initWith.call(this, options, Popover, 'popover')
85
+ return this
86
+ }
87
+
88
+ $.fn.popover.defaults = $.extend({} , $.fn.twipsy.defaults, {
89
+ placement: 'right'
90
+ , content: 'data-content'
91
+ , template: '<div class="arrow"></div><div class="inner"><h3 class="title"></h3><div class="content"><p></p></div></div>'
92
+ })
93
+
94
+ $.fn.twipsy.rejectAttrOptions.push( 'content' )
95
+
96
+ }( window.jQuery || window.ender )
@@ -0,0 +1,114 @@
1
+ /* =============================================================
2
+ * bootstrap-scrollspy.js v2.0.0
3
+ * http://twitter.github.com/bootstrap/javascript.html#scrollspy
4
+ * =============================================================
5
+ * Copyright 2011 Twitter, Inc.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ * ============================================================== */
19
+
20
+ !function ( $ ) {
21
+
22
+ "use strict"
23
+
24
+ /* SCROLLSPY CLASS DEFINITION
25
+ * ========================== */
26
+
27
+ function ScrollSpy( element ) {
28
+ var process = $.proxy(this.process, this)
29
+
30
+ this.$scrollElement = $(element).bind('scroll.scroll.data-api', process)
31
+ this.selector = (this.$scrollElement.attr('data-target')
32
+ || this.$scrollElement.attr('href')
33
+ || '') + ' .nav li > a'
34
+ this.$body = $('body').delegate(this.selector, 'click.scroll.data-api', process)
35
+
36
+ this.refresh()
37
+ this.process()
38
+ }
39
+
40
+ ScrollSpy.prototype = {
41
+
42
+ constructor: ScrollSpy
43
+
44
+ , refresh: function () {
45
+ this.targets = this.$body
46
+ .find(this.selector)
47
+ .map(function () {
48
+ var href = $(this).attr('href')
49
+ return /^#\w/.test(href) && $(href).length ? href : null
50
+ })
51
+
52
+ this.offsets = $.map(this.targets, function (id) {
53
+ return $(id).position().top
54
+ })
55
+ }
56
+
57
+ , process: function () {
58
+ var scrollTop = this.$scrollElement.scrollTop() + 10
59
+ , offsets = this.offsets
60
+ , targets = this.targets
61
+ , activeTarget = this.activeTarget
62
+ , i
63
+
64
+ for (i = offsets.length; i--;) {
65
+ activeTarget != targets[i]
66
+ && scrollTop >= offsets[i]
67
+ && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
68
+ && this.activate( targets[i] )
69
+ }
70
+ }
71
+
72
+ , activate: function (target) {
73
+ var active
74
+
75
+ this.activeTarget = target
76
+
77
+ this.$body
78
+ .find(this.selector).parent('.active')
79
+ .removeClass('active')
80
+
81
+ active = this.$body
82
+ .find(this.selector + '[href="' + target + '"]')
83
+ .parent('li')
84
+ .addClass('active')
85
+
86
+ if ( active.parent('.dropdown-menu') ) {
87
+ active.closest('li.dropdown').addClass('active')
88
+ }
89
+ }
90
+
91
+ }
92
+
93
+
94
+ /* SCROLLSPY PLUGIN DEFINITION
95
+ * =========================== */
96
+
97
+ $.fn.scrollspy = function ( option ) {
98
+ return this.each(function () {
99
+ var $this = $(this)
100
+ , data = $this.data('scrollspy')
101
+ if (!data) $this.data('scrollspy', (data = new ScrollSpy(this)))
102
+ if (typeof option == 'string') data[option]()
103
+ })
104
+ }
105
+
106
+ $.fn.scrollspy.ScrollSpy = ScrollSpy
107
+
108
+
109
+ /* SCROLLSPY DATA-API
110
+ * ============== */
111
+
112
+ $(function () { $('[data-spy="scroll"]').scrollspy() })
113
+
114
+ }( window.jQuery || window.ender )