carnival 0.0.55 → 0.0.56
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/carnival/admin.js +3 -3
- data/app/assets/javascripts/carnival/data_tables_functions.js +18 -2
- data/app/assets/javascripts/carnival/external/{jquery.noty.js → noty/jquery.noty.js} +45 -117
- data/app/assets/javascripts/carnival/external/{jquery.noty.layout.bottom.js → noty/layouts/bottom.js} +1 -1
- data/app/assets/javascripts/carnival/external/noty/layouts/bottomCenter.js +41 -0
- data/app/assets/javascripts/carnival/external/noty/layouts/bottomLeft.js +43 -0
- data/app/assets/javascripts/carnival/external/noty/layouts/bottomRight.js +43 -0
- data/app/assets/javascripts/carnival/external/noty/layouts/center.js +56 -0
- data/app/assets/javascripts/carnival/external/noty/layouts/centerLeft.js +61 -0
- data/app/assets/javascripts/carnival/external/noty/layouts/centerRight.js +61 -0
- data/app/assets/javascripts/carnival/external/noty/layouts/inline.js +31 -0
- data/app/assets/javascripts/carnival/external/noty/layouts/top.js +34 -0
- data/app/assets/javascripts/carnival/external/noty/layouts/topCenter.js +41 -0
- data/app/assets/javascripts/carnival/external/noty/layouts/topLeft.js +43 -0
- data/app/assets/javascripts/carnival/external/noty/layouts/topRight.js +43 -0
- data/app/assets/javascripts/carnival/external/noty/packaged/jquery.noty.packaged.js +1180 -0
- data/app/assets/javascripts/carnival/external/noty/packaged/jquery.noty.packaged.min.js +1 -0
- data/app/assets/javascripts/carnival/external/noty/promise.js +432 -0
- data/app/assets/javascripts/carnival/external/{jquery.noty.theme.default.js → noty/themes/default.js} +3 -3
- data/app/assets/javascripts/carnival/vizir_admin.js +0 -30
- data/app/assets/stylesheets/carnival/admin.css +0 -1
- data/app/assets/stylesheets/carnival/jquery.noty.css +17 -104
- data/app/assets/stylesheets/carnival/main.css +31 -3
- data/app/controllers/carnival/base_admin_controller.rb +15 -4
- data/app/datatable/carnival/generic_datatable.rb +23 -11
- data/app/helpers/carnival/base_admin_helper.rb +20 -3
- data/app/inputs/admin_enum_input.rb +5 -3
- data/app/inputs/admin_relationship_select_input.rb +17 -5
- data/app/models/carnival/admin_user.rb +2 -1
- data/app/models/carnival/field.rb +37 -1
- data/app/models/carnival/field.rb.orig +157 -0
- data/app/models/carnival/model_helper.rb +19 -3
- data/app/presenters/carnival/base_admin_presenter.rb +38 -6
- data/app/view_objects/carnival/nested_form_options.rb +135 -0
- data/app/views/carnival/base_admin/edit.html.haml +1 -1
- data/app/views/carnival/base_admin/index.html.haml +3 -3
- data/app/views/carnival/base_admin/load_dependent_select_options.html.haml +5 -0
- data/app/views/carnival/base_admin/new.html.haml +1 -1
- data/app/views/carnival/base_admin/show.html.haml +5 -2
- data/app/views/carnival/shared/_item_buttons.html.haml +1 -1
- data/app/views/carnival/shared/form/_field.html.haml +9 -1
- data/app/views/carnival/shared/form/_field.html.haml.orig +29 -0
- data/app/views/carnival/shared/form/_form.html.haml +64 -3
- data/app/views/carnival/shared/form/_inner_form.html.haml +1 -35
- data/app/views/carnival/shared/form/_nested_form.html.haml +20 -0
- data/app/views/carnival/shared/form/_nested_form_options.html.haml +29 -0
- data/app/views/carnival/shared/show/_show_as_list.html.haml +4 -0
- data/app/views/layouts/carnival/_menu.html.haml +6 -5
- data/config/locales/carnival.pt-br.yml +10 -6
- data/lib/carnival.rb +4 -0
- data/lib/carnival/config.rb +3 -1
- data/lib/carnival/routes.rb +2 -1
- data/lib/carnival/version.rb +1 -1
- data/lib/carnival/version.rb.orig +7 -0
- data/lib/generators/carnival/templates/carnival_initializer.rb +59 -48
- data/test/dummy/app/controllers/admin/people_controller.rb +1 -1
- data/test/dummy/app/controllers/admin/states_controller.rb +1 -1
- data/test/dummy/app/models/admin/city.rb +1 -0
- data/test/dummy/app/models/admin/state.rb +1 -0
- data/test/dummy/app/presenters/admin/person_presenter.rb +4 -2
- data/test/dummy/app/presenters/admin/state_presenter.rb +15 -5
- data/test/dummy/config/initializers/carnival_initializer.rb +7 -2
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/seeds.rb +15 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/bullet.log +366 -1094
- data/test/dummy/log/development.log +20675 -53911
- data/test/dummy/log/test.log +785 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/01c1d1cbb942f60130f0aa01d50c98d2 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/02b691bcf7570e21acab45d320ac92cf +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/049c6f2079e2e93f96fd228df8c265ba +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/0d9971c4a3b5017a7d2122508b66bb12 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/0f7b5da581fb3730800607447951008a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/{07e2c1c7f749a9d38b1649aec1d98730 → 1205c92fa474a4de8d08f2774c450103} +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/141987f5d019e60604cd75d2e340942f +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/147e4215ac96fd8b8d373567ae00ed47 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/1634e1287a9914e738e710919b7cd6e4 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/16c6027bc506317d8266573d0ae1b510 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/16e4094498947b5f36bfbb490b94d025 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2109e2acf993625dc0a3f05e7e0af523 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/21e89993e0f6f1b465e0de70e76b77f3 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2684dad966b304ec2aee0149dc77c657 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2908a36318747c72030e94441a2579c4 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/{d3b5d5784361e5eb827fbcdb0332258f → 2a85e7b776e55125671b84c4ed5a9f56} +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/30c8c2e6ca355103a267133f6b45b0ce +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/31177aaa32db75be241353c5819450b4 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/31a6581dfe5a788b2b450403959a97c5 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/32daf8a3bfd9da8ab261f5002f66389f +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/33dfbc7bdde795abfd1031ceaa315dc8 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/{197f549b9c46ec6679bddac8e4065948 → 36ac7d3c94b129447c85c4abea55a674} +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/39d34c0caaa6f36d684fac1898a7f88f +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/3a2fdd82041ab4b5ce8a082ec9b270fb +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/{aaf9dac7bb02577a8005e39ca9225482 → 3aa40071fc24bbafb6d0d4d36b91be70} +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/3ac0f4fad0d3e6d3d13d4ed2189dcabe +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/3d8100b6e405407290dcf994ef05e0b7 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/3f89739d959e11df6c20fa6ea13c1044 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/3fd8a2a00bb4ebd69a3ecac257dbe536 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/4423cb4765f66f187ffcb3be911c3600 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/44dd8eb9e41f4103d9f40dfd6b4ae2ae +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/45b86c586ed942b09cec2190b3c45c5a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/47ce692a80d5b075614c2489d7e3a142 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/499338aa610d84045d1a0f081960c6fc +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/4a7a4dcd9fea9bd2e287771c51f96631 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/4bd7e9214a07840040d269fdbf523e97 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/4c36f4196d9df171251bea6f3b587fe3 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/4e4b1f24c5e69f2f305f6d6483a1605c +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5090d7ea741c7f63994eb7b62e757f8f +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/536648929c703c8c5e964b502b2095ff +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/{b632a78e3341b622d2afbcb5312f9da0 → 55d16ecf7bea794f8130ad57090cf849} +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/565023fdd3960225e817ec043b2d9474 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/577f4d9c0b4703cbfffd7159a232e60e +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5a4d2d875f1d8ab987ab653f896d1c39 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5b0d5ead11b1996d8c04250256d5f1d4 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5c8a4c90b3525681a2173b93b9d55293 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5e7998a2046d512312e432aef40d3e22 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5eacf8d05b2a79f57d54ee047a51e223 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5ff6c7a42ff7a4d062640d9211b42275 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/604d964a22a33e7a1dc917eb10328fb6 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/611bcab6d1ba6d887fc27c1b9f6f2ac4 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/6808736d34ec24fb10203097ff009a4d +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/6b57b684590d7c01cfa80052144dd2df +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/6c257cb7126b2e5bda4c42d414e39786 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/6ce5945ed85a31ec875a9973b5a3d3bc +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/6d806eaa317f200bbf2832a0abf1c1cc +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/6e6e4eaedc6398f0557ca2fe922c970d +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/706dcf8ec253808fea35ae06a4b408b1 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/{3636240cbc1f10d05a7e27f44c330bf9 → 7a5d26a333ef57f4cb3f6148d201aabd} +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/7cfe3fa955d677396ed9e22193559a64 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/7e154ca951644e8aa1a2c6221f08db4f +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/822d6436044fe88b0b3fbc6f3458ff88 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/8576d7c22dbd8222ab27a6c47f56a65c +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/88144c375f9e329812d0302be96e0eab +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/8a4b32386b5d8554473df478badd6ef9 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/8bc60f31f479cd0263d897aa45b88750 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/{5d4c2ae09c50a0b53500e334aa699c8a → 8bee3d374e40eec902852521ab7bb59e} +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/918ab452d9c4634682ff94ffbd89e16f +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/9406ab6f0dd16a8cd5802c3c74df86ce +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/9455de99a5c68705427bbec9e50865ce +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/958dd41e5252627471b2b65116401512 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/9658141bfa282274f1da9155c32ae206 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/996ac001c901711cabb64b7e1940c54a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/9aec27b5fa2afdfa28068452ece0e6f0 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/9db7e75f3fa621ef08ade7ffda96e39f +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/9dc853d92b5d774afadacc451965059c +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a125dd8e84a82fc90705bd3710fb93c2 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a1c5386d742fb4d01bea977ed28f4a96 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a2ea0bd40e08492898f032af3756ebf9 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a30288f737d428b0feb2a78b3aab9c69 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a40d723f9a6ad5b541009b8f05ce6533 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a908448dd851cae431aa2b4bde9b5a98 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/aa5708f6fbe7528d49c127a7f89a2511 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/ad7b50123ad008ac0730bbbdf76a6bfe +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/b271e3537645a42480b3ba7bca2342f4 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/{662125e0a3b8f685abafe02e03c6f442 → b9089c33a95ef4a20cce25cc95ce5d25} +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/ba891185d4fda83f4c16e6bb8139359b +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/bea8fc4b9fc9ae163aa3e82041be2542 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/{6f6ec88ead28d25410be2a6f62ec79b1 → c5e6bcf3743cc436e9c5e728e7968918} +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/c72101732682999b6ca050f007fc6467 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/c8927e934e7960fc7907b6fc02ea7f08 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/c980544b5828a643ecaa8e784897c2c2 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/ca0e1997bc6c40f955a42ee777299750 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/cc2c3f8b87c5b787305412a3076058db +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/{6ad4d1acfed3cffae46c712b7c08af08 → d0f105bf22b1327c9d92c8695d4eb9cd} +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d16461dfcae4b782f721ebd81e4f8740 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/{5dff23c7dbd41b1db43fea8c8d933e94 → d30e267e67b877123ca48b32ba67d0b3} +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d81122f6f2520c8f0785425936756e20 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/dbf160a6439a8d0b792ff46cf0a612f6 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/dc829340258cc36c0df423725df54649 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/dcedf863f6acc3e1f21ec11434a77bf7 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/dd326f3f4fd1c7fd075b58d6cb623a25 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/de060f82711b4b5c465f17b140eb2a61 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/e0352d0f97751491adbe6a94832772af +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/e1d6efce94e71965434d2dde64fd8410 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/e4298973f799acdce289752c24bfddf2 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/e4900a6e69f874e98b87c7c7b23f7f5a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/e62e56f99e228e3467663224450f0a9b +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/e9c81ca91323dab8977ffd8a459cab06 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/{c3f8745dd91cb1b9a0c076a692369c4a → ea4b1e470711396062a4dba82f0823e6} +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/eccab0d41d08e156ccd2f36f85949356 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f035bed7351cb6f6e2bf1250125d3d4b +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f1e75c209067b23f5c0c7bf2006c43d0 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f31e05a23db2e9dfc9207658cda7b799 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/{3fdb709b3417757576eff80c0ec26b75 → f4428df54ac764385fa3d1c156fd8430} +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f5c9348795319821f3309d4e03bb9fdb +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f631443b06d6b36e666344dbaf0b64f0 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f71bbedf97979d3cfe44077a64d3e98a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/{8e22d55d0b7b958a3904e7428269df65 → f795ed856980e9033fa3603aa61bac8d} +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f7ab949c8c6b7ef3f2b743ebd98f9f59 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/fc4b3bb94f52c27dfb87395841a7cb62 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/fc79e1609ba401a4408c71182ef89b3e +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/fd1e0a44b82fc47f26c7adec9d918911 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/fe9a0ccc2a407c74780c85e66882e888 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/ff3b0a569330823bd5599af14ee70cc8 +0 -0
- metadata +239 -222
- data/app/assets/stylesheets/carnival/noty_theme_default.css +0 -185
- data/test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/22e50c67b95bf23b653e7a6768d38749 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2a4d4d7ea99972ea41453ec4e6bad058 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/58ce7bbd3c0d5ae2c59e5fcd6692d8ce +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/7e60927c780355f751c11cc4581b0c51 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/84e6a879569ca7546a93558488a6ff70 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d2ea65cc83e604dee36a5316b567e3e2 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d554039ac665d1a72c5af06725134a59 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/eed84a44f4e3915a39ea98ce25dc2570 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
@@ -0,0 +1,61 @@
|
|
1
|
+
(function($) {
|
2
|
+
|
3
|
+
$.noty.layouts.centerLeft = {
|
4
|
+
name: 'centerLeft',
|
5
|
+
options: { // overrides options
|
6
|
+
|
7
|
+
},
|
8
|
+
container: {
|
9
|
+
object: '<ul id="noty_centerLeft_layout_container" />',
|
10
|
+
selector: 'ul#noty_centerLeft_layout_container',
|
11
|
+
style: function() {
|
12
|
+
$(this).css({
|
13
|
+
left: 20,
|
14
|
+
position: 'fixed',
|
15
|
+
width: '310px',
|
16
|
+
height: 'auto',
|
17
|
+
margin: 0,
|
18
|
+
padding: 0,
|
19
|
+
listStyleType: 'none',
|
20
|
+
zIndex: 10000000
|
21
|
+
});
|
22
|
+
|
23
|
+
// getting hidden height
|
24
|
+
var dupe = $(this).clone().css({visibility:"hidden", display:"block", position:"absolute", top: 0, left: 0}).attr('id', 'dupe');
|
25
|
+
$("body").append(dupe);
|
26
|
+
dupe.find('.i-am-closing-now').remove();
|
27
|
+
dupe.find('li').css('display', 'block');
|
28
|
+
var actual_height = dupe.height();
|
29
|
+
dupe.remove();
|
30
|
+
|
31
|
+
if ($(this).hasClass('i-am-new')) {
|
32
|
+
$(this).css({
|
33
|
+
top: ($(window).height() - actual_height) / 2 + 'px'
|
34
|
+
});
|
35
|
+
} else {
|
36
|
+
$(this).animate({
|
37
|
+
top: ($(window).height() - actual_height) / 2 + 'px'
|
38
|
+
}, 500);
|
39
|
+
}
|
40
|
+
|
41
|
+
if (window.innerWidth < 600) {
|
42
|
+
$(this).css({
|
43
|
+
left: 5
|
44
|
+
});
|
45
|
+
}
|
46
|
+
|
47
|
+
}
|
48
|
+
},
|
49
|
+
parent: {
|
50
|
+
object: '<li />',
|
51
|
+
selector: 'li',
|
52
|
+
css: {}
|
53
|
+
},
|
54
|
+
css: {
|
55
|
+
display: 'none',
|
56
|
+
width: '310px'
|
57
|
+
},
|
58
|
+
addClass: ''
|
59
|
+
};
|
60
|
+
|
61
|
+
})(jQuery);
|
@@ -0,0 +1,61 @@
|
|
1
|
+
(function($) {
|
2
|
+
|
3
|
+
$.noty.layouts.centerRight = {
|
4
|
+
name: 'centerRight',
|
5
|
+
options: { // overrides options
|
6
|
+
|
7
|
+
},
|
8
|
+
container: {
|
9
|
+
object: '<ul id="noty_centerRight_layout_container" />',
|
10
|
+
selector: 'ul#noty_centerRight_layout_container',
|
11
|
+
style: function() {
|
12
|
+
$(this).css({
|
13
|
+
right: 20,
|
14
|
+
position: 'fixed',
|
15
|
+
width: '310px',
|
16
|
+
height: 'auto',
|
17
|
+
margin: 0,
|
18
|
+
padding: 0,
|
19
|
+
listStyleType: 'none',
|
20
|
+
zIndex: 10000000
|
21
|
+
});
|
22
|
+
|
23
|
+
// getting hidden height
|
24
|
+
var dupe = $(this).clone().css({visibility:"hidden", display:"block", position:"absolute", top: 0, left: 0}).attr('id', 'dupe');
|
25
|
+
$("body").append(dupe);
|
26
|
+
dupe.find('.i-am-closing-now').remove();
|
27
|
+
dupe.find('li').css('display', 'block');
|
28
|
+
var actual_height = dupe.height();
|
29
|
+
dupe.remove();
|
30
|
+
|
31
|
+
if ($(this).hasClass('i-am-new')) {
|
32
|
+
$(this).css({
|
33
|
+
top: ($(window).height() - actual_height) / 2 + 'px'
|
34
|
+
});
|
35
|
+
} else {
|
36
|
+
$(this).animate({
|
37
|
+
top: ($(window).height() - actual_height) / 2 + 'px'
|
38
|
+
}, 500);
|
39
|
+
}
|
40
|
+
|
41
|
+
if (window.innerWidth < 600) {
|
42
|
+
$(this).css({
|
43
|
+
right: 5
|
44
|
+
});
|
45
|
+
}
|
46
|
+
|
47
|
+
}
|
48
|
+
},
|
49
|
+
parent: {
|
50
|
+
object: '<li />',
|
51
|
+
selector: 'li',
|
52
|
+
css: {}
|
53
|
+
},
|
54
|
+
css: {
|
55
|
+
display: 'none',
|
56
|
+
width: '310px'
|
57
|
+
},
|
58
|
+
addClass: ''
|
59
|
+
};
|
60
|
+
|
61
|
+
})(jQuery);
|
@@ -0,0 +1,31 @@
|
|
1
|
+
(function($) {
|
2
|
+
|
3
|
+
$.noty.layouts.inline = {
|
4
|
+
name: 'inline',
|
5
|
+
options: {},
|
6
|
+
container: {
|
7
|
+
object: '<ul class="noty_inline_layout_container" />',
|
8
|
+
selector: 'ul.noty_inline_layout_container',
|
9
|
+
style: function() {
|
10
|
+
$(this).css({
|
11
|
+
width: '100%',
|
12
|
+
height: 'auto',
|
13
|
+
margin: 0,
|
14
|
+
padding: 0,
|
15
|
+
listStyleType: 'none',
|
16
|
+
zIndex: 9999999
|
17
|
+
});
|
18
|
+
}
|
19
|
+
},
|
20
|
+
parent: {
|
21
|
+
object: '<li />',
|
22
|
+
selector: 'li',
|
23
|
+
css: {}
|
24
|
+
},
|
25
|
+
css: {
|
26
|
+
display: 'none'
|
27
|
+
},
|
28
|
+
addClass: ''
|
29
|
+
};
|
30
|
+
|
31
|
+
})(jQuery);
|
@@ -0,0 +1,34 @@
|
|
1
|
+
(function($) {
|
2
|
+
|
3
|
+
$.noty.layouts.top = {
|
4
|
+
name: 'top',
|
5
|
+
options: {},
|
6
|
+
container: {
|
7
|
+
object: '<ul id="noty_top_layout_container" />',
|
8
|
+
selector: 'ul#noty_top_layout_container',
|
9
|
+
style: function() {
|
10
|
+
$(this).css({
|
11
|
+
top: 0,
|
12
|
+
left: '5%',
|
13
|
+
position: 'fixed',
|
14
|
+
width: '90%',
|
15
|
+
height: 'auto',
|
16
|
+
margin: 0,
|
17
|
+
padding: 0,
|
18
|
+
listStyleType: 'none',
|
19
|
+
zIndex: 9999999
|
20
|
+
});
|
21
|
+
}
|
22
|
+
},
|
23
|
+
parent: {
|
24
|
+
object: '<li />',
|
25
|
+
selector: 'li',
|
26
|
+
css: {}
|
27
|
+
},
|
28
|
+
css: {
|
29
|
+
display: 'none'
|
30
|
+
},
|
31
|
+
addClass: ''
|
32
|
+
};
|
33
|
+
|
34
|
+
})(jQuery);
|
@@ -0,0 +1,41 @@
|
|
1
|
+
(function($) {
|
2
|
+
|
3
|
+
$.noty.layouts.topCenter = {
|
4
|
+
name: 'topCenter',
|
5
|
+
options: { // overrides options
|
6
|
+
|
7
|
+
},
|
8
|
+
container: {
|
9
|
+
object: '<ul id="noty_topCenter_layout_container" />',
|
10
|
+
selector: 'ul#noty_topCenter_layout_container',
|
11
|
+
style: function() {
|
12
|
+
$(this).css({
|
13
|
+
top: 20,
|
14
|
+
left: 0,
|
15
|
+
position: 'fixed',
|
16
|
+
width: '310px',
|
17
|
+
height: 'auto',
|
18
|
+
margin: 0,
|
19
|
+
padding: 0,
|
20
|
+
listStyleType: 'none',
|
21
|
+
zIndex: 10000000
|
22
|
+
});
|
23
|
+
|
24
|
+
$(this).css({
|
25
|
+
left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px'
|
26
|
+
});
|
27
|
+
}
|
28
|
+
},
|
29
|
+
parent: {
|
30
|
+
object: '<li />',
|
31
|
+
selector: 'li',
|
32
|
+
css: {}
|
33
|
+
},
|
34
|
+
css: {
|
35
|
+
display: 'none',
|
36
|
+
width: '310px'
|
37
|
+
},
|
38
|
+
addClass: ''
|
39
|
+
};
|
40
|
+
|
41
|
+
})(jQuery);
|
@@ -0,0 +1,43 @@
|
|
1
|
+
(function($) {
|
2
|
+
|
3
|
+
$.noty.layouts.topLeft = {
|
4
|
+
name: 'topLeft',
|
5
|
+
options: { // overrides options
|
6
|
+
|
7
|
+
},
|
8
|
+
container: {
|
9
|
+
object: '<ul id="noty_topLeft_layout_container" />',
|
10
|
+
selector: 'ul#noty_topLeft_layout_container',
|
11
|
+
style: function() {
|
12
|
+
$(this).css({
|
13
|
+
top: 20,
|
14
|
+
left: 20,
|
15
|
+
position: 'fixed',
|
16
|
+
width: '310px',
|
17
|
+
height: 'auto',
|
18
|
+
margin: 0,
|
19
|
+
padding: 0,
|
20
|
+
listStyleType: 'none',
|
21
|
+
zIndex: 10000000
|
22
|
+
});
|
23
|
+
|
24
|
+
if (window.innerWidth < 600) {
|
25
|
+
$(this).css({
|
26
|
+
left: 5
|
27
|
+
});
|
28
|
+
}
|
29
|
+
}
|
30
|
+
},
|
31
|
+
parent: {
|
32
|
+
object: '<li />',
|
33
|
+
selector: 'li',
|
34
|
+
css: {}
|
35
|
+
},
|
36
|
+
css: {
|
37
|
+
display: 'none',
|
38
|
+
width: '310px'
|
39
|
+
},
|
40
|
+
addClass: ''
|
41
|
+
};
|
42
|
+
|
43
|
+
})(jQuery);
|
@@ -0,0 +1,43 @@
|
|
1
|
+
(function($) {
|
2
|
+
|
3
|
+
$.noty.layouts.topRight = {
|
4
|
+
name: 'topRight',
|
5
|
+
options: { // overrides options
|
6
|
+
|
7
|
+
},
|
8
|
+
container: {
|
9
|
+
object: '<ul id="noty_topRight_layout_container" />',
|
10
|
+
selector: 'ul#noty_topRight_layout_container',
|
11
|
+
style: function() {
|
12
|
+
$(this).css({
|
13
|
+
top: 20,
|
14
|
+
right: 20,
|
15
|
+
position: 'fixed',
|
16
|
+
width: '310px',
|
17
|
+
height: 'auto',
|
18
|
+
margin: 0,
|
19
|
+
padding: 0,
|
20
|
+
listStyleType: 'none',
|
21
|
+
zIndex: 10000000
|
22
|
+
});
|
23
|
+
|
24
|
+
if (window.innerWidth < 600) {
|
25
|
+
$(this).css({
|
26
|
+
right: 5
|
27
|
+
});
|
28
|
+
}
|
29
|
+
}
|
30
|
+
},
|
31
|
+
parent: {
|
32
|
+
object: '<li />',
|
33
|
+
selector: 'li',
|
34
|
+
css: {}
|
35
|
+
},
|
36
|
+
css: {
|
37
|
+
display: 'none',
|
38
|
+
width: '310px'
|
39
|
+
},
|
40
|
+
addClass: ''
|
41
|
+
};
|
42
|
+
|
43
|
+
})(jQuery);
|
@@ -0,0 +1,1180 @@
|
|
1
|
+
/**
|
2
|
+
* noty - jQuery Notification Plugin v2.2.2
|
3
|
+
* Contributors: https://github.com/needim/noty/graphs/contributors
|
4
|
+
*
|
5
|
+
* Examples and Documentation - http://needim.github.com/noty/
|
6
|
+
*
|
7
|
+
* Licensed under the MIT licenses:
|
8
|
+
* http://www.opensource.org/licenses/mit-license.php
|
9
|
+
*
|
10
|
+
**/
|
11
|
+
|
12
|
+
if (typeof Object.create !== 'function') {
|
13
|
+
Object.create = function (o) {
|
14
|
+
function F() {
|
15
|
+
}
|
16
|
+
|
17
|
+
F.prototype = o;
|
18
|
+
return new F();
|
19
|
+
};
|
20
|
+
}
|
21
|
+
|
22
|
+
(function ($) {
|
23
|
+
|
24
|
+
var NotyObject = {
|
25
|
+
|
26
|
+
init:function (options) {
|
27
|
+
|
28
|
+
// Mix in the passed in options with the default options
|
29
|
+
this.options = $.extend({}, $.noty.defaults, options);
|
30
|
+
|
31
|
+
this.options.layout = (this.options.custom) ? $.noty.layouts['inline'] : $.noty.layouts[this.options.layout];
|
32
|
+
|
33
|
+
if ($.noty.themes[this.options.theme])
|
34
|
+
this.options.theme = $.noty.themes[this.options.theme];
|
35
|
+
else
|
36
|
+
options.themeClassName = this.options.theme;
|
37
|
+
|
38
|
+
delete options.layout;
|
39
|
+
delete options.theme;
|
40
|
+
|
41
|
+
this.options = $.extend({}, this.options, this.options.layout.options);
|
42
|
+
this.options.id = 'noty_' + (new Date().getTime() * Math.floor(Math.random() * 1000000));
|
43
|
+
|
44
|
+
this.options = $.extend({}, this.options, options);
|
45
|
+
|
46
|
+
// Build the noty dom initial structure
|
47
|
+
this._build();
|
48
|
+
|
49
|
+
// return this so we can chain/use the bridge with less code.
|
50
|
+
return this;
|
51
|
+
}, // end init
|
52
|
+
|
53
|
+
_build:function () {
|
54
|
+
|
55
|
+
// Generating noty bar
|
56
|
+
var $bar = $('<div class="noty_bar noty_type_' + this.options.type + '"></div>').attr('id', this.options.id);
|
57
|
+
$bar.append(this.options.template).find('.noty_text').html(this.options.text);
|
58
|
+
|
59
|
+
this.$bar = (this.options.layout.parent.object !== null) ? $(this.options.layout.parent.object).css(this.options.layout.parent.css).append($bar) : $bar;
|
60
|
+
|
61
|
+
if (this.options.themeClassName)
|
62
|
+
this.$bar.addClass(this.options.themeClassName).addClass('noty_container_type_' + this.options.type);
|
63
|
+
|
64
|
+
// Set buttons if available
|
65
|
+
if (this.options.buttons) {
|
66
|
+
|
67
|
+
// If we have button disable closeWith & timeout options
|
68
|
+
this.options.closeWith = [];
|
69
|
+
this.options.timeout = false;
|
70
|
+
|
71
|
+
var $buttons = $('<div/>').addClass('noty_buttons');
|
72
|
+
|
73
|
+
(this.options.layout.parent.object !== null) ? this.$bar.find('.noty_bar').append($buttons) : this.$bar.append($buttons);
|
74
|
+
|
75
|
+
var self = this;
|
76
|
+
|
77
|
+
$.each(this.options.buttons, function (i, button) {
|
78
|
+
var $button = $('<button/>').addClass((button.addClass) ? button.addClass : 'gray').html(button.text).attr('id', button.id ? button.id : 'button-' + i)
|
79
|
+
.appendTo(self.$bar.find('.noty_buttons'))
|
80
|
+
.bind('click', function () {
|
81
|
+
if ($.isFunction(button.onClick)) {
|
82
|
+
button.onClick.call($button, self);
|
83
|
+
}
|
84
|
+
});
|
85
|
+
});
|
86
|
+
}
|
87
|
+
|
88
|
+
// For easy access
|
89
|
+
this.$message = this.$bar.find('.noty_message');
|
90
|
+
this.$closeButton = this.$bar.find('.noty_close');
|
91
|
+
this.$buttons = this.$bar.find('.noty_buttons');
|
92
|
+
|
93
|
+
$.noty.store[this.options.id] = this; // store noty for api
|
94
|
+
|
95
|
+
}, // end _build
|
96
|
+
|
97
|
+
show:function () {
|
98
|
+
|
99
|
+
var self = this;
|
100
|
+
|
101
|
+
(self.options.custom) ? self.options.custom.find(self.options.layout.container.selector).append(self.$bar) : $(self.options.layout.container.selector).append(self.$bar);
|
102
|
+
|
103
|
+
if (self.options.theme && self.options.theme.style)
|
104
|
+
self.options.theme.style.apply(self);
|
105
|
+
|
106
|
+
($.type(self.options.layout.css) === 'function') ? this.options.layout.css.apply(self.$bar) : self.$bar.css(this.options.layout.css || {});
|
107
|
+
|
108
|
+
self.$bar.addClass(self.options.layout.addClass);
|
109
|
+
|
110
|
+
self.options.layout.container.style.apply($(self.options.layout.container.selector));
|
111
|
+
|
112
|
+
self.showing = true;
|
113
|
+
|
114
|
+
if (self.options.theme && self.options.theme.style)
|
115
|
+
self.options.theme.callback.onShow.apply(this);
|
116
|
+
|
117
|
+
if ($.inArray('click', self.options.closeWith) > -1)
|
118
|
+
self.$bar.css('cursor', 'pointer').one('click', function (evt) {
|
119
|
+
self.stopPropagation(evt);
|
120
|
+
if (self.options.callback.onCloseClick) {
|
121
|
+
self.options.callback.onCloseClick.apply(self);
|
122
|
+
}
|
123
|
+
self.close();
|
124
|
+
});
|
125
|
+
|
126
|
+
if ($.inArray('hover', self.options.closeWith) > -1)
|
127
|
+
self.$bar.one('mouseenter', function () {
|
128
|
+
self.close();
|
129
|
+
});
|
130
|
+
|
131
|
+
if ($.inArray('button', self.options.closeWith) > -1)
|
132
|
+
self.$closeButton.one('click', function (evt) {
|
133
|
+
self.stopPropagation(evt);
|
134
|
+
self.close();
|
135
|
+
});
|
136
|
+
|
137
|
+
if ($.inArray('button', self.options.closeWith) == -1)
|
138
|
+
self.$closeButton.remove();
|
139
|
+
|
140
|
+
if (self.options.callback.onShow)
|
141
|
+
self.options.callback.onShow.apply(self);
|
142
|
+
|
143
|
+
self.$bar.animate(
|
144
|
+
self.options.animation.open,
|
145
|
+
self.options.animation.speed,
|
146
|
+
self.options.animation.easing,
|
147
|
+
function () {
|
148
|
+
if (self.options.callback.afterShow) self.options.callback.afterShow.apply(self);
|
149
|
+
self.showing = false;
|
150
|
+
self.shown = true;
|
151
|
+
});
|
152
|
+
|
153
|
+
// If noty is have a timeout option
|
154
|
+
if (self.options.timeout)
|
155
|
+
self.$bar.delay(self.options.timeout).promise().done(function () {
|
156
|
+
self.close();
|
157
|
+
});
|
158
|
+
|
159
|
+
return this;
|
160
|
+
|
161
|
+
}, // end show
|
162
|
+
|
163
|
+
close:function () {
|
164
|
+
|
165
|
+
if (this.closed) return;
|
166
|
+
if (this.$bar && this.$bar.hasClass('i-am-closing-now')) return;
|
167
|
+
|
168
|
+
var self = this;
|
169
|
+
|
170
|
+
if (this.showing) {
|
171
|
+
self.$bar.queue(
|
172
|
+
function () {
|
173
|
+
self.close.apply(self);
|
174
|
+
}
|
175
|
+
)
|
176
|
+
return;
|
177
|
+
}
|
178
|
+
|
179
|
+
if (!this.shown && !this.showing) { // If we are still waiting in the queue just delete from queue
|
180
|
+
var queue = [];
|
181
|
+
$.each($.noty.queue, function (i, n) {
|
182
|
+
if (n.options.id != self.options.id) {
|
183
|
+
queue.push(n);
|
184
|
+
}
|
185
|
+
});
|
186
|
+
$.noty.queue = queue;
|
187
|
+
return;
|
188
|
+
}
|
189
|
+
|
190
|
+
self.$bar.addClass('i-am-closing-now');
|
191
|
+
|
192
|
+
if (self.options.callback.onClose) {
|
193
|
+
self.options.callback.onClose.apply(self);
|
194
|
+
}
|
195
|
+
|
196
|
+
self.$bar.clearQueue().stop().animate(
|
197
|
+
self.options.animation.close,
|
198
|
+
self.options.animation.speed,
|
199
|
+
self.options.animation.easing,
|
200
|
+
function () {
|
201
|
+
if (self.options.callback.afterClose) self.options.callback.afterClose.apply(self);
|
202
|
+
})
|
203
|
+
.promise().done(function () {
|
204
|
+
|
205
|
+
// Modal Cleaning
|
206
|
+
if (self.options.modal) {
|
207
|
+
$.notyRenderer.setModalCount(-1);
|
208
|
+
if ($.notyRenderer.getModalCount() == 0) $('.noty_modal').fadeOut('fast', function () {
|
209
|
+
$(this).remove();
|
210
|
+
});
|
211
|
+
}
|
212
|
+
|
213
|
+
// Layout Cleaning
|
214
|
+
$.notyRenderer.setLayoutCountFor(self, -1);
|
215
|
+
if ($.notyRenderer.getLayoutCountFor(self) == 0) $(self.options.layout.container.selector).remove();
|
216
|
+
|
217
|
+
// Make sure self.$bar has not been removed before attempting to remove it
|
218
|
+
if (typeof self.$bar !== 'undefined' && self.$bar !== null ) {
|
219
|
+
self.$bar.remove();
|
220
|
+
self.$bar = null;
|
221
|
+
self.closed = true;
|
222
|
+
}
|
223
|
+
|
224
|
+
delete $.noty.store[self.options.id]; // deleting noty from store
|
225
|
+
|
226
|
+
if(self.options.theme.callback && self.options.theme.callback.onClose) {
|
227
|
+
self.options.theme.callback.onClose.apply(self);
|
228
|
+
}
|
229
|
+
|
230
|
+
if (!self.options.dismissQueue) {
|
231
|
+
// Queue render
|
232
|
+
$.noty.ontap = true;
|
233
|
+
|
234
|
+
$.notyRenderer.render();
|
235
|
+
}
|
236
|
+
|
237
|
+
if (self.options.maxVisible > 0 && self.options.dismissQueue) {
|
238
|
+
$.notyRenderer.render();
|
239
|
+
}
|
240
|
+
})
|
241
|
+
|
242
|
+
}, // end close
|
243
|
+
|
244
|
+
setText:function (text) {
|
245
|
+
if (!this.closed) {
|
246
|
+
this.options.text = text;
|
247
|
+
this.$bar.find('.noty_text').html(text);
|
248
|
+
}
|
249
|
+
return this;
|
250
|
+
},
|
251
|
+
|
252
|
+
setType:function (type) {
|
253
|
+
if (!this.closed) {
|
254
|
+
this.options.type = type;
|
255
|
+
this.options.theme.style.apply(this);
|
256
|
+
this.options.theme.callback.onShow.apply(this);
|
257
|
+
}
|
258
|
+
return this;
|
259
|
+
},
|
260
|
+
|
261
|
+
setTimeout:function (time) {
|
262
|
+
if (!this.closed) {
|
263
|
+
var self = this;
|
264
|
+
this.options.timeout = time;
|
265
|
+
self.$bar.delay(self.options.timeout).promise().done(function () {
|
266
|
+
self.close();
|
267
|
+
});
|
268
|
+
}
|
269
|
+
return this;
|
270
|
+
},
|
271
|
+
|
272
|
+
stopPropagation:function (evt) {
|
273
|
+
evt = evt || window.event;
|
274
|
+
if (typeof evt.stopPropagation !== "undefined") {
|
275
|
+
evt.stopPropagation();
|
276
|
+
} else {
|
277
|
+
evt.cancelBubble = true;
|
278
|
+
}
|
279
|
+
},
|
280
|
+
|
281
|
+
closed:false,
|
282
|
+
showing:false,
|
283
|
+
shown:false
|
284
|
+
|
285
|
+
}; // end NotyObject
|
286
|
+
|
287
|
+
$.notyRenderer = {};
|
288
|
+
|
289
|
+
$.notyRenderer.init = function (options) {
|
290
|
+
|
291
|
+
// Renderer creates a new noty
|
292
|
+
var notification = Object.create(NotyObject).init(options);
|
293
|
+
|
294
|
+
if (notification.options.killer)
|
295
|
+
$.noty.closeAll();
|
296
|
+
|
297
|
+
(notification.options.force) ? $.noty.queue.unshift(notification) : $.noty.queue.push(notification);
|
298
|
+
|
299
|
+
$.notyRenderer.render();
|
300
|
+
|
301
|
+
return ($.noty.returns == 'object') ? notification : notification.options.id;
|
302
|
+
};
|
303
|
+
|
304
|
+
$.notyRenderer.render = function () {
|
305
|
+
|
306
|
+
var instance = $.noty.queue[0];
|
307
|
+
|
308
|
+
if ($.type(instance) === 'object') {
|
309
|
+
if (instance.options.dismissQueue) {
|
310
|
+
if (instance.options.maxVisible > 0) {
|
311
|
+
if ($(instance.options.layout.container.selector + ' li').length < instance.options.maxVisible) {
|
312
|
+
$.notyRenderer.show($.noty.queue.shift());
|
313
|
+
} else {
|
314
|
+
|
315
|
+
}
|
316
|
+
} else {
|
317
|
+
$.notyRenderer.show($.noty.queue.shift());
|
318
|
+
}
|
319
|
+
} else {
|
320
|
+
if ($.noty.ontap) {
|
321
|
+
$.notyRenderer.show($.noty.queue.shift());
|
322
|
+
$.noty.ontap = false;
|
323
|
+
}
|
324
|
+
}
|
325
|
+
} else {
|
326
|
+
$.noty.ontap = true; // Queue is over
|
327
|
+
}
|
328
|
+
|
329
|
+
};
|
330
|
+
|
331
|
+
$.notyRenderer.show = function (notification) {
|
332
|
+
|
333
|
+
if (notification.options.modal) {
|
334
|
+
$.notyRenderer.createModalFor(notification);
|
335
|
+
$.notyRenderer.setModalCount(+1);
|
336
|
+
}
|
337
|
+
|
338
|
+
// Where is the container?
|
339
|
+
if (notification.options.custom) {
|
340
|
+
if (notification.options.custom.find(notification.options.layout.container.selector).length == 0) {
|
341
|
+
notification.options.custom.append($(notification.options.layout.container.object).addClass('i-am-new'));
|
342
|
+
} else {
|
343
|
+
notification.options.custom.find(notification.options.layout.container.selector).removeClass('i-am-new');
|
344
|
+
}
|
345
|
+
} else {
|
346
|
+
if ($(notification.options.layout.container.selector).length == 0) {
|
347
|
+
$('body').append($(notification.options.layout.container.object).addClass('i-am-new'));
|
348
|
+
} else {
|
349
|
+
$(notification.options.layout.container.selector).removeClass('i-am-new');
|
350
|
+
}
|
351
|
+
}
|
352
|
+
|
353
|
+
$.notyRenderer.setLayoutCountFor(notification, +1);
|
354
|
+
|
355
|
+
notification.show();
|
356
|
+
};
|
357
|
+
|
358
|
+
$.notyRenderer.createModalFor = function (notification) {
|
359
|
+
if ($('.noty_modal').length == 0) {
|
360
|
+
var modal = $('<div/>').addClass('noty_modal').addClass(notification.options.theme).data('noty_modal_count', 0);
|
361
|
+
|
362
|
+
if (notification.options.theme.modal && notification.options.theme.modal.css)
|
363
|
+
modal.css(notification.options.theme.modal.css);
|
364
|
+
|
365
|
+
modal.prependTo($('body')).fadeIn('fast');
|
366
|
+
}
|
367
|
+
};
|
368
|
+
|
369
|
+
$.notyRenderer.getLayoutCountFor = function (notification) {
|
370
|
+
return $(notification.options.layout.container.selector).data('noty_layout_count') || 0;
|
371
|
+
};
|
372
|
+
|
373
|
+
$.notyRenderer.setLayoutCountFor = function (notification, arg) {
|
374
|
+
return $(notification.options.layout.container.selector).data('noty_layout_count', $.notyRenderer.getLayoutCountFor(notification) + arg);
|
375
|
+
};
|
376
|
+
|
377
|
+
$.notyRenderer.getModalCount = function () {
|
378
|
+
return $('.noty_modal').data('noty_modal_count') || 0;
|
379
|
+
};
|
380
|
+
|
381
|
+
$.notyRenderer.setModalCount = function (arg) {
|
382
|
+
return $('.noty_modal').data('noty_modal_count', $.notyRenderer.getModalCount() + arg);
|
383
|
+
};
|
384
|
+
|
385
|
+
// This is for custom container
|
386
|
+
$.fn.noty = function (options) {
|
387
|
+
options.custom = $(this);
|
388
|
+
return $.notyRenderer.init(options);
|
389
|
+
};
|
390
|
+
|
391
|
+
$.noty = {};
|
392
|
+
$.noty.queue = [];
|
393
|
+
$.noty.ontap = true;
|
394
|
+
$.noty.layouts = {};
|
395
|
+
$.noty.themes = {};
|
396
|
+
$.noty.returns = 'object';
|
397
|
+
$.noty.store = {};
|
398
|
+
|
399
|
+
$.noty.get = function (id) {
|
400
|
+
return $.noty.store.hasOwnProperty(id) ? $.noty.store[id] : false;
|
401
|
+
};
|
402
|
+
|
403
|
+
$.noty.close = function (id) {
|
404
|
+
return $.noty.get(id) ? $.noty.get(id).close() : false;
|
405
|
+
};
|
406
|
+
|
407
|
+
$.noty.setText = function (id, text) {
|
408
|
+
return $.noty.get(id) ? $.noty.get(id).setText(text) : false;
|
409
|
+
};
|
410
|
+
|
411
|
+
$.noty.setType = function (id, type) {
|
412
|
+
return $.noty.get(id) ? $.noty.get(id).setType(type) : false;
|
413
|
+
};
|
414
|
+
|
415
|
+
$.noty.clearQueue = function () {
|
416
|
+
$.noty.queue = [];
|
417
|
+
};
|
418
|
+
|
419
|
+
$.noty.closeAll = function () {
|
420
|
+
$.noty.clearQueue();
|
421
|
+
$.each($.noty.store, function (id, noty) {
|
422
|
+
noty.close();
|
423
|
+
});
|
424
|
+
};
|
425
|
+
|
426
|
+
var windowAlert = window.alert;
|
427
|
+
|
428
|
+
$.noty.consumeAlert = function (options) {
|
429
|
+
window.alert = function (text) {
|
430
|
+
if (options)
|
431
|
+
options.text = text;
|
432
|
+
else
|
433
|
+
options = {text:text};
|
434
|
+
|
435
|
+
$.notyRenderer.init(options);
|
436
|
+
};
|
437
|
+
};
|
438
|
+
|
439
|
+
$.noty.stopConsumeAlert = function () {
|
440
|
+
window.alert = windowAlert;
|
441
|
+
};
|
442
|
+
|
443
|
+
$.noty.defaults = {
|
444
|
+
layout:'top',
|
445
|
+
theme:'defaultTheme',
|
446
|
+
type:'alert',
|
447
|
+
text:'',
|
448
|
+
dismissQueue:true,
|
449
|
+
template:'<div class="noty_message"><span class="noty_text"></span><div class="noty_close"></div></div>',
|
450
|
+
animation:{
|
451
|
+
open:{height:'toggle'},
|
452
|
+
close:{height:'toggle'},
|
453
|
+
easing:'swing',
|
454
|
+
speed:500
|
455
|
+
},
|
456
|
+
timeout:false,
|
457
|
+
force:false,
|
458
|
+
modal:false,
|
459
|
+
maxVisible:5,
|
460
|
+
killer: false,
|
461
|
+
closeWith:['click'],
|
462
|
+
callback:{
|
463
|
+
onShow:function () {
|
464
|
+
},
|
465
|
+
afterShow:function () {
|
466
|
+
},
|
467
|
+
onClose:function () {
|
468
|
+
},
|
469
|
+
afterClose:function () {
|
470
|
+
},
|
471
|
+
onCloseClick:function () {
|
472
|
+
}
|
473
|
+
},
|
474
|
+
buttons:false
|
475
|
+
};
|
476
|
+
|
477
|
+
$(window).resize(function () {
|
478
|
+
$.each($.noty.layouts, function (index, layout) {
|
479
|
+
layout.container.style.apply($(layout.container.selector));
|
480
|
+
});
|
481
|
+
});
|
482
|
+
|
483
|
+
})(jQuery);
|
484
|
+
|
485
|
+
// Helpers
|
486
|
+
window.noty = function noty(options) {
|
487
|
+
return jQuery.notyRenderer.init(options);
|
488
|
+
};
|
489
|
+
|
490
|
+
(function($) {
|
491
|
+
|
492
|
+
$.noty.layouts.bottom = {
|
493
|
+
name: 'bottom',
|
494
|
+
options: {},
|
495
|
+
container: {
|
496
|
+
object: '<ul id="noty_bottom_layout_container" />',
|
497
|
+
selector: 'ul#noty_bottom_layout_container',
|
498
|
+
style: function() {
|
499
|
+
$(this).css({
|
500
|
+
bottom: 0,
|
501
|
+
left: '5%',
|
502
|
+
position: 'fixed',
|
503
|
+
width: '90%',
|
504
|
+
height: 'auto',
|
505
|
+
margin: 0,
|
506
|
+
padding: 0,
|
507
|
+
listStyleType: 'none',
|
508
|
+
zIndex: 9999999
|
509
|
+
});
|
510
|
+
}
|
511
|
+
},
|
512
|
+
parent: {
|
513
|
+
object: '<li />',
|
514
|
+
selector: 'li',
|
515
|
+
css: {}
|
516
|
+
},
|
517
|
+
css: {
|
518
|
+
display: 'none'
|
519
|
+
},
|
520
|
+
addClass: ''
|
521
|
+
};
|
522
|
+
|
523
|
+
})(jQuery);
|
524
|
+
(function($) {
|
525
|
+
|
526
|
+
$.noty.layouts.bottomCenter = {
|
527
|
+
name: 'bottomCenter',
|
528
|
+
options: { // overrides options
|
529
|
+
|
530
|
+
},
|
531
|
+
container: {
|
532
|
+
object: '<ul id="noty_bottomCenter_layout_container" />',
|
533
|
+
selector: 'ul#noty_bottomCenter_layout_container',
|
534
|
+
style: function() {
|
535
|
+
$(this).css({
|
536
|
+
bottom: 20,
|
537
|
+
left: 0,
|
538
|
+
position: 'fixed',
|
539
|
+
width: '310px',
|
540
|
+
height: 'auto',
|
541
|
+
margin: 0,
|
542
|
+
padding: 0,
|
543
|
+
listStyleType: 'none',
|
544
|
+
zIndex: 10000000
|
545
|
+
});
|
546
|
+
|
547
|
+
$(this).css({
|
548
|
+
left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px'
|
549
|
+
});
|
550
|
+
}
|
551
|
+
},
|
552
|
+
parent: {
|
553
|
+
object: '<li />',
|
554
|
+
selector: 'li',
|
555
|
+
css: {}
|
556
|
+
},
|
557
|
+
css: {
|
558
|
+
display: 'none',
|
559
|
+
width: '310px'
|
560
|
+
},
|
561
|
+
addClass: ''
|
562
|
+
};
|
563
|
+
|
564
|
+
})(jQuery);
|
565
|
+
|
566
|
+
(function($) {
|
567
|
+
|
568
|
+
$.noty.layouts.bottomLeft = {
|
569
|
+
name: 'bottomLeft',
|
570
|
+
options: { // overrides options
|
571
|
+
|
572
|
+
},
|
573
|
+
container: {
|
574
|
+
object: '<ul id="noty_bottomLeft_layout_container" />',
|
575
|
+
selector: 'ul#noty_bottomLeft_layout_container',
|
576
|
+
style: function() {
|
577
|
+
$(this).css({
|
578
|
+
bottom: 20,
|
579
|
+
left: 20,
|
580
|
+
position: 'fixed',
|
581
|
+
width: '310px',
|
582
|
+
height: 'auto',
|
583
|
+
margin: 0,
|
584
|
+
padding: 0,
|
585
|
+
listStyleType: 'none',
|
586
|
+
zIndex: 10000000
|
587
|
+
});
|
588
|
+
|
589
|
+
if (window.innerWidth < 600) {
|
590
|
+
$(this).css({
|
591
|
+
left: 5
|
592
|
+
});
|
593
|
+
}
|
594
|
+
}
|
595
|
+
},
|
596
|
+
parent: {
|
597
|
+
object: '<li />',
|
598
|
+
selector: 'li',
|
599
|
+
css: {}
|
600
|
+
},
|
601
|
+
css: {
|
602
|
+
display: 'none',
|
603
|
+
width: '310px'
|
604
|
+
},
|
605
|
+
addClass: ''
|
606
|
+
};
|
607
|
+
|
608
|
+
})(jQuery);
|
609
|
+
(function($) {
|
610
|
+
|
611
|
+
$.noty.layouts.bottomRight = {
|
612
|
+
name: 'bottomRight',
|
613
|
+
options: { // overrides options
|
614
|
+
|
615
|
+
},
|
616
|
+
container: {
|
617
|
+
object: '<ul id="noty_bottomRight_layout_container" />',
|
618
|
+
selector: 'ul#noty_bottomRight_layout_container',
|
619
|
+
style: function() {
|
620
|
+
$(this).css({
|
621
|
+
bottom: 20,
|
622
|
+
right: 20,
|
623
|
+
position: 'fixed',
|
624
|
+
width: '310px',
|
625
|
+
height: 'auto',
|
626
|
+
margin: 0,
|
627
|
+
padding: 0,
|
628
|
+
listStyleType: 'none',
|
629
|
+
zIndex: 10000000
|
630
|
+
});
|
631
|
+
|
632
|
+
if (window.innerWidth < 600) {
|
633
|
+
$(this).css({
|
634
|
+
right: 5
|
635
|
+
});
|
636
|
+
}
|
637
|
+
}
|
638
|
+
},
|
639
|
+
parent: {
|
640
|
+
object: '<li />',
|
641
|
+
selector: 'li',
|
642
|
+
css: {}
|
643
|
+
},
|
644
|
+
css: {
|
645
|
+
display: 'none',
|
646
|
+
width: '310px'
|
647
|
+
},
|
648
|
+
addClass: ''
|
649
|
+
};
|
650
|
+
|
651
|
+
})(jQuery);
|
652
|
+
(function($) {
|
653
|
+
|
654
|
+
$.noty.layouts.center = {
|
655
|
+
name: 'center',
|
656
|
+
options: { // overrides options
|
657
|
+
|
658
|
+
},
|
659
|
+
container: {
|
660
|
+
object: '<ul id="noty_center_layout_container" />',
|
661
|
+
selector: 'ul#noty_center_layout_container',
|
662
|
+
style: function() {
|
663
|
+
$(this).css({
|
664
|
+
position: 'fixed',
|
665
|
+
width: '310px',
|
666
|
+
height: 'auto',
|
667
|
+
margin: 0,
|
668
|
+
padding: 0,
|
669
|
+
listStyleType: 'none',
|
670
|
+
zIndex: 10000000
|
671
|
+
});
|
672
|
+
|
673
|
+
// getting hidden height
|
674
|
+
var dupe = $(this).clone().css({visibility:"hidden", display:"block", position:"absolute", top: 0, left: 0}).attr('id', 'dupe');
|
675
|
+
$("body").append(dupe);
|
676
|
+
dupe.find('.i-am-closing-now').remove();
|
677
|
+
dupe.find('li').css('display', 'block');
|
678
|
+
var actual_height = dupe.height();
|
679
|
+
dupe.remove();
|
680
|
+
|
681
|
+
if ($(this).hasClass('i-am-new')) {
|
682
|
+
$(this).css({
|
683
|
+
left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px',
|
684
|
+
top: ($(window).height() - actual_height) / 2 + 'px'
|
685
|
+
});
|
686
|
+
} else {
|
687
|
+
$(this).animate({
|
688
|
+
left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px',
|
689
|
+
top: ($(window).height() - actual_height) / 2 + 'px'
|
690
|
+
}, 500);
|
691
|
+
}
|
692
|
+
|
693
|
+
}
|
694
|
+
},
|
695
|
+
parent: {
|
696
|
+
object: '<li />',
|
697
|
+
selector: 'li',
|
698
|
+
css: {}
|
699
|
+
},
|
700
|
+
css: {
|
701
|
+
display: 'none',
|
702
|
+
width: '310px'
|
703
|
+
},
|
704
|
+
addClass: ''
|
705
|
+
};
|
706
|
+
|
707
|
+
})(jQuery);
|
708
|
+
(function($) {
|
709
|
+
|
710
|
+
$.noty.layouts.centerLeft = {
|
711
|
+
name: 'centerLeft',
|
712
|
+
options: { // overrides options
|
713
|
+
|
714
|
+
},
|
715
|
+
container: {
|
716
|
+
object: '<ul id="noty_centerLeft_layout_container" />',
|
717
|
+
selector: 'ul#noty_centerLeft_layout_container',
|
718
|
+
style: function() {
|
719
|
+
$(this).css({
|
720
|
+
left: 20,
|
721
|
+
position: 'fixed',
|
722
|
+
width: '310px',
|
723
|
+
height: 'auto',
|
724
|
+
margin: 0,
|
725
|
+
padding: 0,
|
726
|
+
listStyleType: 'none',
|
727
|
+
zIndex: 10000000
|
728
|
+
});
|
729
|
+
|
730
|
+
// getting hidden height
|
731
|
+
var dupe = $(this).clone().css({visibility:"hidden", display:"block", position:"absolute", top: 0, left: 0}).attr('id', 'dupe');
|
732
|
+
$("body").append(dupe);
|
733
|
+
dupe.find('.i-am-closing-now').remove();
|
734
|
+
dupe.find('li').css('display', 'block');
|
735
|
+
var actual_height = dupe.height();
|
736
|
+
dupe.remove();
|
737
|
+
|
738
|
+
if ($(this).hasClass('i-am-new')) {
|
739
|
+
$(this).css({
|
740
|
+
top: ($(window).height() - actual_height) / 2 + 'px'
|
741
|
+
});
|
742
|
+
} else {
|
743
|
+
$(this).animate({
|
744
|
+
top: ($(window).height() - actual_height) / 2 + 'px'
|
745
|
+
}, 500);
|
746
|
+
}
|
747
|
+
|
748
|
+
if (window.innerWidth < 600) {
|
749
|
+
$(this).css({
|
750
|
+
left: 5
|
751
|
+
});
|
752
|
+
}
|
753
|
+
|
754
|
+
}
|
755
|
+
},
|
756
|
+
parent: {
|
757
|
+
object: '<li />',
|
758
|
+
selector: 'li',
|
759
|
+
css: {}
|
760
|
+
},
|
761
|
+
css: {
|
762
|
+
display: 'none',
|
763
|
+
width: '310px'
|
764
|
+
},
|
765
|
+
addClass: ''
|
766
|
+
};
|
767
|
+
|
768
|
+
})(jQuery);
|
769
|
+
|
770
|
+
(function($) {
|
771
|
+
|
772
|
+
$.noty.layouts.centerRight = {
|
773
|
+
name: 'centerRight',
|
774
|
+
options: { // overrides options
|
775
|
+
|
776
|
+
},
|
777
|
+
container: {
|
778
|
+
object: '<ul id="noty_centerRight_layout_container" />',
|
779
|
+
selector: 'ul#noty_centerRight_layout_container',
|
780
|
+
style: function() {
|
781
|
+
$(this).css({
|
782
|
+
right: 20,
|
783
|
+
position: 'fixed',
|
784
|
+
width: '310px',
|
785
|
+
height: 'auto',
|
786
|
+
margin: 0,
|
787
|
+
padding: 0,
|
788
|
+
listStyleType: 'none',
|
789
|
+
zIndex: 10000000
|
790
|
+
});
|
791
|
+
|
792
|
+
// getting hidden height
|
793
|
+
var dupe = $(this).clone().css({visibility:"hidden", display:"block", position:"absolute", top: 0, left: 0}).attr('id', 'dupe');
|
794
|
+
$("body").append(dupe);
|
795
|
+
dupe.find('.i-am-closing-now').remove();
|
796
|
+
dupe.find('li').css('display', 'block');
|
797
|
+
var actual_height = dupe.height();
|
798
|
+
dupe.remove();
|
799
|
+
|
800
|
+
if ($(this).hasClass('i-am-new')) {
|
801
|
+
$(this).css({
|
802
|
+
top: ($(window).height() - actual_height) / 2 + 'px'
|
803
|
+
});
|
804
|
+
} else {
|
805
|
+
$(this).animate({
|
806
|
+
top: ($(window).height() - actual_height) / 2 + 'px'
|
807
|
+
}, 500);
|
808
|
+
}
|
809
|
+
|
810
|
+
if (window.innerWidth < 600) {
|
811
|
+
$(this).css({
|
812
|
+
right: 5
|
813
|
+
});
|
814
|
+
}
|
815
|
+
|
816
|
+
}
|
817
|
+
},
|
818
|
+
parent: {
|
819
|
+
object: '<li />',
|
820
|
+
selector: 'li',
|
821
|
+
css: {}
|
822
|
+
},
|
823
|
+
css: {
|
824
|
+
display: 'none',
|
825
|
+
width: '310px'
|
826
|
+
},
|
827
|
+
addClass: ''
|
828
|
+
};
|
829
|
+
|
830
|
+
})(jQuery);
|
831
|
+
|
832
|
+
(function($) {
|
833
|
+
|
834
|
+
$.noty.layouts.inline = {
|
835
|
+
name: 'inline',
|
836
|
+
options: {},
|
837
|
+
container: {
|
838
|
+
object: '<ul class="noty_inline_layout_container" />',
|
839
|
+
selector: 'ul.noty_inline_layout_container',
|
840
|
+
style: function() {
|
841
|
+
$(this).css({
|
842
|
+
width: '100%',
|
843
|
+
height: 'auto',
|
844
|
+
margin: 0,
|
845
|
+
padding: 0,
|
846
|
+
listStyleType: 'none',
|
847
|
+
zIndex: 9999999
|
848
|
+
});
|
849
|
+
}
|
850
|
+
},
|
851
|
+
parent: {
|
852
|
+
object: '<li />',
|
853
|
+
selector: 'li',
|
854
|
+
css: {}
|
855
|
+
},
|
856
|
+
css: {
|
857
|
+
display: 'none'
|
858
|
+
},
|
859
|
+
addClass: ''
|
860
|
+
};
|
861
|
+
|
862
|
+
})(jQuery);
|
863
|
+
(function($) {
|
864
|
+
|
865
|
+
$.noty.layouts.top = {
|
866
|
+
name: 'top',
|
867
|
+
options: {},
|
868
|
+
container: {
|
869
|
+
object: '<ul id="noty_top_layout_container" />',
|
870
|
+
selector: 'ul#noty_top_layout_container',
|
871
|
+
style: function() {
|
872
|
+
$(this).css({
|
873
|
+
top: 0,
|
874
|
+
left: '5%',
|
875
|
+
position: 'fixed',
|
876
|
+
width: '90%',
|
877
|
+
height: 'auto',
|
878
|
+
margin: 0,
|
879
|
+
padding: 0,
|
880
|
+
listStyleType: 'none',
|
881
|
+
zIndex: 9999999
|
882
|
+
});
|
883
|
+
}
|
884
|
+
},
|
885
|
+
parent: {
|
886
|
+
object: '<li />',
|
887
|
+
selector: 'li',
|
888
|
+
css: {}
|
889
|
+
},
|
890
|
+
css: {
|
891
|
+
display: 'none'
|
892
|
+
},
|
893
|
+
addClass: ''
|
894
|
+
};
|
895
|
+
|
896
|
+
})(jQuery);
|
897
|
+
(function($) {
|
898
|
+
|
899
|
+
$.noty.layouts.topCenter = {
|
900
|
+
name: 'topCenter',
|
901
|
+
options: { // overrides options
|
902
|
+
|
903
|
+
},
|
904
|
+
container: {
|
905
|
+
object: '<ul id="noty_topCenter_layout_container" />',
|
906
|
+
selector: 'ul#noty_topCenter_layout_container',
|
907
|
+
style: function() {
|
908
|
+
$(this).css({
|
909
|
+
top: 20,
|
910
|
+
left: 0,
|
911
|
+
position: 'fixed',
|
912
|
+
width: '310px',
|
913
|
+
height: 'auto',
|
914
|
+
margin: 0,
|
915
|
+
padding: 0,
|
916
|
+
listStyleType: 'none',
|
917
|
+
zIndex: 10000000
|
918
|
+
});
|
919
|
+
|
920
|
+
$(this).css({
|
921
|
+
left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px'
|
922
|
+
});
|
923
|
+
}
|
924
|
+
},
|
925
|
+
parent: {
|
926
|
+
object: '<li />',
|
927
|
+
selector: 'li',
|
928
|
+
css: {}
|
929
|
+
},
|
930
|
+
css: {
|
931
|
+
display: 'none',
|
932
|
+
width: '310px'
|
933
|
+
},
|
934
|
+
addClass: ''
|
935
|
+
};
|
936
|
+
|
937
|
+
})(jQuery);
|
938
|
+
|
939
|
+
(function($) {
|
940
|
+
|
941
|
+
$.noty.layouts.topLeft = {
|
942
|
+
name: 'topLeft',
|
943
|
+
options: { // overrides options
|
944
|
+
|
945
|
+
},
|
946
|
+
container: {
|
947
|
+
object: '<ul id="noty_topLeft_layout_container" />',
|
948
|
+
selector: 'ul#noty_topLeft_layout_container',
|
949
|
+
style: function() {
|
950
|
+
$(this).css({
|
951
|
+
top: 20,
|
952
|
+
left: 20,
|
953
|
+
position: 'fixed',
|
954
|
+
width: '310px',
|
955
|
+
height: 'auto',
|
956
|
+
margin: 0,
|
957
|
+
padding: 0,
|
958
|
+
listStyleType: 'none',
|
959
|
+
zIndex: 10000000
|
960
|
+
});
|
961
|
+
|
962
|
+
if (window.innerWidth < 600) {
|
963
|
+
$(this).css({
|
964
|
+
left: 5
|
965
|
+
});
|
966
|
+
}
|
967
|
+
}
|
968
|
+
},
|
969
|
+
parent: {
|
970
|
+
object: '<li />',
|
971
|
+
selector: 'li',
|
972
|
+
css: {}
|
973
|
+
},
|
974
|
+
css: {
|
975
|
+
display: 'none',
|
976
|
+
width: '310px'
|
977
|
+
},
|
978
|
+
addClass: ''
|
979
|
+
};
|
980
|
+
|
981
|
+
})(jQuery);
|
982
|
+
(function($) {
|
983
|
+
|
984
|
+
$.noty.layouts.topRight = {
|
985
|
+
name: 'topRight',
|
986
|
+
options: { // overrides options
|
987
|
+
|
988
|
+
},
|
989
|
+
container: {
|
990
|
+
object: '<ul id="noty_topRight_layout_container" />',
|
991
|
+
selector: 'ul#noty_topRight_layout_container',
|
992
|
+
style: function() {
|
993
|
+
$(this).css({
|
994
|
+
top: 20,
|
995
|
+
right: 20,
|
996
|
+
position: 'fixed',
|
997
|
+
width: '310px',
|
998
|
+
height: 'auto',
|
999
|
+
margin: 0,
|
1000
|
+
padding: 0,
|
1001
|
+
listStyleType: 'none',
|
1002
|
+
zIndex: 10000000
|
1003
|
+
});
|
1004
|
+
|
1005
|
+
if (window.innerWidth < 600) {
|
1006
|
+
$(this).css({
|
1007
|
+
right: 5
|
1008
|
+
});
|
1009
|
+
}
|
1010
|
+
}
|
1011
|
+
},
|
1012
|
+
parent: {
|
1013
|
+
object: '<li />',
|
1014
|
+
selector: 'li',
|
1015
|
+
css: {}
|
1016
|
+
},
|
1017
|
+
css: {
|
1018
|
+
display: 'none',
|
1019
|
+
width: '310px'
|
1020
|
+
},
|
1021
|
+
addClass: ''
|
1022
|
+
};
|
1023
|
+
|
1024
|
+
})(jQuery);
|
1025
|
+
(function($) {
|
1026
|
+
|
1027
|
+
$.noty.themes.defaultTheme = {
|
1028
|
+
name: 'defaultTheme',
|
1029
|
+
helpers: {
|
1030
|
+
borderFix: function() {
|
1031
|
+
if (this.options.dismissQueue) {
|
1032
|
+
var selector = this.options.layout.container.selector + ' ' + this.options.layout.parent.selector;
|
1033
|
+
switch (this.options.layout.name) {
|
1034
|
+
case 'top':
|
1035
|
+
$(selector).css({borderRadius: '0px 0px 0px 0px'});
|
1036
|
+
$(selector).last().css({borderRadius: '0px 0px 5px 5px'}); break;
|
1037
|
+
case 'topCenter': case 'topLeft': case 'topRight':
|
1038
|
+
case 'bottomCenter': case 'bottomLeft': case 'bottomRight':
|
1039
|
+
case 'center': case 'centerLeft': case 'centerRight': case 'inline':
|
1040
|
+
$(selector).css({borderRadius: '0px 0px 0px 0px'});
|
1041
|
+
$(selector).first().css({'border-top-left-radius': '5px', 'border-top-right-radius': '5px'});
|
1042
|
+
$(selector).last().css({'border-bottom-left-radius': '5px', 'border-bottom-right-radius': '5px'}); break;
|
1043
|
+
case 'bottom':
|
1044
|
+
$(selector).css({borderRadius: '0px 0px 0px 0px'});
|
1045
|
+
$(selector).first().css({borderRadius: '5px 5px 0px 0px'}); break;
|
1046
|
+
default: break;
|
1047
|
+
}
|
1048
|
+
}
|
1049
|
+
}
|
1050
|
+
},
|
1051
|
+
modal: {
|
1052
|
+
css: {
|
1053
|
+
position: 'fixed',
|
1054
|
+
width: '100%',
|
1055
|
+
height: '100%',
|
1056
|
+
backgroundColor: '#000',
|
1057
|
+
zIndex: 10000,
|
1058
|
+
opacity: 0.6,
|
1059
|
+
display: 'none',
|
1060
|
+
left: 0,
|
1061
|
+
top: 0
|
1062
|
+
}
|
1063
|
+
},
|
1064
|
+
style: function() {
|
1065
|
+
|
1066
|
+
this.$bar.css({
|
1067
|
+
overflow: 'hidden',
|
1068
|
+
background: "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAoCAYAAAAPOoFWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAPZJREFUeNq81tsOgjAMANB2ov7/7ypaN7IlIwi9rGuT8QSc9EIDAsAznxvY4pXPKr05RUE5MEVB+TyWfCEl9LZApYopCmo9C4FKSMtYoI8Bwv79aQJU4l6hXXCZrQbokJEksxHo9KMOgc6w1atHXM8K9DVC7FQnJ0i8iK3QooGgbnyKgMDygBWyYFZoqx4qS27KqLZJjA1D0jK6QJcYEQEiWv9PGkTsbqxQ8oT+ZtZB6AkdsJnQDnMoHXHLGKOgDYuCWmYhEERCI5gaamW0bnHdA3k2ltlIN+2qKRyCND0bhqSYCyTB3CAOc4WusBEIpkeBuPgJMAAX8Hs1NfqHRgAAAABJRU5ErkJggg==') repeat-x scroll left top #fff"
|
1069
|
+
});
|
1070
|
+
|
1071
|
+
this.$message.css({
|
1072
|
+
fontSize: '13px',
|
1073
|
+
lineHeight: '16px',
|
1074
|
+
textAlign: 'center',
|
1075
|
+
padding: '8px 10px 9px',
|
1076
|
+
width: 'auto',
|
1077
|
+
position: 'relative'
|
1078
|
+
});
|
1079
|
+
|
1080
|
+
this.$closeButton.css({
|
1081
|
+
position: 'absolute',
|
1082
|
+
top: 4, right: 4,
|
1083
|
+
width: 10, height: 10,
|
1084
|
+
background: "url(data:image/png;base64,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)",
|
1085
|
+
display: 'none',
|
1086
|
+
cursor: 'pointer'
|
1087
|
+
});
|
1088
|
+
|
1089
|
+
this.$buttons.css({
|
1090
|
+
padding: 5,
|
1091
|
+
textAlign: 'right',
|
1092
|
+
borderTop: '1px solid #ccc',
|
1093
|
+
backgroundColor: '#fff'
|
1094
|
+
});
|
1095
|
+
|
1096
|
+
this.$buttons.find('button').css({
|
1097
|
+
marginLeft: 5
|
1098
|
+
});
|
1099
|
+
|
1100
|
+
this.$buttons.find('button:first').css({
|
1101
|
+
marginLeft: 0
|
1102
|
+
});
|
1103
|
+
|
1104
|
+
this.$bar.bind({
|
1105
|
+
mouseenter: function() { $(this).find('.noty_close').stop().fadeTo('normal',1); },
|
1106
|
+
mouseleave: function() { $(this).find('.noty_close').stop().fadeTo('normal',0); }
|
1107
|
+
});
|
1108
|
+
|
1109
|
+
switch (this.options.layout.name) {
|
1110
|
+
case 'top':
|
1111
|
+
this.$bar.css({
|
1112
|
+
borderRadius: '0px 0px 5px 5px',
|
1113
|
+
borderBottom: '2px solid #eee',
|
1114
|
+
borderLeft: '2px solid #eee',
|
1115
|
+
borderRight: '2px solid #eee',
|
1116
|
+
boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
|
1117
|
+
});
|
1118
|
+
break;
|
1119
|
+
case 'topCenter': case 'center': case 'bottomCenter': case 'inline':
|
1120
|
+
this.$bar.css({
|
1121
|
+
borderRadius: '5px',
|
1122
|
+
border: '1px solid #eee',
|
1123
|
+
boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
|
1124
|
+
});
|
1125
|
+
this.$message.css({fontSize: '13px', textAlign: 'center'});
|
1126
|
+
break;
|
1127
|
+
case 'topLeft': case 'topRight':
|
1128
|
+
case 'bottomLeft': case 'bottomRight':
|
1129
|
+
case 'centerLeft': case 'centerRight':
|
1130
|
+
this.$bar.css({
|
1131
|
+
borderRadius: '5px',
|
1132
|
+
border: '1px solid #eee',
|
1133
|
+
boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
|
1134
|
+
});
|
1135
|
+
this.$message.css({fontSize: '13px', textAlign: 'left'});
|
1136
|
+
break;
|
1137
|
+
case 'bottom':
|
1138
|
+
this.$bar.css({
|
1139
|
+
borderRadius: '5px 5px 0px 0px',
|
1140
|
+
borderTop: '2px solid #eee',
|
1141
|
+
borderLeft: '2px solid #eee',
|
1142
|
+
borderRight: '2px solid #eee',
|
1143
|
+
boxShadow: "0 -2px 4px rgba(0, 0, 0, 0.1)"
|
1144
|
+
});
|
1145
|
+
break;
|
1146
|
+
default:
|
1147
|
+
this.$bar.css({
|
1148
|
+
border: '2px solid #eee',
|
1149
|
+
boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
|
1150
|
+
});
|
1151
|
+
break;
|
1152
|
+
}
|
1153
|
+
|
1154
|
+
switch (this.options.type) {
|
1155
|
+
case 'alert': case 'notification':
|
1156
|
+
this.$bar.css({backgroundColor: '#FFF', borderColor: '#CCC', color: '#444'}); break;
|
1157
|
+
case 'warning':
|
1158
|
+
this.$bar.css({backgroundColor: '#FFEAA8', borderColor: '#FFC237', color: '#826200'});
|
1159
|
+
this.$buttons.css({borderTop: '1px solid #FFC237'}); break;
|
1160
|
+
case 'error':
|
1161
|
+
this.$bar.css({backgroundColor: 'red', borderColor: 'darkred', color: '#FFF'});
|
1162
|
+
this.$message.css({fontWeight: 'bold'});
|
1163
|
+
this.$buttons.css({borderTop: '1px solid darkred'}); break;
|
1164
|
+
case 'information':
|
1165
|
+
this.$bar.css({backgroundColor: '#57B7E2', borderColor: '#0B90C4', color: '#FFF'});
|
1166
|
+
this.$buttons.css({borderTop: '1px solid #0B90C4'}); break;
|
1167
|
+
case 'success':
|
1168
|
+
this.$bar.css({backgroundColor: 'lightgreen', borderColor: '#50C24E', color: 'darkgreen'});
|
1169
|
+
this.$buttons.css({borderTop: '1px solid #50C24E'});break;
|
1170
|
+
default:
|
1171
|
+
this.$bar.css({backgroundColor: '#FFF', borderColor: '#CCC', color: '#444'}); break;
|
1172
|
+
}
|
1173
|
+
},
|
1174
|
+
callback: {
|
1175
|
+
onShow: function() { $.noty.themes.defaultTheme.helpers.borderFix.apply(this); },
|
1176
|
+
onClose: function() { $.noty.themes.defaultTheme.helpers.borderFix.apply(this); }
|
1177
|
+
}
|
1178
|
+
};
|
1179
|
+
|
1180
|
+
})(jQuery);
|