mm_os 1.3.4 → 1.3.5
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.
- package/README.en.md +36 -0
- package/README.md +25 -166
- package/conf.json +3 -0
- package/core/base/index.js +29 -0
- package/core/base/mqtt/index.js +268 -0
- package/core/base/mqtt/lib.js +40 -0
- package/core/base/web/index.js +110 -0
- package/core/com/api/com.json +4 -0
- package/{bin → core}/com/api/config.tpl.json +9 -7
- package/{bin → core}/com/api/drive.js +239 -64
- package/{bin → core}/com/api/index.js +8 -9
- package/{bin → core}/com/api/oauth.js +23 -14
- package/core/com/api/script.js +32 -0
- package/core/com/db/com.json +4 -0
- package/{bin → core}/com/db/drive.js +99 -65
- package/{bin → core}/com/db/index.js +2 -2
- package/core/com/event/com.json +4 -0
- package/{bin → core}/com/event/config.tpl.json +2 -2
- package/core/com/event/drive.js +125 -0
- package/{bin → core}/com/event/index.js +5 -10
- package/core/com/event/script.js +26 -0
- package/core/com/eventer/com.js +450 -0
- package/core/com/eventer/com.json +4 -0
- package/core/com/middleware/com.js +128 -0
- package/core/com/middleware/com.json +4 -0
- package/core/com/middleware/config.tpl.json +8 -0
- package/core/com/middleware/script.js +9 -0
- package/core/com/mqtt/com.json +4 -0
- package/core/com/mqtt/config.tpl.json +12 -0
- package/core/com/mqtt/drive.js +139 -0
- package/core/com/mqtt/index.js +138 -0
- package/core/com/mqtt/script.js +33 -0
- package/core/com/msg/com.js +296 -0
- package/core/com/msg/com.json +4 -0
- package/{bin → core}/com/nav/drive.js +42 -17
- package/{bin → core}/com/nav/index.js +4 -4
- package/core/com/nav/tpl/admin_pc/page_channel.vue +299 -0
- package/core/com/nav/tpl/admin_pc/page_config.vue +279 -0
- package/core/com/nav/tpl/admin_pc/page_config_form.vue +194 -0
- package/core/com/nav/tpl/admin_pc/page_default.vue +287 -0
- package/core/com/nav/tpl/admin_pc/page_form.vue +180 -0
- package/core/com/nav/tpl/admin_pc/page_lang.vue +265 -0
- package/core/com/nav/tpl/admin_pc/page_nav.vue +313 -0
- package/core/com/nav/tpl/admin_pc/page_table.vue +285 -0
- package/core/com/nav/tpl/admin_pc/page_type.vue +313 -0
- package/core/com/nav/tpl/dev_pc/page_channel.vue +253 -0
- package/core/com/nav/tpl/dev_pc/page_config.vue +253 -0
- package/core/com/nav/tpl/dev_pc/page_default.vue +247 -0
- package/core/com/nav/tpl/dev_pc/page_form.vue +162 -0
- package/core/com/nav/tpl/dev_pc/page_nav.vue +253 -0
- package/core/com/nav/tpl/dev_pc/page_table.vue +247 -0
- package/core/com/nav/tpl/dev_pc/page_type.vue +253 -0
- package/{bin/com/nav/tpl/home_phone → core/com/nav/tpl/home_pc}/page_channel.vue +231 -231
- package/{bin/com/nav/tpl/home_phone → core/com/nav/tpl/home_pc}/page_default.vue +231 -231
- package/{bin → core}/com/nav/tpl/home_pc/page_form.vue +9 -9
- package/{bin → core}/com/nav/tpl/home_pc/page_list.vue +231 -231
- package/{bin → core}/com/nav/tpl/home_pc/page_nav.vue +221 -221
- package/{bin/com/nav/tpl/home_phone → core/com/nav/tpl/home_pc}/page_type.vue +231 -231
- package/{bin → core}/com/nav/tpl/home_pc/page_view.vue +8 -8
- package/{bin/com/nav/tpl/home_pc → core/com/nav/tpl/home_phone}/page_channel.vue +231 -231
- package/{bin/com/nav/tpl/home_pc → core/com/nav/tpl/home_phone}/page_default.vue +231 -231
- package/{bin → core}/com/nav/tpl/home_phone/page_form.vue +9 -9
- package/{bin → core}/com/nav/tpl/home_phone/page_list.vue +231 -231
- package/{bin/com/nav/tpl/admin_pc → core/com/nav/tpl/home_phone}/page_nav.vue +236 -220
- package/{bin/com/nav/tpl/home_pc → core/com/nav/tpl/home_phone}/page_type.vue +231 -231
- package/{bin → core}/com/nav/tpl/home_phone/page_view.vue +8 -8
- package/core/com/nav/viewmodel.js +296 -0
- package/{bin → core}/com/param/config.tpl.json +24 -0
- package/{bin → core}/com/param/drive.js +47 -15
- package/core/com/plugin/com.json +4 -0
- package/core/com/plugin/config.tpl.json +20 -0
- package/{bin → core}/com/plugin/drive.js +5 -8
- package/{bin → core}/com/plugin/index.js +11 -56
- package/core/com/socket/README.md +47 -0
- package/core/com/socket/com.json +4 -0
- package/core/com/socket/config.tpl.json +14 -0
- package/{bin → core}/com/socket/drive.js +74 -51
- package/{bin → core}/com/socket/index.js +4 -2
- package/{bin → core}/com/socket/script.js +8 -6
- package/core/com/sql/config.tpl.json +70 -0
- package/{bin → core}/com/sql/drive.js +281 -58
- package/core/com/static/com.json +4 -0
- package/core/com/static/config.tpl.json +20 -0
- package/{bin → core}/com/static/drive.js +6 -4
- package/{bin → core}/com/static/index.js +5 -1
- package/core/com/task/com.json +4 -0
- package/core/com/task/config.tpl.json +24 -0
- package/core/com/task/drive.js +374 -0
- package/{bin → core}/com/task/index.js +14 -20
- package/core/com/task/script.js +37 -0
- package/core/com/timer/com.js +217 -0
- package/core/com/timer/com.json +4 -0
- package/core/com/tpl/com.js +19 -0
- package/core/com/tpl/com.json +4 -0
- package/index.js +161 -740
- package/lib/actions.js +50 -0
- package/lib/app.js +73 -0
- package/lib/base.js +355 -0
- package/lib/com.js +31 -0
- package/lib/game.js +31 -0
- package/lib/ref.js +121 -0
- package/middleware/cors/index.js +57 -0
- package/middleware/cors/middleware.json +7 -0
- package/middleware/mqtt_base/index.js +10 -0
- package/middleware/mqtt_base/middleware.json +8 -0
- package/{waf.js → middleware/waf/index.js} +12 -2
- package/middleware/waf/middleware.json +9 -0
- package/middleware/web_base/index.js +67 -0
- package/middleware/web_base/middleware.json +9 -0
- package/middleware/web_event/index.js +411 -0
- package/middleware/web_event/middleware.json +10 -0
- package/middleware/web_proxy/index.js +24 -0
- package/middleware/web_proxy/middleware.json +9 -0
- package/middleware/web_router/index.js +33 -0
- package/middleware/web_router/middleware.json +10 -0
- package/middleware/web_socket/index.js +21 -0
- package/middleware/web_socket/middleware.json +9 -0
- package/middleware/web_static/index.js +26 -0
- package/middleware/web_static/middleware.json +9 -0
- package/nodemon.json +12 -2
- package/package.json +56 -66
- package/.gitattributes +0 -5
- package/bin/com/README.md +0 -2
- package/bin/com/api/script.js +0 -14
- package/bin/com/cmd/README.md +0 -3
- package/bin/com/cmd/config.tpl.json +0 -41
- package/bin/com/cmd/drive.js +0 -512
- package/bin/com/cmd/index.js +0 -213
- package/bin/com/cmd/old/5w2h.js +0 -54
- package/bin/com/cmd/old/drive.js +0 -423
- package/bin/com/cmd/script.js +0 -11
- package/bin/com/event/drive.js +0 -69
- package/bin/com/event/script.js +0 -12
- package/bin/com/nav/tpl/admin_pc/page_channel.vue +0 -234
- package/bin/com/nav/tpl/admin_pc/page_default.vue +0 -236
- package/bin/com/nav/tpl/admin_pc/page_form.vue +0 -152
- package/bin/com/nav/tpl/admin_pc/page_table.vue +0 -236
- package/bin/com/nav/tpl/admin_pc/page_type.vue +0 -234
- package/bin/com/nav/tpl/home_phone/page_nav.vue +0 -221
- package/bin/com/nav/viewmodel.js +0 -161
- package/bin/com/plugin/config.tpl.json +0 -11
- package/bin/com/socket/config.tpl.json +0 -8
- package/bin/com/sql/config.tpl.json +0 -34
- package/bin/com/static/config.tpl.json +0 -11
- package/bin/com/task/config.tpl.json +0 -13
- package/bin/com/task/drive.js +0 -288
- package/bin/com/task/script.js +0 -38
- package/bin/com.js +0 -74
- package/bin/mm.conf +0 -48
- package/bin/static/404.html +0 -52
- package/bin/static/README.md +0 -1
- package/bin/static/css/font-awesome.min.css +0 -7
- package/bin/static/css/mm_base.css +0 -220
- package/bin/static/css/mm_common.css +0 -518
- package/bin/static/css/mm_component.css +0 -307
- package/bin/static/css/mm_expand.css +0 -634
- package/bin/static/css/mm_theme.css +0 -291
- package/bin/static/css/new_file.css +0 -79
- package/bin/static/css/swiper.min.css +0 -12
- package/bin/static/favicon.ico +0 -0
- package/bin/static/font/FontAwesome.otf +0 -0
- package/bin/static/font/HelveticaNeue.eot +0 -0
- package/bin/static/font/HelveticaNeue.otf +0 -0
- package/bin/static/font/HelveticaNeue.svg +0 -1273
- package/bin/static/font/HelveticaNeue.woff +0 -0
- package/bin/static/font/HelveticaNeue.woff2 +0 -0
- package/bin/static/font/fontawesome-webfont.eot +0 -0
- package/bin/static/font/fontawesome-webfont.svg +0 -2671
- package/bin/static/font/fontawesome-webfont.ttf +0 -0
- package/bin/static/font/fontawesome-webfont.woff +0 -0
- package/bin/static/font/fontawesome-webfont.woff2 +0 -0
- package/bin/static/h5.html +0 -325
- package/bin/static/highlight/highlight.pack.js +0 -2
- package/bin/static/highlight/styles/a11y-dark.css +0 -99
- package/bin/static/highlight/styles/a11y-light.css +0 -99
- package/bin/static/highlight/styles/agate.css +0 -108
- package/bin/static/highlight/styles/an-old-hope.css +0 -89
- package/bin/static/highlight/styles/androidstudio.css +0 -66
- package/bin/static/highlight/styles/arduino-light.css +0 -88
- package/bin/static/highlight/styles/arta.css +0 -73
- package/bin/static/highlight/styles/ascetic.css +0 -45
- package/bin/static/highlight/styles/atelier-cave-dark.css +0 -83
- package/bin/static/highlight/styles/atelier-cave-light.css +0 -85
- package/bin/static/highlight/styles/atelier-dune-dark.css +0 -69
- package/bin/static/highlight/styles/atelier-dune-light.css +0 -69
- package/bin/static/highlight/styles/atelier-estuary-dark.css +0 -84
- package/bin/static/highlight/styles/atelier-estuary-light.css +0 -84
- package/bin/static/highlight/styles/atelier-forest-dark.css +0 -69
- package/bin/static/highlight/styles/atelier-forest-light.css +0 -69
- package/bin/static/highlight/styles/atelier-heath-dark.css +0 -69
- package/bin/static/highlight/styles/atelier-heath-light.css +0 -69
- package/bin/static/highlight/styles/atelier-lakeside-dark.css +0 -69
- package/bin/static/highlight/styles/atelier-lakeside-light.css +0 -69
- package/bin/static/highlight/styles/atelier-plateau-dark.css +0 -84
- package/bin/static/highlight/styles/atelier-plateau-light.css +0 -84
- package/bin/static/highlight/styles/atelier-savanna-dark.css +0 -84
- package/bin/static/highlight/styles/atelier-savanna-light.css +0 -84
- package/bin/static/highlight/styles/atelier-seaside-dark.css +0 -69
- package/bin/static/highlight/styles/atelier-seaside-light.css +0 -69
- package/bin/static/highlight/styles/atelier-sulphurpool-dark.css +0 -69
- package/bin/static/highlight/styles/atelier-sulphurpool-light.css +0 -69
- package/bin/static/highlight/styles/atom-one-dark-reasonable.css +0 -77
- package/bin/static/highlight/styles/atom-one-dark.css +0 -96
- package/bin/static/highlight/styles/atom-one-light.css +0 -96
- package/bin/static/highlight/styles/brown-paper.css +0 -64
- package/bin/static/highlight/styles/brown-papersq.png +0 -0
- package/bin/static/highlight/styles/codepen-embed.css +0 -60
- package/bin/static/highlight/styles/color-brewer.css +0 -71
- package/bin/static/highlight/styles/darcula.css +0 -77
- package/bin/static/highlight/styles/dark.css +0 -63
- package/bin/static/highlight/styles/darkula.css +0 -6
- package/bin/static/highlight/styles/default.css +0 -99
- package/bin/static/highlight/styles/docco.css +0 -97
- package/bin/static/highlight/styles/dracula.css +0 -76
- package/bin/static/highlight/styles/far.css +0 -71
- package/bin/static/highlight/styles/foundation.css +0 -88
- package/bin/static/highlight/styles/github-gist.css +0 -79
- package/bin/static/highlight/styles/github.css +0 -99
- package/bin/static/highlight/styles/gml.css +0 -78
- package/bin/static/highlight/styles/googlecode.css +0 -89
- package/bin/static/highlight/styles/grayscale.css +0 -101
- package/bin/static/highlight/styles/gruvbox-dark.css +0 -108
- package/bin/static/highlight/styles/gruvbox-light.css +0 -108
- package/bin/static/highlight/styles/hopscotch.css +0 -83
- package/bin/static/highlight/styles/hybrid.css +0 -102
- package/bin/static/highlight/styles/idea.css +0 -97
- package/bin/static/highlight/styles/ir-black.css +0 -73
- package/bin/static/highlight/styles/isbl-editor-dark.css +0 -112
- package/bin/static/highlight/styles/isbl-editor-light.css +0 -112
- package/bin/static/highlight/styles/kimbie.dark.css +0 -74
- package/bin/static/highlight/styles/kimbie.light.css +0 -74
- package/bin/static/highlight/styles/lightfair.css +0 -87
- package/bin/static/highlight/styles/magula.css +0 -70
- package/bin/static/highlight/styles/mono-blue.css +0 -59
- package/bin/static/highlight/styles/monokai-sublime.css +0 -83
- package/bin/static/highlight/styles/monokai.css +0 -70
- package/bin/static/highlight/styles/nord.css +0 -309
- package/bin/static/highlight/styles/obsidian.css +0 -88
- package/bin/static/highlight/styles/ocean.css +0 -74
- package/bin/static/highlight/styles/paraiso-dark.css +0 -72
- package/bin/static/highlight/styles/paraiso-light.css +0 -72
- package/bin/static/highlight/styles/pojoaque.css +0 -83
- package/bin/static/highlight/styles/pojoaque.jpg +0 -0
- package/bin/static/highlight/styles/purebasic.css +0 -96
- package/bin/static/highlight/styles/qtcreator_dark.css +0 -83
- package/bin/static/highlight/styles/qtcreator_light.css +0 -83
- package/bin/static/highlight/styles/railscasts.css +0 -106
- package/bin/static/highlight/styles/rainbow.css +0 -85
- package/bin/static/highlight/styles/routeros.css +0 -108
- package/bin/static/highlight/styles/school-book.css +0 -69
- package/bin/static/highlight/styles/school-book.png +0 -0
- package/bin/static/highlight/styles/shades-of-purple.css +0 -97
- package/bin/static/highlight/styles/solarized-dark.css +0 -84
- package/bin/static/highlight/styles/solarized-light.css +0 -84
- package/bin/static/highlight/styles/sunburst.css +0 -102
- package/bin/static/highlight/styles/tomorrow-night-blue.css +0 -75
- package/bin/static/highlight/styles/tomorrow-night-bright.css +0 -74
- package/bin/static/highlight/styles/tomorrow-night-eighties.css +0 -74
- package/bin/static/highlight/styles/tomorrow-night.css +0 -75
- package/bin/static/highlight/styles/tomorrow.css +0 -72
- package/bin/static/highlight/styles/vs.css +0 -68
- package/bin/static/highlight/styles/vs2015.css +0 -115
- package/bin/static/highlight/styles/xcode.css +0 -104
- package/bin/static/highlight/styles/xt256.css +0 -92
- package/bin/static/highlight/styles/zenburn.css +0 -80
- package/bin/static/highlight/vue-highlight.js +0 -29
- package/bin/static/ifame.html +0 -24
- package/bin/static/img/add.png +0 -0
- package/bin/static/img/avatar.png +0 -0
- package/bin/static/img/banner_2.png +0 -0
- package/bin/static/img/default.png +0 -0
- package/bin/static/img/loading.svg +0 -1
- package/bin/static/img/logo.png +0 -0
- package/bin/static/img/logo1.png +0 -0
- package/bin/static/img/logo_gray.png +0 -0
- package/bin/static/img/logo_round.png +0 -0
- package/bin/static/img/mm.ico +0 -0
- package/bin/static/img/mm.jpg +0 -0
- package/bin/static/img/select.png +0 -0
- package/bin/static/img/web.png +0 -0
- package/bin/static/index.html +0 -12
- package/bin/static/js/clipboard.min.js +0 -257
- package/bin/static/js/css.min.js +0 -1
- package/bin/static/js/echarts.js +0 -22
- package/bin/static/js/html5.min.js +0 -1
- package/bin/static/js/jquery.lazyload.min.js +0 -2
- package/bin/static/js/jquery.min.js +0 -4189
- package/bin/static/js/jquery.scrollstop.min.js +0 -2
- package/bin/static/js/mm-requirejs-vue.js +0 -283
- package/bin/static/js/mm_check.js +0 -490
- package/bin/static/js/mm_flexble.js +0 -112
- package/bin/static/js/mm_picker.js +0 -1417
- package/bin/static/js/mm_pinyinlite.js +0 -873
- package/bin/static/js/mm_sdk.js +0 -2841
- package/bin/static/js/mm_ui_expand.js +0 -468
- package/bin/static/js/mm_vue.js +0 -376
- package/bin/static/js/mm_vue_ui.js +0 -2375
- package/bin/static/js/mm_websocket.js +0 -145
- package/bin/static/js/require.js +0 -5
- package/bin/static/js/sortable.min.js +0 -3
- package/bin/static/js/swiper.min.js +0 -13
- package/bin/static/js/text.min.js +0 -1
- package/bin/static/js/vue-router.min.js +0 -6
- package/bin/static/js/vue.js +0 -12338
- package/bin/static/js/vuedraggable.min.js +0 -2
- package/bin/static/js/vuex.min.js +0 -6
- package/bin/static/src/components/bar/mm_action.vue +0 -19
- package/bin/static/src/components/bar/mm_buy.vue +0 -19
- package/bin/static/src/components/bar/mm_chat.vue +0 -18
- package/bin/static/src/components/bar/mm_count.vue +0 -18
- package/bin/static/src/components/bar/mm_filter.vue +0 -18
- package/bin/static/src/components/bar/mm_search.vue +0 -18
- package/bin/static/src/components/bar/mm_sort.vue +0 -18
- package/bin/static/src/components/bar/mm_tag.vue +0 -18
- package/bin/static/src/components/bar/mm_title.vue +0 -19
- package/bin/static/src/components/content/mm_pre.vue +0 -70
- package/bin/static/src/components/expand/mm_drag.vue +0 -39
- package/bin/static/src/components/item/mm_article.vue +0 -115
- package/bin/static/src/components/item/mm_base.vue +0 -26
- package/bin/static/src/components/item/mm_contact.vue +0 -25
- package/bin/static/src/components/item/mm_goods.vue +0 -23
- package/bin/static/src/components/item/mm_img.vue +0 -21
- package/bin/static/src/components/item/mm_media.vue +0 -18
- package/bin/static/src/components/item/mm_message.vue +0 -18
- package/bin/static/src/components/item/mm_music.vue +0 -95
- package/bin/static/src/components/item/mm_news.vue +0 -22
- package/bin/static/src/components/item/mm_number.vue +0 -26
- package/bin/static/src/components/item/mm_question.vue +0 -35
- package/bin/static/src/components/item/mm_user.vue +0 -22
- package/bin/static/src/components/item/mm_video.vue +0 -95
- package/bin/static/src/components/slide/mm_slide_card.vue +0 -64
- package/bin/static/src/components/slide/mm_slide_img.vue +0 -47
- package/bin/static/src/components/slide/mm_slide_page.vue +0 -8
- package/bin/static/src/components/slide/mm_slide_text.vue +0 -54
- package/bin/static/src/main.js +0 -84
- package/bin/static/src/mixins/form.js +0 -223
- package/bin/static/src/mixins/item.js +0 -242
- package/bin/static/src/mixins/list.js +0 -244
- package/bin/static/src/mixins/page.js +0 -1011
- package/bin/static/src/mm_component.js +0 -74
- package/bin/static/src/router.js +0 -72
- package/bin/static/src/store/user.js +0 -75
- package/bin/static/src/store/web.js +0 -50
- package/bin/static/user/1/number_info.xlsx +0 -0
- package/bin/static/w3c.html +0 -94
- package/init.js +0 -55
- package/update.md +0 -1
- /package/{bin → core}/com/api/README.md +0 -0
- /package/{bin → core}/com/api/rpc.js +0 -0
- /package/{bin → core}/com/db/README.md +0 -0
- /package/{bin → core}/com/event/README.md +0 -0
- /package/{bin/com/socket → core/com/mqtt}/README.md +0 -0
- /package/{bin → core}/com/nav/README.md +0 -0
- /package/{bin → core}/com/nav/config.tpl.json +0 -0
- /package/{bin → core}/com/param/README.md +0 -0
- /package/{bin → core}/com/param/index.js +0 -0
- /package/{bin → core}/com/param/script.js +0 -0
- /package/{bin → core}/com/param/test.js +0 -0
- /package/{bin → core}/com/plugin/README.md +0 -0
- /package/{bin → core}/com/plugin/script.js +0 -0
- /package/{bin → core}/com/sql/README.md +0 -0
- /package/{bin → core}/com/sql/index.js +0 -0
- /package/{bin → core}/com/sql/script.js +0 -0
- /package/{bin → core}/com/static/README.md +0 -0
- /package/{bin → core}/com/static/script.js +0 -0
- /package/{bin → core}/com/task/README.md +0 -0
- /package/{bin/rps.bat → rps.bat} +0 -0
- /package/{bin/tps.bat → tps.bat} +0 -0
|
@@ -1,468 +0,0 @@
|
|
|
1
|
-
/* 动效API */
|
|
2
|
-
function __dealCssEvent(eventNameArr, callback) {
|
|
3
|
-
var events = eventNameArr,
|
|
4
|
-
i,
|
|
5
|
-
dom = this;
|
|
6
|
-
|
|
7
|
-
function fireCallBack(e) {
|
|
8
|
-
if (e.target !== this) return;
|
|
9
|
-
callback.call(this, e);
|
|
10
|
-
for (i = 0; i < events.length; i++) {
|
|
11
|
-
dom.off(events[i], fireCallBack);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
if (callback) {
|
|
15
|
-
for (i = 0; i < events.length; i++) {
|
|
16
|
-
dom.on(events[i], fireCallBack);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
(function(jquery) {
|
|
22
|
-
jquery.fn.dataset = function() {
|
|
23
|
-
var dataset = {},
|
|
24
|
-
ds = this[0].dataset;
|
|
25
|
-
for (var key in ds) {
|
|
26
|
-
var item = dataset[key] = ds[key];
|
|
27
|
-
if (item === "false") dataset[key] = false;
|
|
28
|
-
else if (item === "true") dataset[key] = true;
|
|
29
|
-
else if (parseFloat(item) === item * 1) dataset[key] = item * 1;
|
|
30
|
-
}
|
|
31
|
-
return jquery.extend({}, dataset, this[0].__eleData);
|
|
32
|
-
};
|
|
33
|
-
jquery.fn.animationEnd = function(callback) {
|
|
34
|
-
__dealCssEvent.call(this, ["webkitAnimationEnd", "animationend"], callback);
|
|
35
|
-
return this;
|
|
36
|
-
};
|
|
37
|
-
jquery.fn.transitionEnd = function(callback) {
|
|
38
|
-
__dealCssEvent.call(this, ["webkitTransitionEnd", "transitionend"], callback);
|
|
39
|
-
return this;
|
|
40
|
-
};
|
|
41
|
-
jquery.fn.transition = function(duration) {
|
|
42
|
-
if (typeof duration !== "string") {
|
|
43
|
-
duration = duration + "ms";
|
|
44
|
-
}
|
|
45
|
-
for (var i = 0; i < this.length; i++) {
|
|
46
|
-
var elStyle = this[i].style;
|
|
47
|
-
elStyle.webkitTransitionDuration = elStyle.MozTransitionDuration = elStyle.transitionDuration = duration;
|
|
48
|
-
}
|
|
49
|
-
return this;
|
|
50
|
-
};
|
|
51
|
-
jquery.fn.transform = function(transform) {
|
|
52
|
-
for (var i = 0; i < this.length; i++) {
|
|
53
|
-
var elStyle = this[i].style;
|
|
54
|
-
elStyle.webkitTransform = elStyle.MozTransform = elStyle.transform = transform;
|
|
55
|
-
}
|
|
56
|
-
return this;
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
var _modalTemplateTempDiv = document.createElement("div");
|
|
60
|
-
$.modalStack = [];
|
|
61
|
-
$.modalStackClearQueue = function() {
|
|
62
|
-
if ($.modalStack.length) {
|
|
63
|
-
$.modalStack.shift()();
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
$.modal = function(params) {
|
|
67
|
-
params = params || {};
|
|
68
|
-
var modalHTML = "";
|
|
69
|
-
var buttonsHTML = "";
|
|
70
|
-
if (params.buttons && params.buttons.length > 0) {
|
|
71
|
-
for (var i = 0; i < params.buttons.length; i++) {
|
|
72
|
-
buttonsHTML += "<span class=\"modal-button" + (params.buttons[i].bold ? " modal-button-bold" : "") + "\">" +
|
|
73
|
-
params.buttons[i].text + "</span>";
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
var extraClass = params.extraClass || "";
|
|
77
|
-
var titleHTML = params.title ? "<div class=\"modal-title\">" + params.title + "</div>" : "";
|
|
78
|
-
var textHTML = params.text ? "<div class=\"modal-text\">" + params.text + "</div>" : "";
|
|
79
|
-
var afterTextHTML = params.afterText ? params.afterText : "";
|
|
80
|
-
var noButtons = !params.buttons || params.buttons.length === 0 ? "modal-no-buttons" : "";
|
|
81
|
-
var verticalButtons = params.verticalButtons ? "modal-buttons-vertical" : "";
|
|
82
|
-
modalHTML = "<div class=\"modal " + extraClass + " " + noButtons + "\"><div class=\"modal-inner\">" + (titleHTML +
|
|
83
|
-
textHTML + afterTextHTML) + "</div><div class=\"modal-buttons " + verticalButtons + "\">" + buttonsHTML +
|
|
84
|
-
"</div></div>";
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
_modalTemplateTempDiv.innerHTML = modalHTML;
|
|
88
|
-
var modal = $(_modalTemplateTempDiv).children();
|
|
89
|
-
$(defaults.modalContainer).append(modal[0]);
|
|
90
|
-
modal.find(".modal-button").each(function(index, el) {
|
|
91
|
-
$(el).on("click", function(e) {
|
|
92
|
-
if (params.buttons[index].close !== false) $.closeModal(modal);
|
|
93
|
-
if (params.buttons[index].onClick) params.buttons[index].onClick(modal, e);
|
|
94
|
-
if (params.onClick) params.onClick(modal, index);
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
$.openModal(modal);
|
|
98
|
-
return modal[0];
|
|
99
|
-
};
|
|
100
|
-
$.alert = function(text, title, callbackOk) {
|
|
101
|
-
if (typeof title === "function") {
|
|
102
|
-
callbackOk = arguments[1];
|
|
103
|
-
title = undefined;
|
|
104
|
-
}
|
|
105
|
-
return $.modal({
|
|
106
|
-
text: text || "",
|
|
107
|
-
title: typeof title === "undefined" ? defaults.modalTitle : title,
|
|
108
|
-
extraClass: "modal-alert",
|
|
109
|
-
buttons: [{
|
|
110
|
-
text: defaults.modalButtonOk,
|
|
111
|
-
bold: true,
|
|
112
|
-
onClick: callbackOk
|
|
113
|
-
}]
|
|
114
|
-
});
|
|
115
|
-
};
|
|
116
|
-
$.confirm = function(text, title, callbackOk, callbackCancel) {
|
|
117
|
-
if (typeof title === "function") {
|
|
118
|
-
callbackCancel = arguments[2];
|
|
119
|
-
callbackOk = arguments[1];
|
|
120
|
-
title = undefined;
|
|
121
|
-
}
|
|
122
|
-
return $.modal({
|
|
123
|
-
text: text || "",
|
|
124
|
-
title: typeof title === "undefined" ? defaults.modalTitle : title,
|
|
125
|
-
extraClass: "modal-confirm",
|
|
126
|
-
buttons: [{
|
|
127
|
-
text: defaults.modalButtonCancel,
|
|
128
|
-
onClick: callbackCancel
|
|
129
|
-
}, {
|
|
130
|
-
text: defaults.modalButtonOk,
|
|
131
|
-
bold: true,
|
|
132
|
-
onClick: callbackOk
|
|
133
|
-
}]
|
|
134
|
-
});
|
|
135
|
-
};
|
|
136
|
-
$.prompt = function(text, title, callbackOk, callbackCancel) {
|
|
137
|
-
if (typeof title === "function") {
|
|
138
|
-
callbackCancel = arguments[2];
|
|
139
|
-
callbackOk = arguments[1];
|
|
140
|
-
title = undefined;
|
|
141
|
-
}
|
|
142
|
-
return $.modal({
|
|
143
|
-
text: text || "",
|
|
144
|
-
title: typeof title === "undefined" ? defaults.modalTitle : title,
|
|
145
|
-
extraClass: "modal-prompt",
|
|
146
|
-
afterText: "<input type=\"text\" class=\"modal-text-input\">",
|
|
147
|
-
buttons: [{
|
|
148
|
-
text: defaults.modalButtonCancel
|
|
149
|
-
}, {
|
|
150
|
-
text: defaults.modalButtonOk,
|
|
151
|
-
bold: true
|
|
152
|
-
}],
|
|
153
|
-
onClick: function onClick(modal, index) {
|
|
154
|
-
if (index === 0 && callbackCancel) callbackCancel($(modal).find(".modal-text-input").val());
|
|
155
|
-
if (index === 1 && callbackOk) callbackOk($(modal).find(".modal-text-input").val());
|
|
156
|
-
}
|
|
157
|
-
});
|
|
158
|
-
};
|
|
159
|
-
$.modalLogin = function(text, title, callbackOk, callbackCancel) {
|
|
160
|
-
if (typeof title === "function") {
|
|
161
|
-
callbackCancel = arguments[2];
|
|
162
|
-
callbackOk = arguments[1];
|
|
163
|
-
title = undefined;
|
|
164
|
-
}
|
|
165
|
-
return $.modal({
|
|
166
|
-
text: text || "",
|
|
167
|
-
title: typeof title === "undefined" ? defaults.modalTitle : title,
|
|
168
|
-
extraClass: "modal-login",
|
|
169
|
-
afterText: "<input type=\"text\" name=\"modal-username\" placeholder=\"" + defaults.modalUsernamePlaceholder +
|
|
170
|
-
"\" class=\"modal-text-input modal-text-input-double\"><input type=\"password\" name=\"modal-password\" placeholder=\"" +
|
|
171
|
-
defaults.modalPasswordPlaceholder + "\" class=\"modal-text-input modal-text-input-double\">",
|
|
172
|
-
buttons: [{
|
|
173
|
-
text: defaults.modalButtonCancel
|
|
174
|
-
}, {
|
|
175
|
-
text: defaults.modalButtonOk,
|
|
176
|
-
bold: true
|
|
177
|
-
}],
|
|
178
|
-
onClick: function onClick(modal, index) {
|
|
179
|
-
var username = $(modal).find(".modal-text-input[name=\"modal-username\"]").val();
|
|
180
|
-
var password = $(modal).find(".modal-text-input[name=\"modal-password\"]").val();
|
|
181
|
-
if (index === 0 && callbackCancel) callbackCancel(username, password);
|
|
182
|
-
if (index === 1 && callbackOk) callbackOk(username, password);
|
|
183
|
-
}
|
|
184
|
-
});
|
|
185
|
-
};
|
|
186
|
-
$.modalPassword = function(text, title, callbackOk, callbackCancel) {
|
|
187
|
-
if (typeof title === "function") {
|
|
188
|
-
callbackCancel = arguments[2];
|
|
189
|
-
callbackOk = arguments[1];
|
|
190
|
-
title = undefined;
|
|
191
|
-
}
|
|
192
|
-
return $.modal({
|
|
193
|
-
text: text || "",
|
|
194
|
-
title: typeof title === "undefined" ? defaults.modalTitle : title,
|
|
195
|
-
extraClass: "modal-password",
|
|
196
|
-
afterText: "<input type=\"password\" name=\"modal-password\" placeholder=\"" + defaults.modalPasswordPlaceholder +
|
|
197
|
-
"\" class=\"modal-text-input\">",
|
|
198
|
-
buttons: [{
|
|
199
|
-
text: defaults.modalButtonCancel
|
|
200
|
-
}, {
|
|
201
|
-
text: defaults.modalButtonOk,
|
|
202
|
-
bold: true
|
|
203
|
-
}],
|
|
204
|
-
onClick: function onClick(modal, index) {
|
|
205
|
-
var password = $(modal).find(".modal-text-input[name=\"modal-password\"]").val();
|
|
206
|
-
if (index === 0 && callbackCancel) callbackCancel(password);
|
|
207
|
-
if (index === 1 && callbackOk) callbackOk(password);
|
|
208
|
-
}
|
|
209
|
-
});
|
|
210
|
-
};
|
|
211
|
-
$.showPreloader = function(title) {
|
|
212
|
-
$.hidePreloader();
|
|
213
|
-
$.showPreloader.preloaderModal = $.modal({
|
|
214
|
-
title: title || defaults.modalPreloaderTitle,
|
|
215
|
-
text: "<div class=\"preloader\"></div>"
|
|
216
|
-
});
|
|
217
|
-
return $.showPreloader.preloaderModal;
|
|
218
|
-
};
|
|
219
|
-
$.hidePreloader = function() {
|
|
220
|
-
$.showPreloader.preloaderModal && $.closeModal($.showPreloader.preloaderModal);
|
|
221
|
-
};
|
|
222
|
-
$.showIndicator = function() {
|
|
223
|
-
if ($(".preloader-indicator-modal")[0]) return;
|
|
224
|
-
$(defaults.modalContainer).append(
|
|
225
|
-
"<div class=\"preloader-indicator-overlay\"></div><div class=\"preloader-indicator-modal\"><span class=\"preloader preloader-white\"></span></div>"
|
|
226
|
-
);
|
|
227
|
-
};
|
|
228
|
-
$.hideIndicator = function() {
|
|
229
|
-
$(".preloader-indicator-overlay, .preloader-indicator-modal").remove();
|
|
230
|
-
};
|
|
231
|
-
$.showIndicatorDiy = function(htmlcontent) {
|
|
232
|
-
if ($(".preloader-indicator-modal")[0]) return;
|
|
233
|
-
$(defaults.modalContainer).append(
|
|
234
|
-
"<div class=\"preloader-indicator-overlay\"></div><div class=\"preloader-indicator-modal\">" + htmlcontent +
|
|
235
|
-
"</div>");
|
|
236
|
-
};
|
|
237
|
-
$.hideIndicatorDiy = function() {
|
|
238
|
-
$(".preloader-indicator-overlay, .preloader-indicator-modal").remove();
|
|
239
|
-
};
|
|
240
|
-
$.actions = function(params) {
|
|
241
|
-
var modal, groupSelector, buttonSelector;
|
|
242
|
-
params = params || [];
|
|
243
|
-
if (params.length > 0 && !$.isArray(params[0])) {
|
|
244
|
-
params = [params];
|
|
245
|
-
}
|
|
246
|
-
var modalHTML;
|
|
247
|
-
var buttonsHTML = "";
|
|
248
|
-
for (var i = 0; i < params.length; i++) {
|
|
249
|
-
for (var j = 0; j < params[i].length; j++) {
|
|
250
|
-
if (j === 0) buttonsHTML += "<div class=\"actions-modal-group\">";
|
|
251
|
-
var button = params[i][j];
|
|
252
|
-
var buttonClass = button.label ? "actions-modal-label" : "actions-modal-button";
|
|
253
|
-
if (button.bold) buttonClass += " actions-modal-button-bold";
|
|
254
|
-
if (button.color) buttonClass += " font-" + button.color;
|
|
255
|
-
if (button.bg) buttonClass += " bg_" + button.bg;
|
|
256
|
-
if (button.disabled) buttonClass += " disabled";
|
|
257
|
-
buttonsHTML += "<span class=\"" + buttonClass + "\">" + button.text + "</span>";
|
|
258
|
-
if (j === params[i].length - 1) buttonsHTML += "</div>";
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
modalHTML = "<div class=\"actions-modal\">" + buttonsHTML + "</div>";
|
|
262
|
-
_modalTemplateTempDiv.innerHTML = modalHTML;
|
|
263
|
-
modal = $(_modalTemplateTempDiv).children();
|
|
264
|
-
$(defaults.modalContainer).append(modal[0]);
|
|
265
|
-
groupSelector = ".actions-modal-group";
|
|
266
|
-
buttonSelector = ".actions-modal-button";
|
|
267
|
-
var groups = modal.find(groupSelector);
|
|
268
|
-
groups.each(function(index, el) {
|
|
269
|
-
var groupIndex = index;
|
|
270
|
-
$(el).children().each(function(index, el) {
|
|
271
|
-
var buttonIndex = index;
|
|
272
|
-
var buttonParams = params[groupIndex][buttonIndex];
|
|
273
|
-
var clickTarget;
|
|
274
|
-
if ($(el).is(buttonSelector)) clickTarget = $(el);
|
|
275
|
-
if (clickTarget) {
|
|
276
|
-
clickTarget.on("click", function(e) {
|
|
277
|
-
if (buttonParams.close !== false) $.closeModal(modal);
|
|
278
|
-
if (buttonParams.onClick) buttonParams.onClick(modal, e);
|
|
279
|
-
});
|
|
280
|
-
}
|
|
281
|
-
});
|
|
282
|
-
});
|
|
283
|
-
$.openModal(modal);
|
|
284
|
-
return modal[0];
|
|
285
|
-
};
|
|
286
|
-
$.popup = function(modal, removeOnClose) {
|
|
287
|
-
if (typeof removeOnClose === "undefined") removeOnClose = true;
|
|
288
|
-
if (typeof modal === "string" && modal.indexOf("<") >= 0) {
|
|
289
|
-
var _modal = document.createElement("div");
|
|
290
|
-
_modal.innerHTML = modal.trim();
|
|
291
|
-
if (_modal.childNodes.length > 0) {
|
|
292
|
-
modal = _modal.childNodes[0];
|
|
293
|
-
if (removeOnClose) modal.classList.add("remove-on-close");
|
|
294
|
-
$(defaults.modalContainer).append(modal);
|
|
295
|
-
} else return false;
|
|
296
|
-
}
|
|
297
|
-
modal = $(modal);
|
|
298
|
-
if (modal.length === 0) return false;
|
|
299
|
-
modal.show();
|
|
300
|
-
modal.find(".content").scroller("refresh");
|
|
301
|
-
if (modal.find("." + defaults.viewClass).length > 0) {
|
|
302
|
-
$.sizeNavbars(modal.find("." + defaults.viewClass)[0]);
|
|
303
|
-
}
|
|
304
|
-
$.openModal(modal);
|
|
305
|
-
return modal[0];
|
|
306
|
-
};
|
|
307
|
-
$.pickerModal = function(pickerModal, removeOnClose) {
|
|
308
|
-
if (typeof removeOnClose === "undefined") removeOnClose = true;
|
|
309
|
-
if (typeof pickerModal === "string" && pickerModal.indexOf("<") >= 0) {
|
|
310
|
-
pickerModal = $(pickerModal);
|
|
311
|
-
if (pickerModal.length > 0) {
|
|
312
|
-
if (removeOnClose) pickerModal.addClass("remove-on-close");
|
|
313
|
-
$(defaults.modalContainer).append(pickerModal[0]);
|
|
314
|
-
} else return false;
|
|
315
|
-
}
|
|
316
|
-
pickerModal = $(pickerModal);
|
|
317
|
-
if (pickerModal.length === 0) return false;
|
|
318
|
-
pickerModal.show();
|
|
319
|
-
$.openModal(pickerModal);
|
|
320
|
-
return pickerModal[0];
|
|
321
|
-
};
|
|
322
|
-
$.loginScreen = function(modal) {
|
|
323
|
-
if (!modal) modal = ".login-screen";
|
|
324
|
-
modal = $(modal);
|
|
325
|
-
if (modal.length === 0) return false;
|
|
326
|
-
modal.show();
|
|
327
|
-
if (modal.find("." + defaults.viewClass).length > 0) {
|
|
328
|
-
$.sizeNavbars(modal.find("." + defaults.viewClass)[0]);
|
|
329
|
-
}
|
|
330
|
-
$.openModal(modal);
|
|
331
|
-
return modal[0];
|
|
332
|
-
};
|
|
333
|
-
$.toast = function(msg, duration, extraclass) {
|
|
334
|
-
var $toast = $("<div class=\"modal toast " + (extraclass || "") + "\">" + msg + "</div>").appendTo(document.body);
|
|
335
|
-
$.openModal($toast, function() {
|
|
336
|
-
setTimeout(function() {
|
|
337
|
-
$.closeModal($toast);
|
|
338
|
-
}, duration || 2000);
|
|
339
|
-
});
|
|
340
|
-
};
|
|
341
|
-
$.openModal = function(modal, cb) {
|
|
342
|
-
modal = $(modal);
|
|
343
|
-
var isModal = modal.hasClass("modal"),
|
|
344
|
-
isNotToast = !modal.hasClass("toast");
|
|
345
|
-
if ($(".modal.modal-in:not(.modal-out)").length && defaults.modalStack && isModal && isNotToast) {
|
|
346
|
-
$.modalStack.push(function() {
|
|
347
|
-
$.openModal(modal, cb);
|
|
348
|
-
});
|
|
349
|
-
return;
|
|
350
|
-
}
|
|
351
|
-
var isPopup = modal.hasClass("popup");
|
|
352
|
-
var isLoginScreen = modal.hasClass("login-screen");
|
|
353
|
-
var isPickerModal = modal.hasClass("picker-modal");
|
|
354
|
-
var isToast = modal.hasClass("toast");
|
|
355
|
-
if (isModal) {
|
|
356
|
-
modal.show();
|
|
357
|
-
}
|
|
358
|
-
var overlay;
|
|
359
|
-
if (!isLoginScreen && !isPickerModal && !isToast) {
|
|
360
|
-
if ($(".modal-overlay").length === 0 && !isPopup) {
|
|
361
|
-
$(defaults.modalContainer).append("<div class=\"modal-overlay\"></div>");
|
|
362
|
-
}
|
|
363
|
-
if ($(".popup-overlay").length === 0 && isPopup) {
|
|
364
|
-
$(defaults.modalContainer).append("<div class=\"popup-overlay\"></div>");
|
|
365
|
-
}
|
|
366
|
-
overlay = isPopup ? $(".popup-overlay") : $(".modal-overlay");
|
|
367
|
-
}
|
|
368
|
-
var clientLeft = modal[0].clientLeft;
|
|
369
|
-
modal.trigger("open");
|
|
370
|
-
if (isPickerModal) {
|
|
371
|
-
$(defaults.modalContainer).addClass("with-picker-modal");
|
|
372
|
-
}
|
|
373
|
-
if (!isLoginScreen && !isPickerModal && !isToast) overlay.addClass("modal-overlay-visible");
|
|
374
|
-
modal.removeClass("modal-out").addClass("modal-in").transitionEnd(function(e) {
|
|
375
|
-
if (modal.hasClass("modal-out")) modal.trigger("closed");
|
|
376
|
-
else modal.trigger("opened");
|
|
377
|
-
});
|
|
378
|
-
if (typeof cb === "function") {
|
|
379
|
-
cb.call(this);
|
|
380
|
-
}
|
|
381
|
-
return true;
|
|
382
|
-
};
|
|
383
|
-
$.closeModal = function(modal) {
|
|
384
|
-
modal = $(modal || ".modal-in");
|
|
385
|
-
if (typeof modal !== "undefined" && modal.length === 0) {
|
|
386
|
-
return;
|
|
387
|
-
}
|
|
388
|
-
var isModal = modal.hasClass("modal"),
|
|
389
|
-
isPopup = modal.hasClass("popup"),
|
|
390
|
-
isToast = modal.hasClass("toast"),
|
|
391
|
-
isLoginScreen = modal.hasClass("login-screen"),
|
|
392
|
-
isPickerModal = modal.hasClass("picker-modal"),
|
|
393
|
-
removeOnClose = modal.hasClass("remove-on-close"),
|
|
394
|
-
overlay = isPopup ? $(".popup-overlay") : $(".modal-overlay");
|
|
395
|
-
if (isPopup) {
|
|
396
|
-
if (modal.length === $(".popup.modal-in").length) {
|
|
397
|
-
overlay.removeClass("modal-overlay-visible");
|
|
398
|
-
}
|
|
399
|
-
} else if (!(isPickerModal || isToast)) {
|
|
400
|
-
overlay.removeClass("modal-overlay-visible");
|
|
401
|
-
}
|
|
402
|
-
modal.trigger("close");
|
|
403
|
-
if (isPickerModal) {
|
|
404
|
-
$(defaults.modalContainer).removeClass("with-picker-modal");
|
|
405
|
-
$(defaults.modalContainer).addClass("picker-modal-closing");
|
|
406
|
-
}
|
|
407
|
-
modal.removeClass("modal-in").addClass("modal-out").transitionEnd(function(e) {
|
|
408
|
-
if (modal.hasClass("modal-out")) modal.trigger("closed");
|
|
409
|
-
else modal.trigger("opened");
|
|
410
|
-
if (isPickerModal) {
|
|
411
|
-
$(defaults.modalContainer).removeClass("picker-modal-closing");
|
|
412
|
-
}
|
|
413
|
-
if (isPopup || isLoginScreen || isPickerModal) {
|
|
414
|
-
modal.removeClass("modal-out").hide();
|
|
415
|
-
if (removeOnClose && modal.length > 0) {
|
|
416
|
-
modal.remove();
|
|
417
|
-
}
|
|
418
|
-
} else {
|
|
419
|
-
modal.remove();
|
|
420
|
-
}
|
|
421
|
-
});
|
|
422
|
-
if (isModal && defaults.modalStack) {
|
|
423
|
-
$.modalStackClearQueue();
|
|
424
|
-
}
|
|
425
|
-
return true;
|
|
426
|
-
};
|
|
427
|
-
|
|
428
|
-
function handleClicks(e) {
|
|
429
|
-
var clicked = $(this);
|
|
430
|
-
var url = clicked.attr("href");
|
|
431
|
-
var clickedData = clicked.dataset();
|
|
432
|
-
var popup;
|
|
433
|
-
if (clicked.hasClass("open-popup")) {
|
|
434
|
-
if (clickedData.popup) {
|
|
435
|
-
popup = clickedData.popup;
|
|
436
|
-
} else popup = ".popup";
|
|
437
|
-
$.popup(popup);
|
|
438
|
-
}
|
|
439
|
-
if (clicked.hasClass("close-popup")) {
|
|
440
|
-
if (clickedData.popup) {
|
|
441
|
-
popup = clickedData.popup;
|
|
442
|
-
} else popup = ".popup.modal-in";
|
|
443
|
-
$.closeModal(popup);
|
|
444
|
-
}
|
|
445
|
-
if (clicked.hasClass("modal-overlay")) {
|
|
446
|
-
if ($(".modal.modal-in").length > 0 && defaults.modalCloseByOutside) $.closeModal(".modal.modal-in");
|
|
447
|
-
if ($(".actions-modal.modal-in").length > 0 && defaults.actionsCloseByOutside) $.closeModal(
|
|
448
|
-
".actions-modal.modal-in");
|
|
449
|
-
}
|
|
450
|
-
if (clicked.hasClass("popup-overlay")) {
|
|
451
|
-
if ($(".popup.modal-in").length > 0 && defaults.popupCloseByOutside) $.closeModal(".popup.modal-in");
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
$(document).on("click", " .modal-overlay, .popup-overlay, .close-popup, .open-popup, .close-picker", handleClicks);
|
|
455
|
-
var defaults = $.modal.prototype.defaults = {
|
|
456
|
-
modalStack: true,
|
|
457
|
-
modalButtonOk: "确定",
|
|
458
|
-
modalButtonCancel: "取消",
|
|
459
|
-
modalPreloaderTitle: "加载中",
|
|
460
|
-
modalContainer: document.body
|
|
461
|
-
};
|
|
462
|
-
|
|
463
|
-
$(document).ready(function() {
|
|
464
|
-
if (!defaults.modalContainer) {
|
|
465
|
-
defaults.modalContainer = document.body;
|
|
466
|
-
}
|
|
467
|
-
});
|
|
468
|
-
})($);
|