spiderfw 0.6.22 → 0.6.23
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +9 -0
- data/VERSION +1 -1
- data/apps/app_server/controllers/app_server_controller.rb +7 -2
- data/apps/app_server/lib/git_app.rb +5 -3
- data/apps/cas_server/controllers/mixins/cas_login_mixin.rb +2 -1
- data/apps/core/admin/controllers/admin_controller.rb +4 -4
- data/apps/core/admin/controllers/app_admin_controller.rb +3 -2
- data/apps/core/admin/public/css/sass/admin.css +56 -31
- data/apps/core/admin/public/sass/admin.scss +38 -4
- data/apps/core/admin/views/_breadcrumb.shtml +8 -0
- data/apps/core/admin/views/admin.layout.shtml +8 -5
- data/apps/core/auth/controllers/login_controller.rb +3 -8
- data/apps/core/components/assets.rb +37 -1
- data/apps/core/components/public/bootstrap/LICENSE +13 -0
- data/apps/core/components/public/bootstrap/README.md +28 -0
- data/apps/core/components/public/bootstrap/img/glyphicons-halflings-white.png +0 -0
- data/apps/core/components/public/bootstrap/img/glyphicons-halflings.png +0 -0
- data/apps/core/components/public/bootstrap/js/README.md +106 -0
- data/apps/core/components/public/bootstrap/js/bootstrap-alert.js +91 -0
- data/apps/core/components/public/bootstrap/js/bootstrap-button.js +98 -0
- data/apps/core/components/public/bootstrap/js/bootstrap-carousel.js +154 -0
- data/apps/core/components/public/bootstrap/js/bootstrap-collapse.js +136 -0
- data/apps/core/components/public/bootstrap/js/bootstrap-dropdown.js +92 -0
- data/apps/core/components/public/bootstrap/js/bootstrap-modal.js +209 -0
- data/apps/core/components/public/bootstrap/js/bootstrap-popover.js +95 -0
- data/apps/core/components/public/bootstrap/js/bootstrap-scrollspy.js +125 -0
- data/apps/core/components/public/bootstrap/js/bootstrap-tab.js +130 -0
- data/apps/core/components/public/bootstrap/js/bootstrap-tooltip.js +270 -0
- data/apps/core/components/public/bootstrap/js/bootstrap-transition.js +51 -0
- data/apps/core/components/public/bootstrap/js/bootstrap-typeahead.js +271 -0
- data/apps/core/components/public/bootstrap/js/tests/index.html +49 -0
- data/apps/core/components/public/bootstrap/js/tests/unit/bootstrap-alert.js +41 -0
- data/apps/core/components/public/bootstrap/js/tests/unit/bootstrap-button.js +54 -0
- data/apps/core/components/public/bootstrap/js/tests/unit/bootstrap-collapse.js +25 -0
- data/apps/core/components/public/bootstrap/js/tests/unit/bootstrap-dropdown.js +53 -0
- data/apps/core/components/public/bootstrap/js/tests/unit/bootstrap-modal.js +85 -0
- data/apps/core/components/public/bootstrap/js/tests/unit/bootstrap-popover.js +93 -0
- data/apps/core/components/public/bootstrap/js/tests/unit/bootstrap-scrollspy.js +31 -0
- data/apps/core/components/public/bootstrap/js/tests/unit/bootstrap-tab.js +45 -0
- data/apps/core/components/public/bootstrap/js/tests/unit/bootstrap-tooltip.js +62 -0
- data/apps/core/components/public/bootstrap/js/tests/unit/bootstrap-transition.js +13 -0
- data/apps/core/components/public/bootstrap/js/tests/unit/bootstrap-typeahead.js +128 -0
- data/apps/core/components/public/bootstrap/js/tests/vendor/jquery.js +9252 -0
- data/apps/core/components/public/bootstrap/js/tests/vendor/qunit.css +232 -0
- data/apps/core/components/public/bootstrap/js/tests/vendor/qunit.js +1510 -0
- data/apps/core/components/public/bootstrap/scss/_accordion.scss +28 -0
- data/apps/core/components/public/bootstrap/scss/_alerts.scss +70 -0
- data/apps/core/components/public/bootstrap/scss/_breadcrumbs.scss +22 -0
- data/apps/core/components/public/bootstrap/scss/_button-groups.scss +146 -0
- data/apps/core/components/public/bootstrap/scss/_buttons.scss +165 -0
- data/apps/core/components/public/bootstrap/scss/_carousel.scss +121 -0
- data/apps/core/components/public/bootstrap/scss/_close.scss +18 -0
- data/apps/core/components/public/bootstrap/scss/_code.scss +44 -0
- data/apps/core/components/public/bootstrap/scss/_component-animations.scss +18 -0
- data/apps/core/components/public/bootstrap/scss/_custom.css +0 -0
- data/apps/core/components/public/bootstrap/scss/_dropdowns.scss +131 -0
- data/apps/core/components/public/bootstrap/scss/_forms.scss +516 -0
- data/apps/core/components/public/bootstrap/scss/_grid.scss +8 -0
- data/apps/core/components/public/bootstrap/scss/_hero-unit.scss +20 -0
- data/apps/core/components/public/bootstrap/scss/_labels.scss +16 -0
- data/apps/core/components/public/bootstrap/scss/_layouts.scss +17 -0
- data/apps/core/components/public/bootstrap/scss/_mixins.scss +538 -0
- data/apps/core/components/public/bootstrap/scss/_modals.scss +72 -0
- data/apps/core/components/public/bootstrap/scss/_navbar.scss +292 -0
- data/apps/core/components/public/bootstrap/scss/_navs.scss +343 -0
- data/apps/core/components/public/bootstrap/scss/_pager.scss +30 -0
- data/apps/core/components/public/bootstrap/scss/_pagination.scss +64 -0
- data/apps/core/components/public/bootstrap/scss/_patterns.scss +13 -0
- data/apps/core/components/public/bootstrap/scss/_popovers.scss +49 -0
- data/apps/core/components/public/bootstrap/scss/_print.scss +18 -0
- data/apps/core/components/public/bootstrap/scss/_progress-bars.scss +95 -0
- data/apps/core/{admin/public/sass/bootstrap/reset.scss → components/public/bootstrap/scss/_reset.scss} +36 -51
- data/apps/core/components/public/bootstrap/scss/_scaffolding.scss +29 -0
- data/apps/core/components/public/bootstrap/scss/_sprites.scss +156 -0
- data/apps/core/components/public/bootstrap/scss/_tables.scss +139 -0
- data/apps/core/components/public/bootstrap/scss/_thumbnails.scss +35 -0
- data/apps/core/components/public/bootstrap/scss/_tooltip.scss +35 -0
- data/apps/core/components/public/bootstrap/scss/_type.scss +217 -0
- data/apps/core/components/public/bootstrap/scss/_utilities.scss +23 -0
- data/apps/core/components/public/bootstrap/scss/_variables.scss +99 -0
- data/apps/core/components/public/bootstrap/scss/_wells.scss +17 -0
- data/apps/core/components/public/bootstrap/scss/bootstrap-responsive.css +707 -0
- data/apps/core/components/public/bootstrap/scss/bootstrap-responsive.scss +323 -0
- data/apps/core/components/public/bootstrap/scss/bootstrap.css +4604 -0
- data/apps/core/components/public/bootstrap/scss/bootstrap.scss +62 -0
- data/apps/core/components/public/bootstrap/scss/config.rb +36 -0
- data/apps/core/components/public/css/admin.css +2 -1
- data/apps/core/components/public/css/sass/bootstrap/bootstrap.css +3107 -0
- data/apps/core/components/public/css/table_base.css +9 -0
- data/apps/core/components/public/widgets/month_calendar.js +9 -0
- data/apps/core/components/widgets/crud/crud.rb +9 -1
- data/apps/core/components/widgets/crud/crud.shtml +2 -2
- data/apps/core/components/widgets/month_calendar/month_calendar.shtml +1 -0
- data/apps/core/components/widgets/table/table.rb +84 -55
- data/apps/core/components/widgets/table/table.shtml +2 -1
- data/apps/core/forms/public/ckeditor/CHANGES.html +139 -1
- data/apps/core/forms/public/ckeditor/LICENSE.html +1 -8
- data/apps/core/forms/public/ckeditor/ckeditor.js +141 -137
- data/apps/core/forms/public/ckeditor/ckeditor_basic.js +3 -3
- data/apps/core/forms/public/ckeditor/ckeditor_basic_source.js +1 -1
- data/apps/core/forms/public/ckeditor/ckeditor_source.js +13 -3
- data/apps/core/forms/public/ckeditor/contents.css +4 -2
- data/apps/core/forms/public/ckeditor/lang/_translationstatus.txt +59 -59
- data/apps/core/forms/public/ckeditor/lang/af.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/ar.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/bg.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/bn.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/bs.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/ca.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/cs.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/cy.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/da.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/de.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/el.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/en-au.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/en-ca.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/en-gb.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/en.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/eo.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/es.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/et.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/eu.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/fa.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/fi.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/fo.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/fr-ca.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/fr.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/gl.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/gu.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/he.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/hi.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/hr.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/hu.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/is.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/it.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/ja.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/ka.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/km.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/ko.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/lt.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/lv.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/mn.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/ms.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/nb.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/nl.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/no.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/pl.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/pt-br.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/pt.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/ro.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/ru.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/sk.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/sl.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/sr-latn.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/sr.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/sv.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/th.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/tr.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/uk.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/vi.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/zh-cn.js +1 -1
- data/apps/core/forms/public/ckeditor/lang/zh.js +1 -1
- data/apps/core/forms/public/ckeditor/plugins/autogrow/plugin.js +1 -1
- data/apps/core/forms/public/ckeditor/plugins/bbcode/plugin.js +4 -4
- data/apps/core/forms/public/ckeditor/plugins/docprops/dialogs/docprops.js +2 -2
- data/apps/core/forms/public/ckeditor/plugins/find/dialogs/find.js +5 -4
- data/apps/core/forms/public/ckeditor/plugins/flash/dialogs/flash.js +4 -4
- data/apps/core/forms/public/ckeditor/plugins/forms/dialogs/select.js +2 -2
- data/apps/core/forms/public/ckeditor/plugins/forms/dialogs/textarea.js +1 -1
- data/apps/core/forms/public/ckeditor/plugins/iframe/dialogs/iframe.js +2 -2
- data/apps/core/forms/public/ckeditor/plugins/image/dialogs/image.js +6 -6
- data/apps/core/forms/public/ckeditor/plugins/link/dialogs/link.js +6 -5
- data/apps/core/forms/public/ckeditor/plugins/liststyle/dialogs/liststyle.js +2 -1
- data/apps/core/forms/public/ckeditor/plugins/pastefromword/filter/default.js +5 -5
- data/apps/core/forms/public/ckeditor/plugins/specialchar/dialogs/specialchar.js +1 -1
- data/apps/core/forms/public/ckeditor/plugins/specialchar/lang/en.js +1 -1
- data/apps/core/forms/public/ckeditor/plugins/table/dialogs/table.js +4 -4
- data/apps/core/forms/public/ckeditor/plugins/tableresize/plugin.js +2 -2
- data/apps/core/forms/public/ckeditor/plugins/wsc/dialogs/wsc.js +1 -1
- data/apps/core/forms/public/ckeditor/skins/BootstrapCK-Skin/README.md +26 -0
- data/apps/core/forms/public/ckeditor/skins/BootstrapCK-Skin/dialog.css +616 -0
- data/apps/core/forms/public/ckeditor/skins/BootstrapCK-Skin/editor.css +1088 -0
- data/apps/core/forms/public/ckeditor/skins/BootstrapCK-Skin/icons.png +0 -0
- data/apps/core/forms/public/ckeditor/skins/BootstrapCK-Skin/images/dialog_sides.gif +0 -0
- data/apps/core/forms/public/ckeditor/skins/BootstrapCK-Skin/images/dialog_sides.png +0 -0
- data/apps/core/forms/public/ckeditor/skins/BootstrapCK-Skin/images/dialog_sides_rtl.png +0 -0
- data/apps/core/forms/public/ckeditor/skins/BootstrapCK-Skin/images/mini.png +0 -0
- data/apps/core/forms/public/ckeditor/skins/BootstrapCK-Skin/images/noimage.png +0 -0
- data/apps/core/forms/public/ckeditor/skins/BootstrapCK-Skin/images/sprites.png +0 -0
- data/apps/core/forms/public/ckeditor/skins/BootstrapCK-Skin/images/sprites_ie6.png +0 -0
- data/apps/core/forms/public/ckeditor/skins/BootstrapCK-Skin/images/toolbar_start.gif +0 -0
- data/apps/core/forms/public/ckeditor/skins/BootstrapCK-Skin/skin.js +7 -0
- data/apps/core/forms/public/ckeditor/skins/BootstrapCK-Skin/templates.css +54 -0
- data/apps/core/forms/public/ckeditor/skins/kama/dialog.css +4 -3
- data/apps/core/forms/public/ckeditor/skins/kama/editor.css +3 -3
- data/apps/core/forms/public/ckeditor/themes/default/theme.js +2 -2
- data/apps/core/forms/public/css/form.css +5 -5
- data/apps/core/forms/public/html_area.js +5 -5
- data/apps/core/forms/tags/element_label.erb +1 -1
- data/apps/core/forms/tags/row.erb +1 -1
- data/apps/core/forms/widgets/form/form.rb +2 -1
- data/apps/core/forms/widgets/form/form.shtml +3 -3
- data/apps/core/forms/widgets/inputs/checkbox/checkbox.shtml +1 -1
- data/apps/core/forms/widgets/inputs/date_time/date_time.shtml +1 -1
- data/apps/core/forms/widgets/inputs/file_input/file_input.shtml +1 -1
- data/apps/core/forms/widgets/inputs/html_area/html_area.shtml +1 -1
- data/apps/core/forms/widgets/inputs/input/input.shtml +1 -1
- data/apps/core/forms/widgets/inputs/input/readonly.shtml +1 -1
- data/apps/core/forms/widgets/inputs/password/password.shtml +1 -1
- data/apps/core/forms/widgets/inputs/search_select/search_select.shtml +1 -1
- data/apps/core/forms/widgets/inputs/select/select.shtml +1 -1
- data/apps/core/forms/widgets/inputs/text/text.shtml +1 -1
- data/apps/core/forms/widgets/inputs/text_area/text_area.shtml +1 -1
- data/apps/core/forms/widgets/inputs/time_span/time_span.shtml +1 -1
- data/apps/messenger/controllers/messenger_admin_controller.rb +19 -4
- data/apps/messenger/views/admin/_admin.layout.shtml +1 -1
- data/apps/messenger/views/admin/queue.shtml +6 -6
- data/apps/messenger/views/admin/view_email.shtml +7 -0
- data/apps/messenger/views/admin/view_sms.shtml +4 -0
- data/blueprints/app/.dirs +2 -1
- data/blueprints/app/test/features/support/env.rb +4 -0
- data/data/locale/it/LC_MESSAGES/spider.mo +0 -0
- data/lib/spiderfw/cmd/commands/config.rb +6 -3
- data/lib/spiderfw/config/configuration.rb +11 -2
- data/lib/spiderfw/config/options/spider.rb +1 -1
- data/lib/spiderfw/controller/controller.rb +27 -15
- data/lib/spiderfw/controller/dispatcher.rb +8 -4
- data/lib/spiderfw/controller/http_controller.rb +9 -5
- data/lib/spiderfw/controller/mixins/static_content.rb +1 -0
- data/lib/spiderfw/controller/mixins/visual.rb +48 -31
- data/lib/spiderfw/home.rb +8 -0
- data/lib/spiderfw/i18n/cldr.rb +1 -0
- data/lib/spiderfw/model/base_model.rb +2 -2
- data/lib/spiderfw/model/mappers/db_mapper.rb +1 -0
- data/lib/spiderfw/model/unit_of_work.rb +2 -2
- data/lib/spiderfw/requires.rb +1 -0
- data/lib/spiderfw/setup/app_manager.rb +16 -8
- data/lib/spiderfw/spider.rb +2 -2
- data/lib/spiderfw/templates/layout.rb +16 -9
- data/lib/spiderfw/templates/template.rb +28 -8
- data/lib/spiderfw/utils/logger.rb +9 -9
- data/views/errors/error.layout.shtml +9 -4
- metadata +98 -13
- data/apps/core/admin/public/sass/bootstrap/bootstrap.scss +0 -29
- data/apps/core/admin/public/sass/bootstrap/forms.scss +0 -478
- data/apps/core/admin/public/sass/bootstrap/mixins.scss +0 -220
- data/apps/core/admin/public/sass/bootstrap/patterns.scss +0 -1062
- data/apps/core/admin/public/sass/bootstrap/scaffolding.scss +0 -136
- data/apps/core/admin/public/sass/bootstrap/tables.scss +0 -224
- data/apps/core/admin/public/sass/bootstrap/type.scss +0 -187
- data/apps/core/admin/public/sass/bootstrap/variables.scss +0 -60
@@ -0,0 +1,106 @@
|
|
1
|
+
## 2.0 BOOTSTRAP JS PHILOSOPHY
|
2
|
+
These are the high-level design rules which guide the development of Bootstrap's plugin apis.
|
3
|
+
|
4
|
+
---
|
5
|
+
|
6
|
+
### DATA-ATTRIBUTE API
|
7
|
+
|
8
|
+
We believe you should be able to use all plugins provided by Bootstrap purely through the markup API without writing a single line of javascript.
|
9
|
+
|
10
|
+
We acknowledge that this isn't always the most performant and sometimes it may be desirable to turn this functionality off altogether. Therefore, as of 2.0 we provide the ability to disable the data attribute API by unbinding all events on the body namespaced with `'data-api'`. This looks like this:
|
11
|
+
|
12
|
+
$('body').off('.data-api')
|
13
|
+
|
14
|
+
To target a specific plugin, just include the plugins name as a namespace along with the data-api namespace like this:
|
15
|
+
|
16
|
+
$('body').off('.alert.data-api')
|
17
|
+
|
18
|
+
---
|
19
|
+
|
20
|
+
### PROGRAMATIC API
|
21
|
+
|
22
|
+
We also believe you should be able to use all plugins provided by Bootstrap purely through the JS API.
|
23
|
+
|
24
|
+
All public APIs should be single, chainable methods, and return the collection acted upon.
|
25
|
+
|
26
|
+
$(".btn.danger").button("toggle").addClass("fat")
|
27
|
+
|
28
|
+
All methods should accept an optional options object, a string which targets a particular method, or null which initiates the default behavior:
|
29
|
+
|
30
|
+
$("#myModal").modal() // initialized with defaults
|
31
|
+
$("#myModal").modal({ keyboard: false }) // initialized with now keyboard
|
32
|
+
$("#myModal").modal('show') // initializes and invokes show immediately afterqwe2
|
33
|
+
|
34
|
+
---
|
35
|
+
|
36
|
+
### OPTIONS
|
37
|
+
|
38
|
+
Options should be sparse and add universal value. We should pick the right defaults.
|
39
|
+
|
40
|
+
All plugins should have a default object which can be modified to effect all instance's default options. The defaults object should be available via `$.fn.plugin.defaults`.
|
41
|
+
|
42
|
+
$.fn.modal.defaults = { … }
|
43
|
+
|
44
|
+
An options definition should take the following form:
|
45
|
+
|
46
|
+
*noun*: *adjective* - describes or modifies a quality of an instance
|
47
|
+
|
48
|
+
examples:
|
49
|
+
|
50
|
+
backdrop: true
|
51
|
+
keyboard: false
|
52
|
+
placement: 'top'
|
53
|
+
|
54
|
+
---
|
55
|
+
|
56
|
+
### EVENTS
|
57
|
+
|
58
|
+
All events should have an infinitive and past participle form. The infinitive is fired just before an action takes place, the past participle on completion of the action.
|
59
|
+
|
60
|
+
show | shown
|
61
|
+
hide | hidden
|
62
|
+
|
63
|
+
---
|
64
|
+
|
65
|
+
### CONSTRUCTORS
|
66
|
+
|
67
|
+
Each plugin should expose it's raw constructor on a `Constructor` property -- accessed in the following way:
|
68
|
+
|
69
|
+
|
70
|
+
$.fn.popover.Constructor
|
71
|
+
|
72
|
+
---
|
73
|
+
|
74
|
+
### DATA ACCESSOR
|
75
|
+
|
76
|
+
Each plugin stores a copy of the invoked class on an object. This class instance can be accessed directly through jQuery's data API like this:
|
77
|
+
|
78
|
+
$('[rel=popover]').data('popover') instanceof $.fn.popover.Constructor
|
79
|
+
|
80
|
+
---
|
81
|
+
|
82
|
+
### DATA ATTRIBUTES
|
83
|
+
|
84
|
+
Data attributes should take the following form:
|
85
|
+
|
86
|
+
- data-{{verb}}={{plugin}} - defines main interaction
|
87
|
+
- data-target || href^=# - defined on "control" element (if element controls an element other than self)
|
88
|
+
- data-{{noun}} - defines class instance options
|
89
|
+
|
90
|
+
examples:
|
91
|
+
|
92
|
+
// control other targets
|
93
|
+
data-toggle="modal" data-target="#foo"
|
94
|
+
data-toggle="collapse" data-target="#foo" data-parent="#bar"
|
95
|
+
|
96
|
+
// defined on element they control
|
97
|
+
data-spy="scroll"
|
98
|
+
|
99
|
+
data-dismiss="modal"
|
100
|
+
data-dismiss="alert"
|
101
|
+
|
102
|
+
data-toggle="dropdown"
|
103
|
+
|
104
|
+
data-toggle="button"
|
105
|
+
data-toggle="buttons-checkbox"
|
106
|
+
data-toggle="buttons-radio"
|
@@ -0,0 +1,91 @@
|
|
1
|
+
/* ==========================================================
|
2
|
+
* bootstrap-alert.js v2.0.0
|
3
|
+
* http://twitter.github.com/bootstrap/javascript.html#alerts
|
4
|
+
* ==========================================================
|
5
|
+
* Copyright 2012 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
|
+
/* ALERT CLASS DEFINITION
|
26
|
+
* ====================== */
|
27
|
+
|
28
|
+
var dismiss = '[data-dismiss="alert"]'
|
29
|
+
, Alert = function ( el ) {
|
30
|
+
$(el).on('click', dismiss, this.close)
|
31
|
+
}
|
32
|
+
|
33
|
+
Alert.prototype = {
|
34
|
+
|
35
|
+
constructor: Alert
|
36
|
+
|
37
|
+
, close: function ( e ) {
|
38
|
+
var $this = $(this)
|
39
|
+
, selector = $this.attr('data-target')
|
40
|
+
, $parent
|
41
|
+
|
42
|
+
if (!selector) {
|
43
|
+
selector = $this.attr('href')
|
44
|
+
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
45
|
+
}
|
46
|
+
|
47
|
+
$parent = $(selector)
|
48
|
+
$parent.trigger('close')
|
49
|
+
|
50
|
+
e && e.preventDefault()
|
51
|
+
|
52
|
+
$parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
|
53
|
+
|
54
|
+
$parent.removeClass('in')
|
55
|
+
|
56
|
+
function removeElement() {
|
57
|
+
$parent.remove()
|
58
|
+
$parent.trigger('closed')
|
59
|
+
}
|
60
|
+
|
61
|
+
$.support.transition && $parent.hasClass('fade') ?
|
62
|
+
$parent.on($.support.transition.end, removeElement) :
|
63
|
+
removeElement()
|
64
|
+
}
|
65
|
+
|
66
|
+
}
|
67
|
+
|
68
|
+
|
69
|
+
/* ALERT PLUGIN DEFINITION
|
70
|
+
* ======================= */
|
71
|
+
|
72
|
+
$.fn.alert = function ( option ) {
|
73
|
+
return this.each(function () {
|
74
|
+
var $this = $(this)
|
75
|
+
, data = $this.data('alert')
|
76
|
+
if (!data) $this.data('alert', (data = new Alert(this)))
|
77
|
+
if (typeof option == 'string') data[option].call($this)
|
78
|
+
})
|
79
|
+
}
|
80
|
+
|
81
|
+
$.fn.alert.Constructor = Alert
|
82
|
+
|
83
|
+
|
84
|
+
/* ALERT DATA-API
|
85
|
+
* ============== */
|
86
|
+
|
87
|
+
$(function () {
|
88
|
+
$('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
|
89
|
+
})
|
90
|
+
|
91
|
+
}( window.jQuery )
|
@@ -0,0 +1,98 @@
|
|
1
|
+
/* ============================================================
|
2
|
+
* bootstrap-button.js v2.0.0
|
3
|
+
* http://twitter.github.com/bootstrap/javascript.html#buttons
|
4
|
+
* ============================================================
|
5
|
+
* Copyright 2012 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
|
+
/* BUTTON PUBLIC CLASS DEFINITION
|
25
|
+
* ============================== */
|
26
|
+
|
27
|
+
var Button = function ( element, options ) {
|
28
|
+
this.$element = $(element)
|
29
|
+
this.options = $.extend({}, $.fn.button.defaults, options)
|
30
|
+
}
|
31
|
+
|
32
|
+
Button.prototype = {
|
33
|
+
|
34
|
+
constructor: Button
|
35
|
+
|
36
|
+
, setState: function ( state ) {
|
37
|
+
var d = 'disabled'
|
38
|
+
, $el = this.$element
|
39
|
+
, data = $el.data()
|
40
|
+
, val = $el.is('input') ? 'val' : 'html'
|
41
|
+
|
42
|
+
state = state + 'Text'
|
43
|
+
data.resetText || $el.data('resetText', $el[val]())
|
44
|
+
|
45
|
+
$el[val](data[state] || this.options[state])
|
46
|
+
|
47
|
+
// push to event loop to allow forms to submit
|
48
|
+
setTimeout(function () {
|
49
|
+
state == 'loadingText' ?
|
50
|
+
$el.addClass(d).attr(d, d) :
|
51
|
+
$el.removeClass(d).removeAttr(d)
|
52
|
+
}, 0)
|
53
|
+
}
|
54
|
+
|
55
|
+
, toggle: function () {
|
56
|
+
var $parent = this.$element.parent('[data-toggle="buttons-radio"]')
|
57
|
+
|
58
|
+
$parent && $parent
|
59
|
+
.find('.active')
|
60
|
+
.removeClass('active')
|
61
|
+
|
62
|
+
this.$element.toggleClass('active')
|
63
|
+
}
|
64
|
+
|
65
|
+
}
|
66
|
+
|
67
|
+
|
68
|
+
/* BUTTON PLUGIN DEFINITION
|
69
|
+
* ======================== */
|
70
|
+
|
71
|
+
$.fn.button = function ( option ) {
|
72
|
+
return this.each(function () {
|
73
|
+
var $this = $(this)
|
74
|
+
, data = $this.data('button')
|
75
|
+
, options = typeof option == 'object' && option
|
76
|
+
if (!data) $this.data('button', (data = new Button(this, options)))
|
77
|
+
if (option == 'toggle') data.toggle()
|
78
|
+
else if (option) data.setState(option)
|
79
|
+
})
|
80
|
+
}
|
81
|
+
|
82
|
+
$.fn.button.defaults = {
|
83
|
+
loadingText: 'loading...'
|
84
|
+
}
|
85
|
+
|
86
|
+
$.fn.button.Constructor = Button
|
87
|
+
|
88
|
+
|
89
|
+
/* BUTTON DATA-API
|
90
|
+
* =============== */
|
91
|
+
|
92
|
+
$(function () {
|
93
|
+
$('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
|
94
|
+
$(e.target).button('toggle')
|
95
|
+
})
|
96
|
+
})
|
97
|
+
|
98
|
+
}( window.jQuery )
|
@@ -0,0 +1,154 @@
|
|
1
|
+
/* ==========================================================
|
2
|
+
* bootstrap-carousel.js v2.0.0
|
3
|
+
* http://twitter.github.com/bootstrap/javascript.html#carousel
|
4
|
+
* ==========================================================
|
5
|
+
* Copyright 2012 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
|
+
/* CAROUSEL CLASS DEFINITION
|
26
|
+
* ========================= */
|
27
|
+
|
28
|
+
var Carousel = function (element, options) {
|
29
|
+
this.$element = $(element)
|
30
|
+
this.options = $.extend({}, $.fn.carousel.defaults, options)
|
31
|
+
this.options.slide && this.slide(this.options.slide)
|
32
|
+
}
|
33
|
+
|
34
|
+
Carousel.prototype = {
|
35
|
+
|
36
|
+
cycle: function () {
|
37
|
+
this.interval = setInterval($.proxy(this.next, this), this.options.interval)
|
38
|
+
return this
|
39
|
+
}
|
40
|
+
|
41
|
+
, to: function (pos) {
|
42
|
+
var $active = this.$element.find('.active')
|
43
|
+
, children = $active.parent().children()
|
44
|
+
, activePos = children.index($active)
|
45
|
+
, that = this
|
46
|
+
|
47
|
+
if (pos > (children.length - 1) || pos < 0) return
|
48
|
+
|
49
|
+
if (this.sliding) {
|
50
|
+
return this.$element.one('slid', function () {
|
51
|
+
that.to(pos)
|
52
|
+
})
|
53
|
+
}
|
54
|
+
|
55
|
+
if (activePos == pos) {
|
56
|
+
return this.pause().cycle()
|
57
|
+
}
|
58
|
+
|
59
|
+
return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos]))
|
60
|
+
}
|
61
|
+
|
62
|
+
, pause: function () {
|
63
|
+
clearInterval(this.interval)
|
64
|
+
return this
|
65
|
+
}
|
66
|
+
|
67
|
+
, next: function () {
|
68
|
+
if (this.sliding) return
|
69
|
+
return this.slide('next')
|
70
|
+
}
|
71
|
+
|
72
|
+
, prev: function () {
|
73
|
+
if (this.sliding) return
|
74
|
+
return this.slide('prev')
|
75
|
+
}
|
76
|
+
|
77
|
+
, slide: function (type, next) {
|
78
|
+
var $active = this.$element.find('.active')
|
79
|
+
, $next = next || $active[type]()
|
80
|
+
, isCycling = this.interval
|
81
|
+
, direction = type == 'next' ? 'left' : 'right'
|
82
|
+
, fallback = type == 'next' ? 'first' : 'last'
|
83
|
+
, that = this
|
84
|
+
|
85
|
+
this.sliding = true
|
86
|
+
|
87
|
+
isCycling && this.pause()
|
88
|
+
|
89
|
+
$next = $next.length ? $next : this.$element.find('.item')[fallback]()
|
90
|
+
|
91
|
+
if (!$.support.transition && this.$element.hasClass('slide')) {
|
92
|
+
this.$element.trigger('slide')
|
93
|
+
$active.removeClass('active')
|
94
|
+
$next.addClass('active')
|
95
|
+
this.sliding = false
|
96
|
+
this.$element.trigger('slid')
|
97
|
+
} else {
|
98
|
+
$next.addClass(type)
|
99
|
+
$next[0].offsetWidth // force reflow
|
100
|
+
$active.addClass(direction)
|
101
|
+
$next.addClass(direction)
|
102
|
+
this.$element.trigger('slide')
|
103
|
+
this.$element.one($.support.transition.end, function () {
|
104
|
+
$next.removeClass([type, direction].join(' ')).addClass('active')
|
105
|
+
$active.removeClass(['active', direction].join(' '))
|
106
|
+
that.sliding = false
|
107
|
+
setTimeout(function () { that.$element.trigger('slid') }, 0)
|
108
|
+
})
|
109
|
+
}
|
110
|
+
|
111
|
+
isCycling && this.cycle()
|
112
|
+
|
113
|
+
return this
|
114
|
+
}
|
115
|
+
|
116
|
+
}
|
117
|
+
|
118
|
+
|
119
|
+
/* CAROUSEL PLUGIN DEFINITION
|
120
|
+
* ========================== */
|
121
|
+
|
122
|
+
$.fn.carousel = function ( option ) {
|
123
|
+
return this.each(function () {
|
124
|
+
var $this = $(this)
|
125
|
+
, data = $this.data('carousel')
|
126
|
+
, options = typeof option == 'object' && option
|
127
|
+
if (!data) $this.data('carousel', (data = new Carousel(this, options)))
|
128
|
+
if (typeof option == 'number') data.to(option)
|
129
|
+
else if (typeof option == 'string' || (option = options.slide)) data[option]()
|
130
|
+
else data.cycle()
|
131
|
+
})
|
132
|
+
}
|
133
|
+
|
134
|
+
$.fn.carousel.defaults = {
|
135
|
+
interval: 5000
|
136
|
+
}
|
137
|
+
|
138
|
+
$.fn.carousel.Constructor = Carousel
|
139
|
+
|
140
|
+
|
141
|
+
/* CAROUSEL DATA-API
|
142
|
+
* ================= */
|
143
|
+
|
144
|
+
$(function () {
|
145
|
+
$('body').on('click.carousel.data-api', '[data-slide]', function ( e ) {
|
146
|
+
var $this = $(this), href
|
147
|
+
, $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|
148
|
+
, options = !$target.data('modal') && $.extend({}, $target.data(), $this.data())
|
149
|
+
$target.carousel(options)
|
150
|
+
e.preventDefault()
|
151
|
+
})
|
152
|
+
})
|
153
|
+
|
154
|
+
}( window.jQuery )
|
@@ -0,0 +1,136 @@
|
|
1
|
+
/* =============================================================
|
2
|
+
* bootstrap-collapse.js v2.0.0
|
3
|
+
* http://twitter.github.com/bootstrap/javascript.html#collapse
|
4
|
+
* =============================================================
|
5
|
+
* Copyright 2012 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
|
+
var Collapse = function ( element, options ) {
|
25
|
+
this.$element = $(element)
|
26
|
+
this.options = $.extend({}, $.fn.collapse.defaults, options)
|
27
|
+
|
28
|
+
if (this.options["parent"]) {
|
29
|
+
this.$parent = $(this.options["parent"])
|
30
|
+
}
|
31
|
+
|
32
|
+
this.options.toggle && this.toggle()
|
33
|
+
}
|
34
|
+
|
35
|
+
Collapse.prototype = {
|
36
|
+
|
37
|
+
constructor: Collapse
|
38
|
+
|
39
|
+
, dimension: function () {
|
40
|
+
var hasWidth = this.$element.hasClass('width')
|
41
|
+
return hasWidth ? 'width' : 'height'
|
42
|
+
}
|
43
|
+
|
44
|
+
, show: function () {
|
45
|
+
var dimension = this.dimension()
|
46
|
+
, scroll = $.camelCase(['scroll', dimension].join('-'))
|
47
|
+
, actives = this.$parent && this.$parent.find('.in')
|
48
|
+
, hasData
|
49
|
+
|
50
|
+
if (actives && actives.length) {
|
51
|
+
hasData = actives.data('collapse')
|
52
|
+
actives.collapse('hide')
|
53
|
+
hasData || actives.data('collapse', null)
|
54
|
+
}
|
55
|
+
|
56
|
+
this.$element[dimension](0)
|
57
|
+
this.transition('addClass', 'show', 'shown')
|
58
|
+
this.$element[dimension](this.$element[0][scroll])
|
59
|
+
|
60
|
+
}
|
61
|
+
|
62
|
+
, hide: function () {
|
63
|
+
var dimension = this.dimension()
|
64
|
+
this.reset(this.$element[dimension]())
|
65
|
+
this.transition('removeClass', 'hide', 'hidden')
|
66
|
+
this.$element[dimension](0)
|
67
|
+
}
|
68
|
+
|
69
|
+
, reset: function ( size ) {
|
70
|
+
var dimension = this.dimension()
|
71
|
+
|
72
|
+
this.$element
|
73
|
+
.removeClass('collapse')
|
74
|
+
[dimension](size || 'auto')
|
75
|
+
[0].offsetWidth
|
76
|
+
|
77
|
+
this.$element.addClass('collapse')
|
78
|
+
}
|
79
|
+
|
80
|
+
, transition: function ( method, startEvent, completeEvent ) {
|
81
|
+
var that = this
|
82
|
+
, complete = function () {
|
83
|
+
if (startEvent == 'show') that.reset()
|
84
|
+
that.$element.trigger(completeEvent)
|
85
|
+
}
|
86
|
+
|
87
|
+
this.$element
|
88
|
+
.trigger(startEvent)
|
89
|
+
[method]('in')
|
90
|
+
|
91
|
+
$.support.transition && this.$element.hasClass('collapse') ?
|
92
|
+
this.$element.one($.support.transition.end, complete) :
|
93
|
+
complete()
|
94
|
+
}
|
95
|
+
|
96
|
+
, toggle: function () {
|
97
|
+
this[this.$element.hasClass('in') ? 'hide' : 'show']()
|
98
|
+
}
|
99
|
+
|
100
|
+
}
|
101
|
+
|
102
|
+
/* COLLAPSIBLE PLUGIN DEFINITION
|
103
|
+
* ============================== */
|
104
|
+
|
105
|
+
$.fn.collapse = function ( option ) {
|
106
|
+
return this.each(function () {
|
107
|
+
var $this = $(this)
|
108
|
+
, data = $this.data('collapse')
|
109
|
+
, options = typeof option == 'object' && option
|
110
|
+
if (!data) $this.data('collapse', (data = new Collapse(this, options)))
|
111
|
+
if (typeof option == 'string') data[option]()
|
112
|
+
})
|
113
|
+
}
|
114
|
+
|
115
|
+
$.fn.collapse.defaults = {
|
116
|
+
toggle: true
|
117
|
+
}
|
118
|
+
|
119
|
+
$.fn.collapse.Constructor = Collapse
|
120
|
+
|
121
|
+
|
122
|
+
/* COLLAPSIBLE DATA-API
|
123
|
+
* ==================== */
|
124
|
+
|
125
|
+
$(function () {
|
126
|
+
$('body').on('click.collapse.data-api', '[data-toggle=collapse]', function ( e ) {
|
127
|
+
var $this = $(this), href
|
128
|
+
, target = $this.attr('data-target')
|
129
|
+
|| e.preventDefault()
|
130
|
+
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
|
131
|
+
, option = $(target).data('collapse') ? 'toggle' : $this.data()
|
132
|
+
$(target).collapse(option)
|
133
|
+
})
|
134
|
+
})
|
135
|
+
|
136
|
+
}( window.jQuery )
|
@@ -0,0 +1,92 @@
|
|
1
|
+
/* ============================================================
|
2
|
+
* bootstrap-dropdown.js v2.0.0
|
3
|
+
* http://twitter.github.com/bootstrap/javascript.html#dropdowns
|
4
|
+
* ============================================================
|
5
|
+
* Copyright 2012 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
|
+
var $el = $(element).on('click.dropdown.data-api', this.toggle)
|
31
|
+
$('html').on('click.dropdown.data-api', function () {
|
32
|
+
$el.parent().removeClass('open')
|
33
|
+
})
|
34
|
+
}
|
35
|
+
|
36
|
+
Dropdown.prototype = {
|
37
|
+
|
38
|
+
constructor: Dropdown
|
39
|
+
|
40
|
+
, toggle: function ( e ) {
|
41
|
+
var $this = $(this)
|
42
|
+
, selector = $this.attr('data-target')
|
43
|
+
, $parent
|
44
|
+
, isActive
|
45
|
+
|
46
|
+
if (!selector) {
|
47
|
+
selector = $this.attr('href')
|
48
|
+
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
49
|
+
}
|
50
|
+
|
51
|
+
$parent = $(selector)
|
52
|
+
$parent.length || ($parent = $this.parent())
|
53
|
+
|
54
|
+
isActive = $parent.hasClass('open')
|
55
|
+
|
56
|
+
clearMenus()
|
57
|
+
!isActive && $parent.toggleClass('open')
|
58
|
+
|
59
|
+
return false
|
60
|
+
}
|
61
|
+
|
62
|
+
}
|
63
|
+
|
64
|
+
function clearMenus() {
|
65
|
+
$(toggle).parent().removeClass('open')
|
66
|
+
}
|
67
|
+
|
68
|
+
|
69
|
+
/* DROPDOWN PLUGIN DEFINITION
|
70
|
+
* ========================== */
|
71
|
+
|
72
|
+
$.fn.dropdown = function ( option ) {
|
73
|
+
return this.each(function () {
|
74
|
+
var $this = $(this)
|
75
|
+
, data = $this.data('dropdown')
|
76
|
+
if (!data) $this.data('dropdown', (data = new Dropdown(this)))
|
77
|
+
if (typeof option == 'string') data[option].call($this)
|
78
|
+
})
|
79
|
+
}
|
80
|
+
|
81
|
+
$.fn.dropdown.Constructor = Dropdown
|
82
|
+
|
83
|
+
|
84
|
+
/* APPLY TO STANDARD DROPDOWN ELEMENTS
|
85
|
+
* =================================== */
|
86
|
+
|
87
|
+
$(function () {
|
88
|
+
$('html').on('click.dropdown.data-api', clearMenus)
|
89
|
+
$('body').on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle)
|
90
|
+
})
|
91
|
+
|
92
|
+
}( window.jQuery )
|