keppler 2.1.18 → 2.1.19
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -6
- data/installer/core/.rspec +1 -0
- data/installer/core/Gemfile +2 -0
- data/installer/core/Gemfile.lock +3 -0
- data/installer/core/app/assets/stylesheets/admin/utils/_theme.scss +9 -0
- data/installer/core/app/controllers/admin/admin_controller.rb +7 -3
- data/installer/core/app/controllers/admin/settings_controller.rb +17 -17
- data/installer/core/app/controllers/application_controller.rb +1 -0
- data/installer/core/app/controllers/devise/keppler_sessions_controller.rb +116 -0
- data/installer/core/app/helpers/sessions_helper.rb +12 -0
- data/installer/core/app/views/admin/layouts/_navigation.html.haml +1 -1
- data/installer/core/app/views/admin/layouts/_sidebar.html.haml +4 -1
- data/installer/core/app/views/admin/settings/fields/_appearance.html.haml +0 -8
- data/installer/core/app/views/admin/settings/fields/_configuration.html.haml +28 -0
- data/installer/core/app/views/devise/keppler_sessions/new.html.haml +35 -0
- data/installer/core/app/views/errors/internal_server_error.html.haml +1 -1
- data/installer/core/app/views/errors/not_found.html.haml +1 -1
- data/installer/core/app/views/errors/unprocessable.html.haml +1 -1
- data/installer/core/config/application.rb +1 -1
- data/installer/core/config/initializers/keppler_configuration.rb +1 -1
- data/installer/core/config/locales/en.yml +3 -1
- data/installer/core/config/locales/es.yml +3 -1
- data/installer/core/config/routes.rb +14 -4
- data/installer/core/db/migrate/20160201210520_create_appearances.rb +1 -0
- data/installer/core/db/seeds.rb +0 -56
- data/installer/core/node_modules/.yarn-integrity +12 -0
- data/installer/core/public/assets/.sprockets-manifest-877f022ba780399cd6a445cb823e8e72.json +1 -0
- data/installer/core/public/assets/admin/application-58d3091abebccc0cbdc30400232e382b2b1af77adf19a8b0b7f1176d04e3e5e9.js +69621 -0
- data/installer/core/public/assets/admin/application-58d3091abebccc0cbdc30400232e382b2b1af77adf19a8b0b7f1176d04e3e5e9.js.gz +0 -0
- data/installer/core/public/assets/admin/application-b27fef8a9a1ff72bcdcc99542bef8dc3a0e5dabce87889ccfa6f292de2f80d7a.css +35768 -0
- data/installer/core/public/assets/admin/application-b27fef8a9a1ff72bcdcc99542bef8dc3a0e5dabce87889ccfa6f292de2f80d7a.css.gz +0 -0
- data/{testing-with-2.1.18/app/assets/images/admin/astronauta_keppler.svg → installer/core/public/assets/admin/astronauta_keppler-d82d3870b4df83d706e62601ee8bcdbf226ce7ca7928602d4de1055a95a8b751.svg} +0 -0
- data/installer/core/public/assets/admin/astronauta_keppler-d82d3870b4df83d706e62601ee8bcdbf226ce7ca7928602d4de1055a95a8b751.svg.gz +0 -0
- data/{testing-with-2.1.18/app/assets/images/admin/avatar_keppler.svg → installer/core/public/assets/admin/avatar_keppler-1bce561c65816623b43025321fc59c2bdab4800bac6e7e000ecfe471f105865a.svg} +0 -0
- data/installer/core/public/assets/admin/avatar_keppler-1bce561c65816623b43025321fc59c2bdab4800bac6e7e000ecfe471f105865a.svg.gz +0 -0
- data/{testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/css/gss.html → installer/core/public/assets/admin/codemirror/mode/css/gss-c9fc3e7b6f68e62e1d26819c29c1be5beb597140fd8141293549385c79222d98.html} +0 -0
- data/installer/core/public/assets/admin/codemirror/mode/css/gss-c9fc3e7b6f68e62e1d26819c29c1be5beb597140fd8141293549385c79222d98.html.gz +0 -0
- data/{testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/css/index.html → installer/core/public/assets/admin/codemirror/mode/css/index-1408e496c4871b6ab739e26b9f3dceaa8ef071aebce27d37c2f504a7f8033ccd.html} +0 -0
- data/installer/core/public/assets/admin/codemirror/mode/css/index-1408e496c4871b6ab739e26b9f3dceaa8ef071aebce27d37c2f504a7f8033ccd.html.gz +0 -0
- data/{testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/css/less.html → installer/core/public/assets/admin/codemirror/mode/css/less-f7c3a9cfe1b5f3135f2e01037e9020d50b9c23103b8065514095fbbdea4e0764.html} +0 -0
- data/installer/core/public/assets/admin/codemirror/mode/css/less-f7c3a9cfe1b5f3135f2e01037e9020d50b9c23103b8065514095fbbdea4e0764.html.gz +0 -0
- data/{testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/css/scss.html → installer/core/public/assets/admin/codemirror/mode/css/scss-bad8aebefd205cd2e6eae3abbed6ffc808bbe7e7eea75acb9b1586ef2a762b3f.html} +0 -0
- data/installer/core/public/assets/admin/codemirror/mode/css/scss-bad8aebefd205cd2e6eae3abbed6ffc808bbe7e7eea75acb9b1586ef2a762b3f.html.gz +0 -0
- data/{testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/haml/index.html → installer/core/public/assets/admin/codemirror/mode/haml/index-c6fc029a6ab99692007433b79e187d25c3e779645d0cf1039dda43bc983d5022.html} +0 -0
- data/installer/core/public/assets/admin/codemirror/mode/haml/index-c6fc029a6ab99692007433b79e187d25c3e779645d0cf1039dda43bc983d5022.html.gz +0 -0
- data/{testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/htmlembedded/index.html → installer/core/public/assets/admin/codemirror/mode/htmlembedded/index-5f63fdda0414dad66a9837d592767325f553a21a4a44d6dc29e8b9183fde838a.html} +0 -0
- data/installer/core/public/assets/admin/codemirror/mode/htmlembedded/index-5f63fdda0414dad66a9837d592767325f553a21a4a44d6dc29e8b9183fde838a.html.gz +0 -0
- data/{testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/htmlmixed/index.html → installer/core/public/assets/admin/codemirror/mode/htmlmixed/index-461cc2868fa06065c0443310e03fb947d324bcc31c13cb5b8b5b3ed30a10ebe6.html} +0 -0
- data/installer/core/public/assets/admin/codemirror/mode/htmlmixed/index-461cc2868fa06065c0443310e03fb947d324bcc31c13cb5b8b5b3ed30a10ebe6.html.gz +0 -0
- data/{testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/javascript/index.html → installer/core/public/assets/admin/codemirror/mode/javascript/index-bd3eb54016a0d4bba846aa86a8dd5f451459f02c0a09352094b3d974ddabd6c3.html} +0 -0
- data/installer/core/public/assets/admin/codemirror/mode/javascript/index-bd3eb54016a0d4bba846aa86a8dd5f451459f02c0a09352094b3d974ddabd6c3.html.gz +0 -0
- data/{testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/javascript/json-ld.html → installer/core/public/assets/admin/codemirror/mode/javascript/json-ld-ac787941ea8a1b871daf68054ca196a99d05cd6873587d4b62586aff9fb92452.html} +0 -0
- data/installer/core/public/assets/admin/codemirror/mode/javascript/json-ld-ac787941ea8a1b871daf68054ca196a99d05cd6873587d4b62586aff9fb92452.html.gz +0 -0
- data/{testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/javascript/typescript.html → installer/core/public/assets/admin/codemirror/mode/javascript/typescript-f930148de0b8380ee4b3ca765c56c7b21e40b935a97cd1de75aa1b60843aa8b5.html} +0 -0
- data/installer/core/public/assets/admin/codemirror/mode/javascript/typescript-f930148de0b8380ee4b3ca765c56c7b21e40b935a97cd1de75aa1b60843aa8b5.html.gz +0 -0
- data/{testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/ruby/index.html → installer/core/public/assets/admin/codemirror/mode/ruby/index-00f454d5eff4cef18448d1b8a0052595272d1414c208fb346222ab81eaef1d5a.html} +0 -0
- data/installer/core/public/assets/admin/codemirror/mode/ruby/index-00f454d5eff4cef18448d1b8a0052595272d1414c208fb346222ab81eaef1d5a.html.gz +0 -0
- data/{testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/vue/index.html → installer/core/public/assets/admin/codemirror/mode/vue/index-72d3f8d8f5146bcd0f56166eb47299eee5f32fd150d7e4afac48dc4778105bea.html} +0 -0
- data/installer/core/public/assets/admin/codemirror/mode/vue/index-72d3f8d8f5146bcd0f56166eb47299eee5f32fd150d7e4afac48dc4778105bea.html.gz +0 -0
- data/{testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/xml/index.html → installer/core/public/assets/admin/codemirror/mode/xml/index-d4700b1f6a65957d38cd05e178d099b0bbe200309a5d54172d797ce99dd4a247.html} +0 -0
- data/installer/core/public/assets/admin/codemirror/mode/xml/index-d4700b1f6a65957d38cd05e178d099b0bbe200309a5d54172d797ce99dd4a247.html.gz +0 -0
- data/{testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/yaml-frontmatter/index.html → installer/core/public/assets/admin/codemirror/mode/yaml-frontmatter/index-7350bfe40ce807d0846efe10b17607190bfc8b75229866679c553e12ebf54f79.html} +0 -0
- data/installer/core/public/assets/admin/codemirror/mode/yaml-frontmatter/index-7350bfe40ce807d0846efe10b17607190bfc8b75229866679c553e12ebf54f79.html.gz +0 -0
- data/{testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/yaml/index.html → installer/core/public/assets/admin/codemirror/mode/yaml/index-f998ecd3cffb4f8f1b0d8fcff32462681f7ea38e59bd66599ccd789d3d8b638f.html} +0 -0
- data/installer/core/public/assets/admin/codemirror/mode/yaml/index-f998ecd3cffb4f8f1b0d8fcff32462681f7ea38e59bd66599ccd789d3d8b638f.html.gz +0 -0
- data/{testing-with-2.1.18/app/assets/images/admin/en.png → installer/core/public/assets/admin/en-04d44fc02de55acae6c442daaa08250b16d7698cb5f20a7b79ffff7429b46b77.png} +0 -0
- data/{testing-with-2.1.18/app/assets/images/admin/es.png → installer/core/public/assets/admin/es-50df0dad9e0d73050da6cb012b273ded096ab4c25daa332a8c1514c8feb2e38d.png} +0 -0
- data/{testing-with-2.1.18/app/assets/images/admin/favicon.png → installer/core/public/assets/admin/favicon-8502ac8dee08af63f06b51ba4bfe7d73ad822453cd728df71ea061669dfda46d.png} +0 -0
- data/{testing-with-2.1.18/app/assets/stylesheets/admin/fonts-and-icons/ZXuke1cDvLCKLDcimxB44_lu.woff2 → installer/core/public/assets/admin/fonts-and-icons/ZXuke1cDvLCKLDcimxB44_lu-930d66533ab5afb83f852c6e3ae10a1bacc46e97dfd92ddcb905b5556205d677.woff2} +0 -0
- data/{testing-with-2.1.18/app/assets/stylesheets/admin/fonts-and-icons/fonts/Simple-Line-Icons.woff2 → installer/core/public/assets/admin/fonts-and-icons/fonts/Simple-Line-Icons-104673f4859604362a18fc6294197d8fffb8cb24ad3211e92eb04f655e18cf4a.woff2} +0 -0
- data/{testing-with-2.1.18/app/assets/stylesheets/admin/fonts-and-icons/fonts/Simple-Line-Icons.woff → installer/core/public/assets/admin/fonts-and-icons/fonts/Simple-Line-Icons-14b825d7785bf7f90bab8b02c6df6f22863c639cab02038a8ba3e682ab7d2752.woff} +0 -0
- data/{testing-with-2.1.18/app/assets/stylesheets/admin/fonts-and-icons/fonts/Simple-Line-Icons.eot → installer/core/public/assets/admin/fonts-and-icons/fonts/Simple-Line-Icons-1c823013a692818b26ad756540fcb73f53bfb3409af0d08129bb340c9c5c8a1f.eot} +0 -0
- data/installer/core/public/assets/admin/fonts-and-icons/fonts/Simple-Line-Icons-1c823013a692818b26ad756540fcb73f53bfb3409af0d08129bb340c9c5c8a1f.eot.gz +0 -0
- data/{testing-with-2.1.18/app/assets/stylesheets/admin/fonts-and-icons/fonts/Simple-Line-Icons.ttf → installer/core/public/assets/admin/fonts-and-icons/fonts/Simple-Line-Icons-3f501ddb05c70829bbb51cfe9ca9fff57f39e060457c257b3ccf25df767f0870.ttf} +0 -0
- data/installer/core/public/assets/admin/fonts-and-icons/fonts/Simple-Line-Icons-3f501ddb05c70829bbb51cfe9ca9fff57f39e060457c257b3ccf25df767f0870.ttf.gz +0 -0
- data/{testing-with-2.1.18/app/assets/stylesheets/admin/fonts-and-icons/fonts/boxicons.svg → installer/core/public/assets/admin/fonts-and-icons/fonts/boxicons-04e91e102f037f44d5fab187d1c120bdfe2029357c7e19957ec8ab284174668a.svg} +0 -0
- data/installer/core/public/assets/admin/fonts-and-icons/fonts/boxicons-04e91e102f037f44d5fab187d1c120bdfe2029357c7e19957ec8ab284174668a.svg.gz +0 -0
- data/{testing-with-2.1.18/app/assets/stylesheets/admin/fonts-and-icons/fonts/boxicons.woff → installer/core/public/assets/admin/fonts-and-icons/fonts/boxicons-34b356ebfc024ecb1f42ecc4020ce1f9e0e40dfa569de7e24db7ff746774f904.woff} +0 -0
- data/{testing-with-2.1.18/app/assets/stylesheets/admin/fonts-and-icons/fonts/boxicons.woff2 → installer/core/public/assets/admin/fonts-and-icons/fonts/boxicons-4db228a5fbed38f7046bcecafb5839a49b39756b48c4bec7a4c13d44ccb41b91.woff2} +0 -0
- data/{testing-with-2.1.18/app/assets/stylesheets/admin/fonts-and-icons/fonts/boxicons.eot → installer/core/public/assets/admin/fonts-and-icons/fonts/boxicons-8a68af92eea95d1698739c0d390c8c73228b622b91f6e3170f19e765a8e8979b.eot} +0 -0
- data/installer/core/public/assets/admin/fonts-and-icons/fonts/boxicons-8a68af92eea95d1698739c0d390c8c73228b622b91f6e3170f19e765a8e8979b.eot.gz +0 -0
- data/{testing-with-2.1.18/app/assets/stylesheets/admin/fonts-and-icons/fonts/boxicons.ttf → installer/core/public/assets/admin/fonts-and-icons/fonts/boxicons-db138c828adc2a31e6cfbb64188dd079eeef577131fd4bd138c4d566dd00b6bb.ttf} +0 -0
- data/installer/core/public/assets/admin/fonts-and-icons/fonts/boxicons-db138c828adc2a31e6cfbb64188dd079eeef577131fd4bd138c4d566dd00b6bb.ttf.gz +0 -0
- data/{testing-with-2.1.18/app/assets/images/admin/image_default.png → installer/core/public/assets/admin/image_default-be1d557511976c97715fc6215fc6c861f00a86c33654ef2ded273027182168b9.png} +0 -0
- data/{testing-with-2.1.18/app/assets/images/admin/logo.png → installer/core/public/assets/admin/logo-6fc9f869f19a13f29ea006362e0a3be5fdf2c37c144a0ccac184c8e4b1e9bb28.png} +0 -0
- data/{testing-with-2.1.18/app/assets/images/admin/logo2.png → installer/core/public/assets/admin/logo2-0b42a0f73a5f567a52100fea42cd88764a90ace1f2b0b76df3fdaca41a960421.png} +0 -0
- data/{testing-with-2.1.18/app/assets/images/admin/profile-menu.jpg → installer/core/public/assets/admin/profile-menu-6222ad8e7c653f9216519a7ae99e072e38d6b7435a397648d9beb10678e11f40.jpg} +0 -0
- data/{testing-with-2.1.18/app/assets/images/admin/search.png → installer/core/public/assets/admin/search-1ad39e363da0eb5ec86508ea61bd7c1198aad27e35c9f083466bda731c30f62d.png} +0 -0
- data/{testing-with-2.1.18/app/assets/images/admin/slice.png → installer/core/public/assets/admin/slice-fdba819c5f7aac1c10620c1c7d8e1e9bae109765ff1e0cabce2f57400b6169bf.png} +0 -0
- data/{testing-with-2.1.18/app/assets/images/admin/slice-icon.png → installer/core/public/assets/admin/slice-icon-54a0271ab483f5ed561a4f9e608bbc07ff76ad142d7462e9853f7c8cc1e39ad3.png} +0 -0
- data/{testing-with-2.1.18/app/assets/images/admin/slice-icon-orange.png → installer/core/public/assets/admin/slice-icon-orange-7cdaf53dd3ec3822fe4d7e266766d2527d7f0e95fad681b3b38e000c80eca26f.png} +0 -0
- data/{testing-with-2.1.18/app/assets/images/admin/slice_white.png → installer/core/public/assets/admin/slice_white-3396dde6fa31d2140341e38bfe39044f9f087294373fb75c53b1284387e0ac88.png} +0 -0
- data/installer/core/public/assets/adminlte/dist/img/boxed-bg-5487391fa5db6155709522886beebc00fd7433ffb7ae5f63e585497cd5174ae5.jpg +0 -0
- data/{testing-with-2.1.18/app/assets/images/app/Cohete_nubes_new.png → installer/core/public/assets/app/Cohete_nubes_new-6222ad8e7c653f9216519a7ae99e072e38d6b7435a397648d9beb10678e11f40.png} +0 -0
- data/{testing-with-2.1.18/app/assets/images/app/Home_Keppler.png → installer/core/public/assets/app/Home_Keppler-2f69e6ff6073f785b8253e9fc23dfd06b210881bb611bdb8915c2d07993b90f6.png} +0 -0
- data/{testing-with-2.1.18/app/assets/images/app/Home_Keppler2.png → installer/core/public/assets/app/Home_Keppler2-09a96f8ea6f6ed972ce18747f308d02859c6bb076ab62812e2857389df8f3fab.png} +0 -0
- data/installer/core/public/assets/app/application-168cc167d8c7a14d11da39286d8f0fe13d50a6675e7da90a99ecad8abc962530.css +17575 -0
- data/installer/core/public/assets/app/application-168cc167d8c7a14d11da39286d8f0fe13d50a6675e7da90a99ecad8abc962530.css.gz +0 -0
- data/installer/core/public/assets/app/application-7feb58fe1bdf49525dc81b13cefa58ede1b6878f950febf6cf36cd51ff988445.js +19866 -0
- data/installer/core/public/assets/app/application-7feb58fe1bdf49525dc81b13cefa58ede1b6878f950febf6cf36cd51ff988445.js.gz +0 -0
- data/{testing-with-2.1.18/app/assets/images/app/fondo.svg → installer/core/public/assets/app/fondo-0cace9dce98e106c6911a3eda205eba6a535965900043d7b803a9d178ea28c08.svg} +0 -0
- data/installer/core/public/assets/app/fondo-0cace9dce98e106c6911a3eda205eba6a535965900043d7b803a9d178ea28c08.svg.gz +0 -0
- data/{testing-with-2.1.18/app/assets/images/app/keppler-front.png → installer/core/public/assets/app/keppler-front-a4b24e51b3249bc6cc06f3fd4b17cab6af17018629ec1110b14f6f769749a78e.png} +0 -0
- data/{testing-with-2.1.18/app/assets/images/app/slice.png → installer/core/public/assets/app/slice-fdba819c5f7aac1c10620c1c7d8e1e9bae109765ff1e0cabce2f57400b6169bf.png} +0 -0
- data/{testing-with-2.1.18/app/assets/images/app/slice-front.png → installer/core/public/assets/app/slice-front-366ab15723861e1b74139461053806b21c5d6e9d5f52baa24fd399fdbea23d70.png} +0 -0
- data/installer/core/public/assets/bootstrap/glyphicons-halflings-regular-13634da87d9e23f8c3ed9108ce1724d183a39ad072e73e1b3d8cbf646d2d0407.eot +0 -0
- data/installer/core/public/assets/bootstrap/glyphicons-halflings-regular-13634da87d9e23f8c3ed9108ce1724d183a39ad072e73e1b3d8cbf646d2d0407.eot.gz +0 -0
- data/installer/core/public/assets/bootstrap/glyphicons-halflings-regular-42f60659d265c1a3c30f9fa42abcbb56bd4a53af4d83d316d6dd7a36903c43e5.svg +288 -0
- data/installer/core/public/assets/bootstrap/glyphicons-halflings-regular-42f60659d265c1a3c30f9fa42abcbb56bd4a53af4d83d316d6dd7a36903c43e5.svg.gz +0 -0
- data/installer/core/public/assets/bootstrap/glyphicons-halflings-regular-a26394f7ede100ca118eff2eda08596275a9839b959c226e15439557a5a80742.woff +0 -0
- data/installer/core/public/assets/bootstrap/glyphicons-halflings-regular-e395044093757d82afcb138957d06a1ea9361bdcf0b442d06a18a8051af57456.ttf +0 -0
- data/installer/core/public/assets/bootstrap/glyphicons-halflings-regular-e395044093757d82afcb138957d06a1ea9361bdcf0b442d06a18a8051af57456.ttf.gz +0 -0
- data/installer/core/public/assets/bootstrap/glyphicons-halflings-regular-fe185d11a49676890d47bb783312a0cda5a44c4039214094e7957b4c040ef11c.woff2 +0 -0
- data/installer/core/public/assets/ckeditor/adapters/jquery-1bc59ef62f52859422f96a481de8476c38bbecff7aa6301fc6732261f659bcd2.js +11 -0
- data/installer/core/public/assets/ckeditor/adapters/jquery-1bc59ef62f52859422f96a481de8476c38bbecff7aa6301fc6732261f659bcd2.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/adapters/jquery.js +11 -0
- data/installer/core/public/assets/ckeditor/adapters/jquery.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/application-42636d4067159a70cb5dd3c8f994ed4ed06ea1914f40348f715fd344ac1f5c30.css +225 -0
- data/installer/core/public/assets/ckeditor/application-42636d4067159a70cb5dd3c8f994ed4ed06ea1914f40348f715fd344ac1f5c30.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/application-56a1c7231485c7ea14ed14a767c7fc8d7cfc133308e31300f9751430a78dec38.js +2221 -0
- data/installer/core/public/assets/ckeditor/application-56a1c7231485c7ea14ed14a767c7fc8d7cfc133308e31300f9751430a78dec38.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/application.css +225 -0
- data/installer/core/public/assets/ckeditor/application.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/application.js +2221 -0
- data/installer/core/public/assets/ckeditor/application.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/ckeditor-5627b7c5975c03aa8c738623a75f40df11e006c51dad749183c4ced4ea4906a1.js +1185 -0
- data/installer/core/public/assets/ckeditor/ckeditor-5627b7c5975c03aa8c738623a75f40df11e006c51dad749183c4ced4ea4906a1.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/ckeditor.js +1185 -0
- data/installer/core/public/assets/ckeditor/ckeditor.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/config-6728244dac0c5efcd52dd3415680536b746da4ebc863f0d7322891e465c36303.js +131 -0
- data/installer/core/public/assets/ckeditor/config-6728244dac0c5efcd52dd3415680536b746da4ebc863f0d7322891e465c36303.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/config.js +131 -0
- data/installer/core/public/assets/ckeditor/config.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/contents-2f984ad78c3fcc0586386f0850c78bc6a6e6e9c6aac695464eb1a3f04eaebe6f.css +209 -0
- data/installer/core/public/assets/ckeditor/contents-2f984ad78c3fcc0586386f0850c78bc6a6e6e9c6aac695464eb1a3f04eaebe6f.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/contents.css +209 -0
- data/installer/core/public/assets/ckeditor/contents.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/filebrowser/gal_add-e97dc0969bf9a7b88d048bcc2e4eb28a2f9ae75763e7076b4c68ee2e7de3ea05.png +0 -0
- data/installer/core/public/assets/ckeditor/filebrowser/gal_add.png +0 -0
- data/installer/core/public/assets/ckeditor/filebrowser/gal_del-5103ec7de60473f8c5bafa0208257dca3a993edb783a766666edbc606fd6c531.png +0 -0
- data/installer/core/public/assets/ckeditor/filebrowser/gal_del.png +0 -0
- data/installer/core/public/assets/ckeditor/filebrowser/gal_more-93d8887361f4dd7f757c20a186a2dae6e5cc6698da238814eacbff7b19a43f51.gif +0 -0
- data/installer/core/public/assets/ckeditor/filebrowser/gal_more.gif +0 -0
- data/installer/core/public/assets/ckeditor/filebrowser/javascripts/application-6eb1266221a129c66ba8976527279e7539746e3c5f6b1af3faf7b5a9d013d4e4.js +230 -0
- data/installer/core/public/assets/ckeditor/filebrowser/javascripts/application-6eb1266221a129c66ba8976527279e7539746e3c5f6b1af3faf7b5a9d013d4e4.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/filebrowser/javascripts/application.js +230 -0
- data/installer/core/public/assets/ckeditor/filebrowser/javascripts/application.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/filebrowser/preloader-3799a3e41d7787a31dac5796ebccc242951da2f2b57eb088326ab3bffe15056a.gif +0 -0
- data/installer/core/public/assets/ckeditor/filebrowser/preloader.gif +0 -0
- data/installer/core/public/assets/ckeditor/init-08a73ffab1aded8d16921075e0580e3cc58665718ea81934dda19cbffad54c85.js +1193 -0
- data/installer/core/public/assets/ckeditor/init-08a73ffab1aded8d16921075e0580e3cc58665718ea81934dda19cbffad54c85.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/init.js +1193 -0
- data/installer/core/public/assets/ckeditor/init.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/a11yhelp/dialogs/a11yhelp-d2d45b8c2f3c6c181ac56ba1634ace1359a5c95ee916124a8a25b085b7959265.js +11 -0
- data/installer/core/public/assets/ckeditor/plugins/a11yhelp/dialogs/a11yhelp-d2d45b8c2f3c6c181ac56ba1634ace1359a5c95ee916124a8a25b085b7959265.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +11 -0
- data/installer/core/public/assets/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/about/dialogs/about-2bdd60f2936ccd80435dc740622f8cc5bee4363ceb8f6c103e46d596d21ef6d0.js +9 -0
- data/installer/core/public/assets/ckeditor/plugins/about/dialogs/about-2bdd60f2936ccd80435dc740622f8cc5bee4363ceb8f6c103e46d596d21ef6d0.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/about/dialogs/about.js +9 -0
- data/installer/core/public/assets/ckeditor/plugins/about/dialogs/about.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor-227a0aade8e648c3ab3977ce9e66b9491baa9aa7376082c652fdb76230adffdd.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/about/dialogs/logo_ckeditor-954605bb634dae9f4d15ca33057d86eb62e34ae3bc57dfd5877b6d3356067413.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/colordialog/dialogs/colordialog-1b0cfd23c7a4ee7ea1d35cda8d1ca84b06fffcde7b0d1da676d02af65c1a4e06.css +21 -0
- data/installer/core/public/assets/ckeditor/plugins/colordialog/dialogs/colordialog-1b0cfd23c7a4ee7ea1d35cda8d1ca84b06fffcde7b0d1da676d02af65c1a4e06.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/colordialog/dialogs/colordialog-e44136d492cbbfbb392ac90a85baa6e0cc18c328a285d05212e8dadccb0babaf.js +15 -0
- data/installer/core/public/assets/ckeditor/plugins/colordialog/dialogs/colordialog-e44136d492cbbfbb392ac90a85baa6e0cc18c328a285d05212e8dadccb0babaf.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/colordialog/dialogs/colordialog.css +21 -0
- data/installer/core/public/assets/ckeditor/plugins/colordialog/dialogs/colordialog.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/colordialog/dialogs/colordialog.js +15 -0
- data/installer/core/public/assets/ckeditor/plugins/colordialog/dialogs/colordialog.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/copyformatting/styles/copyformatting-ac599201edee5f6b9414f171c626d6aa70650a5795b31d95d12d31265f6304be.css +46 -0
- data/installer/core/public/assets/ckeditor/plugins/copyformatting/styles/copyformatting-ac599201edee5f6b9414f171c626d6aa70650a5795b31d95d12d31265f6304be.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/copyformatting/styles/copyformatting.css +46 -0
- data/installer/core/public/assets/ckeditor/plugins/copyformatting/styles/copyformatting.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/dialog/dialogDefinition-9ed0fdac536bfa3fa926464f908080b7fd109c847998a496fa5d930b2d05104a.js +6 -0
- data/installer/core/public/assets/ckeditor/plugins/dialog/dialogDefinition-9ed0fdac536bfa3fa926464f908080b7fd109c847998a496fa5d930b2d05104a.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/dialog/dialogDefinition.js +6 -0
- data/installer/core/public/assets/ckeditor/plugins/dialog/dialogDefinition.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/div/dialogs/div-a39822a3b267ec2ea02d7b23b134682ec663c6e3051fb0a13333577b81e3db6f.js +9 -0
- data/installer/core/public/assets/ckeditor/plugins/div/dialogs/div-a39822a3b267ec2ea02d7b23b134682ec663c6e3051fb0a13333577b81e3db6f.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/div/dialogs/div.js +9 -0
- data/installer/core/public/assets/ckeditor/plugins/div/dialogs/div.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/find/dialogs/find-b0230f4d5a23db0546f7c786f5e6870c1d9d876765568eb94ebacbdb56a4c487.js +26 -0
- data/installer/core/public/assets/ckeditor/plugins/find/dialogs/find-b0230f4d5a23db0546f7c786f5e6870c1d9d876765568eb94ebacbdb56a4c487.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/find/dialogs/find.js +26 -0
- data/installer/core/public/assets/ckeditor/plugins/find/dialogs/find.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/flash/dialogs/flash-46239716a5ebaecdf30e3e5090799649eb83b04da46b43e65cb360532babe11a.js +25 -0
- data/installer/core/public/assets/ckeditor/plugins/flash/dialogs/flash-46239716a5ebaecdf30e3e5090799649eb83b04da46b43e65cb360532babe11a.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/flash/dialogs/flash.js +25 -0
- data/installer/core/public/assets/ckeditor/plugins/flash/dialogs/flash.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/flash/images/placeholder-3693431ff1695c9691d5b29bed1c2e30be843edb77bc45ef25effe3eb776a7d9.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/flash/images/placeholder.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/forms/dialogs/button-9581cee2c5ee9dba2e2616ac53d9dce7945360ad19133ff778be15df144cace0.js +9 -0
- data/installer/core/public/assets/ckeditor/plugins/forms/dialogs/button-9581cee2c5ee9dba2e2616ac53d9dce7945360ad19133ff778be15df144cace0.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/forms/dialogs/button.js +9 -0
- data/installer/core/public/assets/ckeditor/plugins/forms/dialogs/button.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/forms/dialogs/checkbox-0147ed57721bca0ee1aaf044bd3c1f499ccb40e8ec3fd07f0588e75485df3203.js +10 -0
- data/installer/core/public/assets/ckeditor/plugins/forms/dialogs/checkbox-0147ed57721bca0ee1aaf044bd3c1f499ccb40e8ec3fd07f0588e75485df3203.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/forms/dialogs/checkbox.js +10 -0
- data/installer/core/public/assets/ckeditor/plugins/forms/dialogs/checkbox.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/forms/dialogs/form-0e934aa82a0bbc58ae59a095fe6567c81117d677d83d3b6eaa89dbfc2ac9f6aa.js +9 -0
- data/installer/core/public/assets/ckeditor/plugins/forms/dialogs/form-0e934aa82a0bbc58ae59a095fe6567c81117d677d83d3b6eaa89dbfc2ac9f6aa.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/forms/dialogs/form.js +9 -0
- data/installer/core/public/assets/ckeditor/plugins/forms/dialogs/form.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/forms/dialogs/hiddenfield-9ff5458874521e288a588e929811578a4158e0fe6b01a1125cc57451ea271c80.js +8 -0
- data/installer/core/public/assets/ckeditor/plugins/forms/dialogs/hiddenfield-9ff5458874521e288a588e929811578a4158e0fe6b01a1125cc57451ea271c80.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/forms/dialogs/hiddenfield.js +8 -0
- data/installer/core/public/assets/ckeditor/plugins/forms/dialogs/hiddenfield.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/forms/dialogs/radio-3fcb2e4bb22edd35f3d96b9de1be6e765ede73a84ab5a09e678c51b714fac982.js +10 -0
- data/installer/core/public/assets/ckeditor/plugins/forms/dialogs/radio-3fcb2e4bb22edd35f3d96b9de1be6e765ede73a84ab5a09e678c51b714fac982.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/forms/dialogs/radio.js +10 -0
- data/installer/core/public/assets/ckeditor/plugins/forms/dialogs/radio.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/forms/dialogs/select-51f77cb58f50119b7b267838d07edd5d4a65a65a6b68c4fa42eca9656879b38b.js +21 -0
- data/installer/core/public/assets/ckeditor/plugins/forms/dialogs/select-51f77cb58f50119b7b267838d07edd5d4a65a65a6b68c4fa42eca9656879b38b.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/forms/dialogs/select.js +21 -0
- data/installer/core/public/assets/ckeditor/plugins/forms/dialogs/select.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/forms/dialogs/textarea-03c78985cc9239c079ed579a0dfe380d0ad4d33d71561a9cb4a19bc2fe807455.js +9 -0
- data/installer/core/public/assets/ckeditor/plugins/forms/dialogs/textarea-03c78985cc9239c079ed579a0dfe380d0ad4d33d71561a9cb4a19bc2fe807455.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/forms/dialogs/textarea.js +9 -0
- data/installer/core/public/assets/ckeditor/plugins/forms/dialogs/textarea.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/forms/dialogs/textfield-0a8d256c89b72b596af1bbdfe7deafa9ea59909f157e6e9fc01808191423900a.js +12 -0
- data/installer/core/public/assets/ckeditor/plugins/forms/dialogs/textfield-0a8d256c89b72b596af1bbdfe7deafa9ea59909f157e6e9fc01808191423900a.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/forms/dialogs/textfield.js +12 -0
- data/installer/core/public/assets/ckeditor/plugins/forms/dialogs/textfield.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/forms/images/hiddenfield-2314846c5b4071dec60aaa00f5a1bb10496adcfc1f084eb84a76ff2280b00aee.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/forms/images/hiddenfield.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/icons-af6217b63920631c6dd9914678b77fdd11a6e04a2dd72fe154015f52d646476e.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/icons.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/icons_hidpi-be1786d2965715aa5c3d777a477d1f295a634dcf93128b57b46718c5518e82bd.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/icons_hidpi.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/iframe/dialogs/iframe-6769eb441c58bb1ce49b56ca8051ae0bc0472f6b51292d87a872ded0ee2d7aff.js +11 -0
- data/installer/core/public/assets/ckeditor/plugins/iframe/dialogs/iframe-6769eb441c58bb1ce49b56ca8051ae0bc0472f6b51292d87a872ded0ee2d7aff.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/iframe/dialogs/iframe.js +11 -0
- data/installer/core/public/assets/ckeditor/plugins/iframe/dialogs/iframe.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/iframe/images/placeholder-992092e4bcca197097e9fe917441f710b8ef07b9450705ecd514eb8789384d76.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/iframe/images/placeholder.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/image/dialogs/image-701dfe8cd31d930125d5992f3c3e48525d2cf02f8260c898aef60aa03dbc309b.js +45 -0
- data/installer/core/public/assets/ckeditor/plugins/image/dialogs/image-701dfe8cd31d930125d5992f3c3e48525d2cf02f8260c898aef60aa03dbc309b.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/image/dialogs/image.js +45 -0
- data/installer/core/public/assets/ckeditor/plugins/image/dialogs/image.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/image/images/noimage-bd8c0e93d7bc89b0c36085672424fe2f698dac0e680a1b278f00a152579f2a93.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/image/images/noimage.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/link/dialogs/anchor-8a72aeec75103ff7c347c2667da52dc7d1a7885be7c2703dae714d643901bc93.js +9 -0
- data/installer/core/public/assets/ckeditor/plugins/link/dialogs/anchor-8a72aeec75103ff7c347c2667da52dc7d1a7885be7c2703dae714d643901bc93.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/link/dialogs/anchor.js +9 -0
- data/installer/core/public/assets/ckeditor/plugins/link/dialogs/anchor.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/link/dialogs/link-4a63a2521e2df045d7ce9b3cd6c3950124503dfe550153275b53eb5cab2b2857.js +29 -0
- data/installer/core/public/assets/ckeditor/plugins/link/dialogs/link-4a63a2521e2df045d7ce9b3cd6c3950124503dfe550153275b53eb5cab2b2857.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/link/dialogs/link.js +29 -0
- data/installer/core/public/assets/ckeditor/plugins/link/dialogs/link.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/link/images/anchor-cddc8927dfdd672d655b96b551ba1ad1599c5f13d13deb2b09a28b54c853a25c.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/link/images/anchor.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/link/images/hidpi/anchor-b5b952c9dbf47ff88b4904b99cf673cf6ec94cd65f4c66b55eaea5dbb911f4db.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/liststyle/dialogs/liststyle-3ea7426e423ac3a17f484b67e9d06c488676c3184e859ff3358b8b6a02cd2f10.js +11 -0
- data/installer/core/public/assets/ckeditor/plugins/liststyle/dialogs/liststyle-3ea7426e423ac3a17f484b67e9d06c488676c3184e859ff3358b8b6a02cd2f10.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/liststyle/dialogs/liststyle.js +11 -0
- data/installer/core/public/assets/ckeditor/plugins/liststyle/dialogs/liststyle.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/magicline/images/hidpi/icon-92dfb414e7a31e632288097db347e272ecfd001f9825423a16c623dcaeb968b8.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/magicline/images/hidpi/icon-rtl-4046986f6904328c9d470b44c95f1f50ef82d9e470915ea471e1f4dcc0f06618.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/magicline/images/hidpi/icon-rtl.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/magicline/images/hidpi/icon.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/magicline/images/icon-db2f77571f3e9cb69096a5da21af65b0eacf5eaef08492bb831999504a3e115a.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/magicline/images/icon-rtl-9510f6245b266712f0ec4159e5fc5a97e1ad5c667e65b7fb97c5d1f20cfd7ba5.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/magicline/images/icon-rtl.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/magicline/images/icon.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/pagebreak/images/pagebreak-5db8cbdaf997d012baa522bb75816a70c9ca15017fc170d63392b74958198846.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/pastefromword/filter/default-553673a5f77556fe9dcea80c6c9773b770f23f93f5a2bce2b08248f2229e7384.js +53 -0
- data/installer/core/public/assets/ckeditor/plugins/pastefromword/filter/default-553673a5f77556fe9dcea80c6c9773b770f23f93f5a2bce2b08248f2229e7384.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/pastefromword/filter/default.js +53 -0
- data/installer/core/public/assets/ckeditor/plugins/pastefromword/filter/default.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/preview/preview-9dd8bdcb9cdf799986eca2803b6a463e05eee76007a8d81d97116876ea0f6685.html +13 -0
- data/installer/core/public/assets/ckeditor/plugins/preview/preview-9dd8bdcb9cdf799986eca2803b6a463e05eee76007a8d81d97116876ea0f6685.html.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/preview/preview.html +13 -0
- data/installer/core/public/assets/ckeditor/plugins/preview/preview.html.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/scayt/dialogs/dialog-75e0679953e586ffac55af12700c15b9a4b7d49765103c16fd8943c24162bf0c.css +23 -0
- data/installer/core/public/assets/ckeditor/plugins/scayt/dialogs/dialog-75e0679953e586ffac55af12700c15b9a4b7d49765103c16fd8943c24162bf0c.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/scayt/dialogs/dialog.css +23 -0
- data/installer/core/public/assets/ckeditor/plugins/scayt/dialogs/dialog.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/scayt/dialogs/options-9a2090b658e9048617ef46bda16cd14009c4f51cc427babbabddb75aadc4c50a.js +32 -0
- data/installer/core/public/assets/ckeditor/plugins/scayt/dialogs/options-9a2090b658e9048617ef46bda16cd14009c4f51cc427babbabddb75aadc4c50a.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/scayt/dialogs/options.js +32 -0
- data/installer/core/public/assets/ckeditor/plugins/scayt/dialogs/options.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/scayt/dialogs/toolbar-e66191abbfc4b5e5e6291bf4d4cacb4e074bb8d94457ff5384b3f18e72195a2c.css +71 -0
- data/installer/core/public/assets/ckeditor/plugins/scayt/dialogs/toolbar-e66191abbfc4b5e5e6291bf4d4cacb4e074bb8d94457ff5384b3f18e72195a2c.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/scayt/dialogs/toolbar.css +71 -0
- data/installer/core/public/assets/ckeditor/plugins/scayt/dialogs/toolbar.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/scayt/skins/moono-lisa/scayt-94465f8a7abf4da8295e0fa93a60eba1287830dfc41e3698fb3d20091b95d58c.css +25 -0
- data/installer/core/public/assets/ckeditor/plugins/scayt/skins/moono-lisa/scayt-94465f8a7abf4da8295e0fa93a60eba1287830dfc41e3698fb3d20091b95d58c.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/scayt/skins/moono-lisa/scayt.css +25 -0
- data/installer/core/public/assets/ckeditor/plugins/scayt/skins/moono-lisa/scayt.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/showblocks/images/block_address-d896b164eb70e2a22f0521131188b185bb7e404d6e0a0d0f55d11d585d28caa3.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/showblocks/images/block_address.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/showblocks/images/block_blockquote-30d5929384e0a68850cd667f70779b8464b6f2b1bececf01526eda3e2b191073.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/showblocks/images/block_div-34ea88912f128e162de10370b7eadd91e7a0c07f8728693494c1479e95525f56.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/showblocks/images/block_div.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/showblocks/images/block_h1-40d4a2cd8e2737607867d95948972475ff478e0efaf510cbf17a52b511ef0fc3.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/showblocks/images/block_h2-6e3acd9cd6b16dcfce92ade07cb8a8d1929103f3a9a7dcd83c49cc52ec72cdea.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/showblocks/images/block_h3-3d26b01e2687763a9a00205d749fc9991de1a75f3f346a3dec473ce2141b693a.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/showblocks/images/block_h4-5c6807bb4bb7024c89b8364b5dd0f20ef1961e924db31fa338b39998b677a3f0.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/showblocks/images/block_h5-148c02c6a115c4d568604f72126dfe2e27ee8ca3a6a4a7d7ae72b2523e27db77.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/showblocks/images/block_h6-85384f22c9128004409679694aeb38ba858ca77fa0f85ef52a61b8f289191df5.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/showblocks/images/block_p-68e9e5a80bed810ad2bd0fc9273756fcdb7e7b940fa52cc19a38911ca50ee4f3.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/showblocks/images/block_p.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/showblocks/images/block_pre-4168bf89d34fac97391bffbd82339ee79125edf2c6d50c153f3fc30efbf536c8.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/dialogs/smiley-c7ccf0ced2d6ffd277f834016347e2ab35d9e4aa5c18716055895e56634f0da8.js +12 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/dialogs/smiley-c7ccf0ced2d6ffd277f834016347e2ab35d9e4aa5c18716055895e56634f0da8.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/dialogs/smiley.js +12 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/dialogs/smiley.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/angel_smile-7b227fc3a29cb0a99e105bbf5065c6086d744bfd8a79b1511bf43184aaf3a0b9.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/angel_smile-8e2aaced8635d70dff8eb5a269cb2ff071115b965cfea30f31275f3aea88529a.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/angel_smile.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/angry_smile-aeb431608cf1496216f2c94995d7d568481e32e3cc075e45f12a66a303d2e29d.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/angry_smile-b4fc95418415fe8999f252649af9541c8f77234f57abc2cf8ee99abd56cc19e3.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/angry_smile.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/broken_heart-4e8286aacd60df65e9995d8f2afaf4666fc0b0c3be935c441700b5e572e75c5a.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/broken_heart-7a2005c6a4ee561393b6bb9e37dd0a0080b837f2dc938b10ec7ae305a9681825.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/broken_heart.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/confused_smile-09953a3738bd6df32e93261f32aa9b8300a05fdd24445f501f55ac468659ef66.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/confused_smile-2de21fd594b102ab9ed8cd4e5b005c45c4e2ff34bf30e5dacea437a959162d6e.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/confused_smile.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/cry_smile-7bd254c99e3ff1d1f3e1a832b1564f3e47f9cbdf54f3fca73a91525912ddb38e.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/cry_smile-a2d235ad7d007a6f80c920cbd5e85006a2a42c39e178691e29babe96a03e3d63.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/cry_smile.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/devil_smile-2bc850da71b5f9b78a3ed26f03f08869a825e2b40d3e50e2442307361a39dc9f.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/devil_smile-d433e5ef97e9fe9c73b2e36f1a9be76171fa1f4d2464789a1fe440387495dd6c.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/devil_smile.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/embaressed_smile-d185a4f35865a517a60dce3cdf73bf92a800d1f7a3a2fabdbded4625b465678d.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/embarrassed_smile-ce9a77bf015b4c90b27312f4214684460fde4d2d805d44ddc1871082334d3432.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/embarrassed_smile-d185a4f35865a517a60dce3cdf73bf92a800d1f7a3a2fabdbded4625b465678d.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/embarrassed_smile.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/embarrassed_smile.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/envelope-0f1546e9abb9b5bc1cf37b2da74606800cb12b64f001553e7fb5ade49df4d29c.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/envelope-489cf811c9835fef32e06696e3893093f9cda5520b5eac65855bb00fa13e804b.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/envelope.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/envelope.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/heart-4cf4c3ab6c1b894d721b59b2acb0686c832bab5bb03192471ac6548a4bddf92b.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/heart-fd3b59c7dd52b24ee0614169ff7a06ce1b2a6d49fa7098aecbb9f7c4197107e7.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/heart.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/heart.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/kiss-21c801e1e6371e57bdba6ecb16609a627c75a4ec294f9580a03ff498c3099c66.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/kiss-f142944550a855cb698db1d35723e56ce063c8a6a8088a5dfbe99c62b9a00856.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/kiss.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/kiss.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/lightbulb-98347f12145eb2987104a5e04bb78ce8f2a154a1347e422f66327d0def3fc75d.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/lightbulb-ac296632601de086f7aff2c97cbc123dd6a589a2031d1524a28d6222fb005668.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/lightbulb.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/omg_smile-628c7bb0d4386f901c2690e5a9ad90ee3e9252ef49a7a708f672b9cbb81aa43b.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/omg_smile-a4ebdb8d59ff587b38a762fa4c97ab7a5fd585d7b0722bb503884f8961e45917.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/omg_smile.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/regular_smile-7eb86259f47ef5faf89ccbb9648ba0e93d4e9c48588509048f97156634aac3fb.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/regular_smile-8d3049e853d5fab5e1de160f471649edb6b0d9ffbf791d390d1c2152838ad2c3.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/regular_smile.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/sad_smile-34b38077abd9f18ecaad2fa65b3158d61465462875592c4ba62b9a12bf154caf.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/sad_smile-aa4692a6fdec3f45f0eb55243c3371e01bab3fc04d61715b6a9171e70b72e257.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/sad_smile.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/shades_smile-8af43d1ee5729b8f6e14f831a63fa64430ad54be488c7a57e0da0f45789bc64d.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/shades_smile-9fd924ea50cb2915ce2863ac5576409b37d9ba9cc7b33832ad3e3b963b2df02c.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/shades_smile.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/teeth_smile-ab4d093812a347b70126ac79e0cfc16cae45c1d32fd4437da99b2ea22311c0d6.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/teeth_smile-b1f571f9a46641a3cfb78e3319faa37dcb685bc69ed45dfbea3e1e1fd3b71b1f.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/teeth_smile.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/thumbs_down-571de749810a2b8c5ee078a30be1c872eefb933c5e2a8c33ded5b304787e7ebe.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/thumbs_down-ec8d8c4a49a38597888bee7971c49b25355d1b8ae59a1c6d224608ee7112055d.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/thumbs_down.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/thumbs_up-26ac57c9f26ec725511c7c97a9e0e005aa46710311033eb3f5f23ba355f80cc7.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/thumbs_up-b6359e23c088a020df03ab8e0cd7a5046a3954736426c3cf8370210afc1496cb.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/thumbs_up.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/tongue_smile-9c9ad82d7fdf34d3aef1c92ec4001146348bd4405c9b9252e21047c12a30b5d3.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/tongue_smile-e638c648ca78900b2c8f82156604dd8b46ed0cdaef4095e09277583e6f730e3e.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/tongue_smile.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/tongue_smile.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/tounge_smile-e638c648ca78900b2c8f82156604dd8b46ed0cdaef4095e09277583e6f730e3e.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/whatchutalkingabout_smile-305e959c2c304a31a052a60ac972df52fdb7819945a10a3a1a1f1a7ee5fecf57.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/whatchutalkingabout_smile-e2a8446ea58800515e9e27a49e56518a8b05597df32b2a10d998f6380f293f2b.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/wink_smile-3ec65841e54db291aa0335c7c2083451f7cb92062744ed8831e08e9660d45ec3.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/wink_smile-95de89ce230bc6cbdb5d7881bf9f646e1a0935ca59e5a1ba43526637e1af3d6a.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/smiley/images/wink_smile.png +0 -0
- data/installer/core/public/assets/ckeditor/plugins/specialchar/dialogs/specialchar-5b811b917affecbd45c75c2563627f3204f4958e99fdfeef387ce3c98b61adc0.js +15 -0
- data/installer/core/public/assets/ckeditor/plugins/specialchar/dialogs/specialchar-5b811b917affecbd45c75c2563627f3204f4958e99fdfeef387ce3c98b61adc0.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/specialchar/dialogs/specialchar.js +15 -0
- data/installer/core/public/assets/ckeditor/plugins/specialchar/dialogs/specialchar.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/table/dialogs/table-f41e0d83975bd104aff05dbb326fc62a31e1cef27d7abc0046f9e3e1489d3593.js +22 -0
- data/installer/core/public/assets/ckeditor/plugins/table/dialogs/table-f41e0d83975bd104aff05dbb326fc62a31e1cef27d7abc0046f9e3e1489d3593.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/table/dialogs/table.js +22 -0
- data/installer/core/public/assets/ckeditor/plugins/table/dialogs/table.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/tableselection/styles/tableselection-9792b2b1cd17c57ba2adc876d7e2c2bcb474f5876bb18c07fbd757970f8765d7.css +32 -0
- data/installer/core/public/assets/ckeditor/plugins/tableselection/styles/tableselection-9792b2b1cd17c57ba2adc876d7e2c2bcb474f5876bb18c07fbd757970f8765d7.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/tableselection/styles/tableselection.css +32 -0
- data/installer/core/public/assets/ckeditor/plugins/tableselection/styles/tableselection.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/tabletools/dialogs/tableCell-c3bfee31e5a4a1cf6af2b49e3a9570d528d1e4872dcb74b9504419fadba32fbf.js +18 -0
- data/installer/core/public/assets/ckeditor/plugins/tabletools/dialogs/tableCell-c3bfee31e5a4a1cf6af2b49e3a9570d528d1e4872dcb74b9504419fadba32fbf.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/tabletools/dialogs/tableCell.js +18 -0
- data/installer/core/public/assets/ckeditor/plugins/tabletools/dialogs/tableCell.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/templates/dialogs/templates-1ef0039fb16321fd4389611090d375cf5f53ec651054b494d1182521413d44e5.js +11 -0
- data/installer/core/public/assets/ckeditor/plugins/templates/dialogs/templates-1ef0039fb16321fd4389611090d375cf5f53ec651054b494d1182521413d44e5.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/templates/dialogs/templates-f6ec2ac3c08326b52ae312f0262d4503118dae4d2d8778f85bf20ff2497ea089.css +85 -0
- data/installer/core/public/assets/ckeditor/plugins/templates/dialogs/templates-f6ec2ac3c08326b52ae312f0262d4503118dae4d2d8778f85bf20ff2497ea089.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/templates/dialogs/templates.css +85 -0
- data/installer/core/public/assets/ckeditor/plugins/templates/dialogs/templates.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/templates/dialogs/templates.js +11 -0
- data/installer/core/public/assets/ckeditor/plugins/templates/dialogs/templates.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/templates/templates/default-5700a967e02c2de4bb41ded64f8db4d87bd73c4a4441e6e0d04e0941b3b2e6d1.js +8 -0
- data/installer/core/public/assets/ckeditor/plugins/templates/templates/default-5700a967e02c2de4bb41ded64f8db4d87bd73c4a4441e6e0d04e0941b3b2e6d1.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/templates/templates/default.js +8 -0
- data/installer/core/public/assets/ckeditor/plugins/templates/templates/default.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/templates/templates/images/template1-0e5b3ea58bdf1ccf7f8aa1d50c86e03832d0e89056f266b1e938e4872f298a1b.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/templates/templates/images/template2-3f7cea1cac236e2732feb9eb9f7e5e70bb4b05eced144fc90ebbbce9856c1ddf.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/templates/templates/images/template3-91987500818e6fa63f868eea61db15178180a11ef09eebd87a295722590efe05.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
- data/installer/core/public/assets/ckeditor/plugins/wsc/dialogs/ciframe-bbc1f85ed681f80c12a29fc6e390fe3259fc127faadd7a1ab87cc6acf13705f3.html +66 -0
- data/installer/core/public/assets/ckeditor/plugins/wsc/dialogs/ciframe-bbc1f85ed681f80c12a29fc6e390fe3259fc127faadd7a1ab87cc6acf13705f3.html.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/wsc/dialogs/ciframe.html +66 -0
- data/installer/core/public/assets/ckeditor/plugins/wsc/dialogs/ciframe.html.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/wsc/dialogs/tmpFrameset-8edad96824ed6e6687bc150fc92ba749e0cd55c4f4de53434568e2ece1e2b999.html +52 -0
- data/installer/core/public/assets/ckeditor/plugins/wsc/dialogs/tmpFrameset-8edad96824ed6e6687bc150fc92ba749e0cd55c4f4de53434568e2ece1e2b999.html.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +52 -0
- data/installer/core/public/assets/ckeditor/plugins/wsc/dialogs/tmpFrameset.html.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/wsc/dialogs/wsc-43418d6b5efe142c0ea4e864a56974f317d2cac650defd437703587ef2bf83d4.js +93 -0
- data/installer/core/public/assets/ckeditor/plugins/wsc/dialogs/wsc-43418d6b5efe142c0ea4e864a56974f317d2cac650defd437703587ef2bf83d4.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/wsc/dialogs/wsc-e31787ec9d2b04cbd4a6183923949e0dfda6a3bf104656c1f344c71fdfa4875c.css +83 -0
- data/installer/core/public/assets/ckeditor/plugins/wsc/dialogs/wsc-e31787ec9d2b04cbd4a6183923949e0dfda6a3bf104656c1f344c71fdfa4875c.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/wsc/dialogs/wsc.css +83 -0
- data/installer/core/public/assets/ckeditor/plugins/wsc/dialogs/wsc.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/wsc/dialogs/wsc.js +93 -0
- data/installer/core/public/assets/ckeditor/plugins/wsc/dialogs/wsc.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/wsc/dialogs/wsc_ie-dba8afec87a67f0e0a39f3882c952d25e228b6228d0be03f157be65e1e272167.js +12 -0
- data/installer/core/public/assets/ckeditor/plugins/wsc/dialogs/wsc_ie-dba8afec87a67f0e0a39f3882c952d25e228b6228d0be03f157be65e1e272167.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/wsc/dialogs/wsc_ie.js +12 -0
- data/installer/core/public/assets/ckeditor/plugins/wsc/dialogs/wsc_ie.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/wsc/skins/moono-lisa/wsc-a0fc7fe1ba275090a93038c52950ddb538963b336f0009f4c6efd1722717404f.css +43 -0
- data/installer/core/public/assets/ckeditor/plugins/wsc/skins/moono-lisa/wsc-a0fc7fe1ba275090a93038c52950ddb538963b336f0009f4c6efd1722717404f.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/plugins/wsc/skins/moono-lisa/wsc.css +43 -0
- data/installer/core/public/assets/ckeditor/plugins/wsc/skins/moono-lisa/wsc.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/dialog-7d4bb724b744f9985fe8fe77929477041cbb2b9b32933fd6377599e2b6fecefb.css +6 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/dialog-7d4bb724b744f9985fe8fe77929477041cbb2b9b32933fd6377599e2b6fecefb.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/dialog.css +6 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/dialog.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/dialog_ie-eb563326b8654de4304b0d42250b1a8aef0d8ebeda3190b3dbd4d14e287b5d7a.css +6 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/dialog_ie-eb563326b8654de4304b0d42250b1a8aef0d8ebeda3190b3dbd4d14e287b5d7a.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/dialog_ie.css +6 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/dialog_ie.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/dialog_ie8-2d4df01d6ffaf95a014c2e7a84f4a1c4282e389256b2a46baf78c03e6a48b8d4.css +6 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/dialog_ie8-2d4df01d6ffaf95a014c2e7a84f4a1c4282e389256b2a46baf78c03e6a48b8d4.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/dialog_ie8.css +6 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/dialog_ie8.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/dialog_iequirks-56c1ac096674ca2ffa96415f097d6e811c0fcd18d26249d3551341c353e4d5f6.css +6 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/dialog_iequirks-56c1ac096674ca2ffa96415f097d6e811c0fcd18d26249d3551341c353e4d5f6.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/dialog_iequirks.css +6 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/dialog_iequirks.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/editor-a642f516332c0923ce5b04aef2b8ae2f0deb7baf7964f88c72fd2ebb919ca946.css +6 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/editor-a642f516332c0923ce5b04aef2b8ae2f0deb7baf7964f88c72fd2ebb919ca946.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/editor.css +6 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/editor.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/editor_gecko-f55d1d265c00d459a9d53b74e6683dae3f6246b1e664532fb9efe2b8aec9d83a.css +6 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/editor_gecko-f55d1d265c00d459a9d53b74e6683dae3f6246b1e664532fb9efe2b8aec9d83a.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/editor_gecko.css +6 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/editor_gecko.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/editor_ie-87bccbf693180cf4489c2c7a89ee6dba186a9f87d8b40944c1cb8263666384b6.css +6 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/editor_ie-87bccbf693180cf4489c2c7a89ee6dba186a9f87d8b40944c1cb8263666384b6.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/editor_ie.css +6 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/editor_ie.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/editor_ie8-724e651f2ca9cb5f5c10f6735053214218fc93bf29b530c7915aa071f354df8f.css +6 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/editor_ie8-724e651f2ca9cb5f5c10f6735053214218fc93bf29b530c7915aa071f354df8f.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/editor_ie8.css +6 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/editor_ie8.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/editor_iequirks-fa8825aeccb20dd5c1779a1fc12f536d2e07d8973ee8d238d30c47f245ae751d.css +6 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/editor_iequirks-fa8825aeccb20dd5c1779a1fc12f536d2e07d8973ee8d238d30c47f245ae751d.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/editor_iequirks.css +6 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/editor_iequirks.css.gz +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/icons-af6217b63920631c6dd9914678b77fdd11a6e04a2dd72fe154015f52d646476e.png +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/icons.png +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/icons_hidpi-be1786d2965715aa5c3d777a477d1f295a634dcf93128b57b46718c5518e82bd.png +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/icons_hidpi.png +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/images/arrow-b2277bbb26fff842ebf687d4e0db0011c97ce2ad5150e20ebd63cd15a2c9550b.png +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/images/arrow.png +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/images/close-0d5aab99d91cdf9451203c690d1b681efac0e247873137c2e4b254f5eaed0250.png +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/images/close.png +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/images/hidpi/close-31ca8328e53f548322e8d6cb9b889e1fe6d918e3f944910b905a3c3a9b97f616.png +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/images/hidpi/close.png +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/images/hidpi/lock-590115a32954f2bf27bdad510aa986ab4790616b3838ed840d36707c37d2e549.png +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/images/hidpi/lock-open-0f89da48392084c2b92f1184b20cd15a82b00f76369619827f0c256e4d064a84.png +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/images/hidpi/lock-open.png +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/images/hidpi/lock.png +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/images/hidpi/refresh-0afa815ccda8e98ab0c53b7f84405e7af5926a2f674f294ab7e0636eab8d59bc.png +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/images/hidpi/refresh.png +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/images/lock-591538a3e1c27b0666fbea0e16e5fd35c37824711bf843bd42e692886cd34a87.png +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/images/lock-open-76f7cea49f5c9c3a33ebe05a241e5278530887fe7669529a04accf237ef491ae.png +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/images/lock-open.png +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/images/lock.png +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/images/refresh-908ab5420bc35b3dbb1408cba105349ba1f47334ca98be08d0607410353d033a.png +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/images/refresh.png +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/images/spinner-fe605d83531314abeaec1f47b43c86a4a48c86e3f332ad01b5a9ed2558b8b41f.gif +0 -0
- data/installer/core/public/assets/ckeditor/skins/moono-lisa/images/spinner.gif +0 -0
- data/installer/core/public/assets/ckeditor/styles-97df3adaaae4178d12a212fad062f011c569a42c836a1c558fc7d751a46f3fc4.js +137 -0
- data/installer/core/public/assets/ckeditor/styles-97df3adaaae4178d12a212fad062f011c569a42c836a1c558fc7d751a46f3fc4.js.gz +0 -0
- data/installer/core/public/assets/ckeditor/styles.js +137 -0
- data/installer/core/public/assets/ckeditor/styles.js.gz +0 -0
- data/installer/core/public/assets/errors/application-5bedab1af7243cbddbac6a3bfdb855848f031688fdf0f923ea0432fdc62b76f2.js +117 -0
- data/installer/core/public/assets/errors/application-5bedab1af7243cbddbac6a3bfdb855848f031688fdf0f923ea0432fdc62b76f2.js.gz +0 -0
- data/installer/core/public/assets/errors/application-b2440acdfe3667a77a6858d9dbc123740884b45cc4870f4ad52b831d16ffac97.css +187 -0
- data/installer/core/public/assets/errors/application-b2440acdfe3667a77a6858d9dbc123740884b45cc4870f4ad52b831d16ffac97.css.gz +0 -0
- data/installer/core/public/assets/font-awesome/fa-brands-400-15fe80489bf95e94ba22be4084a11dcf5ff3c631fa8ded2051c0f99f08895f52.svg +1011 -0
- data/installer/core/public/assets/font-awesome/fa-brands-400-15fe80489bf95e94ba22be4084a11dcf5ff3c631fa8ded2051c0f99f08895f52.svg.gz +0 -0
- data/installer/core/public/assets/font-awesome/fa-brands-400-8c507886294992429a98e9382dd1557ef1e7d4a45d6a7bbffa9771e839190c23.ttf +0 -0
- data/installer/core/public/assets/font-awesome/fa-brands-400-8c507886294992429a98e9382dd1557ef1e7d4a45d6a7bbffa9771e839190c23.ttf.gz +0 -0
- data/installer/core/public/assets/font-awesome/fa-brands-400-9ae2326c389ddbc93a2636b121456333152931549bd5bd16a5cd2ee24e601c16.woff2 +0 -0
- data/installer/core/public/assets/font-awesome/fa-brands-400-a25479bdac618c6b4f32a3f60bedee6b4fe759db1500c790eab5f94fdeb59f92.woff +0 -0
- data/installer/core/public/assets/font-awesome/fa-brands-400-b9c345f4fa1349aea117ed753492783a632513f2dd75dc86942cfbc630c84d05.eot +0 -0
- data/installer/core/public/assets/font-awesome/fa-brands-400-b9c345f4fa1349aea117ed753492783a632513f2dd75dc86942cfbc630c84d05.eot.gz +0 -0
- data/installer/core/public/assets/font-awesome/fa-regular-400-33a8657a09af038500733bdaf969d8928b48475f26020cc35ca7193a53fcbedc.eot +0 -0
- data/installer/core/public/assets/font-awesome/fa-regular-400-33a8657a09af038500733bdaf969d8928b48475f26020cc35ca7193a53fcbedc.eot.gz +0 -0
- data/installer/core/public/assets/font-awesome/fa-regular-400-75e64a952613e7f6cdc74628f8bf85206db9a75cc1926ffccb8f1caade2e4db7.svg +366 -0
- data/installer/core/public/assets/font-awesome/fa-regular-400-75e64a952613e7f6cdc74628f8bf85206db9a75cc1926ffccb8f1caade2e4db7.svg.gz +0 -0
- data/installer/core/public/assets/font-awesome/fa-regular-400-b2bb708d78f9ce7490251f676f8f8f6dadc7e8d7e4b3d1ab560a4c1130b0c460.woff2 +0 -0
- data/installer/core/public/assets/font-awesome/fa-regular-400-c25d1ee715f6ca69202404165aa0942709ff14d1bd99f9df5b124522d42077ef.ttf +0 -0
- data/installer/core/public/assets/font-awesome/fa-regular-400-c25d1ee715f6ca69202404165aa0942709ff14d1bd99f9df5b124522d42077ef.ttf.gz +0 -0
- data/installer/core/public/assets/font-awesome/fa-regular-400-e4d56ba6fcd7b99e7e83ee13aa2cecbf6391bc9965d18f43a13bec2957ecd851.woff +0 -0
- data/installer/core/public/assets/font-awesome/fa-solid-900-08f7874f8336b47e49d9719c38cea16cdea6362962f5001db3f2d0bb47332357.woff2 +0 -0
- data/installer/core/public/assets/font-awesome/fa-solid-900-31bb4aa00b5293474c3d74e67a316442a8de04a5331edb3e9e11349b7355fcec.eot +0 -0
- data/installer/core/public/assets/font-awesome/fa-solid-900-31bb4aa00b5293474c3d74e67a316442a8de04a5331edb3e9e11349b7355fcec.eot.gz +0 -0
- data/installer/core/public/assets/font-awesome/fa-solid-900-54997dacd19dcdad4bffdda880c9aa9268ef52281ab39fb0d17b7ba7618a49a6.svg +1644 -0
- data/installer/core/public/assets/font-awesome/fa-solid-900-54997dacd19dcdad4bffdda880c9aa9268ef52281ab39fb0d17b7ba7618a49a6.svg.gz +0 -0
- data/installer/core/public/assets/font-awesome/fa-solid-900-7cf25b1d45ac4436b575e86dcafdd37efc5faeab3bdad3144a9af3b7eae4b48f.ttf +0 -0
- data/installer/core/public/assets/font-awesome/fa-solid-900-7cf25b1d45ac4436b575e86dcafdd37efc5faeab3bdad3144a9af3b7eae4b48f.ttf.gz +0 -0
- data/installer/core/public/assets/font-awesome/fa-solid-900-e20ab4de8913d1e569c3016c5c5aecfd6589f2bff211c387f2d0422d9123ae2f.woff +0 -0
- data/installer/core/public/assets/keppler_capsules/admin/application-3e18899279f0f0db0ed087ef60a3133b36f7735f3e5bf09411c5099fe9551fcd.css +22 -0
- data/installer/core/public/assets/keppler_capsules/admin/application-3e18899279f0f0db0ed087ef60a3133b36f7735f3e5bf09411c5099fe9551fcd.css.gz +0 -0
- data/installer/core/public/assets/keppler_capsules/admin/application-f46080ad1616c7365ec458f0663ca9a285bb005dea3d10079f00e0298c6cd670.js +22 -0
- data/installer/core/public/assets/keppler_capsules/admin/application-f46080ad1616c7365ec458f0663ca9a285bb005dea3d10079f00e0298c6cd670.js.gz +0 -0
- data/installer/core/public/assets/keppler_frontend/admin/application-a59d5002b1a4c8a889da935c51f2679c69bdc2eb3b789d6c96de3f7db67ba730.css +485 -0
- data/installer/core/public/assets/keppler_frontend/admin/application-a59d5002b1a4c8a889da935c51f2679c69bdc2eb3b789d6c96de3f7db67ba730.css.gz +0 -0
- data/installer/core/public/assets/keppler_frontend/admin/application-e783e6e18f4436fdd1b29d1eae96cb33a54b2310f89735806c363c6213488493.js +885 -0
- data/installer/core/public/assets/keppler_frontend/admin/application-e783e6e18f4436fdd1b29d1eae96cb33a54b2310f89735806c363c6213488493.js.gz +0 -0
- data/installer/core/public/assets/keppler_frontend/app/application-6fc1d0e6a7d356107c213726b8f894c8df9332bf966899559aa863b5388748d3.js +34345 -0
- data/installer/core/public/assets/keppler_frontend/app/application-6fc1d0e6a7d356107c213726b8f894c8df9332bf966899559aa863b5388748d3.js.gz +0 -0
- data/installer/core/public/assets/keppler_frontend/app/application-e8573318eb1e34fe271f40b72d2c8b886c16853ee9af153bd6a986091a8e1dd2.css +352 -0
- data/installer/core/public/assets/keppler_frontend/app/application-e8573318eb1e34fe271f40b72d2c8b886c16853ee9af153bd6a986091a8e1dd2.css.gz +0 -0
- data/installer/core/public/assets/keppler_languages/application-789fd3d62d3ea0a804c0818f1e22d8dce8f2a330acd678b5803b078c1e58e59a.css +21 -0
- data/installer/core/public/assets/keppler_languages/application-789fd3d62d3ea0a804c0818f1e22d8dce8f2a330acd678b5803b078c1e58e59a.css.gz +0 -0
- data/installer/core/public/assets/keppler_languages/application-f4839ea4cb8c278f79995502e2945a4490245751bb22f01730596d1c585f5b5a.js +15 -0
- data/installer/core/public/assets/keppler_languages/application-f4839ea4cb8c278f79995502e2945a4490245751bb22f01730596d1c585f5b5a.js.gz +0 -0
- data/installer/core/public/assets/slick-06d80cf01250132fd1068701108453feee68854b750d22c344ffc0de395e1dcb.eot +0 -0
- data/installer/core/public/assets/slick-06d80cf01250132fd1068701108453feee68854b750d22c344ffc0de395e1dcb.eot.gz +0 -0
- data/installer/core/public/assets/slick-26726bac4060abb1226e6ceebc1336e84930fe7a7af1b3895a109d067f5b5dcc.woff +0 -0
- data/installer/core/public/assets/slick-37bc99cfdbbc046193a26396787374d00e7b10d3a758a36045c07bd8886360d2.ttf +0 -0
- data/installer/core/public/assets/slick-37bc99cfdbbc046193a26396787374d00e7b10d3a758a36045c07bd8886360d2.ttf.gz +0 -0
- data/installer/core/public/assets/slick-8ca11b5fcbff92ee6378017cf6832dddfa745253202d7c8d01f42d5d17c4cb5c.svg +14 -0
- data/installer/core/public/assets/slick-8ca11b5fcbff92ee6378017cf6832dddfa745253202d7c8d01f42d5d17c4cb5c.svg.gz +0 -0
- data/installer/core/public/assets/slick/ajax-loader-e7b44c86b050fca766a96ddac2d0932af0126da6f2305280342d909168dcce6b.gif +0 -0
- data/installer/core/rockets/keppler_capsules/app/controllers/keppler_capsules/application_controller.rb +1 -1
- data/installer/core/rockets/keppler_capsules/lib/generators/keppler_capsule_scaffold/templates/models/model.rb +2 -0
- data/installer/core/rockets/keppler_frontend/app/assets/stylesheets/keppler_frontend/admin/frontend.scss +68 -0
- data/installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/admin/multimedia_controller.rb +7 -7
- data/installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/admin/themes_controller.rb +0 -15
- data/installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/admin/views_controller.rb +49 -218
- data/installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/app/app_controller.rb +5 -0
- data/installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/app/frontend_controller.rb +0 -11
- data/installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/application_controller.rb +1 -1
- data/installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/concerns/services.rb +10 -2
- data/installer/core/rockets/keppler_frontend/app/models/keppler_frontend/theme.rb +12 -14
- data/installer/core/rockets/keppler_frontend/app/policies/keppler_frontend/theme_policy.rb +12 -4
- data/installer/core/rockets/keppler_frontend/app/services/keppler_frontend/editor/resources_format.rb +1 -1
- data/installer/core/rockets/keppler_frontend/app/services/keppler_frontend/urls/assets.rb +4 -0
- data/installer/core/rockets/keppler_frontend/app/services/keppler_frontend/views/add.rb +58 -0
- data/installer/core/rockets/keppler_frontend/app/services/keppler_frontend/views/remove.rb +51 -0
- data/installer/core/rockets/keppler_frontend/app/services/keppler_frontend/views/routes_handler.rb +45 -38
- data/installer/core/rockets/keppler_frontend/app/services/keppler_frontend/views/theme_views.rb +51 -0
- data/installer/core/rockets/keppler_frontend/app/services/keppler_frontend/views/views.rb +78 -0
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/themes/_listing.html.haml +0 -3
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/themes/index.html.haml +59 -57
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/_new_view.html.haml +25 -0
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/_select_theme.html.haml +32 -0
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/_views_listing.html.haml +43 -0
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/generate.js.erb +7 -0
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/index.html.haml +47 -78
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/refresh.js.erb +1 -0
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/remove.js.erb +2 -0
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/app/frontend/keppler.html.haml +4 -1
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/app/partials/_devise_login.html.erb +1 -1
- data/installer/core/rockets/keppler_frontend/config/locales/en.yml +8 -0
- data/installer/core/rockets/keppler_frontend/config/locales/es.yml +8 -0
- data/installer/core/rockets/keppler_frontend/config/menu.yml +9 -24
- data/installer/core/rockets/keppler_frontend/config/routes.rb +8 -108
- data/installer/core/rockets/keppler_frontend/config/themes.yml +4 -4
- data/installer/core/rockets/keppler_frontend/lib/keppler_frontend/engine.rb +1 -1
- data/installer/core/rockets/keppler_ga_dashboard/app/controllers/keppler_ga_dashboard/admin/dashboard_controller.rb +7 -1
- data/installer/core/rockets/keppler_ga_dashboard/app/views/keppler_ga_dashboard/admin/dashboard/analytics.html.haml +0 -1
- data/installer/core/rockets/keppler_languages/app/controllers/keppler_languages/application_controller.rb +1 -1
- data/installer/core/spec/controllers/admin/admin_controller_spec.rb +8 -1
- data/installer/core/spec/controllers/admin/settings_controller_spec.rb +34 -0
- data/installer/core/spec/routing/setting_spec.rb +12 -0
- data/installer/core/vendor/cache/html-to-haml-0.0.6.gem +0 -0
- data/installer/core/yarn.lock +4 -0
- data/keppler.gemspec +3 -3
- data/lib/keppler/version.rb +1 -1
- metadata +585 -15216
- data/installer/core/app/controllers/devise/sessions_controller.rb +0 -108
- data/installer/core/app/views/devise/sessions/new.html.haml +0 -35
- data/installer/core/db/migrate/20180717160308_create_keppler_frontend_views.keppler_frontend.rb +0 -17
- data/installer/core/db/migrate/20180806203410_create_keppler_frontend_partials.keppler_frontend.rb +0 -13
- data/installer/core/db/migrate/20180827120841_create_keppler_frontend_callback_functions.keppler_frontend.rb +0 -14
- data/installer/core/db/migrate/20180827154329_create_keppler_frontend_view_callbacks.keppler_frontend.rb +0 -12
- data/installer/core/db/migrate/20180830153221_create_keppler_frontend_functions.keppler_frontend.rb +0 -14
- data/installer/core/db/migrate/20180830153222_create_keppler_frontend_parameters.keppler_frontend.rb +0 -13
- data/installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/admin/callback_functions_controller.rb +0 -194
- data/installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/admin/functions_controller.rb +0 -205
- data/installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/admin/parameters_controller.rb +0 -165
- data/installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/admin/partials_controller.rb +0 -187
- data/installer/core/rockets/keppler_frontend/app/models/keppler_frontend/callback_function.rb +0 -52
- data/installer/core/rockets/keppler_frontend/app/models/keppler_frontend/function.rb +0 -59
- data/installer/core/rockets/keppler_frontend/app/models/keppler_frontend/parameter.rb +0 -43
- data/installer/core/rockets/keppler_frontend/app/models/keppler_frontend/partial.rb +0 -102
- data/installer/core/rockets/keppler_frontend/app/models/keppler_frontend/view.rb +0 -93
- data/installer/core/rockets/keppler_frontend/app/models/keppler_frontend/view_callback.rb +0 -29
- data/installer/core/rockets/keppler_frontend/app/policies/keppler_frontend/callback_function_policy.rb +0 -19
- data/installer/core/rockets/keppler_frontend/app/policies/keppler_frontend/function_policy.rb +0 -19
- data/installer/core/rockets/keppler_frontend/app/policies/keppler_frontend/parameter_policy.rb +0 -11
- data/installer/core/rockets/keppler_frontend/app/policies/keppler_frontend/partial_policy.rb +0 -16
- data/installer/core/rockets/keppler_frontend/app/policies/keppler_frontend/view_policy.rb +0 -39
- data/installer/core/rockets/keppler_frontend/app/services/keppler_frontend/callbacks/code_handler.rb +0 -115
- data/installer/core/rockets/keppler_frontend/app/services/keppler_frontend/callbacks/code_views.rb +0 -74
- data/installer/core/rockets/keppler_frontend/app/services/keppler_frontend/functions/code_handler.rb +0 -0
- data/installer/core/rockets/keppler_frontend/app/services/keppler_frontend/views/actions_handler.rb +0 -120
- data/installer/core/rockets/keppler_frontend/app/services/keppler_frontend/views/css_handler.rb +0 -60
- data/installer/core/rockets/keppler_frontend/app/services/keppler_frontend/views/html_handler.rb +0 -85
- data/installer/core/rockets/keppler_frontend/app/services/keppler_frontend/views/install.rb +0 -57
- data/installer/core/rockets/keppler_frontend/app/services/keppler_frontend/views/js_handler.rb +0 -67
- data/installer/core/rockets/keppler_frontend/app/services/keppler_frontend/views/output.rb +0 -49
- data/installer/core/rockets/keppler_frontend/app/services/keppler_frontend/views/remote_js_handler.rb +0 -60
- data/installer/core/rockets/keppler_frontend/app/services/keppler_frontend/views/save.rb +0 -25
- data/installer/core/rockets/keppler_frontend/app/services/keppler_frontend/views/uninstall.rb +0 -60
- data/installer/core/rockets/keppler_frontend/app/services/keppler_frontend/views/update.rb +0 -57
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/callback_functions/_description.html.haml +0 -13
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/callback_functions/_editor_views.html.haml +0 -45
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/callback_functions/_form.html.haml +0 -31
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/callback_functions/_listing.html.haml +0 -48
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/callback_functions/edit.html.haml +0 -1
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/callback_functions/editor.html.haml +0 -47
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/callback_functions/index.html.haml +0 -80
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/callback_functions/new.html.haml +0 -1
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/callback_functions/reload.js.haml +0 -5
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/callback_functions/show.html.haml +0 -33
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/functions/_description.html.haml +0 -13
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/functions/_form.html.haml +0 -51
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/functions/_listing.html.haml +0 -45
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/functions/_parameter_fields.html.haml +0 -5
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/functions/_parameter_fields_edit.html.haml +0 -6
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/functions/edit.html.haml +0 -1
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/functions/editor.html.haml +0 -0
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/functions/index.html.haml +0 -78
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/functions/new.html.haml +0 -1
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/functions/reload.js.haml +0 -5
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/functions/show.html.haml +0 -65
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/parameters/_description.html.haml +0 -13
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/parameters/_form.html.haml +0 -31
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/parameters/_listing.html.haml +0 -41
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/parameters/edit.html.haml +0 -1
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/parameters/index.html.haml +0 -79
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/parameters/new.html.haml +0 -1
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/parameters/reload.js.haml +0 -5
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/parameters/show.html.haml +0 -33
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/partials/_description.html.haml +0 -13
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/partials/_editor_assets.html.haml +0 -129
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/partials/_form.html.haml +0 -29
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/partials/_listing.html.haml +0 -37
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/partials/edit.html.haml +0 -1
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/partials/index.html.haml +0 -76
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/partials/new.html.haml +0 -1
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/partials/reload.js.haml +0 -5
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/partials/show.html.haml +0 -87
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/themes/editor.html.haml +0 -82
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/_description.html.haml +0 -13
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/_editor_assets.html.haml +0 -132
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/_editor_themes.html.haml +0 -62
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/_editor_views.html.haml +0 -103
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/_form.html.haml +0 -66
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/_listing.html.haml +0 -60
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/_view_callback_fields.html.haml +0 -8
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/_view_callback_fields_edit.html.haml +0 -8
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/destroy_callback.js.erb +0 -5
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/edit.html.haml +0 -1
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/editor.html.haml +0 -7
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/editors/_html_editor.html.haml +0 -91
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/editors/_only_action.html.haml +0 -40
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/editors/_view_js_editor.html.haml +0 -56
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/new.html.haml +0 -1
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/reload.js.haml +0 -5
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/show.html.haml +0 -33
- data/installer/core/rockets/keppler_frontend/app/views/keppler_frontend/app/partials/conf +0 -0
- data/installer/core/rockets/keppler_frontend/config/data/callback_functions.yml +0 -15
- data/installer/core/rockets/keppler_frontend/config/data/view_callbacks.yml +0 -1
- data/installer/core/rockets/keppler_frontend/config/data/views.yml +0 -18
- data/installer/core/rockets/keppler_frontend/db/migrate/20180717160248_create_keppler_frontend_views.rb +0 -17
- data/installer/core/rockets/keppler_frontend/db/migrate/20180806203329_create_keppler_frontend_partials.rb +0 -12
- data/installer/core/rockets/keppler_frontend/db/migrate/20180827120734_create_keppler_frontend_callback_functions.rb +0 -13
- data/installer/core/rockets/keppler_frontend/db/migrate/20180827154249_create_keppler_frontend_view_callbacks.rb +0 -11
- data/installer/core/rockets/keppler_frontend/db/migrate/20180830130934_create_keppler_frontend_functions.rb +0 -13
- data/installer/core/rockets/keppler_frontend/db/migrate/20180830153029_create_keppler_frontend_parameters.rb +0 -12
- data/installer/core/spec/controllers/keppler_frontend/admin/views_controller/create_view_spec.rb +0 -35
- data/installer/core/spec/controllers/keppler_frontend/admin/views_controller/editor_spec.rb +0 -20
- data/installer/core/spec/controllers/keppler_frontend/admin/views_controller/views_list_spec.rb +0 -30
- data/installer/core/spec/factories/keppler_frontend/callback_function.rb +0 -8
- data/installer/core/spec/factories/keppler_frontend/function.rb +0 -8
- data/installer/core/spec/factories/keppler_frontend/view.rb +0 -8
- data/installer/core/spec/factories/keppler_frontend/view_callback.rb +0 -6
- data/installer/core/spec/fixtures/keppler_frontend/editor/test.html +0 -16
- data/installer/core/spec/fixtures/keppler_frontend/editor/test.png +0 -0
- data/installer/core/spec/fixtures/keppler_frontend/live_editor/test_index_1.html +0 -16
- data/installer/core/spec/fixtures/keppler_frontend/live_editor/test_index_2.html +0 -0
- data/installer/core/spec/models/keppler_frontend/callback/calbacks_handler_spec.rb +0 -61
- data/installer/core/spec/models/keppler_frontend/callback/model_spec.rb +0 -19
- data/installer/core/spec/models/keppler_frontend/view/callback_view_spec.rb +0 -38
- data/installer/core/spec/models/keppler_frontend/view/model_spec.rb +0 -19
- data/installer/core/spec/models/keppler_frontend/view/view_files_handler_spec.rb +0 -64
- data/installer/core/spec/routing/keppler_frontend/callbacks_spec.rb +0 -68
- data/installer/core/spec/routing/keppler_frontend/functions_spec.rb +0 -68
- data/installer/core/spec/routing/keppler_frontend/views_spec.rb +0 -68
- data/installer/core/spec/services/keppler_frontend/callbacks/callback_view_spec.rb +0 -104
- data/installer/core/spec/services/keppler_frontend/callbacks/code_handler_spec.rb +0 -63
- data/installer/core/spec/services/keppler_frontend/editor/file_format_spec.rb +0 -35
- data/installer/core/spec/services/keppler_frontend/editor/resources_format_spec.rb +0 -45
- data/installer/core/spec/services/keppler_frontend/editor/resources_spec.rb +0 -44
- data/installer/core/spec/services/keppler_frontend/urls/assets_spec.rb +0 -25
- data/installer/core/spec/services/keppler_frontend/urls/config_spec.rb +0 -25
- data/installer/core/spec/services/keppler_frontend/urls/front_spec.rb +0 -38
- data/installer/core/spec/services/keppler_frontend/urls/roots_spec.rb +0 -22
- data/installer/core/spec/services/keppler_frontend/utils/code_search_spec.rb +0 -29
- data/installer/core/spec/services/keppler_frontend/utils/file_format_spec.rb +0 -52
- data/installer/core/spec/services/keppler_frontend/utils/yml_handle_spec.rb +0 -42
- data/installer/core/spec/services/keppler_frontend/views/actions_handler_spec.rb +0 -59
- data/installer/core/spec/services/keppler_frontend/views/css_handler_spec.rb +0 -59
- data/installer/core/spec/services/keppler_frontend/views/format_html_spec.rb +0 -99
- data/installer/core/spec/services/keppler_frontend/views/format_only_action_spec.rb +0 -91
- data/installer/core/spec/services/keppler_frontend/views/format_remote_js_spec.rb +0 -101
- data/installer/core/spec/services/keppler_frontend/views/html_handler_spec.rb +0 -52
- data/installer/core/spec/services/keppler_frontend/views/js_handler_spec.rb +0 -59
- data/installer/core/spec/services/keppler_frontend/views/output_code_spec.rb +0 -39
- data/installer/core/spec/services/keppler_frontend/views/remote_js_handler_spec.rb +0 -55
- data/installer/core/spec/services/keppler_frontend/views/routes_handler_spec.rb +0 -63
- data/installer/core/spec/services/keppler_frontend/views/save_code_spec.rb +0 -53
- data/testing-with-2.1.18/.gitignore +0 -88
- data/testing-with-2.1.18/.ruby-version +0 -1
- data/testing-with-2.1.18/Gemfile +0 -149
- data/testing-with-2.1.18/Gemfile.lock +0 -645
- data/testing-with-2.1.18/Guardfile +0 -18
- data/testing-with-2.1.18/LICENSE +0 -674
- data/testing-with-2.1.18/README.md +0 -134
- data/testing-with-2.1.18/Rakefile +0 -6
- data/testing-with-2.1.18/_config.yml +0 -1
- data/testing-with-2.1.18/app/assets/images/.keep +0 -0
- data/testing-with-2.1.18/app/assets/javascripts/admin/application.coffee +0 -25
- data/testing-with-2.1.18/app/assets/javascripts/admin/bootstrap-colorpicker.js +0 -1322
- data/testing-with-2.1.18/app/assets/javascripts/admin/bootstrap-file-input/fileinput.js +0 -4463
- data/testing-with-2.1.18/app/assets/javascripts/admin/bootstrap-file-input/locales/LANG.js +0 -100
- data/testing-with-2.1.18/app/assets/javascripts/admin/bootstrap-file-input/locales/es.js +0 -100
- data/testing-with-2.1.18/app/assets/javascripts/admin/bootstrap-file-input/plugins/piexif.js +0 -2471
- data/testing-with-2.1.18/app/assets/javascripts/admin/bootstrap-file-input/plugins/piexif.min.js +0 -1
- data/testing-with-2.1.18/app/assets/javascripts/admin/bootstrap-file-input/plugins/purify.js +0 -812
- data/testing-with-2.1.18/app/assets/javascripts/admin/bootstrap-file-input/plugins/purify.min.js +0 -1
- data/testing-with-2.1.18/app/assets/javascripts/admin/bootstrap-file-input/plugins/sortable.js +0 -1590
- data/testing-with-2.1.18/app/assets/javascripts/admin/bootstrap-file-input/plugins/sortable.min.js +0 -1
- data/testing-with-2.1.18/app/assets/javascripts/admin/code_editor.js +0 -94
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/comment/comment.js +0 -209
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/comment/continuecomment.js +0 -78
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/dialog/dialog.css +0 -32
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/dialog/dialog.js +0 -161
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/display/autorefresh.js +0 -47
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/display/fullscreen.css +0 -6
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/display/fullscreen.js +0 -41
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/display/panel.js +0 -123
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/display/placeholder.js +0 -63
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/display/rulers.js +0 -51
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/edit/closebrackets.js +0 -194
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/edit/closetag.js +0 -175
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/edit/continuelist.js +0 -89
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/edit/matchbrackets.js +0 -145
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/edit/matchtags.js +0 -66
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/edit/trailingspace.js +0 -27
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/fold/brace-fold.js +0 -105
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/fold/comment-fold.js +0 -59
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/fold/foldcode.js +0 -152
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/fold/foldgutter.css +0 -20
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/fold/foldgutter.js +0 -146
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/fold/indent-fold.js +0 -48
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/fold/markdown-fold.js +0 -49
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/fold/xml-fold.js +0 -184
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/hint/anyword-hint.js +0 -41
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/hint/css-hint.js +0 -60
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/hint/html-hint.js +0 -348
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/hint/javascript-hint.js +0 -157
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/hint/show-hint.css +0 -36
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/hint/show-hint.js +0 -433
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/hint/sql-hint.js +0 -299
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/hint/xml-hint.js +0 -110
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/mode/loadmode.js +0 -64
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/mode/multiplex.js +0 -131
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/mode/overlay.js +0 -90
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/mode/simple.js +0 -216
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/scroll/annotatescrollbar.js +0 -122
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/scroll/scrollpastend.js +0 -48
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/scroll/simplescrollbars.css +0 -66
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/scroll/simplescrollbars.js +0 -152
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/search/jump-to-line.js +0 -49
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/search/match-highlighter.js +0 -165
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/search/matchesonscrollbar.css +0 -8
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/search/matchesonscrollbar.js +0 -97
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/search/search.js +0 -252
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/search/searchcursor.js +0 -293
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/codemirror.js +0 -9683
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/keymap/sublime.js +0 -691
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/css/css.js +0 -832
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/haml/haml.js +0 -161
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/htmlembedded/htmlembedded.js +0 -37
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/htmlmixed/htmlmixed.js +0 -152
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/javascript/javascript.js +0 -896
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/ruby/ruby.js +0 -296
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/vue/vue.js +0 -77
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/xml/xml.js +0 -402
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/yaml-frontmatter/yaml-frontmatter.js +0 -68
- data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/yaml/yaml.js +0 -119
- data/testing-with-2.1.18/app/assets/javascripts/admin/file_uploader.coffee +0 -152
- data/testing-with-2.1.18/app/assets/javascripts/admin/img_preview.js +0 -32
- data/testing-with-2.1.18/app/assets/javascripts/admin/jscolor.js +0 -1855
- data/testing-with-2.1.18/app/assets/javascripts/admin/main.coffee +0 -58
- data/testing-with-2.1.18/app/assets/javascripts/admin/notification.js +0 -14
- data/testing-with-2.1.18/app/assets/javascripts/admin/ruby_console.js +0 -14
- data/testing-with-2.1.18/app/assets/javascripts/admin/sidebar.js +0 -24
- data/testing-with-2.1.18/app/assets/javascripts/admin/sort.coffee +0 -8
- data/testing-with-2.1.18/app/assets/javascripts/admin/swal.js +0 -39
- data/testing-with-2.1.18/app/assets/javascripts/admin/sweetalert2/delete-confirm.js +0 -118
- data/testing-with-2.1.18/app/assets/javascripts/admin/sweetalert2/sweetalert2.all.min.js +0 -2
- data/testing-with-2.1.18/app/assets/javascripts/admin/switch.js +0 -6
- data/testing-with-2.1.18/app/assets/javascripts/admin/tooltips.coffee +0 -4
- data/testing-with-2.1.18/app/assets/javascripts/admin/upload_records.coffee +0 -8
- data/testing-with-2.1.18/app/assets/javascripts/app/application.js.coffee +0 -9
- data/testing-with-2.1.18/app/assets/javascripts/app/google_analytics.js.coffee +0 -5
- data/testing-with-2.1.18/app/assets/javascripts/ckeditor/config.js +0 -130
- data/testing-with-2.1.18/app/assets/javascripts/errors/application.js.coffee +0 -1
- data/testing-with-2.1.18/app/assets/javascripts/errors/errors.js +0 -113
- data/testing-with-2.1.18/app/assets/javascripts/vue_admin/index.js +0 -111
- data/testing-with-2.1.18/app/assets/stylesheets/admin/application.scss +0 -48
- data/testing-with-2.1.18/app/assets/stylesheets/admin/bootstrap-file-input/fileinput-rtl.scss +0 -133
- data/testing-with-2.1.18/app/assets/stylesheets/admin/bootstrap-file-input/fileinput.scss +0 -760
- data/testing-with-2.1.18/app/assets/stylesheets/admin/bootstrap-file-input/themes/explorer-fa/theme.scss +0 -213
- data/testing-with-2.1.18/app/assets/stylesheets/admin/bootstrap-file-input/themes/explorer-fas/theme.scss +0 -213
- data/testing-with-2.1.18/app/assets/stylesheets/admin/bootstrap-file-input/themes/explorer/theme.scss +0 -213
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/comment/comment.js +0 -209
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/comment/continuecomment.js +0 -78
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/dialog/dialog.css +0 -32
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/dialog/dialog.js +0 -161
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/display/autorefresh.js +0 -47
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/display/fullscreen.css +0 -6
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/display/fullscreen.js +0 -41
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/display/panel.js +0 -123
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/display/placeholder.js +0 -63
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/display/rulers.js +0 -51
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/edit/closebrackets.js +0 -194
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/edit/closetag.js +0 -175
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/edit/continuelist.js +0 -89
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/edit/matchbrackets.js +0 -145
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/edit/matchtags.js +0 -66
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/edit/trailingspace.js +0 -27
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/fold/brace-fold.js +0 -105
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/fold/comment-fold.js +0 -59
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/fold/foldcode.js +0 -152
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/fold/foldgutter.css +0 -20
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/fold/foldgutter.js +0 -146
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/fold/indent-fold.js +0 -48
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/fold/markdown-fold.js +0 -49
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/fold/xml-fold.js +0 -184
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/hint/anyword-hint.js +0 -41
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/hint/css-hint.js +0 -60
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/hint/html-hint.js +0 -348
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/hint/javascript-hint.js +0 -157
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/hint/show-hint.css +0 -36
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/hint/show-hint.js +0 -433
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/hint/sql-hint.js +0 -299
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/hint/xml-hint.js +0 -110
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/scroll/annotatescrollbar.js +0 -122
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/scroll/scrollpastend.js +0 -48
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/scroll/simplescrollbars.css +0 -66
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/scroll/simplescrollbars.js +0 -152
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/search/jump-to-line.js +0 -49
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/search/match-highlighter.js +0 -165
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/search/matchesonscrollbar.css +0 -8
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/search/matchesonscrollbar.js +0 -97
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/search/search.js +0 -252
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/search/searchcursor.js +0 -293
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/codemirror.css +0 -366
- data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/theme/monokai.css +0 -41
- data/testing-with-2.1.18/app/assets/stylesheets/admin/components/layouts/_footer.scss +0 -5
- data/testing-with-2.1.18/app/assets/stylesheets/admin/components/layouts/_settings.scss +0 -51
- data/testing-with-2.1.18/app/assets/stylesheets/admin/components/navigation/_navbar.scss +0 -187
- data/testing-with-2.1.18/app/assets/stylesheets/admin/components/navigation/_sidebar.scss +0 -207
- data/testing-with-2.1.18/app/assets/stylesheets/admin/components/navigation/_turbolinks.scss +0 -4
- data/testing-with-2.1.18/app/assets/stylesheets/admin/components/paginator/_paginator.scss +0 -53
- data/testing-with-2.1.18/app/assets/stylesheets/admin/fonts-and-icons/boxicons.css +0 -2918
- data/testing-with-2.1.18/app/assets/stylesheets/admin/fonts-and-icons/fonts.css +0 -8
- data/testing-with-2.1.18/app/assets/stylesheets/admin/fonts-and-icons/icons.css +0 -778
- data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_appearance.scss +0 -5
- data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_bootstrap-colorpicker.scss +0 -269
- data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_customize.scss +0 -22
- data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_datepicker.scss +0 -1086
- data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_devise.scss +0 -189
- data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_files.scss +0 -229
- data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_form.scss +0 -190
- data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_index.scss +0 -466
- data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_listing.scss +0 -40
- data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_preloader.scss +0 -224
- data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_rockets.scss +0 -13
- data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_roles.scss +0 -3
- data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_search.scss +0 -244
- data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_show.scss +0 -23
- data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_switchs.scss +0 -143
- data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_themes.scss +0 -45
- data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_timepicker.scss +0 -14
- data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_user.scss +0 -6
- data/testing-with-2.1.18/app/assets/stylesheets/admin/utils/_base.scss +0 -65
- data/testing-with-2.1.18/app/assets/stylesheets/admin/utils/_mixins.scss +0 -26
- data/testing-with-2.1.18/app/assets/stylesheets/admin/utils/_theme.scss +0 -124
- data/testing-with-2.1.18/app/assets/stylesheets/admin/utils/_variables.scss +0 -109
- data/testing-with-2.1.18/app/assets/stylesheets/app/application.scss +0 -30
- data/testing-with-2.1.18/app/assets/stylesheets/app/base/_base_project.scss +0 -17
- data/testing-with-2.1.18/app/assets/stylesheets/app/base/_typography.scss +0 -1
- data/testing-with-2.1.18/app/assets/stylesheets/app/components/_buttons.scss +0 -0
- data/testing-with-2.1.18/app/assets/stylesheets/app/components/_inputs.scss +0 -0
- data/testing-with-2.1.18/app/assets/stylesheets/app/components/_navbar.scss +0 -21
- data/testing-with-2.1.18/app/assets/stylesheets/app/layout/_container.scss +0 -0
- data/testing-with-2.1.18/app/assets/stylesheets/app/layout/_footer.scss +0 -15
- data/testing-with-2.1.18/app/assets/stylesheets/app/layout/_header.scss +0 -39
- data/testing-with-2.1.18/app/assets/stylesheets/app/pages/_front.sass +0 -83
- data/testing-with-2.1.18/app/assets/stylesheets/app/plugins/_bootstrap_override.scss +0 -37
- data/testing-with-2.1.18/app/assets/stylesheets/app/plugins/_font_awesome.scss +0 -2
- data/testing-with-2.1.18/app/assets/stylesheets/app/plugins/_keppler.scss +0 -161
- data/testing-with-2.1.18/app/assets/stylesheets/app/plugins/_npogress.scss +0 -2
- data/testing-with-2.1.18/app/assets/stylesheets/app/utils/_mixins.scss +0 -18
- data/testing-with-2.1.18/app/assets/stylesheets/app/utils/_variables.scss +0 -28
- data/testing-with-2.1.18/app/assets/stylesheets/errors/application.scss +0 -3
- data/testing-with-2.1.18/app/assets/stylesheets/errors/errors.scss +0 -161
- data/testing-with-2.1.18/app/assets/stylesheets/vendor/admin-lte/_skin-blue.scss +0 -141
- data/testing-with-2.1.18/app/assets/stylesheets/vendor/sweetalert2/sweetalert2.scss +0 -11
- data/testing-with-2.1.18/app/controllers/admin/admin_controller.rb +0 -95
- data/testing-with-2.1.18/app/controllers/admin/meta_tags_controller.rb +0 -118
- data/testing-with-2.1.18/app/controllers/admin/permissions_controller.rb +0 -55
- data/testing-with-2.1.18/app/controllers/admin/rockets_controller.rb +0 -95
- data/testing-with-2.1.18/app/controllers/admin/roles_controller.rb +0 -124
- data/testing-with-2.1.18/app/controllers/admin/scripts_controller.rb +0 -104
- data/testing-with-2.1.18/app/controllers/admin/seos_controller.rb +0 -31
- data/testing-with-2.1.18/app/controllers/admin/settings_controller.rb +0 -131
- data/testing-with-2.1.18/app/controllers/admin/users_controller.rb +0 -122
- data/testing-with-2.1.18/app/controllers/app/app_controller.rb +0 -38
- data/testing-with-2.1.18/app/controllers/app/front_controller.rb +0 -8
- data/testing-with-2.1.18/app/controllers/application_controller.rb +0 -151
- data/testing-with-2.1.18/app/controllers/concerns/.keep +0 -0
- data/testing-with-2.1.18/app/controllers/concerns/devise_params.rb +0 -33
- data/testing-with-2.1.18/app/controllers/concerns/mailer_config.rb +0 -37
- data/testing-with-2.1.18/app/controllers/concerns/object_query.rb +0 -50
- data/testing-with-2.1.18/app/controllers/concerns/settings.rb +0 -105
- data/testing-with-2.1.18/app/controllers/devise/sessions_controller.rb +0 -108
- data/testing-with-2.1.18/app/controllers/errors_controller.rb +0 -30
- data/testing-with-2.1.18/app/helpers/admin_helper.rb +0 -138
- data/testing-with-2.1.18/app/helpers/application_helper.rb +0 -33
- data/testing-with-2.1.18/app/helpers/fronts_helper.rb +0 -38
- data/testing-with-2.1.18/app/helpers/rockets_helper.rb +0 -8
- data/testing-with-2.1.18/app/helpers/roles_helper.rb +0 -5
- data/testing-with-2.1.18/app/helpers/scaffolds_helper.rb +0 -5
- data/testing-with-2.1.18/app/inputs/keppler_boolean_input.rb +0 -52
- data/testing-with-2.1.18/app/inputs/keppler_file_input.rb +0 -124
- data/testing-with-2.1.18/app/mailers/.keep +0 -0
- data/testing-with-2.1.18/app/mailers/application_mailer.rb +0 -42
- data/testing-with-2.1.18/app/models/.keep +0 -0
- data/testing-with-2.1.18/app/models/appearance.rb +0 -7
- data/testing-with-2.1.18/app/models/application_record.rb +0 -6
- data/testing-with-2.1.18/app/models/concerns/.keep +0 -0
- data/testing-with-2.1.18/app/models/concerns/activity_history.rb +0 -11
- data/testing-with-2.1.18/app/models/concerns/clone_record.rb +0 -14
- data/testing-with-2.1.18/app/models/concerns/downloadable.rb +0 -16
- data/testing-with-2.1.18/app/models/concerns/searchable.rb +0 -27
- data/testing-with-2.1.18/app/models/concerns/sortable.rb +0 -13
- data/testing-with-2.1.18/app/models/concerns/uploadable.rb +0 -13
- data/testing-with-2.1.18/app/models/front.rb +0 -5
- data/testing-with-2.1.18/app/models/google_analytics_setting.rb +0 -6
- data/testing-with-2.1.18/app/models/meta_tag.rb +0 -54
- data/testing-with-2.1.18/app/models/permission.rb +0 -6
- data/testing-with-2.1.18/app/models/rocket.rb +0 -105
- data/testing-with-2.1.18/app/models/role.rb +0 -134
- data/testing-with-2.1.18/app/models/script.rb +0 -21
- data/testing-with-2.1.18/app/models/seo.rb +0 -49
- data/testing-with-2.1.18/app/models/setting.rb +0 -19
- data/testing-with-2.1.18/app/models/smtp_setting.rb +0 -7
- data/testing-with-2.1.18/app/models/social_account.rb +0 -6
- data/testing-with-2.1.18/app/models/user.rb +0 -75
- data/testing-with-2.1.18/app/policies/application_policy.rb +0 -18
- data/testing-with-2.1.18/app/policies/controller_policy.rb +0 -59
- data/testing-with-2.1.18/app/policies/meta_tag_policy.rb +0 -11
- data/testing-with-2.1.18/app/policies/permission_policy.rb +0 -23
- data/testing-with-2.1.18/app/policies/rocket_policy.rb +0 -11
- data/testing-with-2.1.18/app/policies/role_policy.rb +0 -31
- data/testing-with-2.1.18/app/policies/script_policy.rb +0 -11
- data/testing-with-2.1.18/app/policies/seo_policy.rb +0 -23
- data/testing-with-2.1.18/app/policies/setting_policy.rb +0 -15
- data/testing-with-2.1.18/app/policies/user_policy.rb +0 -19
- data/testing-with-2.1.18/app/services/admin/appearance_service.rb +0 -49
- data/testing-with-2.1.18/app/services/admin/git_handler.rb +0 -28
- data/testing-with-2.1.18/app/uploaders/attachment_uploader.rb +0 -61
- data/testing-with-2.1.18/app/uploaders/ckeditor_attachment_file_uploader.rb +0 -38
- data/testing-with-2.1.18/app/uploaders/ckeditor_picture_uploader.rb +0 -49
- data/testing-with-2.1.18/app/uploaders/template_uploader.rb +0 -44
- data/testing-with-2.1.18/app/views/admin/layouts/_footer.html.haml +0 -0
- data/testing-with-2.1.18/app/views/admin/layouts/_git_info.html.haml +0 -13
- data/testing-with-2.1.18/app/views/admin/layouts/_head.html.haml +0 -7
- data/testing-with-2.1.18/app/views/admin/layouts/_keppler_boolean_script.haml +0 -12
- data/testing-with-2.1.18/app/views/admin/layouts/_listing_preloader.haml +0 -4
- data/testing-with-2.1.18/app/views/admin/layouts/_messages.html.haml +0 -4
- data/testing-with-2.1.18/app/views/admin/layouts/_navigation.html.haml +0 -59
- data/testing-with-2.1.18/app/views/admin/layouts/_preloader.html.haml +0 -14
- data/testing-with-2.1.18/app/views/admin/layouts/_sidebar.html.haml +0 -83
- data/testing-with-2.1.18/app/views/admin/layouts/application.html.haml +0 -23
- data/testing-with-2.1.18/app/views/admin/layouts/index/remote_messages.js.haml +0 -9
- data/testing-with-2.1.18/app/views/admin/meta_tags/_description.html.haml +0 -13
- data/testing-with-2.1.18/app/views/admin/meta_tags/_form.html.haml +0 -35
- data/testing-with-2.1.18/app/views/admin/meta_tags/_listing.html.haml +0 -40
- data/testing-with-2.1.18/app/views/admin/meta_tags/edit.html.haml +0 -2
- data/testing-with-2.1.18/app/views/admin/meta_tags/index.html.haml +0 -69
- data/testing-with-2.1.18/app/views/admin/meta_tags/new.html.haml +0 -2
- data/testing-with-2.1.18/app/views/admin/meta_tags/reload.js.haml +0 -5
- data/testing-with-2.1.18/app/views/admin/meta_tags/show.html.haml +0 -28
- data/testing-with-2.1.18/app/views/admin/permissions/_switch.html.haml +0 -13
- data/testing-with-2.1.18/app/views/admin/permissions/add.html.haml +0 -95
- data/testing-with-2.1.18/app/views/admin/permissions/create.html.haml +0 -0
- data/testing-with-2.1.18/app/views/admin/permissions/create.js.erb +0 -2
- data/testing-with-2.1.18/app/views/admin/permissions/show.js.erb +0 -2
- data/testing-with-2.1.18/app/views/admin/permissions/toggle_permissions.js.erb +0 -6
- data/testing-with-2.1.18/app/views/admin/rockets/_create_rocket.haml +0 -61
- data/testing-with-2.1.18/app/views/admin/rockets/_install_rocket.haml +0 -28
- data/testing-with-2.1.18/app/views/admin/rockets/rockets.haml +0 -54
- data/testing-with-2.1.18/app/views/admin/roles/_description.html.haml +0 -13
- data/testing-with-2.1.18/app/views/admin/roles/_form.html.haml +0 -27
- data/testing-with-2.1.18/app/views/admin/roles/_listing.html.haml +0 -42
- data/testing-with-2.1.18/app/views/admin/roles/_switch.html.haml +0 -24
- data/testing-with-2.1.18/app/views/admin/roles/edit.html.haml +0 -1
- data/testing-with-2.1.18/app/views/admin/roles/index.html.haml +0 -64
- data/testing-with-2.1.18/app/views/admin/roles/new.html.haml +0 -1
- data/testing-with-2.1.18/app/views/admin/roles/reload.js.haml +0 -5
- data/testing-with-2.1.18/app/views/admin/roles/show.html.haml +0 -29
- data/testing-with-2.1.18/app/views/admin/scripts/_description.html.haml +0 -13
- data/testing-with-2.1.18/app/views/admin/scripts/_form.html.haml +0 -30
- data/testing-with-2.1.18/app/views/admin/scripts/_listing.html.haml +0 -40
- data/testing-with-2.1.18/app/views/admin/scripts/edit.html.haml +0 -1
- data/testing-with-2.1.18/app/views/admin/scripts/index.html.haml +0 -70
- data/testing-with-2.1.18/app/views/admin/scripts/new.html.haml +0 -1
- data/testing-with-2.1.18/app/views/admin/scripts/reload.js.haml +0 -5
- data/testing-with-2.1.18/app/views/admin/scripts/show.html.haml +0 -28
- data/testing-with-2.1.18/app/views/admin/seos/robots.html.haml +0 -35
- data/testing-with-2.1.18/app/views/admin/seos/sitemap.html.haml +0 -36
- data/testing-with-2.1.18/app/views/admin/settings/_form.html.haml +0 -10
- data/testing-with-2.1.18/app/views/admin/settings/components/_preview.html.haml +0 -30
- data/testing-with-2.1.18/app/views/admin/settings/edit.html.haml +0 -4
- data/testing-with-2.1.18/app/views/admin/settings/fields/_appearance.html.haml +0 -64
- data/testing-with-2.1.18/app/views/admin/settings/fields/_basic_information.html.haml +0 -40
- data/testing-with-2.1.18/app/views/admin/settings/fields/_email_setting.html.haml +0 -18
- data/testing-with-2.1.18/app/views/admin/settings/fields/_google_analytics_setting.html.haml +0 -21
- data/testing-with-2.1.18/app/views/admin/settings/fields/_social_accounts.html.haml +0 -43
- data/testing-with-2.1.18/app/views/admin/users/_description.html.haml +0 -13
- data/testing-with-2.1.18/app/views/admin/users/_form.html.haml +0 -45
- data/testing-with-2.1.18/app/views/admin/users/_listing.html.haml +0 -47
- data/testing-with-2.1.18/app/views/admin/users/delete_avatar.js.haml +0 -3
- data/testing-with-2.1.18/app/views/admin/users/edit.html.haml +0 -1
- data/testing-with-2.1.18/app/views/admin/users/filter_by_role.js.erb +0 -9
- data/testing-with-2.1.18/app/views/admin/users/index.html.haml +0 -69
- data/testing-with-2.1.18/app/views/admin/users/new.html.haml +0 -1
- data/testing-with-2.1.18/app/views/admin/users/reload.js.haml +0 -5
- data/testing-with-2.1.18/app/views/admin/users/show.html.haml +0 -34
- data/testing-with-2.1.18/app/views/app/front/index.html.haml +0 -223
- data/testing-with-2.1.18/app/views/app/front/message.haml +0 -1
- data/testing-with-2.1.18/app/views/app/layouts/_footer.html.haml +0 -3
- data/testing-with-2.1.18/app/views/app/layouts/_google_analytics.html.haml +0 -13
- data/testing-with-2.1.18/app/views/app/layouts/_head.html.haml +0 -15
- data/testing-with-2.1.18/app/views/app/layouts/_messages.html.haml +0 -6
- data/testing-with-2.1.18/app/views/app/layouts/_meta_tags.html.haml +0 -40
- data/testing-with-2.1.18/app/views/app/layouts/_navigation.html.haml +0 -13
- data/testing-with-2.1.18/app/views/app/layouts/_navigation_links.html.haml +0 -6
- data/testing-with-2.1.18/app/views/app/layouts/application.html.haml +0 -10
- data/testing-with-2.1.18/app/views/application_mailer/testing.html.haml +0 -1
- data/testing-with-2.1.18/app/views/devise/confirmations/new.html.erb +0 -16
- data/testing-with-2.1.18/app/views/devise/mailer/reset_password_instructions.html.haml +0 -6
- data/testing-with-2.1.18/app/views/devise/passwords/edit.html.haml +0 -31
- data/testing-with-2.1.18/app/views/devise/passwords/new.html.haml +0 -27
- data/testing-with-2.1.18/app/views/devise/registrations/edit.html.erb +0 -48
- data/testing-with-2.1.18/app/views/devise/registrations/new.html.erb +0 -19
- data/testing-with-2.1.18/app/views/devise/sessions/new.html.haml +0 -35
- data/testing-with-2.1.18/app/views/devise/shared/_links.html.erb +0 -21
- data/testing-with-2.1.18/app/views/errors/internal_server_error.html.haml +0 -50
- data/testing-with-2.1.18/app/views/errors/not_authorized.html.haml +0 -76
- data/testing-with-2.1.18/app/views/errors/not_found.html.haml +0 -101
- data/testing-with-2.1.18/app/views/errors/unprocessable.html.haml +0 -50
- data/testing-with-2.1.18/app/views/kaminari/_first_page.html.haml +0 -11
- data/testing-with-2.1.18/app/views/kaminari/_gap.html.haml +0 -8
- data/testing-with-2.1.18/app/views/kaminari/_last_page.html.haml +0 -11
- data/testing-with-2.1.18/app/views/kaminari/_next_page.html.haml +0 -11
- data/testing-with-2.1.18/app/views/kaminari/_page.html.haml +0 -10
- data/testing-with-2.1.18/app/views/kaminari/_paginator.html.haml +0 -18
- data/testing-with-2.1.18/app/views/kaminari/_prev_page.html.haml +0 -11
- data/testing-with-2.1.18/app/views/layouts/errors/_head.html.haml +0 -3
- data/testing-with-2.1.18/app/views/layouts/errors/application.html.haml +0 -11
- data/testing-with-2.1.18/app/views/layouts/mailers/mailer.html.haml +0 -3
- data/testing-with-2.1.18/app/views/layouts/mailers/mailer.text.haml +0 -1
- data/testing-with-2.1.18/app/views/layouts/templates/application.html.haml +0 -1
- data/testing-with-2.1.18/app/views/public_activity/layout/_create.html.haml +0 -44
- data/testing-with-2.1.18/app/views/public_activity/layout/_destroy.html.haml +0 -15
- data/testing-with-2.1.18/app/views/public_activity/layout/_update.html.haml +0 -44
- data/testing-with-2.1.18/app/views/public_activity/session/_create.html.haml +0 -13
- data/testing-with-2.1.18/app/views/public_activity/session/_destroy.html.haml +0 -13
- data/testing-with-2.1.18/app/views/templates/kaminari/_first_page.html.haml +0 -9
- data/testing-with-2.1.18/app/views/templates/kaminari/_gap.html.haml +0 -8
- data/testing-with-2.1.18/app/views/templates/kaminari/_last_page.html.haml +0 -9
- data/testing-with-2.1.18/app/views/templates/kaminari/_next_page.html.haml +0 -9
- data/testing-with-2.1.18/app/views/templates/kaminari/_page.html.haml +0 -10
- data/testing-with-2.1.18/app/views/templates/kaminari/_paginator.html.haml +0 -18
- data/testing-with-2.1.18/app/views/templates/kaminari/_prev_page.html.haml +0 -9
- data/testing-with-2.1.18/bin/bundle +0 -3
- data/testing-with-2.1.18/bin/rails +0 -4
- data/testing-with-2.1.18/bin/rake +0 -4
- data/testing-with-2.1.18/bin/setup +0 -29
- data/testing-with-2.1.18/bin/spring +0 -15
- data/testing-with-2.1.18/bin/update +0 -31
- data/testing-with-2.1.18/bin/yarn +0 -11
- data/testing-with-2.1.18/config.ru +0 -4
- data/testing-with-2.1.18/config/application.rb +0 -46
- data/testing-with-2.1.18/config/attachments.yml +0 -24
- data/testing-with-2.1.18/config/boot.rb +0 -7
- data/testing-with-2.1.18/config/circleci/db_config.yml +0 -51
- data/testing-with-2.1.18/config/database.yml +0 -25
- data/testing-with-2.1.18/config/environment.rb +0 -10
- data/testing-with-2.1.18/config/environments/development.rb +0 -61
- data/testing-with-2.1.18/config/environments/production.rb +0 -109
- data/testing-with-2.1.18/config/environments/test.rb +0 -45
- data/testing-with-2.1.18/config/gaAuth/gauth_key.p12 +0 -0
- data/testing-with-2.1.18/config/initializers/assets.rb +0 -14
- data/testing-with-2.1.18/config/initializers/carrierwave.rb +0 -12
- data/testing-with-2.1.18/config/initializers/compression.rb +0 -47
- data/testing-with-2.1.18/config/initializers/cookies_serializer.rb +0 -3
- data/testing-with-2.1.18/config/initializers/date_formats.rb +0 -2
- data/testing-with-2.1.18/config/initializers/devise.rb +0 -259
- data/testing-with-2.1.18/config/initializers/filter_parameter_logging.rb +0 -5
- data/testing-with-2.1.18/config/initializers/inflections.rb +0 -16
- data/testing-with-2.1.18/config/initializers/keppler_configuration.rb +0 -9
- data/testing-with-2.1.18/config/initializers/mime_types.rb +0 -6
- data/testing-with-2.1.18/config/initializers/paginate_kaminari_configuration.rb +0 -12
- data/testing-with-2.1.18/config/initializers/ransack.rb +0 -7
- data/testing-with-2.1.18/config/initializers/rolify.rb +0 -10
- data/testing-with-2.1.18/config/initializers/route_traslator.rb +0 -3
- data/testing-with-2.1.18/config/initializers/session_store.rb +0 -5
- data/testing-with-2.1.18/config/initializers/simple_form.rb +0 -170
- data/testing-with-2.1.18/config/initializers/simple_form_bootstrap.rb +0 -174
- data/testing-with-2.1.18/config/initializers/simple_form_components.rb +0 -61
- data/testing-with-2.1.18/config/initializers/time_formats.rb +0 -2
- data/testing-with-2.1.18/config/initializers/wrap_parameters.rb +0 -15
- data/testing-with-2.1.18/config/jshint.yml +0 -21
- data/testing-with-2.1.18/config/locales/devise.en.yml +0 -61
- data/testing-with-2.1.18/config/locales/devise.es.yml +0 -62
- data/testing-with-2.1.18/config/locales/en.yml +0 -477
- data/testing-with-2.1.18/config/locales/es.yml +0 -510
- data/testing-with-2.1.18/config/locales/routes.en.yml +0 -4
- data/testing-with-2.1.18/config/locales/routes.es.yml +0 -5
- data/testing-with-2.1.18/config/locales/simple_form.en.yml +0 -46
- data/testing-with-2.1.18/config/locales/simple_form.es.yml +0 -96
- data/testing-with-2.1.18/config/locales/social_share_button.es.yml +0 -10
- data/testing-with-2.1.18/config/menu.yml +0 -58
- data/testing-with-2.1.18/config/permissions.yml +0 -39
- data/testing-with-2.1.18/config/puma.rb +0 -56
- data/testing-with-2.1.18/config/roles.yml +0 -2
- data/testing-with-2.1.18/config/routes.rb +0 -191
- data/testing-with-2.1.18/config/settings.yml +0 -30
- data/testing-with-2.1.18/config/sitemap.rb +0 -30
- data/testing-with-2.1.18/config/spring.rb +0 -6
- data/testing-with-2.1.18/db/migrate/20140812203549_devise_create_users.rb +0 -50
- data/testing-with-2.1.18/db/migrate/20140812210925_rolify_create_roles.rb +0 -21
- data/testing-with-2.1.18/db/migrate/20151221173228_create_activities.rb +0 -23
- data/testing-with-2.1.18/db/migrate/20160122201215_create_settings.rb +0 -15
- data/testing-with-2.1.18/db/migrate/20160126141856_create_smtp_settings.rb +0 -15
- data/testing-with-2.1.18/db/migrate/20160128131802_create_scripts.rb +0 -12
- data/testing-with-2.1.18/db/migrate/20160128151351_create_google_analytics_settings.rb +0 -13
- data/testing-with-2.1.18/db/migrate/20160128193740_create_social_accounts.rb +0 -26
- data/testing-with-2.1.18/db/migrate/20160201134918_create_meta_tags.rb +0 -13
- data/testing-with-2.1.18/db/migrate/20160201210520_create_appearances.rb +0 -14
- data/testing-with-2.1.18/db/migrate/20171225023933_create_scaffolds.rb +0 -10
- data/testing-with-2.1.18/db/migrate/20180503174351_create_permissions.rb +0 -11
- data/testing-with-2.1.18/db/migrate/20180717160308_create_keppler_frontend_views.keppler_frontend.rb +0 -17
- data/testing-with-2.1.18/db/migrate/20180730194655_create_keppler_frontend_themes.rb +0 -13
- data/testing-with-2.1.18/db/migrate/20180802184429_create_keppler_capsules_capsules.keppler_capsules.rb +0 -13
- data/testing-with-2.1.18/db/migrate/20180802184430_create_keppler_capsules_capsule_fields.keppler_capsules.rb +0 -12
- data/testing-with-2.1.18/db/migrate/20180806192023_create_keppler_capsules_capsule_validations.keppler_capsules.rb +0 -13
- data/testing-with-2.1.18/db/migrate/20180806203410_create_keppler_frontend_partials.keppler_frontend.rb +0 -13
- data/testing-with-2.1.18/db/migrate/20180807204310_create_keppler_capsules_capsule_associations.keppler_capsules.rb +0 -13
- data/testing-with-2.1.18/db/migrate/20180813160624_create_keppler_languages_languages.keppler_languages.rb +0 -14
- data/testing-with-2.1.18/db/migrate/20180813160625_create_keppler_languages_fields.keppler_languages.rb +0 -14
- data/testing-with-2.1.18/db/migrate/20180818073305_create_active_storage_tables.active_storage.rb +0 -26
- data/testing-with-2.1.18/db/migrate/20180827120841_create_keppler_frontend_callback_functions.keppler_frontend.rb +0 -14
- data/testing-with-2.1.18/db/migrate/20180827154329_create_keppler_frontend_view_callbacks.keppler_frontend.rb +0 -12
- data/testing-with-2.1.18/db/migrate/20180827154647_add_position_to_users_table.rb +0 -5
- data/testing-with-2.1.18/db/migrate/20180830153221_create_keppler_frontend_functions.keppler_frontend.rb +0 -14
- data/testing-with-2.1.18/db/migrate/20180830153222_create_keppler_frontend_parameters.keppler_frontend.rb +0 -13
- data/testing-with-2.1.18/db/migrate/20180904144238_create_seos.rb +0 -11
- data/testing-with-2.1.18/db/seeds.rb +0 -162
- data/testing-with-2.1.18/docs/diagrams/keppler_core/config +0 -0
- data/testing-with-2.1.18/docs/diagrams/keppler_frontend/editor/resources_editor.dia +0 -0
- data/testing-with-2.1.18/docs/diagrams/keppler_frontend/views/create_view.dia +0 -0
- data/testing-with-2.1.18/docs/diagrams/keppler_frontend/views/delete_view.dia +0 -0
- data/testing-with-2.1.18/docs/diagrams/keppler_frontend/views/delete_view.dia.autosave +0 -0
- data/testing-with-2.1.18/lib/generators/install_rocket/USAGE +0 -44
- data/testing-with-2.1.18/lib/generators/install_rocket/install_rocket_generator.rb +0 -107
- data/testing-with-2.1.18/lib/generators/keppler_add_module/USAGE +0 -5
- data/testing-with-2.1.18/lib/generators/keppler_add_module/keppler_add_module_generator.rb +0 -324
- data/testing-with-2.1.18/lib/generators/keppler_add_module/templates/controllers/controller.rb +0 -106
- data/testing-with-2.1.18/lib/generators/keppler_add_module/templates/models/model.rb +0 -29
- data/testing-with-2.1.18/lib/generators/keppler_add_module/templates/policies/policy.rb +0 -11
- data/testing-with-2.1.18/lib/generators/keppler_add_module/templates/views/_description.haml +0 -13
- data/testing-with-2.1.18/lib/generators/keppler_add_module/templates/views/_form.haml +0 -49
- data/testing-with-2.1.18/lib/generators/keppler_add_module/templates/views/_listing.haml +0 -58
- data/testing-with-2.1.18/lib/generators/keppler_add_module/templates/views/edit.haml +0 -1
- data/testing-with-2.1.18/lib/generators/keppler_add_module/templates/views/index.haml +0 -70
- data/testing-with-2.1.18/lib/generators/keppler_add_module/templates/views/new.haml +0 -1
- data/testing-with-2.1.18/lib/generators/keppler_add_module/templates/views/reload.js.haml +0 -5
- data/testing-with-2.1.18/lib/generators/keppler_add_module/templates/views/show.haml +0 -35
- data/testing-with-2.1.18/lib/generators/keppler_delete_module/USAGE +0 -5
- data/testing-with-2.1.18/lib/generators/keppler_delete_module/keppler_delete_module_generator.rb +0 -305
- data/testing-with-2.1.18/lib/generators/keppler_front/keppler_front_generator.rb +0 -139
- data/testing-with-2.1.18/lib/generators/keppler_front/templates/controllers/controller.rb +0 -17
- data/testing-with-2.1.18/lib/generators/keppler_front/templates/views/template.html.haml +0 -225
- data/testing-with-2.1.18/lib/generators/keppler_relation/keppler_relation_generator.rb +0 -219
- data/testing-with-2.1.18/lib/generators/new_rocket/USAGE +0 -44
- data/testing-with-2.1.18/lib/generators/new_rocket/new_rocket_generator.rb +0 -258
- data/testing-with-2.1.18/lib/generators/uninstall_rocket/USAGE +0 -32
- data/testing-with-2.1.18/lib/generators/uninstall_rocket/uninstall_rocket_generator.rb +0 -140
- data/testing-with-2.1.18/lib/keppler_configuration.rb +0 -12
- data/testing-with-2.1.18/lib/plugins/config/locales/en.yml +0 -16
- data/testing-with-2.1.18/lib/plugins/config/locales/es.yml +0 -16
- data/testing-with-2.1.18/lib/plugins/config/menu.yml +0 -16
- data/testing-with-2.1.18/lib/plugins/config/permissions.yml +0 -1
- data/testing-with-2.1.18/lib/plugins/generators/keppler_scaffold/keppler_scaffold_generator.rb +0 -223
- data/testing-with-2.1.18/lib/plugins/generators/keppler_scaffold/templates/controllers/controller.rb +0 -107
- data/testing-with-2.1.18/lib/plugins/generators/keppler_scaffold/templates/models/model.rb +0 -29
- data/testing-with-2.1.18/lib/plugins/generators/keppler_scaffold/templates/policies/policy.rb +0 -14
- data/testing-with-2.1.18/lib/plugins/generators/keppler_scaffold/templates/views/_description.haml +0 -13
- data/testing-with-2.1.18/lib/plugins/generators/keppler_scaffold/templates/views/_form.haml +0 -49
- data/testing-with-2.1.18/lib/plugins/generators/keppler_scaffold/templates/views/_listing.haml +0 -58
- data/testing-with-2.1.18/lib/plugins/generators/keppler_scaffold/templates/views/edit.haml +0 -1
- data/testing-with-2.1.18/lib/plugins/generators/keppler_scaffold/templates/views/index.haml +0 -69
- data/testing-with-2.1.18/lib/plugins/generators/keppler_scaffold/templates/views/new.haml +0 -1
- data/testing-with-2.1.18/lib/plugins/generators/keppler_scaffold/templates/views/reload.js.haml +0 -5
- data/testing-with-2.1.18/lib/plugins/generators/keppler_scaffold/templates/views/show.haml +0 -35
- data/testing-with-2.1.18/lib/plugins/install.rb +0 -151
- data/testing-with-2.1.18/lib/plugins/layouts/application.html.haml +0 -23
- data/testing-with-2.1.18/lib/templates/haml/scaffold/_form.html.haml +0 -10
@@ -1,4463 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* bootstrap-fileinput v4.4.9
|
3
|
-
* http://plugins.krajee.com/file-input
|
4
|
-
*
|
5
|
-
* Author: Kartik Visweswaran
|
6
|
-
* Copyright: 2014 - 2018, Kartik Visweswaran, Krajee.com
|
7
|
-
*
|
8
|
-
* Licensed under the BSD 3-Clause
|
9
|
-
* https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md
|
10
|
-
*/
|
11
|
-
(function (factory) {
|
12
|
-
"use strict";
|
13
|
-
//noinspection JSUnresolvedVariable
|
14
|
-
if (typeof define === 'function' && define.amd) { // jshint ignore:line
|
15
|
-
// AMD. Register as an anonymous module.
|
16
|
-
define(['jquery'], factory); // jshint ignore:line
|
17
|
-
} else { // noinspection JSUnresolvedVariable
|
18
|
-
if (typeof module === 'object' && module.exports) { // jshint ignore:line
|
19
|
-
// Node/CommonJS
|
20
|
-
// noinspection JSUnresolvedVariable
|
21
|
-
module.exports = factory(require('jquery')); // jshint ignore:line
|
22
|
-
} else {
|
23
|
-
// Browser globals
|
24
|
-
factory(window.jQuery);
|
25
|
-
}
|
26
|
-
}
|
27
|
-
}(function ($) {
|
28
|
-
"use strict";
|
29
|
-
|
30
|
-
$.fn.fileinputLocales = {};
|
31
|
-
$.fn.fileinputThemes = {};
|
32
|
-
|
33
|
-
String.prototype.setTokens = function (replacePairs) {
|
34
|
-
var str = this.toString(), key, re;
|
35
|
-
for (key in replacePairs) {
|
36
|
-
if (replacePairs.hasOwnProperty(key)) {
|
37
|
-
re = new RegExp("\{" + key + "\}", "g");
|
38
|
-
str = str.replace(re, replacePairs[key]);
|
39
|
-
}
|
40
|
-
}
|
41
|
-
return str;
|
42
|
-
};
|
43
|
-
|
44
|
-
var $h, FileInput;
|
45
|
-
|
46
|
-
// fileinput helper object for all global variables and internal helper methods
|
47
|
-
//noinspection JSUnresolvedVariable
|
48
|
-
$h = {
|
49
|
-
FRAMES: '.kv-preview-thumb',
|
50
|
-
SORT_CSS: 'file-sortable',
|
51
|
-
OBJECT_PARAMS: '<param name="controller" value="true" />\n' +
|
52
|
-
'<param name="allowFullScreen" value="true" />\n' +
|
53
|
-
'<param name="allowScriptAccess" value="always" />\n' +
|
54
|
-
'<param name="autoPlay" value="false" />\n' +
|
55
|
-
'<param name="autoStart" value="false" />\n' +
|
56
|
-
'<param name="quality" value="high" />\n',
|
57
|
-
DEFAULT_PREVIEW: '<div class="file-preview-other">\n' +
|
58
|
-
'<span class="{previewFileIconClass}">{previewFileIcon}</span>\n' +
|
59
|
-
'</div>',
|
60
|
-
MODAL_ID: 'kvFileinputModal',
|
61
|
-
MODAL_EVENTS: ['show', 'shown', 'hide', 'hidden', 'loaded'],
|
62
|
-
objUrl: window.URL || window.webkitURL,
|
63
|
-
compare: function (input, str, exact) {
|
64
|
-
return input !== undefined && (exact ? input === str : input.match(str));
|
65
|
-
},
|
66
|
-
isIE: function (ver) {
|
67
|
-
// check for IE versions < 11
|
68
|
-
if (navigator.appName !== 'Microsoft Internet Explorer') {
|
69
|
-
return false;
|
70
|
-
}
|
71
|
-
if (ver === 10) {
|
72
|
-
return new RegExp('msie\\s' + ver, 'i').test(navigator.userAgent);
|
73
|
-
}
|
74
|
-
var div = document.createElement("div"), status;
|
75
|
-
div.innerHTML = "<!--[if IE " + ver + "]> <i></i> <![endif]-->";
|
76
|
-
status = div.getElementsByTagName("i").length;
|
77
|
-
document.body.appendChild(div);
|
78
|
-
div.parentNode.removeChild(div);
|
79
|
-
return status;
|
80
|
-
},
|
81
|
-
canAssignFilesToInput: function () {
|
82
|
-
var input = document.createElement('input');
|
83
|
-
try {
|
84
|
-
input.type = "file";
|
85
|
-
input.files = null;
|
86
|
-
return true;
|
87
|
-
} catch (err) {
|
88
|
-
return false;
|
89
|
-
}
|
90
|
-
},
|
91
|
-
getDragDropFolders: function (items) {
|
92
|
-
var i, item, len = items.length, folders = 0;
|
93
|
-
if (len > 0 && items[0].webkitGetAsEntry()) {
|
94
|
-
for (i = 0; i < len; i++) {
|
95
|
-
item = items[i].webkitGetAsEntry();
|
96
|
-
if (item && item.isDirectory) {
|
97
|
-
folders++;
|
98
|
-
}
|
99
|
-
}
|
100
|
-
}
|
101
|
-
return folders;
|
102
|
-
},
|
103
|
-
initModal: function ($modal) {
|
104
|
-
var $body = $('body');
|
105
|
-
if ($body.length) {
|
106
|
-
$modal.appendTo($body);
|
107
|
-
}
|
108
|
-
},
|
109
|
-
isEmpty: function (value, trim) {
|
110
|
-
return value === undefined || value === null || value.length === 0 || (trim && $.trim(value) === '');
|
111
|
-
},
|
112
|
-
isArray: function (a) {
|
113
|
-
return Array.isArray(a) || Object.prototype.toString.call(a) === '[object Array]';
|
114
|
-
},
|
115
|
-
ifSet: function (needle, haystack, def) {
|
116
|
-
def = def || '';
|
117
|
-
return (haystack && typeof haystack === 'object' && needle in haystack) ? haystack[needle] : def;
|
118
|
-
},
|
119
|
-
cleanArray: function (arr) {
|
120
|
-
if (!(arr instanceof Array)) {
|
121
|
-
arr = [];
|
122
|
-
}
|
123
|
-
return arr.filter(function (e) {
|
124
|
-
return (e !== undefined && e !== null);
|
125
|
-
});
|
126
|
-
},
|
127
|
-
spliceArray: function (arr, index, reverseOrder) {
|
128
|
-
var i, j = 0, out = [], newArr;
|
129
|
-
if (!(arr instanceof Array)) {
|
130
|
-
return [];
|
131
|
-
}
|
132
|
-
newArr = $.extend(true, [], arr);
|
133
|
-
if (reverseOrder) {
|
134
|
-
newArr.reverse();
|
135
|
-
}
|
136
|
-
for (i = 0; i < newArr.length; i++) {
|
137
|
-
if (i !== index) {
|
138
|
-
out[j] = newArr[i];
|
139
|
-
j++;
|
140
|
-
}
|
141
|
-
}
|
142
|
-
if (reverseOrder) {
|
143
|
-
out.reverse();
|
144
|
-
}
|
145
|
-
return out;
|
146
|
-
},
|
147
|
-
getNum: function (num, def) {
|
148
|
-
def = def || 0;
|
149
|
-
if (typeof num === "number") {
|
150
|
-
return num;
|
151
|
-
}
|
152
|
-
if (typeof num === "string") {
|
153
|
-
num = parseFloat(num);
|
154
|
-
}
|
155
|
-
return isNaN(num) ? def : num;
|
156
|
-
},
|
157
|
-
hasFileAPISupport: function () {
|
158
|
-
return !!(window.File && window.FileReader);
|
159
|
-
},
|
160
|
-
hasDragDropSupport: function () {
|
161
|
-
var div = document.createElement('div');
|
162
|
-
/** @namespace div.draggable */
|
163
|
-
/** @namespace div.ondragstart */
|
164
|
-
/** @namespace div.ondrop */
|
165
|
-
return !$h.isIE(9) &&
|
166
|
-
(div.draggable !== undefined || (div.ondragstart !== undefined && div.ondrop !== undefined));
|
167
|
-
},
|
168
|
-
hasFileUploadSupport: function () {
|
169
|
-
return $h.hasFileAPISupport() && window.FormData;
|
170
|
-
},
|
171
|
-
hasBlobSupport: function () {
|
172
|
-
try {
|
173
|
-
return !!window.Blob && Boolean(new Blob());
|
174
|
-
} catch (e) {
|
175
|
-
return false;
|
176
|
-
}
|
177
|
-
},
|
178
|
-
hasArrayBufferViewSupport: function () {
|
179
|
-
try {
|
180
|
-
return new Blob([new Uint8Array(100)]).size === 100;
|
181
|
-
} catch (e) {
|
182
|
-
return false;
|
183
|
-
}
|
184
|
-
},
|
185
|
-
dataURI2Blob: function (dataURI) {
|
186
|
-
//noinspection JSUnresolvedVariable
|
187
|
-
var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder ||
|
188
|
-
window.MSBlobBuilder, canBlob = $h.hasBlobSupport(), byteStr, arrayBuffer, intArray, i, mimeStr, bb,
|
189
|
-
canProceed = (canBlob || BlobBuilder) && window.atob && window.ArrayBuffer && window.Uint8Array;
|
190
|
-
if (!canProceed) {
|
191
|
-
return null;
|
192
|
-
}
|
193
|
-
if (dataURI.split(',')[0].indexOf('base64') >= 0) {
|
194
|
-
byteStr = atob(dataURI.split(',')[1]);
|
195
|
-
} else {
|
196
|
-
byteStr = decodeURIComponent(dataURI.split(',')[1]);
|
197
|
-
}
|
198
|
-
arrayBuffer = new ArrayBuffer(byteStr.length);
|
199
|
-
intArray = new Uint8Array(arrayBuffer);
|
200
|
-
for (i = 0; i < byteStr.length; i += 1) {
|
201
|
-
intArray[i] = byteStr.charCodeAt(i);
|
202
|
-
}
|
203
|
-
mimeStr = dataURI.split(',')[0].split(':')[1].split(';')[0];
|
204
|
-
if (canBlob) {
|
205
|
-
return new Blob([$h.hasArrayBufferViewSupport() ? intArray : arrayBuffer], {type: mimeStr});
|
206
|
-
}
|
207
|
-
bb = new BlobBuilder();
|
208
|
-
bb.append(arrayBuffer);
|
209
|
-
return bb.getBlob(mimeStr);
|
210
|
-
},
|
211
|
-
arrayBuffer2String: function (buffer) {
|
212
|
-
//noinspection JSUnresolvedVariable
|
213
|
-
if (window.TextDecoder) {
|
214
|
-
// noinspection JSUnresolvedFunction
|
215
|
-
return new TextDecoder("utf-8").decode(buffer);
|
216
|
-
}
|
217
|
-
var array = Array.prototype.slice.apply(new Uint8Array(buffer)), out = '', i = 0, len, c, char2, char3;
|
218
|
-
len = array.length;
|
219
|
-
while (i < len) {
|
220
|
-
c = array[i++];
|
221
|
-
switch (c >> 4) { // jshint ignore:line
|
222
|
-
case 0:
|
223
|
-
case 1:
|
224
|
-
case 2:
|
225
|
-
case 3:
|
226
|
-
case 4:
|
227
|
-
case 5:
|
228
|
-
case 6:
|
229
|
-
case 7:
|
230
|
-
// 0xxxxxxx
|
231
|
-
out += String.fromCharCode(c);
|
232
|
-
break;
|
233
|
-
case 12:
|
234
|
-
case 13:
|
235
|
-
// 110x xxxx 10xx xxxx
|
236
|
-
char2 = array[i++];
|
237
|
-
out += String.fromCharCode(((c & 0x1F) << 6) | (char2 & 0x3F)); // jshint ignore:line
|
238
|
-
break;
|
239
|
-
case 14:
|
240
|
-
// 1110 xxxx 10xx xxxx 10xx xxxx
|
241
|
-
char2 = array[i++];
|
242
|
-
char3 = array[i++];
|
243
|
-
out += String.fromCharCode(((c & 0x0F) << 12) | // jshint ignore:line
|
244
|
-
((char2 & 0x3F) << 6) | // jshint ignore:line
|
245
|
-
((char3 & 0x3F) << 0)); // jshint ignore:line
|
246
|
-
break;
|
247
|
-
}
|
248
|
-
}
|
249
|
-
return out;
|
250
|
-
},
|
251
|
-
isHtml: function (str) {
|
252
|
-
var a = document.createElement('div');
|
253
|
-
a.innerHTML = str;
|
254
|
-
for (var c = a.childNodes, i = c.length; i--;) {
|
255
|
-
if (c[i].nodeType === 1) {
|
256
|
-
return true;
|
257
|
-
}
|
258
|
-
}
|
259
|
-
return false;
|
260
|
-
},
|
261
|
-
isSvg: function (str) {
|
262
|
-
return str.match(/^\s*<\?xml/i) && (str.match(/<!DOCTYPE svg/i) || str.match(/<svg/i));
|
263
|
-
},
|
264
|
-
getMimeType: function (signature, contents, type) {
|
265
|
-
switch (signature) {
|
266
|
-
case "ffd8ffe0":
|
267
|
-
case "ffd8ffe1":
|
268
|
-
case "ffd8ffe2":
|
269
|
-
return 'image/jpeg';
|
270
|
-
case '89504E47':
|
271
|
-
return 'image/png';
|
272
|
-
case '47494638':
|
273
|
-
return 'image/gif';
|
274
|
-
case '49492a00':
|
275
|
-
return 'image/tiff';
|
276
|
-
case '52494646':
|
277
|
-
return 'image/webp';
|
278
|
-
case '66747970':
|
279
|
-
return 'video/3gp';
|
280
|
-
case '4f676753':
|
281
|
-
return 'video/ogg';
|
282
|
-
case '1a45dfa3':
|
283
|
-
return 'video/mkv';
|
284
|
-
case '000001ba':
|
285
|
-
case '000001b3':
|
286
|
-
return 'video/mpeg';
|
287
|
-
case '3026b275':
|
288
|
-
return 'video/wmv';
|
289
|
-
case '25504446':
|
290
|
-
return 'application/pdf';
|
291
|
-
case '25215053':
|
292
|
-
return 'application/ps';
|
293
|
-
case '504b0304':
|
294
|
-
case '504b0506':
|
295
|
-
case '504b0508':
|
296
|
-
return 'application/zip';
|
297
|
-
case '377abcaf':
|
298
|
-
return 'application/7z';
|
299
|
-
case '75737461':
|
300
|
-
return 'application/tar';
|
301
|
-
case '7801730d':
|
302
|
-
return 'application/dmg';
|
303
|
-
default:
|
304
|
-
switch (signature.substring(0, 6)) {
|
305
|
-
case '435753':
|
306
|
-
return 'application/x-shockwave-flash';
|
307
|
-
case '494433':
|
308
|
-
return 'audio/mp3';
|
309
|
-
case '425a68':
|
310
|
-
return 'application/bzip';
|
311
|
-
default:
|
312
|
-
switch (signature.substring(0, 4)) {
|
313
|
-
case '424d':
|
314
|
-
return 'image/bmp';
|
315
|
-
case 'fffb':
|
316
|
-
return 'audio/mp3';
|
317
|
-
case '4d5a':
|
318
|
-
return 'application/exe';
|
319
|
-
case '1f9d':
|
320
|
-
case '1fa0':
|
321
|
-
return 'application/zip';
|
322
|
-
case '1f8b':
|
323
|
-
return 'application/gzip';
|
324
|
-
default:
|
325
|
-
return contents && !contents.match(/[^\u0000-\u007f]/) ? 'application/text-plain' : type;
|
326
|
-
}
|
327
|
-
}
|
328
|
-
}
|
329
|
-
},
|
330
|
-
addCss: function ($el, css) {
|
331
|
-
$el.removeClass(css).addClass(css);
|
332
|
-
},
|
333
|
-
getElement: function (options, param, value) {
|
334
|
-
return ($h.isEmpty(options) || $h.isEmpty(options[param])) ? value : $(options[param]);
|
335
|
-
},
|
336
|
-
uniqId: function () {
|
337
|
-
return Math.round(new Date().getTime()) + '_' + Math.round(Math.random() * 100);
|
338
|
-
},
|
339
|
-
htmlEncode: function (str) {
|
340
|
-
return str.replace(/&/g, '&')
|
341
|
-
.replace(/</g, '<')
|
342
|
-
.replace(/>/g, '>')
|
343
|
-
.replace(/"/g, '"')
|
344
|
-
.replace(/'/g, ''');
|
345
|
-
},
|
346
|
-
replaceTags: function (str, tags) {
|
347
|
-
var out = str;
|
348
|
-
if (!tags) {
|
349
|
-
return out;
|
350
|
-
}
|
351
|
-
$.each(tags, function (key, value) {
|
352
|
-
if (typeof value === "function") {
|
353
|
-
value = value();
|
354
|
-
}
|
355
|
-
out = out.split(key).join(value);
|
356
|
-
});
|
357
|
-
return out;
|
358
|
-
},
|
359
|
-
cleanMemory: function ($thumb) {
|
360
|
-
var data = $thumb.is('img') ? $thumb.attr('src') : $thumb.find('source').attr('src');
|
361
|
-
/** @namespace $h.objUrl.revokeObjectURL */
|
362
|
-
$h.objUrl.revokeObjectURL(data);
|
363
|
-
},
|
364
|
-
findFileName: function (filePath) {
|
365
|
-
var sepIndex = filePath.lastIndexOf('/');
|
366
|
-
if (sepIndex === -1) {
|
367
|
-
sepIndex = filePath.lastIndexOf('\\');
|
368
|
-
}
|
369
|
-
return filePath.split(filePath.substring(sepIndex, sepIndex + 1)).pop();
|
370
|
-
},
|
371
|
-
checkFullScreen: function () {
|
372
|
-
//noinspection JSUnresolvedVariable
|
373
|
-
return document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement ||
|
374
|
-
document.msFullscreenElement;
|
375
|
-
},
|
376
|
-
toggleFullScreen: function (maximize) {
|
377
|
-
var doc = document, de = doc.documentElement;
|
378
|
-
if (de && maximize && !$h.checkFullScreen()) {
|
379
|
-
/** @namespace document.requestFullscreen */
|
380
|
-
/** @namespace document.msRequestFullscreen */
|
381
|
-
/** @namespace document.mozRequestFullScreen */
|
382
|
-
/** @namespace document.webkitRequestFullscreen */
|
383
|
-
/** @namespace Element.ALLOW_KEYBOARD_INPUT */
|
384
|
-
if (de.requestFullscreen) {
|
385
|
-
de.requestFullscreen();
|
386
|
-
} else if (de.msRequestFullscreen) {
|
387
|
-
de.msRequestFullscreen();
|
388
|
-
} else if (de.mozRequestFullScreen) {
|
389
|
-
de.mozRequestFullScreen();
|
390
|
-
} else if (de.webkitRequestFullscreen) {
|
391
|
-
de.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
|
392
|
-
}
|
393
|
-
} else {
|
394
|
-
/** @namespace document.exitFullscreen */
|
395
|
-
/** @namespace document.msExitFullscreen */
|
396
|
-
/** @namespace document.mozCancelFullScreen */
|
397
|
-
/** @namespace document.webkitExitFullscreen */
|
398
|
-
if (doc.exitFullscreen) {
|
399
|
-
doc.exitFullscreen();
|
400
|
-
} else if (doc.msExitFullscreen) {
|
401
|
-
doc.msExitFullscreen();
|
402
|
-
} else if (doc.mozCancelFullScreen) {
|
403
|
-
doc.mozCancelFullScreen();
|
404
|
-
} else if (doc.webkitExitFullscreen) {
|
405
|
-
doc.webkitExitFullscreen();
|
406
|
-
}
|
407
|
-
}
|
408
|
-
},
|
409
|
-
moveArray: function (arr, oldIndex, newIndex, reverseOrder) {
|
410
|
-
var newArr = $.extend(true, [], arr);
|
411
|
-
if (reverseOrder) {
|
412
|
-
newArr.reverse();
|
413
|
-
}
|
414
|
-
if (newIndex >= newArr.length) {
|
415
|
-
var k = newIndex - newArr.length;
|
416
|
-
while ((k--) + 1) {
|
417
|
-
newArr.push(undefined);
|
418
|
-
}
|
419
|
-
}
|
420
|
-
newArr.splice(newIndex, 0, newArr.splice(oldIndex, 1)[0]);
|
421
|
-
if (reverseOrder) {
|
422
|
-
newArr.reverse();
|
423
|
-
}
|
424
|
-
return newArr;
|
425
|
-
},
|
426
|
-
cleanZoomCache: function ($el) {
|
427
|
-
var $cache = $el.closest('.kv-zoom-cache-theme');
|
428
|
-
if (!$cache.length) {
|
429
|
-
$cache = $el.closest('.kv-zoom-cache');
|
430
|
-
}
|
431
|
-
$cache.remove();
|
432
|
-
},
|
433
|
-
setOrientation: function (buffer, callback) {
|
434
|
-
var scanner = new DataView(buffer), idx = 0, value = 1, // Non-rotated is the default
|
435
|
-
maxBytes, uInt16, exifLength;
|
436
|
-
if (scanner.getUint16(idx) !== 0xFFD8 || buffer.length < 2) { // not a proper JPEG
|
437
|
-
if (callback) {
|
438
|
-
callback();
|
439
|
-
}
|
440
|
-
return;
|
441
|
-
}
|
442
|
-
idx += 2;
|
443
|
-
maxBytes = scanner.byteLength;
|
444
|
-
while (idx < maxBytes - 2) {
|
445
|
-
uInt16 = scanner.getUint16(idx);
|
446
|
-
idx += 2;
|
447
|
-
switch (uInt16) {
|
448
|
-
case 0xFFE1: // Start of EXIF
|
449
|
-
exifLength = scanner.getUint16(idx);
|
450
|
-
maxBytes = exifLength - idx;
|
451
|
-
idx += 2;
|
452
|
-
break;
|
453
|
-
case 0x0112: // Orientation tag
|
454
|
-
value = scanner.getUint16(idx + 6, false);
|
455
|
-
maxBytes = 0; // Stop scanning
|
456
|
-
break;
|
457
|
-
}
|
458
|
-
}
|
459
|
-
if (callback) {
|
460
|
-
callback(value);
|
461
|
-
}
|
462
|
-
},
|
463
|
-
validateOrientation: function (file, callback) {
|
464
|
-
if (!window.FileReader || !window.DataView) {
|
465
|
-
return; // skip orientation if pre-requisite libraries not supported by browser
|
466
|
-
}
|
467
|
-
var reader = new FileReader(), buffer;
|
468
|
-
reader.onloadend = function () {
|
469
|
-
buffer = reader.result;
|
470
|
-
$h.setOrientation(buffer, callback);
|
471
|
-
};
|
472
|
-
reader.readAsArrayBuffer(file);
|
473
|
-
},
|
474
|
-
adjustOrientedImage: function ($img, isZoom) {
|
475
|
-
var offsetContTop, offsetTop, newTop;
|
476
|
-
if (!$img.hasClass('is-portrait-gt4')) {
|
477
|
-
return;
|
478
|
-
}
|
479
|
-
if (isZoom) {
|
480
|
-
$img.css({width: $img.parent().height()});
|
481
|
-
return;
|
482
|
-
} else {
|
483
|
-
$img.css({height: 'auto', width: $img.height()});
|
484
|
-
}
|
485
|
-
offsetContTop = $img.parent().offset().top;
|
486
|
-
offsetTop = $img.offset().top;
|
487
|
-
newTop = offsetContTop - offsetTop;
|
488
|
-
$img.css('margin-top', newTop);
|
489
|
-
},
|
490
|
-
closeButton: function (css) {
|
491
|
-
css = css ? 'close ' + css : 'close';
|
492
|
-
return '<button type="button" class="' + css + '" aria-label="Close">\n' +
|
493
|
-
' <span aria-hidden="true">×</span>\n' +
|
494
|
-
'</button>';
|
495
|
-
}
|
496
|
-
};
|
497
|
-
FileInput = function (element, options) {
|
498
|
-
var self = this;
|
499
|
-
self.$element = $(element);
|
500
|
-
self.$parent = self.$element.parent();
|
501
|
-
if (!self._validate()) {
|
502
|
-
return;
|
503
|
-
}
|
504
|
-
self.isPreviewable = $h.hasFileAPISupport();
|
505
|
-
self.isIE9 = $h.isIE(9);
|
506
|
-
self.isIE10 = $h.isIE(10);
|
507
|
-
if (self.isPreviewable || self.isIE9) {
|
508
|
-
self._init(options);
|
509
|
-
self._listen();
|
510
|
-
}
|
511
|
-
self.$element.removeClass('file-loading');
|
512
|
-
};
|
513
|
-
//noinspection JSUnusedGlobalSymbols
|
514
|
-
FileInput.prototype = {
|
515
|
-
constructor: FileInput,
|
516
|
-
_cleanup: function () {
|
517
|
-
var self = this;
|
518
|
-
self.reader = null;
|
519
|
-
self.formdata = {};
|
520
|
-
self.uploadCount = 0;
|
521
|
-
self.uploadStatus = {};
|
522
|
-
self.uploadLog = [];
|
523
|
-
self.uploadAsyncCount = 0;
|
524
|
-
self.loadedImages = [];
|
525
|
-
self.totalImagesCount = 0;
|
526
|
-
self.ajaxRequests = [];
|
527
|
-
self.clearStack();
|
528
|
-
self.fileBatchCompleted = true;
|
529
|
-
if (!self.isPreviewable) {
|
530
|
-
self.showPreview = false;
|
531
|
-
}
|
532
|
-
self.isError = false;
|
533
|
-
self.ajaxAborted = false;
|
534
|
-
self.cancelling = false;
|
535
|
-
},
|
536
|
-
_init: function (options, refreshMode) {
|
537
|
-
var self = this, f, $el = self.$element, $cont, t, tmp;
|
538
|
-
self.options = options;
|
539
|
-
$.each(options, function (key, value) {
|
540
|
-
switch (key) {
|
541
|
-
case 'minFileCount':
|
542
|
-
case 'maxFileCount':
|
543
|
-
case 'minFileSize':
|
544
|
-
case 'maxFileSize':
|
545
|
-
case 'maxFilePreviewSize':
|
546
|
-
case 'resizeImageQuality':
|
547
|
-
case 'resizeIfSizeMoreThan':
|
548
|
-
case 'progressUploadThreshold':
|
549
|
-
case 'initialPreviewCount':
|
550
|
-
case 'zoomModalHeight':
|
551
|
-
case 'minImageHeight':
|
552
|
-
case 'maxImageHeight':
|
553
|
-
case 'minImageWidth':
|
554
|
-
case 'maxImageWidth':
|
555
|
-
self[key] = $h.getNum(value);
|
556
|
-
break;
|
557
|
-
default:
|
558
|
-
self[key] = value;
|
559
|
-
break;
|
560
|
-
}
|
561
|
-
});
|
562
|
-
if (self.rtl) { // swap buttons for rtl
|
563
|
-
tmp = self.previewZoomButtonIcons.prev;
|
564
|
-
self.previewZoomButtonIcons.prev = self.previewZoomButtonIcons.next;
|
565
|
-
self.previewZoomButtonIcons.next = tmp;
|
566
|
-
}
|
567
|
-
if (!refreshMode) {
|
568
|
-
self._cleanup();
|
569
|
-
}
|
570
|
-
self.$form = $el.closest('form');
|
571
|
-
self._initTemplateDefaults();
|
572
|
-
self.uploadFileAttr = !$h.isEmpty($el.attr('name')) ? $el.attr('name') : 'file_data';
|
573
|
-
t = self._getLayoutTemplate('progress');
|
574
|
-
self.progressTemplate = t.replace('{class}', self.progressClass);
|
575
|
-
self.progressCompleteTemplate = t.replace('{class}', self.progressCompleteClass);
|
576
|
-
self.progressErrorTemplate = t.replace('{class}', self.progressErrorClass);
|
577
|
-
self.isDisabled = $el.attr('disabled') || $el.attr('readonly');
|
578
|
-
if (self.isDisabled) {
|
579
|
-
$el.attr('disabled', true);
|
580
|
-
}
|
581
|
-
self.isAjaxUpload = $h.hasFileUploadSupport() && !$h.isEmpty(self.uploadUrl);
|
582
|
-
self.dropZoneEnabled = $h.hasDragDropSupport() && self.dropZoneEnabled;
|
583
|
-
if (!self.isAjaxUpload) {
|
584
|
-
self.dropZoneEnabled = self.dropZoneEnabled && $h.canAssignFilesToInput();
|
585
|
-
}
|
586
|
-
self.isClickable = self.browseOnZoneClick && self.showPreview &&
|
587
|
-
(self.dropZoneEnabled || !$h.isEmpty(self.defaultPreviewContent));
|
588
|
-
self.slug = typeof options.slugCallback === "function" ? options.slugCallback : self._slugDefault;
|
589
|
-
self.mainTemplate = self.showCaption ? self._getLayoutTemplate('main1') : self._getLayoutTemplate('main2');
|
590
|
-
self.captionTemplate = self._getLayoutTemplate('caption');
|
591
|
-
self.previewGenericTemplate = self._getPreviewTemplate('generic');
|
592
|
-
if (!self.imageCanvas && self.resizeImage && (self.maxImageWidth || self.maxImageHeight)) {
|
593
|
-
self.imageCanvas = document.createElement('canvas');
|
594
|
-
self.imageCanvasContext = self.imageCanvas.getContext('2d');
|
595
|
-
}
|
596
|
-
if ($h.isEmpty($el.attr('id'))) {
|
597
|
-
$el.attr('id', $h.uniqId());
|
598
|
-
}
|
599
|
-
self.namespace = '.fileinput_' + $el.attr('id').replace(/-/g, '_');
|
600
|
-
if (self.$container === undefined) {
|
601
|
-
self.$container = self._createContainer();
|
602
|
-
} else {
|
603
|
-
self._refreshContainer();
|
604
|
-
}
|
605
|
-
$cont = self.$container;
|
606
|
-
self.$dropZone = $cont.find('.file-drop-zone');
|
607
|
-
self.$progress = $cont.find('.kv-upload-progress');
|
608
|
-
self.$btnUpload = $cont.find('.fileinput-upload');
|
609
|
-
self.$captionContainer = $h.getElement(options, 'elCaptionContainer', $cont.find('.file-caption'));
|
610
|
-
self.$caption = $h.getElement(options, 'elCaptionText', $cont.find('.file-caption-name'));
|
611
|
-
if (!$h.isEmpty(self.msgPlaceholder)) {
|
612
|
-
f = $el.attr('multiple') ? self.filePlural : self.fileSingle;
|
613
|
-
self.$caption.attr('placeholder', self.msgPlaceholder.replace('{files}', f));
|
614
|
-
}
|
615
|
-
self.$captionIcon = self.$captionContainer.find('.file-caption-icon');
|
616
|
-
self.$previewContainer = $h.getElement(options, 'elPreviewContainer', $cont.find('.file-preview'));
|
617
|
-
self.$preview = $h.getElement(options, 'elPreviewImage', $cont.find('.file-preview-thumbnails'));
|
618
|
-
self.$previewStatus = $h.getElement(options, 'elPreviewStatus', $cont.find('.file-preview-status'));
|
619
|
-
self.$errorContainer = $h.getElement(options, 'elErrorContainer', self.$previewContainer.find('.kv-fileinput-error'));
|
620
|
-
self._validateDisabled();
|
621
|
-
if (!$h.isEmpty(self.msgErrorClass)) {
|
622
|
-
$h.addCss(self.$errorContainer, self.msgErrorClass);
|
623
|
-
}
|
624
|
-
if (!refreshMode) {
|
625
|
-
self.$errorContainer.hide();
|
626
|
-
self.previewInitId = "preview-" + $h.uniqId();
|
627
|
-
self._initPreviewCache();
|
628
|
-
self._initPreview(true);
|
629
|
-
self._initPreviewActions();
|
630
|
-
if (self.$parent.hasClass('file-loading')) {
|
631
|
-
self.$container.insertBefore(self.$parent);
|
632
|
-
self.$parent.remove();
|
633
|
-
}
|
634
|
-
} else {
|
635
|
-
if (!self._errorsExist()) {
|
636
|
-
self.$errorContainer.hide();
|
637
|
-
}
|
638
|
-
}
|
639
|
-
self._setFileDropZoneTitle();
|
640
|
-
if ($el.attr('disabled')) {
|
641
|
-
self.disable();
|
642
|
-
}
|
643
|
-
self._initZoom();
|
644
|
-
if (self.hideThumbnailContent) {
|
645
|
-
$h.addCss(self.$preview, 'hide-content');
|
646
|
-
}
|
647
|
-
},
|
648
|
-
_initTemplateDefaults: function () {
|
649
|
-
var self = this, tMain1, tMain2, tPreview, tFileIcon, tClose, tCaption, tBtnDefault, tBtnLink, tBtnBrowse,
|
650
|
-
tModalMain, tModal, tProgress, tSize, tFooter, tActions, tActionDelete, tActionUpload, tActionDownload,
|
651
|
-
tActionZoom, tActionDrag, tIndicator, tTagBef, tTagBef1, tTagBef2, tTagAft, tGeneric, tHtml, tImage,
|
652
|
-
tText, tOffice, tGdocs, tVideo, tAudio, tFlash, tObject, tPdf, tOther, tStyle, tZoomCache, vDefaultDim;
|
653
|
-
tMain1 = '{preview}\n' +
|
654
|
-
'<div class="kv-upload-progress kv-hidden"></div><div class="clearfix"></div>\n' +
|
655
|
-
'<div class="input-group {class}">\n' +
|
656
|
-
' {caption}\n' +
|
657
|
-
'<div class="input-group-btn input-group-append">\n' +
|
658
|
-
' {remove}\n' +
|
659
|
-
' {cancel}\n' +
|
660
|
-
' {upload}\n' +
|
661
|
-
' {browse}\n' +
|
662
|
-
' </div>\n' +
|
663
|
-
'</div>';
|
664
|
-
tMain2 = '{preview}\n<div class="kv-upload-progress kv-hidden"></div>\n<div class="clearfix"></div>\n{remove}\n{cancel}\n{upload}\n{browse}\n';
|
665
|
-
tPreview = '<div class="file-preview {class}">\n' +
|
666
|
-
' {close}' +
|
667
|
-
' <div class="{dropClass}">\n' +
|
668
|
-
' <div class="file-preview-thumbnails">\n' +
|
669
|
-
' </div>\n' +
|
670
|
-
' <div class="clearfix"></div>' +
|
671
|
-
' <div class="file-preview-status text-center text-success"></div>\n' +
|
672
|
-
' <div class="kv-fileinput-error"></div>\n' +
|
673
|
-
' </div>\n' +
|
674
|
-
'</div>';
|
675
|
-
tClose = $h.closeButton('fileinput-remove');
|
676
|
-
tFileIcon = '<i class="glyphicon glyphicon-file"></i>';
|
677
|
-
// noinspection HtmlUnknownAttribute
|
678
|
-
tCaption = '<div class="file-caption form-control {class}" tabindex="500">\n' +
|
679
|
-
' <span class="file-caption-icon"></span>\n' +
|
680
|
-
' <input class="file-caption-name" onkeydown="return false;" onpaste="return false;">\n' +
|
681
|
-
'</div>';
|
682
|
-
//noinspection HtmlUnknownAttribute
|
683
|
-
tBtnDefault = '<button type="{type}" tabindex="500" title="{title}" class="{css}" ' +
|
684
|
-
'{status}>{icon} {label}</button>';
|
685
|
-
//noinspection HtmlUnknownAttribute
|
686
|
-
tBtnLink = '<a href="{href}" tabindex="500" title="{title}" class="{css}" {status}>{icon} {label}</a>';
|
687
|
-
//noinspection HtmlUnknownAttribute
|
688
|
-
tBtnBrowse = '<div tabindex="500" class="{css}" {status}>{icon} {label}</div>';
|
689
|
-
tModalMain = '<div id="' + $h.MODAL_ID + '" class="file-zoom-dialog modal fade" ' +
|
690
|
-
'tabindex="-1" aria-labelledby="' + $h.MODAL_ID + 'Label"></div>';
|
691
|
-
tModal = '<div class="modal-dialog modal-lg{rtl}" role="document">\n' +
|
692
|
-
' <div class="modal-content">\n' +
|
693
|
-
' <div class="modal-header">\n' +
|
694
|
-
' <h5 class="modal-title">{heading}</h5>\n' +
|
695
|
-
' <span class="kv-zoom-title"></span>\n' +
|
696
|
-
' <div class="kv-zoom-actions">{toggleheader}{fullscreen}{borderless}{close}</div>\n' +
|
697
|
-
' </div>\n' +
|
698
|
-
' <div class="modal-body">\n' +
|
699
|
-
' <div class="floating-buttons"></div>\n' +
|
700
|
-
' <div class="kv-zoom-body file-zoom-content {zoomFrameClass}"></div>\n' + '{prev} {next}\n' +
|
701
|
-
' </div>\n' +
|
702
|
-
' </div>\n' +
|
703
|
-
'</div>\n';
|
704
|
-
tProgress = '<div class="progress">\n' +
|
705
|
-
' <div class="{class}" role="progressbar"' +
|
706
|
-
' aria-valuenow="{percent}" aria-valuemin="0" aria-valuemax="100" style="width:{percent}%;">\n' +
|
707
|
-
' {status}\n' +
|
708
|
-
' </div>\n' +
|
709
|
-
'</div>';
|
710
|
-
tSize = ' <samp>({sizeText})</samp>';
|
711
|
-
tFooter = '<div class="file-thumbnail-footer">\n' +
|
712
|
-
' <div class="file-footer-caption" title="{caption}">\n' +
|
713
|
-
' <div class="file-caption-info">{caption}</div>\n' +
|
714
|
-
' <div class="file-size-info">{size}</div>\n' +
|
715
|
-
' </div>\n' +
|
716
|
-
' {progress}\n{indicator}\n{actions}\n' +
|
717
|
-
'</div>';
|
718
|
-
tActions = '<div class="file-actions">\n' +
|
719
|
-
' <div class="file-footer-buttons">\n' +
|
720
|
-
' {download} {upload} {delete} {zoom} {other}' +
|
721
|
-
' </div>\n' +
|
722
|
-
'</div>\n' +
|
723
|
-
'{drag}\n' +
|
724
|
-
'<div class="clearfix"></div>';
|
725
|
-
//noinspection HtmlUnknownAttribute
|
726
|
-
tActionDelete = '<button type="button" class="kv-file-remove {removeClass}" ' +
|
727
|
-
'title="{removeTitle}" {dataUrl}{dataKey}>{removeIcon}</button>\n';
|
728
|
-
tActionUpload = '<button type="button" class="kv-file-upload {uploadClass}" title="{uploadTitle}">' +
|
729
|
-
'{uploadIcon}</button>';
|
730
|
-
tActionDownload = '<a class="kv-file-download {downloadClass}" title="{downloadTitle}" ' +
|
731
|
-
'href="{downloadUrl}" download="{caption}" target="_blank">{downloadIcon}</a>';
|
732
|
-
tActionZoom = '<button type="button" class="kv-file-zoom {zoomClass}" ' +
|
733
|
-
'title="{zoomTitle}">{zoomIcon}</button>';
|
734
|
-
tActionDrag = '<span class="file-drag-handle {dragClass}" title="{dragTitle}">{dragIcon}</span>';
|
735
|
-
tIndicator = '<div class="file-upload-indicator" title="{indicatorTitle}">{indicator}</div>';
|
736
|
-
tTagBef = '<div class="file-preview-frame {frameClass}" id="{previewId}" data-fileindex="{fileindex}"' +
|
737
|
-
' data-template="{template}"';
|
738
|
-
tTagBef1 = tTagBef + '><div class="kv-file-content">\n';
|
739
|
-
tTagBef2 = tTagBef + ' title="{caption}"><div class="kv-file-content">\n';
|
740
|
-
tTagAft = '</div>{footer}\n</div>\n';
|
741
|
-
tGeneric = '{content}\n';
|
742
|
-
tStyle = ' {style}';
|
743
|
-
tHtml = '<div class="kv-preview-data file-preview-html" title="{caption}"' + tStyle + '>{data}</div>\n';
|
744
|
-
tImage = '<img src="{data}" class="file-preview-image kv-preview-data" title="{caption}" ' +
|
745
|
-
'alt="{caption}"' + tStyle + '>\n';
|
746
|
-
tText = '<textarea class="kv-preview-data file-preview-text" title="{caption}" readonly' + tStyle + '>' +
|
747
|
-
'{data}</textarea>\n';
|
748
|
-
tOffice = '<iframe class="kv-preview-data file-preview-office" ' +
|
749
|
-
'src="https://view.officeapps.live.com/op/embed.aspx?src={data}"' + tStyle + '></iframe>';
|
750
|
-
tGdocs = '<iframe class="kv-preview-data file-preview-gdocs" ' +
|
751
|
-
'src="https://docs.google.com/gview?url={data}&embedded=true"' + tStyle + '></iframe>';
|
752
|
-
tVideo = '<video class="kv-preview-data file-preview-video" controls' + tStyle + '>\n' +
|
753
|
-
'<source src="{data}" type="{type}">\n' + $h.DEFAULT_PREVIEW + '\n</video>\n';
|
754
|
-
tAudio = '<!--suppress ALL --><audio class="kv-preview-data file-preview-audio" controls' + tStyle + '>\n<source src="{data}" ' +
|
755
|
-
'type="{type}">\n' + $h.DEFAULT_PREVIEW + '\n</audio>\n';
|
756
|
-
tFlash = '<embed class="kv-preview-data file-preview-flash" src="{data}" type="application/x-shockwave-flash"' + tStyle + '>\n';
|
757
|
-
tPdf = '<embed class="kv-preview-data file-preview-pdf" src="{data}" type="application/pdf"' + tStyle + '>\n';
|
758
|
-
tObject = '<object class="kv-preview-data file-preview-object file-object {typeCss}" ' +
|
759
|
-
'data="{data}" type="{type}"' + tStyle + '>\n' + '<param name="movie" value="{caption}" />\n' +
|
760
|
-
$h.OBJECT_PARAMS + ' ' + $h.DEFAULT_PREVIEW + '\n</object>\n';
|
761
|
-
tOther = '<div class="kv-preview-data file-preview-other-frame"' + tStyle + '>\n' + $h.DEFAULT_PREVIEW + '\n</div>\n';
|
762
|
-
tZoomCache = '<div class="kv-zoom-cache" style="display:none">{zoomContent}</div>';
|
763
|
-
vDefaultDim = {width: "100%", height: "100%", 'min-height': "480px"};
|
764
|
-
self.defaults = {
|
765
|
-
layoutTemplates: {
|
766
|
-
main1: tMain1,
|
767
|
-
main2: tMain2,
|
768
|
-
preview: tPreview,
|
769
|
-
close: tClose,
|
770
|
-
fileIcon: tFileIcon,
|
771
|
-
caption: tCaption,
|
772
|
-
modalMain: tModalMain,
|
773
|
-
modal: tModal,
|
774
|
-
progress: tProgress,
|
775
|
-
size: tSize,
|
776
|
-
footer: tFooter,
|
777
|
-
indicator: tIndicator,
|
778
|
-
actions: tActions,
|
779
|
-
actionDelete: tActionDelete,
|
780
|
-
actionUpload: tActionUpload,
|
781
|
-
actionDownload: tActionDownload,
|
782
|
-
actionZoom: tActionZoom,
|
783
|
-
actionDrag: tActionDrag,
|
784
|
-
btnDefault: tBtnDefault,
|
785
|
-
btnLink: tBtnLink,
|
786
|
-
btnBrowse: tBtnBrowse,
|
787
|
-
zoomCache: tZoomCache
|
788
|
-
},
|
789
|
-
previewMarkupTags: {
|
790
|
-
tagBefore1: tTagBef1,
|
791
|
-
tagBefore2: tTagBef2,
|
792
|
-
tagAfter: tTagAft
|
793
|
-
},
|
794
|
-
previewContentTemplates: {
|
795
|
-
generic: tGeneric,
|
796
|
-
html: tHtml,
|
797
|
-
image: tImage,
|
798
|
-
text: tText,
|
799
|
-
office: tOffice,
|
800
|
-
gdocs: tGdocs,
|
801
|
-
video: tVideo,
|
802
|
-
audio: tAudio,
|
803
|
-
flash: tFlash,
|
804
|
-
object: tObject,
|
805
|
-
pdf: tPdf,
|
806
|
-
other: tOther
|
807
|
-
},
|
808
|
-
allowedPreviewTypes: ['image', 'html', 'text', 'video', 'audio', 'flash', 'pdf', 'object'],
|
809
|
-
previewTemplates: {},
|
810
|
-
previewSettings: {
|
811
|
-
image: {width: "auto", height: "auto", 'max-width': "100%", 'max-height': "100%"},
|
812
|
-
html: {width: "213px", height: "160px"},
|
813
|
-
text: {width: "213px", height: "160px"},
|
814
|
-
office: {width: "213px", height: "160px"},
|
815
|
-
gdocs: {width: "213px", height: "160px"},
|
816
|
-
video: {width: "213px", height: "160px"},
|
817
|
-
audio: {width: "100%", height: "30px"},
|
818
|
-
flash: {width: "213px", height: "160px"},
|
819
|
-
object: {width: "213px", height: "160px"},
|
820
|
-
pdf: {width: "213px", height: "160px"},
|
821
|
-
other: {width: "213px", height: "160px"}
|
822
|
-
},
|
823
|
-
previewSettingsSmall: {
|
824
|
-
image: {width: "auto", height: "auto", 'max-width': "100%", 'max-height': "100%"},
|
825
|
-
html: {width: "100%", height: "160px"},
|
826
|
-
text: {width: "100%", height: "160px"},
|
827
|
-
office: {width: "100%", height: "160px"},
|
828
|
-
gdocs: {width: "100%", height: "160px"},
|
829
|
-
video: {width: "100%", height: "auto"},
|
830
|
-
audio: {width: "100%", height: "30px"},
|
831
|
-
flash: {width: "100%", height: "auto"},
|
832
|
-
object: {width: "100%", height: "auto"},
|
833
|
-
pdf: {width: "100%", height: "160px"},
|
834
|
-
other: {width: "100%", height: "160px"}
|
835
|
-
},
|
836
|
-
previewZoomSettings: {
|
837
|
-
image: {width: "auto", height: "auto", 'max-width': "100%", 'max-height': "100%"},
|
838
|
-
html: vDefaultDim,
|
839
|
-
text: vDefaultDim,
|
840
|
-
office: {width: "100%", height: "100%", 'max-width': "100%", 'min-height': "480px"},
|
841
|
-
gdocs: {width: "100%", height: "100%", 'max-width': "100%", 'min-height': "480px"},
|
842
|
-
video: {width: "auto", height: "100%", 'max-width': "100%"},
|
843
|
-
audio: {width: "100%", height: "30px"},
|
844
|
-
flash: {width: "auto", height: "480px"},
|
845
|
-
object: {width: "auto", height: "100%", 'max-width': "100%", 'min-height': "480px"},
|
846
|
-
pdf: vDefaultDim,
|
847
|
-
other: {width: "auto", height: "100%", 'min-height': "480px"}
|
848
|
-
},
|
849
|
-
fileTypeSettings: {
|
850
|
-
image: function (vType, vName) {
|
851
|
-
return ($h.compare(vType, 'image.*') && !$h.compare(vType, /(tiff?|wmf)$/i) ||
|
852
|
-
$h.compare(vName, /\.(gif|png|jpe?g)$/i));
|
853
|
-
},
|
854
|
-
html: function (vType, vName) {
|
855
|
-
return $h.compare(vType, 'text/html') || $h.compare(vName, /\.(htm|html)$/i);
|
856
|
-
},
|
857
|
-
office: function (vType, vName) {
|
858
|
-
return $h.compare(vType, /(word|excel|powerpoint|office)$/i) ||
|
859
|
-
$h.compare(vName, /\.(docx?|xlsx?|pptx?|pps|potx?)$/i);
|
860
|
-
},
|
861
|
-
gdocs: function (vType, vName) {
|
862
|
-
return $h.compare(vType, /(word|excel|powerpoint|office|iwork-pages|tiff?)$/i) ||
|
863
|
-
$h.compare(vName, /\.(docx?|xlsx?|pptx?|pps|potx?|rtf|ods|odt|pages|ai|dxf|ttf|tiff?|wmf|e?ps)$/i);
|
864
|
-
},
|
865
|
-
text: function (vType, vName) {
|
866
|
-
return $h.compare(vType, 'text.*') || $h.compare(vName, /\.(xml|javascript)$/i) ||
|
867
|
-
$h.compare(vName, /\.(txt|md|csv|nfo|ini|json|php|js|css)$/i);
|
868
|
-
},
|
869
|
-
video: function (vType, vName) {
|
870
|
-
return $h.compare(vType, 'video.*') && ($h.compare(vType, /(ogg|mp4|mp?g|mov|webm|3gp)$/i) ||
|
871
|
-
$h.compare(vName, /\.(og?|mp4|webm|mp?g|mov|3gp)$/i));
|
872
|
-
},
|
873
|
-
audio: function (vType, vName) {
|
874
|
-
return $h.compare(vType, 'audio.*') && ($h.compare(vName, /(ogg|mp3|mp?g|wav)$/i) ||
|
875
|
-
$h.compare(vName, /\.(og?|mp3|mp?g|wav)$/i));
|
876
|
-
},
|
877
|
-
flash: function (vType, vName) {
|
878
|
-
return $h.compare(vType, 'application/x-shockwave-flash', true) || $h.compare(vName, /\.(swf)$/i);
|
879
|
-
},
|
880
|
-
pdf: function (vType, vName) {
|
881
|
-
return $h.compare(vType, 'application/pdf', true) || $h.compare(vName, /\.(pdf)$/i);
|
882
|
-
},
|
883
|
-
object: function () {
|
884
|
-
return true;
|
885
|
-
},
|
886
|
-
other: function () {
|
887
|
-
return true;
|
888
|
-
}
|
889
|
-
},
|
890
|
-
fileActionSettings: {
|
891
|
-
showRemove: true,
|
892
|
-
showUpload: true,
|
893
|
-
showDownload: true,
|
894
|
-
showZoom: true,
|
895
|
-
showDrag: true,
|
896
|
-
removeIcon: '<i class="glyphicon glyphicon-trash"></i>',
|
897
|
-
removeClass: 'btn btn-sm btn-kv btn-default btn-outline-secondary',
|
898
|
-
removeErrorClass: 'btn btn-sm btn-kv btn-danger',
|
899
|
-
removeTitle: 'Remove file',
|
900
|
-
uploadIcon: '<i class="glyphicon glyphicon-upload"></i>',
|
901
|
-
uploadClass: 'btn btn-sm btn-kv btn-default btn-outline-secondary',
|
902
|
-
uploadTitle: 'Upload file',
|
903
|
-
uploadRetryIcon: '<i class="glyphicon glyphicon-repeat"></i>',
|
904
|
-
uploadRetryTitle: 'Retry upload',
|
905
|
-
downloadIcon: '<i class="glyphicon glyphicon-download"></i>',
|
906
|
-
downloadClass: 'btn btn-sm btn-kv btn-default btn-outline-secondary',
|
907
|
-
downloadTitle: 'Download file',
|
908
|
-
zoomIcon: '<i class="glyphicon glyphicon-zoom-in"></i>',
|
909
|
-
zoomClass: 'btn btn-sm btn-kv btn-default btn-outline-secondary',
|
910
|
-
zoomTitle: 'View Details',
|
911
|
-
dragIcon: '<i class="glyphicon glyphicon-move"></i>',
|
912
|
-
dragClass: 'text-info',
|
913
|
-
dragTitle: 'Move / Rearrange',
|
914
|
-
dragSettings: {},
|
915
|
-
indicatorNew: '<i class="glyphicon glyphicon-plus-sign text-warning"></i>',
|
916
|
-
indicatorSuccess: '<i class="glyphicon glyphicon-ok-sign text-success"></i>',
|
917
|
-
indicatorError: '<i class="glyphicon glyphicon-exclamation-sign text-danger"></i>',
|
918
|
-
indicatorLoading: '<i class="glyphicon glyphicon-hourglass text-muted"></i>',
|
919
|
-
indicatorNewTitle: 'Not uploaded yet',
|
920
|
-
indicatorSuccessTitle: 'Uploaded',
|
921
|
-
indicatorErrorTitle: 'Upload Error',
|
922
|
-
indicatorLoadingTitle: 'Uploading ...'
|
923
|
-
}
|
924
|
-
};
|
925
|
-
$.each(self.defaults, function (key, setting) {
|
926
|
-
if (key === 'allowedPreviewTypes') {
|
927
|
-
if (self.allowedPreviewTypes === undefined) {
|
928
|
-
self.allowedPreviewTypes = setting;
|
929
|
-
}
|
930
|
-
return;
|
931
|
-
}
|
932
|
-
self[key] = $.extend(true, {}, setting, self[key]);
|
933
|
-
});
|
934
|
-
self._initPreviewTemplates();
|
935
|
-
},
|
936
|
-
_initPreviewTemplates: function () {
|
937
|
-
var self = this, cfg = self.defaults, tags = self.previewMarkupTags, tagBef, tagAft = tags.tagAfter;
|
938
|
-
$.each(cfg.previewContentTemplates, function (key, value) {
|
939
|
-
if ($h.isEmpty(self.previewTemplates[key])) {
|
940
|
-
tagBef = tags.tagBefore2;
|
941
|
-
if (key === 'generic' || key === 'image' || key === 'html' || key === 'text') {
|
942
|
-
tagBef = tags.tagBefore1;
|
943
|
-
}
|
944
|
-
self.previewTemplates[key] = tagBef + value + tagAft;
|
945
|
-
}
|
946
|
-
});
|
947
|
-
},
|
948
|
-
_initPreviewCache: function () {
|
949
|
-
var self = this;
|
950
|
-
self.previewCache = {
|
951
|
-
data: {},
|
952
|
-
init: function () {
|
953
|
-
var content = self.initialPreview;
|
954
|
-
if (content.length > 0 && !$h.isArray(content)) {
|
955
|
-
content = content.split(self.initialPreviewDelimiter);
|
956
|
-
}
|
957
|
-
self.previewCache.data = {
|
958
|
-
content: content,
|
959
|
-
config: self.initialPreviewConfig,
|
960
|
-
tags: self.initialPreviewThumbTags
|
961
|
-
};
|
962
|
-
},
|
963
|
-
count: function () {
|
964
|
-
return !!self.previewCache.data && !!self.previewCache.data.content ?
|
965
|
-
self.previewCache.data.content.length : 0;
|
966
|
-
},
|
967
|
-
get: function (i, isDisabled) {
|
968
|
-
var ind = 'init_' + i, data = self.previewCache.data, config = data.config[i],
|
969
|
-
content = data.content[i], previewId = self.previewInitId + '-' + ind, out, $tmp, cat, ftr,
|
970
|
-
fname, ftype, frameClass, asData = $h.ifSet('previewAsData', config, self.initialPreviewAsData),
|
971
|
-
parseTemplate = function (cat, dat, fn, ft, id, ftr, ind, fc, t) {
|
972
|
-
fc = ' file-preview-initial ' + $h.SORT_CSS + (fc ? ' ' + fc : '');
|
973
|
-
return self._generatePreviewTemplate(cat, dat, fn, ft, id, false, null, fc, ftr, ind, t);
|
974
|
-
};
|
975
|
-
if (!content) {
|
976
|
-
return '';
|
977
|
-
}
|
978
|
-
isDisabled = isDisabled === undefined ? true : isDisabled;
|
979
|
-
cat = $h.ifSet('type', config, self.initialPreviewFileType || 'generic');
|
980
|
-
fname = $h.ifSet('filename', config, $h.ifSet('caption', config));
|
981
|
-
ftype = $h.ifSet('filetype', config, cat);
|
982
|
-
ftr = self.previewCache.footer(i, isDisabled, (config && config.size || null));
|
983
|
-
frameClass = $h.ifSet('frameClass', config);
|
984
|
-
if (asData) {
|
985
|
-
out = parseTemplate(cat, content, fname, ftype, previewId, ftr, ind, frameClass);
|
986
|
-
} else {
|
987
|
-
out = parseTemplate('generic', content, fname, ftype, previewId, ftr, ind, frameClass, cat)
|
988
|
-
.setTokens({'content': data.content[i]});
|
989
|
-
}
|
990
|
-
if (data.tags.length && data.tags[i]) {
|
991
|
-
out = $h.replaceTags(out, data.tags[i]);
|
992
|
-
}
|
993
|
-
/** @namespace config.frameAttr */
|
994
|
-
if (!$h.isEmpty(config) && !$h.isEmpty(config.frameAttr)) {
|
995
|
-
$tmp = $(document.createElement('div')).html(out);
|
996
|
-
$tmp.find('.file-preview-initial').attr(config.frameAttr);
|
997
|
-
out = $tmp.html();
|
998
|
-
$tmp.remove();
|
999
|
-
}
|
1000
|
-
return out;
|
1001
|
-
},
|
1002
|
-
add: function (content, config, tags, append) {
|
1003
|
-
var data = self.previewCache.data, index;
|
1004
|
-
if (!$h.isArray(content)) {
|
1005
|
-
content = content.split(self.initialPreviewDelimiter);
|
1006
|
-
}
|
1007
|
-
if (append) {
|
1008
|
-
index = data.content.push(content) - 1;
|
1009
|
-
data.config[index] = config;
|
1010
|
-
data.tags[index] = tags;
|
1011
|
-
} else {
|
1012
|
-
index = content.length - 1;
|
1013
|
-
data.content = content;
|
1014
|
-
data.config = config;
|
1015
|
-
data.tags = tags;
|
1016
|
-
}
|
1017
|
-
self.previewCache.data = data;
|
1018
|
-
return index;
|
1019
|
-
},
|
1020
|
-
set: function (content, config, tags, append) {
|
1021
|
-
var data = self.previewCache.data, i, chk;
|
1022
|
-
if (!content || !content.length) {
|
1023
|
-
return;
|
1024
|
-
}
|
1025
|
-
if (!$h.isArray(content)) {
|
1026
|
-
content = content.split(self.initialPreviewDelimiter);
|
1027
|
-
}
|
1028
|
-
chk = content.filter(function (n) {
|
1029
|
-
return n !== null;
|
1030
|
-
});
|
1031
|
-
if (!chk.length) {
|
1032
|
-
return;
|
1033
|
-
}
|
1034
|
-
if (data.content === undefined) {
|
1035
|
-
data.content = [];
|
1036
|
-
}
|
1037
|
-
if (data.config === undefined) {
|
1038
|
-
data.config = [];
|
1039
|
-
}
|
1040
|
-
if (data.tags === undefined) {
|
1041
|
-
data.tags = [];
|
1042
|
-
}
|
1043
|
-
if (append) {
|
1044
|
-
for (i = 0; i < content.length; i++) {
|
1045
|
-
if (content[i]) {
|
1046
|
-
data.content.push(content[i]);
|
1047
|
-
}
|
1048
|
-
}
|
1049
|
-
for (i = 0; i < config.length; i++) {
|
1050
|
-
if (config[i]) {
|
1051
|
-
data.config.push(config[i]);
|
1052
|
-
}
|
1053
|
-
}
|
1054
|
-
for (i = 0; i < tags.length; i++) {
|
1055
|
-
if (tags[i]) {
|
1056
|
-
data.tags.push(tags[i]);
|
1057
|
-
}
|
1058
|
-
}
|
1059
|
-
} else {
|
1060
|
-
data.content = content;
|
1061
|
-
data.config = config;
|
1062
|
-
data.tags = tags;
|
1063
|
-
}
|
1064
|
-
self.previewCache.data = data;
|
1065
|
-
},
|
1066
|
-
unset: function (index) {
|
1067
|
-
var chk = self.previewCache.count(), rev = self.reversePreviewOrder;
|
1068
|
-
if (!chk) {
|
1069
|
-
return;
|
1070
|
-
}
|
1071
|
-
if (chk === 1) {
|
1072
|
-
self.previewCache.data.content = [];
|
1073
|
-
self.previewCache.data.config = [];
|
1074
|
-
self.previewCache.data.tags = [];
|
1075
|
-
self.initialPreview = [];
|
1076
|
-
self.initialPreviewConfig = [];
|
1077
|
-
self.initialPreviewThumbTags = [];
|
1078
|
-
return;
|
1079
|
-
}
|
1080
|
-
self.previewCache.data.content = $h.spliceArray(self.previewCache.data.content, index, rev);
|
1081
|
-
self.previewCache.data.config = $h.spliceArray(self.previewCache.data.config, index, rev);
|
1082
|
-
self.previewCache.data.tags = $h.spliceArray(self.previewCache.data.tags, index, rev);
|
1083
|
-
},
|
1084
|
-
out: function () {
|
1085
|
-
var html = '', caption, len = self.previewCache.count(), i, content;
|
1086
|
-
if (len === 0) {
|
1087
|
-
return {content: '', caption: ''};
|
1088
|
-
}
|
1089
|
-
for (i = 0; i < len; i++) {
|
1090
|
-
content = self.previewCache.get(i);
|
1091
|
-
html = self.reversePreviewOrder ? (content + html) : (html + content);
|
1092
|
-
}
|
1093
|
-
caption = self._getMsgSelected(len);
|
1094
|
-
return {content: html, caption: caption};
|
1095
|
-
},
|
1096
|
-
footer: function (i, isDisabled, size) {
|
1097
|
-
var data = self.previewCache.data || {};
|
1098
|
-
if ($h.isEmpty(data.content)) {
|
1099
|
-
return '';
|
1100
|
-
}
|
1101
|
-
if ($h.isEmpty(data.config) || $h.isEmpty(data.config[i])) {
|
1102
|
-
data.config[i] = {};
|
1103
|
-
}
|
1104
|
-
isDisabled = isDisabled === undefined ? true : isDisabled;
|
1105
|
-
var config = data.config[i], caption = $h.ifSet('caption', config), a,
|
1106
|
-
width = $h.ifSet('width', config, 'auto'), url = $h.ifSet('url', config, false),
|
1107
|
-
key = $h.ifSet('key', config, null), fs = self.fileActionSettings,
|
1108
|
-
initPreviewShowDel = self.initialPreviewShowDelete || false,
|
1109
|
-
dUrl = config.downloadUrl || self.initialPreviewDownloadUrl || '',
|
1110
|
-
dFil = config.filename || config.caption || '',
|
1111
|
-
initPreviewShowDwl = !!(dUrl),
|
1112
|
-
sDel = $h.ifSet('showRemove', config, $h.ifSet('showRemove', fs, initPreviewShowDel)),
|
1113
|
-
sDwl = $h.ifSet('showDownload', config, $h.ifSet('showDownload', fs, initPreviewShowDwl)),
|
1114
|
-
sZm = $h.ifSet('showZoom', config, $h.ifSet('showZoom', fs, true)),
|
1115
|
-
sDrg = $h.ifSet('showDrag', config, $h.ifSet('showDrag', fs, true)),
|
1116
|
-
dis = (url === false) && isDisabled;
|
1117
|
-
sDwl = sDwl && config.downloadUrl !== false && !!dUrl;
|
1118
|
-
a = self._renderFileActions(false, sDwl, sDel, sZm, sDrg, dis, url, key, true, dUrl, dFil);
|
1119
|
-
return self._getLayoutTemplate('footer').setTokens({
|
1120
|
-
'progress': self._renderThumbProgress(),
|
1121
|
-
'actions': a,
|
1122
|
-
'caption': caption,
|
1123
|
-
'size': self._getSize(size),
|
1124
|
-
'width': width,
|
1125
|
-
'indicator': ''
|
1126
|
-
});
|
1127
|
-
}
|
1128
|
-
};
|
1129
|
-
self.previewCache.init();
|
1130
|
-
},
|
1131
|
-
_handler: function ($el, event, callback) {
|
1132
|
-
var self = this, ns = self.namespace, ev = event.split(' ').join(ns + ' ') + ns;
|
1133
|
-
if (!$el || !$el.length) {
|
1134
|
-
return;
|
1135
|
-
}
|
1136
|
-
$el.off(ev).on(ev, callback);
|
1137
|
-
},
|
1138
|
-
_log: function (msg) {
|
1139
|
-
var self = this, id = self.$element.attr('id');
|
1140
|
-
if (id) {
|
1141
|
-
msg = '"' + id + '": ' + msg;
|
1142
|
-
}
|
1143
|
-
if (typeof window.console.log !== "undefined") {
|
1144
|
-
window.console.log(msg);
|
1145
|
-
} else {
|
1146
|
-
window.alert(msg);
|
1147
|
-
}
|
1148
|
-
},
|
1149
|
-
_validate: function () {
|
1150
|
-
var self = this, status = self.$element.attr('class').includes('keppler-file');
|
1151
|
-
if (!status) {
|
1152
|
-
self._log('The input "type" must be set to "file" for initializing the "bootstrap-fileinput" plugin.');
|
1153
|
-
}
|
1154
|
-
return status;
|
1155
|
-
},
|
1156
|
-
_errorsExist: function () {
|
1157
|
-
var self = this, $err, $errList = self.$errorContainer.find('li');
|
1158
|
-
if ($errList.length) {
|
1159
|
-
return true;
|
1160
|
-
}
|
1161
|
-
$err = $(document.createElement('div')).html(self.$errorContainer.html());
|
1162
|
-
$err.find('.kv-error-close').remove();
|
1163
|
-
$err.find('ul').remove();
|
1164
|
-
return !!$.trim($err.text()).length;
|
1165
|
-
},
|
1166
|
-
_errorHandler: function (evt, caption) {
|
1167
|
-
var self = this, err = evt.target.error, showError = function (msg) {
|
1168
|
-
self._showError(msg.replace('{name}', caption));
|
1169
|
-
};
|
1170
|
-
/** @namespace err.NOT_FOUND_ERR */
|
1171
|
-
/** @namespace err.SECURITY_ERR */
|
1172
|
-
/** @namespace err.NOT_READABLE_ERR */
|
1173
|
-
if (err.code === err.NOT_FOUND_ERR) {
|
1174
|
-
showError(self.msgFileNotFound);
|
1175
|
-
} else if (err.code === err.SECURITY_ERR) {
|
1176
|
-
showError(self.msgFileSecured);
|
1177
|
-
} else if (err.code === err.NOT_READABLE_ERR) {
|
1178
|
-
showError(self.msgFileNotReadable);
|
1179
|
-
} else if (err.code === err.ABORT_ERR) {
|
1180
|
-
showError(self.msgFilePreviewAborted);
|
1181
|
-
} else {
|
1182
|
-
showError(self.msgFilePreviewError);
|
1183
|
-
}
|
1184
|
-
},
|
1185
|
-
_addError: function (msg) {
|
1186
|
-
var self = this, $error = self.$errorContainer;
|
1187
|
-
if (msg && $error.length) {
|
1188
|
-
$error.html(self.errorCloseButton + msg);
|
1189
|
-
self._handler($error.find('.kv-error-close'), 'click', function () {
|
1190
|
-
setTimeout(function () {
|
1191
|
-
if (self.showPreview && !self.getFrames().length) {
|
1192
|
-
self.clear();
|
1193
|
-
}
|
1194
|
-
$error.fadeOut('slow');
|
1195
|
-
}, 10);
|
1196
|
-
});
|
1197
|
-
}
|
1198
|
-
},
|
1199
|
-
_setValidationError: function (css) {
|
1200
|
-
var self = this;
|
1201
|
-
css = (css ? css + ' ' : '') + 'has-error';
|
1202
|
-
self.$container.removeClass(css).addClass('has-error');
|
1203
|
-
$h.addCss(self.$captionContainer, 'is-invalid');
|
1204
|
-
},
|
1205
|
-
_resetErrors: function (fade) {
|
1206
|
-
var self = this, $error = self.$errorContainer;
|
1207
|
-
self.isError = false;
|
1208
|
-
self.$container.removeClass('has-error');
|
1209
|
-
self.$captionContainer.removeClass('is-invalid');
|
1210
|
-
$error.html('');
|
1211
|
-
if (fade) {
|
1212
|
-
$error.fadeOut('slow');
|
1213
|
-
} else {
|
1214
|
-
$error.hide();
|
1215
|
-
}
|
1216
|
-
},
|
1217
|
-
_showFolderError: function (folders) {
|
1218
|
-
var self = this, $error = self.$errorContainer, msg;
|
1219
|
-
if (!folders) {
|
1220
|
-
return;
|
1221
|
-
}
|
1222
|
-
if (!self.isAjaxUpload) {
|
1223
|
-
self._clearFileInput();
|
1224
|
-
}
|
1225
|
-
msg = self.msgFoldersNotAllowed.replace('{n}', folders);
|
1226
|
-
self._addError(msg);
|
1227
|
-
self._setValidationError();
|
1228
|
-
$error.fadeIn(800);
|
1229
|
-
self._raise('filefoldererror', [folders, msg]);
|
1230
|
-
},
|
1231
|
-
_showUploadError: function (msg, params, event) {
|
1232
|
-
var self = this, $error = self.$errorContainer, ev = event || 'fileuploaderror', e = params && params.id ?
|
1233
|
-
'<li data-file-id="' + params.id + '">' + msg + '</li>' : '<li>' + msg + '</li>';
|
1234
|
-
if ($error.find('ul').length === 0) {
|
1235
|
-
self._addError('<ul>' + e + '</ul>');
|
1236
|
-
} else {
|
1237
|
-
$error.find('ul').append(e);
|
1238
|
-
}
|
1239
|
-
$error.fadeIn(800);
|
1240
|
-
self._raise(ev, [params, msg]);
|
1241
|
-
self._setValidationError('file-input-new');
|
1242
|
-
return true;
|
1243
|
-
},
|
1244
|
-
_showError: function (msg, params, event) {
|
1245
|
-
var self = this, $error = self.$errorContainer, ev = event || 'fileerror';
|
1246
|
-
params = params || {};
|
1247
|
-
params.reader = self.reader;
|
1248
|
-
self._addError(msg);
|
1249
|
-
$error.fadeIn(800);
|
1250
|
-
self._raise(ev, [params, msg]);
|
1251
|
-
if (!self.isAjaxUpload) {
|
1252
|
-
self._clearFileInput();
|
1253
|
-
}
|
1254
|
-
self._setValidationError('file-input-new');
|
1255
|
-
self.$btnUpload.attr('disabled', true);
|
1256
|
-
return true;
|
1257
|
-
},
|
1258
|
-
_noFilesError: function (params) {
|
1259
|
-
var self = this, label = self.minFileCount > 1 ? self.filePlural : self.fileSingle,
|
1260
|
-
msg = self.msgFilesTooLess.replace('{n}', self.minFileCount).replace('{files}', label),
|
1261
|
-
$error = self.$errorContainer;
|
1262
|
-
self._addError(msg);
|
1263
|
-
self.isError = true;
|
1264
|
-
self._updateFileDetails(0);
|
1265
|
-
$error.fadeIn(800);
|
1266
|
-
self._raise('fileerror', [params, msg]);
|
1267
|
-
self._clearFileInput();
|
1268
|
-
self._setValidationError();
|
1269
|
-
},
|
1270
|
-
_parseError: function (operation, jqXHR, errorThrown, fileName) {
|
1271
|
-
/** @namespace jqXHR.responseJSON */
|
1272
|
-
var self = this, errMsg = $.trim(errorThrown + ''), textPre,
|
1273
|
-
text = jqXHR.responseJSON !== undefined && jqXHR.responseJSON.error !== undefined ?
|
1274
|
-
jqXHR.responseJSON.error : jqXHR.responseText;
|
1275
|
-
if (self.cancelling && self.msgUploadAborted) {
|
1276
|
-
errMsg = self.msgUploadAborted;
|
1277
|
-
}
|
1278
|
-
if (self.showAjaxErrorDetails && text) {
|
1279
|
-
text = $.trim(text.replace(/\n\s*\n/g, '\n'));
|
1280
|
-
textPre = text.length ? '<pre>' + text + '</pre>' : '';
|
1281
|
-
errMsg += errMsg ? textPre : text;
|
1282
|
-
}
|
1283
|
-
if (!errMsg) {
|
1284
|
-
errMsg = self.msgAjaxError.replace('{operation}', operation);
|
1285
|
-
}
|
1286
|
-
self.cancelling = false;
|
1287
|
-
return fileName ? '<b>' + fileName + ': </b>' + errMsg : errMsg;
|
1288
|
-
},
|
1289
|
-
_parseFileType: function (type, name) {
|
1290
|
-
var self = this, isValid, vType, cat, i, types = self.allowedPreviewTypes || [];
|
1291
|
-
if (type === 'application/text-plain') {
|
1292
|
-
return 'text';
|
1293
|
-
}
|
1294
|
-
for (i = 0; i < types.length; i++) {
|
1295
|
-
cat = types[i];
|
1296
|
-
isValid = self.fileTypeSettings[cat];
|
1297
|
-
vType = isValid(type, name) ? cat : '';
|
1298
|
-
if (!$h.isEmpty(vType)) {
|
1299
|
-
return vType;
|
1300
|
-
}
|
1301
|
-
}
|
1302
|
-
return 'other';
|
1303
|
-
},
|
1304
|
-
_getPreviewIcon: function (fname) {
|
1305
|
-
var self = this, ext, out = null;
|
1306
|
-
if (fname && fname.indexOf('.') > -1) {
|
1307
|
-
ext = fname.split('.').pop();
|
1308
|
-
if (self.previewFileIconSettings) {
|
1309
|
-
out = self.previewFileIconSettings[ext] || self.previewFileIconSettings[ext.toLowerCase()] || null;
|
1310
|
-
}
|
1311
|
-
if (self.previewFileExtSettings) {
|
1312
|
-
$.each(self.previewFileExtSettings, function (key, func) {
|
1313
|
-
if (self.previewFileIconSettings[key] && func(ext)) {
|
1314
|
-
out = self.previewFileIconSettings[key];
|
1315
|
-
//noinspection UnnecessaryReturnStatementJS
|
1316
|
-
return;
|
1317
|
-
}
|
1318
|
-
});
|
1319
|
-
}
|
1320
|
-
}
|
1321
|
-
return out;
|
1322
|
-
},
|
1323
|
-
_parseFilePreviewIcon: function (content, fname) {
|
1324
|
-
var self = this, icn = self._getPreviewIcon(fname) || self.previewFileIcon, out = content;
|
1325
|
-
if (out.indexOf('{previewFileIcon}') > -1) {
|
1326
|
-
out = out.setTokens({'previewFileIconClass': self.previewFileIconClass, 'previewFileIcon': icn});
|
1327
|
-
}
|
1328
|
-
return out;
|
1329
|
-
},
|
1330
|
-
_raise: function (event, params) {
|
1331
|
-
var self = this, e = $.Event(event);
|
1332
|
-
if (params !== undefined) {
|
1333
|
-
self.$element.trigger(e, params);
|
1334
|
-
} else {
|
1335
|
-
self.$element.trigger(e);
|
1336
|
-
}
|
1337
|
-
if (e.isDefaultPrevented() || e.result === false) {
|
1338
|
-
return false;
|
1339
|
-
}
|
1340
|
-
switch (event) {
|
1341
|
-
// ignore these events
|
1342
|
-
case 'filebatchuploadcomplete':
|
1343
|
-
case 'filebatchuploadsuccess':
|
1344
|
-
case 'fileuploaded':
|
1345
|
-
case 'fileclear':
|
1346
|
-
case 'filecleared':
|
1347
|
-
case 'filereset':
|
1348
|
-
case 'fileerror':
|
1349
|
-
case 'filefoldererror':
|
1350
|
-
case 'fileuploaderror':
|
1351
|
-
case 'filebatchuploaderror':
|
1352
|
-
case 'filedeleteerror':
|
1353
|
-
case 'filecustomerror':
|
1354
|
-
case 'filesuccessremove':
|
1355
|
-
break;
|
1356
|
-
// receive data response via `filecustomerror` event`
|
1357
|
-
default:
|
1358
|
-
if (!self.ajaxAborted) {
|
1359
|
-
self.ajaxAborted = e.result;
|
1360
|
-
}
|
1361
|
-
break;
|
1362
|
-
}
|
1363
|
-
return true;
|
1364
|
-
},
|
1365
|
-
_listenFullScreen: function (isFullScreen) {
|
1366
|
-
var self = this, $modal = self.$modal, $btnFull, $btnBord;
|
1367
|
-
if (!$modal || !$modal.length) {
|
1368
|
-
return;
|
1369
|
-
}
|
1370
|
-
$btnFull = $modal && $modal.find('.btn-fullscreen');
|
1371
|
-
$btnBord = $modal && $modal.find('.btn-borderless');
|
1372
|
-
if (!$btnFull.length || !$btnBord.length) {
|
1373
|
-
return;
|
1374
|
-
}
|
1375
|
-
$btnFull.removeClass('active').attr('aria-pressed', 'false');
|
1376
|
-
$btnBord.removeClass('active').attr('aria-pressed', 'false');
|
1377
|
-
if (isFullScreen) {
|
1378
|
-
$btnFull.addClass('active').attr('aria-pressed', 'true');
|
1379
|
-
} else {
|
1380
|
-
$btnBord.addClass('active').attr('aria-pressed', 'true');
|
1381
|
-
}
|
1382
|
-
if ($modal.hasClass('file-zoom-fullscreen')) {
|
1383
|
-
self._maximizeZoomDialog();
|
1384
|
-
} else {
|
1385
|
-
if (isFullScreen) {
|
1386
|
-
self._maximizeZoomDialog();
|
1387
|
-
} else {
|
1388
|
-
$btnBord.removeClass('active').attr('aria-pressed', 'false');
|
1389
|
-
}
|
1390
|
-
}
|
1391
|
-
},
|
1392
|
-
_listen: function () {
|
1393
|
-
var self = this, $el = self.$element, $form = self.$form, $cont = self.$container, fullScreenEvents;
|
1394
|
-
self._handler($el, 'click', function(e) {
|
1395
|
-
if ($el.hasClass('file-no-browse')) {
|
1396
|
-
if ($el.data('zoneClicked')) {
|
1397
|
-
$el.data('zoneClicked', false);
|
1398
|
-
} else {
|
1399
|
-
e.preventDefault();
|
1400
|
-
}
|
1401
|
-
}
|
1402
|
-
});
|
1403
|
-
self._handler($el, 'change', $.proxy(self._change, self));
|
1404
|
-
if (self.showBrowse) {
|
1405
|
-
self._handler(self.$btnFile, 'click', $.proxy(self._browse, self));
|
1406
|
-
}
|
1407
|
-
self._handler($cont.find('.fileinput-remove:not([disabled])'), 'click', $.proxy(self.clear, self));
|
1408
|
-
self._handler($cont.find('.fileinput-cancel'), 'click', $.proxy(self.cancel, self));
|
1409
|
-
self._initDragDrop();
|
1410
|
-
self._handler($form, 'reset', $.proxy(self.clear, self));
|
1411
|
-
if (!self.isAjaxUpload) {
|
1412
|
-
self._handler($form, 'submit', $.proxy(self._submitForm, self));
|
1413
|
-
}
|
1414
|
-
self._handler(self.$container.find('.fileinput-upload'), 'click', $.proxy(self._uploadClick, self));
|
1415
|
-
self._handler($(window), 'resize', function () {
|
1416
|
-
self._listenFullScreen(screen.width === window.innerWidth && screen.height === window.innerHeight);
|
1417
|
-
});
|
1418
|
-
fullScreenEvents = 'webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange';
|
1419
|
-
self._handler($(document), fullScreenEvents, function () {
|
1420
|
-
self._listenFullScreen($h.checkFullScreen());
|
1421
|
-
});
|
1422
|
-
self._autoFitContent();
|
1423
|
-
self._initClickable();
|
1424
|
-
self._refreshPreview();
|
1425
|
-
},
|
1426
|
-
_autoFitContent: function () {
|
1427
|
-
var width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,
|
1428
|
-
self = this, config = width < 400 ? (self.previewSettingsSmall || self.defaults.previewSettingsSmall) :
|
1429
|
-
(self.previewSettings || self.defaults.previewSettings), sel;
|
1430
|
-
$.each(config, function (cat, settings) {
|
1431
|
-
sel = '.file-preview-frame .file-preview-' + cat;
|
1432
|
-
self.$preview.find(sel + '.kv-preview-data,' + sel + ' .kv-preview-data').css(settings);
|
1433
|
-
});
|
1434
|
-
},
|
1435
|
-
_scanDroppedItems: function (item, files, path) {
|
1436
|
-
path = path || "";
|
1437
|
-
var self = this, i, dirReader, readDir, errorHandler = function (e) {
|
1438
|
-
self._log('Error scanning dropped files!');
|
1439
|
-
self._log(e);
|
1440
|
-
};
|
1441
|
-
if (item.isFile) {
|
1442
|
-
item.file(function (file) {
|
1443
|
-
files.push(file);
|
1444
|
-
}, errorHandler);
|
1445
|
-
} else {
|
1446
|
-
if (item.isDirectory) {
|
1447
|
-
dirReader = item.createReader();
|
1448
|
-
readDir = function () {
|
1449
|
-
dirReader.readEntries(function (entries) {
|
1450
|
-
if (entries && entries.length > 0) {
|
1451
|
-
for (i = 0; i < entries.length; i++) {
|
1452
|
-
self._scanDroppedItems(entries[i], files, path + item.name + "/");
|
1453
|
-
}
|
1454
|
-
// recursively call readDir() again, since browser can only handle first 100 entries.
|
1455
|
-
readDir();
|
1456
|
-
}
|
1457
|
-
return null;
|
1458
|
-
}, errorHandler);
|
1459
|
-
};
|
1460
|
-
readDir();
|
1461
|
-
}
|
1462
|
-
}
|
1463
|
-
|
1464
|
-
},
|
1465
|
-
_initDragDrop: function () {
|
1466
|
-
var self = this, $zone = self.$dropZone;
|
1467
|
-
if (self.dropZoneEnabled && self.showPreview) {
|
1468
|
-
self._handler($zone, 'dragenter dragover', $.proxy(self._zoneDragEnter, self));
|
1469
|
-
self._handler($zone, 'dragleave', $.proxy(self._zoneDragLeave, self));
|
1470
|
-
self._handler($zone, 'drop', $.proxy(self._zoneDrop, self));
|
1471
|
-
self._handler($(document), 'dragenter dragover drop', self._zoneDragDropInit);
|
1472
|
-
}
|
1473
|
-
},
|
1474
|
-
_zoneDragDropInit: function (e) {
|
1475
|
-
e.stopPropagation();
|
1476
|
-
e.preventDefault();
|
1477
|
-
},
|
1478
|
-
_zoneDragEnter: function (e) {
|
1479
|
-
var self = this, hasFiles = $.inArray('Files', e.originalEvent.dataTransfer.types) > -1;
|
1480
|
-
self._zoneDragDropInit(e);
|
1481
|
-
if (self.isDisabled || !hasFiles) {
|
1482
|
-
e.originalEvent.dataTransfer.effectAllowed = 'none';
|
1483
|
-
e.originalEvent.dataTransfer.dropEffect = 'none';
|
1484
|
-
return;
|
1485
|
-
}
|
1486
|
-
$h.addCss(self.$dropZone, 'file-highlighted');
|
1487
|
-
},
|
1488
|
-
_zoneDragLeave: function (e) {
|
1489
|
-
var self = this;
|
1490
|
-
self._zoneDragDropInit(e);
|
1491
|
-
if (self.isDisabled) {
|
1492
|
-
return;
|
1493
|
-
}
|
1494
|
-
self.$dropZone.removeClass('file-highlighted');
|
1495
|
-
},
|
1496
|
-
_zoneDrop: function (e) {
|
1497
|
-
/** @namespace e.originalEvent.dataTransfer */
|
1498
|
-
var self = this, i, $el = self.$element, dataTransfer = e.originalEvent.dataTransfer,
|
1499
|
-
files = dataTransfer.files, items = dataTransfer.items, folders = $h.getDragDropFolders(items),
|
1500
|
-
processFiles = function () {
|
1501
|
-
if (!self.isAjaxUpload) {
|
1502
|
-
self.changeTriggered = true;
|
1503
|
-
$el.get(0).files = files;
|
1504
|
-
setTimeout(function () {
|
1505
|
-
self.changeTriggered = false;
|
1506
|
-
$el.trigger('change' + self.namespace);
|
1507
|
-
}, 10);
|
1508
|
-
} else {
|
1509
|
-
self._change(e, files);
|
1510
|
-
}
|
1511
|
-
self.$dropZone.removeClass('file-highlighted');
|
1512
|
-
};
|
1513
|
-
e.preventDefault();
|
1514
|
-
if (self.isDisabled || $h.isEmpty(files)) {
|
1515
|
-
return;
|
1516
|
-
}
|
1517
|
-
if (folders > 0) {
|
1518
|
-
if (!self.isAjaxUpload) {
|
1519
|
-
self._showFolderError(folders);
|
1520
|
-
return;
|
1521
|
-
}
|
1522
|
-
files = [];
|
1523
|
-
for (i = 0; i < items.length; i++) {
|
1524
|
-
var item = items[i].webkitGetAsEntry();
|
1525
|
-
if (item) {
|
1526
|
-
self._scanDroppedItems(item, files);
|
1527
|
-
}
|
1528
|
-
}
|
1529
|
-
setTimeout(function () {
|
1530
|
-
processFiles();
|
1531
|
-
}, 500);
|
1532
|
-
} else {
|
1533
|
-
processFiles();
|
1534
|
-
}
|
1535
|
-
},
|
1536
|
-
_uploadClick: function (e) {
|
1537
|
-
var self = this, $btn = self.$container.find('.fileinput-upload'), $form,
|
1538
|
-
isEnabled = !$btn.hasClass('disabled') && $h.isEmpty($btn.attr('disabled'));
|
1539
|
-
if (e && e.isDefaultPrevented()) {
|
1540
|
-
return;
|
1541
|
-
}
|
1542
|
-
if (!self.isAjaxUpload) {
|
1543
|
-
if (isEnabled && $btn.attr('type') !== 'submit') {
|
1544
|
-
$form = $btn.closest('form');
|
1545
|
-
// downgrade to normal form submit if possible
|
1546
|
-
if ($form.length) {
|
1547
|
-
$form.trigger('submit');
|
1548
|
-
}
|
1549
|
-
e.preventDefault();
|
1550
|
-
}
|
1551
|
-
return;
|
1552
|
-
}
|
1553
|
-
e.preventDefault();
|
1554
|
-
if (isEnabled) {
|
1555
|
-
self.upload();
|
1556
|
-
}
|
1557
|
-
},
|
1558
|
-
_submitForm: function () {
|
1559
|
-
var self = this;
|
1560
|
-
return self._isFileSelectionValid() && !self._abort({});
|
1561
|
-
},
|
1562
|
-
_clearPreview: function () {
|
1563
|
-
var self = this, $p = self.$preview,
|
1564
|
-
$thumbs = self.showUploadedThumbs ? self.getFrames(':not(.file-preview-success)') : self.getFrames();
|
1565
|
-
$thumbs.each(function () {
|
1566
|
-
var $thumb = $(this);
|
1567
|
-
$thumb.remove();
|
1568
|
-
$h.cleanZoomCache($p.find('#zoom-' + $thumb.attr('id')));
|
1569
|
-
});
|
1570
|
-
if (!self.getFrames().length || !self.showPreview) {
|
1571
|
-
self._resetUpload();
|
1572
|
-
}
|
1573
|
-
self._validateDefaultPreview();
|
1574
|
-
},
|
1575
|
-
_initSortable: function () {
|
1576
|
-
var self = this, $el = self.$preview, settings, selector = '.' + $h.SORT_CSS,
|
1577
|
-
rev = self.reversePreviewOrder;
|
1578
|
-
if (!window.KvSortable || $el.find(selector).length === 0) {
|
1579
|
-
return;
|
1580
|
-
}
|
1581
|
-
//noinspection JSUnusedGlobalSymbols
|
1582
|
-
settings = {
|
1583
|
-
handle: '.drag-handle-init',
|
1584
|
-
dataIdAttr: 'data-preview-id',
|
1585
|
-
scroll: false,
|
1586
|
-
draggable: selector,
|
1587
|
-
onSort: function (e) {
|
1588
|
-
var oldIndex = e.oldIndex, newIndex = e.newIndex, i = 0;
|
1589
|
-
self.initialPreview = $h.moveArray(self.initialPreview, oldIndex, newIndex, rev);
|
1590
|
-
self.initialPreviewConfig = $h.moveArray(self.initialPreviewConfig, oldIndex, newIndex, rev);
|
1591
|
-
self.previewCache.init();
|
1592
|
-
self.getFrames('.file-preview-initial').each(function () {
|
1593
|
-
$(this).attr('data-fileindex', 'init_' + i);
|
1594
|
-
i++;
|
1595
|
-
});
|
1596
|
-
self._raise('filesorted', {
|
1597
|
-
previewId: $(e.item).attr('id'),
|
1598
|
-
'oldIndex': oldIndex,
|
1599
|
-
'newIndex': newIndex,
|
1600
|
-
stack: self.initialPreviewConfig
|
1601
|
-
});
|
1602
|
-
}
|
1603
|
-
};
|
1604
|
-
if ($el.data('kvsortable')) {
|
1605
|
-
$el.kvsortable('destroy');
|
1606
|
-
}
|
1607
|
-
$.extend(true, settings, self.fileActionSettings.dragSettings);
|
1608
|
-
$el.kvsortable(settings);
|
1609
|
-
},
|
1610
|
-
_setPreviewContent: function (content) {
|
1611
|
-
var self = this;
|
1612
|
-
self.$preview.html(content);
|
1613
|
-
self._autoFitContent();
|
1614
|
-
},
|
1615
|
-
_initPreview: function (isInit) {
|
1616
|
-
var self = this, cap = self.initialCaption || '', out;
|
1617
|
-
if (!self.previewCache.count()) {
|
1618
|
-
self._clearPreview();
|
1619
|
-
if (isInit) {
|
1620
|
-
self._setCaption(cap);
|
1621
|
-
} else {
|
1622
|
-
self._initCaption();
|
1623
|
-
}
|
1624
|
-
return;
|
1625
|
-
}
|
1626
|
-
out = self.previewCache.out();
|
1627
|
-
cap = isInit && self.initialCaption ? self.initialCaption : out.caption;
|
1628
|
-
self._setPreviewContent(out.content);
|
1629
|
-
self._setInitThumbAttr();
|
1630
|
-
self._setCaption(cap);
|
1631
|
-
self._initSortable();
|
1632
|
-
if (!$h.isEmpty(out.content)) {
|
1633
|
-
self.$container.removeClass('file-input-new');
|
1634
|
-
}
|
1635
|
-
},
|
1636
|
-
_getZoomButton: function (type) {
|
1637
|
-
var self = this, label = self.previewZoomButtonIcons[type], css = self.previewZoomButtonClasses[type],
|
1638
|
-
title = ' title="' + (self.previewZoomButtonTitles[type] || '') + '" ',
|
1639
|
-
params = title + (type === 'close' ? ' data-dismiss="modal" aria-hidden="true"' : '');
|
1640
|
-
if (type === 'fullscreen' || type === 'borderless' || type === 'toggleheader') {
|
1641
|
-
params += ' data-toggle="button" aria-pressed="false" autocomplete="off"';
|
1642
|
-
}
|
1643
|
-
return '<button type="button" class="' + css + ' btn-' + type + '"' + params + '>' + label + '</button>';
|
1644
|
-
},
|
1645
|
-
_getModalContent: function () {
|
1646
|
-
var self = this;
|
1647
|
-
return self._getLayoutTemplate('modal').setTokens({
|
1648
|
-
'rtl': self.rtl ? ' kv-rtl' : '',
|
1649
|
-
'zoomFrameClass': self.frameClass,
|
1650
|
-
'heading': self.msgZoomModalHeading,
|
1651
|
-
'prev': self._getZoomButton('prev'),
|
1652
|
-
'next': self._getZoomButton('next'),
|
1653
|
-
'toggleheader': self._getZoomButton('toggleheader'),
|
1654
|
-
'fullscreen': self._getZoomButton('fullscreen'),
|
1655
|
-
'borderless': self._getZoomButton('borderless'),
|
1656
|
-
'close': self._getZoomButton('close')
|
1657
|
-
});
|
1658
|
-
},
|
1659
|
-
_listenModalEvent: function (event) {
|
1660
|
-
var self = this, $modal = self.$modal, getParams = function (e) {
|
1661
|
-
return {
|
1662
|
-
sourceEvent: e,
|
1663
|
-
previewId: $modal.data('previewId'),
|
1664
|
-
modal: $modal
|
1665
|
-
};
|
1666
|
-
};
|
1667
|
-
$modal.on(event + '.bs.modal', function (e) {
|
1668
|
-
var $btnFull = $modal.find('.btn-fullscreen'), $btnBord = $modal.find('.btn-borderless');
|
1669
|
-
self._raise('filezoom' + event, getParams(e));
|
1670
|
-
if (event === 'shown') {
|
1671
|
-
$btnBord.removeClass('active').attr('aria-pressed', 'false');
|
1672
|
-
$btnFull.removeClass('active').attr('aria-pressed', 'false');
|
1673
|
-
if ($modal.hasClass('file-zoom-fullscreen')) {
|
1674
|
-
self._maximizeZoomDialog();
|
1675
|
-
if ($h.checkFullScreen()) {
|
1676
|
-
$btnFull.addClass('active').attr('aria-pressed', 'true');
|
1677
|
-
} else {
|
1678
|
-
$btnBord.addClass('active').attr('aria-pressed', 'true');
|
1679
|
-
}
|
1680
|
-
}
|
1681
|
-
}
|
1682
|
-
});
|
1683
|
-
},
|
1684
|
-
_initZoom: function () {
|
1685
|
-
var self = this, $dialog, modalMain = self._getLayoutTemplate('modalMain'), modalId = '#' + $h.MODAL_ID;
|
1686
|
-
if (!self.showPreview) {
|
1687
|
-
return;
|
1688
|
-
}
|
1689
|
-
self.$modal = $(modalId);
|
1690
|
-
if (!self.$modal || !self.$modal.length) {
|
1691
|
-
$dialog = $(document.createElement('div')).html(modalMain).insertAfter(self.$container);
|
1692
|
-
self.$modal = $(modalId).insertBefore($dialog);
|
1693
|
-
$dialog.remove();
|
1694
|
-
}
|
1695
|
-
$h.initModal(self.$modal);
|
1696
|
-
self.$modal.html(self._getModalContent());
|
1697
|
-
$.each($h.MODAL_EVENTS, function (key, event) {
|
1698
|
-
self._listenModalEvent(event);
|
1699
|
-
});
|
1700
|
-
},
|
1701
|
-
_initZoomButtons: function () {
|
1702
|
-
var self = this, previewId = self.$modal.data('previewId') || '', $first, $last,
|
1703
|
-
thumbs = self.getFrames().toArray(), len = thumbs.length, $prev = self.$modal.find('.btn-prev'),
|
1704
|
-
$next = self.$modal.find('.btn-next');
|
1705
|
-
if (thumbs.length < 2) {
|
1706
|
-
$prev.hide();
|
1707
|
-
$next.hide();
|
1708
|
-
return;
|
1709
|
-
} else {
|
1710
|
-
$prev.show();
|
1711
|
-
$next.show();
|
1712
|
-
}
|
1713
|
-
if (!len) {
|
1714
|
-
return;
|
1715
|
-
}
|
1716
|
-
$first = $(thumbs[0]);
|
1717
|
-
$last = $(thumbs[len - 1]);
|
1718
|
-
$prev.removeAttr('disabled');
|
1719
|
-
$next.removeAttr('disabled');
|
1720
|
-
if ($first.length && $first.attr('id') === previewId) {
|
1721
|
-
$prev.attr('disabled', true);
|
1722
|
-
}
|
1723
|
-
if ($last.length && $last.attr('id') === previewId) {
|
1724
|
-
$next.attr('disabled', true);
|
1725
|
-
}
|
1726
|
-
},
|
1727
|
-
_maximizeZoomDialog: function () {
|
1728
|
-
var self = this, $modal = self.$modal, $head = $modal.find('.modal-header:visible'),
|
1729
|
-
$foot = $modal.find('.modal-footer:visible'), $body = $modal.find('.modal-body'),
|
1730
|
-
h = $(window).height(), diff = 0;
|
1731
|
-
$modal.addClass('file-zoom-fullscreen');
|
1732
|
-
if ($head && $head.length) {
|
1733
|
-
h -= $head.outerHeight(true);
|
1734
|
-
}
|
1735
|
-
if ($foot && $foot.length) {
|
1736
|
-
h -= $foot.outerHeight(true);
|
1737
|
-
}
|
1738
|
-
if ($body && $body.length) {
|
1739
|
-
diff = $body.outerHeight(true) - $body.height();
|
1740
|
-
h -= diff;
|
1741
|
-
}
|
1742
|
-
$modal.find('.kv-zoom-body').height(h);
|
1743
|
-
},
|
1744
|
-
_resizeZoomDialog: function (fullScreen) {
|
1745
|
-
var self = this, $modal = self.$modal, $btnFull = $modal.find('.btn-fullscreen'),
|
1746
|
-
$btnBord = $modal.find('.btn-borderless');
|
1747
|
-
if ($modal.hasClass('file-zoom-fullscreen')) {
|
1748
|
-
$h.toggleFullScreen(false);
|
1749
|
-
if (!fullScreen) {
|
1750
|
-
if (!$btnFull.hasClass('active')) {
|
1751
|
-
$modal.removeClass('file-zoom-fullscreen');
|
1752
|
-
self.$modal.find('.kv-zoom-body').css('height', self.zoomModalHeight);
|
1753
|
-
} else {
|
1754
|
-
$btnFull.removeClass('active').attr('aria-pressed', 'false');
|
1755
|
-
}
|
1756
|
-
} else {
|
1757
|
-
if (!$btnFull.hasClass('active')) {
|
1758
|
-
$modal.removeClass('file-zoom-fullscreen');
|
1759
|
-
self._resizeZoomDialog(true);
|
1760
|
-
if ($btnBord.hasClass('active')) {
|
1761
|
-
$btnBord.removeClass('active').attr('aria-pressed', 'false');
|
1762
|
-
}
|
1763
|
-
}
|
1764
|
-
}
|
1765
|
-
} else {
|
1766
|
-
if (!fullScreen) {
|
1767
|
-
self._maximizeZoomDialog();
|
1768
|
-
return;
|
1769
|
-
}
|
1770
|
-
$h.toggleFullScreen(true);
|
1771
|
-
}
|
1772
|
-
$modal.focus();
|
1773
|
-
},
|
1774
|
-
_setZoomContent: function ($frame, animate) {
|
1775
|
-
var self = this, $content, tmplt, body, title, $body, $dataEl, config, pid = $frame.attr('id'),
|
1776
|
-
$modal = self.$modal, $prev = $modal.find('.btn-prev'), $next = $modal.find('.btn-next'), $tmp,
|
1777
|
-
$btnFull = $modal.find('.btn-fullscreen'), $btnBord = $modal.find('.btn-borderless'), cap, size,
|
1778
|
-
$btnTogh = $modal.find('.btn-toggleheader'), $zoomPreview = self.$preview.find('#zoom-' + pid);
|
1779
|
-
tmplt = $zoomPreview.attr('data-template') || 'generic';
|
1780
|
-
$content = $zoomPreview.find('.kv-file-content');
|
1781
|
-
body = $content.length ? $content.html() : '';
|
1782
|
-
cap = $frame.data('caption') || '';
|
1783
|
-
size = $frame.data('size') || '';
|
1784
|
-
title = cap + ' ' + size;
|
1785
|
-
$modal.find('.kv-zoom-title').attr('title', $('<div/>').html(title).text()).html(title);
|
1786
|
-
$body = $modal.find('.kv-zoom-body');
|
1787
|
-
$modal.removeClass('kv-single-content');
|
1788
|
-
if (animate) {
|
1789
|
-
$tmp = $body.addClass('file-thumb-loading').clone().insertAfter($body);
|
1790
|
-
$body.html(body).hide();
|
1791
|
-
$tmp.fadeOut('fast', function () {
|
1792
|
-
$body.fadeIn('fast', function () {
|
1793
|
-
$body.removeClass('file-thumb-loading');
|
1794
|
-
});
|
1795
|
-
$tmp.remove();
|
1796
|
-
});
|
1797
|
-
} else {
|
1798
|
-
$body.html(body);
|
1799
|
-
}
|
1800
|
-
config = self.previewZoomSettings[tmplt];
|
1801
|
-
if (config) {
|
1802
|
-
$dataEl = $body.find('.kv-preview-data');
|
1803
|
-
$h.addCss($dataEl, 'file-zoom-detail');
|
1804
|
-
$.each(config, function (key, value) {
|
1805
|
-
$dataEl.css(key, value);
|
1806
|
-
if (($dataEl.attr('width') && key === 'width') || ($dataEl.attr('height') && key === 'height')) {
|
1807
|
-
$dataEl.removeAttr(key);
|
1808
|
-
}
|
1809
|
-
});
|
1810
|
-
}
|
1811
|
-
$modal.data('previewId', pid);
|
1812
|
-
var $img = $body.find('img');
|
1813
|
-
if ($img.length) {
|
1814
|
-
$h.adjustOrientedImage($img, true);
|
1815
|
-
}
|
1816
|
-
self._handler($prev, 'click', function () {
|
1817
|
-
self._zoomSlideShow('prev', pid);
|
1818
|
-
});
|
1819
|
-
self._handler($next, 'click', function () {
|
1820
|
-
self._zoomSlideShow('next', pid);
|
1821
|
-
});
|
1822
|
-
self._handler($btnFull, 'click', function () {
|
1823
|
-
self._resizeZoomDialog(true);
|
1824
|
-
});
|
1825
|
-
self._handler($btnBord, 'click', function () {
|
1826
|
-
self._resizeZoomDialog(false);
|
1827
|
-
});
|
1828
|
-
self._handler($btnTogh, 'click', function () {
|
1829
|
-
var $header = $modal.find('.modal-header'), $floatBar = $modal.find('.modal-body .floating-buttons'),
|
1830
|
-
ht, $actions = $header.find('.kv-zoom-actions'), resize = function (height) {
|
1831
|
-
var $body = self.$modal.find('.kv-zoom-body'), h = self.zoomModalHeight;
|
1832
|
-
if ($modal.hasClass('file-zoom-fullscreen')) {
|
1833
|
-
h = $body.outerHeight(true);
|
1834
|
-
if (!height) {
|
1835
|
-
h = h - $header.outerHeight(true);
|
1836
|
-
}
|
1837
|
-
}
|
1838
|
-
$body.css('height', height ? h + height : h);
|
1839
|
-
};
|
1840
|
-
if ($header.is(':visible')) {
|
1841
|
-
ht = $header.outerHeight(true);
|
1842
|
-
$header.slideUp('slow', function () {
|
1843
|
-
$actions.find('.btn').appendTo($floatBar);
|
1844
|
-
resize(ht);
|
1845
|
-
});
|
1846
|
-
} else {
|
1847
|
-
$floatBar.find('.btn').appendTo($actions);
|
1848
|
-
$header.slideDown('slow', function () {
|
1849
|
-
resize();
|
1850
|
-
});
|
1851
|
-
}
|
1852
|
-
$modal.focus();
|
1853
|
-
});
|
1854
|
-
self._handler($modal, 'keydown', function (e) {
|
1855
|
-
var key = e.which || e.keyCode;
|
1856
|
-
if (key === 37 && !$prev.attr('disabled')) {
|
1857
|
-
self._zoomSlideShow('prev', pid);
|
1858
|
-
}
|
1859
|
-
if (key === 39 && !$next.attr('disabled')) {
|
1860
|
-
self._zoomSlideShow('next', pid);
|
1861
|
-
}
|
1862
|
-
});
|
1863
|
-
},
|
1864
|
-
_zoomPreview: function ($btn) {
|
1865
|
-
var self = this, $frame, $modal = self.$modal;
|
1866
|
-
if (!$btn.length) {
|
1867
|
-
throw 'Cannot zoom to detailed preview!';
|
1868
|
-
}
|
1869
|
-
$h.initModal($modal);
|
1870
|
-
$modal.html(self._getModalContent());
|
1871
|
-
$frame = $btn.closest($h.FRAMES);
|
1872
|
-
self._setZoomContent($frame);
|
1873
|
-
$modal.modal('show');
|
1874
|
-
self._initZoomButtons();
|
1875
|
-
},
|
1876
|
-
_zoomSlideShow: function (dir, previewId) {
|
1877
|
-
var self = this, $btn = self.$modal.find('.kv-zoom-actions .btn-' + dir), $targFrame, i,
|
1878
|
-
thumbs = self.getFrames().toArray(), len = thumbs.length, out;
|
1879
|
-
if ($btn.attr('disabled')) {
|
1880
|
-
return;
|
1881
|
-
}
|
1882
|
-
for (i = 0; i < len; i++) {
|
1883
|
-
if ($(thumbs[i]).attr('id') === previewId) {
|
1884
|
-
out = dir === 'prev' ? i - 1 : i + 1;
|
1885
|
-
break;
|
1886
|
-
}
|
1887
|
-
}
|
1888
|
-
if (out < 0 || out >= len || !thumbs[out]) {
|
1889
|
-
return;
|
1890
|
-
}
|
1891
|
-
$targFrame = $(thumbs[out]);
|
1892
|
-
if ($targFrame.length) {
|
1893
|
-
self._setZoomContent($targFrame, true);
|
1894
|
-
}
|
1895
|
-
self._initZoomButtons();
|
1896
|
-
self._raise('filezoom' + dir, {'previewId': previewId, modal: self.$modal});
|
1897
|
-
},
|
1898
|
-
_initZoomButton: function () {
|
1899
|
-
var self = this;
|
1900
|
-
self.$preview.find('.kv-file-zoom').each(function () {
|
1901
|
-
var $el = $(this);
|
1902
|
-
self._handler($el, 'click', function () {
|
1903
|
-
self._zoomPreview($el);
|
1904
|
-
});
|
1905
|
-
});
|
1906
|
-
},
|
1907
|
-
_inputFileCount: function() {
|
1908
|
-
return this.$element.get(0).files.length;
|
1909
|
-
},
|
1910
|
-
_refreshPreview: function() {
|
1911
|
-
var self = this, files;
|
1912
|
-
if (!self._inputFileCount() || !self.showPreview || !self.isPreviewable) {
|
1913
|
-
return;
|
1914
|
-
}
|
1915
|
-
if (self.isAjaxUpload) {
|
1916
|
-
files = self.getFileStack();
|
1917
|
-
self.filestack = [];
|
1918
|
-
if (files.length) {
|
1919
|
-
self._clearFileInput();
|
1920
|
-
} else {
|
1921
|
-
files = self.$element.get(0).files;
|
1922
|
-
}
|
1923
|
-
} else {
|
1924
|
-
files = self.$element.get(0).files;
|
1925
|
-
}
|
1926
|
-
if (files && files.length) {
|
1927
|
-
self.readFiles(files);
|
1928
|
-
self._setFileDropZoneTitle();
|
1929
|
-
}
|
1930
|
-
},
|
1931
|
-
_clearObjects: function ($el) {
|
1932
|
-
$el.find('video audio').each(function () {
|
1933
|
-
this.pause();
|
1934
|
-
$(this).remove();
|
1935
|
-
});
|
1936
|
-
$el.find('img object div').each(function () {
|
1937
|
-
$(this).remove();
|
1938
|
-
});
|
1939
|
-
},
|
1940
|
-
_clearFileInput: function () {
|
1941
|
-
var self = this, $el = self.$element, $srcFrm, $tmpFrm, $tmpEl;
|
1942
|
-
if (!self._inputFileCount()) {
|
1943
|
-
return;
|
1944
|
-
}
|
1945
|
-
$srcFrm = $el.closest('form');
|
1946
|
-
$tmpFrm = $(document.createElement('form'));
|
1947
|
-
$tmpEl = $(document.createElement('div'));
|
1948
|
-
$el.before($tmpEl);
|
1949
|
-
if ($srcFrm.length) {
|
1950
|
-
$srcFrm.after($tmpFrm);
|
1951
|
-
} else {
|
1952
|
-
$tmpEl.after($tmpFrm);
|
1953
|
-
}
|
1954
|
-
$tmpFrm.append($el).trigger('reset');
|
1955
|
-
$tmpEl.before($el).remove();
|
1956
|
-
$tmpFrm.remove();
|
1957
|
-
},
|
1958
|
-
_resetUpload: function () {
|
1959
|
-
var self = this;
|
1960
|
-
self.uploadCache = {content: [], config: [], tags: [], append: true};
|
1961
|
-
self.uploadCount = 0;
|
1962
|
-
self.uploadStatus = {};
|
1963
|
-
self.uploadLog = [];
|
1964
|
-
self.uploadAsyncCount = 0;
|
1965
|
-
self.loadedImages = [];
|
1966
|
-
self.totalImagesCount = 0;
|
1967
|
-
self.$btnUpload.removeAttr('disabled');
|
1968
|
-
self._setProgress(0);
|
1969
|
-
self.$progress.hide();
|
1970
|
-
self._resetErrors(false);
|
1971
|
-
self.ajaxAborted = false;
|
1972
|
-
self.ajaxRequests = [];
|
1973
|
-
self._resetCanvas();
|
1974
|
-
self.cacheInitialPreview = {};
|
1975
|
-
if (self.overwriteInitial) {
|
1976
|
-
self.initialPreview = [];
|
1977
|
-
self.initialPreviewConfig = [];
|
1978
|
-
self.initialPreviewThumbTags = [];
|
1979
|
-
self.previewCache.data = {
|
1980
|
-
content: [],
|
1981
|
-
config: [],
|
1982
|
-
tags: []
|
1983
|
-
};
|
1984
|
-
}
|
1985
|
-
},
|
1986
|
-
_resetCanvas: function () {
|
1987
|
-
var self = this;
|
1988
|
-
if (self.canvas && self.imageCanvasContext) {
|
1989
|
-
self.imageCanvasContext.clearRect(0, 0, self.canvas.width, self.canvas.height);
|
1990
|
-
}
|
1991
|
-
},
|
1992
|
-
_hasInitialPreview: function () {
|
1993
|
-
var self = this;
|
1994
|
-
return !self.overwriteInitial && self.previewCache.count();
|
1995
|
-
},
|
1996
|
-
_resetPreview: function () {
|
1997
|
-
var self = this, out, cap;
|
1998
|
-
if (self.previewCache.count()) {
|
1999
|
-
out = self.previewCache.out();
|
2000
|
-
self._setPreviewContent(out.content);
|
2001
|
-
self._setInitThumbAttr();
|
2002
|
-
cap = self.initialCaption ? self.initialCaption : out.caption;
|
2003
|
-
self._setCaption(cap);
|
2004
|
-
} else {
|
2005
|
-
self._clearPreview();
|
2006
|
-
self._initCaption();
|
2007
|
-
}
|
2008
|
-
if (self.showPreview) {
|
2009
|
-
self._initZoom();
|
2010
|
-
self._initSortable();
|
2011
|
-
}
|
2012
|
-
},
|
2013
|
-
_clearDefaultPreview: function () {
|
2014
|
-
var self = this;
|
2015
|
-
self.$preview.find('.file-default-preview').remove();
|
2016
|
-
},
|
2017
|
-
_validateDefaultPreview: function () {
|
2018
|
-
var self = this;
|
2019
|
-
if (!self.showPreview || $h.isEmpty(self.defaultPreviewContent)) {
|
2020
|
-
return;
|
2021
|
-
}
|
2022
|
-
self._setPreviewContent('<div class="file-default-preview">' + self.defaultPreviewContent + '</div>');
|
2023
|
-
self.$container.removeClass('file-input-new');
|
2024
|
-
self._initClickable();
|
2025
|
-
},
|
2026
|
-
_resetPreviewThumbs: function (isAjax) {
|
2027
|
-
var self = this, out;
|
2028
|
-
if (isAjax) {
|
2029
|
-
self._clearPreview();
|
2030
|
-
self.clearStack();
|
2031
|
-
return;
|
2032
|
-
}
|
2033
|
-
if (self._hasInitialPreview()) {
|
2034
|
-
out = self.previewCache.out();
|
2035
|
-
self._setPreviewContent(out.content);
|
2036
|
-
self._setInitThumbAttr();
|
2037
|
-
self._setCaption(out.caption);
|
2038
|
-
self._initPreviewActions();
|
2039
|
-
} else {
|
2040
|
-
self._clearPreview();
|
2041
|
-
}
|
2042
|
-
},
|
2043
|
-
_getLayoutTemplate: function (t) {
|
2044
|
-
var self = this, template = self.layoutTemplates[t];
|
2045
|
-
if ($h.isEmpty(self.customLayoutTags)) {
|
2046
|
-
return template;
|
2047
|
-
}
|
2048
|
-
return $h.replaceTags(template, self.customLayoutTags);
|
2049
|
-
},
|
2050
|
-
_getPreviewTemplate: function (t) {
|
2051
|
-
var self = this, template = self.previewTemplates[t];
|
2052
|
-
if ($h.isEmpty(self.customPreviewTags)) {
|
2053
|
-
return template;
|
2054
|
-
}
|
2055
|
-
return $h.replaceTags(template, self.customPreviewTags);
|
2056
|
-
},
|
2057
|
-
_getOutData: function (jqXHR, responseData, filesData) {
|
2058
|
-
var self = this;
|
2059
|
-
jqXHR = jqXHR || {};
|
2060
|
-
responseData = responseData || {};
|
2061
|
-
filesData = filesData || self.filestack.slice(0) || {};
|
2062
|
-
return {
|
2063
|
-
form: self.formdata,
|
2064
|
-
files: filesData,
|
2065
|
-
filenames: self.filenames,
|
2066
|
-
filescount: self.getFilesCount(),
|
2067
|
-
extra: self._getExtraData(),
|
2068
|
-
response: responseData,
|
2069
|
-
reader: self.reader,
|
2070
|
-
jqXHR: jqXHR
|
2071
|
-
};
|
2072
|
-
},
|
2073
|
-
_getMsgSelected: function (n) {
|
2074
|
-
var self = this, strFiles = n === 1 ? self.fileSingle : self.filePlural;
|
2075
|
-
return n > 0 ? self.msgSelected.replace('{n}', n).replace('{files}', strFiles) : self.msgNoFilesSelected;
|
2076
|
-
},
|
2077
|
-
_getFrame: function (id) {
|
2078
|
-
var self = this, $frame = $('#' + id);
|
2079
|
-
if (!$frame.length) {
|
2080
|
-
self._log('Invalid thumb frame with id: "' + id + '".');
|
2081
|
-
return null;
|
2082
|
-
}
|
2083
|
-
return $frame;
|
2084
|
-
},
|
2085
|
-
_getThumbs: function (css) {
|
2086
|
-
css = css || '';
|
2087
|
-
return this.getFrames(':not(.file-preview-initial)' + css);
|
2088
|
-
},
|
2089
|
-
_getExtraData: function (previewId, index) {
|
2090
|
-
var self = this, data = self.uploadExtraData;
|
2091
|
-
if (typeof self.uploadExtraData === "function") {
|
2092
|
-
data = self.uploadExtraData(previewId, index);
|
2093
|
-
}
|
2094
|
-
return data;
|
2095
|
-
},
|
2096
|
-
_initXhr: function (xhrobj, previewId, fileCount) {
|
2097
|
-
var self = this;
|
2098
|
-
if (xhrobj.upload) {
|
2099
|
-
xhrobj.upload.addEventListener('progress', function (event) {
|
2100
|
-
var pct = 0, total = event.total, position = event.loaded || event.position;
|
2101
|
-
/** @namespace event.lengthComputable */
|
2102
|
-
if (event.lengthComputable) {
|
2103
|
-
pct = Math.floor(position / total * 100);
|
2104
|
-
}
|
2105
|
-
if (previewId) {
|
2106
|
-
self._setAsyncUploadStatus(previewId, pct, fileCount);
|
2107
|
-
} else {
|
2108
|
-
self._setProgress(pct);
|
2109
|
-
}
|
2110
|
-
}, false);
|
2111
|
-
}
|
2112
|
-
return xhrobj;
|
2113
|
-
},
|
2114
|
-
_initAjaxSettings: function () {
|
2115
|
-
var self = this;
|
2116
|
-
self._ajaxSettings = $.extend(true, {}, self.ajaxSettings);
|
2117
|
-
self._ajaxDeleteSettings = $.extend(true, {}, self.ajaxDeleteSettings);
|
2118
|
-
},
|
2119
|
-
_mergeAjaxCallback: function (funcName, srcFunc, type) {
|
2120
|
-
var self = this, settings = self._ajaxSettings, flag = self.mergeAjaxCallbacks, targFunc;
|
2121
|
-
if (type === 'delete') {
|
2122
|
-
settings = self._ajaxDeleteSettings;
|
2123
|
-
flag = self.mergeAjaxDeleteCallbacks;
|
2124
|
-
}
|
2125
|
-
targFunc = settings[funcName];
|
2126
|
-
if (flag && typeof targFunc === "function") {
|
2127
|
-
if (flag === 'before') {
|
2128
|
-
settings[funcName] = function () {
|
2129
|
-
targFunc.apply(this, arguments);
|
2130
|
-
srcFunc.apply(this, arguments);
|
2131
|
-
};
|
2132
|
-
} else {
|
2133
|
-
settings[funcName] = function () {
|
2134
|
-
srcFunc.apply(this, arguments);
|
2135
|
-
targFunc.apply(this, arguments);
|
2136
|
-
};
|
2137
|
-
}
|
2138
|
-
} else {
|
2139
|
-
settings[funcName] = srcFunc;
|
2140
|
-
}
|
2141
|
-
},
|
2142
|
-
_ajaxSubmit: function (fnBefore, fnSuccess, fnComplete, fnError, previewId, index) {
|
2143
|
-
var self = this, settings;
|
2144
|
-
if (!self._raise('filepreajax', [previewId, index])) {
|
2145
|
-
return;
|
2146
|
-
}
|
2147
|
-
self._uploadExtra(previewId, index);
|
2148
|
-
self._initAjaxSettings();
|
2149
|
-
self._mergeAjaxCallback('beforeSend', fnBefore);
|
2150
|
-
self._mergeAjaxCallback('success', fnSuccess);
|
2151
|
-
self._mergeAjaxCallback('complete', fnComplete);
|
2152
|
-
self._mergeAjaxCallback('error', fnError);
|
2153
|
-
settings = $.extend(true, {}, {
|
2154
|
-
xhr: function () {
|
2155
|
-
var xhrobj = $.ajaxSettings.xhr();
|
2156
|
-
return self._initXhr(xhrobj, previewId, self.getFileStack().length);
|
2157
|
-
},
|
2158
|
-
url: index && self.uploadUrlThumb ? self.uploadUrlThumb : self.uploadUrl,
|
2159
|
-
type: 'POST',
|
2160
|
-
dataType: 'json',
|
2161
|
-
data: self.formdata,
|
2162
|
-
cache: false,
|
2163
|
-
processData: false,
|
2164
|
-
contentType: false
|
2165
|
-
}, self._ajaxSettings);
|
2166
|
-
self.ajaxRequests.push($.ajax(settings));
|
2167
|
-
},
|
2168
|
-
_mergeArray: function (prop, content) {
|
2169
|
-
var self = this, arr1 = $h.cleanArray(self[prop]), arr2 = $h.cleanArray(content);
|
2170
|
-
self[prop] = arr1.concat(arr2);
|
2171
|
-
},
|
2172
|
-
_initUploadSuccess: function (out, $thumb, allFiles) {
|
2173
|
-
var self = this, append, data, index, $div, $newCache, content, config, tags, i;
|
2174
|
-
if (!self.showPreview || typeof out !== 'object' || $.isEmptyObject(out)) {
|
2175
|
-
return;
|
2176
|
-
}
|
2177
|
-
if (out.initialPreview !== undefined && out.initialPreview.length > 0) {
|
2178
|
-
self.hasInitData = true;
|
2179
|
-
content = out.initialPreview || [];
|
2180
|
-
config = out.initialPreviewConfig || [];
|
2181
|
-
tags = out.initialPreviewThumbTags || [];
|
2182
|
-
append = out.append === undefined || out.append;
|
2183
|
-
if (content.length > 0 && !$h.isArray(content)) {
|
2184
|
-
content = content.split(self.initialPreviewDelimiter);
|
2185
|
-
}
|
2186
|
-
self._mergeArray('initialPreview', content);
|
2187
|
-
self._mergeArray('initialPreviewConfig', config);
|
2188
|
-
self._mergeArray('initialPreviewThumbTags', tags);
|
2189
|
-
if ($thumb !== undefined) {
|
2190
|
-
if (!allFiles) {
|
2191
|
-
index = self.previewCache.add(content, config[0], tags[0], append);
|
2192
|
-
data = self.previewCache.get(index, false);
|
2193
|
-
$div = $(document.createElement('div')).html(data).hide().insertAfter($thumb);
|
2194
|
-
$newCache = $div.find('.kv-zoom-cache');
|
2195
|
-
if ($newCache && $newCache.length) {
|
2196
|
-
$newCache.insertAfter($thumb);
|
2197
|
-
}
|
2198
|
-
$thumb.fadeOut('slow', function () {
|
2199
|
-
var $newThumb = $div.find('.file-preview-frame');
|
2200
|
-
if ($newThumb && $newThumb.length) {
|
2201
|
-
$newThumb.insertBefore($thumb).fadeIn('slow').css('display:inline-block');
|
2202
|
-
}
|
2203
|
-
self._initPreviewActions();
|
2204
|
-
self._clearFileInput();
|
2205
|
-
$h.cleanZoomCache(self.$preview.find('#zoom-' + $thumb.attr('id')));
|
2206
|
-
$thumb.remove();
|
2207
|
-
$div.remove();
|
2208
|
-
self._initSortable();
|
2209
|
-
});
|
2210
|
-
} else {
|
2211
|
-
i = $thumb.attr('data-fileindex');
|
2212
|
-
self.uploadCache.content[i] = content[0];
|
2213
|
-
self.uploadCache.config[i] = config[0] || [];
|
2214
|
-
self.uploadCache.tags[i] = tags[0] || [];
|
2215
|
-
self.uploadCache.append = append;
|
2216
|
-
}
|
2217
|
-
} else {
|
2218
|
-
self.previewCache.set(content, config, tags, append);
|
2219
|
-
self._initPreview();
|
2220
|
-
self._initPreviewActions();
|
2221
|
-
}
|
2222
|
-
}
|
2223
|
-
},
|
2224
|
-
_initSuccessThumbs: function () {
|
2225
|
-
var self = this;
|
2226
|
-
if (!self.showPreview) {
|
2227
|
-
return;
|
2228
|
-
}
|
2229
|
-
self._getThumbs($h.FRAMES + '.file-preview-success').each(function () {
|
2230
|
-
var $thumb = $(this), $preview = self.$preview, $remove = $thumb.find('.kv-file-remove');
|
2231
|
-
$remove.removeAttr('disabled');
|
2232
|
-
self._handler($remove, 'click', function () {
|
2233
|
-
var id = $thumb.attr('id'),
|
2234
|
-
out = self._raise('filesuccessremove', [id, $thumb.attr('data-fileindex')]);
|
2235
|
-
$h.cleanMemory($thumb);
|
2236
|
-
if (out === false) {
|
2237
|
-
return;
|
2238
|
-
}
|
2239
|
-
$thumb.fadeOut('slow', function () {
|
2240
|
-
$h.cleanZoomCache($preview.find('#zoom-' + id));
|
2241
|
-
$thumb.remove();
|
2242
|
-
if (!self.getFrames().length) {
|
2243
|
-
self.reset();
|
2244
|
-
}
|
2245
|
-
});
|
2246
|
-
});
|
2247
|
-
});
|
2248
|
-
},
|
2249
|
-
_checkAsyncComplete: function () {
|
2250
|
-
var self = this, previewId, i;
|
2251
|
-
for (i = 0; i < self.filestack.length; i++) {
|
2252
|
-
if (self.filestack[i]) {
|
2253
|
-
previewId = self.previewInitId + "-" + i;
|
2254
|
-
if ($.inArray(previewId, self.uploadLog) === -1) {
|
2255
|
-
return false;
|
2256
|
-
}
|
2257
|
-
}
|
2258
|
-
}
|
2259
|
-
return (self.uploadAsyncCount === self.uploadLog.length);
|
2260
|
-
},
|
2261
|
-
_uploadExtra: function (previewId, index) {
|
2262
|
-
var self = this, data = self._getExtraData(previewId, index);
|
2263
|
-
if (data.length === 0) {
|
2264
|
-
return;
|
2265
|
-
}
|
2266
|
-
$.each(data, function (key, value) {
|
2267
|
-
self.formdata.append(key, value);
|
2268
|
-
});
|
2269
|
-
},
|
2270
|
-
_uploadSingle: function (i, isBatch) {
|
2271
|
-
var self = this, total = self.getFileStack().length, formdata = new FormData(), outData,
|
2272
|
-
previewId = self.previewInitId + "-" + i, $thumb, chkComplete, $btnUpload, $btnDelete,
|
2273
|
-
hasPostData = self.filestack.length > 0 || !$.isEmptyObject(self.uploadExtraData), uploadFailed,
|
2274
|
-
$prog = $('#' + previewId).find('.file-thumb-progress'), fnBefore, fnSuccess, fnComplete, fnError,
|
2275
|
-
updateUploadLog, params = {id: previewId, index: i};
|
2276
|
-
self.formdata = formdata;
|
2277
|
-
if (self.showPreview) {
|
2278
|
-
$thumb = $('#' + previewId + ':not(.file-preview-initial)');
|
2279
|
-
$btnUpload = $thumb.find('.kv-file-upload');
|
2280
|
-
$btnDelete = $thumb.find('.kv-file-remove');
|
2281
|
-
$prog.show();
|
2282
|
-
}
|
2283
|
-
if (total === 0 || !hasPostData || ($btnUpload && $btnUpload.hasClass('disabled')) || self._abort(params)) {
|
2284
|
-
return;
|
2285
|
-
}
|
2286
|
-
updateUploadLog = function (i, previewId) {
|
2287
|
-
if (!uploadFailed) {
|
2288
|
-
self.updateStack(i, undefined);
|
2289
|
-
}
|
2290
|
-
self.uploadLog.push(previewId);
|
2291
|
-
if (self._checkAsyncComplete()) {
|
2292
|
-
self.fileBatchCompleted = true;
|
2293
|
-
}
|
2294
|
-
};
|
2295
|
-
chkComplete = function () {
|
2296
|
-
var u = self.uploadCache, $initThumbs, i, j, len = 0, data = self.cacheInitialPreview;
|
2297
|
-
if (!self.fileBatchCompleted) {
|
2298
|
-
return;
|
2299
|
-
}
|
2300
|
-
if (data && data.content) {
|
2301
|
-
len = data.content.length;
|
2302
|
-
}
|
2303
|
-
setTimeout(function () {
|
2304
|
-
var triggerReset = self.getFileStack(true).length === 0;
|
2305
|
-
if (self.showPreview) {
|
2306
|
-
self.previewCache.set(u.content, u.config, u.tags, u.append);
|
2307
|
-
if (len) {
|
2308
|
-
for (i = 0; i < u.content.length; i++) {
|
2309
|
-
j = i + len;
|
2310
|
-
data.content[j] = u.content[i];
|
2311
|
-
//noinspection JSUnresolvedVariable
|
2312
|
-
if (data.config.length) {
|
2313
|
-
data.config[j] = u.config[i];
|
2314
|
-
}
|
2315
|
-
if (data.tags.length) {
|
2316
|
-
data.tags[j] = u.tags[i];
|
2317
|
-
}
|
2318
|
-
}
|
2319
|
-
self.initialPreview = $h.cleanArray(data.content);
|
2320
|
-
self.initialPreviewConfig = $h.cleanArray(data.config);
|
2321
|
-
self.initialPreviewThumbTags = $h.cleanArray(data.tags);
|
2322
|
-
} else {
|
2323
|
-
self.initialPreview = u.content;
|
2324
|
-
self.initialPreviewConfig = u.config;
|
2325
|
-
self.initialPreviewThumbTags = u.tags;
|
2326
|
-
}
|
2327
|
-
self.cacheInitialPreview = {};
|
2328
|
-
if (self.hasInitData) {
|
2329
|
-
self._initPreview();
|
2330
|
-
self._initPreviewActions();
|
2331
|
-
}
|
2332
|
-
}
|
2333
|
-
self.unlock(triggerReset);
|
2334
|
-
if (triggerReset) {
|
2335
|
-
self._clearFileInput();
|
2336
|
-
}
|
2337
|
-
$initThumbs = self.$preview.find('.file-preview-initial');
|
2338
|
-
if (self.uploadAsync && $initThumbs.length) {
|
2339
|
-
$h.addCss($initThumbs, $h.SORT_CSS);
|
2340
|
-
self._initSortable();
|
2341
|
-
}
|
2342
|
-
self._raise('filebatchuploadcomplete', [self.filestack, self._getExtraData()]);
|
2343
|
-
self.uploadCount = 0;
|
2344
|
-
self.uploadStatus = {};
|
2345
|
-
self.uploadLog = [];
|
2346
|
-
self._setProgress(101);
|
2347
|
-
self.ajaxAborted = false;
|
2348
|
-
}, 100);
|
2349
|
-
};
|
2350
|
-
fnBefore = function (jqXHR) {
|
2351
|
-
outData = self._getOutData(jqXHR);
|
2352
|
-
self.fileBatchCompleted = false;
|
2353
|
-
if (!isBatch) {
|
2354
|
-
self.ajaxAborted = false;
|
2355
|
-
}
|
2356
|
-
if (self.showPreview) {
|
2357
|
-
if (!$thumb.hasClass('file-preview-success')) {
|
2358
|
-
self._setThumbStatus($thumb, 'Loading');
|
2359
|
-
$h.addCss($thumb, 'file-uploading');
|
2360
|
-
}
|
2361
|
-
$btnUpload.attr('disabled', true);
|
2362
|
-
$btnDelete.attr('disabled', true);
|
2363
|
-
}
|
2364
|
-
if (!isBatch) {
|
2365
|
-
self.lock();
|
2366
|
-
}
|
2367
|
-
self._raise('filepreupload', [outData, previewId, i]);
|
2368
|
-
$.extend(true, params, outData);
|
2369
|
-
if (self._abort(params)) {
|
2370
|
-
jqXHR.abort();
|
2371
|
-
if (!isBatch) {
|
2372
|
-
self._setThumbStatus($thumb, 'New');
|
2373
|
-
$thumb.removeClass('file-uploading');
|
2374
|
-
$btnUpload.removeAttr('disabled');
|
2375
|
-
$btnDelete.removeAttr('disabled');
|
2376
|
-
self.unlock();
|
2377
|
-
}
|
2378
|
-
self._setProgressCancelled();
|
2379
|
-
}
|
2380
|
-
};
|
2381
|
-
fnSuccess = function (data, textStatus, jqXHR) {
|
2382
|
-
var pid = self.showPreview && $thumb.attr('id') ? $thumb.attr('id') : previewId;
|
2383
|
-
outData = self._getOutData(jqXHR, data);
|
2384
|
-
$.extend(true, params, outData);
|
2385
|
-
setTimeout(function () {
|
2386
|
-
if ($h.isEmpty(data) || $h.isEmpty(data.error)) {
|
2387
|
-
if (self.showPreview) {
|
2388
|
-
self._setThumbStatus($thumb, 'Success');
|
2389
|
-
$btnUpload.hide();
|
2390
|
-
self._initUploadSuccess(data, $thumb, isBatch);
|
2391
|
-
self._setProgress(101, $prog);
|
2392
|
-
}
|
2393
|
-
self._raise('fileuploaded', [outData, pid, i]);
|
2394
|
-
if (!isBatch) {
|
2395
|
-
self.updateStack(i, undefined);
|
2396
|
-
} else {
|
2397
|
-
updateUploadLog(i, pid);
|
2398
|
-
}
|
2399
|
-
} else {
|
2400
|
-
uploadFailed = true;
|
2401
|
-
self._showUploadError(data.error, params);
|
2402
|
-
self._setPreviewError($thumb, i, self.filestack[i], self.retryErrorUploads);
|
2403
|
-
if (!self.retryErrorUploads) {
|
2404
|
-
$btnUpload.hide();
|
2405
|
-
}
|
2406
|
-
if (isBatch) {
|
2407
|
-
updateUploadLog(i, pid);
|
2408
|
-
}
|
2409
|
-
self._setProgress(101, $('#' + pid).find('.file-thumb-progress'), self.msgUploadError);
|
2410
|
-
}
|
2411
|
-
}, 100);
|
2412
|
-
};
|
2413
|
-
fnComplete = function () {
|
2414
|
-
setTimeout(function () {
|
2415
|
-
if (self.showPreview) {
|
2416
|
-
$btnUpload.removeAttr('disabled');
|
2417
|
-
$btnDelete.removeAttr('disabled');
|
2418
|
-
$thumb.removeClass('file-uploading');
|
2419
|
-
}
|
2420
|
-
if (!isBatch) {
|
2421
|
-
self.unlock(false);
|
2422
|
-
self._clearFileInput();
|
2423
|
-
} else {
|
2424
|
-
chkComplete();
|
2425
|
-
}
|
2426
|
-
self._initSuccessThumbs();
|
2427
|
-
}, 100);
|
2428
|
-
};
|
2429
|
-
fnError = function (jqXHR, textStatus, errorThrown) {
|
2430
|
-
var op = self.ajaxOperations.uploadThumb,
|
2431
|
-
errMsg = self._parseError(op, jqXHR, errorThrown, (isBatch && self.filestack[i].name ? self.filestack[i].name : null));
|
2432
|
-
uploadFailed = true;
|
2433
|
-
setTimeout(function () {
|
2434
|
-
if (isBatch) {
|
2435
|
-
updateUploadLog(i, previewId);
|
2436
|
-
}
|
2437
|
-
self.uploadStatus[previewId] = 100;
|
2438
|
-
self._setPreviewError($thumb, i, self.filestack[i], self.retryErrorUploads);
|
2439
|
-
if (!self.retryErrorUploads) {
|
2440
|
-
$btnUpload.hide();
|
2441
|
-
}
|
2442
|
-
$.extend(true, params, self._getOutData(jqXHR));
|
2443
|
-
self._setProgress(101, $prog, self.msgAjaxProgressError.replace('{operation}', op));
|
2444
|
-
self._setProgress(101, $('#' + previewId).find('.file-thumb-progress'), self.msgUploadError);
|
2445
|
-
self._showUploadError(errMsg, params);
|
2446
|
-
}, 100);
|
2447
|
-
};
|
2448
|
-
formdata.append(self.uploadFileAttr, self.filestack[i], self.filenames[i]);
|
2449
|
-
formdata.append('file_id', i);
|
2450
|
-
self._ajaxSubmit(fnBefore, fnSuccess, fnComplete, fnError, previewId, i);
|
2451
|
-
},
|
2452
|
-
_uploadBatch: function () {
|
2453
|
-
var self = this, files = self.filestack, total = files.length, params = {}, fnBefore, fnSuccess, fnError,
|
2454
|
-
fnComplete, hasPostData = self.filestack.length > 0 || !$.isEmptyObject(self.uploadExtraData),
|
2455
|
-
setAllUploaded;
|
2456
|
-
self.formdata = new FormData();
|
2457
|
-
if (total === 0 || !hasPostData || self._abort(params)) {
|
2458
|
-
return;
|
2459
|
-
}
|
2460
|
-
setAllUploaded = function () {
|
2461
|
-
$.each(files, function (key) {
|
2462
|
-
self.updateStack(key, undefined);
|
2463
|
-
});
|
2464
|
-
self._clearFileInput();
|
2465
|
-
};
|
2466
|
-
fnBefore = function (jqXHR) {
|
2467
|
-
self.lock();
|
2468
|
-
var outData = self._getOutData(jqXHR);
|
2469
|
-
self.ajaxAborted = false;
|
2470
|
-
if (self.showPreview) {
|
2471
|
-
self._getThumbs().each(function () {
|
2472
|
-
var $thumb = $(this), $btnUpload = $thumb.find('.kv-file-upload'),
|
2473
|
-
$btnDelete = $thumb.find('.kv-file-remove');
|
2474
|
-
if (!$thumb.hasClass('file-preview-success')) {
|
2475
|
-
self._setThumbStatus($thumb, 'Loading');
|
2476
|
-
$h.addCss($thumb, 'file-uploading');
|
2477
|
-
}
|
2478
|
-
$btnUpload.attr('disabled', true);
|
2479
|
-
$btnDelete.attr('disabled', true);
|
2480
|
-
});
|
2481
|
-
}
|
2482
|
-
self._raise('filebatchpreupload', [outData]);
|
2483
|
-
if (self._abort(outData)) {
|
2484
|
-
jqXHR.abort();
|
2485
|
-
self._getThumbs().each(function () {
|
2486
|
-
var $thumb = $(this), $btnUpload = $thumb.find('.kv-file-upload'),
|
2487
|
-
$btnDelete = $thumb.find('.kv-file-remove');
|
2488
|
-
if ($thumb.hasClass('file-preview-loading')) {
|
2489
|
-
self._setThumbStatus($thumb, 'New');
|
2490
|
-
$thumb.removeClass('file-uploading');
|
2491
|
-
}
|
2492
|
-
$btnUpload.removeAttr('disabled');
|
2493
|
-
$btnDelete.removeAttr('disabled');
|
2494
|
-
});
|
2495
|
-
self._setProgressCancelled();
|
2496
|
-
}
|
2497
|
-
};
|
2498
|
-
fnSuccess = function (data, textStatus, jqXHR) {
|
2499
|
-
/** @namespace data.errorkeys */
|
2500
|
-
var outData = self._getOutData(jqXHR, data), key = 0,
|
2501
|
-
$thumbs = self._getThumbs(':not(.file-preview-success)'),
|
2502
|
-
keys = $h.isEmpty(data) || $h.isEmpty(data.errorkeys) ? [] : data.errorkeys;
|
2503
|
-
|
2504
|
-
if ($h.isEmpty(data) || $h.isEmpty(data.error)) {
|
2505
|
-
self._raise('filebatchuploadsuccess', [outData]);
|
2506
|
-
setAllUploaded();
|
2507
|
-
if (self.showPreview) {
|
2508
|
-
$thumbs.each(function () {
|
2509
|
-
var $thumb = $(this);
|
2510
|
-
self._setThumbStatus($thumb, 'Success');
|
2511
|
-
$thumb.removeClass('file-uploading');
|
2512
|
-
$thumb.find('.kv-file-upload').hide().removeAttr('disabled');
|
2513
|
-
});
|
2514
|
-
self._initUploadSuccess(data);
|
2515
|
-
} else {
|
2516
|
-
self.reset();
|
2517
|
-
}
|
2518
|
-
self._setProgress(101);
|
2519
|
-
} else {
|
2520
|
-
if (self.showPreview) {
|
2521
|
-
$thumbs.each(function () {
|
2522
|
-
var $thumb = $(this), i = $thumb.attr('data-fileindex');
|
2523
|
-
$thumb.removeClass('file-uploading');
|
2524
|
-
$thumb.find('.kv-file-upload').removeAttr('disabled');
|
2525
|
-
$thumb.find('.kv-file-remove').removeAttr('disabled');
|
2526
|
-
if (keys.length === 0 || $.inArray(key, keys) !== -1) {
|
2527
|
-
self._setPreviewError($thumb, i, self.filestack[i], self.retryErrorUploads);
|
2528
|
-
if (!self.retryErrorUploads) {
|
2529
|
-
$thumb.find('.kv-file-upload').hide();
|
2530
|
-
self.updateStack(i, undefined);
|
2531
|
-
}
|
2532
|
-
} else {
|
2533
|
-
$thumb.find('.kv-file-upload').hide();
|
2534
|
-
self._setThumbStatus($thumb, 'Success');
|
2535
|
-
self.updateStack(i, undefined);
|
2536
|
-
}
|
2537
|
-
if (!$thumb.hasClass('file-preview-error') || self.retryErrorUploads) {
|
2538
|
-
key++;
|
2539
|
-
}
|
2540
|
-
});
|
2541
|
-
self._initUploadSuccess(data);
|
2542
|
-
}
|
2543
|
-
self._showUploadError(data.error, outData, 'filebatchuploaderror');
|
2544
|
-
self._setProgress(101, self.$progress, self.msgUploadError);
|
2545
|
-
}
|
2546
|
-
};
|
2547
|
-
fnComplete = function () {
|
2548
|
-
self.unlock();
|
2549
|
-
self._initSuccessThumbs();
|
2550
|
-
self._clearFileInput();
|
2551
|
-
self._raise('filebatchuploadcomplete', [self.filestack, self._getExtraData()]);
|
2552
|
-
};
|
2553
|
-
fnError = function (jqXHR, textStatus, errorThrown) {
|
2554
|
-
var outData = self._getOutData(jqXHR), op = self.ajaxOperations.uploadBatch,
|
2555
|
-
errMsg = self._parseError(op, jqXHR, errorThrown);
|
2556
|
-
self._showUploadError(errMsg, outData, 'filebatchuploaderror');
|
2557
|
-
self.uploadFileCount = total - 1;
|
2558
|
-
if (!self.showPreview) {
|
2559
|
-
return;
|
2560
|
-
}
|
2561
|
-
self._getThumbs().each(function () {
|
2562
|
-
var $thumb = $(this), key = $thumb.attr('data-fileindex');
|
2563
|
-
$thumb.removeClass('file-uploading');
|
2564
|
-
if (self.filestack[key] !== undefined) {
|
2565
|
-
self._setPreviewError($thumb);
|
2566
|
-
}
|
2567
|
-
});
|
2568
|
-
self._getThumbs().removeClass('file-uploading');
|
2569
|
-
self._getThumbs(' .kv-file-upload').removeAttr('disabled');
|
2570
|
-
self._getThumbs(' .kv-file-delete').removeAttr('disabled');
|
2571
|
-
self._setProgress(101, self.$progress, self.msgAjaxProgressError.replace('{operation}', op));
|
2572
|
-
};
|
2573
|
-
$.each(files, function (key, data) {
|
2574
|
-
if (!$h.isEmpty(files[key])) {
|
2575
|
-
self.formdata.append(self.uploadFileAttr, data, self.filenames[key]);
|
2576
|
-
}
|
2577
|
-
});
|
2578
|
-
self._ajaxSubmit(fnBefore, fnSuccess, fnComplete, fnError);
|
2579
|
-
},
|
2580
|
-
_uploadExtraOnly: function () {
|
2581
|
-
var self = this, params = {}, fnBefore, fnSuccess, fnComplete, fnError;
|
2582
|
-
self.formdata = new FormData();
|
2583
|
-
if (self._abort(params)) {
|
2584
|
-
return;
|
2585
|
-
}
|
2586
|
-
fnBefore = function (jqXHR) {
|
2587
|
-
self.lock();
|
2588
|
-
var outData = self._getOutData(jqXHR);
|
2589
|
-
self._raise('filebatchpreupload', [outData]);
|
2590
|
-
self._setProgress(50);
|
2591
|
-
params.data = outData;
|
2592
|
-
params.xhr = jqXHR;
|
2593
|
-
if (self._abort(params)) {
|
2594
|
-
jqXHR.abort();
|
2595
|
-
self._setProgressCancelled();
|
2596
|
-
}
|
2597
|
-
};
|
2598
|
-
fnSuccess = function (data, textStatus, jqXHR) {
|
2599
|
-
var outData = self._getOutData(jqXHR, data);
|
2600
|
-
if ($h.isEmpty(data) || $h.isEmpty(data.error)) {
|
2601
|
-
self._raise('filebatchuploadsuccess', [outData]);
|
2602
|
-
self._clearFileInput();
|
2603
|
-
self._initUploadSuccess(data);
|
2604
|
-
self._setProgress(101);
|
2605
|
-
} else {
|
2606
|
-
self._showUploadError(data.error, outData, 'filebatchuploaderror');
|
2607
|
-
}
|
2608
|
-
};
|
2609
|
-
fnComplete = function () {
|
2610
|
-
self.unlock();
|
2611
|
-
self._clearFileInput();
|
2612
|
-
self._raise('filebatchuploadcomplete', [self.filestack, self._getExtraData()]);
|
2613
|
-
};
|
2614
|
-
fnError = function (jqXHR, textStatus, errorThrown) {
|
2615
|
-
var outData = self._getOutData(jqXHR), op = self.ajaxOperations.uploadExtra,
|
2616
|
-
errMsg = self._parseError(op, jqXHR, errorThrown);
|
2617
|
-
params.data = outData;
|
2618
|
-
self._showUploadError(errMsg, outData, 'filebatchuploaderror');
|
2619
|
-
self._setProgress(101, self.$progress, self.msgAjaxProgressError.replace('{operation}', op));
|
2620
|
-
};
|
2621
|
-
self._ajaxSubmit(fnBefore, fnSuccess, fnComplete, fnError);
|
2622
|
-
},
|
2623
|
-
_deleteFileIndex: function ($frame) {
|
2624
|
-
var self = this, ind = $frame.attr('data-fileindex'), rev = self.reversePreviewOrder;
|
2625
|
-
if (ind.substring(0, 5) === 'init_') {
|
2626
|
-
ind = parseInt(ind.replace('init_', ''));
|
2627
|
-
self.initialPreview = $h.spliceArray(self.initialPreview, ind, rev);
|
2628
|
-
self.initialPreviewConfig = $h.spliceArray(self.initialPreviewConfig, ind, rev);
|
2629
|
-
self.initialPreviewThumbTags = $h.spliceArray(self.initialPreviewThumbTags, ind, rev);
|
2630
|
-
self.getFrames().each(function () {
|
2631
|
-
var $nFrame = $(this), nInd = $nFrame.attr('data-fileindex');
|
2632
|
-
if (nInd.substring(0, 5) === 'init_') {
|
2633
|
-
nInd = parseInt(nInd.replace('init_', ''));
|
2634
|
-
if (nInd > ind) {
|
2635
|
-
nInd--;
|
2636
|
-
$nFrame.attr('data-fileindex', 'init_' + nInd);
|
2637
|
-
}
|
2638
|
-
}
|
2639
|
-
});
|
2640
|
-
if (self.uploadAsync) {
|
2641
|
-
self.cacheInitialPreview = self.getPreview();
|
2642
|
-
}
|
2643
|
-
}
|
2644
|
-
},
|
2645
|
-
_initFileActions: function () {
|
2646
|
-
var self = this, $preview = self.$preview;
|
2647
|
-
if (!self.showPreview) {
|
2648
|
-
return;
|
2649
|
-
}
|
2650
|
-
self._initZoomButton();
|
2651
|
-
self.getFrames(' .kv-file-remove').each(function () {
|
2652
|
-
var $el = $(this), $frame = $el.closest($h.FRAMES), hasError, id = $frame.attr('id'),
|
2653
|
-
ind = $frame.attr('data-fileindex'), n, cap, status;
|
2654
|
-
self._handler($el, 'click', function () {
|
2655
|
-
status = self._raise('filepreremove', [id, ind]);
|
2656
|
-
if (status === false || !self._validateMinCount()) {
|
2657
|
-
return false;
|
2658
|
-
}
|
2659
|
-
hasError = $frame.hasClass('file-preview-error');
|
2660
|
-
$h.cleanMemory($frame);
|
2661
|
-
$frame.fadeOut('slow', function () {
|
2662
|
-
$h.cleanZoomCache($preview.find('#zoom-' + id));
|
2663
|
-
self.updateStack(ind, undefined);
|
2664
|
-
self._clearObjects($frame);
|
2665
|
-
$frame.remove();
|
2666
|
-
if (id && hasError) {
|
2667
|
-
self.$errorContainer.find('li[data-file-id="' + id + '"]').fadeOut('fast', function () {
|
2668
|
-
$(this).remove();
|
2669
|
-
if (!self._errorsExist()) {
|
2670
|
-
self._resetErrors();
|
2671
|
-
}
|
2672
|
-
});
|
2673
|
-
}
|
2674
|
-
self._clearFileInput();
|
2675
|
-
var filestack = self.getFileStack(true), chk = self.previewCache.count(),
|
2676
|
-
len = filestack.length, hasThumb = self.showPreview && self.getFrames().length;
|
2677
|
-
if (len === 0 && chk === 0 && !hasThumb) {
|
2678
|
-
self.reset();
|
2679
|
-
} else {
|
2680
|
-
n = chk + len;
|
2681
|
-
cap = n > 1 ? self._getMsgSelected(n) : (filestack[0] ? self._getFileNames()[0] : '');
|
2682
|
-
self._setCaption(cap);
|
2683
|
-
}
|
2684
|
-
self._raise('fileremoved', [id, ind]);
|
2685
|
-
});
|
2686
|
-
});
|
2687
|
-
});
|
2688
|
-
self.getFrames(' .kv-file-upload').each(function () {
|
2689
|
-
var $el = $(this);
|
2690
|
-
self._handler($el, 'click', function () {
|
2691
|
-
var $frame = $el.closest($h.FRAMES), ind = $frame.attr('data-fileindex');
|
2692
|
-
self.$progress.hide();
|
2693
|
-
if ($frame.hasClass('file-preview-error') && !self.retryErrorUploads) {
|
2694
|
-
return;
|
2695
|
-
}
|
2696
|
-
self._uploadSingle(ind, false);
|
2697
|
-
});
|
2698
|
-
});
|
2699
|
-
},
|
2700
|
-
_initPreviewActions: function () {
|
2701
|
-
var self = this, $preview = self.$preview, deleteExtraData = self.deleteExtraData || {},
|
2702
|
-
btnRemove = $h.FRAMES + ' .kv-file-remove', settings = self.fileActionSettings,
|
2703
|
-
origClass = settings.removeClass, errClass = settings.removeErrorClass,
|
2704
|
-
resetProgress = function () {
|
2705
|
-
var hasFiles = self.isAjaxUpload ? self.previewCache.count() : self._inputFileCount();
|
2706
|
-
if (!$preview.find($h.FRAMES).length && !hasFiles) {
|
2707
|
-
self._setCaption('');
|
2708
|
-
self.reset();
|
2709
|
-
self.initialCaption = '';
|
2710
|
-
}
|
2711
|
-
};
|
2712
|
-
self._initZoomButton();
|
2713
|
-
$preview.find(btnRemove).each(function () {
|
2714
|
-
var $el = $(this), vUrl = $el.data('url') || self.deleteUrl, vKey = $el.data('key'),
|
2715
|
-
fnBefore, fnSuccess, fnError;
|
2716
|
-
if ($h.isEmpty(vUrl) || vKey === undefined) {
|
2717
|
-
return;
|
2718
|
-
}
|
2719
|
-
var $frame = $el.closest($h.FRAMES), cache = self.previewCache.data,
|
2720
|
-
settings, params, index = $frame.attr('data-fileindex'), config, extraData;
|
2721
|
-
index = parseInt(index.replace('init_', ''));
|
2722
|
-
config = $h.isEmpty(cache.config) && $h.isEmpty(cache.config[index]) ? null : cache.config[index];
|
2723
|
-
extraData = $h.isEmpty(config) || $h.isEmpty(config.extra) ? deleteExtraData : config.extra;
|
2724
|
-
if (typeof extraData === "function") {
|
2725
|
-
extraData = extraData();
|
2726
|
-
}
|
2727
|
-
params = {id: $el.attr('id'), key: vKey, extra: extraData};
|
2728
|
-
fnBefore = function (jqXHR) {
|
2729
|
-
self.ajaxAborted = false;
|
2730
|
-
self._raise('filepredelete', [vKey, jqXHR, extraData]);
|
2731
|
-
if (self._abort()) {
|
2732
|
-
jqXHR.abort();
|
2733
|
-
} else {
|
2734
|
-
$el.removeClass(errClass);
|
2735
|
-
$h.addCss($frame, 'file-uploading');
|
2736
|
-
$h.addCss($el, 'disabled ' + origClass);
|
2737
|
-
}
|
2738
|
-
};
|
2739
|
-
fnSuccess = function (data, textStatus, jqXHR) {
|
2740
|
-
var n, cap;
|
2741
|
-
if (!$h.isEmpty(data) && !$h.isEmpty(data.error)) {
|
2742
|
-
params.jqXHR = jqXHR;
|
2743
|
-
params.response = data;
|
2744
|
-
self._showError(data.error, params, 'filedeleteerror');
|
2745
|
-
$frame.removeClass('file-uploading');
|
2746
|
-
$el.removeClass('disabled ' + origClass).addClass(errClass);
|
2747
|
-
resetProgress();
|
2748
|
-
return;
|
2749
|
-
}
|
2750
|
-
$frame.removeClass('file-uploading').addClass('file-deleted');
|
2751
|
-
$frame.fadeOut('slow', function () {
|
2752
|
-
index = parseInt(($frame.attr('data-fileindex')).replace('init_', ''));
|
2753
|
-
self.previewCache.unset(index);
|
2754
|
-
self._deleteFileIndex($frame);
|
2755
|
-
n = self.previewCache.count();
|
2756
|
-
cap = n > 0 ? self._getMsgSelected(n) : '';
|
2757
|
-
self._setCaption(cap);
|
2758
|
-
self._raise('filedeleted', [vKey, jqXHR, extraData]);
|
2759
|
-
$h.cleanZoomCache($preview.find('#zoom-' + $frame.attr('id')));
|
2760
|
-
self._clearObjects($frame);
|
2761
|
-
$frame.remove();
|
2762
|
-
resetProgress();
|
2763
|
-
});
|
2764
|
-
};
|
2765
|
-
fnError = function (jqXHR, textStatus, errorThrown) {
|
2766
|
-
var op = self.ajaxOperations.deleteThumb, errMsg = self._parseError(op, jqXHR, errorThrown);
|
2767
|
-
params.jqXHR = jqXHR;
|
2768
|
-
params.response = {};
|
2769
|
-
self._showError(errMsg, params, 'filedeleteerror');
|
2770
|
-
$frame.removeClass('file-uploading');
|
2771
|
-
$el.removeClass('disabled ' + origClass).addClass(errClass);
|
2772
|
-
resetProgress();
|
2773
|
-
};
|
2774
|
-
self._initAjaxSettings();
|
2775
|
-
self._mergeAjaxCallback('beforeSend', fnBefore, 'delete');
|
2776
|
-
self._mergeAjaxCallback('success', fnSuccess, 'delete');
|
2777
|
-
self._mergeAjaxCallback('error', fnError, 'delete');
|
2778
|
-
settings = $.extend(true, {}, {
|
2779
|
-
url: vUrl,
|
2780
|
-
type: 'POST',
|
2781
|
-
dataType: 'json',
|
2782
|
-
data: $.extend(true, {}, {key: vKey}, extraData)
|
2783
|
-
}, self._ajaxDeleteSettings);
|
2784
|
-
self._handler($el, 'click', function () {
|
2785
|
-
if (!self._validateMinCount()) {
|
2786
|
-
return false;
|
2787
|
-
}
|
2788
|
-
self.ajaxAborted = false;
|
2789
|
-
self._raise('filebeforedelete', [vKey, extraData]);
|
2790
|
-
//noinspection JSUnresolvedVariable,JSHint
|
2791
|
-
if (self.ajaxAborted instanceof Promise) {
|
2792
|
-
self.ajaxAborted.then(function (result) {
|
2793
|
-
if (!result) {
|
2794
|
-
$.ajax(settings);
|
2795
|
-
}
|
2796
|
-
});
|
2797
|
-
} else {
|
2798
|
-
if (!self.ajaxAborted) {
|
2799
|
-
$.ajax(settings);
|
2800
|
-
}
|
2801
|
-
}
|
2802
|
-
});
|
2803
|
-
});
|
2804
|
-
},
|
2805
|
-
_hideFileIcon: function () {
|
2806
|
-
var self = this;
|
2807
|
-
if (self.overwriteInitial) {
|
2808
|
-
self.$captionContainer.removeClass('icon-visible');
|
2809
|
-
}
|
2810
|
-
},
|
2811
|
-
_showFileIcon: function () {
|
2812
|
-
var self = this;
|
2813
|
-
$h.addCss(self.$captionContainer, 'icon-visible');
|
2814
|
-
},
|
2815
|
-
_getSize: function (bytes) {
|
2816
|
-
var self = this, size = parseFloat(bytes), i, func = self.fileSizeGetter, sizes, out;
|
2817
|
-
if (!$.isNumeric(bytes) || !$.isNumeric(size)) {
|
2818
|
-
return '';
|
2819
|
-
}
|
2820
|
-
if (typeof func === 'function') {
|
2821
|
-
out = func(size);
|
2822
|
-
} else {
|
2823
|
-
if (size === 0) {
|
2824
|
-
out = '0.00 B';
|
2825
|
-
} else {
|
2826
|
-
i = Math.floor(Math.log(size) / Math.log(1024));
|
2827
|
-
sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
2828
|
-
out = (size / Math.pow(1024, i)).toFixed(2) * 1 + ' ' + sizes[i];
|
2829
|
-
}
|
2830
|
-
}
|
2831
|
-
return self._getLayoutTemplate('size').replace('{sizeText}', out);
|
2832
|
-
},
|
2833
|
-
_generatePreviewTemplate: function (cat, data, fname, ftype, previewId, isError, size, frameClass, foot, ind, templ) {
|
2834
|
-
var self = this, caption = self.slug(fname), prevContent, zoomContent = '', styleAttribs = '',
|
2835
|
-
screenW = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,
|
2836
|
-
config = screenW < 400 ? (self.previewSettingsSmall[cat] || self.defaults.previewSettingsSmall[cat]) :
|
2837
|
-
(self.previewSettings[cat] || self.defaults.previewSettings[cat]),
|
2838
|
-
footer = foot || self._renderFileFooter(caption, size, 'auto', isError),
|
2839
|
-
hasIconSetting = self._getPreviewIcon(fname), typeCss = 'type-default',
|
2840
|
-
forcePrevIcon = hasIconSetting && self.preferIconicPreview,
|
2841
|
-
forceZoomIcon = hasIconSetting && self.preferIconicZoomPreview, getContent;
|
2842
|
-
if (config) {
|
2843
|
-
$.each(config, function (key, val) {
|
2844
|
-
styleAttribs += key + ':' + val + ';';
|
2845
|
-
});
|
2846
|
-
}
|
2847
|
-
getContent = function (c, d, zoom, frameCss) {
|
2848
|
-
var id = zoom ? 'zoom-' + previewId : previewId, tmplt = self._getPreviewTemplate(c),
|
2849
|
-
css = (frameClass || '') + ' ' + frameCss;
|
2850
|
-
if (self.frameClass) {
|
2851
|
-
css = self.frameClass + ' ' + css;
|
2852
|
-
}
|
2853
|
-
if (zoom) {
|
2854
|
-
css = css.replace(' ' + $h.SORT_CSS, '');
|
2855
|
-
}
|
2856
|
-
tmplt = self._parseFilePreviewIcon(tmplt, fname);
|
2857
|
-
if (c === 'text') {
|
2858
|
-
d = $h.htmlEncode(d);
|
2859
|
-
}
|
2860
|
-
if (cat === 'object' && !ftype) {
|
2861
|
-
$.each(self.defaults.fileTypeSettings, function (key, func) {
|
2862
|
-
if (key === 'object' || key === 'other') {
|
2863
|
-
return;
|
2864
|
-
}
|
2865
|
-
if (func(fname, ftype)) {
|
2866
|
-
typeCss = 'type-' + key;
|
2867
|
-
}
|
2868
|
-
});
|
2869
|
-
}
|
2870
|
-
return tmplt.setTokens({
|
2871
|
-
'previewId': id,
|
2872
|
-
'caption': caption,
|
2873
|
-
'frameClass': css,
|
2874
|
-
'type': ftype,
|
2875
|
-
'fileindex': ind,
|
2876
|
-
'typeCss': typeCss,
|
2877
|
-
'footer': footer,
|
2878
|
-
'data': d,
|
2879
|
-
'template': templ || cat,
|
2880
|
-
'style': styleAttribs ? 'style="' + styleAttribs + '"' : ''
|
2881
|
-
});
|
2882
|
-
};
|
2883
|
-
ind = ind || previewId.slice(previewId.lastIndexOf('-') + 1);
|
2884
|
-
if (self.fileActionSettings.showZoom) {
|
2885
|
-
zoomContent = getContent((forceZoomIcon ? 'other' : cat), data, true, 'kv-zoom-thumb');
|
2886
|
-
}
|
2887
|
-
zoomContent = '\n' + self._getLayoutTemplate('zoomCache').replace('{zoomContent}', zoomContent);
|
2888
|
-
prevContent = getContent((forcePrevIcon ? 'other' : cat), data, false, 'kv-preview-thumb');
|
2889
|
-
return prevContent + zoomContent;
|
2890
|
-
},
|
2891
|
-
_addToPreview: function ($preview, content) {
|
2892
|
-
var self = this;
|
2893
|
-
return self.reversePreviewOrder ? $preview.prepend(content) : $preview.append(content);
|
2894
|
-
},
|
2895
|
-
_previewDefault: function (file, previewId, isDisabled) {
|
2896
|
-
var self = this, $preview = self.$preview;
|
2897
|
-
if (!self.showPreview) {
|
2898
|
-
return;
|
2899
|
-
}
|
2900
|
-
var fname = file ? file.name : '', ftype = file ? file.type : '', content, size = file.size || 0,
|
2901
|
-
caption = self.slug(fname), isError = isDisabled === true && !self.isAjaxUpload,
|
2902
|
-
data = $h.objUrl.createObjectURL(file);
|
2903
|
-
self._clearDefaultPreview();
|
2904
|
-
content = self._generatePreviewTemplate('other', data, fname, ftype, previewId, isError, size);
|
2905
|
-
self._addToPreview($preview, content);
|
2906
|
-
self._setThumbAttr(previewId, caption, size);
|
2907
|
-
if (isDisabled === true && self.isAjaxUpload) {
|
2908
|
-
self._setThumbStatus($('#' + previewId), 'Error');
|
2909
|
-
}
|
2910
|
-
},
|
2911
|
-
_previewFile: function (i, file, theFile, previewId, data, fileInfo) {
|
2912
|
-
if (!this.showPreview) {
|
2913
|
-
return;
|
2914
|
-
}
|
2915
|
-
var self = this, fname = file ? file.name : '', ftype = fileInfo.type, caption = fileInfo.name,
|
2916
|
-
cat = self._parseFileType(ftype, fname), types = self.allowedPreviewTypes, content,
|
2917
|
-
mimes = self.allowedPreviewMimeTypes, $preview = self.$preview, fsize = file.size || 0,
|
2918
|
-
chkTypes = types && types.indexOf(cat) >= 0, chkMimes = mimes && mimes.indexOf(ftype) !== -1,
|
2919
|
-
iData = (cat === 'text' || cat === 'html' || cat === 'image') ? theFile.target.result : data;
|
2920
|
-
/** @namespace window.DOMPurify */
|
2921
|
-
if (cat === 'html' && self.purifyHtml && window.DOMPurify) {
|
2922
|
-
iData = window.DOMPurify.sanitize(iData);
|
2923
|
-
}
|
2924
|
-
if (chkTypes || chkMimes) {
|
2925
|
-
content = self._generatePreviewTemplate(cat, iData, fname, ftype, previewId, false, fsize);
|
2926
|
-
self._clearDefaultPreview();
|
2927
|
-
self._addToPreview($preview, content);
|
2928
|
-
var $img = $preview.find('#' + previewId + ' img');
|
2929
|
-
if ($img.length && self.autoOrientImage) {
|
2930
|
-
$h.validateOrientation(file, function (value) {
|
2931
|
-
if (!value) {
|
2932
|
-
self._validateImage(previewId, caption, ftype, fsize, iData);
|
2933
|
-
return;
|
2934
|
-
}
|
2935
|
-
var $zoomImg = $preview.find('#zoom-' + previewId + ' img'), css = 'rotate-' + value;
|
2936
|
-
if (value > 4) {
|
2937
|
-
css += ($img.width() > $img.height() ? ' is-portrait-gt4' : ' is-landscape-gt4');
|
2938
|
-
}
|
2939
|
-
$h.addCss($img, css);
|
2940
|
-
$h.addCss($zoomImg, css);
|
2941
|
-
self._raise('fileimageoriented', {'$img': $img, 'file': file});
|
2942
|
-
self._validateImage(previewId, caption, ftype, fsize, iData);
|
2943
|
-
$h.adjustOrientedImage($img);
|
2944
|
-
});
|
2945
|
-
} else {
|
2946
|
-
self._validateImage(previewId, caption, ftype, fsize, iData);
|
2947
|
-
}
|
2948
|
-
} else {
|
2949
|
-
self._previewDefault(file, previewId);
|
2950
|
-
}
|
2951
|
-
self._setThumbAttr(previewId, caption, fsize);
|
2952
|
-
self._initSortable();
|
2953
|
-
},
|
2954
|
-
_setThumbAttr: function (id, caption, size) {
|
2955
|
-
var self = this, $frame = $('#' + id);
|
2956
|
-
if ($frame.length) {
|
2957
|
-
size = size && size > 0 ? self._getSize(size) : '';
|
2958
|
-
$frame.data({'caption': caption, 'size': size});
|
2959
|
-
}
|
2960
|
-
},
|
2961
|
-
_setInitThumbAttr: function () {
|
2962
|
-
var self = this, data = self.previewCache.data, len = self.previewCache.count(), config,
|
2963
|
-
caption, size, previewId;
|
2964
|
-
if (len === 0) {
|
2965
|
-
return;
|
2966
|
-
}
|
2967
|
-
for (var i = 0; i < len; i++) {
|
2968
|
-
config = data.config[i];
|
2969
|
-
previewId = self.previewInitId + '-' + 'init_' + i;
|
2970
|
-
caption = $h.ifSet('caption', config, $h.ifSet('filename', config));
|
2971
|
-
size = $h.ifSet('size', config);
|
2972
|
-
self._setThumbAttr(previewId, caption, size);
|
2973
|
-
}
|
2974
|
-
},
|
2975
|
-
_slugDefault: function (text) {
|
2976
|
-
return $h.isEmpty(text) ? '' : String(text).replace(/[\[\]\/\{}:;#%=\(\)\*\+\?\\\^\$\|<>&"']/g, '_');
|
2977
|
-
},
|
2978
|
-
_updateFileDetails: function (numFiles) {
|
2979
|
-
var self = this, $el = self.$element, fileStack = self.getFileStack(),
|
2980
|
-
name = ($h.isIE(9) && $h.findFileName($el.val())) ||
|
2981
|
-
($el[0].files[0] && $el[0].files[0].name) || (fileStack.length && fileStack[0].name) || '',
|
2982
|
-
label = self.slug(name), n = self.isAjaxUpload ? fileStack.length : numFiles,
|
2983
|
-
nFiles = self.previewCache.count() + n, log = n === 1 ? label : self._getMsgSelected(nFiles);
|
2984
|
-
if (self.isError) {
|
2985
|
-
self.$previewContainer.removeClass('file-thumb-loading');
|
2986
|
-
self.$previewStatus.html('');
|
2987
|
-
self.$captionContainer.removeClass('icon-visible');
|
2988
|
-
} else {
|
2989
|
-
self._showFileIcon();
|
2990
|
-
}
|
2991
|
-
self._setCaption(log, self.isError);
|
2992
|
-
self.$container.removeClass('file-input-new file-input-ajax-new');
|
2993
|
-
if (arguments.length === 1) {
|
2994
|
-
self._raise('fileselect', [numFiles, label]);
|
2995
|
-
}
|
2996
|
-
if (self.previewCache.count()) {
|
2997
|
-
self._initPreviewActions();
|
2998
|
-
}
|
2999
|
-
},
|
3000
|
-
_setThumbStatus: function ($thumb, status) {
|
3001
|
-
var self = this;
|
3002
|
-
if (!self.showPreview) {
|
3003
|
-
return;
|
3004
|
-
}
|
3005
|
-
var icon = 'indicator' + status, msg = icon + 'Title',
|
3006
|
-
css = 'file-preview-' + status.toLowerCase(),
|
3007
|
-
$indicator = $thumb.find('.file-upload-indicator'),
|
3008
|
-
config = self.fileActionSettings;
|
3009
|
-
$thumb.removeClass('file-preview-success file-preview-error file-preview-loading');
|
3010
|
-
if (status === 'Success') {
|
3011
|
-
$thumb.find('.file-drag-handle').remove();
|
3012
|
-
}
|
3013
|
-
$indicator.html(config[icon]);
|
3014
|
-
$indicator.attr('title', config[msg]);
|
3015
|
-
$thumb.addClass(css);
|
3016
|
-
if (status === 'Error' && !self.retryErrorUploads) {
|
3017
|
-
$thumb.find('.kv-file-upload').attr('disabled', true);
|
3018
|
-
}
|
3019
|
-
},
|
3020
|
-
_setProgressCancelled: function () {
|
3021
|
-
var self = this;
|
3022
|
-
self._setProgress(101, self.$progress, self.msgCancelled);
|
3023
|
-
},
|
3024
|
-
_setProgress: function (p, $el, error) {
|
3025
|
-
var self = this, pct = Math.min(p, 100), out, pctLimit = self.progressUploadThreshold,
|
3026
|
-
t = p <= 100 ? self.progressTemplate : self.progressCompleteTemplate,
|
3027
|
-
template = pct < 100 ? self.progressTemplate : (error ? self.progressErrorTemplate : t);
|
3028
|
-
$el = $el || self.$progress;
|
3029
|
-
if (!$h.isEmpty(template)) {
|
3030
|
-
if (pctLimit && pct > pctLimit && p <= 100) {
|
3031
|
-
out = template.setTokens({'percent': pctLimit, 'status': self.msgUploadThreshold});
|
3032
|
-
} else {
|
3033
|
-
out = template.setTokens({'percent': pct, 'status': (p > 100 ? self.msgUploadEnd : pct + '%')});
|
3034
|
-
}
|
3035
|
-
$el.html(out);
|
3036
|
-
if (error) {
|
3037
|
-
$el.find('[role="progressbar"]').html(error);
|
3038
|
-
}
|
3039
|
-
}
|
3040
|
-
},
|
3041
|
-
_setFileDropZoneTitle: function () {
|
3042
|
-
var self = this, $zone = self.$container.find('.file-drop-zone'), title = self.dropZoneTitle, strFiles;
|
3043
|
-
if (self.isClickable) {
|
3044
|
-
strFiles = $h.isEmpty(self.$element.attr('multiple')) ? self.fileSingle : self.filePlural;
|
3045
|
-
title += self.dropZoneClickTitle.replace('{files}', strFiles);
|
3046
|
-
}
|
3047
|
-
$zone.find('.' + self.dropZoneTitleClass).remove();
|
3048
|
-
if (!self.showPreview || $zone.length === 0 || self.getFileStack().length > 0 || !self.dropZoneEnabled ||
|
3049
|
-
(!self.isAjaxUpload && self.$element.files)) {
|
3050
|
-
return;
|
3051
|
-
}
|
3052
|
-
if ($zone.find($h.FRAMES).length === 0 && $h.isEmpty(self.defaultPreviewContent)) {
|
3053
|
-
$zone.prepend('<div class="' + self.dropZoneTitleClass + '">' + title + '</div>');
|
3054
|
-
}
|
3055
|
-
self.$container.removeClass('file-input-new');
|
3056
|
-
$h.addCss(self.$container, 'file-input-ajax-new');
|
3057
|
-
},
|
3058
|
-
_setAsyncUploadStatus: function (previewId, pct, total) {
|
3059
|
-
var self = this, sum = 0;
|
3060
|
-
self._setProgress(pct, $('#' + previewId).find('.file-thumb-progress'));
|
3061
|
-
self.uploadStatus[previewId] = pct;
|
3062
|
-
$.each(self.uploadStatus, function (key, value) {
|
3063
|
-
sum += value;
|
3064
|
-
});
|
3065
|
-
self._setProgress(Math.floor(sum / total));
|
3066
|
-
},
|
3067
|
-
_validateMinCount: function () {
|
3068
|
-
var self = this, len = self.isAjaxUpload ? self.getFileStack().length : self._inputFileCount();
|
3069
|
-
if (self.validateInitialCount && self.minFileCount > 0 && self._getFileCount(len - 1) < self.minFileCount) {
|
3070
|
-
self._noFilesError({});
|
3071
|
-
return false;
|
3072
|
-
}
|
3073
|
-
return true;
|
3074
|
-
},
|
3075
|
-
_getFileCount: function (fileCount) {
|
3076
|
-
var self = this, addCount = 0;
|
3077
|
-
if (self.validateInitialCount && !self.overwriteInitial) {
|
3078
|
-
addCount = self.previewCache.count();
|
3079
|
-
fileCount += addCount;
|
3080
|
-
}
|
3081
|
-
return fileCount;
|
3082
|
-
},
|
3083
|
-
_getFileId: function (file) {
|
3084
|
-
var self = this, custom = self.generateFileId, relativePath;
|
3085
|
-
if (typeof custom === 'function') {
|
3086
|
-
return custom(file, event);
|
3087
|
-
}
|
3088
|
-
if (!file) {
|
3089
|
-
return null;
|
3090
|
-
}
|
3091
|
-
/** @namespace file.webkitRelativePath */
|
3092
|
-
relativePath = String(file.webkitRelativePath || file.fileName || file.name || null);
|
3093
|
-
if (!relativePath) {
|
3094
|
-
return null;
|
3095
|
-
}
|
3096
|
-
return (file.size + '-' + relativePath.replace(/[^0-9a-zA-Z_-]/img, ''));
|
3097
|
-
},
|
3098
|
-
_getFileName: function (file) {
|
3099
|
-
return file && file.name ? this.slug(file.name) : undefined;
|
3100
|
-
},
|
3101
|
-
_getFileIds: function (skipNull) {
|
3102
|
-
var self = this;
|
3103
|
-
return self.fileids.filter(function (n) {
|
3104
|
-
return (skipNull ? n !== undefined : n !== undefined && n !== null);
|
3105
|
-
});
|
3106
|
-
},
|
3107
|
-
_getFileNames: function (skipNull) {
|
3108
|
-
var self = this;
|
3109
|
-
return self.filenames.filter(function (n) {
|
3110
|
-
return (skipNull ? n !== undefined : n !== undefined && n !== null);
|
3111
|
-
});
|
3112
|
-
},
|
3113
|
-
_setPreviewError: function ($thumb, i, val, repeat) {
|
3114
|
-
var self = this;
|
3115
|
-
if (i !== undefined) {
|
3116
|
-
self.updateStack(i, val);
|
3117
|
-
}
|
3118
|
-
if (!self.showPreview) {
|
3119
|
-
return;
|
3120
|
-
}
|
3121
|
-
if (self.removeFromPreviewOnError && !repeat) {
|
3122
|
-
$thumb.remove();
|
3123
|
-
return;
|
3124
|
-
} else {
|
3125
|
-
self._setThumbStatus($thumb, 'Error');
|
3126
|
-
}
|
3127
|
-
self._refreshUploadButton($thumb, repeat);
|
3128
|
-
},
|
3129
|
-
_refreshUploadButton: function ($thumb, repeat) {
|
3130
|
-
var self = this, $btn = $thumb.find('.kv-file-upload'), cfg = self.fileActionSettings,
|
3131
|
-
icon = cfg.uploadIcon, title = cfg.uploadTitle;
|
3132
|
-
if (!$btn.length) {
|
3133
|
-
return;
|
3134
|
-
}
|
3135
|
-
if (repeat) {
|
3136
|
-
icon = cfg.uploadRetryIcon;
|
3137
|
-
title = cfg.uploadRetryTitle;
|
3138
|
-
}
|
3139
|
-
$btn.attr('title', title).html(icon);
|
3140
|
-
},
|
3141
|
-
_checkDimensions: function (i, chk, $img, $thumb, fname, type, params) {
|
3142
|
-
var self = this, msg, dim, tag = chk === 'Small' ? 'min' : 'max', limit = self[tag + 'Image' + type],
|
3143
|
-
$imgEl, isValid;
|
3144
|
-
if ($h.isEmpty(limit) || !$img.length) {
|
3145
|
-
return;
|
3146
|
-
}
|
3147
|
-
$imgEl = $img[0];
|
3148
|
-
dim = (type === 'Width') ? $imgEl.naturalWidth || $imgEl.width : $imgEl.naturalHeight || $imgEl.height;
|
3149
|
-
isValid = chk === 'Small' ? dim >= limit : dim <= limit;
|
3150
|
-
if (isValid) {
|
3151
|
-
return;
|
3152
|
-
}
|
3153
|
-
msg = self['msgImage' + type + chk].setTokens({'name': fname, 'size': limit});
|
3154
|
-
self._showUploadError(msg, params);
|
3155
|
-
self._setPreviewError($thumb, i, null);
|
3156
|
-
},
|
3157
|
-
_validateImage: function (previewId, fname, ftype, fsize, iData) {
|
3158
|
-
var self = this, $preview = self.$preview, params, w1, w2, $thumb = $preview.find("#" + previewId),
|
3159
|
-
i = $thumb.attr('data-fileindex'), $img = $thumb.find('img'), exifObject;
|
3160
|
-
fname = fname || 'Untitled';
|
3161
|
-
$img.one('load', function () {
|
3162
|
-
w1 = $thumb.width();
|
3163
|
-
w2 = $preview.width();
|
3164
|
-
if (w1 > w2) {
|
3165
|
-
$img.css('width', '100%');
|
3166
|
-
}
|
3167
|
-
params = {ind: i, id: previewId};
|
3168
|
-
self._checkDimensions(i, 'Small', $img, $thumb, fname, 'Width', params);
|
3169
|
-
self._checkDimensions(i, 'Small', $img, $thumb, fname, 'Height', params);
|
3170
|
-
if (!self.resizeImage) {
|
3171
|
-
self._checkDimensions(i, 'Large', $img, $thumb, fname, 'Width', params);
|
3172
|
-
self._checkDimensions(i, 'Large', $img, $thumb, fname, 'Height', params);
|
3173
|
-
}
|
3174
|
-
self._raise('fileimageloaded', [previewId]);
|
3175
|
-
try {
|
3176
|
-
exifObject = window.piexif ? window.piexif.load(iData) : null;
|
3177
|
-
} catch (err) {
|
3178
|
-
exifObject = null;
|
3179
|
-
}
|
3180
|
-
self.loadedImages.push({
|
3181
|
-
ind: i,
|
3182
|
-
img: $img,
|
3183
|
-
thumb: $thumb,
|
3184
|
-
pid: previewId,
|
3185
|
-
typ: ftype,
|
3186
|
-
siz: fsize,
|
3187
|
-
validated: false,
|
3188
|
-
imgData: iData,
|
3189
|
-
exifObj: exifObject
|
3190
|
-
});
|
3191
|
-
$thumb.data('exif', exifObject);
|
3192
|
-
self._validateAllImages();
|
3193
|
-
}).one('error', function () {
|
3194
|
-
self._raise('fileimageloaderror', [previewId]);
|
3195
|
-
}).each(function () {
|
3196
|
-
if (this.complete) {
|
3197
|
-
$(this).trigger('load');
|
3198
|
-
} else {
|
3199
|
-
if (this.error) {
|
3200
|
-
$(this).trigger('error');
|
3201
|
-
}
|
3202
|
-
}
|
3203
|
-
});
|
3204
|
-
},
|
3205
|
-
_validateAllImages: function () {
|
3206
|
-
var self = this, i, counter = {val: 0}, numImgs = self.loadedImages.length, config,
|
3207
|
-
fsize, minSize = self.resizeIfSizeMoreThan;
|
3208
|
-
if (numImgs !== self.totalImagesCount) {
|
3209
|
-
return;
|
3210
|
-
}
|
3211
|
-
self._raise('fileimagesloaded');
|
3212
|
-
if (!self.resizeImage) {
|
3213
|
-
return;
|
3214
|
-
}
|
3215
|
-
for (i = 0; i < self.loadedImages.length; i++) {
|
3216
|
-
config = self.loadedImages[i];
|
3217
|
-
if (config.validated) {
|
3218
|
-
continue;
|
3219
|
-
}
|
3220
|
-
fsize = config.siz;
|
3221
|
-
if (fsize && fsize > minSize * 1000) {
|
3222
|
-
self._getResizedImage(config, counter, numImgs);
|
3223
|
-
}
|
3224
|
-
self.loadedImages[i].validated = true;
|
3225
|
-
}
|
3226
|
-
},
|
3227
|
-
_getResizedImage: function (config, counter, numImgs) {
|
3228
|
-
var self = this, img = $(config.img)[0], width = img.naturalWidth, height = img.naturalHeight, blob,
|
3229
|
-
ratio = 1, maxWidth = self.maxImageWidth || width, maxHeight = self.maxImageHeight || height,
|
3230
|
-
isValidImage = !!(width && height), chkWidth, chkHeight, canvas = self.imageCanvas, dataURI,
|
3231
|
-
context = self.imageCanvasContext, type = config.typ, pid = config.pid, ind = config.ind,
|
3232
|
-
$thumb = config.thumb, throwError, msg, exifObj = config.exifObj, exifStr;
|
3233
|
-
throwError = function (msg, params, ev) {
|
3234
|
-
if (self.isAjaxUpload) {
|
3235
|
-
self._showUploadError(msg, params, ev);
|
3236
|
-
} else {
|
3237
|
-
self._showError(msg, params, ev);
|
3238
|
-
}
|
3239
|
-
self._setPreviewError($thumb, ind);
|
3240
|
-
};
|
3241
|
-
if (!self.filestack[ind] || !isValidImage || (width <= maxWidth && height <= maxHeight)) {
|
3242
|
-
if (isValidImage && self.filestack[ind]) {
|
3243
|
-
self._raise('fileimageresized', [pid, ind]);
|
3244
|
-
}
|
3245
|
-
counter.val++;
|
3246
|
-
if (counter.val === numImgs) {
|
3247
|
-
self._raise('fileimagesresized');
|
3248
|
-
}
|
3249
|
-
if (!isValidImage) {
|
3250
|
-
throwError(self.msgImageResizeError, {id: pid, 'index': ind}, 'fileimageresizeerror');
|
3251
|
-
return;
|
3252
|
-
}
|
3253
|
-
}
|
3254
|
-
type = type || self.resizeDefaultImageType;
|
3255
|
-
chkWidth = width > maxWidth;
|
3256
|
-
chkHeight = height > maxHeight;
|
3257
|
-
if (self.resizePreference === 'width') {
|
3258
|
-
ratio = chkWidth ? maxWidth / width : (chkHeight ? maxHeight / height : 1);
|
3259
|
-
} else {
|
3260
|
-
ratio = chkHeight ? maxHeight / height : (chkWidth ? maxWidth / width : 1);
|
3261
|
-
}
|
3262
|
-
self._resetCanvas();
|
3263
|
-
width *= ratio;
|
3264
|
-
height *= ratio;
|
3265
|
-
canvas.width = width;
|
3266
|
-
canvas.height = height;
|
3267
|
-
try {
|
3268
|
-
context.drawImage(img, 0, 0, width, height);
|
3269
|
-
dataURI = canvas.toDataURL(type, self.resizeQuality);
|
3270
|
-
if (exifObj) {
|
3271
|
-
exifStr = window.piexif.dump(exifObj);
|
3272
|
-
dataURI = window.piexif.insert(exifStr, dataURI);
|
3273
|
-
}
|
3274
|
-
blob = $h.dataURI2Blob(dataURI);
|
3275
|
-
self.filestack[ind] = blob;
|
3276
|
-
self._raise('fileimageresized', [pid, ind]);
|
3277
|
-
counter.val++;
|
3278
|
-
if (counter.val === numImgs) {
|
3279
|
-
self._raise('fileimagesresized', [undefined, undefined]);
|
3280
|
-
}
|
3281
|
-
if (!(blob instanceof Blob)) {
|
3282
|
-
throwError(self.msgImageResizeError, {id: pid, 'index': ind}, 'fileimageresizeerror');
|
3283
|
-
}
|
3284
|
-
}
|
3285
|
-
catch (err) {
|
3286
|
-
counter.val++;
|
3287
|
-
if (counter.val === numImgs) {
|
3288
|
-
self._raise('fileimagesresized', [undefined, undefined]);
|
3289
|
-
}
|
3290
|
-
msg = self.msgImageResizeException.replace('{errors}', err.message);
|
3291
|
-
throwError(msg, {id: pid, 'index': ind}, 'fileimageresizeexception');
|
3292
|
-
}
|
3293
|
-
},
|
3294
|
-
_initBrowse: function ($container) {
|
3295
|
-
var self = this, $el = self.$element;
|
3296
|
-
if (self.showBrowse) {
|
3297
|
-
self.$btnFile = $container.find('.btn-file').append($el);
|
3298
|
-
} else {
|
3299
|
-
$el.appendTo($container).attr('tabindex', -1);
|
3300
|
-
$h.addCss($el, 'file-no-browse');
|
3301
|
-
}
|
3302
|
-
},
|
3303
|
-
_initClickable: function () {
|
3304
|
-
var self = this, $zone;
|
3305
|
-
if (!self.isClickable) {
|
3306
|
-
return;
|
3307
|
-
}
|
3308
|
-
$zone = self.isAjaxUpload ? self.$dropZone : self.$preview.find('.file-default-preview');
|
3309
|
-
$h.addCss($zone, 'clickable');
|
3310
|
-
$zone.attr('tabindex', -1);
|
3311
|
-
self._handler($zone, 'click', function (e) {
|
3312
|
-
var $tar = $(e.target), $el = self.$element;
|
3313
|
-
if (!$(self.elErrorContainer + ':visible').length &&
|
3314
|
-
(!$tar.parents('.file-preview-thumbnails').length || $tar.parents('.file-default-preview').length)) {
|
3315
|
-
self.$element.data('zoneClicked', true).trigger('click');
|
3316
|
-
$zone.blur();
|
3317
|
-
}
|
3318
|
-
});
|
3319
|
-
},
|
3320
|
-
_initCaption: function () {
|
3321
|
-
var self = this, cap = self.initialCaption || '';
|
3322
|
-
if (self.overwriteInitial || $h.isEmpty(cap)) {
|
3323
|
-
self.$caption.val('');
|
3324
|
-
return false;
|
3325
|
-
}
|
3326
|
-
self._setCaption(cap);
|
3327
|
-
return true;
|
3328
|
-
},
|
3329
|
-
_setCaption: function (content, isError) {
|
3330
|
-
var self = this, title, out, icon, n, cap, stack = self.getFileStack();
|
3331
|
-
if (!self.$caption.length) {
|
3332
|
-
return;
|
3333
|
-
}
|
3334
|
-
self.$captionContainer.removeClass('icon-visible');
|
3335
|
-
if (isError) {
|
3336
|
-
title = $('<div>' + self.msgValidationError + '</div>').text();
|
3337
|
-
n = stack.length;
|
3338
|
-
if (n) {
|
3339
|
-
cap = n === 1 && stack[0] ? self._getFileNames()[0] : self._getMsgSelected(n);
|
3340
|
-
} else {
|
3341
|
-
cap = self._getMsgSelected(self.msgNo);
|
3342
|
-
}
|
3343
|
-
out = $h.isEmpty(content) ? cap : content;
|
3344
|
-
icon = '<span class="' + self.msgValidationErrorClass + '">' + self.msgValidationErrorIcon + '</span>';
|
3345
|
-
} else {
|
3346
|
-
if ($h.isEmpty(content)) {
|
3347
|
-
return;
|
3348
|
-
}
|
3349
|
-
title = $('<div>' + content + '</div>').text();
|
3350
|
-
out = title;
|
3351
|
-
icon = self._getLayoutTemplate('fileIcon');
|
3352
|
-
}
|
3353
|
-
self.$captionContainer.addClass('icon-visible');
|
3354
|
-
self.$caption.attr('title', title).val(out);
|
3355
|
-
self.$captionIcon.html(icon);
|
3356
|
-
},
|
3357
|
-
_createContainer: function () {
|
3358
|
-
var self = this, attribs = {"class": 'file-input file-input-new' + (self.rtl ? ' kv-rtl' : '')},
|
3359
|
-
$container = $(document.createElement("div")).attr(attribs).html(self._renderMain());
|
3360
|
-
$container.insertBefore(self.$element);
|
3361
|
-
self._initBrowse($container);
|
3362
|
-
if (self.theme) {
|
3363
|
-
$container.addClass('theme-' + self.theme);
|
3364
|
-
}
|
3365
|
-
return $container;
|
3366
|
-
},
|
3367
|
-
_refreshContainer: function () {
|
3368
|
-
var self = this, $container = self.$container, $el = self.$element;
|
3369
|
-
$el.insertAfter($container);
|
3370
|
-
$container.html(self._renderMain());
|
3371
|
-
self._initBrowse($container);
|
3372
|
-
self._validateDisabled();
|
3373
|
-
},
|
3374
|
-
_validateDisabled: function () {
|
3375
|
-
var self = this;
|
3376
|
-
self.$caption.attr({readonly: self.isDisabled});
|
3377
|
-
},
|
3378
|
-
_renderMain: function () {
|
3379
|
-
var self = this,
|
3380
|
-
dropCss = self.dropZoneEnabled ? ' file-drop-zone' : 'file-drop-disabled',
|
3381
|
-
close = !self.showClose ? '' : self._getLayoutTemplate('close'),
|
3382
|
-
preview = !self.showPreview ? '' : self._getLayoutTemplate('preview')
|
3383
|
-
.setTokens({'class': self.previewClass, 'dropClass': dropCss}),
|
3384
|
-
css = self.isDisabled ? self.captionClass + ' file-caption-disabled' : self.captionClass,
|
3385
|
-
caption = self.captionTemplate.setTokens({'class': css + ' kv-fileinput-caption'});
|
3386
|
-
return self.mainTemplate.setTokens({
|
3387
|
-
'class': self.mainClass + (!self.showBrowse && self.showCaption ? ' no-browse' : ''),
|
3388
|
-
'preview': preview,
|
3389
|
-
'close': close,
|
3390
|
-
'caption': caption,
|
3391
|
-
'upload': self._renderButton('upload'),
|
3392
|
-
'remove': self._renderButton('remove'),
|
3393
|
-
'cancel': self._renderButton('cancel'),
|
3394
|
-
'browse': self._renderButton('browse')
|
3395
|
-
});
|
3396
|
-
|
3397
|
-
},
|
3398
|
-
_renderButton: function (type) {
|
3399
|
-
var self = this, tmplt = self._getLayoutTemplate('btnDefault'), css = self[type + 'Class'],
|
3400
|
-
title = self[type + 'Title'], icon = self[type + 'Icon'], label = self[type + 'Label'],
|
3401
|
-
status = self.isDisabled ? ' disabled' : '', btnType = 'button';
|
3402
|
-
switch (type) {
|
3403
|
-
case 'remove':
|
3404
|
-
if (!self.showRemove) {
|
3405
|
-
return '';
|
3406
|
-
}
|
3407
|
-
break;
|
3408
|
-
case 'cancel':
|
3409
|
-
if (!self.showCancel) {
|
3410
|
-
return '';
|
3411
|
-
}
|
3412
|
-
css += ' kv-hidden';
|
3413
|
-
break;
|
3414
|
-
case 'upload':
|
3415
|
-
if (!self.showUpload) {
|
3416
|
-
return '';
|
3417
|
-
}
|
3418
|
-
if (self.isAjaxUpload && !self.isDisabled) {
|
3419
|
-
tmplt = self._getLayoutTemplate('btnLink').replace('{href}', self.uploadUrl);
|
3420
|
-
} else {
|
3421
|
-
btnType = 'submit';
|
3422
|
-
}
|
3423
|
-
break;
|
3424
|
-
case 'browse':
|
3425
|
-
if (!self.showBrowse) {
|
3426
|
-
return '';
|
3427
|
-
}
|
3428
|
-
tmplt = self._getLayoutTemplate('btnBrowse');
|
3429
|
-
break;
|
3430
|
-
default:
|
3431
|
-
return '';
|
3432
|
-
}
|
3433
|
-
|
3434
|
-
css += type === 'browse' ? ' btn-file' : ' fileinput-' + type + ' fileinput-' + type + '-button';
|
3435
|
-
if (!$h.isEmpty(label)) {
|
3436
|
-
label = ' <span class="' + self.buttonLabelClass + '">' + label + '</span>';
|
3437
|
-
}
|
3438
|
-
return tmplt.setTokens({
|
3439
|
-
'type': btnType, 'css': css, 'title': title, 'status': status, 'icon': icon, 'label': label
|
3440
|
-
});
|
3441
|
-
},
|
3442
|
-
_renderThumbProgress: function () {
|
3443
|
-
var self = this;
|
3444
|
-
return '<div class="file-thumb-progress kv-hidden">' +
|
3445
|
-
self.progressTemplate.setTokens({'percent': '0', 'status': self.msgUploadBegin}) +
|
3446
|
-
'</div>';
|
3447
|
-
},
|
3448
|
-
_renderFileFooter: function (caption, size, width, isError) {
|
3449
|
-
var self = this, config = self.fileActionSettings, rem = config.showRemove, drg = config.showDrag,
|
3450
|
-
upl = config.showUpload, zoom = config.showZoom, out,
|
3451
|
-
template = self._getLayoutTemplate('footer'), tInd = self._getLayoutTemplate('indicator'),
|
3452
|
-
ind = isError ? config.indicatorError : config.indicatorNew,
|
3453
|
-
title = isError ? config.indicatorErrorTitle : config.indicatorNewTitle,
|
3454
|
-
indicator = tInd.setTokens({'indicator': ind, 'indicatorTitle': title});
|
3455
|
-
size = self._getSize(size);
|
3456
|
-
if (self.isAjaxUpload) {
|
3457
|
-
out = template.setTokens({
|
3458
|
-
'actions': self._renderFileActions(upl, false, rem, zoom, drg, false, false, false),
|
3459
|
-
'caption': caption,
|
3460
|
-
'size': size,
|
3461
|
-
'width': width,
|
3462
|
-
'progress': self._renderThumbProgress(),
|
3463
|
-
'indicator': indicator
|
3464
|
-
});
|
3465
|
-
} else {
|
3466
|
-
out = template.setTokens({
|
3467
|
-
'actions': self._renderFileActions(false, false, false, zoom, drg, false, false, false),
|
3468
|
-
'caption': caption,
|
3469
|
-
'size': size,
|
3470
|
-
'width': width,
|
3471
|
-
'progress': '',
|
3472
|
-
'indicator': indicator
|
3473
|
-
});
|
3474
|
-
}
|
3475
|
-
out = $h.replaceTags(out, self.previewThumbTags);
|
3476
|
-
return out;
|
3477
|
-
},
|
3478
|
-
_renderFileActions: function (showUpl, showDwn, showDel, showZoom, showDrag, disabled, url, key, isInit, dUrl, dFile) {
|
3479
|
-
if (!showUpl && !showDwn && !showDel && !showZoom && !showDrag) {
|
3480
|
-
return '';
|
3481
|
-
}
|
3482
|
-
var self = this, vUrl = url === false ? '' : ' data-url="' + url + '"',
|
3483
|
-
vKey = key === false ? '' : ' data-key="' + key + '"', btnDelete = '', btnUpload = '', btnDownload = '',
|
3484
|
-
btnZoom = '', btnDrag = '', css, template = self._getLayoutTemplate('actions'),
|
3485
|
-
config = self.fileActionSettings,
|
3486
|
-
otherButtons = self.otherActionButtons.setTokens({'dataKey': vKey, 'key': key}),
|
3487
|
-
removeClass = disabled ? config.removeClass + ' disabled' : config.removeClass;
|
3488
|
-
if (showDel) {
|
3489
|
-
btnDelete = self._getLayoutTemplate('actionDelete').setTokens({
|
3490
|
-
'removeClass': removeClass,
|
3491
|
-
'removeIcon': config.removeIcon,
|
3492
|
-
'removeTitle': config.removeTitle,
|
3493
|
-
'dataUrl': vUrl,
|
3494
|
-
'dataKey': vKey,
|
3495
|
-
'key': key
|
3496
|
-
});
|
3497
|
-
}
|
3498
|
-
if (showUpl) {
|
3499
|
-
btnUpload = self._getLayoutTemplate('actionUpload').setTokens({
|
3500
|
-
'uploadClass': config.uploadClass,
|
3501
|
-
'uploadIcon': config.uploadIcon,
|
3502
|
-
'uploadTitle': config.uploadTitle
|
3503
|
-
});
|
3504
|
-
}
|
3505
|
-
if (showDwn) {
|
3506
|
-
btnDownload = self._getLayoutTemplate('actionDownload').setTokens({
|
3507
|
-
'downloadClass': config.downloadClass,
|
3508
|
-
'downloadIcon': config.downloadIcon,
|
3509
|
-
'downloadTitle': config.downloadTitle,
|
3510
|
-
'downloadUrl': dUrl || self.initialPreviewDownloadUrl
|
3511
|
-
});
|
3512
|
-
btnDownload = btnDownload.setTokens({'filename': dFile, 'key': key});
|
3513
|
-
}
|
3514
|
-
if (showZoom) {
|
3515
|
-
btnZoom = self._getLayoutTemplate('actionZoom').setTokens({
|
3516
|
-
'zoomClass': config.zoomClass,
|
3517
|
-
'zoomIcon': config.zoomIcon,
|
3518
|
-
'zoomTitle': config.zoomTitle
|
3519
|
-
});
|
3520
|
-
}
|
3521
|
-
if (showDrag && isInit) {
|
3522
|
-
css = 'drag-handle-init ' + config.dragClass;
|
3523
|
-
btnDrag = self._getLayoutTemplate('actionDrag').setTokens({
|
3524
|
-
'dragClass': css,
|
3525
|
-
'dragTitle': config.dragTitle,
|
3526
|
-
'dragIcon': config.dragIcon
|
3527
|
-
});
|
3528
|
-
}
|
3529
|
-
return template.setTokens({
|
3530
|
-
'delete': btnDelete,
|
3531
|
-
'upload': btnUpload,
|
3532
|
-
'download': btnDownload,
|
3533
|
-
'zoom': btnZoom,
|
3534
|
-
'drag': btnDrag,
|
3535
|
-
'other': otherButtons
|
3536
|
-
});
|
3537
|
-
},
|
3538
|
-
_browse: function (e) {
|
3539
|
-
var self = this;
|
3540
|
-
self._raise('filebrowse');
|
3541
|
-
if (e && e.isDefaultPrevented()) {
|
3542
|
-
return;
|
3543
|
-
}
|
3544
|
-
if (self.isError && !self.isAjaxUpload) {
|
3545
|
-
self.clear();
|
3546
|
-
}
|
3547
|
-
self.$captionContainer.focus();
|
3548
|
-
},
|
3549
|
-
_filterDuplicate: function (file, files, fileIds) {
|
3550
|
-
var self = this, fileId = self._getFileId(file);
|
3551
|
-
|
3552
|
-
if (fileId && fileIds && fileIds.indexOf(fileId) > -1) {
|
3553
|
-
return;
|
3554
|
-
}
|
3555
|
-
if (!fileIds) {
|
3556
|
-
fileIds = [];
|
3557
|
-
}
|
3558
|
-
files.push(file);
|
3559
|
-
fileIds.push(fileId);
|
3560
|
-
},
|
3561
|
-
_change: function (e) {
|
3562
|
-
var self = this;
|
3563
|
-
if (self.changeTriggered) {
|
3564
|
-
return;
|
3565
|
-
}
|
3566
|
-
var $el = self.$element, isDragDrop = arguments.length > 1, isAjaxUpload = self.isAjaxUpload,
|
3567
|
-
tfiles = [], files = isDragDrop ? arguments[1] : $el.get(0).files, total,
|
3568
|
-
maxCount = !isAjaxUpload && $h.isEmpty($el.attr('multiple')) ? 1 : self.maxFileCount,
|
3569
|
-
len, ctr = self.filestack.length, isSingleUpload = $h.isEmpty($el.attr('multiple')),
|
3570
|
-
flagSingle = (isSingleUpload && ctr > 0), fileIds = self._getFileIds(),
|
3571
|
-
throwError = function (mesg, file, previewId, index) {
|
3572
|
-
var p1 = $.extend(true, {}, self._getOutData({}, {}, files), {id: previewId, index: index}),
|
3573
|
-
p2 = {id: previewId, index: index, file: file, files: files};
|
3574
|
-
return isAjaxUpload ? self._showUploadError(mesg, p1) : self._showError(mesg, p2);
|
3575
|
-
},
|
3576
|
-
maxCountCheck = function (n, m) {
|
3577
|
-
var msg = self.msgFilesTooMany.replace('{m}', m).replace('{n}', n);
|
3578
|
-
self.isError = throwError(msg, null, null, null);
|
3579
|
-
self.$captionContainer.removeClass('icon-visible');
|
3580
|
-
self._setCaption('', true);
|
3581
|
-
self.$container.removeClass('file-input-new file-input-ajax-new');
|
3582
|
-
};
|
3583
|
-
self.reader = null;
|
3584
|
-
self._resetUpload();
|
3585
|
-
self._hideFileIcon();
|
3586
|
-
if (self.dropZoneEnabled) {
|
3587
|
-
self.$container.find('.file-drop-zone .' + self.dropZoneTitleClass).remove();
|
3588
|
-
}
|
3589
|
-
if (isAjaxUpload) {
|
3590
|
-
$.each(files, function (vKey, vFile) {
|
3591
|
-
self._filterDuplicate(vFile, tfiles, fileIds);
|
3592
|
-
});
|
3593
|
-
} else {
|
3594
|
-
if (e.target && e.target.files === undefined) {
|
3595
|
-
files = e.target.value ? [{name: e.target.value.replace(/^.+\\/, '')}] : [];
|
3596
|
-
} else {
|
3597
|
-
files = e.target.files || {};
|
3598
|
-
}
|
3599
|
-
tfiles = files;
|
3600
|
-
}
|
3601
|
-
if ($h.isEmpty(tfiles) || tfiles.length === 0) {
|
3602
|
-
if (!isAjaxUpload) {
|
3603
|
-
self.clear();
|
3604
|
-
}
|
3605
|
-
self._raise('fileselectnone');
|
3606
|
-
return;
|
3607
|
-
}
|
3608
|
-
self._resetErrors();
|
3609
|
-
len = tfiles.length;
|
3610
|
-
total = self._getFileCount(isAjaxUpload ? (self.getFileStack().length + len) : len);
|
3611
|
-
if (maxCount > 0 && total > maxCount) {
|
3612
|
-
if (!self.autoReplace || len > maxCount) {
|
3613
|
-
maxCountCheck((self.autoReplace && len > maxCount ? len : total), maxCount);
|
3614
|
-
return;
|
3615
|
-
}
|
3616
|
-
if (total > maxCount) {
|
3617
|
-
self._resetPreviewThumbs(isAjaxUpload);
|
3618
|
-
}
|
3619
|
-
} else {
|
3620
|
-
if (!isAjaxUpload || flagSingle) {
|
3621
|
-
self._resetPreviewThumbs(false);
|
3622
|
-
if (flagSingle) {
|
3623
|
-
self.clearStack();
|
3624
|
-
}
|
3625
|
-
} else {
|
3626
|
-
if (isAjaxUpload && ctr === 0 && (!self.previewCache.count() || self.overwriteInitial)) {
|
3627
|
-
self._resetPreviewThumbs(true);
|
3628
|
-
}
|
3629
|
-
}
|
3630
|
-
}
|
3631
|
-
if (self.isPreviewable) {
|
3632
|
-
self.readFiles(tfiles);
|
3633
|
-
} else {
|
3634
|
-
self._updateFileDetails(1);
|
3635
|
-
}
|
3636
|
-
},
|
3637
|
-
_abort: function (params) {
|
3638
|
-
var self = this, data;
|
3639
|
-
if (self.ajaxAborted && typeof self.ajaxAborted === "object" && self.ajaxAborted.message !== undefined) {
|
3640
|
-
data = $.extend(true, {}, self._getOutData(), params);
|
3641
|
-
data.abortData = self.ajaxAborted.data || {};
|
3642
|
-
data.abortMessage = self.ajaxAborted.message;
|
3643
|
-
self._setProgress(101, self.$progress, self.msgCancelled);
|
3644
|
-
self._showUploadError(self.ajaxAborted.message, data, 'filecustomerror');
|
3645
|
-
self.cancel();
|
3646
|
-
return true;
|
3647
|
-
}
|
3648
|
-
return !!self.ajaxAborted;
|
3649
|
-
},
|
3650
|
-
_resetFileStack: function () {
|
3651
|
-
var self = this, i = 0, newstack = [], newnames = [], newids = [];
|
3652
|
-
self._getThumbs().each(function () {
|
3653
|
-
var $thumb = $(this), ind = $thumb.attr('data-fileindex'), file = self.filestack[ind],
|
3654
|
-
pid = $thumb.attr('id');
|
3655
|
-
if (ind === '-1' || ind === -1) {
|
3656
|
-
return;
|
3657
|
-
}
|
3658
|
-
if (file !== undefined) {
|
3659
|
-
newstack[i] = file;
|
3660
|
-
newnames[i] = self._getFileName(file);
|
3661
|
-
newids[i] = self._getFileId(file);
|
3662
|
-
$thumb.attr({'id': self.previewInitId + '-' + i, 'data-fileindex': i});
|
3663
|
-
i++;
|
3664
|
-
} else {
|
3665
|
-
$thumb.attr({'id': 'uploaded-' + $h.uniqId(), 'data-fileindex': '-1'});
|
3666
|
-
}
|
3667
|
-
self.$preview.find('#zoom-' + pid).attr({
|
3668
|
-
'id': 'zoom-' + $thumb.attr('id'),
|
3669
|
-
'data-fileindex': $thumb.attr('data-fileindex')
|
3670
|
-
});
|
3671
|
-
});
|
3672
|
-
self.filestack = newstack;
|
3673
|
-
self.filenames = newnames;
|
3674
|
-
self.fileids = newids;
|
3675
|
-
},
|
3676
|
-
_isFileSelectionValid: function (cnt) {
|
3677
|
-
var self = this;
|
3678
|
-
cnt = cnt || 0;
|
3679
|
-
if (self.required && !self.getFilesCount()) {
|
3680
|
-
self.$errorContainer.html('');
|
3681
|
-
self._showUploadError(self.msgFileRequired);
|
3682
|
-
return false;
|
3683
|
-
}
|
3684
|
-
if (self.minFileCount > 0 && self._getFileCount(cnt) < self.minFileCount) {
|
3685
|
-
self._noFilesError({});
|
3686
|
-
return false;
|
3687
|
-
}
|
3688
|
-
return true;
|
3689
|
-
},
|
3690
|
-
clearStack: function () {
|
3691
|
-
var self = this;
|
3692
|
-
self.filestack = [];
|
3693
|
-
self.filenames = [];
|
3694
|
-
self.fileids = [];
|
3695
|
-
return self.$element;
|
3696
|
-
},
|
3697
|
-
updateStack: function (i, file) {
|
3698
|
-
var self = this;
|
3699
|
-
self.filestack[i] = file;
|
3700
|
-
self.filenames[i] = self._getFileName(file);
|
3701
|
-
self.fileids[i] = file && self._getFileId(file) || null;
|
3702
|
-
return self.$element;
|
3703
|
-
},
|
3704
|
-
addToStack: function (file) {
|
3705
|
-
var self = this;
|
3706
|
-
self.filestack.push(file);
|
3707
|
-
self.filenames.push(self._getFileName(file));
|
3708
|
-
self.fileids.push(self._getFileId(file));
|
3709
|
-
return self.$element;
|
3710
|
-
},
|
3711
|
-
getFileStack: function (skipNull) {
|
3712
|
-
var self = this;
|
3713
|
-
return self.filestack.filter(function (n) {
|
3714
|
-
return (skipNull ? n !== undefined : n !== undefined && n !== null);
|
3715
|
-
});
|
3716
|
-
},
|
3717
|
-
getFilesCount: function () {
|
3718
|
-
var self = this, len = self.isAjaxUpload ? self.getFileStack().length : self._inputFileCount();
|
3719
|
-
return self._getFileCount(len);
|
3720
|
-
},
|
3721
|
-
readFiles: function (files) {
|
3722
|
-
this.reader = new FileReader();
|
3723
|
-
var self = this, $el = self.$element, $preview = self.$preview, reader = self.reader,
|
3724
|
-
$container = self.$previewContainer, $status = self.$previewStatus, msgLoading = self.msgLoading,
|
3725
|
-
msgProgress = self.msgProgress, previewInitId = self.previewInitId, numFiles = files.length,
|
3726
|
-
settings = self.fileTypeSettings, ctr = self.filestack.length, readFile,
|
3727
|
-
fileTypes = self.allowedFileTypes, typLen = fileTypes ? fileTypes.length : 0,
|
3728
|
-
fileExt = self.allowedFileExtensions, strExt = $h.isEmpty(fileExt) ? '' : fileExt.join(', '),
|
3729
|
-
maxPreviewSize = self.maxFilePreviewSize && parseFloat(self.maxFilePreviewSize),
|
3730
|
-
canPreview = $preview.length && (!maxPreviewSize || isNaN(maxPreviewSize)),
|
3731
|
-
throwError = function (msg, file, previewId, index) {
|
3732
|
-
var p1 = $.extend(true, {}, self._getOutData({}, {}, files), {id: previewId, index: index}),
|
3733
|
-
p2 = {id: previewId, index: index, file: file, files: files}, $thumb;
|
3734
|
-
self._previewDefault(file, previewId, true);
|
3735
|
-
if (self.isAjaxUpload) {
|
3736
|
-
self.addToStack(undefined);
|
3737
|
-
setTimeout(function () {
|
3738
|
-
readFile(index + 1);
|
3739
|
-
}, 100);
|
3740
|
-
} else {
|
3741
|
-
numFiles = 0;
|
3742
|
-
}
|
3743
|
-
self._initFileActions();
|
3744
|
-
$thumb = $('#' + previewId);
|
3745
|
-
$thumb.find('.kv-file-upload').hide();
|
3746
|
-
if (self.removeFromPreviewOnError) {
|
3747
|
-
$thumb.remove();
|
3748
|
-
}
|
3749
|
-
self.isError = self.isAjaxUpload ? self._showUploadError(msg, p1) : self._showError(msg, p2);
|
3750
|
-
self._updateFileDetails(numFiles);
|
3751
|
-
};
|
3752
|
-
|
3753
|
-
self.loadedImages = [];
|
3754
|
-
self.totalImagesCount = 0;
|
3755
|
-
|
3756
|
-
$.each(files, function (key, file) {
|
3757
|
-
var func = self.fileTypeSettings.image;
|
3758
|
-
if (func && func(file.type)) {
|
3759
|
-
self.totalImagesCount++;
|
3760
|
-
}
|
3761
|
-
});
|
3762
|
-
readFile = function (i) {
|
3763
|
-
if ($h.isEmpty($el.attr('multiple'))) {
|
3764
|
-
numFiles = 1;
|
3765
|
-
}
|
3766
|
-
if (i >= numFiles) {
|
3767
|
-
if (self.isAjaxUpload && self.filestack.length > 0) {
|
3768
|
-
self._raise('filebatchselected', [self.getFileStack()]);
|
3769
|
-
} else {
|
3770
|
-
self._raise('filebatchselected', [files]);
|
3771
|
-
}
|
3772
|
-
$container.removeClass('file-thumb-loading');
|
3773
|
-
$status.html('');
|
3774
|
-
return;
|
3775
|
-
}
|
3776
|
-
var node = ctr + i, previewId = previewInitId + "-" + node, file = files[i], fSizeKB, j, msg,
|
3777
|
-
fnText = settings.text, fnImage = settings.image, fnHtml = settings.html, typ, chk, typ1, typ2,
|
3778
|
-
caption = file && file.name ? self.slug(file.name) : '', fileSize = (file && file.size || 0) / 1000,
|
3779
|
-
fileExtExpr = '', previewData = file ? $h.objUrl.createObjectURL(file) : null, fileCount = 0, strTypes = '',
|
3780
|
-
func, knownTypes = 0, isText, isHtml, isImage, txtFlag, processFileLoaded = function () {
|
3781
|
-
var msg = msgProgress.setTokens({
|
3782
|
-
'index': i + 1,
|
3783
|
-
'files': numFiles,
|
3784
|
-
'percent': 50,
|
3785
|
-
'name': caption
|
3786
|
-
});
|
3787
|
-
setTimeout(function () {
|
3788
|
-
$status.html(msg);
|
3789
|
-
self._updateFileDetails(numFiles);
|
3790
|
-
readFile(i + 1);
|
3791
|
-
}, 100);
|
3792
|
-
self._raise('fileloaded', [file, previewId, i, reader]);
|
3793
|
-
};
|
3794
|
-
if (!file) {
|
3795
|
-
return;
|
3796
|
-
}
|
3797
|
-
if (typLen > 0) {
|
3798
|
-
for (j = 0; j < typLen; j++) {
|
3799
|
-
typ1 = fileTypes[j];
|
3800
|
-
typ2 = self.msgFileTypes[typ1] || typ1;
|
3801
|
-
strTypes += j === 0 ? typ2 : ', ' + typ2;
|
3802
|
-
}
|
3803
|
-
}
|
3804
|
-
if (caption === false) {
|
3805
|
-
readFile(i + 1);
|
3806
|
-
return;
|
3807
|
-
}
|
3808
|
-
if (caption.length === 0) {
|
3809
|
-
msg = self.msgInvalidFileName.replace('{name}', $h.htmlEncode(file.name));
|
3810
|
-
throwError(msg, file, previewId, i);
|
3811
|
-
return;
|
3812
|
-
}
|
3813
|
-
if (!$h.isEmpty(fileExt)) {
|
3814
|
-
fileExtExpr = new RegExp('\\.(' + fileExt.join('|') + ')$', 'i');
|
3815
|
-
}
|
3816
|
-
fSizeKB = fileSize.toFixed(2);
|
3817
|
-
if (self.maxFileSize > 0 && fileSize > self.maxFileSize) {
|
3818
|
-
msg = self.msgSizeTooLarge.setTokens({
|
3819
|
-
'name': caption,
|
3820
|
-
'size': fSizeKB,
|
3821
|
-
'maxSize': self.maxFileSize
|
3822
|
-
});
|
3823
|
-
throwError(msg, file, previewId, i);
|
3824
|
-
return;
|
3825
|
-
}
|
3826
|
-
if (self.minFileSize !== null && fileSize <= $h.getNum(self.minFileSize)) {
|
3827
|
-
msg = self.msgSizeTooSmall.setTokens({
|
3828
|
-
'name': caption,
|
3829
|
-
'size': fSizeKB,
|
3830
|
-
'minSize': self.minFileSize
|
3831
|
-
});
|
3832
|
-
throwError(msg, file, previewId, i);
|
3833
|
-
return;
|
3834
|
-
}
|
3835
|
-
if (!$h.isEmpty(fileTypes) && $h.isArray(fileTypes)) {
|
3836
|
-
for (j = 0; j < fileTypes.length; j += 1) {
|
3837
|
-
typ = fileTypes[j];
|
3838
|
-
func = settings[typ];
|
3839
|
-
fileCount += !func || (typeof func !== 'function') ? 0 : (func(file.type, file.name) ? 1 : 0);
|
3840
|
-
}
|
3841
|
-
if (fileCount === 0) {
|
3842
|
-
msg = self.msgInvalidFileType.setTokens({'name': caption, 'types': strTypes});
|
3843
|
-
throwError(msg, file, previewId, i);
|
3844
|
-
return;
|
3845
|
-
}
|
3846
|
-
}
|
3847
|
-
if (fileCount === 0 && !$h.isEmpty(fileExt) && $h.isArray(fileExt) && !$h.isEmpty(fileExtExpr)) {
|
3848
|
-
chk = $h.compare(caption, fileExtExpr);
|
3849
|
-
fileCount += $h.isEmpty(chk) ? 0 : chk.length;
|
3850
|
-
if (fileCount === 0) {
|
3851
|
-
msg = self.msgInvalidFileExtension.setTokens({'name': caption, 'extensions': strExt});
|
3852
|
-
throwError(msg, file, previewId, i);
|
3853
|
-
return;
|
3854
|
-
}
|
3855
|
-
}
|
3856
|
-
if (!self.showPreview) {
|
3857
|
-
if (self.isAjaxUpload) {
|
3858
|
-
self.addToStack(file);
|
3859
|
-
}
|
3860
|
-
setTimeout(function () {
|
3861
|
-
readFile(i + 1);
|
3862
|
-
self._updateFileDetails(numFiles);
|
3863
|
-
}, 100);
|
3864
|
-
self._raise('fileloaded', [file, previewId, i, reader]);
|
3865
|
-
return;
|
3866
|
-
}
|
3867
|
-
if (!canPreview && fileSize > maxPreviewSize) {
|
3868
|
-
self.addToStack(file);
|
3869
|
-
$container.addClass('file-thumb-loading');
|
3870
|
-
self._previewDefault(file, previewId);
|
3871
|
-
self._initFileActions();
|
3872
|
-
self._updateFileDetails(numFiles);
|
3873
|
-
readFile(i + 1);
|
3874
|
-
return;
|
3875
|
-
}
|
3876
|
-
if ($preview.length && FileReader !== undefined) {
|
3877
|
-
isText = fnText(file.type, caption);
|
3878
|
-
isHtml = fnHtml(file.type, caption);
|
3879
|
-
isImage = fnImage(file.type, caption);
|
3880
|
-
$status.html(msgLoading.replace('{index}', i + 1).replace('{files}', numFiles));
|
3881
|
-
$container.addClass('file-thumb-loading');
|
3882
|
-
reader.onerror = function (evt) {
|
3883
|
-
self._errorHandler(evt, caption);
|
3884
|
-
};
|
3885
|
-
reader.onload = function (theFile) {
|
3886
|
-
var hex, fileInfo, uint, byte, bytes = [], contents, mime, readTextImage = function (textFlag) {
|
3887
|
-
var newReader = new FileReader();
|
3888
|
-
newReader.onerror = function (theFileNew) {
|
3889
|
-
self._errorHandler(theFileNew, caption);
|
3890
|
-
};
|
3891
|
-
newReader.onload = function (theFileNew) {
|
3892
|
-
self._previewFile(i, file, theFileNew, previewId, previewData, fileInfo);
|
3893
|
-
self._initFileActions();
|
3894
|
-
processFileLoaded();
|
3895
|
-
};
|
3896
|
-
if (textFlag) {
|
3897
|
-
newReader.readAsText(file, self.textEncoding);
|
3898
|
-
} else {
|
3899
|
-
newReader.readAsDataURL(file);
|
3900
|
-
}
|
3901
|
-
};
|
3902
|
-
fileInfo = {'name': caption, 'type': file.type};
|
3903
|
-
$.each(settings, function (key, func) {
|
3904
|
-
if (key !== 'object' && key !== 'other' && func(file.type, caption)) {
|
3905
|
-
knownTypes++;
|
3906
|
-
}
|
3907
|
-
});
|
3908
|
-
if (knownTypes === 0) {// auto detect mime types from content if no known file types detected
|
3909
|
-
uint = new Uint8Array(theFile.target.result);
|
3910
|
-
for (j = 0; j < uint.length; j++) {
|
3911
|
-
byte = uint[j].toString(16);
|
3912
|
-
bytes.push(byte);
|
3913
|
-
}
|
3914
|
-
hex = bytes.join('').toLowerCase().substring(0, 8);
|
3915
|
-
mime = $h.getMimeType(hex, '', '');
|
3916
|
-
if ($h.isEmpty(mime)) { // look for ascii text content
|
3917
|
-
contents = $h.arrayBuffer2String(reader.result);
|
3918
|
-
mime = $h.isSvg(contents) ? 'image/svg+xml' : $h.getMimeType(hex, contents, file.type);
|
3919
|
-
}
|
3920
|
-
fileInfo = {'name': caption, 'type': mime};
|
3921
|
-
isText = fnText(mime, '');
|
3922
|
-
isHtml = fnHtml(mime, '');
|
3923
|
-
isImage = fnImage(mime, '');
|
3924
|
-
txtFlag = isText || isHtml;
|
3925
|
-
if (txtFlag || isImage) {
|
3926
|
-
readTextImage(txtFlag);
|
3927
|
-
return;
|
3928
|
-
}
|
3929
|
-
}
|
3930
|
-
self._previewFile(i, file, theFile, previewId, previewData, fileInfo);
|
3931
|
-
self._initFileActions();
|
3932
|
-
processFileLoaded();
|
3933
|
-
};
|
3934
|
-
reader.onprogress = function (data) {
|
3935
|
-
if (data.lengthComputable) {
|
3936
|
-
var fact = (data.loaded / data.total) * 100, progress = Math.ceil(fact);
|
3937
|
-
msg = msgProgress.setTokens({
|
3938
|
-
'index': i + 1,
|
3939
|
-
'files': numFiles,
|
3940
|
-
'percent': progress,
|
3941
|
-
'name': caption
|
3942
|
-
});
|
3943
|
-
setTimeout(function () {
|
3944
|
-
$status.html(msg);
|
3945
|
-
}, 100);
|
3946
|
-
}
|
3947
|
-
};
|
3948
|
-
|
3949
|
-
if (isText || isHtml) {
|
3950
|
-
reader.readAsText(file, self.textEncoding);
|
3951
|
-
} else {
|
3952
|
-
if (isImage) {
|
3953
|
-
reader.readAsDataURL(file);
|
3954
|
-
} else {
|
3955
|
-
reader.readAsArrayBuffer(file);
|
3956
|
-
}
|
3957
|
-
}
|
3958
|
-
} else {
|
3959
|
-
self._previewDefault(file, previewId);
|
3960
|
-
setTimeout(function () {
|
3961
|
-
readFile(i + 1);
|
3962
|
-
self._updateFileDetails(numFiles);
|
3963
|
-
}, 100);
|
3964
|
-
self._raise('fileloaded', [file, previewId, i, reader]);
|
3965
|
-
}
|
3966
|
-
self.addToStack(file);
|
3967
|
-
};
|
3968
|
-
|
3969
|
-
readFile(0);
|
3970
|
-
self._updateFileDetails(numFiles, false);
|
3971
|
-
},
|
3972
|
-
lock: function () {
|
3973
|
-
var self = this;
|
3974
|
-
self._resetErrors();
|
3975
|
-
self.disable();
|
3976
|
-
if (self.showRemove) {
|
3977
|
-
self.$container.find('.fileinput-remove').hide();
|
3978
|
-
}
|
3979
|
-
if (self.showCancel) {
|
3980
|
-
self.$container.find('.fileinput-cancel').show();
|
3981
|
-
}
|
3982
|
-
self._raise('filelock', [self.filestack, self._getExtraData()]);
|
3983
|
-
return self.$element;
|
3984
|
-
},
|
3985
|
-
unlock: function (reset) {
|
3986
|
-
var self = this;
|
3987
|
-
if (reset === undefined) {
|
3988
|
-
reset = true;
|
3989
|
-
}
|
3990
|
-
self.enable();
|
3991
|
-
if (self.showCancel) {
|
3992
|
-
self.$container.find('.fileinput-cancel').hide();
|
3993
|
-
}
|
3994
|
-
if (self.showRemove) {
|
3995
|
-
self.$container.find('.fileinput-remove').show();
|
3996
|
-
}
|
3997
|
-
if (reset) {
|
3998
|
-
self._resetFileStack();
|
3999
|
-
}
|
4000
|
-
self._raise('fileunlock', [self.filestack, self._getExtraData()]);
|
4001
|
-
return self.$element;
|
4002
|
-
},
|
4003
|
-
cancel: function () {
|
4004
|
-
var self = this, xhr = self.ajaxRequests, len = xhr.length, i;
|
4005
|
-
if (len > 0) {
|
4006
|
-
for (i = 0; i < len; i += 1) {
|
4007
|
-
self.cancelling = true;
|
4008
|
-
xhr[i].abort();
|
4009
|
-
}
|
4010
|
-
}
|
4011
|
-
self._setProgressCancelled();
|
4012
|
-
self._getThumbs().each(function () {
|
4013
|
-
var $thumb = $(this), ind = $thumb.attr('data-fileindex');
|
4014
|
-
$thumb.removeClass('file-uploading');
|
4015
|
-
if (self.filestack[ind] !== undefined) {
|
4016
|
-
$thumb.find('.kv-file-upload').removeClass('disabled').removeAttr('disabled');
|
4017
|
-
$thumb.find('.kv-file-remove').removeClass('disabled').removeAttr('disabled');
|
4018
|
-
}
|
4019
|
-
self.unlock();
|
4020
|
-
});
|
4021
|
-
return self.$element;
|
4022
|
-
},
|
4023
|
-
clear: function () {
|
4024
|
-
var self = this, cap;
|
4025
|
-
if (!self._raise('fileclear')) {
|
4026
|
-
return;
|
4027
|
-
}
|
4028
|
-
self.$btnUpload.removeAttr('disabled');
|
4029
|
-
self._getThumbs().find('video,audio,img').each(function () {
|
4030
|
-
$h.cleanMemory($(this));
|
4031
|
-
});
|
4032
|
-
self._clearFileInput();
|
4033
|
-
self._resetUpload();
|
4034
|
-
self.clearStack();
|
4035
|
-
self._resetErrors(true);
|
4036
|
-
if (self._hasInitialPreview()) {
|
4037
|
-
self._showFileIcon();
|
4038
|
-
self._resetPreview();
|
4039
|
-
self._initPreviewActions();
|
4040
|
-
self.$container.removeClass('file-input-new');
|
4041
|
-
} else {
|
4042
|
-
self._getThumbs().each(function () {
|
4043
|
-
self._clearObjects($(this));
|
4044
|
-
});
|
4045
|
-
if (self.isAjaxUpload) {
|
4046
|
-
self.previewCache.data = {};
|
4047
|
-
}
|
4048
|
-
self.$preview.html('');
|
4049
|
-
cap = (!self.overwriteInitial && self.initialCaption.length > 0) ? self.initialCaption : '';
|
4050
|
-
self.$caption.attr('title', '').val(cap);
|
4051
|
-
$h.addCss(self.$container, 'file-input-new');
|
4052
|
-
self._validateDefaultPreview();
|
4053
|
-
}
|
4054
|
-
if (self.$container.find($h.FRAMES).length === 0) {
|
4055
|
-
if (!self._initCaption()) {
|
4056
|
-
self.$captionContainer.removeClass('icon-visible');
|
4057
|
-
}
|
4058
|
-
}
|
4059
|
-
self._hideFileIcon();
|
4060
|
-
self._raise('filecleared');
|
4061
|
-
self.$captionContainer.focus();
|
4062
|
-
self._setFileDropZoneTitle();
|
4063
|
-
return self.$element;
|
4064
|
-
},
|
4065
|
-
reset: function () {
|
4066
|
-
var self = this;
|
4067
|
-
if (!self._raise('filereset')) {
|
4068
|
-
return;
|
4069
|
-
}
|
4070
|
-
self._resetPreview();
|
4071
|
-
self.$container.find('.fileinput-filename').text('');
|
4072
|
-
$h.addCss(self.$container, 'file-input-new');
|
4073
|
-
if (self.getFrames().length || self.dropZoneEnabled) {
|
4074
|
-
self.$container.removeClass('file-input-new');
|
4075
|
-
}
|
4076
|
-
self.clearStack();
|
4077
|
-
self.formdata = {};
|
4078
|
-
self._setFileDropZoneTitle();
|
4079
|
-
return self.$element;
|
4080
|
-
},
|
4081
|
-
disable: function () {
|
4082
|
-
var self = this;
|
4083
|
-
self.isDisabled = true;
|
4084
|
-
self._raise('filedisabled');
|
4085
|
-
self.$element.attr('disabled', 'disabled');
|
4086
|
-
self.$container.find(".kv-fileinput-caption").addClass("file-caption-disabled");
|
4087
|
-
self.$container.find(".fileinput-remove, .fileinput-upload, .file-preview-frame button")
|
4088
|
-
.attr("disabled", true);
|
4089
|
-
$h.addCss(self.$container.find('.btn-file'), 'disabled');
|
4090
|
-
self._initDragDrop();
|
4091
|
-
return self.$element;
|
4092
|
-
},
|
4093
|
-
enable: function () {
|
4094
|
-
var self = this;
|
4095
|
-
self.isDisabled = false;
|
4096
|
-
self._raise('fileenabled');
|
4097
|
-
self.$element.removeAttr('disabled');
|
4098
|
-
self.$container.find(".kv-fileinput-caption").removeClass("file-caption-disabled");
|
4099
|
-
self.$container.find(".fileinput-remove, .fileinput-upload, .file-preview-frame button")
|
4100
|
-
.removeAttr("disabled");
|
4101
|
-
self.$container.find('.btn-file').removeClass('disabled');
|
4102
|
-
self._initDragDrop();
|
4103
|
-
return self.$element;
|
4104
|
-
},
|
4105
|
-
upload: function () {
|
4106
|
-
var self = this, totLen = self.getFileStack().length, i, outData, len,
|
4107
|
-
hasExtraData = !$.isEmptyObject(self._getExtraData());
|
4108
|
-
if (!self.isAjaxUpload || self.isDisabled || !self._isFileSelectionValid(totLen)) {
|
4109
|
-
return;
|
4110
|
-
}
|
4111
|
-
self._resetUpload();
|
4112
|
-
if (totLen === 0 && !hasExtraData) {
|
4113
|
-
self._showUploadError(self.msgUploadEmpty);
|
4114
|
-
return;
|
4115
|
-
}
|
4116
|
-
self.$progress.show();
|
4117
|
-
self.uploadCount = 0;
|
4118
|
-
self.uploadStatus = {};
|
4119
|
-
self.uploadLog = [];
|
4120
|
-
self.lock();
|
4121
|
-
self._setProgress(2);
|
4122
|
-
if (totLen === 0 && hasExtraData) {
|
4123
|
-
self._uploadExtraOnly();
|
4124
|
-
return;
|
4125
|
-
}
|
4126
|
-
len = self.filestack.length;
|
4127
|
-
self.hasInitData = false;
|
4128
|
-
if (self.uploadAsync) {
|
4129
|
-
outData = self._getOutData();
|
4130
|
-
self._raise('filebatchpreupload', [outData]);
|
4131
|
-
self.fileBatchCompleted = false;
|
4132
|
-
self.uploadCache = {content: [], config: [], tags: [], append: true};
|
4133
|
-
self.uploadAsyncCount = self.getFileStack().length;
|
4134
|
-
for (i = 0; i < len; i++) {
|
4135
|
-
self.uploadCache.content[i] = null;
|
4136
|
-
self.uploadCache.config[i] = null;
|
4137
|
-
self.uploadCache.tags[i] = null;
|
4138
|
-
}
|
4139
|
-
self.$preview.find('.file-preview-initial').removeClass($h.SORT_CSS);
|
4140
|
-
self._initSortable();
|
4141
|
-
self.cacheInitialPreview = self.getPreview();
|
4142
|
-
|
4143
|
-
for (i = 0; i < len; i++) {
|
4144
|
-
if (self.filestack[i]) {
|
4145
|
-
self._uploadSingle(i, true);
|
4146
|
-
}
|
4147
|
-
}
|
4148
|
-
return;
|
4149
|
-
}
|
4150
|
-
self._uploadBatch();
|
4151
|
-
return self.$element;
|
4152
|
-
},
|
4153
|
-
destroy: function () {
|
4154
|
-
var self = this, $form = self.$form, $cont = self.$container, $el = self.$element, ns = self.namespace;
|
4155
|
-
$(document).off(ns);
|
4156
|
-
$(window).off(ns);
|
4157
|
-
if ($form && $form.length) {
|
4158
|
-
$form.off(ns);
|
4159
|
-
}
|
4160
|
-
if (self.isAjaxUpload) {
|
4161
|
-
self._clearFileInput();
|
4162
|
-
}
|
4163
|
-
self._cleanup();
|
4164
|
-
self._initPreviewCache();
|
4165
|
-
$el.insertBefore($cont).off(ns).removeData();
|
4166
|
-
$cont.off().remove();
|
4167
|
-
return $el;
|
4168
|
-
},
|
4169
|
-
refresh: function (options) {
|
4170
|
-
var self = this, $el = self.$element;
|
4171
|
-
if (typeof options !== 'object' || $h.isEmpty(options)) {
|
4172
|
-
options = self.options;
|
4173
|
-
} else {
|
4174
|
-
options = $.extend(true, {}, self.options, options);
|
4175
|
-
}
|
4176
|
-
self._init(options, true);
|
4177
|
-
self._listen();
|
4178
|
-
return $el;
|
4179
|
-
},
|
4180
|
-
zoom: function (frameId) {
|
4181
|
-
var self = this, $frame = self._getFrame(frameId), $modal = self.$modal;
|
4182
|
-
if (!$frame) {
|
4183
|
-
return;
|
4184
|
-
}
|
4185
|
-
$h.initModal($modal);
|
4186
|
-
$modal.html(self._getModalContent());
|
4187
|
-
self._setZoomContent($frame);
|
4188
|
-
$modal.modal('show');
|
4189
|
-
self._initZoomButtons();
|
4190
|
-
},
|
4191
|
-
getExif: function (frameId) {
|
4192
|
-
var self = this, $frame = self._getFrame(frameId);
|
4193
|
-
return $frame && $frame.data('exif') || null;
|
4194
|
-
},
|
4195
|
-
getFrames: function (cssFilter) {
|
4196
|
-
var self = this, $frames;
|
4197
|
-
cssFilter = cssFilter || '';
|
4198
|
-
$frames = self.$preview.find($h.FRAMES + cssFilter);
|
4199
|
-
if (self.reversePreviewOrder) {
|
4200
|
-
$frames = $($frames.get().reverse());
|
4201
|
-
}
|
4202
|
-
return $frames;
|
4203
|
-
},
|
4204
|
-
getPreview: function () {
|
4205
|
-
var self = this;
|
4206
|
-
return {
|
4207
|
-
content: self.initialPreview,
|
4208
|
-
config: self.initialPreviewConfig,
|
4209
|
-
tags: self.initialPreviewThumbTags
|
4210
|
-
};
|
4211
|
-
}
|
4212
|
-
};
|
4213
|
-
|
4214
|
-
$.fn.fileinput = function (option) {
|
4215
|
-
if (!$h.hasFileAPISupport() && !$h.isIE(9)) {
|
4216
|
-
return;
|
4217
|
-
}
|
4218
|
-
var args = Array.apply(null, arguments), retvals = [];
|
4219
|
-
args.shift();
|
4220
|
-
this.each(function () {
|
4221
|
-
var self = $(this), data = self.data('fileinput'), options = typeof option === 'object' && option,
|
4222
|
-
theme = options.theme || self.data('theme'), l = {}, t = {},
|
4223
|
-
lang = options.language || self.data('language') || $.fn.fileinput.defaults.language || 'en', opt;
|
4224
|
-
if (!data) {
|
4225
|
-
if (theme) {
|
4226
|
-
t = $.fn.fileinputThemes[theme] || {};
|
4227
|
-
}
|
4228
|
-
if (lang !== 'en' && !$h.isEmpty($.fn.fileinputLocales[lang])) {
|
4229
|
-
l = $.fn.fileinputLocales[lang] || {};
|
4230
|
-
}
|
4231
|
-
opt = $.extend(true, {}, $.fn.fileinput.defaults, t, $.fn.fileinputLocales.en, l, options, self.data());
|
4232
|
-
data = new FileInput(this, opt);
|
4233
|
-
self.data('fileinput', data);
|
4234
|
-
}
|
4235
|
-
|
4236
|
-
if (typeof option === 'string') {
|
4237
|
-
retvals.push(data[option].apply(data, args));
|
4238
|
-
}
|
4239
|
-
});
|
4240
|
-
switch (retvals.length) {
|
4241
|
-
case 0:
|
4242
|
-
return this;
|
4243
|
-
case 1:
|
4244
|
-
return retvals[0];
|
4245
|
-
default:
|
4246
|
-
return retvals;
|
4247
|
-
}
|
4248
|
-
};
|
4249
|
-
|
4250
|
-
$.fn.fileinput.defaults = {
|
4251
|
-
language: 'en',
|
4252
|
-
showCaption: true,
|
4253
|
-
showBrowse: true,
|
4254
|
-
showPreview: true,
|
4255
|
-
showRemove: true,
|
4256
|
-
showUpload: true,
|
4257
|
-
showCancel: true,
|
4258
|
-
showClose: true,
|
4259
|
-
showUploadedThumbs: true,
|
4260
|
-
browseOnZoneClick: false,
|
4261
|
-
autoReplace: false,
|
4262
|
-
autoOrientImage: true, // for JPEG images based on EXIF orientation tag
|
4263
|
-
required: false,
|
4264
|
-
rtl: false,
|
4265
|
-
hideThumbnailContent: false,
|
4266
|
-
generateFileId: null,
|
4267
|
-
previewClass: '',
|
4268
|
-
captionClass: '',
|
4269
|
-
frameClass: 'krajee-default',
|
4270
|
-
mainClass: 'file-caption-main',
|
4271
|
-
mainTemplate: null,
|
4272
|
-
purifyHtml: true,
|
4273
|
-
fileSizeGetter: null,
|
4274
|
-
initialCaption: '',
|
4275
|
-
initialPreview: [],
|
4276
|
-
initialPreviewDelimiter: '*$$*',
|
4277
|
-
initialPreviewAsData: false,
|
4278
|
-
initialPreviewFileType: 'image',
|
4279
|
-
initialPreviewConfig: [],
|
4280
|
-
initialPreviewThumbTags: [],
|
4281
|
-
previewThumbTags: {},
|
4282
|
-
initialPreviewShowDelete: true,
|
4283
|
-
initialPreviewDownloadUrl: '',
|
4284
|
-
removeFromPreviewOnError: false,
|
4285
|
-
deleteUrl: '',
|
4286
|
-
deleteExtraData: {},
|
4287
|
-
overwriteInitial: true,
|
4288
|
-
previewZoomButtonIcons: {
|
4289
|
-
prev: '<i class="glyphicon glyphicon-triangle-left"></i>',
|
4290
|
-
next: '<i class="glyphicon glyphicon-triangle-right"></i>',
|
4291
|
-
toggleheader: '<i class="glyphicon glyphicon-resize-vertical"></i>',
|
4292
|
-
fullscreen: '<i class="glyphicon glyphicon-fullscreen"></i>',
|
4293
|
-
borderless: '<i class="glyphicon glyphicon-resize-full"></i>',
|
4294
|
-
close: '<i class="glyphicon glyphicon-remove"></i>'
|
4295
|
-
},
|
4296
|
-
previewZoomButtonClasses: {
|
4297
|
-
prev: 'btn btn-navigate',
|
4298
|
-
next: 'btn btn-navigate',
|
4299
|
-
toggleheader: 'btn btn-sm btn-kv btn-default btn-outline-secondary',
|
4300
|
-
fullscreen: 'btn btn-sm btn-kv btn-default btn-outline-secondary',
|
4301
|
-
borderless: 'btn btn-sm btn-kv btn-default btn-outline-secondary',
|
4302
|
-
close: 'btn btn-sm btn-kv btn-default btn-outline-secondary'
|
4303
|
-
},
|
4304
|
-
preferIconicPreview: false,
|
4305
|
-
preferIconicZoomPreview: false,
|
4306
|
-
allowedPreviewTypes: undefined,
|
4307
|
-
allowedPreviewMimeTypes: null,
|
4308
|
-
allowedFileTypes: null,
|
4309
|
-
allowedFileExtensions: null,
|
4310
|
-
defaultPreviewContent: null,
|
4311
|
-
customLayoutTags: {},
|
4312
|
-
customPreviewTags: {},
|
4313
|
-
previewFileIcon: '<i class="glyphicon glyphicon-file"></i>',
|
4314
|
-
previewFileIconClass: 'file-other-icon',
|
4315
|
-
previewFileIconSettings: {},
|
4316
|
-
previewFileExtSettings: {},
|
4317
|
-
buttonLabelClass: 'hidden-xs',
|
4318
|
-
browseIcon: '<i class="glyphicon glyphicon-folder-open"></i> ',
|
4319
|
-
browseClass: 'btn btn-primary',
|
4320
|
-
removeIcon: '<i class="glyphicon glyphicon-trash"></i>',
|
4321
|
-
removeClass: 'btn btn-default btn-secondary',
|
4322
|
-
cancelIcon: '<i class="glyphicon glyphicon-ban-circle"></i>',
|
4323
|
-
cancelClass: 'btn btn-default btn-secondary',
|
4324
|
-
uploadIcon: '<i class="glyphicon glyphicon-upload"></i>',
|
4325
|
-
uploadClass: 'btn btn-default btn-secondary',
|
4326
|
-
uploadUrl: null,
|
4327
|
-
uploadUrlThumb: null,
|
4328
|
-
uploadAsync: true,
|
4329
|
-
uploadExtraData: {},
|
4330
|
-
zoomModalHeight: 480,
|
4331
|
-
minImageWidth: null,
|
4332
|
-
minImageHeight: null,
|
4333
|
-
maxImageWidth: null,
|
4334
|
-
maxImageHeight: null,
|
4335
|
-
resizeImage: false,
|
4336
|
-
resizePreference: 'width',
|
4337
|
-
resizeQuality: 0.92,
|
4338
|
-
resizeDefaultImageType: 'image/jpeg',
|
4339
|
-
resizeIfSizeMoreThan: 0, // in KB
|
4340
|
-
minFileSize: 0,
|
4341
|
-
maxFileSize: 0,
|
4342
|
-
maxFilePreviewSize: 25600, // 25 MB
|
4343
|
-
minFileCount: 0,
|
4344
|
-
maxFileCount: 0,
|
4345
|
-
validateInitialCount: false,
|
4346
|
-
msgValidationErrorClass: 'text-danger',
|
4347
|
-
msgValidationErrorIcon: '<i class="glyphicon glyphicon-exclamation-sign"></i> ',
|
4348
|
-
msgErrorClass: 'file-error-message',
|
4349
|
-
progressThumbClass: "progress-bar bg-success progress-bar-success progress-bar-striped active",
|
4350
|
-
progressClass: "progress-bar bg-success progress-bar-success progress-bar-striped active",
|
4351
|
-
progressCompleteClass: "progress-bar bg-success progress-bar-success",
|
4352
|
-
progressErrorClass: "progress-bar bg-danger progress-bar-danger",
|
4353
|
-
progressUploadThreshold: 99,
|
4354
|
-
previewFileType: 'image',
|
4355
|
-
elCaptionContainer: null,
|
4356
|
-
elCaptionText: null,
|
4357
|
-
elPreviewContainer: null,
|
4358
|
-
elPreviewImage: null,
|
4359
|
-
elPreviewStatus: null,
|
4360
|
-
elErrorContainer: null,
|
4361
|
-
errorCloseButton: $h.closeButton('kv-error-close'),
|
4362
|
-
slugCallback: null,
|
4363
|
-
dropZoneEnabled: true,
|
4364
|
-
dropZoneTitleClass: 'file-drop-zone-title',
|
4365
|
-
fileActionSettings: {},
|
4366
|
-
otherActionButtons: '',
|
4367
|
-
textEncoding: 'UTF-8',
|
4368
|
-
ajaxSettings: {},
|
4369
|
-
ajaxDeleteSettings: {},
|
4370
|
-
showAjaxErrorDetails: true,
|
4371
|
-
mergeAjaxCallbacks: false,
|
4372
|
-
mergeAjaxDeleteCallbacks: false,
|
4373
|
-
retryErrorUploads: true,
|
4374
|
-
reversePreviewOrder: false
|
4375
|
-
};
|
4376
|
-
|
4377
|
-
$.fn.fileinputLocales.en = {
|
4378
|
-
fileSingle: 'file',
|
4379
|
-
filePlural: 'files',
|
4380
|
-
browseLabel: 'Browse …',
|
4381
|
-
removeLabel: 'Remove',
|
4382
|
-
removeTitle: 'Clear selected files',
|
4383
|
-
cancelLabel: 'Cancel',
|
4384
|
-
cancelTitle: 'Abort ongoing upload',
|
4385
|
-
uploadLabel: 'Upload',
|
4386
|
-
uploadTitle: 'Upload selected files',
|
4387
|
-
msgNo: 'No',
|
4388
|
-
msgNoFilesSelected: 'No files selected',
|
4389
|
-
msgCancelled: 'Cancelled',
|
4390
|
-
msgPlaceholder: 'Select {files}...',
|
4391
|
-
msgZoomModalHeading: 'Detailed Preview',
|
4392
|
-
msgFileRequired: 'You must select a file to upload.',
|
4393
|
-
msgSizeTooSmall: 'File "{name}" (<b>{size} KB</b>) is too small and must be larger than <b>{minSize} KB</b>.',
|
4394
|
-
msgSizeTooLarge: 'File "{name}" (<b>{size} KB</b>) exceeds maximum allowed upload size of <b>{maxSize} KB</b>.',
|
4395
|
-
msgFilesTooLess: 'You must select at least <b>{n}</b> {files} to upload.',
|
4396
|
-
msgFilesTooMany: 'Number of files selected for upload <b>({n})</b> exceeds maximum allowed limit of <b>{m}</b>.',
|
4397
|
-
msgFileNotFound: 'File "{name}" not found!',
|
4398
|
-
msgFileSecured: 'Security restrictions prevent reading the file "{name}".',
|
4399
|
-
msgFileNotReadable: 'File "{name}" is not readable.',
|
4400
|
-
msgFilePreviewAborted: 'File preview aborted for "{name}".',
|
4401
|
-
msgFilePreviewError: 'An error occurred while reading the file "{name}".',
|
4402
|
-
msgInvalidFileName: 'Invalid or unsupported characters in file name "{name}".',
|
4403
|
-
msgInvalidFileType: 'Invalid type for file "{name}". Only "{types}" files are supported.',
|
4404
|
-
msgInvalidFileExtension: 'Invalid extension for file "{name}". Only "{extensions}" files are supported.',
|
4405
|
-
msgFileTypes: {
|
4406
|
-
'image': 'image',
|
4407
|
-
'html': 'HTML',
|
4408
|
-
'text': 'text',
|
4409
|
-
'video': 'video',
|
4410
|
-
'audio': 'audio',
|
4411
|
-
'flash': 'flash',
|
4412
|
-
'pdf': 'PDF',
|
4413
|
-
'object': 'object'
|
4414
|
-
},
|
4415
|
-
msgUploadAborted: 'The file upload was aborted',
|
4416
|
-
msgUploadThreshold: 'Processing...',
|
4417
|
-
msgUploadBegin: 'Initializing...',
|
4418
|
-
msgUploadEnd: 'Done',
|
4419
|
-
msgUploadEmpty: 'No valid data available for upload.',
|
4420
|
-
msgUploadError: 'Error',
|
4421
|
-
msgValidationError: 'Validation Error',
|
4422
|
-
msgLoading: 'Loading file {index} of {files} …',
|
4423
|
-
msgProgress: 'Loading file {index} of {files} - {name} - {percent}% completed.',
|
4424
|
-
msgSelected: '{n} {files} selected',
|
4425
|
-
msgFoldersNotAllowed: 'Drag & drop files only! {n} folder(s) dropped were skipped.',
|
4426
|
-
msgImageWidthSmall: 'Width of image file "{name}" must be at least {size} px.',
|
4427
|
-
msgImageHeightSmall: 'Height of image file "{name}" must be at least {size} px.',
|
4428
|
-
msgImageWidthLarge: 'Width of image file "{name}" cannot exceed {size} px.',
|
4429
|
-
msgImageHeightLarge: 'Height of image file "{name}" cannot exceed {size} px.',
|
4430
|
-
msgImageResizeError: 'Could not get the image dimensions to resize.',
|
4431
|
-
msgImageResizeException: 'Error while resizing the image.<pre>{errors}</pre>',
|
4432
|
-
msgAjaxError: 'Something went wrong with the {operation} operation. Please try again later!',
|
4433
|
-
msgAjaxProgressError: '{operation} failed',
|
4434
|
-
ajaxOperations: {
|
4435
|
-
deleteThumb: 'file delete',
|
4436
|
-
uploadThumb: 'file upload',
|
4437
|
-
uploadBatch: 'batch file upload',
|
4438
|
-
uploadExtra: 'form data upload'
|
4439
|
-
},
|
4440
|
-
dropZoneTitle: 'Drag & drop files here …',
|
4441
|
-
dropZoneClickTitle: '<br>(or click to select {files})',
|
4442
|
-
previewZoomButtonTitles: {
|
4443
|
-
prev: 'View previous file',
|
4444
|
-
next: 'View next file',
|
4445
|
-
toggleheader: 'Toggle header',
|
4446
|
-
fullscreen: 'Toggle full screen',
|
4447
|
-
borderless: 'Toggle borderless mode',
|
4448
|
-
close: 'Close detailed preview'
|
4449
|
-
}
|
4450
|
-
};
|
4451
|
-
|
4452
|
-
$.fn.fileinput.Constructor = FileInput;
|
4453
|
-
|
4454
|
-
/**
|
4455
|
-
* Convert automatically file inputs with class 'file' into a bootstrap fileinput control.
|
4456
|
-
*/
|
4457
|
-
$(document).ready(function () {
|
4458
|
-
var $input = $('input.file[type=file]');
|
4459
|
-
if ($input.length) {
|
4460
|
-
$input.fileinput();
|
4461
|
-
}
|
4462
|
-
});
|
4463
|
-
}));
|