padrino-admin 0.12.2 → 0.12.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/padrino-admin.rb +9 -17
- data/lib/padrino-admin/access_control.rb +1 -0
- data/lib/padrino-admin/bootstrap-less/alerts.less +1 -1
- data/lib/padrino-admin/bootstrap-less/badges.less +10 -6
- data/lib/padrino-admin/bootstrap-less/bootstrap.less +0 -10
- data/lib/padrino-admin/bootstrap-less/breadcrumbs.less +6 -3
- data/lib/padrino-admin/bootstrap-less/button-groups.less +22 -44
- data/lib/padrino-admin/bootstrap-less/buttons.less +12 -17
- data/lib/padrino-admin/bootstrap-less/carousel.less +33 -10
- data/lib/padrino-admin/bootstrap-less/code.less +15 -8
- data/lib/padrino-admin/bootstrap-less/dropdowns.less +31 -11
- data/lib/padrino-admin/bootstrap-less/font-awesome/bordered-pulled.less +16 -0
- data/lib/padrino-admin/bootstrap-less/font-awesome/core.less +9 -126
- data/lib/padrino-admin/bootstrap-less/font-awesome/fixed-width.less +6 -0
- data/lib/padrino-admin/bootstrap-less/font-awesome/font-awesome.less +14 -30
- data/lib/padrino-admin/bootstrap-less/font-awesome/icons.less +409 -378
- data/lib/padrino-admin/bootstrap-less/font-awesome/larger.less +13 -0
- data/lib/padrino-admin/bootstrap-less/font-awesome/list.less +19 -0
- data/lib/padrino-admin/bootstrap-less/font-awesome/mixins.less +14 -42
- data/lib/padrino-admin/bootstrap-less/font-awesome/path.less +6 -6
- data/lib/padrino-admin/bootstrap-less/font-awesome/rotated-flipped.less +9 -0
- data/lib/padrino-admin/bootstrap-less/font-awesome/spinning.less +30 -0
- data/lib/padrino-admin/bootstrap-less/font-awesome/stacked.less +20 -0
- data/lib/padrino-admin/bootstrap-less/font-awesome/variables.less +377 -731
- data/lib/padrino-admin/bootstrap-less/forms.less +105 -39
- data/lib/padrino-admin/bootstrap-less/glyphicons.less +16 -15
- data/lib/padrino-admin/bootstrap-less/grid.less +59 -305
- data/lib/padrino-admin/bootstrap-less/input-groups.less +43 -13
- data/lib/padrino-admin/bootstrap-less/jumbotron.less +12 -8
- data/lib/padrino-admin/bootstrap-less/labels.less +6 -0
- data/lib/padrino-admin/bootstrap-less/list-group.less +37 -15
- data/lib/padrino-admin/bootstrap-less/mixins.less +283 -80
- data/lib/padrino-admin/bootstrap-less/modals.less +19 -22
- data/lib/padrino-admin/bootstrap-less/navbar.less +73 -78
- data/lib/padrino-admin/bootstrap-less/navs.less +45 -32
- data/lib/padrino-admin/bootstrap-less/normalize.less +148 -121
- data/lib/padrino-admin/bootstrap-less/padrino-admin.less +3 -1
- data/lib/padrino-admin/bootstrap-less/pager.less +5 -5
- data/lib/padrino-admin/bootstrap-less/pagination.less +8 -3
- data/lib/padrino-admin/bootstrap-less/panels.less +102 -20
- data/lib/padrino-admin/bootstrap-less/print.less +6 -5
- data/lib/padrino-admin/bootstrap-less/progress-bars.less +4 -19
- data/lib/padrino-admin/bootstrap-less/responsive-utilities.less +32 -159
- data/lib/padrino-admin/bootstrap-less/scaffolding.less +18 -14
- data/lib/padrino-admin/bootstrap-less/tables.less +47 -50
- data/lib/padrino-admin/bootstrap-less/theme.less +33 -18
- data/lib/padrino-admin/bootstrap-less/thumbnails.less +23 -18
- data/lib/padrino-admin/bootstrap-less/tooltip.less +9 -9
- data/lib/padrino-admin/bootstrap-less/type.less +139 -81
- data/lib/padrino-admin/bootstrap-less/utilities.less +15 -1
- data/lib/padrino-admin/bootstrap-less/variables.less +398 -191
- data/lib/padrino-admin/bootstrap-less/wells.less +1 -1
- data/lib/padrino-admin/generators/admin_app.rb +1 -1
- data/lib/padrino-admin/generators/templates/account/minirecord.rb.tt +1 -1
- data/lib/padrino-admin/generators/templates/assets/images/font/FontAwesome.otf +0 -0
- data/lib/padrino-admin/generators/templates/assets/images/font/fontawesome-webfont.eot +0 -0
- data/lib/padrino-admin/generators/templates/assets/images/font/fontawesome-webfont.svg +23 -8
- data/lib/padrino-admin/generators/templates/assets/images/font/fontawesome-webfont.ttf +0 -0
- data/lib/padrino-admin/generators/templates/assets/images/font/fontawesome-webfont.woff +0 -0
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/affix.js +36 -25
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/alert.js +7 -17
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap.min.js +6 -6
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/button.js +26 -28
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/carousel.js +22 -34
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/collapse.js +9 -18
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/dropdown.js +25 -32
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/modal.js +27 -30
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/popover.js +16 -23
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/scrollspy.js +19 -24
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/tab.js +10 -20
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/tooltip.js +54 -41
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/transition.js +13 -21
- data/lib/padrino-admin/generators/templates/assets/javascripts/jquery-1.11.0.min.js +4 -0
- data/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap.css +4 -1238
- data/lib/padrino-admin/generators/templates/assets/stylesheets/fonts/FontAwesome.otf +0 -0
- data/lib/padrino-admin/generators/templates/assets/stylesheets/fonts/fontawesome-webfont.eot +0 -0
- data/lib/padrino-admin/generators/templates/assets/stylesheets/fonts/fontawesome-webfont.svg +414 -0
- data/lib/padrino-admin/generators/templates/assets/stylesheets/fonts/fontawesome-webfont.ttf +0 -0
- data/lib/padrino-admin/generators/templates/assets/stylesheets/fonts/fontawesome-webfont.woff +0 -0
- data/lib/padrino-admin/generators/templates/erb/app/base/index.erb.tt +5 -5
- data/lib/padrino-admin/generators/templates/erb/app/errors/403.erb.tt +1 -1
- data/lib/padrino-admin/generators/templates/erb/app/errors/404.erb.tt +1 -1
- data/lib/padrino-admin/generators/templates/erb/app/errors/500.erb.tt +1 -1
- data/lib/padrino-admin/generators/templates/erb/app/layouts/application.erb.tt +2 -2
- data/lib/padrino-admin/generators/templates/erb/app/sessions/new.erb.tt +1 -1
- data/lib/padrino-admin/generators/templates/erb/page/index.erb.tt +5 -5
- data/lib/padrino-admin/generators/templates/haml/app/base/index.haml.tt +5 -5
- data/lib/padrino-admin/generators/templates/haml/app/errors/403.haml.tt +1 -1
- data/lib/padrino-admin/generators/templates/haml/app/errors/404.haml.tt +1 -1
- data/lib/padrino-admin/generators/templates/haml/app/errors/500.haml.tt +1 -1
- data/lib/padrino-admin/generators/templates/haml/app/layouts/application.haml.tt +2 -2
- data/lib/padrino-admin/generators/templates/haml/app/sessions/new.haml.tt +2 -1
- data/lib/padrino-admin/generators/templates/haml/page/index.haml.tt +4 -4
- data/lib/padrino-admin/generators/templates/slim/app/base/index.slim.tt +5 -5
- data/lib/padrino-admin/generators/templates/slim/app/errors/403.slim.tt +1 -1
- data/lib/padrino-admin/generators/templates/slim/app/errors/404.slim.tt +1 -1
- data/lib/padrino-admin/generators/templates/slim/app/errors/500.slim.tt +1 -1
- data/lib/padrino-admin/generators/templates/slim/app/layouts/application.slim.tt +2 -2
- data/lib/padrino-admin/generators/templates/slim/app/sessions/new.slim.tt +1 -1
- data/lib/padrino-admin/generators/templates/slim/page/index.slim.tt +4 -4
- data/lib/padrino-admin/helpers/view_helpers.rb +1 -1
- data/lib/padrino-admin/locale/admin/zh_tw.yml +22 -22
- data/lib/padrino-admin/locale/orm/cs.yml +0 -25
- data/lib/padrino-admin/locale/orm/da.yml +0 -25
- data/lib/padrino-admin/locale/orm/de.yml +0 -25
- data/lib/padrino-admin/locale/orm/en.yml +0 -25
- data/lib/padrino-admin/locale/orm/es.yml +0 -25
- data/lib/padrino-admin/locale/orm/fr.yml +0 -25
- data/lib/padrino-admin/locale/orm/hu.yml +0 -25
- data/lib/padrino-admin/locale/orm/it.yml +0 -25
- data/lib/padrino-admin/locale/orm/ja.yml +0 -25
- data/lib/padrino-admin/locale/orm/lv.yml +0 -25
- data/lib/padrino-admin/locale/orm/nl.yml +0 -25
- data/lib/padrino-admin/locale/orm/no.yml +1 -26
- data/lib/padrino-admin/locale/orm/pt_br.yml +0 -25
- data/lib/padrino-admin/locale/orm/ro.yml +0 -25
- data/lib/padrino-admin/locale/orm/ru.yml +0 -25
- data/lib/padrino-admin/locale/orm/sv.yml +0 -25
- data/lib/padrino-admin/locale/orm/tr.yml +0 -25
- data/lib/padrino-admin/locale/orm/uk.yml +0 -25
- data/lib/padrino-admin/locale/orm/zh_cn.yml +0 -25
- data/lib/padrino-admin/locale/orm/zh_tw.yml +0 -25
- data/test/fixtures/data_mapper.rb +0 -41
- data/test/generators/test_admin_app_generator.rb +3 -6
- data/test/test_locale.rb +0 -33
- metadata +19 -14
- data/lib/padrino-admin/bootstrap-less/accordion.less +0 -31
- data/lib/padrino-admin/bootstrap-less/font-awesome-ie7.less +0 -1953
- data/lib/padrino-admin/bootstrap-less/font-awesome.less +0 -33
- data/lib/padrino-admin/bootstrap-less/font-awesome/bootstrap.less +0 -84
- data/lib/padrino-admin/bootstrap-less/font-awesome/extras.less +0 -93
- data/lib/padrino-admin/bootstrap-less/font-awesome/font-awesome-ie7.less +0 -1953
- data/lib/padrino-admin/generators/templates/assets/javascripts/jquery-1.9.0.min.js +0 -4
- data/lib/padrino-admin/utils/crypt.rb +0 -41
@@ -1,24 +1,14 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: collapse.js v3.
|
3
|
-
* http://
|
2
|
+
* Bootstrap: collapse.js v3.1.0
|
3
|
+
* http://getbootstrap.com/javascript/#collapse
|
4
4
|
* ========================================================================
|
5
|
-
* Copyright
|
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.
|
5
|
+
* Copyright 2011-2014 Twitter, Inc.
|
6
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
18
7
|
* ======================================================================== */
|
19
8
|
|
20
9
|
|
21
|
-
+function ($) {
|
10
|
+
+function ($) {
|
11
|
+
'use strict';
|
22
12
|
|
23
13
|
// COLLAPSE PUBLIC CLASS DEFINITION
|
24
14
|
// ================================
|
@@ -69,7 +59,7 @@
|
|
69
59
|
var complete = function () {
|
70
60
|
this.$element
|
71
61
|
.removeClass('collapsing')
|
72
|
-
.addClass('in')
|
62
|
+
.addClass('collapse in')
|
73
63
|
[dimension]('auto')
|
74
64
|
this.transitioning = 0
|
75
65
|
this.$element.trigger('shown.bs.collapse')
|
@@ -137,6 +127,7 @@
|
|
137
127
|
var data = $this.data('bs.collapse')
|
138
128
|
var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
|
139
129
|
|
130
|
+
if (!data && options.toggle && option == 'show') option = !option
|
140
131
|
if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
|
141
132
|
if (typeof option == 'string') data[option]()
|
142
133
|
})
|
@@ -176,4 +167,4 @@
|
|
176
167
|
$target.collapse(option)
|
177
168
|
})
|
178
169
|
|
179
|
-
}(
|
170
|
+
}(jQuery);
|
@@ -1,24 +1,14 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: dropdown.js v3.
|
3
|
-
* http://
|
2
|
+
* Bootstrap: dropdown.js v3.1.0
|
3
|
+
* http://getbootstrap.com/javascript/#dropdowns
|
4
4
|
* ========================================================================
|
5
|
-
* Copyright
|
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.
|
5
|
+
* Copyright 2011-2014 Twitter, Inc.
|
6
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
18
7
|
* ======================================================================== */
|
19
8
|
|
20
9
|
|
21
|
-
+function ($) {
|
10
|
+
+function ($) {
|
11
|
+
'use strict';
|
22
12
|
|
23
13
|
// DROPDOWN CLASS DEFINITION
|
24
14
|
// =========================
|
@@ -26,7 +16,7 @@
|
|
26
16
|
var backdrop = '.dropdown-backdrop'
|
27
17
|
var toggle = '[data-toggle=dropdown]'
|
28
18
|
var Dropdown = function (element) {
|
29
|
-
|
19
|
+
$(element).on('click.bs.dropdown', this.toggle)
|
30
20
|
}
|
31
21
|
|
32
22
|
Dropdown.prototype.toggle = function (e) {
|
@@ -41,17 +31,18 @@
|
|
41
31
|
|
42
32
|
if (!isActive) {
|
43
33
|
if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
|
44
|
-
// if mobile we
|
34
|
+
// if mobile we use a backdrop because click events don't delegate
|
45
35
|
$('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
|
46
36
|
}
|
47
37
|
|
48
|
-
|
38
|
+
var relatedTarget = { relatedTarget: this }
|
39
|
+
$parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
|
49
40
|
|
50
41
|
if (e.isDefaultPrevented()) return
|
51
42
|
|
52
43
|
$parent
|
53
44
|
.toggleClass('open')
|
54
|
-
.trigger('shown.bs.dropdown')
|
45
|
+
.trigger('shown.bs.dropdown', relatedTarget)
|
55
46
|
|
56
47
|
$this.focus()
|
57
48
|
}
|
@@ -77,7 +68,8 @@
|
|
77
68
|
return $this.click()
|
78
69
|
}
|
79
70
|
|
80
|
-
var
|
71
|
+
var desc = ' li:not(.divider):visible a'
|
72
|
+
var $items = $parent.find('[role=menu]' + desc + ', [role=listbox]' + desc)
|
81
73
|
|
82
74
|
if (!$items.length) return
|
83
75
|
|
@@ -85,19 +77,20 @@
|
|
85
77
|
|
86
78
|
if (e.keyCode == 38 && index > 0) index-- // up
|
87
79
|
if (e.keyCode == 40 && index < $items.length - 1) index++ // down
|
88
|
-
if (!~index) index=0
|
80
|
+
if (!~index) index = 0
|
89
81
|
|
90
82
|
$items.eq(index).focus()
|
91
83
|
}
|
92
84
|
|
93
|
-
function clearMenus() {
|
85
|
+
function clearMenus(e) {
|
94
86
|
$(backdrop).remove()
|
95
|
-
$(toggle).each(function (
|
87
|
+
$(toggle).each(function () {
|
96
88
|
var $parent = getParent($(this))
|
89
|
+
var relatedTarget = { relatedTarget: this }
|
97
90
|
if (!$parent.hasClass('open')) return
|
98
|
-
$parent.trigger(e = $.Event('hide.bs.dropdown'))
|
91
|
+
$parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
|
99
92
|
if (e.isDefaultPrevented()) return
|
100
|
-
$parent.removeClass('open').trigger('hidden.bs.dropdown')
|
93
|
+
$parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
|
101
94
|
})
|
102
95
|
}
|
103
96
|
|
@@ -106,7 +99,7 @@
|
|
106
99
|
|
107
100
|
if (!selector) {
|
108
101
|
selector = $this.attr('href')
|
109
|
-
selector = selector &&
|
102
|
+
selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
110
103
|
}
|
111
104
|
|
112
105
|
var $parent = selector && $(selector)
|
@@ -123,9 +116,9 @@
|
|
123
116
|
$.fn.dropdown = function (option) {
|
124
117
|
return this.each(function () {
|
125
118
|
var $this = $(this)
|
126
|
-
var data = $this.data('dropdown')
|
119
|
+
var data = $this.data('bs.dropdown')
|
127
120
|
|
128
|
-
if (!data) $this.data('dropdown', (data = new Dropdown(this)))
|
121
|
+
if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
|
129
122
|
if (typeof option == 'string') data[option].call($this)
|
130
123
|
})
|
131
124
|
}
|
@@ -148,7 +141,7 @@
|
|
148
141
|
$(document)
|
149
142
|
.on('click.bs.dropdown.data-api', clearMenus)
|
150
143
|
.on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
|
151
|
-
.on('click.bs.dropdown.data-api'
|
152
|
-
.on('keydown.bs.dropdown.data-api', toggle + ', [role=menu]'
|
144
|
+
.on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
|
145
|
+
.on('keydown.bs.dropdown.data-api', toggle + ', [role=menu], [role=listbox]', Dropdown.prototype.keydown)
|
153
146
|
|
154
|
-
}(
|
147
|
+
}(jQuery);
|
@@ -1,24 +1,14 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: modal.js v3.
|
3
|
-
* http://
|
2
|
+
* Bootstrap: modal.js v3.1.0
|
3
|
+
* http://getbootstrap.com/javascript/#modals
|
4
4
|
* ========================================================================
|
5
|
-
* Copyright
|
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.
|
5
|
+
* Copyright 2011-2014 Twitter, Inc.
|
6
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
18
7
|
* ======================================================================== */
|
19
8
|
|
20
9
|
|
21
|
-
+function ($) {
|
10
|
+
+function ($) {
|
11
|
+
'use strict';
|
22
12
|
|
23
13
|
// MODAL CLASS DEFINITION
|
24
14
|
// ======================
|
@@ -29,13 +19,19 @@
|
|
29
19
|
this.$backdrop =
|
30
20
|
this.isShown = null
|
31
21
|
|
32
|
-
if (this.options.remote)
|
22
|
+
if (this.options.remote) {
|
23
|
+
this.$element
|
24
|
+
.find('.modal-content')
|
25
|
+
.load(this.options.remote, $.proxy(function () {
|
26
|
+
this.$element.trigger('loaded.bs.modal')
|
27
|
+
}, this))
|
28
|
+
}
|
33
29
|
}
|
34
30
|
|
35
31
|
Modal.DEFAULTS = {
|
36
|
-
|
37
|
-
|
38
|
-
|
32
|
+
backdrop: true,
|
33
|
+
keyboard: true,
|
34
|
+
show: true
|
39
35
|
}
|
40
36
|
|
41
37
|
Modal.prototype.toggle = function (_relatedTarget) {
|
@@ -54,7 +50,7 @@
|
|
54
50
|
|
55
51
|
this.escape()
|
56
52
|
|
57
|
-
this.$element.on('click.dismiss.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
|
53
|
+
this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
|
58
54
|
|
59
55
|
this.backdrop(function () {
|
60
56
|
var transition = $.support.transition && that.$element.hasClass('fade')
|
@@ -63,7 +59,9 @@
|
|
63
59
|
that.$element.appendTo(document.body) // don't move modals dom position
|
64
60
|
}
|
65
61
|
|
66
|
-
that.$element
|
62
|
+
that.$element
|
63
|
+
.show()
|
64
|
+
.scrollTop(0)
|
67
65
|
|
68
66
|
if (transition) {
|
69
67
|
that.$element[0].offsetWidth // force reflow
|
@@ -105,7 +103,7 @@
|
|
105
103
|
this.$element
|
106
104
|
.removeClass('in')
|
107
105
|
.attr('aria-hidden', true)
|
108
|
-
.off('click.dismiss.modal')
|
106
|
+
.off('click.dismiss.bs.modal')
|
109
107
|
|
110
108
|
$.support.transition && this.$element.hasClass('fade') ?
|
111
109
|
this.$element
|
@@ -149,7 +147,6 @@
|
|
149
147
|
}
|
150
148
|
|
151
149
|
Modal.prototype.backdrop = function (callback) {
|
152
|
-
var that = this
|
153
150
|
var animate = this.$element.hasClass('fade') ? 'fade' : ''
|
154
151
|
|
155
152
|
if (this.isShown && this.options.backdrop) {
|
@@ -158,7 +155,7 @@
|
|
158
155
|
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
|
159
156
|
.appendTo(document.body)
|
160
157
|
|
161
|
-
this.$element.on('click.dismiss.modal', $.proxy(function (e) {
|
158
|
+
this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
|
162
159
|
if (e.target !== e.currentTarget) return
|
163
160
|
this.options.backdrop == 'static'
|
164
161
|
? this.$element[0].focus.call(this.$element[0])
|
@@ -180,7 +177,7 @@
|
|
180
177
|
} else if (!this.isShown && this.$backdrop) {
|
181
178
|
this.$backdrop.removeClass('in')
|
182
179
|
|
183
|
-
$.support.transition && this.$element.hasClass('fade')?
|
180
|
+
$.support.transition && this.$element.hasClass('fade') ?
|
184
181
|
this.$backdrop
|
185
182
|
.one($.support.transition.end, callback)
|
186
183
|
.emulateTransitionEnd(150) :
|
@@ -228,9 +225,9 @@
|
|
228
225
|
var $this = $(this)
|
229
226
|
var href = $this.attr('href')
|
230
227
|
var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
|
231
|
-
var option = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
|
228
|
+
var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
|
232
229
|
|
233
|
-
e.preventDefault()
|
230
|
+
if ($this.is('a')) e.preventDefault()
|
234
231
|
|
235
232
|
$target
|
236
233
|
.modal(option, this)
|
@@ -240,7 +237,7 @@
|
|
240
237
|
})
|
241
238
|
|
242
239
|
$(document)
|
243
|
-
.on('show.bs.modal',
|
240
|
+
.on('show.bs.modal', '.modal', function () { $(document.body).addClass('modal-open') })
|
244
241
|
.on('hidden.bs.modal', '.modal', function () { $(document.body).removeClass('modal-open') })
|
245
242
|
|
246
|
-
}(
|
243
|
+
}(jQuery);
|
@@ -1,24 +1,14 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: popover.js v3.
|
3
|
-
* http://
|
2
|
+
* Bootstrap: popover.js v3.1.0
|
3
|
+
* http://getbootstrap.com/javascript/#popovers
|
4
4
|
* ========================================================================
|
5
|
-
* Copyright
|
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.
|
5
|
+
* Copyright 2011-2014 Twitter, Inc.
|
6
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
18
7
|
* ======================================================================== */
|
19
8
|
|
20
9
|
|
21
|
-
+function ($) {
|
10
|
+
+function ($) {
|
11
|
+
'use strict';
|
22
12
|
|
23
13
|
// POPOVER PUBLIC CLASS DEFINITION
|
24
14
|
// ===============================
|
@@ -29,11 +19,11 @@
|
|
29
19
|
|
30
20
|
if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
|
31
21
|
|
32
|
-
Popover.DEFAULTS = $.extend({}
|
33
|
-
placement: 'right'
|
34
|
-
|
35
|
-
|
36
|
-
|
22
|
+
Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
|
23
|
+
placement: 'right',
|
24
|
+
trigger: 'click',
|
25
|
+
content: '',
|
26
|
+
template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
|
37
27
|
})
|
38
28
|
|
39
29
|
|
@@ -54,7 +44,9 @@
|
|
54
44
|
var content = this.getContent()
|
55
45
|
|
56
46
|
$tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
|
57
|
-
$tip.find('.popover-content')[
|
47
|
+
$tip.find('.popover-content')[ // we use append for html objects to maintain js events
|
48
|
+
this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
|
49
|
+
](content)
|
58
50
|
|
59
51
|
$tip.removeClass('fade top bottom left right in')
|
60
52
|
|
@@ -98,6 +90,7 @@
|
|
98
90
|
var data = $this.data('bs.popover')
|
99
91
|
var options = typeof option == 'object' && option
|
100
92
|
|
93
|
+
if (!data && option == 'destroy') return
|
101
94
|
if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
|
102
95
|
if (typeof option == 'string') data[option]()
|
103
96
|
})
|
@@ -114,4 +107,4 @@
|
|
114
107
|
return this
|
115
108
|
}
|
116
109
|
|
117
|
-
}(
|
110
|
+
}(jQuery);
|
@@ -1,24 +1,14 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: scrollspy.js v3.
|
3
|
-
* http://
|
2
|
+
* Bootstrap: scrollspy.js v3.1.0
|
3
|
+
* http://getbootstrap.com/javascript/#scrollspy
|
4
4
|
* ========================================================================
|
5
|
-
* Copyright
|
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.
|
5
|
+
* Copyright 2011-2014 Twitter, Inc.
|
6
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
18
7
|
* ======================================================================== */
|
19
8
|
|
20
9
|
|
21
|
-
+function ($) {
|
10
|
+
+function ($) {
|
11
|
+
'use strict';
|
22
12
|
|
23
13
|
// SCROLLSPY CLASS DEFINITION
|
24
14
|
// ==========================
|
@@ -58,10 +48,11 @@
|
|
58
48
|
.map(function () {
|
59
49
|
var $el = $(this)
|
60
50
|
var href = $el.data('target') || $el.attr('href')
|
61
|
-
var $href =
|
51
|
+
var $href = /^#./.test(href) && $(href)
|
62
52
|
|
63
53
|
return ($href
|
64
54
|
&& $href.length
|
55
|
+
&& $href.is(':visible')
|
65
56
|
&& [[ $href[offsetMethod]().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]]) || null
|
66
57
|
})
|
67
58
|
.sort(function (a, b) { return a[0] - b[0] })
|
@@ -84,6 +75,10 @@
|
|
84
75
|
return activeTarget != (i = targets.last()[0]) && this.activate(i)
|
85
76
|
}
|
86
77
|
|
78
|
+
if (activeTarget && scrollTop <= offsets[0]) {
|
79
|
+
return activeTarget != (i = targets[0]) && this.activate(i)
|
80
|
+
}
|
81
|
+
|
87
82
|
for (i = offsets.length; i--;) {
|
88
83
|
activeTarget != targets[i]
|
89
84
|
&& scrollTop >= offsets[i]
|
@@ -96,24 +91,24 @@
|
|
96
91
|
this.activeTarget = target
|
97
92
|
|
98
93
|
$(this.selector)
|
99
|
-
.
|
94
|
+
.parentsUntil(this.options.target, '.active')
|
100
95
|
.removeClass('active')
|
101
96
|
|
102
|
-
var selector = this.selector
|
103
|
-
|
104
|
-
|
97
|
+
var selector = this.selector +
|
98
|
+
'[data-target="' + target + '"],' +
|
99
|
+
this.selector + '[href="' + target + '"]'
|
105
100
|
|
106
101
|
var active = $(selector)
|
107
102
|
.parents('li')
|
108
103
|
.addClass('active')
|
109
104
|
|
110
|
-
if (active.parent('.dropdown-menu').length)
|
105
|
+
if (active.parent('.dropdown-menu').length) {
|
111
106
|
active = active
|
112
107
|
.closest('li.dropdown')
|
113
108
|
.addClass('active')
|
114
109
|
}
|
115
110
|
|
116
|
-
active.trigger('activate')
|
111
|
+
active.trigger('activate.bs.scrollspy')
|
117
112
|
}
|
118
113
|
|
119
114
|
|
@@ -155,4 +150,4 @@
|
|
155
150
|
})
|
156
151
|
})
|
157
152
|
|
158
|
-
}(
|
153
|
+
}(jQuery);
|