From 9a190788707a3c08d0fd6aef2f049253a9a3c010 Mon Sep 17 00:00:00 2001 From: Awilum Date: Mon, 26 Feb 2018 23:20:56 +0300 Subject: [PATCH] MONSTRA 4 CLEAN UP COMMIT --- .DS_Store | Bin 0 -> 6148 bytes .gitignore | 35 - .htaccess | 68 - CHANGELOG.md | 368 - LICENSE.md | 21 - README.md | 34 - admin/index.php | 189 - admin/themes/default/css/default.css | 661 -- admin/themes/default/index.template.php | 164 - admin/themes/default/js/default.js | 23 - admin/themes/default/login.template.php | 135 - backups/.empty | 0 backups/.htaccess | 1 - boot/defines.php | 94 - engine/Alert.php | 101 - engine/Monstra.php | 340 - engine/Option.php | 178 - engine/Plugin/Action.php | 113 - engine/Plugin/Backend.php | 19 - engine/Plugin/Filter.php | 120 - engine/Plugin/Frontend.php | 40 - engine/Plugin/I18n.php | 203 - engine/Plugin/Javascript.php | 137 - engine/Plugin/Navigation.php | 202 - engine/Plugin/Plugin.php | 185 - engine/Plugin/Stylesheet.php | 153 - engine/Plugin/View.php | 236 - engine/Security.php | 239 - engine/Shortcode.php | 164 - engine/Site.php | 222 - engine/Uri.php | 163 - engine/Xmldb/DB.php | 92 - engine/Xmldb/Table.php | 857 --- engine/Xmldb/XML.php | 94 - engine/_init.php | 38 - engine/boot/actions.php | 10 - engine/boot/defines.php | 94 - engine/boot/filters.php | 26 - engine/boot/shortcodes.php | 10 - favicon.ico | Bin 1150 -> 0 bytes index.php | 63 - install.php | 627 -- libraries/Gelato/Agent/Agent.php | 170 - libraries/Gelato/Arr/Arr.php | 187 - libraries/Gelato/Cache/Cache.php | 212 - libraries/Gelato/ClassLoader/ClassLoader.php | 236 - libraries/Gelato/Cookie/Cookie.php | 108 - libraries/Gelato/Curl/Curl.php | 144 - libraries/Gelato/Date/Date.php | 422 -- libraries/Gelato/Debug/Debug.php | 118 - .../Gelato/ErrorHandler/ErrorHandler.php | 311 - .../Resources/Views/Errors/exception.php | 306 - .../Resources/Views/Errors/production.php | 51 - libraries/Gelato/FileSystem/Dir.php | 228 - libraries/Gelato/FileSystem/File.php | 577 -- libraries/Gelato/Form/Form.php | 412 -- libraries/Gelato/Gelato.php | 124 - libraries/Gelato/Html/Html.php | 371 - libraries/Gelato/Http/Request.php | 155 - libraries/Gelato/Http/Response.php | 112 - libraries/Gelato/Image/Image.php | 661 -- libraries/Gelato/Inflector/Inflector.php | 226 - libraries/Gelato/Log/Log.php | 63 - libraries/Gelato/Minify/MinifyCSS.php | 241 - libraries/Gelato/Minify/MinifyHTML.php | 47 - libraries/Gelato/Minify/MinifyJS.php | 50 - .../Gelato/Notification/Notification.php | 140 - libraries/Gelato/Number/Number.php | 227 - libraries/Gelato/README.md | 9 - libraries/Gelato/Registry/Registry.php | 91 - libraries/Gelato/Security/Token.php | 92 - libraries/Gelato/Session/Session.php | 189 - libraries/Gelato/Text/Text.php | 477 -- libraries/Gelato/Url/Url.php | 109 - libraries/Gelato/Validation/Valid.php | 209 - libraries/Gelato/Zip/Zip.php | 679 -- libraries/Gelato/_logs/.empty | 0 libraries/Gelato/changelog.txt | 21 - libraries/Gelato/license.txt | 221 - libraries/Idiorm/ORM.php | 2143 ------ libraries/PHPMailer/PHPMailer.php | 2946 -------- plugins/.htaccess | 1 - plugins/blog/README.md | 40 - plugins/blog/blog.plugin.php | 399 -- plugins/blog/install/blog.manifest.xml | 11 - plugins/blog/languages/en.lang.php | 12 - plugins/blog/languages/es.lang.php | 12 - plugins/blog/languages/pl.lang.php | 12 - plugins/blog/languages/ru.lang.php | 13 - plugins/blog/languages/sr.lang.php | 11 - plugins/blog/languages/tr.lang.php | 12 - plugins/blog/languages/uk.lang.php | 13 - plugins/blog/rss.php | 34 - plugins/blog/views/frontend/block.view.php | 7 - .../blog/views/frontend/breadcrumbs.view.php | 5 - plugins/blog/views/frontend/index.view.php | 7 - plugins/blog/views/frontend/pager.view.php | 29 - .../views/frontend/related_posts.view.php | 7 - plugins/blog/views/frontend/tags.view.php | 3 - plugins/box/backup/backup.admin.php | 104 - plugins/box/backup/backup.plugin.php | 29 - .../box/backup/install/backup.manifest.xml | 11 - plugins/box/backup/languages/cs.lang.php | 17 - plugins/box/backup/languages/de.lang.php | 17 - plugins/box/backup/languages/en.lang.php | 26 - plugins/box/backup/languages/es.lang.php | 26 - plugins/box/backup/languages/fa.lang.php | 17 - plugins/box/backup/languages/fr.lang.php | 17 - plugins/box/backup/languages/hu.lang.php | 17 - plugins/box/backup/languages/id.lang.php | 17 - plugins/box/backup/languages/it.lang.php | 17 - plugins/box/backup/languages/ja.lang.php | 17 - plugins/box/backup/languages/lt.lang.php | 17 - plugins/box/backup/languages/nl.lang.php | 17 - plugins/box/backup/languages/pl.lang.php | 17 - plugins/box/backup/languages/pt-br.lang.php | 17 - plugins/box/backup/languages/ru.lang.php | 21 - plugins/box/backup/languages/sk.lang.php | 17 - plugins/box/backup/languages/sr.lang.php | 17 - plugins/box/backup/languages/tr.lang.php | 26 - plugins/box/backup/languages/uk.lang.php | 21 - plugins/box/backup/languages/zh-cn.lang.php | 17 - .../box/backup/views/backend/index.view.php | 57 - plugins/box/blocks/blocks.admin.php | 147 - plugins/box/blocks/blocks.plugin.php | 115 - .../box/blocks/install/blocks.manifest.xml | 11 - plugins/box/blocks/js/.htaccess | 2 - plugins/box/blocks/js/blocks.js | 18 - plugins/box/blocks/languages/cs.lang.php | 30 - plugins/box/blocks/languages/de.lang.php | 30 - plugins/box/blocks/languages/en.lang.php | 30 - plugins/box/blocks/languages/es.lang.php | 30 - plugins/box/blocks/languages/fa.lang.php | 30 - plugins/box/blocks/languages/fr.lang.php | 30 - plugins/box/blocks/languages/hu.lang.php | 30 - plugins/box/blocks/languages/id.lang.php | 29 - plugins/box/blocks/languages/it.lang.php | 30 - plugins/box/blocks/languages/ja.lang.php | 29 - plugins/box/blocks/languages/ka-ge.lang.php | 30 - plugins/box/blocks/languages/lt.lang.php | 30 - plugins/box/blocks/languages/nl.lang.php | 30 - plugins/box/blocks/languages/pl.lang.php | 30 - plugins/box/blocks/languages/pt-br.lang.php | 30 - plugins/box/blocks/languages/ru.lang.php | 30 - plugins/box/blocks/languages/sk.lang.php | 30 - plugins/box/blocks/languages/sr.lang.php | 30 - plugins/box/blocks/languages/tr.lang.php | 30 - plugins/box/blocks/languages/uk.lang.php | 30 - plugins/box/blocks/languages/zh-cn.lang.php | 29 - plugins/box/blocks/views/backend/add.view.php | 31 - .../box/blocks/views/backend/edit.view.php | 41 - .../box/blocks/views/backend/index.view.php | 66 - plugins/box/dashboard/dashboard.admin.php | 122 - plugins/box/dashboard/dashboard.plugin.php | 30 - .../dashboard/install/dashboard.manifest.xml | 11 - plugins/box/dashboard/js/.htaccess | 2 - plugins/box/dashboard/js/ganalytics.js | 183 - plugins/box/dashboard/languages/cs.lang.php | 11 - plugins/box/dashboard/languages/de.lang.php | 11 - plugins/box/dashboard/languages/en.lang.php | 11 - plugins/box/dashboard/languages/es.lang.php | 11 - .../box/dashboard/languages/ka-ge.lang.php | 11 - plugins/box/dashboard/languages/pl.lang.php | 11 - plugins/box/dashboard/languages/ru.lang.php | 11 - plugins/box/dashboard/languages/sr.lang.php | 10 - plugins/box/dashboard/languages/tr.lang.php | 11 - plugins/box/dashboard/languages/uk.lang.php | 11 - .../box/dashboard/views/backend/ga.view.php | 96 - .../dashboard/views/backend/index.view.php | 58 - plugins/box/editor/editor.plugin.php | 42 - .../box/editor/install/editor.manifest.xml | 11 - plugins/box/editor/languages/cs.lang.php | 8 - plugins/box/editor/languages/de.lang.php | 8 - plugins/box/editor/languages/en.lang.php | 8 - plugins/box/editor/languages/es.lang.php | 8 - plugins/box/editor/languages/fa.lang.php | 8 - plugins/box/editor/languages/fr.lang.php | 8 - plugins/box/editor/languages/hu.lang.php | 8 - plugins/box/editor/languages/it.lang.php | 8 - plugins/box/editor/languages/ja.lang.php | 8 - plugins/box/editor/languages/ka-ge.lang.php | 7 - plugins/box/editor/languages/lt.lang.php | 8 - plugins/box/editor/languages/nl.lang.php | 8 - plugins/box/editor/languages/pl.lang.php | 8 - plugins/box/editor/languages/pt-br.lang.php | 8 - plugins/box/editor/languages/ru.lang.php | 8 - plugins/box/editor/languages/sk.lang.php | 8 - plugins/box/editor/languages/sr.lang.php | 9 - plugins/box/editor/languages/tr.lang.php | 8 - plugins/box/editor/languages/uk.lang.php | 8 - plugins/box/editor/languages/zh-cn.lang.php | 8 - plugins/box/emails/css/.htaccess | 2 - plugins/box/emails/css/inc.css | 688 -- plugins/box/emails/emails.admin.php | 72 - plugins/box/emails/emails.plugin.php | 29 - .../box/emails/install/emails.manifest.xml | 11 - plugins/box/emails/languages/cs.lang.php | 19 - plugins/box/emails/languages/de.lang.php | 19 - plugins/box/emails/languages/en.lang.php | 19 - plugins/box/emails/languages/es.lang.php | 19 - plugins/box/emails/languages/ka-ge.lang.php | 18 - plugins/box/emails/languages/pl.lang.php | 19 - plugins/box/emails/languages/ru.lang.php | 19 - plugins/box/emails/languages/sr.lang.php | 18 - plugins/box/emails/languages/tr.lang.php | 19 - plugins/box/emails/languages/uk.lang.php | 19 - .../box/emails/views/backend/edit.view.php | 35 - .../box/emails/views/backend/index.view.php | 37 - .../emails/views/emails/email_layout.view.php | 1 - plugins/box/filesmanager/css/.htaccess | 2 - plugins/box/filesmanager/css/style.css | 58 - .../box/filesmanager/filesmanager.admin.php | 290 - .../box/filesmanager/filesmanager.plugin.php | 29 - .../install/filesmanager.manifest.xml | 11 - plugins/box/filesmanager/js/.htaccess | 2 - plugins/box/filesmanager/js/filesmanager.js | 54 - plugins/box/filesmanager/js/fileuploader.js | 123 - .../box/filesmanager/languages/cs.lang.php | 42 - .../box/filesmanager/languages/de.lang.php | 19 - .../box/filesmanager/languages/en.lang.php | 38 - .../box/filesmanager/languages/es.lang.php | 43 - .../box/filesmanager/languages/fa.lang.php | 43 - .../box/filesmanager/languages/fr.lang.php | 43 - .../box/filesmanager/languages/hu.lang.php | 43 - .../box/filesmanager/languages/id.lang.php | 43 - .../box/filesmanager/languages/it.lang.php | 43 - .../box/filesmanager/languages/ja.lang.php | 43 - .../box/filesmanager/languages/ka-ge.lang.php | 50 - .../box/filesmanager/languages/lt.lang.php | 43 - .../box/filesmanager/languages/nl.lang.php | 43 - .../box/filesmanager/languages/pl.lang.php | 43 - .../box/filesmanager/languages/pt-br.lang.php | 42 - .../box/filesmanager/languages/ru.lang.php | 50 - .../box/filesmanager/languages/sk.lang.php | 42 - .../box/filesmanager/languages/sr.lang.php | 42 - .../box/filesmanager/languages/tr.lang.php | 40 - .../box/filesmanager/languages/uk.lang.php | 50 - .../box/filesmanager/languages/zh-cn.lang.php | 19 - .../filesmanager/views/backend/index.view.php | 244 - plugins/box/information/information.admin.php | 28 - .../box/information/information.plugin.php | 29 - .../install/information.manifest.xml | 11 - plugins/box/information/languages/cs.lang.php | 40 - plugins/box/information/languages/de.lang.php | 38 - plugins/box/information/languages/en.lang.php | 40 - plugins/box/information/languages/es.lang.php | 40 - plugins/box/information/languages/fa.lang.php | 40 - plugins/box/information/languages/fr.lang.php | 40 - plugins/box/information/languages/hu.lang.php | 40 - plugins/box/information/languages/id.lang.php | 38 - plugins/box/information/languages/it.lang.php | 40 - plugins/box/information/languages/ja.lang.php | 45 - .../box/information/languages/ka-ge.lang.php | 40 - plugins/box/information/languages/lt.lang.php | 40 - plugins/box/information/languages/nl.lang.php | 38 - plugins/box/information/languages/pl.lang.php | 40 - .../box/information/languages/pt-br.lang.php | 40 - plugins/box/information/languages/ru.lang.php | 40 - plugins/box/information/languages/sk.lang.php | 40 - plugins/box/information/languages/sr.lang.php | 35 - plugins/box/information/languages/tr.lang.php | 40 - plugins/box/information/languages/uk.lang.php | 39 - .../box/information/languages/zh-cn.lang.php | 40 - .../information/views/backend/index.view.php | 168 - plugins/box/menu/install/menu.manifest.xml | 11 - plugins/box/menu/js/.htaccess | 2 - plugins/box/menu/js/menu.js | 23 - plugins/box/menu/languages/cs.lang.php | 28 - plugins/box/menu/languages/de.lang.php | 28 - plugins/box/menu/languages/en.lang.php | 28 - plugins/box/menu/languages/es.lang.php | 28 - plugins/box/menu/languages/fa.lang.php | 28 - plugins/box/menu/languages/fr.lang.php | 28 - plugins/box/menu/languages/hu.lang.php | 28 - plugins/box/menu/languages/id.lang.php | 27 - plugins/box/menu/languages/it.lang.php | 28 - plugins/box/menu/languages/ja.lang.php | 27 - plugins/box/menu/languages/ka-ge.lang.php | 28 - plugins/box/menu/languages/lt.lang.php | 29 - plugins/box/menu/languages/nl.lang.php | 28 - plugins/box/menu/languages/pl.lang.php | 28 - plugins/box/menu/languages/pt-br.lang.php | 28 - plugins/box/menu/languages/ru.lang.php | 28 - plugins/box/menu/languages/sk.lang.php | 28 - plugins/box/menu/languages/sr.lang.php | 28 - plugins/box/menu/languages/tr.lang.php | 28 - plugins/box/menu/languages/uk.lang.php | 28 - plugins/box/menu/languages/zh-cn.lang.php | 27 - plugins/box/menu/menu.admin.php | 273 - plugins/box/menu/menu.plugin.php | 57 - plugins/box/menu/views/backend/add.view.php | 102 - plugins/box/menu/views/backend/edit.view.php | 103 - plugins/box/menu/views/backend/index.view.php | 80 - .../box/menu/views/frontend/index.view.php | 52 - plugins/box/pages/install/pages.manifest.xml | 11 - plugins/box/pages/js/.htaccess | 2 - plugins/box/pages/js/pages.js | 36 - plugins/box/pages/languages/cs.lang.php | 55 - plugins/box/pages/languages/de.lang.php | 55 - plugins/box/pages/languages/en.lang.php | 57 - plugins/box/pages/languages/es.lang.php | 55 - plugins/box/pages/languages/fa.lang.php | 55 - plugins/box/pages/languages/fr.lang.php | 55 - plugins/box/pages/languages/hu.lang.php | 55 - plugins/box/pages/languages/id.lang.php | 54 - plugins/box/pages/languages/it.lang.php | 55 - plugins/box/pages/languages/ja.lang.php | 54 - plugins/box/pages/languages/ka-ge.lang.php | 56 - plugins/box/pages/languages/lt.lang.php | 55 - plugins/box/pages/languages/nl.lang.php | 55 - plugins/box/pages/languages/pl.lang.php | 55 - plugins/box/pages/languages/pt-br.lang.php | 55 - plugins/box/pages/languages/ru.lang.php | 56 - plugins/box/pages/languages/sk.lang.php | 55 - plugins/box/pages/languages/sr.lang.php | 55 - plugins/box/pages/languages/tr.lang.php | 57 - plugins/box/pages/languages/uk.lang.php | 56 - plugins/box/pages/languages/zh-cn.lang.php | 54 - plugins/box/pages/pages.admin.php | 639 -- plugins/box/pages/pages.plugin.php | 540 -- plugins/box/pages/views/backend/add.view.php | 157 - plugins/box/pages/views/backend/edit.view.php | 190 - .../box/pages/views/backend/index.view.php | 113 - .../views/frontend/available_pages.view.php | 11 - .../pages/views/frontend/breadcrumbs.view.php | 5 - .../box/plugins/install/plugins.manifest.xml | 11 - plugins/box/plugins/js/.htaccess | 2 - plugins/box/plugins/js/plugins.js | 15 - plugins/box/plugins/languages/cs.lang.php | 21 - plugins/box/plugins/languages/de.lang.php | 21 - plugins/box/plugins/languages/en.lang.php | 21 - plugins/box/plugins/languages/es.lang.php | 21 - plugins/box/plugins/languages/fa.lang.php | 21 - plugins/box/plugins/languages/fr.lang.php | 21 - plugins/box/plugins/languages/hu.lang.php | 21 - plugins/box/plugins/languages/id.lang.php | 21 - plugins/box/plugins/languages/it.lang.php | 21 - plugins/box/plugins/languages/ja.lang.php | 21 - plugins/box/plugins/languages/ka-ge.lang.php | 24 - plugins/box/plugins/languages/lt.lang.php | 21 - plugins/box/plugins/languages/nl.lang.php | 21 - plugins/box/plugins/languages/pl.lang.php | 21 - plugins/box/plugins/languages/pt-br.lang.php | 21 - plugins/box/plugins/languages/ru.lang.php | 24 - plugins/box/plugins/languages/sk.lang.php | 21 - plugins/box/plugins/languages/sr.lang.php | 21 - plugins/box/plugins/languages/tr.lang.php | 20 - plugins/box/plugins/languages/uk.lang.php | 24 - plugins/box/plugins/languages/zh-cn.lang.php | 20 - plugins/box/plugins/plugins.admin.php | 243 - plugins/box/plugins/plugins.plugin.php | 29 - .../box/plugins/views/backend/index.view.php | 181 - .../box/sitemap/install/sitemap.manifest.xml | 11 - plugins/box/sitemap/languages/cs.lang.php | 7 - plugins/box/sitemap/languages/de.lang.php | 7 - plugins/box/sitemap/languages/en.lang.php | 7 - plugins/box/sitemap/languages/es.lang.php | 7 - plugins/box/sitemap/languages/fa.lang.php | 7 - plugins/box/sitemap/languages/fr.lang.php | 7 - plugins/box/sitemap/languages/hu.lang.php | 7 - plugins/box/sitemap/languages/it.lang.php | 7 - plugins/box/sitemap/languages/ja.lang.php | 7 - plugins/box/sitemap/languages/ka-ge.lang.php | 7 - plugins/box/sitemap/languages/lt.lang.php | 7 - plugins/box/sitemap/languages/nl.lang.php | 7 - plugins/box/sitemap/languages/pl.lang.php | 7 - plugins/box/sitemap/languages/pt-br.lang.php | 7 - plugins/box/sitemap/languages/ru.lang.php | 7 - plugins/box/sitemap/languages/sk.lang.php | 7 - plugins/box/sitemap/languages/sr.lang.php | 7 - plugins/box/sitemap/languages/tr.lang.php | 7 - plugins/box/sitemap/languages/uk.lang.php | 7 - plugins/box/sitemap/languages/zh-cn.lang.php | 7 - plugins/box/sitemap/sitemap.plugin.php | 121 - .../box/sitemap/views/frontend/index.view.php | 47 - .../snippets/install/snippets.manifest.xml | 11 - plugins/box/snippets/js/.htaccess | 2 - plugins/box/snippets/js/snippets.js | 18 - plugins/box/snippets/languages/cs.lang.php | 30 - plugins/box/snippets/languages/de.lang.php | 31 - plugins/box/snippets/languages/en.lang.php | 30 - plugins/box/snippets/languages/es.lang.php | 30 - plugins/box/snippets/languages/fa.lang.php | 30 - plugins/box/snippets/languages/fr.lang.php | 30 - plugins/box/snippets/languages/hu.lang.php | 30 - plugins/box/snippets/languages/id.lang.php | 29 - plugins/box/snippets/languages/it.lang.php | 30 - plugins/box/snippets/languages/ja.lang.php | 29 - plugins/box/snippets/languages/ka-ge.lang.php | 30 - plugins/box/snippets/languages/lt.lang.php | 29 - plugins/box/snippets/languages/nl.lang.php | 31 - plugins/box/snippets/languages/pl.lang.php | 30 - plugins/box/snippets/languages/pt-br.lang.php | 31 - plugins/box/snippets/languages/ru.lang.php | 30 - plugins/box/snippets/languages/sk.lang.php | 30 - plugins/box/snippets/languages/sr.lang.php | 30 - plugins/box/snippets/languages/tr.lang.php | 29 - plugins/box/snippets/languages/uk.lang.php | 30 - plugins/box/snippets/languages/zh-cn.lang.php | 29 - plugins/box/snippets/snippets.admin.php | 145 - plugins/box/snippets/snippets.plugin.php | 101 - .../box/snippets/views/backend/add.view.php | 35 - .../box/snippets/views/backend/edit.view.php | 47 - .../box/snippets/views/backend/index.view.php | 66 - .../box/system/install/system.manifest.xml | 11 - plugins/box/system/languages/cs.lang.php | 80 - plugins/box/system/languages/de.lang.php | 82 - plugins/box/system/languages/en.lang.php | 83 - plugins/box/system/languages/es.lang.php | 82 - plugins/box/system/languages/fa.lang.php | 79 - plugins/box/system/languages/fr.lang.php | 83 - plugins/box/system/languages/hu.lang.php | 83 - plugins/box/system/languages/id.lang.php | 82 - plugins/box/system/languages/it.lang.php | 78 - plugins/box/system/languages/ja.lang.php | 80 - plugins/box/system/languages/ka-ge.lang.php | 82 - plugins/box/system/languages/lt.lang.php | 80 - plugins/box/system/languages/nl.lang.php | 81 - plugins/box/system/languages/pl.lang.php | 83 - plugins/box/system/languages/pt-br.lang.php | 77 - plugins/box/system/languages/ru.lang.php | 82 - plugins/box/system/languages/sk.lang.php | 80 - plugins/box/system/languages/sr.lang.php | 82 - plugins/box/system/languages/tr.lang.php | 83 - plugins/box/system/languages/uk.lang.php | 83 - plugins/box/system/languages/zh-cn.lang.php | 81 - plugins/box/system/system.admin.php | 156 - plugins/box/system/system.plugin.php | 37 - .../box/system/views/backend/index.view.php | 121 - .../box/themes/install/themes.manifest.xml | 11 - plugins/box/themes/languages/cs.lang.php | 52 - plugins/box/themes/languages/de.lang.php | 52 - plugins/box/themes/languages/en.lang.php | 53 - plugins/box/themes/languages/es.lang.php | 56 - plugins/box/themes/languages/fa.lang.php | 51 - plugins/box/themes/languages/fr.lang.php | 50 - plugins/box/themes/languages/hu.lang.php | 51 - plugins/box/themes/languages/id.lang.php | 52 - plugins/box/themes/languages/it.lang.php | 52 - plugins/box/themes/languages/ja.lang.php | 51 - plugins/box/themes/languages/ka-ge.lang.php | 54 - plugins/box/themes/languages/lt.lang.php | 52 - plugins/box/themes/languages/nl.lang.php | 51 - plugins/box/themes/languages/pl.lang.php | 52 - plugins/box/themes/languages/pt-br.lang.php | 52 - plugins/box/themes/languages/ru.lang.php | 54 - plugins/box/themes/languages/sk.lang.php | 52 - plugins/box/themes/languages/sr.lang.php | 50 - plugins/box/themes/languages/tr.lang.php | 53 - plugins/box/themes/languages/uk.lang.php | 54 - plugins/box/themes/languages/zh-cn.lang.php | 51 - plugins/box/themes/themes.admin.php | 646 -- plugins/box/themes/themes.plugin.php | 191 - plugins/box/themes/views/backend/add.view.php | 46 - .../box/themes/views/backend/edit.view.php | 62 - .../box/themes/views/backend/index.view.php | 217 - plugins/box/users/install/users.manifest.xml | 11 - plugins/box/users/js/.htaccess | 2 - plugins/box/users/js/users.js | 20 - plugins/box/users/languages/cs.lang.php | 69 - plugins/box/users/languages/de.lang.php | 69 - plugins/box/users/languages/en.lang.php | 69 - plugins/box/users/languages/es.lang.php | 69 - plugins/box/users/languages/fa.lang.php | 69 - plugins/box/users/languages/fr.lang.php | 69 - plugins/box/users/languages/hu.lang.php | 69 - plugins/box/users/languages/id.lang.php | 68 - plugins/box/users/languages/it.lang.php | 66 - plugins/box/users/languages/ja.lang.php | 68 - plugins/box/users/languages/ka-ge.lang.php | 67 - plugins/box/users/languages/lt.lang.php | 68 - plugins/box/users/languages/nl.lang.php | 69 - plugins/box/users/languages/pl.lang.php | 69 - plugins/box/users/languages/pt-br.lang.php | 69 - plugins/box/users/languages/ru.lang.php | 67 - plugins/box/users/languages/sk.lang.php | 69 - plugins/box/users/languages/sr.lang.php | 69 - plugins/box/users/languages/tr.lang.php | 68 - plugins/box/users/languages/uk.lang.php | 67 - plugins/box/users/languages/zh-cn.lang.php | 68 - plugins/box/users/users.admin.php | 234 - plugins/box/users/users.plugin.php | 512 -- plugins/box/users/views/backend/add.view.php | 61 - plugins/box/users/views/backend/edit.view.php | 133 - .../box/users/views/backend/index.view.php | 58 - .../box/users/views/frontend/edit.view.php | 52 - .../box/users/views/frontend/index.view.php | 12 - .../box/users/views/frontend/login.view.php | 27 - .../views/frontend/password_reset.view.php | 39 - .../box/users/views/frontend/profile.view.php | 18 - .../views/frontend/registration.view.php | 43 - .../users/views/frontend/userspanel.view.php | 15 - plugins/captcha/captcha.plugin.php | 48 - plugins/captcha/crypt/.htaccess | 2 - plugins/captcha/crypt/cryptographp.cfg.php | 89 - plugins/captcha/crypt/cryptographp.fct.php | 39 - plugins/captcha/crypt/cryptographp.inc.php | 246 - plugins/captcha/crypt/cryptographp.php | 5 - plugins/captcha/crypt/fonts/index.html | 0 plugins/captcha/crypt/fonts/luggerbu.ttf | Bin 28348 -> 0 bytes plugins/captcha/crypt/fonts/luggerbu.txt | 24 - plugins/captcha/crypt/images/.htaccess | 2 - plugins/captcha/crypt/images/Thumbs.db | Bin 19968 -> 0 bytes plugins/captcha/crypt/images/erreur1.png | Bin 412 -> 0 bytes plugins/captcha/crypt/images/erreur2.png | Bin 372 -> 0 bytes plugins/captcha/crypt/images/erreur3.png | Bin 559 -> 0 bytes plugins/captcha/crypt/images/index.html | 0 plugins/captcha/crypt/images/reload.png | Bin 256 -> 0 bytes plugins/captcha/crypt/index.html | 0 plugins/captcha/crypt/index.php | 0 plugins/captcha/install/captcha.install.php | 4 - plugins/captcha/install/captcha.manifest.xml | 11 - plugins/captcha/install/captcha.uninstall.php | 4 - plugins/captcha/languages/cs.lang.php | 9 - plugins/captcha/languages/de.lang.php | 9 - plugins/captcha/languages/en.lang.php | 9 - plugins/captcha/languages/es.lang.php | 9 - plugins/captcha/languages/fa.lang.php | 9 - plugins/captcha/languages/fr.lang.php | 9 - plugins/captcha/languages/id.lang.php | 9 - plugins/captcha/languages/it.lang.php | 9 - plugins/captcha/languages/ka-ge.lang.php | 9 - plugins/captcha/languages/lt.lang.php | 9 - plugins/captcha/languages/nl.lang.php | 9 - plugins/captcha/languages/pl.lang.php | 9 - plugins/captcha/languages/pt-br.lang.php | 9 - plugins/captcha/languages/ru.lang.php | 9 - plugins/captcha/languages/sk.lang.php | 9 - plugins/captcha/languages/sr.lang.php | 9 - plugins/captcha/languages/tr.lang.php | 9 - plugins/captcha/languages/uk.lang.php | 9 - plugins/captcha/languages/zh-cn.lang.php | 9 - plugins/codemirror/LICENSE | 674 -- plugins/codemirror/README.md | 4 - plugins/codemirror/codemirror.plugin.php | 86 - plugins/codemirror/codemirror/.gitattributes | 8 - plugins/codemirror/codemirror/.gitignore | 6 - plugins/codemirror/codemirror/.htaccess | 2 - plugins/codemirror/codemirror/.travis.yml | 3 - plugins/codemirror/codemirror/AUTHORS | 255 - plugins/codemirror/codemirror/CONTRIBUTING.md | 72 - plugins/codemirror/codemirror/LICENSE | 19 - plugins/codemirror/codemirror/README.md | 11 - .../codemirror/addon/comment/comment.js | 145 - .../addon/comment/continuecomment.js | 54 - .../codemirror/addon/dialog/dialog.css | 32 - .../codemirror/addon/dialog/dialog.js | 121 - .../codemirror/addon/display/fullscreen.css | 6 - .../codemirror/addon/display/fullscreen.js | 31 - .../codemirror/addon/display/placeholder.js | 48 - .../codemirror/addon/edit/closebrackets.js | 82 - .../codemirror/addon/edit/closetag.js | 89 - .../codemirror/addon/edit/continuelist.js | 25 - .../codemirror/addon/edit/matchbrackets.js | 87 - .../codemirror/addon/edit/matchtags.js | 56 - .../codemirror/addon/edit/trailingspace.js | 15 - .../codemirror/addon/fold/brace-fold.js | 93 - .../codemirror/addon/fold/comment-fold.js | 40 - .../codemirror/addon/fold/foldcode.js | 75 - .../codemirror/addon/fold/foldgutter.css | 21 - .../codemirror/addon/fold/foldgutter.js | 124 - .../codemirror/addon/fold/indent-fold.js | 30 - .../codemirror/addon/fold/xml-fold.js | 167 - .../codemirror/addon/hint/anyword-hint.js | 34 - .../codemirror/addon/hint/css-hint.js | 50 - .../codemirror/addon/hint/html-hint.js | 337 - .../codemirror/addon/hint/javascript-hint.js | 131 - .../codemirror/addon/hint/pig-hint.js | 121 - .../codemirror/addon/hint/python-hint.js | 95 - .../codemirror/addon/hint/show-hint.css | 38 - .../codemirror/addon/hint/show-hint.js | 286 - .../codemirror/addon/hint/sql-hint.js | 105 - .../codemirror/addon/hint/xml-hint.js | 69 - .../addon/lint/coffeescript-lint.js | 27 - .../codemirror/addon/lint/css-lint.js | 19 - .../codemirror/addon/lint/javascript-lint.js | 126 - .../codemirror/addon/lint/json-lint.js | 17 - .../codemirror/codemirror/addon/lint/lint.css | 73 - .../codemirror/codemirror/addon/lint/lint.js | 203 - .../addon/merge/dep/diff_match_patch.js | 50 - .../codemirror/addon/merge/merge.css | 92 - .../codemirror/addon/merge/merge.js | 474 -- .../codemirror/addon/mode/loadmode.js | 51 - .../codemirror/addon/mode/multiplex.js | 101 - .../codemirror/addon/mode/multiplex_test.js | 30 - .../codemirror/addon/mode/overlay.js | 59 - .../codemirror/addon/runmode/colorize.js | 29 - .../addon/runmode/runmode-standalone.js | 136 - .../codemirror/addon/runmode/runmode.js | 56 - .../codemirror/addon/runmode/runmode.node.js | 103 - .../codemirror/addon/scroll/scrollpastend.js | 34 - .../addon/search/match-highlighter.js | 91 - .../codemirror/addon/search/search.js | 133 - .../codemirror/addon/search/searchcursor.js | 143 - .../codemirror/addon/selection/active-line.js | 39 - .../addon/selection/mark-selection.js | 108 - .../codemirror/codemirror/addon/tern/tern.css | 85 - .../codemirror/codemirror/addon/tern/tern.js | 632 -- .../codemirror/addon/tern/worker.js | 41 - .../codemirror/addon/wrap/hardwrap.js | 99 - plugins/codemirror/codemirror/bower.json | 15 - plugins/codemirror/codemirror/index.html | 192 - plugins/codemirror/codemirror/keymap/emacs.js | 387 -- plugins/codemirror/codemirror/keymap/extra.js | 43 - plugins/codemirror/codemirror/keymap/vim.js | 3703 ---------- .../codemirror/codemirror/lib/codemirror.css | 263 - .../codemirror/codemirror/lib/codemirror.js | 5944 ----------------- plugins/codemirror/codemirror/mode/apl/apl.js | 160 - .../codemirror/codemirror/mode/apl/index.html | 72 - .../codemirror/mode/asterisk/asterisk.js | 183 - .../codemirror/mode/asterisk/index.html | 154 - .../codemirror/codemirror/mode/clike/clike.js | 362 - .../codemirror/mode/clike/index.html | 195 - .../codemirror/mode/clike/scala.html | 767 --- .../codemirror/mode/clojure/clojure.js | 224 - .../codemirror/mode/clojure/index.html | 88 - .../codemirror/codemirror/mode/cobol/cobol.js | 240 - .../codemirror/mode/cobol/index.html | 210 - .../mode/coffeescript/coffeescript.js | 354 - .../codemirror/mode/coffeescript/index.html | 740 -- .../codemirror/mode/commonlisp/commonlisp.js | 105 - .../codemirror/mode/commonlisp/index.html | 177 - plugins/codemirror/codemirror/mode/css/css.js | 639 -- .../codemirror/codemirror/mode/css/index.html | 70 - .../codemirror/codemirror/mode/css/scss.html | 157 - .../codemirror/mode/css/scss_test.js | 93 - .../codemirror/codemirror/mode/css/test.js | 142 - plugins/codemirror/codemirror/mode/d/d.js | 205 - .../codemirror/codemirror/mode/d/index.html | 273 - .../codemirror/codemirror/mode/diff/diff.js | 32 - .../codemirror/mode/diff/index.html | 117 - plugins/codemirror/codemirror/mode/dtd/dtd.js | 127 - .../codemirror/codemirror/mode/dtd/index.html | 89 - plugins/codemirror/codemirror/mode/ecl/ecl.js | 192 - .../codemirror/codemirror/mode/ecl/index.html | 52 - .../codemirror/mode/eiffel/eiffel.js | 147 - .../codemirror/mode/eiffel/index.html | 430 -- .../codemirror/mode/erlang/erlang.js | 484 -- .../codemirror/mode/erlang/index.html | 75 - .../codemirror/mode/fortran/fortran.js | 173 - .../codemirror/mode/fortran/index.html | 81 - plugins/codemirror/codemirror/mode/gas/gas.js | 330 - .../codemirror/codemirror/mode/gas/index.html | 68 - plugins/codemirror/codemirror/mode/gfm/gfm.js | 97 - .../codemirror/codemirror/mode/gfm/index.html | 82 - .../codemirror/codemirror/mode/gfm/test.js | 112 - .../codemirror/mode/gherkin/gherkin.js | 168 - .../codemirror/mode/gherkin/index.html | 48 - plugins/codemirror/codemirror/mode/go/go.js | 168 - .../codemirror/codemirror/mode/go/index.html | 85 - .../codemirror/mode/groovy/groovy.js | 211 - .../codemirror/mode/groovy/index.html | 84 - .../codemirror/codemirror/mode/haml/haml.js | 153 - .../codemirror/mode/haml/index.html | 79 - .../codemirror/codemirror/mode/haml/test.js | 94 - .../codemirror/mode/haskell/haskell.js | 250 - .../codemirror/mode/haskell/index.html | 73 - .../codemirror/codemirror/mode/haxe/haxe.js | 429 -- .../codemirror/mode/haxe/index.html | 103 - .../mode/htmlembedded/htmlembedded.js | 73 - .../codemirror/mode/htmlembedded/index.html | 60 - .../codemirror/mode/htmlmixed/htmlmixed.js | 104 - .../codemirror/mode/htmlmixed/index.html | 85 - .../codemirror/codemirror/mode/http/http.js | 98 - .../codemirror/mode/http/index.html | 45 - plugins/codemirror/codemirror/mode/index.html | 114 - .../codemirror/mode/jade/index.html | 66 - .../codemirror/codemirror/mode/jade/jade.js | 90 - .../codemirror/mode/javascript/index.html | 107 - .../codemirror/mode/javascript/javascript.js | 617 -- .../codemirror/mode/javascript/test.js | 72 - .../mode/javascript/typescript.html | 61 - .../codemirror/mode/jinja2/index.html | 50 - .../codemirror/mode/jinja2/jinja2.js | 42 - .../codemirror/mode/julia/index.html | 187 - .../codemirror/codemirror/mode/julia/julia.js | 262 - .../codemirror/mode/less/index.html | 753 --- .../codemirror/codemirror/mode/less/less.js | 346 - .../codemirror/mode/livescript/index.html | 459 -- .../codemirror/mode/livescript/livescript.js | 267 - .../codemirror/mode/livescript/livescript.ls | 266 - .../codemirror/codemirror/mode/lua/index.html | 86 - plugins/codemirror/codemirror/mode/lua/lua.js | 144 - .../codemirror/mode/markdown/index.html | 359 - .../codemirror/mode/markdown/markdown.js | 560 -- .../codemirror/mode/markdown/test.js | 664 -- plugins/codemirror/codemirror/mode/meta.js | 91 - .../codemirror/mode/mirc/index.html | 161 - .../codemirror/codemirror/mode/mirc/mirc.js | 177 - .../codemirror/mode/nginx/index.html | 181 - .../codemirror/codemirror/mode/nginx/nginx.js | 163 - .../codemirror/mode/ntriples/index.html | 45 - .../codemirror/mode/ntriples/ntriples.js | 170 - .../codemirror/mode/ocaml/index.html | 146 - .../codemirror/codemirror/mode/ocaml/ocaml.js | 116 - .../codemirror/mode/octave/index.html | 95 - .../codemirror/mode/octave/octave.js | 118 - .../codemirror/mode/pascal/index.html | 61 - .../codemirror/mode/pascal/pascal.js | 94 - .../codemirror/mode/pegjs/index.html | 66 - .../codemirror/codemirror/mode/pegjs/pegjs.js | 103 - .../codemirror/mode/perl/index.html | 75 - .../codemirror/codemirror/mode/perl/perl.js | 816 --- .../codemirror/codemirror/mode/php/index.html | 62 - plugins/codemirror/codemirror/mode/php/php.js | 132 - .../codemirror/codemirror/mode/pig/index.html | 55 - plugins/codemirror/codemirror/mode/pig/pig.js | 171 - .../codemirror/mode/properties/index.html | 53 - .../codemirror/mode/properties/properties.js | 63 - .../codemirror/mode/python/index.html | 187 - .../codemirror/mode/python/python.js | 368 - .../codemirror/codemirror/mode/q/index.html | 144 - plugins/codemirror/codemirror/mode/q/q.js | 124 - .../codemirror/codemirror/mode/r/index.html | 86 - plugins/codemirror/codemirror/mode/r/r.js | 141 - .../codemirror/mode/rpm/changes/changes.js | 19 - .../codemirror/mode/rpm/changes/index.html | 67 - .../codemirror/mode/rpm/spec/index.html | 114 - .../codemirror/mode/rpm/spec/spec.css | 5 - .../codemirror/mode/rpm/spec/spec.js | 66 - .../codemirror/codemirror/mode/rst/index.html | 534 -- plugins/codemirror/codemirror/mode/rst/rst.js | 560 -- .../codemirror/mode/ruby/index.html | 185 - .../codemirror/codemirror/mode/ruby/ruby.js | 247 - .../codemirror/mode/rust/index.html | 61 - .../codemirror/codemirror/mode/rust/rust.js | 436 -- .../codemirror/mode/sass/index.html | 66 - .../codemirror/codemirror/mode/sass/sass.js | 330 - .../codemirror/mode/scheme/index.html | 77 - .../codemirror/mode/scheme/scheme.js | 232 - .../codemirror/mode/shell/index.html | 66 - .../codemirror/codemirror/mode/shell/shell.js | 118 - .../codemirror/mode/sieve/index.html | 93 - .../codemirror/codemirror/mode/sieve/sieve.js | 183 - .../codemirror/mode/smalltalk/index.html | 68 - .../codemirror/mode/smalltalk/smalltalk.js | 151 - .../codemirror/mode/smarty/index.html | 136 - .../codemirror/mode/smarty/smarty.js | 205 - .../codemirror/mode/smartymixed/index.html | 114 - .../mode/smartymixed/smartymixed.js | 175 - .../codemirror/mode/sparql/index.html | 54 - .../codemirror/mode/sparql/sparql.js | 145 - .../codemirror/codemirror/mode/sql/index.html | 75 - plugins/codemirror/codemirror/mode/sql/sql.js | 365 - .../codemirror/mode/stex/index.html | 110 - .../codemirror/codemirror/mode/stex/stex.js | 246 - .../codemirror/codemirror/mode/stex/test.js | 120 - .../codemirror/codemirror/mode/tcl/index.html | 143 - plugins/codemirror/codemirror/mode/tcl/tcl.js | 131 - .../codemirror/mode/tiddlywiki/index.html | 155 - .../codemirror/mode/tiddlywiki/tiddlywiki.css | 14 - .../codemirror/mode/tiddlywiki/tiddlywiki.js | 353 - .../codemirror/mode/tiki/index.html | 95 - .../codemirror/codemirror/mode/tiki/tiki.css | 26 - .../codemirror/codemirror/mode/tiki/tiki.js | 308 - .../codemirror/mode/toml/index.html | 73 - .../codemirror/codemirror/mode/toml/toml.js | 71 - .../codemirror/mode/turtle/index.html | 51 - .../codemirror/mode/turtle/turtle.js | 145 - .../codemirror/codemirror/mode/vb/index.html | 103 - plugins/codemirror/codemirror/mode/vb/vb.js | 259 - .../codemirror/mode/vbscript/index.html | 55 - .../codemirror/mode/vbscript/vbscript.js | 334 - .../codemirror/mode/velocity/index.html | 119 - .../codemirror/mode/velocity/velocity.js | 186 - .../codemirror/mode/verilog/index.html | 132 - .../codemirror/mode/verilog/verilog.js | 182 - .../codemirror/codemirror/mode/xml/index.html | 57 - plugins/codemirror/codemirror/mode/xml/xml.js | 345 - .../codemirror/mode/xquery/index.html | 210 - .../codemirror/codemirror/mode/xquery/test.js | 64 - .../codemirror/mode/xquery/xquery.js | 432 -- .../codemirror/mode/yaml/index.html | 80 - .../codemirror/codemirror/mode/yaml/yaml.js | 97 - .../codemirror/codemirror/mode/z80/index.html | 52 - plugins/codemirror/codemirror/mode/z80/z80.js | 85 - plugins/codemirror/codemirror/package.json | 19 - .../codemirror/codemirror/theme/3024-day.css | 34 - .../codemirror/theme/3024-night.css | 34 - .../codemirror/theme/ambiance-mobile.css | 5 - .../codemirror/codemirror/theme/ambiance.css | 75 - .../codemirror/theme/base16-dark.css | 34 - .../codemirror/theme/base16-light.css | 34 - .../codemirror/theme/blackboard.css | 28 - .../codemirror/codemirror/theme/cobalt.css | 21 - .../codemirror/codemirror/theme/eclipse.css | 23 - .../codemirror/codemirror/theme/elegant.css | 13 - .../codemirror/theme/erlang-dark.css | 30 - .../codemirror/theme/lesser-dark.css | 47 - plugins/codemirror/codemirror/theme/mbo.css | 37 - .../codemirror/codemirror/theme/mdn-like.css | 44 - .../codemirror/codemirror/theme/midnight.css | 43 - .../codemirror/codemirror/theme/monokai.css | 29 - plugins/codemirror/codemirror/theme/neat.css | 12 - plugins/codemirror/codemirror/theme/night.css | 24 - .../codemirror/theme/paraiso-dark.css | 34 - .../codemirror/theme/paraiso-light.css | 34 - .../codemirror/codemirror/theme/rubyblue.css | 23 - .../codemirror/codemirror/theme/solarized.css | 180 - .../codemirror/theme/the-matrix.css | 26 - .../theme/tomorrow-night-eighties.css | 34 - .../codemirror/codemirror/theme/twilight.css | 28 - .../codemirror/theme/vibrant-ink.css | 30 - .../codemirror/codemirror/theme/xq-dark.css | 49 - .../codemirror/codemirror/theme/xq-light.css | 43 - .../install/codemirror.manifest.xml | 11 - plugins/markdown/README.md | 4 - .../markdown/install/markdown.manifest.xml | 11 - plugins/markdown/markdown.plugin.php | 33 - plugins/markdown/php-markdown/License.md | 36 - .../php-markdown/Michelf/Markdown.php | 3174 --------- .../php-markdown/Michelf/MarkdownExtra.php | 36 - plugins/markdown/php-markdown/Readme.md | 259 - plugins/markdown/php-markdown/Readme.php | 31 - plugins/markdown/php-markdown/composer.json | 31 - .../markitup/install/markitup.manifest.xml | 11 - plugins/markitup/markitup.plugin.php | 49 - plugins/markitup/markitup/.htaccess | 2 - plugins/markitup/markitup/jquery.markitup.js | 665 -- .../markitup/sets/html/images/bold.png | Bin 244 -> 0 bytes .../markitup/sets/html/images/clean.png | Bin 476 -> 0 bytes .../markitup/sets/html/images/colors.png | Bin 151 -> 0 bytes .../markitup/markitup/sets/html/images/h1.png | Bin 211 -> 0 bytes .../markitup/markitup/sets/html/images/h2.png | Bin 240 -> 0 bytes .../markitup/markitup/sets/html/images/h3.png | Bin 239 -> 0 bytes .../markitup/markitup/sets/html/images/h4.png | Bin 227 -> 0 bytes .../markitup/markitup/sets/html/images/h5.png | Bin 239 -> 0 bytes .../markitup/markitup/sets/html/images/h6.png | Bin 241 -> 0 bytes .../markitup/sets/html/images/italic.png | Bin 160 -> 0 bytes .../markitup/sets/html/images/link.png | Bin 283 -> 0 bytes .../markitup/sets/html/images/list-bullet.png | Bin 270 -> 0 bytes .../markitup/sets/html/images/list-item.png | Bin 146 -> 0 bytes .../sets/html/images/list-numeric.png | Bin 296 -> 0 bytes .../markitup/sets/html/images/paragraph.png | Bin 302 -> 0 bytes .../markitup/sets/html/images/picture.png | Bin 553 -> 0 bytes .../markitup/sets/html/images/preview.png | Bin 468 -> 0 bytes .../markitup/sets/html/images/stroke.png | Bin 212 -> 0 bytes plugins/markitup/markitup/sets/html/set.js | 77 - plugins/markitup/markitup/sets/html/style.css | 174 - .../markitup/skins/simple/images/handle.png | Bin 125 -> 0 bytes .../markitup/skins/simple/images/menu.png | Bin 112 -> 0 bytes .../markitup/skins/simple/images/submenu.png | Bin 112 -> 0 bytes .../markitup/markitup/skins/simple/style.css | 119 - .../markitup/markitup/templates/preview.css | 2 - .../markitup/markitup/templates/preview.html | 11 - plugins/sandbox/install/sandbox.install.php | 5 - plugins/sandbox/install/sandbox.manifest.xml | 11 - plugins/sandbox/install/sandbox.uninstall.php | 5 - plugins/sandbox/languages/cs.lang.php | 10 - plugins/sandbox/languages/de.lang.php | 10 - plugins/sandbox/languages/en.lang.php | 10 - plugins/sandbox/languages/es.lang.php | 10 - plugins/sandbox/languages/fa.lang.php | 10 - plugins/sandbox/languages/fr.lang.php | 10 - plugins/sandbox/languages/id.lang.php | 10 - plugins/sandbox/languages/it.lang.php | 10 - plugins/sandbox/languages/ka-ge.lang.php | 10 - plugins/sandbox/languages/lt.lang.php | 10 - plugins/sandbox/languages/nl.lang.php | 10 - plugins/sandbox/languages/pl.lang.php | 10 - plugins/sandbox/languages/pt-br.lang.php | 10 - plugins/sandbox/languages/ru.lang.php | 10 - plugins/sandbox/languages/sk.lang.php | 10 - plugins/sandbox/languages/sr.lang.php | 10 - plugins/sandbox/languages/tr.lang.php | 10 - plugins/sandbox/languages/uk.lang.php | 10 - plugins/sandbox/languages/zh-cn.lang.php | 10 - plugins/sandbox/sandbox.admin.php | 93 - plugins/sandbox/sandbox.plugin.php | 82 - plugins/sandbox/views/backend/index.view.php | 1 - plugins/sandbox/views/frontend/index.view.php | 1 - public/assets/css/bootstrap-fileupload.css | 90 - public/assets/css/bootstrap.css | 5785 ---------------- public/assets/css/bootstrap.css.map | 1 - public/assets/css/chocolat.css | 112 - public/assets/css/daterangepicker-bs3.css | 262 - public/assets/css/icheck-blue.css | 62 - public/assets/css/messenger-spinner.css | 235 - public/assets/css/messenger-theme-flat.css | 437 -- public/assets/css/messenger.css | 101 - .../fonts/glyphicons-halflings-regular.eot | Bin 20335 -> 0 bytes .../fonts/glyphicons-halflings-regular.svg | 229 - .../fonts/glyphicons-halflings-regular.ttf | Bin 41280 -> 0 bytes .../fonts/glyphicons-halflings-regular.woff | Bin 23320 -> 0 bytes public/assets/img/blue.png | Bin 2185 -> 0 bytes public/assets/img/chocolat/close.gif | Bin 64 -> 0 bytes public/assets/img/chocolat/closew.gif | Bin 64 -> 0 bytes public/assets/img/chocolat/left.gif | Bin 62 -> 0 bytes public/assets/img/chocolat/leftw.gif | Bin 61 -> 0 bytes public/assets/img/chocolat/loading.gif | Bin 59 -> 0 bytes public/assets/img/chocolat/loadingw.gif | Bin 50 -> 0 bytes public/assets/img/chocolat/right.gif | Bin 61 -> 0 bytes public/assets/img/chocolat/rightw.gif | Bin 61 -> 0 bytes public/assets/img/flags/de.png | Bin 292 -> 0 bytes public/assets/img/flags/en.png | Bin 389 -> 0 bytes public/assets/img/flags/es.png | Bin 398 -> 0 bytes public/assets/img/flags/fa.png | Bin 459 -> 0 bytes public/assets/img/flags/fr.png | Bin 356 -> 0 bytes public/assets/img/flags/hu.png | Bin 295 -> 0 bytes public/assets/img/flags/id.png | Bin 290 -> 0 bytes public/assets/img/flags/it.png | Bin 359 -> 0 bytes public/assets/img/flags/ja.png | Bin 341 -> 0 bytes public/assets/img/flags/lt.png | Bin 290 -> 0 bytes public/assets/img/flags/nl.png | Bin 295 -> 0 bytes public/assets/img/flags/pl.png | Bin 289 -> 0 bytes public/assets/img/flags/pt-br.png | Bin 515 -> 0 bytes public/assets/img/flags/ru.png | Bin 282 -> 0 bytes public/assets/img/flags/sk.png | Bin 395 -> 0 bytes public/assets/img/flags/sr.png | Bin 441 -> 0 bytes public/assets/img/flags/tr.png | Bin 489 -> 0 bytes public/assets/img/flags/uk.png | Bin 290 -> 0 bytes public/assets/img/flags/zh-cn.png | Bin 503 -> 0 bytes .../img/glyphicons-halflings-regular.eot | Bin 20290 -> 0 bytes .../img/glyphicons-halflings-regular.svg | 229 - .../img/glyphicons-halflings-regular.ttf | Bin 41236 -> 0 bytes .../img/glyphicons-halflings-regular.woff | Bin 23292 -> 0 bytes .../assets/img/glyphicons-halflings-white.png | Bin 8770 -> 0 bytes public/assets/img/glyphicons-halflings.png | Bin 12601 -> 0 bytes public/assets/img/monstra-logo-256px.png | Bin 3083 -> 0 bytes public/assets/img/monstra-logo.png | Bin 2237 -> 0 bytes public/assets/js/bootstrap-fileupload.js | 179 - public/assets/js/bootstrap.min.js | 6 - public/assets/js/daterangepicker.js | 985 --- public/assets/js/icheck.min.js | 10 - public/assets/js/jquery-2.1.0.min.map | 1 - public/assets/js/jquery.chocolat.js | 294 - public/assets/js/jquery.min.js | 4 - public/assets/js/messenger-theme-flat.js | 33 - public/assets/js/messenger.min.js | 2 - public/assets/js/moment.min.js | 6 - public/themes/default/blog-post.template.php | 31 - public/themes/default/blog.template.php | 31 - public/themes/default/css/default.css | 195 - public/themes/default/footer-links.chunk.php | 1 - public/themes/default/footer.chunk.php | 7 - public/themes/default/header.chunk.php | 92 - public/themes/default/index.template.php | 27 - public/uploads/.empty | 0 robots.txt | 5 - rss.php | 40 - sitemap.xml | 3 - storage/.htaccess | 1 - storage/blocks/.empty | 0 storage/database/menu.table.xml | 2 - storage/database/options.table.xml | 2 - storage/database/pages.table.xml | 2 - storage/database/plugins.table.xml | 2 - storage/database/users.table.xml | 2 - storage/emails/layout.email.php | 64 - storage/emails/new-password.email.php | 12 - storage/emails/new-user.email.php | 8 - storage/emails/reset-password.email.php | 17 - storage/pages/1.page.txt | 1 - storage/pages/2.page.txt | 17 - storage/pages/4.page.txt | 2 - storage/snippets/google-analytics.snippet.php | 12 - tmp/.htaccess | 3 - tmp/cache/.empty | 0 tmp/logs/.empty | 0 tmp/minify/.empty | 0 tmp/minify/.htaccess | 1 - 961 files changed, 104071 deletions(-) create mode 100644 .DS_Store delete mode 100644 .gitignore delete mode 100644 .htaccess delete mode 100755 CHANGELOG.md delete mode 100644 LICENSE.md delete mode 100644 README.md delete mode 100644 admin/index.php delete mode 100644 admin/themes/default/css/default.css delete mode 100644 admin/themes/default/index.template.php delete mode 100644 admin/themes/default/js/default.js delete mode 100644 admin/themes/default/login.template.php delete mode 100644 backups/.empty delete mode 100644 backups/.htaccess delete mode 100644 boot/defines.php delete mode 100644 engine/Alert.php delete mode 100644 engine/Monstra.php delete mode 100644 engine/Option.php delete mode 100644 engine/Plugin/Action.php delete mode 100644 engine/Plugin/Backend.php delete mode 100644 engine/Plugin/Filter.php delete mode 100644 engine/Plugin/Frontend.php delete mode 100644 engine/Plugin/I18n.php delete mode 100644 engine/Plugin/Javascript.php delete mode 100644 engine/Plugin/Navigation.php delete mode 100644 engine/Plugin/Plugin.php delete mode 100644 engine/Plugin/Stylesheet.php delete mode 100644 engine/Plugin/View.php delete mode 100644 engine/Security.php delete mode 100644 engine/Shortcode.php delete mode 100644 engine/Site.php delete mode 100644 engine/Uri.php delete mode 100644 engine/Xmldb/DB.php delete mode 100644 engine/Xmldb/Table.php delete mode 100644 engine/Xmldb/XML.php delete mode 100644 engine/_init.php delete mode 100644 engine/boot/actions.php delete mode 100644 engine/boot/defines.php delete mode 100644 engine/boot/filters.php delete mode 100644 engine/boot/shortcodes.php delete mode 100644 favicon.ico delete mode 100644 index.php delete mode 100755 install.php delete mode 100644 libraries/Gelato/Agent/Agent.php delete mode 100644 libraries/Gelato/Arr/Arr.php delete mode 100644 libraries/Gelato/Cache/Cache.php delete mode 100644 libraries/Gelato/ClassLoader/ClassLoader.php delete mode 100644 libraries/Gelato/Cookie/Cookie.php delete mode 100644 libraries/Gelato/Curl/Curl.php delete mode 100644 libraries/Gelato/Date/Date.php delete mode 100644 libraries/Gelato/Debug/Debug.php delete mode 100644 libraries/Gelato/ErrorHandler/ErrorHandler.php delete mode 100644 libraries/Gelato/ErrorHandler/Resources/Views/Errors/exception.php delete mode 100644 libraries/Gelato/ErrorHandler/Resources/Views/Errors/production.php delete mode 100644 libraries/Gelato/FileSystem/Dir.php delete mode 100644 libraries/Gelato/FileSystem/File.php delete mode 100644 libraries/Gelato/Form/Form.php delete mode 100644 libraries/Gelato/Gelato.php delete mode 100644 libraries/Gelato/Html/Html.php delete mode 100644 libraries/Gelato/Http/Request.php delete mode 100644 libraries/Gelato/Http/Response.php delete mode 100644 libraries/Gelato/Image/Image.php delete mode 100644 libraries/Gelato/Inflector/Inflector.php delete mode 100644 libraries/Gelato/Log/Log.php delete mode 100644 libraries/Gelato/Minify/MinifyCSS.php delete mode 100644 libraries/Gelato/Minify/MinifyHTML.php delete mode 100644 libraries/Gelato/Minify/MinifyJS.php delete mode 100644 libraries/Gelato/Notification/Notification.php delete mode 100644 libraries/Gelato/Number/Number.php delete mode 100644 libraries/Gelato/README.md delete mode 100644 libraries/Gelato/Registry/Registry.php delete mode 100644 libraries/Gelato/Security/Token.php delete mode 100644 libraries/Gelato/Session/Session.php delete mode 100644 libraries/Gelato/Text/Text.php delete mode 100644 libraries/Gelato/Url/Url.php delete mode 100644 libraries/Gelato/Validation/Valid.php delete mode 100644 libraries/Gelato/Zip/Zip.php delete mode 100644 libraries/Gelato/_logs/.empty delete mode 100644 libraries/Gelato/changelog.txt delete mode 100644 libraries/Gelato/license.txt delete mode 100644 libraries/Idiorm/ORM.php delete mode 100644 libraries/PHPMailer/PHPMailer.php delete mode 100644 plugins/.htaccess delete mode 100644 plugins/blog/README.md delete mode 100644 plugins/blog/blog.plugin.php delete mode 100644 plugins/blog/install/blog.manifest.xml delete mode 100644 plugins/blog/languages/en.lang.php delete mode 100644 plugins/blog/languages/es.lang.php delete mode 100644 plugins/blog/languages/pl.lang.php delete mode 100644 plugins/blog/languages/ru.lang.php delete mode 100644 plugins/blog/languages/sr.lang.php delete mode 100644 plugins/blog/languages/tr.lang.php delete mode 100644 plugins/blog/languages/uk.lang.php delete mode 100644 plugins/blog/rss.php delete mode 100644 plugins/blog/views/frontend/block.view.php delete mode 100644 plugins/blog/views/frontend/breadcrumbs.view.php delete mode 100644 plugins/blog/views/frontend/index.view.php delete mode 100644 plugins/blog/views/frontend/pager.view.php delete mode 100644 plugins/blog/views/frontend/related_posts.view.php delete mode 100644 plugins/blog/views/frontend/tags.view.php delete mode 100755 plugins/box/backup/backup.admin.php delete mode 100644 plugins/box/backup/backup.plugin.php delete mode 100644 plugins/box/backup/install/backup.manifest.xml delete mode 100644 plugins/box/backup/languages/cs.lang.php delete mode 100644 plugins/box/backup/languages/de.lang.php delete mode 100644 plugins/box/backup/languages/en.lang.php delete mode 100644 plugins/box/backup/languages/es.lang.php delete mode 100644 plugins/box/backup/languages/fa.lang.php delete mode 100644 plugins/box/backup/languages/fr.lang.php delete mode 100644 plugins/box/backup/languages/hu.lang.php delete mode 100644 plugins/box/backup/languages/id.lang.php delete mode 100644 plugins/box/backup/languages/it.lang.php delete mode 100644 plugins/box/backup/languages/ja.lang.php delete mode 100644 plugins/box/backup/languages/lt.lang.php delete mode 100644 plugins/box/backup/languages/nl.lang.php delete mode 100644 plugins/box/backup/languages/pl.lang.php delete mode 100644 plugins/box/backup/languages/pt-br.lang.php delete mode 100644 plugins/box/backup/languages/ru.lang.php delete mode 100644 plugins/box/backup/languages/sk.lang.php delete mode 100644 plugins/box/backup/languages/sr.lang.php delete mode 100644 plugins/box/backup/languages/tr.lang.php delete mode 100644 plugins/box/backup/languages/uk.lang.php delete mode 100644 plugins/box/backup/languages/zh-cn.lang.php delete mode 100755 plugins/box/backup/views/backend/index.view.php delete mode 100755 plugins/box/blocks/blocks.admin.php delete mode 100644 plugins/box/blocks/blocks.plugin.php delete mode 100644 plugins/box/blocks/install/blocks.manifest.xml delete mode 100644 plugins/box/blocks/js/.htaccess delete mode 100644 plugins/box/blocks/js/blocks.js delete mode 100644 plugins/box/blocks/languages/cs.lang.php delete mode 100644 plugins/box/blocks/languages/de.lang.php delete mode 100644 plugins/box/blocks/languages/en.lang.php delete mode 100644 plugins/box/blocks/languages/es.lang.php delete mode 100644 plugins/box/blocks/languages/fa.lang.php delete mode 100644 plugins/box/blocks/languages/fr.lang.php delete mode 100644 plugins/box/blocks/languages/hu.lang.php delete mode 100644 plugins/box/blocks/languages/id.lang.php delete mode 100644 plugins/box/blocks/languages/it.lang.php delete mode 100644 plugins/box/blocks/languages/ja.lang.php delete mode 100644 plugins/box/blocks/languages/ka-ge.lang.php delete mode 100644 plugins/box/blocks/languages/lt.lang.php delete mode 100644 plugins/box/blocks/languages/nl.lang.php delete mode 100644 plugins/box/blocks/languages/pl.lang.php delete mode 100644 plugins/box/blocks/languages/pt-br.lang.php delete mode 100644 plugins/box/blocks/languages/ru.lang.php delete mode 100644 plugins/box/blocks/languages/sk.lang.php delete mode 100644 plugins/box/blocks/languages/sr.lang.php delete mode 100644 plugins/box/blocks/languages/tr.lang.php delete mode 100644 plugins/box/blocks/languages/uk.lang.php delete mode 100644 plugins/box/blocks/languages/zh-cn.lang.php delete mode 100644 plugins/box/blocks/views/backend/add.view.php delete mode 100644 plugins/box/blocks/views/backend/edit.view.php delete mode 100755 plugins/box/blocks/views/backend/index.view.php delete mode 100644 plugins/box/dashboard/dashboard.admin.php delete mode 100644 plugins/box/dashboard/dashboard.plugin.php delete mode 100644 plugins/box/dashboard/install/dashboard.manifest.xml delete mode 100644 plugins/box/dashboard/js/.htaccess delete mode 100644 plugins/box/dashboard/js/ganalytics.js delete mode 100644 plugins/box/dashboard/languages/cs.lang.php delete mode 100644 plugins/box/dashboard/languages/de.lang.php delete mode 100644 plugins/box/dashboard/languages/en.lang.php delete mode 100644 plugins/box/dashboard/languages/es.lang.php delete mode 100644 plugins/box/dashboard/languages/ka-ge.lang.php delete mode 100644 plugins/box/dashboard/languages/pl.lang.php delete mode 100644 plugins/box/dashboard/languages/ru.lang.php delete mode 100644 plugins/box/dashboard/languages/sr.lang.php delete mode 100644 plugins/box/dashboard/languages/tr.lang.php delete mode 100644 plugins/box/dashboard/languages/uk.lang.php delete mode 100644 plugins/box/dashboard/views/backend/ga.view.php delete mode 100644 plugins/box/dashboard/views/backend/index.view.php delete mode 100644 plugins/box/editor/editor.plugin.php delete mode 100644 plugins/box/editor/install/editor.manifest.xml delete mode 100644 plugins/box/editor/languages/cs.lang.php delete mode 100644 plugins/box/editor/languages/de.lang.php delete mode 100644 plugins/box/editor/languages/en.lang.php delete mode 100644 plugins/box/editor/languages/es.lang.php delete mode 100644 plugins/box/editor/languages/fa.lang.php delete mode 100644 plugins/box/editor/languages/fr.lang.php delete mode 100644 plugins/box/editor/languages/hu.lang.php delete mode 100644 plugins/box/editor/languages/it.lang.php delete mode 100644 plugins/box/editor/languages/ja.lang.php delete mode 100644 plugins/box/editor/languages/ka-ge.lang.php delete mode 100644 plugins/box/editor/languages/lt.lang.php delete mode 100644 plugins/box/editor/languages/nl.lang.php delete mode 100644 plugins/box/editor/languages/pl.lang.php delete mode 100644 plugins/box/editor/languages/pt-br.lang.php delete mode 100644 plugins/box/editor/languages/ru.lang.php delete mode 100644 plugins/box/editor/languages/sk.lang.php delete mode 100644 plugins/box/editor/languages/sr.lang.php delete mode 100644 plugins/box/editor/languages/tr.lang.php delete mode 100644 plugins/box/editor/languages/uk.lang.php delete mode 100644 plugins/box/editor/languages/zh-cn.lang.php delete mode 100644 plugins/box/emails/css/.htaccess delete mode 100644 plugins/box/emails/css/inc.css delete mode 100644 plugins/box/emails/emails.admin.php delete mode 100644 plugins/box/emails/emails.plugin.php delete mode 100644 plugins/box/emails/install/emails.manifest.xml delete mode 100644 plugins/box/emails/languages/cs.lang.php delete mode 100644 plugins/box/emails/languages/de.lang.php delete mode 100644 plugins/box/emails/languages/en.lang.php delete mode 100644 plugins/box/emails/languages/es.lang.php delete mode 100644 plugins/box/emails/languages/ka-ge.lang.php delete mode 100644 plugins/box/emails/languages/pl.lang.php delete mode 100644 plugins/box/emails/languages/ru.lang.php delete mode 100644 plugins/box/emails/languages/sr.lang.php delete mode 100644 plugins/box/emails/languages/tr.lang.php delete mode 100644 plugins/box/emails/languages/uk.lang.php delete mode 100644 plugins/box/emails/views/backend/edit.view.php delete mode 100644 plugins/box/emails/views/backend/index.view.php delete mode 100644 plugins/box/emails/views/emails/email_layout.view.php delete mode 100644 plugins/box/filesmanager/css/.htaccess delete mode 100644 plugins/box/filesmanager/css/style.css delete mode 100755 plugins/box/filesmanager/filesmanager.admin.php delete mode 100644 plugins/box/filesmanager/filesmanager.plugin.php delete mode 100644 plugins/box/filesmanager/install/filesmanager.manifest.xml delete mode 100644 plugins/box/filesmanager/js/.htaccess delete mode 100644 plugins/box/filesmanager/js/filesmanager.js delete mode 100644 plugins/box/filesmanager/js/fileuploader.js delete mode 100644 plugins/box/filesmanager/languages/cs.lang.php delete mode 100644 plugins/box/filesmanager/languages/de.lang.php delete mode 100644 plugins/box/filesmanager/languages/en.lang.php delete mode 100644 plugins/box/filesmanager/languages/es.lang.php delete mode 100644 plugins/box/filesmanager/languages/fa.lang.php delete mode 100644 plugins/box/filesmanager/languages/fr.lang.php delete mode 100644 plugins/box/filesmanager/languages/hu.lang.php delete mode 100644 plugins/box/filesmanager/languages/id.lang.php delete mode 100644 plugins/box/filesmanager/languages/it.lang.php delete mode 100644 plugins/box/filesmanager/languages/ja.lang.php delete mode 100644 plugins/box/filesmanager/languages/ka-ge.lang.php delete mode 100644 plugins/box/filesmanager/languages/lt.lang.php delete mode 100644 plugins/box/filesmanager/languages/nl.lang.php delete mode 100644 plugins/box/filesmanager/languages/pl.lang.php delete mode 100644 plugins/box/filesmanager/languages/pt-br.lang.php delete mode 100644 plugins/box/filesmanager/languages/ru.lang.php delete mode 100644 plugins/box/filesmanager/languages/sk.lang.php delete mode 100644 plugins/box/filesmanager/languages/sr.lang.php delete mode 100644 plugins/box/filesmanager/languages/tr.lang.php delete mode 100644 plugins/box/filesmanager/languages/uk.lang.php delete mode 100644 plugins/box/filesmanager/languages/zh-cn.lang.php delete mode 100755 plugins/box/filesmanager/views/backend/index.view.php delete mode 100644 plugins/box/information/information.admin.php delete mode 100644 plugins/box/information/information.plugin.php delete mode 100644 plugins/box/information/install/information.manifest.xml delete mode 100644 plugins/box/information/languages/cs.lang.php delete mode 100644 plugins/box/information/languages/de.lang.php delete mode 100644 plugins/box/information/languages/en.lang.php delete mode 100644 plugins/box/information/languages/es.lang.php delete mode 100644 plugins/box/information/languages/fa.lang.php delete mode 100644 plugins/box/information/languages/fr.lang.php delete mode 100644 plugins/box/information/languages/hu.lang.php delete mode 100644 plugins/box/information/languages/id.lang.php delete mode 100644 plugins/box/information/languages/it.lang.php delete mode 100644 plugins/box/information/languages/ja.lang.php delete mode 100644 plugins/box/information/languages/ka-ge.lang.php delete mode 100644 plugins/box/information/languages/lt.lang.php delete mode 100644 plugins/box/information/languages/nl.lang.php delete mode 100644 plugins/box/information/languages/pl.lang.php delete mode 100644 plugins/box/information/languages/pt-br.lang.php delete mode 100644 plugins/box/information/languages/ru.lang.php delete mode 100644 plugins/box/information/languages/sk.lang.php delete mode 100644 plugins/box/information/languages/sr.lang.php delete mode 100644 plugins/box/information/languages/tr.lang.php delete mode 100644 plugins/box/information/languages/uk.lang.php delete mode 100644 plugins/box/information/languages/zh-cn.lang.php delete mode 100644 plugins/box/information/views/backend/index.view.php delete mode 100644 plugins/box/menu/install/menu.manifest.xml delete mode 100644 plugins/box/menu/js/.htaccess delete mode 100644 plugins/box/menu/js/menu.js delete mode 100644 plugins/box/menu/languages/cs.lang.php delete mode 100644 plugins/box/menu/languages/de.lang.php delete mode 100644 plugins/box/menu/languages/en.lang.php delete mode 100644 plugins/box/menu/languages/es.lang.php delete mode 100644 plugins/box/menu/languages/fa.lang.php delete mode 100644 plugins/box/menu/languages/fr.lang.php delete mode 100644 plugins/box/menu/languages/hu.lang.php delete mode 100644 plugins/box/menu/languages/id.lang.php delete mode 100644 plugins/box/menu/languages/it.lang.php delete mode 100644 plugins/box/menu/languages/ja.lang.php delete mode 100644 plugins/box/menu/languages/ka-ge.lang.php delete mode 100644 plugins/box/menu/languages/lt.lang.php delete mode 100644 plugins/box/menu/languages/nl.lang.php delete mode 100644 plugins/box/menu/languages/pl.lang.php delete mode 100644 plugins/box/menu/languages/pt-br.lang.php delete mode 100644 plugins/box/menu/languages/ru.lang.php delete mode 100644 plugins/box/menu/languages/sk.lang.php delete mode 100644 plugins/box/menu/languages/sr.lang.php delete mode 100644 plugins/box/menu/languages/tr.lang.php delete mode 100644 plugins/box/menu/languages/uk.lang.php delete mode 100644 plugins/box/menu/languages/zh-cn.lang.php delete mode 100644 plugins/box/menu/menu.admin.php delete mode 100644 plugins/box/menu/menu.plugin.php delete mode 100644 plugins/box/menu/views/backend/add.view.php delete mode 100644 plugins/box/menu/views/backend/edit.view.php delete mode 100644 plugins/box/menu/views/backend/index.view.php delete mode 100644 plugins/box/menu/views/frontend/index.view.php delete mode 100644 plugins/box/pages/install/pages.manifest.xml delete mode 100644 plugins/box/pages/js/.htaccess delete mode 100644 plugins/box/pages/js/pages.js delete mode 100644 plugins/box/pages/languages/cs.lang.php delete mode 100644 plugins/box/pages/languages/de.lang.php delete mode 100644 plugins/box/pages/languages/en.lang.php delete mode 100644 plugins/box/pages/languages/es.lang.php delete mode 100644 plugins/box/pages/languages/fa.lang.php delete mode 100644 plugins/box/pages/languages/fr.lang.php delete mode 100644 plugins/box/pages/languages/hu.lang.php delete mode 100644 plugins/box/pages/languages/id.lang.php delete mode 100644 plugins/box/pages/languages/it.lang.php delete mode 100644 plugins/box/pages/languages/ja.lang.php delete mode 100644 plugins/box/pages/languages/ka-ge.lang.php delete mode 100644 plugins/box/pages/languages/lt.lang.php delete mode 100644 plugins/box/pages/languages/nl.lang.php delete mode 100644 plugins/box/pages/languages/pl.lang.php delete mode 100644 plugins/box/pages/languages/pt-br.lang.php delete mode 100644 plugins/box/pages/languages/ru.lang.php delete mode 100644 plugins/box/pages/languages/sk.lang.php delete mode 100644 plugins/box/pages/languages/sr.lang.php delete mode 100644 plugins/box/pages/languages/tr.lang.php delete mode 100644 plugins/box/pages/languages/uk.lang.php delete mode 100644 plugins/box/pages/languages/zh-cn.lang.php delete mode 100755 plugins/box/pages/pages.admin.php delete mode 100644 plugins/box/pages/pages.plugin.php delete mode 100644 plugins/box/pages/views/backend/add.view.php delete mode 100644 plugins/box/pages/views/backend/edit.view.php delete mode 100755 plugins/box/pages/views/backend/index.view.php delete mode 100644 plugins/box/pages/views/frontend/available_pages.view.php delete mode 100644 plugins/box/pages/views/frontend/breadcrumbs.view.php delete mode 100644 plugins/box/plugins/install/plugins.manifest.xml delete mode 100644 plugins/box/plugins/js/.htaccess delete mode 100644 plugins/box/plugins/js/plugins.js delete mode 100644 plugins/box/plugins/languages/cs.lang.php delete mode 100644 plugins/box/plugins/languages/de.lang.php delete mode 100644 plugins/box/plugins/languages/en.lang.php delete mode 100644 plugins/box/plugins/languages/es.lang.php delete mode 100644 plugins/box/plugins/languages/fa.lang.php delete mode 100644 plugins/box/plugins/languages/fr.lang.php delete mode 100644 plugins/box/plugins/languages/hu.lang.php delete mode 100644 plugins/box/plugins/languages/id.lang.php delete mode 100644 plugins/box/plugins/languages/it.lang.php delete mode 100644 plugins/box/plugins/languages/ja.lang.php delete mode 100644 plugins/box/plugins/languages/ka-ge.lang.php delete mode 100644 plugins/box/plugins/languages/lt.lang.php delete mode 100644 plugins/box/plugins/languages/nl.lang.php delete mode 100644 plugins/box/plugins/languages/pl.lang.php delete mode 100644 plugins/box/plugins/languages/pt-br.lang.php delete mode 100644 plugins/box/plugins/languages/ru.lang.php delete mode 100644 plugins/box/plugins/languages/sk.lang.php delete mode 100644 plugins/box/plugins/languages/sr.lang.php delete mode 100644 plugins/box/plugins/languages/tr.lang.php delete mode 100644 plugins/box/plugins/languages/uk.lang.php delete mode 100644 plugins/box/plugins/languages/zh-cn.lang.php delete mode 100755 plugins/box/plugins/plugins.admin.php delete mode 100644 plugins/box/plugins/plugins.plugin.php delete mode 100755 plugins/box/plugins/views/backend/index.view.php delete mode 100644 plugins/box/sitemap/install/sitemap.manifest.xml delete mode 100644 plugins/box/sitemap/languages/cs.lang.php delete mode 100644 plugins/box/sitemap/languages/de.lang.php delete mode 100644 plugins/box/sitemap/languages/en.lang.php delete mode 100644 plugins/box/sitemap/languages/es.lang.php delete mode 100644 plugins/box/sitemap/languages/fa.lang.php delete mode 100644 plugins/box/sitemap/languages/fr.lang.php delete mode 100644 plugins/box/sitemap/languages/hu.lang.php delete mode 100644 plugins/box/sitemap/languages/it.lang.php delete mode 100644 plugins/box/sitemap/languages/ja.lang.php delete mode 100644 plugins/box/sitemap/languages/ka-ge.lang.php delete mode 100644 plugins/box/sitemap/languages/lt.lang.php delete mode 100644 plugins/box/sitemap/languages/nl.lang.php delete mode 100644 plugins/box/sitemap/languages/pl.lang.php delete mode 100644 plugins/box/sitemap/languages/pt-br.lang.php delete mode 100644 plugins/box/sitemap/languages/ru.lang.php delete mode 100644 plugins/box/sitemap/languages/sk.lang.php delete mode 100644 plugins/box/sitemap/languages/sr.lang.php delete mode 100644 plugins/box/sitemap/languages/tr.lang.php delete mode 100644 plugins/box/sitemap/languages/uk.lang.php delete mode 100644 plugins/box/sitemap/languages/zh-cn.lang.php delete mode 100644 plugins/box/sitemap/sitemap.plugin.php delete mode 100644 plugins/box/sitemap/views/frontend/index.view.php delete mode 100644 plugins/box/snippets/install/snippets.manifest.xml delete mode 100644 plugins/box/snippets/js/.htaccess delete mode 100644 plugins/box/snippets/js/snippets.js delete mode 100644 plugins/box/snippets/languages/cs.lang.php delete mode 100644 plugins/box/snippets/languages/de.lang.php delete mode 100644 plugins/box/snippets/languages/en.lang.php delete mode 100644 plugins/box/snippets/languages/es.lang.php delete mode 100644 plugins/box/snippets/languages/fa.lang.php delete mode 100644 plugins/box/snippets/languages/fr.lang.php delete mode 100644 plugins/box/snippets/languages/hu.lang.php delete mode 100644 plugins/box/snippets/languages/id.lang.php delete mode 100644 plugins/box/snippets/languages/it.lang.php delete mode 100644 plugins/box/snippets/languages/ja.lang.php delete mode 100644 plugins/box/snippets/languages/ka-ge.lang.php delete mode 100644 plugins/box/snippets/languages/lt.lang.php delete mode 100644 plugins/box/snippets/languages/nl.lang.php delete mode 100644 plugins/box/snippets/languages/pl.lang.php delete mode 100644 plugins/box/snippets/languages/pt-br.lang.php delete mode 100644 plugins/box/snippets/languages/ru.lang.php delete mode 100644 plugins/box/snippets/languages/sk.lang.php delete mode 100644 plugins/box/snippets/languages/sr.lang.php delete mode 100644 plugins/box/snippets/languages/tr.lang.php delete mode 100644 plugins/box/snippets/languages/uk.lang.php delete mode 100644 plugins/box/snippets/languages/zh-cn.lang.php delete mode 100755 plugins/box/snippets/snippets.admin.php delete mode 100644 plugins/box/snippets/snippets.plugin.php delete mode 100644 plugins/box/snippets/views/backend/add.view.php delete mode 100644 plugins/box/snippets/views/backend/edit.view.php delete mode 100755 plugins/box/snippets/views/backend/index.view.php delete mode 100644 plugins/box/system/install/system.manifest.xml delete mode 100644 plugins/box/system/languages/cs.lang.php delete mode 100644 plugins/box/system/languages/de.lang.php delete mode 100644 plugins/box/system/languages/en.lang.php delete mode 100644 plugins/box/system/languages/es.lang.php delete mode 100644 plugins/box/system/languages/fa.lang.php delete mode 100644 plugins/box/system/languages/fr.lang.php delete mode 100644 plugins/box/system/languages/hu.lang.php delete mode 100644 plugins/box/system/languages/id.lang.php delete mode 100644 plugins/box/system/languages/it.lang.php delete mode 100644 plugins/box/system/languages/ja.lang.php delete mode 100644 plugins/box/system/languages/ka-ge.lang.php delete mode 100644 plugins/box/system/languages/lt.lang.php delete mode 100644 plugins/box/system/languages/nl.lang.php delete mode 100644 plugins/box/system/languages/pl.lang.php delete mode 100644 plugins/box/system/languages/pt-br.lang.php delete mode 100644 plugins/box/system/languages/ru.lang.php delete mode 100644 plugins/box/system/languages/sk.lang.php delete mode 100644 plugins/box/system/languages/sr.lang.php delete mode 100644 plugins/box/system/languages/tr.lang.php delete mode 100644 plugins/box/system/languages/uk.lang.php delete mode 100644 plugins/box/system/languages/zh-cn.lang.php delete mode 100755 plugins/box/system/system.admin.php delete mode 100644 plugins/box/system/system.plugin.php delete mode 100755 plugins/box/system/views/backend/index.view.php delete mode 100644 plugins/box/themes/install/themes.manifest.xml delete mode 100644 plugins/box/themes/languages/cs.lang.php delete mode 100644 plugins/box/themes/languages/de.lang.php delete mode 100644 plugins/box/themes/languages/en.lang.php delete mode 100644 plugins/box/themes/languages/es.lang.php delete mode 100644 plugins/box/themes/languages/fa.lang.php delete mode 100644 plugins/box/themes/languages/fr.lang.php delete mode 100644 plugins/box/themes/languages/hu.lang.php delete mode 100644 plugins/box/themes/languages/id.lang.php delete mode 100644 plugins/box/themes/languages/it.lang.php delete mode 100644 plugins/box/themes/languages/ja.lang.php delete mode 100644 plugins/box/themes/languages/ka-ge.lang.php delete mode 100644 plugins/box/themes/languages/lt.lang.php delete mode 100644 plugins/box/themes/languages/nl.lang.php delete mode 100644 plugins/box/themes/languages/pl.lang.php delete mode 100644 plugins/box/themes/languages/pt-br.lang.php delete mode 100644 plugins/box/themes/languages/ru.lang.php delete mode 100644 plugins/box/themes/languages/sk.lang.php delete mode 100644 plugins/box/themes/languages/sr.lang.php delete mode 100644 plugins/box/themes/languages/tr.lang.php delete mode 100644 plugins/box/themes/languages/uk.lang.php delete mode 100644 plugins/box/themes/languages/zh-cn.lang.php delete mode 100755 plugins/box/themes/themes.admin.php delete mode 100644 plugins/box/themes/themes.plugin.php delete mode 100644 plugins/box/themes/views/backend/add.view.php delete mode 100644 plugins/box/themes/views/backend/edit.view.php delete mode 100644 plugins/box/themes/views/backend/index.view.php delete mode 100644 plugins/box/users/install/users.manifest.xml delete mode 100644 plugins/box/users/js/.htaccess delete mode 100644 plugins/box/users/js/users.js delete mode 100644 plugins/box/users/languages/cs.lang.php delete mode 100644 plugins/box/users/languages/de.lang.php delete mode 100644 plugins/box/users/languages/en.lang.php delete mode 100644 plugins/box/users/languages/es.lang.php delete mode 100644 plugins/box/users/languages/fa.lang.php delete mode 100644 plugins/box/users/languages/fr.lang.php delete mode 100644 plugins/box/users/languages/hu.lang.php delete mode 100644 plugins/box/users/languages/id.lang.php delete mode 100644 plugins/box/users/languages/it.lang.php delete mode 100644 plugins/box/users/languages/ja.lang.php delete mode 100644 plugins/box/users/languages/ka-ge.lang.php delete mode 100644 plugins/box/users/languages/lt.lang.php delete mode 100644 plugins/box/users/languages/nl.lang.php delete mode 100644 plugins/box/users/languages/pl.lang.php delete mode 100644 plugins/box/users/languages/pt-br.lang.php delete mode 100644 plugins/box/users/languages/ru.lang.php delete mode 100644 plugins/box/users/languages/sk.lang.php delete mode 100644 plugins/box/users/languages/sr.lang.php delete mode 100644 plugins/box/users/languages/tr.lang.php delete mode 100644 plugins/box/users/languages/uk.lang.php delete mode 100644 plugins/box/users/languages/zh-cn.lang.php delete mode 100755 plugins/box/users/users.admin.php delete mode 100644 plugins/box/users/users.plugin.php delete mode 100644 plugins/box/users/views/backend/add.view.php delete mode 100644 plugins/box/users/views/backend/edit.view.php delete mode 100755 plugins/box/users/views/backend/index.view.php delete mode 100644 plugins/box/users/views/frontend/edit.view.php delete mode 100644 plugins/box/users/views/frontend/index.view.php delete mode 100644 plugins/box/users/views/frontend/login.view.php delete mode 100644 plugins/box/users/views/frontend/password_reset.view.php delete mode 100644 plugins/box/users/views/frontend/profile.view.php delete mode 100644 plugins/box/users/views/frontend/registration.view.php delete mode 100644 plugins/box/users/views/frontend/userspanel.view.php delete mode 100644 plugins/captcha/captcha.plugin.php delete mode 100644 plugins/captcha/crypt/.htaccess delete mode 100644 plugins/captcha/crypt/cryptographp.cfg.php delete mode 100644 plugins/captcha/crypt/cryptographp.fct.php delete mode 100644 plugins/captcha/crypt/cryptographp.inc.php delete mode 100644 plugins/captcha/crypt/cryptographp.php delete mode 100644 plugins/captcha/crypt/fonts/index.html delete mode 100644 plugins/captcha/crypt/fonts/luggerbu.ttf delete mode 100644 plugins/captcha/crypt/fonts/luggerbu.txt delete mode 100644 plugins/captcha/crypt/images/.htaccess delete mode 100644 plugins/captcha/crypt/images/Thumbs.db delete mode 100644 plugins/captcha/crypt/images/erreur1.png delete mode 100644 plugins/captcha/crypt/images/erreur2.png delete mode 100644 plugins/captcha/crypt/images/erreur3.png delete mode 100644 plugins/captcha/crypt/images/index.html delete mode 100644 plugins/captcha/crypt/images/reload.png delete mode 100644 plugins/captcha/crypt/index.html delete mode 100644 plugins/captcha/crypt/index.php delete mode 100644 plugins/captcha/install/captcha.install.php delete mode 100644 plugins/captcha/install/captcha.manifest.xml delete mode 100644 plugins/captcha/install/captcha.uninstall.php delete mode 100644 plugins/captcha/languages/cs.lang.php delete mode 100644 plugins/captcha/languages/de.lang.php delete mode 100644 plugins/captcha/languages/en.lang.php delete mode 100644 plugins/captcha/languages/es.lang.php delete mode 100644 plugins/captcha/languages/fa.lang.php delete mode 100644 plugins/captcha/languages/fr.lang.php delete mode 100644 plugins/captcha/languages/id.lang.php delete mode 100644 plugins/captcha/languages/it.lang.php delete mode 100644 plugins/captcha/languages/ka-ge.lang.php delete mode 100644 plugins/captcha/languages/lt.lang.php delete mode 100644 plugins/captcha/languages/nl.lang.php delete mode 100644 plugins/captcha/languages/pl.lang.php delete mode 100644 plugins/captcha/languages/pt-br.lang.php delete mode 100644 plugins/captcha/languages/ru.lang.php delete mode 100644 plugins/captcha/languages/sk.lang.php delete mode 100644 plugins/captcha/languages/sr.lang.php delete mode 100644 plugins/captcha/languages/tr.lang.php delete mode 100644 plugins/captcha/languages/uk.lang.php delete mode 100644 plugins/captcha/languages/zh-cn.lang.php delete mode 100644 plugins/codemirror/LICENSE delete mode 100644 plugins/codemirror/README.md delete mode 100644 plugins/codemirror/codemirror.plugin.php delete mode 100644 plugins/codemirror/codemirror/.gitattributes delete mode 100644 plugins/codemirror/codemirror/.gitignore delete mode 100644 plugins/codemirror/codemirror/.htaccess delete mode 100644 plugins/codemirror/codemirror/.travis.yml delete mode 100644 plugins/codemirror/codemirror/AUTHORS delete mode 100644 plugins/codemirror/codemirror/CONTRIBUTING.md delete mode 100644 plugins/codemirror/codemirror/LICENSE delete mode 100644 plugins/codemirror/codemirror/README.md delete mode 100644 plugins/codemirror/codemirror/addon/comment/comment.js delete mode 100644 plugins/codemirror/codemirror/addon/comment/continuecomment.js delete mode 100644 plugins/codemirror/codemirror/addon/dialog/dialog.css delete mode 100644 plugins/codemirror/codemirror/addon/dialog/dialog.js delete mode 100644 plugins/codemirror/codemirror/addon/display/fullscreen.css delete mode 100644 plugins/codemirror/codemirror/addon/display/fullscreen.js delete mode 100644 plugins/codemirror/codemirror/addon/display/placeholder.js delete mode 100644 plugins/codemirror/codemirror/addon/edit/closebrackets.js delete mode 100644 plugins/codemirror/codemirror/addon/edit/closetag.js delete mode 100644 plugins/codemirror/codemirror/addon/edit/continuelist.js delete mode 100644 plugins/codemirror/codemirror/addon/edit/matchbrackets.js delete mode 100644 plugins/codemirror/codemirror/addon/edit/matchtags.js delete mode 100644 plugins/codemirror/codemirror/addon/edit/trailingspace.js delete mode 100644 plugins/codemirror/codemirror/addon/fold/brace-fold.js delete mode 100644 plugins/codemirror/codemirror/addon/fold/comment-fold.js delete mode 100644 plugins/codemirror/codemirror/addon/fold/foldcode.js delete mode 100644 plugins/codemirror/codemirror/addon/fold/foldgutter.css delete mode 100644 plugins/codemirror/codemirror/addon/fold/foldgutter.js delete mode 100644 plugins/codemirror/codemirror/addon/fold/indent-fold.js delete mode 100644 plugins/codemirror/codemirror/addon/fold/xml-fold.js delete mode 100644 plugins/codemirror/codemirror/addon/hint/anyword-hint.js delete mode 100644 plugins/codemirror/codemirror/addon/hint/css-hint.js delete mode 100644 plugins/codemirror/codemirror/addon/hint/html-hint.js delete mode 100644 plugins/codemirror/codemirror/addon/hint/javascript-hint.js delete mode 100644 plugins/codemirror/codemirror/addon/hint/pig-hint.js delete mode 100644 plugins/codemirror/codemirror/addon/hint/python-hint.js delete mode 100644 plugins/codemirror/codemirror/addon/hint/show-hint.css delete mode 100644 plugins/codemirror/codemirror/addon/hint/show-hint.js delete mode 100644 plugins/codemirror/codemirror/addon/hint/sql-hint.js delete mode 100644 plugins/codemirror/codemirror/addon/hint/xml-hint.js delete mode 100644 plugins/codemirror/codemirror/addon/lint/coffeescript-lint.js delete mode 100644 plugins/codemirror/codemirror/addon/lint/css-lint.js delete mode 100644 plugins/codemirror/codemirror/addon/lint/javascript-lint.js delete mode 100644 plugins/codemirror/codemirror/addon/lint/json-lint.js delete mode 100644 plugins/codemirror/codemirror/addon/lint/lint.css delete mode 100644 plugins/codemirror/codemirror/addon/lint/lint.js delete mode 100644 plugins/codemirror/codemirror/addon/merge/dep/diff_match_patch.js delete mode 100644 plugins/codemirror/codemirror/addon/merge/merge.css delete mode 100644 plugins/codemirror/codemirror/addon/merge/merge.js delete mode 100644 plugins/codemirror/codemirror/addon/mode/loadmode.js delete mode 100644 plugins/codemirror/codemirror/addon/mode/multiplex.js delete mode 100644 plugins/codemirror/codemirror/addon/mode/multiplex_test.js delete mode 100644 plugins/codemirror/codemirror/addon/mode/overlay.js delete mode 100644 plugins/codemirror/codemirror/addon/runmode/colorize.js delete mode 100644 plugins/codemirror/codemirror/addon/runmode/runmode-standalone.js delete mode 100644 plugins/codemirror/codemirror/addon/runmode/runmode.js delete mode 100644 plugins/codemirror/codemirror/addon/runmode/runmode.node.js delete mode 100644 plugins/codemirror/codemirror/addon/scroll/scrollpastend.js delete mode 100644 plugins/codemirror/codemirror/addon/search/match-highlighter.js delete mode 100644 plugins/codemirror/codemirror/addon/search/search.js delete mode 100644 plugins/codemirror/codemirror/addon/search/searchcursor.js delete mode 100644 plugins/codemirror/codemirror/addon/selection/active-line.js delete mode 100644 plugins/codemirror/codemirror/addon/selection/mark-selection.js delete mode 100644 plugins/codemirror/codemirror/addon/tern/tern.css delete mode 100644 plugins/codemirror/codemirror/addon/tern/tern.js delete mode 100644 plugins/codemirror/codemirror/addon/tern/worker.js delete mode 100644 plugins/codemirror/codemirror/addon/wrap/hardwrap.js delete mode 100644 plugins/codemirror/codemirror/bower.json delete mode 100644 plugins/codemirror/codemirror/index.html delete mode 100644 plugins/codemirror/codemirror/keymap/emacs.js delete mode 100644 plugins/codemirror/codemirror/keymap/extra.js delete mode 100644 plugins/codemirror/codemirror/keymap/vim.js delete mode 100644 plugins/codemirror/codemirror/lib/codemirror.css delete mode 100644 plugins/codemirror/codemirror/lib/codemirror.js delete mode 100644 plugins/codemirror/codemirror/mode/apl/apl.js delete mode 100644 plugins/codemirror/codemirror/mode/apl/index.html delete mode 100644 plugins/codemirror/codemirror/mode/asterisk/asterisk.js delete mode 100644 plugins/codemirror/codemirror/mode/asterisk/index.html delete mode 100644 plugins/codemirror/codemirror/mode/clike/clike.js delete mode 100644 plugins/codemirror/codemirror/mode/clike/index.html delete mode 100644 plugins/codemirror/codemirror/mode/clike/scala.html delete mode 100644 plugins/codemirror/codemirror/mode/clojure/clojure.js delete mode 100644 plugins/codemirror/codemirror/mode/clojure/index.html delete mode 100644 plugins/codemirror/codemirror/mode/cobol/cobol.js delete mode 100644 plugins/codemirror/codemirror/mode/cobol/index.html delete mode 100644 plugins/codemirror/codemirror/mode/coffeescript/coffeescript.js delete mode 100644 plugins/codemirror/codemirror/mode/coffeescript/index.html delete mode 100644 plugins/codemirror/codemirror/mode/commonlisp/commonlisp.js delete mode 100644 plugins/codemirror/codemirror/mode/commonlisp/index.html delete mode 100644 plugins/codemirror/codemirror/mode/css/css.js delete mode 100644 plugins/codemirror/codemirror/mode/css/index.html delete mode 100644 plugins/codemirror/codemirror/mode/css/scss.html delete mode 100644 plugins/codemirror/codemirror/mode/css/scss_test.js delete mode 100644 plugins/codemirror/codemirror/mode/css/test.js delete mode 100644 plugins/codemirror/codemirror/mode/d/d.js delete mode 100644 plugins/codemirror/codemirror/mode/d/index.html delete mode 100644 plugins/codemirror/codemirror/mode/diff/diff.js delete mode 100644 plugins/codemirror/codemirror/mode/diff/index.html delete mode 100644 plugins/codemirror/codemirror/mode/dtd/dtd.js delete mode 100644 plugins/codemirror/codemirror/mode/dtd/index.html delete mode 100644 plugins/codemirror/codemirror/mode/ecl/ecl.js delete mode 100644 plugins/codemirror/codemirror/mode/ecl/index.html delete mode 100644 plugins/codemirror/codemirror/mode/eiffel/eiffel.js delete mode 100644 plugins/codemirror/codemirror/mode/eiffel/index.html delete mode 100644 plugins/codemirror/codemirror/mode/erlang/erlang.js delete mode 100644 plugins/codemirror/codemirror/mode/erlang/index.html delete mode 100644 plugins/codemirror/codemirror/mode/fortran/fortran.js delete mode 100644 plugins/codemirror/codemirror/mode/fortran/index.html delete mode 100644 plugins/codemirror/codemirror/mode/gas/gas.js delete mode 100644 plugins/codemirror/codemirror/mode/gas/index.html delete mode 100644 plugins/codemirror/codemirror/mode/gfm/gfm.js delete mode 100644 plugins/codemirror/codemirror/mode/gfm/index.html delete mode 100644 plugins/codemirror/codemirror/mode/gfm/test.js delete mode 100644 plugins/codemirror/codemirror/mode/gherkin/gherkin.js delete mode 100644 plugins/codemirror/codemirror/mode/gherkin/index.html delete mode 100644 plugins/codemirror/codemirror/mode/go/go.js delete mode 100644 plugins/codemirror/codemirror/mode/go/index.html delete mode 100644 plugins/codemirror/codemirror/mode/groovy/groovy.js delete mode 100644 plugins/codemirror/codemirror/mode/groovy/index.html delete mode 100644 plugins/codemirror/codemirror/mode/haml/haml.js delete mode 100644 plugins/codemirror/codemirror/mode/haml/index.html delete mode 100644 plugins/codemirror/codemirror/mode/haml/test.js delete mode 100644 plugins/codemirror/codemirror/mode/haskell/haskell.js delete mode 100644 plugins/codemirror/codemirror/mode/haskell/index.html delete mode 100644 plugins/codemirror/codemirror/mode/haxe/haxe.js delete mode 100644 plugins/codemirror/codemirror/mode/haxe/index.html delete mode 100644 plugins/codemirror/codemirror/mode/htmlembedded/htmlembedded.js delete mode 100644 plugins/codemirror/codemirror/mode/htmlembedded/index.html delete mode 100644 plugins/codemirror/codemirror/mode/htmlmixed/htmlmixed.js delete mode 100644 plugins/codemirror/codemirror/mode/htmlmixed/index.html delete mode 100644 plugins/codemirror/codemirror/mode/http/http.js delete mode 100644 plugins/codemirror/codemirror/mode/http/index.html delete mode 100644 plugins/codemirror/codemirror/mode/index.html delete mode 100644 plugins/codemirror/codemirror/mode/jade/index.html delete mode 100644 plugins/codemirror/codemirror/mode/jade/jade.js delete mode 100644 plugins/codemirror/codemirror/mode/javascript/index.html delete mode 100644 plugins/codemirror/codemirror/mode/javascript/javascript.js delete mode 100644 plugins/codemirror/codemirror/mode/javascript/test.js delete mode 100644 plugins/codemirror/codemirror/mode/javascript/typescript.html delete mode 100644 plugins/codemirror/codemirror/mode/jinja2/index.html delete mode 100644 plugins/codemirror/codemirror/mode/jinja2/jinja2.js delete mode 100644 plugins/codemirror/codemirror/mode/julia/index.html delete mode 100644 plugins/codemirror/codemirror/mode/julia/julia.js delete mode 100644 plugins/codemirror/codemirror/mode/less/index.html delete mode 100644 plugins/codemirror/codemirror/mode/less/less.js delete mode 100644 plugins/codemirror/codemirror/mode/livescript/index.html delete mode 100644 plugins/codemirror/codemirror/mode/livescript/livescript.js delete mode 100644 plugins/codemirror/codemirror/mode/livescript/livescript.ls delete mode 100644 plugins/codemirror/codemirror/mode/lua/index.html delete mode 100644 plugins/codemirror/codemirror/mode/lua/lua.js delete mode 100644 plugins/codemirror/codemirror/mode/markdown/index.html delete mode 100644 plugins/codemirror/codemirror/mode/markdown/markdown.js delete mode 100644 plugins/codemirror/codemirror/mode/markdown/test.js delete mode 100644 plugins/codemirror/codemirror/mode/meta.js delete mode 100644 plugins/codemirror/codemirror/mode/mirc/index.html delete mode 100644 plugins/codemirror/codemirror/mode/mirc/mirc.js delete mode 100644 plugins/codemirror/codemirror/mode/nginx/index.html delete mode 100644 plugins/codemirror/codemirror/mode/nginx/nginx.js delete mode 100644 plugins/codemirror/codemirror/mode/ntriples/index.html delete mode 100644 plugins/codemirror/codemirror/mode/ntriples/ntriples.js delete mode 100644 plugins/codemirror/codemirror/mode/ocaml/index.html delete mode 100644 plugins/codemirror/codemirror/mode/ocaml/ocaml.js delete mode 100644 plugins/codemirror/codemirror/mode/octave/index.html delete mode 100644 plugins/codemirror/codemirror/mode/octave/octave.js delete mode 100644 plugins/codemirror/codemirror/mode/pascal/index.html delete mode 100644 plugins/codemirror/codemirror/mode/pascal/pascal.js delete mode 100644 plugins/codemirror/codemirror/mode/pegjs/index.html delete mode 100644 plugins/codemirror/codemirror/mode/pegjs/pegjs.js delete mode 100644 plugins/codemirror/codemirror/mode/perl/index.html delete mode 100644 plugins/codemirror/codemirror/mode/perl/perl.js delete mode 100644 plugins/codemirror/codemirror/mode/php/index.html delete mode 100644 plugins/codemirror/codemirror/mode/php/php.js delete mode 100644 plugins/codemirror/codemirror/mode/pig/index.html delete mode 100644 plugins/codemirror/codemirror/mode/pig/pig.js delete mode 100644 plugins/codemirror/codemirror/mode/properties/index.html delete mode 100644 plugins/codemirror/codemirror/mode/properties/properties.js delete mode 100644 plugins/codemirror/codemirror/mode/python/index.html delete mode 100644 plugins/codemirror/codemirror/mode/python/python.js delete mode 100644 plugins/codemirror/codemirror/mode/q/index.html delete mode 100644 plugins/codemirror/codemirror/mode/q/q.js delete mode 100644 plugins/codemirror/codemirror/mode/r/index.html delete mode 100644 plugins/codemirror/codemirror/mode/r/r.js delete mode 100644 plugins/codemirror/codemirror/mode/rpm/changes/changes.js delete mode 100644 plugins/codemirror/codemirror/mode/rpm/changes/index.html delete mode 100644 plugins/codemirror/codemirror/mode/rpm/spec/index.html delete mode 100644 plugins/codemirror/codemirror/mode/rpm/spec/spec.css delete mode 100644 plugins/codemirror/codemirror/mode/rpm/spec/spec.js delete mode 100644 plugins/codemirror/codemirror/mode/rst/index.html delete mode 100644 plugins/codemirror/codemirror/mode/rst/rst.js delete mode 100644 plugins/codemirror/codemirror/mode/ruby/index.html delete mode 100644 plugins/codemirror/codemirror/mode/ruby/ruby.js delete mode 100644 plugins/codemirror/codemirror/mode/rust/index.html delete mode 100644 plugins/codemirror/codemirror/mode/rust/rust.js delete mode 100644 plugins/codemirror/codemirror/mode/sass/index.html delete mode 100644 plugins/codemirror/codemirror/mode/sass/sass.js delete mode 100644 plugins/codemirror/codemirror/mode/scheme/index.html delete mode 100644 plugins/codemirror/codemirror/mode/scheme/scheme.js delete mode 100644 plugins/codemirror/codemirror/mode/shell/index.html delete mode 100644 plugins/codemirror/codemirror/mode/shell/shell.js delete mode 100644 plugins/codemirror/codemirror/mode/sieve/index.html delete mode 100644 plugins/codemirror/codemirror/mode/sieve/sieve.js delete mode 100644 plugins/codemirror/codemirror/mode/smalltalk/index.html delete mode 100644 plugins/codemirror/codemirror/mode/smalltalk/smalltalk.js delete mode 100644 plugins/codemirror/codemirror/mode/smarty/index.html delete mode 100644 plugins/codemirror/codemirror/mode/smarty/smarty.js delete mode 100644 plugins/codemirror/codemirror/mode/smartymixed/index.html delete mode 100644 plugins/codemirror/codemirror/mode/smartymixed/smartymixed.js delete mode 100644 plugins/codemirror/codemirror/mode/sparql/index.html delete mode 100644 plugins/codemirror/codemirror/mode/sparql/sparql.js delete mode 100644 plugins/codemirror/codemirror/mode/sql/index.html delete mode 100644 plugins/codemirror/codemirror/mode/sql/sql.js delete mode 100644 plugins/codemirror/codemirror/mode/stex/index.html delete mode 100644 plugins/codemirror/codemirror/mode/stex/stex.js delete mode 100644 plugins/codemirror/codemirror/mode/stex/test.js delete mode 100644 plugins/codemirror/codemirror/mode/tcl/index.html delete mode 100644 plugins/codemirror/codemirror/mode/tcl/tcl.js delete mode 100644 plugins/codemirror/codemirror/mode/tiddlywiki/index.html delete mode 100644 plugins/codemirror/codemirror/mode/tiddlywiki/tiddlywiki.css delete mode 100644 plugins/codemirror/codemirror/mode/tiddlywiki/tiddlywiki.js delete mode 100644 plugins/codemirror/codemirror/mode/tiki/index.html delete mode 100644 plugins/codemirror/codemirror/mode/tiki/tiki.css delete mode 100644 plugins/codemirror/codemirror/mode/tiki/tiki.js delete mode 100644 plugins/codemirror/codemirror/mode/toml/index.html delete mode 100644 plugins/codemirror/codemirror/mode/toml/toml.js delete mode 100644 plugins/codemirror/codemirror/mode/turtle/index.html delete mode 100644 plugins/codemirror/codemirror/mode/turtle/turtle.js delete mode 100644 plugins/codemirror/codemirror/mode/vb/index.html delete mode 100644 plugins/codemirror/codemirror/mode/vb/vb.js delete mode 100644 plugins/codemirror/codemirror/mode/vbscript/index.html delete mode 100644 plugins/codemirror/codemirror/mode/vbscript/vbscript.js delete mode 100644 plugins/codemirror/codemirror/mode/velocity/index.html delete mode 100644 plugins/codemirror/codemirror/mode/velocity/velocity.js delete mode 100644 plugins/codemirror/codemirror/mode/verilog/index.html delete mode 100644 plugins/codemirror/codemirror/mode/verilog/verilog.js delete mode 100644 plugins/codemirror/codemirror/mode/xml/index.html delete mode 100644 plugins/codemirror/codemirror/mode/xml/xml.js delete mode 100644 plugins/codemirror/codemirror/mode/xquery/index.html delete mode 100644 plugins/codemirror/codemirror/mode/xquery/test.js delete mode 100644 plugins/codemirror/codemirror/mode/xquery/xquery.js delete mode 100644 plugins/codemirror/codemirror/mode/yaml/index.html delete mode 100644 plugins/codemirror/codemirror/mode/yaml/yaml.js delete mode 100644 plugins/codemirror/codemirror/mode/z80/index.html delete mode 100644 plugins/codemirror/codemirror/mode/z80/z80.js delete mode 100644 plugins/codemirror/codemirror/package.json delete mode 100644 plugins/codemirror/codemirror/theme/3024-day.css delete mode 100644 plugins/codemirror/codemirror/theme/3024-night.css delete mode 100644 plugins/codemirror/codemirror/theme/ambiance-mobile.css delete mode 100644 plugins/codemirror/codemirror/theme/ambiance.css delete mode 100644 plugins/codemirror/codemirror/theme/base16-dark.css delete mode 100644 plugins/codemirror/codemirror/theme/base16-light.css delete mode 100644 plugins/codemirror/codemirror/theme/blackboard.css delete mode 100644 plugins/codemirror/codemirror/theme/cobalt.css delete mode 100644 plugins/codemirror/codemirror/theme/eclipse.css delete mode 100644 plugins/codemirror/codemirror/theme/elegant.css delete mode 100644 plugins/codemirror/codemirror/theme/erlang-dark.css delete mode 100644 plugins/codemirror/codemirror/theme/lesser-dark.css delete mode 100644 plugins/codemirror/codemirror/theme/mbo.css delete mode 100644 plugins/codemirror/codemirror/theme/mdn-like.css delete mode 100644 plugins/codemirror/codemirror/theme/midnight.css delete mode 100644 plugins/codemirror/codemirror/theme/monokai.css delete mode 100644 plugins/codemirror/codemirror/theme/neat.css delete mode 100644 plugins/codemirror/codemirror/theme/night.css delete mode 100644 plugins/codemirror/codemirror/theme/paraiso-dark.css delete mode 100644 plugins/codemirror/codemirror/theme/paraiso-light.css delete mode 100644 plugins/codemirror/codemirror/theme/rubyblue.css delete mode 100644 plugins/codemirror/codemirror/theme/solarized.css delete mode 100644 plugins/codemirror/codemirror/theme/the-matrix.css delete mode 100644 plugins/codemirror/codemirror/theme/tomorrow-night-eighties.css delete mode 100644 plugins/codemirror/codemirror/theme/twilight.css delete mode 100644 plugins/codemirror/codemirror/theme/vibrant-ink.css delete mode 100644 plugins/codemirror/codemirror/theme/xq-dark.css delete mode 100644 plugins/codemirror/codemirror/theme/xq-light.css delete mode 100644 plugins/codemirror/install/codemirror.manifest.xml delete mode 100644 plugins/markdown/README.md delete mode 100644 plugins/markdown/install/markdown.manifest.xml delete mode 100644 plugins/markdown/markdown.plugin.php delete mode 100644 plugins/markdown/php-markdown/License.md delete mode 100644 plugins/markdown/php-markdown/Michelf/Markdown.php delete mode 100644 plugins/markdown/php-markdown/Michelf/MarkdownExtra.php delete mode 100644 plugins/markdown/php-markdown/Readme.md delete mode 100644 plugins/markdown/php-markdown/Readme.php delete mode 100644 plugins/markdown/php-markdown/composer.json delete mode 100644 plugins/markitup/install/markitup.manifest.xml delete mode 100644 plugins/markitup/markitup.plugin.php delete mode 100644 plugins/markitup/markitup/.htaccess delete mode 100644 plugins/markitup/markitup/jquery.markitup.js delete mode 100644 plugins/markitup/markitup/sets/html/images/bold.png delete mode 100644 plugins/markitup/markitup/sets/html/images/clean.png delete mode 100644 plugins/markitup/markitup/sets/html/images/colors.png delete mode 100644 plugins/markitup/markitup/sets/html/images/h1.png delete mode 100644 plugins/markitup/markitup/sets/html/images/h2.png delete mode 100644 plugins/markitup/markitup/sets/html/images/h3.png delete mode 100644 plugins/markitup/markitup/sets/html/images/h4.png delete mode 100644 plugins/markitup/markitup/sets/html/images/h5.png delete mode 100644 plugins/markitup/markitup/sets/html/images/h6.png delete mode 100644 plugins/markitup/markitup/sets/html/images/italic.png delete mode 100644 plugins/markitup/markitup/sets/html/images/link.png delete mode 100644 plugins/markitup/markitup/sets/html/images/list-bullet.png delete mode 100644 plugins/markitup/markitup/sets/html/images/list-item.png delete mode 100644 plugins/markitup/markitup/sets/html/images/list-numeric.png delete mode 100644 plugins/markitup/markitup/sets/html/images/paragraph.png delete mode 100644 plugins/markitup/markitup/sets/html/images/picture.png delete mode 100644 plugins/markitup/markitup/sets/html/images/preview.png delete mode 100644 plugins/markitup/markitup/sets/html/images/stroke.png delete mode 100644 plugins/markitup/markitup/sets/html/set.js delete mode 100644 plugins/markitup/markitup/sets/html/style.css delete mode 100644 plugins/markitup/markitup/skins/simple/images/handle.png delete mode 100644 plugins/markitup/markitup/skins/simple/images/menu.png delete mode 100644 plugins/markitup/markitup/skins/simple/images/submenu.png delete mode 100644 plugins/markitup/markitup/skins/simple/style.css delete mode 100644 plugins/markitup/markitup/templates/preview.css delete mode 100644 plugins/markitup/markitup/templates/preview.html delete mode 100644 plugins/sandbox/install/sandbox.install.php delete mode 100644 plugins/sandbox/install/sandbox.manifest.xml delete mode 100644 plugins/sandbox/install/sandbox.uninstall.php delete mode 100644 plugins/sandbox/languages/cs.lang.php delete mode 100644 plugins/sandbox/languages/de.lang.php delete mode 100644 plugins/sandbox/languages/en.lang.php delete mode 100644 plugins/sandbox/languages/es.lang.php delete mode 100644 plugins/sandbox/languages/fa.lang.php delete mode 100644 plugins/sandbox/languages/fr.lang.php delete mode 100644 plugins/sandbox/languages/id.lang.php delete mode 100644 plugins/sandbox/languages/it.lang.php delete mode 100644 plugins/sandbox/languages/ka-ge.lang.php delete mode 100644 plugins/sandbox/languages/lt.lang.php delete mode 100644 plugins/sandbox/languages/nl.lang.php delete mode 100644 plugins/sandbox/languages/pl.lang.php delete mode 100644 plugins/sandbox/languages/pt-br.lang.php delete mode 100644 plugins/sandbox/languages/ru.lang.php delete mode 100644 plugins/sandbox/languages/sk.lang.php delete mode 100644 plugins/sandbox/languages/sr.lang.php delete mode 100644 plugins/sandbox/languages/tr.lang.php delete mode 100644 plugins/sandbox/languages/uk.lang.php delete mode 100644 plugins/sandbox/languages/zh-cn.lang.php delete mode 100644 plugins/sandbox/sandbox.admin.php delete mode 100644 plugins/sandbox/sandbox.plugin.php delete mode 100644 plugins/sandbox/views/backend/index.view.php delete mode 100644 plugins/sandbox/views/frontend/index.view.php delete mode 100644 public/assets/css/bootstrap-fileupload.css delete mode 100644 public/assets/css/bootstrap.css delete mode 100644 public/assets/css/bootstrap.css.map delete mode 100644 public/assets/css/chocolat.css delete mode 100644 public/assets/css/daterangepicker-bs3.css delete mode 100644 public/assets/css/icheck-blue.css delete mode 100644 public/assets/css/messenger-spinner.css delete mode 100644 public/assets/css/messenger-theme-flat.css delete mode 100644 public/assets/css/messenger.css delete mode 100644 public/assets/fonts/glyphicons-halflings-regular.eot delete mode 100644 public/assets/fonts/glyphicons-halflings-regular.svg delete mode 100644 public/assets/fonts/glyphicons-halflings-regular.ttf delete mode 100644 public/assets/fonts/glyphicons-halflings-regular.woff delete mode 100644 public/assets/img/blue.png delete mode 100644 public/assets/img/chocolat/close.gif delete mode 100644 public/assets/img/chocolat/closew.gif delete mode 100644 public/assets/img/chocolat/left.gif delete mode 100644 public/assets/img/chocolat/leftw.gif delete mode 100644 public/assets/img/chocolat/loading.gif delete mode 100644 public/assets/img/chocolat/loadingw.gif delete mode 100644 public/assets/img/chocolat/right.gif delete mode 100644 public/assets/img/chocolat/rightw.gif delete mode 100755 public/assets/img/flags/de.png delete mode 100755 public/assets/img/flags/en.png delete mode 100755 public/assets/img/flags/es.png delete mode 100755 public/assets/img/flags/fa.png delete mode 100755 public/assets/img/flags/fr.png delete mode 100755 public/assets/img/flags/hu.png delete mode 100755 public/assets/img/flags/id.png delete mode 100755 public/assets/img/flags/it.png delete mode 100755 public/assets/img/flags/ja.png delete mode 100755 public/assets/img/flags/lt.png delete mode 100755 public/assets/img/flags/nl.png delete mode 100755 public/assets/img/flags/pl.png delete mode 100755 public/assets/img/flags/pt-br.png delete mode 100755 public/assets/img/flags/ru.png delete mode 100755 public/assets/img/flags/sk.png delete mode 100755 public/assets/img/flags/sr.png delete mode 100755 public/assets/img/flags/tr.png delete mode 100755 public/assets/img/flags/uk.png delete mode 100755 public/assets/img/flags/zh-cn.png delete mode 100644 public/assets/img/glyphicons-halflings-regular.eot delete mode 100644 public/assets/img/glyphicons-halflings-regular.svg delete mode 100644 public/assets/img/glyphicons-halflings-regular.ttf delete mode 100644 public/assets/img/glyphicons-halflings-regular.woff delete mode 100644 public/assets/img/glyphicons-halflings-white.png delete mode 100644 public/assets/img/glyphicons-halflings.png delete mode 100644 public/assets/img/monstra-logo-256px.png delete mode 100644 public/assets/img/monstra-logo.png delete mode 100644 public/assets/js/bootstrap-fileupload.js delete mode 100644 public/assets/js/bootstrap.min.js delete mode 100644 public/assets/js/daterangepicker.js delete mode 100644 public/assets/js/icheck.min.js delete mode 100644 public/assets/js/jquery-2.1.0.min.map delete mode 100644 public/assets/js/jquery.chocolat.js delete mode 100644 public/assets/js/jquery.min.js delete mode 100644 public/assets/js/messenger-theme-flat.js delete mode 100644 public/assets/js/messenger.min.js delete mode 100644 public/assets/js/moment.min.js delete mode 100644 public/themes/default/blog-post.template.php delete mode 100644 public/themes/default/blog.template.php delete mode 100644 public/themes/default/css/default.css delete mode 100644 public/themes/default/footer-links.chunk.php delete mode 100644 public/themes/default/footer.chunk.php delete mode 100644 public/themes/default/header.chunk.php delete mode 100644 public/themes/default/index.template.php delete mode 100644 public/uploads/.empty delete mode 100644 robots.txt delete mode 100644 rss.php delete mode 100644 sitemap.xml delete mode 100644 storage/.htaccess delete mode 100644 storage/blocks/.empty delete mode 100644 storage/database/menu.table.xml delete mode 100644 storage/database/options.table.xml delete mode 100644 storage/database/pages.table.xml delete mode 100644 storage/database/plugins.table.xml delete mode 100644 storage/database/users.table.xml delete mode 100644 storage/emails/layout.email.php delete mode 100644 storage/emails/new-password.email.php delete mode 100644 storage/emails/new-user.email.php delete mode 100644 storage/emails/reset-password.email.php delete mode 100644 storage/pages/1.page.txt delete mode 100644 storage/pages/2.page.txt delete mode 100644 storage/pages/4.page.txt delete mode 100644 storage/snippets/google-analytics.snippet.php delete mode 100644 tmp/.htaccess delete mode 100644 tmp/cache/.empty delete mode 100644 tmp/logs/.empty delete mode 100644 tmp/minify/.empty delete mode 100644 tmp/minify/.htaccess diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 -# -# For the full copyright and license information, please view the LICENSE -# file that was distributed with this source code. -# - -# Set default charset utf-8 -AddDefaultCharset UTF-8 - -# PHP 5, Apache 1 and 2. - - php_flag magic_quotes_gpc off - php_flag magic_quotes_sybase off - php_flag register_globals off - - - - RewriteEngine on - - ## Begin - Rewrite rules to block out some common exploits. - # If you experience problems on your site block out the operations listed below - # This attempts to block the most common type of exploit `attempts` to Monstra - # - # Block out any script trying to base64_encode data within the URL. - RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR] - # Block out any script that includes a - - - - - - - - - - - - - - - - - - - - -
- - - -
-
-
- '.__('Plugin main admin function does not exist', 'system').'
'; - } - } else { - echo '
'.__('Plugin does not exist', 'system').'
'; - } - ?> -
-
- -
- - - diff --git a/admin/themes/default/js/default.js b/admin/themes/default/js/default.js deleted file mode 100644 index 058f3c6..0000000 --- a/admin/themes/default/js/default.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Monstra JS module - * - * This source file is part of the Monstra Engine. More information, - * documentation and tutorials can be found at http://monstra.org - * - * @package Monstra - * - * @author Romanenko Sergey / Awilum - * @copyright 2012-2014 Romanenko Sergey / Awilum - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* Confirm delete */ -function confirmDelete(msg){var data=confirm(msg+" ?"); return data;} - -/* Messanger */ -Messenger.options = { - extraClasses: 'messenger-fixed messenger-on-bottom messenger-on-right', - theme: 'flat' -} \ No newline at end of file diff --git a/admin/themes/default/login.template.php b/admin/themes/default/login.template.php deleted file mode 100644 index b339d5a..0000000 --- a/admin/themes/default/login.template.php +++ /dev/null @@ -1,135 +0,0 @@ - - - - - Monstra :: <?php echo __('Administration', 'system'); ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/backups/.empty b/backups/.empty deleted file mode 100644 index e69de29..0000000 diff --git a/backups/.htaccess b/backups/.htaccess deleted file mode 100644 index 14249c5..0000000 --- a/backups/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all \ No newline at end of file diff --git a/boot/defines.php b/boot/defines.php deleted file mode 100644 index 180ada1..0000000 --- a/boot/defines.php +++ /dev/null @@ -1,94 +0,0 @@ - - * @link http://monstra.org - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - - -class Alert -{ - /** - * Protected constructor since this is a static class. - * - * @access protected - */ - protected function __construct() - { - // Nothing here - } - - /** - * Show success message - * - * - * Alert::success('Message here...'); - * - * - * @param string $message Message - * @param integer $seconds Seconds - */ - public static function success($message, $seconds = 3) - { - // Redefine vars - $message = (string) $message; - $seconds = (int) $seconds; - - echo ''; - } - - /** - * Show warning message - * - * - * Alert::warning('Message here...'); - * - * - * @param string $message Message - * @param integer $seconds Seconds - */ - public static function warning($message, $seconds = 3) - { - // Redefine vars - $message = (string) $message; - $seconds = (int) $seconds; - - echo ''; - } - - /** - * Show error message - * - * - * Alert::error('Message here...'); - * - * - * @param string $message Message - * @param integer $seconds Seconds - */ - public static function error($message, $seconds = 3) - { - // Redefine vars - $message = (string) $message; - $seconds = (int) $seconds; - - echo ''; - } -} diff --git a/engine/Monstra.php b/engine/Monstra.php deleted file mode 100644 index b1a50fb..0000000 --- a/engine/Monstra.php +++ /dev/null @@ -1,340 +0,0 @@ - - * @link http://monstra.org - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -class Monstra -{ - /** - * An instance of the Monstra class - * - * @var core - */ - protected static $instance = null; - - /** - * Common environment type constants for consistency and convenience - */ - const PRODUCTION = 1; - const STAGING = 2; - const TESTING = 3; - const DEVELOPMENT = 4; - - /** - * The version of Monstra - */ - const VERSION = '3.0.4'; - - - /** - * Monstra environment - * - * @var string - */ - public static $environment = Monstra::PRODUCTION; - - /** - * Monstra environment names - * - * @var array - */ - public static $environment_names = array( - Monstra::PRODUCTION => 'production', - Monstra::STAGING => 'staging', - Monstra::TESTING => 'testing', - Monstra::DEVELOPMENT => 'development', - ); - - /** - * Protected clone method to enforce singleton behavior. - * - * @access protected - */ - protected function __clone() - { - // Nothing here. - } - - /** - * Protected Construct - */ - protected function __construct() - { - /** - * Load core defines - */ - Monstra::loadDefines(); - - /** - * Compress HTML with gzip - */ - if (MONSTRA_GZIP) { - if (! ob_start("ob_gzhandler")) { - ob_start(); - } - } else { - ob_start(); - } - - /** - * Send default header and set internal encoding - */ - header('Content-Type: text/html; charset=UTF-8'); - function_exists('mb_language') and mb_language('uni'); - function_exists('mb_regex_encoding') and mb_regex_encoding('UTF-8'); - function_exists('mb_internal_encoding') and mb_internal_encoding('UTF-8'); - - /** - * Gets the current configuration setting of magic_quotes_gpc - * and kill magic quotes - */ - if (get_magic_quotes_gpc()) { - function stripslashesGPC(&$value) - { - $value = stripslashes($value); - } - array_walk_recursive($_GET, 'stripslashesGPC'); - array_walk_recursive($_POST, 'stripslashesGPC'); - array_walk_recursive($_COOKIE, 'stripslashesGPC'); - array_walk_recursive($_REQUEST, 'stripslashesGPC'); - } - - /** - * Set Gelato Display Errors to False for Production environment. - */ - if (Monstra::$environment == Monstra::PRODUCTION) { - define('GELATO_DEVELOPMENT', false); - } - - /** - * Define Monstra Folder for Gelato Logs - */ - define('GELATO_LOGS_PATH', LOGS); - - /** - * Include Gelato Library - */ - include ROOT . DS . 'libraries'. DS .'Gelato'. DS .'Gelato.php'; - - /** - * Map Monstra Engine Directory - */ - ClassLoader::directory(ROOT . DS . 'engine' . DS); - - /** - * Map all Monstra Classes - */ - ClassLoader::mapClasses(array( - - // Site Modules - 'Security' => ROOT . DS .'engine'. DS .'Security.php', - 'Uri' => ROOT . DS .'engine'. DS .'Uri.php', - 'Site' => ROOT . DS .'engine'. DS .'Site.php', - 'Alert' => ROOT . DS .'engine'. DS .'Alert.php', - - // XMLDB API - 'XML' => ROOT . DS .'engine'. DS .'Xmldb'. DS .'XML.php', - 'DB' => ROOT . DS .'engine'. DS .'Xmldb'. DS .'DB.php', - 'Table' => ROOT . DS .'engine'. DS .'Xmldb'. DS .'Table.php', - - // Plugin API - 'Plugin' => ROOT . DS .'engine'. DS .'Plugin'. DS .'Plugin.php', - 'Frontend' => ROOT . DS .'engine'. DS .'Plugin'. DS .'Frontend.php', - 'Backend' => ROOT . DS .'engine'. DS .'Plugin'. DS .'Backend.php', - 'Action' => ROOT . DS .'engine'. DS .'Plugin'. DS .'Action.php', - 'Filter' => ROOT . DS .'engine'. DS .'Plugin'. DS .'Filter.php', - 'View' => ROOT . DS .'engine'. DS .'Plugin'. DS .'View.php', - 'I18n' => ROOT . DS .'engine'. DS .'Plugin'. DS .'I18n.php', - 'Stylesheet' => ROOT . DS .'engine'. DS .'Plugin'. DS .'Stylesheet.php', - 'Javascript' => ROOT . DS .'engine'. DS .'Plugin'. DS .'Javascript.php', - 'Navigation' => ROOT . DS .'engine'. DS .'Plugin'. DS .'Navigation.php', - - // Option API - 'Option' => ROOT . DS .'engine'. DS .'Option.php', - - // Shortcode API - 'Shortcode' => ROOT . DS .'engine'. DS .'Shortcode.php', - - // Idiorm - 'ORM' => ROOT . DS .'libraries'. DS . 'Idiorm'. DS .'ORM.php', - - // PHPMailer - 'PHPMailer' => ROOT . DS .'libraries'. DS . 'PHPMailer'. DS .'PHPMailer.php', - )); - - /** - * Start session - */ - Session::start(); - - /** - * Init Idiorm - */ - if (defined('MONSTRA_DB_DSN')) { - ORM::configure(MONSTRA_DB_DSN); - ORM::configure('username', MONSTRA_DB_USER); - ORM::configure('password', MONSTRA_DB_PASSWORD); - ORM::configure('driver_options', array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8')); - } - - /** - * Auto cleanup if DEVELOPMENT environment - */ - if (Monstra::$environment == Monstra::DEVELOPMENT) { - Monstra::cleanTmp(); - } - - /** - * Set Cache dir - */ - Cache::configure('cache_dir', CACHE); - - /** - * Init Options API module - */ - Option::init(); - - /** - * Set default timezone - */ - @ini_set('date.timezone', Option::get('timezone')); - if (function_exists('date_default_timezone_set')) { - date_default_timezone_set(Option::get('timezone')); - } else { - putenv('TZ='.Option::get('timezone')); - } - - /** - * Sanitize URL to prevent XSS - Cross-site scripting - */ - Security::runSanitizeURL(); - - /** - * Load default - */ - Monstra::loadPluggable(); - - /** - * Init I18n - */ - I18n::init(Option::get('language')); - - /** - * Init Plugins API - */ - Plugin::init(); - - /** - * Init Notification service - */ - Notification::init(); - - /** - * Init site module - */ - if (! BACKEND) { - Site::init(); - } - } - - /** - * Load Defines - */ - protected static function loadDefines() - { - $root_defines = ROOT . DS . 'boot' . DS . 'defines.php'; - $environment_defines = ROOT . DS . 'boot' . DS . Monstra::$environment_names[Monstra::$environment] . DS . 'defines.php'; - $monstra_defines = ROOT . DS . 'engine' . DS . 'boot' . DS . 'defines.php'; - - if (file_exists($root_defines)) { - include $root_defines; - } elseif (file_exists($environment_defines)) { - include $environment_defines; - } elseif (file_exists($monstra_defines)) { - include $monstra_defines; - } else { - throw new RuntimeException("The defines file does not exist."); - } - } - - /** - * Load Pluggable - */ - protected static function loadPluggable() - { - $root_pluggable = ROOT . DS . 'boot'; - $environment_pluggable = ROOT . DS . 'boot' . DS . Monstra::$environment_names[Monstra::$environment]; - $monstra_pluggable = ROOT . DS . 'engine' . DS . 'boot'; - - if (file_exists($root_pluggable . DS . 'filters.php')) { - include $root_pluggable . DS . 'filters.php'; - } elseif (file_exists($environment_pluggable . DS . 'filters.php')) { - include $environment_pluggable . DS . 'filters.php'; - } elseif (file_exists($monstra_pluggable . DS . 'filters.php')) { - include $monstra_pluggable . DS . 'filters.php'; - } else { - throw new RuntimeException("The pluggable filters.php file does not exist."); - } - - if (file_exists($root_pluggable . DS . 'actions.php')) { - include $root_pluggable . DS . 'actions.php'; - } elseif (file_exists($environment_pluggable . DS . 'actions.php')) { - include $environment_pluggable . DS . 'actions.php'; - } elseif (file_exists($monstra_pluggable . DS . 'actions.php')) { - include $monstra_pluggable . DS . 'actions.php'; - } else { - throw new RuntimeException("The pluggable actions.php file does not exist."); - } - - if (file_exists($root_pluggable . DS . 'shortcodes.php')) { - include $root_pluggable . DS . 'shortcodes.php'; - } elseif (file_exists($environment_pluggable . DS . 'shortcodes.php')) { - include $environment_pluggable . DS . 'shortcodes.php'; - } elseif (file_exists($monstra_pluggable . DS . 'shortcodes.php')) { - include $monstra_pluggable . DS . 'shortcodes.php'; - } else { - throw new RuntimeException("The pluggable shortcodes.php file does not exist."); - } - } - - /** - * Clean Monstra TMP folder. - */ - public static function cleanTmp() - { - // Cleanup minify - if (count($files = File::scan(MINIFY, array('css', 'js', 'php'))) > 0) { - foreach ($files as $file) { - File::delete(MINIFY . DS . $file); - } - } - - // Cleanup cache - if (count($namespaces = Dir::scan(CACHE)) > 0) { - foreach ($namespaces as $namespace) { - Dir::delete(CACHE . DS . $namespace); - } - } - } - - /** - * Initialize Monstra Engine - * - * @return Monstra - */ - public static function init() - { - if (! isset(self::$instance)) { - self::$instance = new Monstra(); - } - return self::$instance; - } -} diff --git a/engine/Option.php b/engine/Option.php deleted file mode 100644 index aced213..0000000 --- a/engine/Option.php +++ /dev/null @@ -1,178 +0,0 @@ - - * @link http://monstra.org - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - - -class Option -{ - /** - * Options - * - * @var array - */ - protected static $options = null; - - /** - * An instance of the Option class - * - * @var option - */ - protected static $instance = null; - - /** - * Initializing options - * - * @param string $name Options file - */ - public static function init() - { - if (! isset(self::$instance)) { - self::$instance = new Option(); - } - return self::$instance; - } - - /** - * Protected clone method to enforce singleton behavior. - * - * @access protected - */ - protected function __clone() - { - // Nothing here. - } - - /** - * Construct - */ - protected function __construct() - { - Option::$options = new Table('options'); - } - - /** - * Add a new option - * - * - * Option::add('pages_limit', 10); - * Option::add(array('pages_count' => 10, 'pages_default' => 'home')); - * - * - * @param mixed $option Name of option to add. - * @param mixed $value Option value. - * @return boolean - */ - public static function add($option, $value = null) - { - if (is_array($option)) { - foreach ($option as $k => $v) { - $_option = Option::$options->select('[name="'.$k.'"]', null); - if (count($_option) == 0) { - Option::$options->insert(array('name' => $k, 'value' => $v)); - } - } - } else { - $_option = Option::$options->select('[name="'.$option.'"]', null); - if (count($_option) == 0) { - return Option::$options->insert(array('name' => $option, 'value' => $value)); - } - } - } - - /** - * Update option value - * - * - * Option::update('pages_limit', 12); - * Option::update(array('pages_count' => 10, 'pages_default' => 'home')); - * - * - * @param mixed $option Name of option to update. - * @param mixed $value Option value. - * @return boolean - */ - public static function update($option, $value = null) - { - if (is_array($option)) { - foreach ($option as $k => $v) { - Option::$options->updateWhere('[name="'.$k.'"]', array('value' => $v)); - } - } else { - return Option::$options->updateWhere('[name="'.$option.'"]', array('value' => $value)); - } - } - - /** - * Get option value - * - * - * $pages_limit = Option::get('pages_limit'); - * if ($pages_limit == '10') { - * // do something... - * } - * - * - * @param string $option Name of option to get. - * @return string - */ - public static function get($option) - { - // Redefine vars - $option = (string) $option; - - // Select specific option - $option_name = Option::$options->select('[name="'.$option.'"]', null); - - // Return specific option value - return isset($option_name['value']) ? $option_name['value'] : ''; - } - - /** - * Delete option - * - * - * Option::delete('pages_limit'); - * - * - * @param string $option Name of option to delete. - * @return boolean - */ - public static function delete($option) - { - // Redefine vars - $option = (string) $option; - - // Delete specific option - return Option::$options->deleteWhere('[name="'.$option.'"]'); - } - - /** - * Check if option exist - * - * - * if (Option::exists('pages_limit')) { - * // do something... - * } - * - * - * @param string $option Name of option to check. - * @return boolean - */ - public static function exists($option) - { - // Redefine vars - $option = (string) $option; - - // Check if option exists - return (count(Option::$options->select('[name="'.$option.'"]', null)) > 0) ? true : false; - } -} diff --git a/engine/Plugin/Action.php b/engine/Plugin/Action.php deleted file mode 100644 index 5c60b21..0000000 --- a/engine/Plugin/Action.php +++ /dev/null @@ -1,113 +0,0 @@ - - * @link http://monstra.org - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - - -class Action -{ - /** - * Actions - * - * @var array - */ - public static $actions = array(); - - /** - * Protected constructor since this is a static class. - * - * @access protected - */ - protected function __construct() - { - // Nothing here - } - - /** - * Hooks a function on to a specific action. - * - * - * // Hooks a function "newLink" on to a "footer" action. - * Action::add('footer', 'newLink', 10); - * - * function newLink() { - * echo 'My link'; - * } - * - * - * @param string $action_name Action name - * @param mixed $added_function Added function - * @param integer $priority Priority. Default is 10 - * @param array $args Arguments - */ - public static function add($action_name, $added_function, $priority = 10, array $args = null) - { - // Hooks a function on to a specific action. - Action::$actions[] = array( - 'action_name' => (string) $action_name, - 'function' => $added_function, - 'priority' => (int) $priority, - 'args' => $args - ); - } - - /** - * Run functions hooked on a specific action hook. - * - * - * // Run functions hooked on a "footer" action hook. - * Action::run('footer'); - * - * - * @param string $action_name Action name - * @param array $args Arguments - * @param boolean $return Return data or not. Default is false - * @return mixed - */ - public static function run($action_name, $args = array(), $return = false) - { - // Redefine arguments - $action_name = (string) $action_name; - $return = (bool) $return; - - // Run action - if (count(Action::$actions) > 0) { - - // Sort actions by priority - $actions = Arr::subvalSort(Action::$actions, 'priority'); - - // Loop through $actions array - foreach ($actions as $action) { - - // Execute specific action - if ($action['action_name'] == $action_name) { - - // isset arguments ? - if (isset($args)) { - - // Return or Render specific action results ? - if ($return) { - return call_user_func_array($action['function'], $args); - } else { - call_user_func_array($action['function'], $args); - } - } else { - if ($return) { - return call_user_func_array($action['function'], $action['args']); - } else { - call_user_func_array($action['function'], $action['args']); - } - } - } - } - } - } -} diff --git a/engine/Plugin/Backend.php b/engine/Plugin/Backend.php deleted file mode 100644 index ace64e2..0000000 --- a/engine/Plugin/Backend.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @link http://monstra.org - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -class Backend -{ - public static function main() - { - } -} diff --git a/engine/Plugin/Filter.php b/engine/Plugin/Filter.php deleted file mode 100644 index d343191..0000000 --- a/engine/Plugin/Filter.php +++ /dev/null @@ -1,120 +0,0 @@ - - * @link http://monstra.org - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - - -class Filter -{ - /** - * Filters - * - * @var array - */ - public static $filters = array(); - - /** - * Protected constructor since this is a static class. - * - * @access protected - */ - protected function __construct() - { - // Nothing here - } - - /** - * Apply filters - * - * - * Filter::apply('content', $content); - * - * - * @param string $filter_name The name of the filter hook. - * @param mixed $value The value on which the filters hooked. - * @return mixed - */ - public static function apply($filter_name, $value) - { - // Redefine arguments - $filter_name = (string) $filter_name; - - $args = array_slice(func_get_args(), 2); - - if (! isset(Filter::$filters[$filter_name])) { - return $value; - } - - foreach (Filter::$filters[$filter_name] as $priority => $functions) { - if (! is_null($functions)) { - foreach ($functions as $function) { - $all_args = array_merge(array($value), $args); - $function_name = $function['function']; - $accepted_args = $function['accepted_args']; - if ($accepted_args == 1) { - $the_args = array($value); - } elseif ($accepted_args > 1) { - $the_args = array_slice($all_args, 0, $accepted_args); - } elseif ($accepted_args == 0) { - $the_args = null; - } else { - $the_args = $all_args; - } - $value = call_user_func_array($function_name, $the_args); - } - } - } - - return $value; - } - - /** - * Add filter - * - * - * Filter::add('content', 'replacer'); - * - * function replacer($content) { - * return preg_replace(array('/\[b\](.*?)\[\/b\]/ms'), array('\1'), $content); - * } - * - * - * @param string $filter_name The name of the filter to hook the $function_to_add to. - * @param mixed $function_to_add The name of the function to be called when the filter is applied. - * @param integer $priority Function to add priority - default is 10. - * @param integer $accepted_args The number of arguments the function accept default is 1. - * @return boolean - */ - public static function add($filter_name, $function_to_add, $priority = 10, $accepted_args = 1) - { - // Redefine arguments - $filter_name = (string) $filter_name; - $function_to_add = $function_to_add; - $priority = (int) $priority; - $accepted_args = (int) $accepted_args; - - // Check that we don't already have the same filter at the same priority. Thanks to WP :) - if (isset(Filter::$filters[$filter_name]["$priority"])) { - foreach (Filter::$filters[$filter_name]["$priority"] as $filter) { - if ($filter['function'] == $function_to_add) { - return true; - } - } - } - - Filter::$filters[$filter_name]["$priority"][] = array('function' => $function_to_add, 'accepted_args' => $accepted_args); - - // Sort - ksort(Filter::$filters[$filter_name]["$priority"]); - - return true; - } -} diff --git a/engine/Plugin/Frontend.php b/engine/Plugin/Frontend.php deleted file mode 100644 index 63a3335..0000000 --- a/engine/Plugin/Frontend.php +++ /dev/null @@ -1,40 +0,0 @@ - - * @link http://monstra.org - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - - -class Frontend -{ - public static function main() - { - } - public static function title() - { - return ''; - } - public static function description() - { - return ''; - } - public static function keywords() - { - return ''; - } - public static function template() - { - return 'index'; - } - public static function content() - { - return ''; - } -} diff --git a/engine/Plugin/I18n.php b/engine/Plugin/I18n.php deleted file mode 100644 index f79e253..0000000 --- a/engine/Plugin/I18n.php +++ /dev/null @@ -1,203 +0,0 @@ - - * @link http://monstra.org - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - - -class I18n -{ - /** - * Locales array - * - * @var array - */ - public static $locales = array( - 'ar' => 'العربية', - 'bg' => 'БългарÑки', - 'ca' => 'Català', - 'cs' => 'ÄŒesky', - 'da' => 'Dansk', - 'de' => 'Deutsch', - 'el' => 'Ελληνικά', - 'en' => 'English', - 'es' => 'Español', - 'fa' => 'Farsi', - 'fi' => 'Suomi', - 'fr' => 'Français', - 'gl' => 'Galego', - 'ka-ge' => 'Georgian', - 'hu' => 'Magyar', - 'it' => 'Italiano', - 'id' => 'Bahasa Indonesia', - 'ja' => '日本語', - 'lt' => 'Lietuvių', - 'nl' => 'Nederlands', - 'no' => 'Norsk', - 'pl' => 'Polski', - 'pt' => 'Português', - 'pt-br' => 'Português do Brasil', - 'ru' => 'РуÑÑкий', - 'sk' => 'SlovenÄina', - 'sl' => 'SlovenÅ¡Äina', - 'sv' => 'Svenska', - 'sr' => 'Srpski', - 'tr' => 'Türkçe', - 'uk' => 'УкраїнÑька', - 'zh-cn' => '简体中文', - ); - - /** - * Dictionary - * - * @var array - */ - public static $dictionary = array(); - - /** - * An instance of the I18n class - * - * @var I18n - */ - protected static $instance = null; - - /** - * Initializing I18n - * - * @param string $dir Plugins directory - */ - public static function init($locale) - { - if (! isset(self::$instance)) { - self::$instance = new I18n($locale); - } - return self::$instance; - } - - /** - * Protected clone method to enforce singleton behavior. - * - * @access protected - */ - protected function __clone() - { - // Nothing here. - } - - /** - * Construct - */ - protected function __construct($locale) - { - // Redefine arguments - $locale = (string) $locale; - - // Get lang table for current locale - $lang_table = Cache::get('i18n', $locale); - - // If lang_table is empty then create new - if (! $lang_table) { - - // Get plugins Table - $plugins = new Table('plugins'); - - // Get all plugins - $records = $plugins->select(null, 'all', null, array('location', 'priority'), 'priority', 'ASC'); - - // Init var - $lang_table = array(); - - // Loop through each installed plugin - foreach ($records as $record) { - if (is_dir(ROOT . DS . dirname($record['location']) . DS . 'languages')) { - - // Init var - $t = array(); - - // Check lang file - if (file_exists(ROOT . DS . dirname($record['location']) . DS . 'languages' . DS . $locale . '.lang.php')) { - - // Merge the language strings into the sub table - $t = array_merge($t, include ROOT . DS . dirname($record['location']) . DS . 'languages' . DS . $locale . '.lang.php'); - } - - // Append the sub table, preventing less specific language files from overloading more specific files - $lang_table += $t; - } - } - - // Save lang table for current locale - Cache::put('i18n', $locale, $lang_table); - - // Update dictionary - I18n::$dictionary = $lang_table; - } - - // Update dictionary - I18n::$dictionary = $lang_table; - } - - /** - * Returns translation of a string. If no translation exists, the original - * string will be returned. No parameters are replaced. - * - * - * $hello = I18n::find('Hello friends, my name is :name', 'namespace'); - * - * - * @param string $string Text to translate - * @param string $namespace Namespace - * @return string - */ - public static function find($string, $namespace = null) - { - // Redefine arguments - $string = (string) $string; - - // Return string - if (isset(I18n::$dictionary[$namespace][$string])) { - return I18n::$dictionary[$namespace][$string]; - } else { - return $string; - } - } -} - -/** - * Global Translation/internationalization function. - * Accepts an English string and returns its translation - * to the active system language. If the given string is not available in the - * current dictionary the original English string will be returned. - * - * - * // Display a translated message - * echo __('Hello, world', 'namespace'); - * - * // With parameter replacement - * echo __('Hello, :user', 'namespace', array(':user' => $username)); - * - * - * @global array $dictionary Dictionary - * @param string $string String to translate - * @param array $values Values to replace in the translated text - * @param string $namespace Namespace - * @return string - */ -function __($string, $namespace = null, array $values = null) -{ - // Redefine arguments - $string = (string) $string; - - // Find string in dictionary - $string = I18n::find($string, $namespace); - - // Return string - return empty($values) ? $string : strtr($string, $values); -} diff --git a/engine/Plugin/Javascript.php b/engine/Plugin/Javascript.php deleted file mode 100644 index 5126f98..0000000 --- a/engine/Plugin/Javascript.php +++ /dev/null @@ -1,137 +0,0 @@ - - * @link http://monstra.org - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - - -class Javascript -{ - /** - * Javascripts - * - * @var array - */ - public static $javascripts = array(); - - /** - * Protected constructor since this is a static class. - * - * @access protected - */ - protected function __construct() - { - // Nothing here - } - - /** - * Add javascript - * - * - * Javascript::add('path/to/my/script1.js'); - * Javascript::add('path/to/my/script2.js', 'frontend', 11); - * Javascript::add('path/to/my/script3.js', 'backend', 12); - * - * - * @param string $file File path - * @param string $load Load script on frontend, backend or both - * @param inteeer $priority Priority default is 10 - */ - public static function add($file, $load = 'frontend', $priority = 10) - { - Javascript::$javascripts[] = array( - 'file' => (string) $file, - 'load' => (string) $load, - 'priority' => (int) $priority, - ); - } - - /** - * Combine and load site javascript - */ - public static function load() - { - $backend_site_js_path = MINIFY . DS . 'backend_site.minify.js'; - $frontend_site_js_path = MINIFY . DS . 'frontend_site.minify.'.Option::get('javascript_version').'.js'; - - // Load javascripts - if (count(Javascript::$javascripts) > 0) { - $backend_buffer = ''; - $backend_regenerate = false; - - $frontend_buffer = ''; - $frontend_regenerate = false; - - // Sort javascripts by priority - $javascripts = Arr::subvalSort(Javascript::$javascripts, 'priority'); - - if (BACKEND) { - - // Build backend site javascript - foreach ($javascripts as $javascript) { - if ((file_exists(ROOT . DS . $javascript['file'])) and (($javascript['load'] == 'backend') or ($javascript['load'] == 'both'))) { - if (! file_exists($backend_site_js_path) or filemtime(ROOT . DS . $javascript['file']) > filemtime($backend_site_js_path)) { - $backend_regenerate = true; - break; - } - } - } - - // Regenerate site javascript - if ($backend_regenerate) { - foreach ($javascripts as $javascript) { - if ((file_exists(ROOT . DS . $javascript['file'])) and (($javascript['load'] == 'backend') or ($javascript['load'] == 'both'))) { - $backend_buffer .= file_get_contents(ROOT . DS . $javascript['file'])."\n"; - } - } - file_put_contents($backend_site_js_path, $backend_buffer); - $backend_regenerate = false; - } - } else { - - // Build frontend site javascript - foreach ($javascripts as $javascript) { - if ((file_exists(ROOT . DS . $javascript['file'])) and (($javascript['load'] == 'frontend') or ($javascript['load'] == 'both'))) { - if (! file_exists($frontend_site_js_path) or filemtime(ROOT . DS . $javascript['file']) > filemtime($frontend_site_js_path)) { - $frontend_regenerate = true; - break; - } - } - } - - // Regenerate site javascript - if ($frontend_regenerate) { - foreach ($javascripts as $javascript) { - if ((file_exists(ROOT . DS . $javascript['file'])) and (($javascript['load'] == 'frontend') or ($javascript['load'] == 'both'))) { - $frontend_buffer .= file_get_contents(ROOT . DS . $javascript['file'])."\n"; - } - } - file_put_contents($frontend_site_js_path, $frontend_buffer); - $frontend_regenerate = false; - } - } - - // Render - if (BACKEND) { - echo ''; - } else { - echo ''."\n"; - } - } - } - - /** - * javascriptVersionIncrement - */ - public static function javascriptVersionIncrement() - { - Option::update('javascript_version', (int) Option::get('javascript_version') + 1); - } -} diff --git a/engine/Plugin/Navigation.php b/engine/Plugin/Navigation.php deleted file mode 100644 index b5270e5..0000000 --- a/engine/Plugin/Navigation.php +++ /dev/null @@ -1,202 +0,0 @@ - - * @link http://monstra.org - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - - -class Navigation -{ - /** - * Items - * - * @var array - */ - public static $items = array(); - - /** - * Navigation types - */ - const LEFT = 1; - const TOP = 2; - - /** - * Add new item - * - * - * // Add link for left navigation - * Navigation::add(__('Blog'), 'content', 'blog', 11); - * - * // Add link for top navigation - * Navigation::add(__('View site'), 'top', 'http://site.com/', 11, Navigation::TOP, true); - * - * - * @param string $name Name - * @param string $category Category - * @param stirng $link Link - * @param integer $priority Priority. Default is 10 - * @param integer $type Type. Default is LEFT - * @param bool $external External or not. Default is false - */ - public static function add($name, $category, $id, $priority = 10, $type = Navigation::LEFT, $external = false) - { - Navigation::$items[] = array( - 'name' => (string) $name, - 'category' => (string) $category, - 'id' => (string) $id, - 'priority' => (int) $priority, - 'type' => (int) $type, - 'external' => (bool) $external, - ); - } - - /** - * Draw items - * - * - * Navigation::draw('content'); - * Navigation::draw('top', Navigation::TOP); - * - * - * @param string $category Category - * @param integer $type Type. Default is LEFT - */ - public static function draw($category, $type = Navigation::LEFT) - { - // Sort items by priority - $items = Arr::subvalSort(Navigation::$items, 'priority'); - - // Draw left navigation - if ($type == Navigation::LEFT) { - - // Loop trough the items - foreach ($items as $item) { - - // If current plugin id == selected item id then set class to current - if (Request::get('id') == $item['id'] && $item['external'] == false) { - $class = 'class = "current" '; - } else { - $class = ''; - } - - // If current category == item category and navigation type is left them draw this item - if ($item['category'] == $category && $item['type'] == Navigation::LEFT) { - - // Is external item id or not ? - if ($item['external'] == false) { - echo '
  • '.$item['name'].'
  • '; - } else { - echo '
  • '.$item['name'].'
  • '; - } - } - } - } elseif ($type == Navigation::TOP) { - // Draw top navigation - foreach ($items as $item) { - if ($item['category'] == $category && $item['type'] == Navigation::TOP) { - if ($item['external'] == false) { - echo ''.$item['name'].''.Html::nbsp(2); - } else { - echo ''.$item['name'].''.Html::nbsp(2); - } - } - } - } - } - - /** - * Draw items - * - * - * Navigation::draw('content'); - * Navigation::draw('top', Navigation::TOP); - * - * - * @param string $category Category - * @param integer $type Type. Default is LEFT - */ - public static function get($category, $type = Navigation::LEFT) - { - // Sort items by priority - $items = Arr::subvalSort(Navigation::$items, 'priority'); - - // Draw left navigation - if ($type == Navigation::LEFT) { - - // Loop trough the items - foreach ($items as $item) { - - // If current plugin id == selected item id then set class to current - if (Request::get('id') == $item['id'] && $item['external'] == false) { - $class = 'class = "current" '; - } else { - $class = ''; - } - - // If current category == item category and navigation type is left them draw this item - if ($item['category'] == $category && $item['type'] == Navigation::LEFT) { - - // Is external item id or not ? - if ($item['external'] == false) { - echo '
  • '.$item['name'].'
  • '; - } else { - echo '
  • '.$item['name'].'
  • '; - } - } - } - } elseif ($type == Navigation::TOP) { - // Draw top navigation - foreach ($items as $item) { - if ($item['category'] == $category && $item['type'] == Navigation::TOP) { - if ($item['external'] == false) { - echo ''.$item['name'].''.Html::nbsp(2); - } else { - echo ''.$item['name'].''.Html::nbsp(2); - } - } - } - } - } - - /** - * Draw dropdown items - * - * - * Navigation::getDropdown('content'); - * - * - * @param string $category Category - */ - public static function getDropdown($category) - { - // Sort items by priority - $items = Arr::subvalSort(Navigation::$items, 'priority'); - - // Loop trough the items - foreach ($items as $item) { - - // If current plugin id == selected item id then set class to current - if (Request::get('id') == $item['id'] && $item['external'] == false) { - $class = 'selected = "selected" '; - } else { - $class = ''; - } - - // If current category == item category and navigation type is left them draw this item - if ($item['category'] == $category && $item['type'] == Navigation::LEFT) { - - // Is external item id or not ? - if ($item['external'] == false) { - echo ''; - } - } - } - } -} diff --git a/engine/Plugin/Plugin.php b/engine/Plugin/Plugin.php deleted file mode 100644 index b7bcfdf..0000000 --- a/engine/Plugin/Plugin.php +++ /dev/null @@ -1,185 +0,0 @@ - - * @link http://monstra.org - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - - -class Plugin -{ - /** - * Plugins - * - * @var array - */ - public static $plugins = array(); - - /** - * Components - * - * @var array - */ - public static $components = array(); - - /** - * An instance of the Plugin class - * - * @var plugin - */ - protected static $instance = null; - - /** - * Initializing plugins - * - * @return Plugin - */ - public static function init() - { - if (! isset(self::$instance)) { - self::$instance = new Plugin(); - } - return self::$instance; - } - - /** - * Protected clone method to enforce singleton behavior. - * - * @access protected - */ - protected function __clone() - { - // Nothing here. - } - - /** - * Construct - */ - protected function __construct() - { - // Get plugins Table - $plugins = new Table('plugins'); - - // Select all plugins - $records = $plugins->select(null, 'all', null, array('location', 'status', 'priority'), 'priority', 'ASC'); - - // Now include plugins from $records plugins array - // If plugin is active then load it to the system. - foreach ($records as $record) { - if ($record['status'] == 'active') { - include_once ROOT . DS . $record['location']; - } - } - } - - /** - * Get plugin admin - * - * - * // Get admin for Blog plugin - * Plugin::admin('blog'); - * - * - * @param string $plug Plugin Name - * @param string $alt_folder Alternative plugin folder - */ - public static function admin($plug, $alt_folder = null) - { - // Redefine arguments - $plug = (string) $plug; - - // Plugin admin extension - $ext = '.admin.php'; - - // Plugin admin can be loaded only in backend - if (BACKEND) { - - // Plugin admin folder - if (! empty($alt_folder)) { - $folder = $alt_folder . DS . strtolower($plug); - } else { - $folder = strtolower($plug); - } - - // Path to plugin admin file - $path = PLUGINS . DS . $folder . DS . $plug . $ext; - - // Load plugin admin - if (File::exists($path)) { - include $path; - } - } - } - - /** - * Register new plugin in system - * - * - * // Register plugin - * Plugin::register( __FILE__, - * __('Blog'), - * __('Blog plugin'), - * '1.0.0', - * 'Awilum', - * 'http://example.org/', - * 'blog'); - * - * - * @param string $file Plugin file - * @param string $title Plugin title - * @param string $description Plugin description - * @param string $version Plugin version - * @param string $author Plugin author - * @param string $author_uri Plugin author uri - * @param string $component Plugin as component - * @param boolean $box Plugin as box - */ - public static function register($file, $title, $description = null, $version = null, $author = null, $author_uri = null, $component = null, $box = false) - { - // Redefine arguments - $file = (string) $file; - $title = (string) $title; - $description = ($description === null) ? null : (string) $description; - $version = ($version === null) ? null : (string) $version; - $author = ($author === null) ? null : (string) $author; - $author_uri = ($author_uri === null) ? null : (string) $author_uri; - $component = ($component === null) ? null : (string) $component; - $box = (bool) $box; - - // Get plugin id from name.plugin.php - $id = strtolower(basename($file, '.plugin.php')); - - // Set plugin privilege 'box' if $box is true - if ($box) { - $privilege = 'box'; - } else { - $privilege = ''; - } - - // Register plugin in global plugins array. - Plugin::$plugins[$id] = array( - 'id' => $id, - 'title' => $title, - 'privilege' => $privilege, - 'version' => $version, - 'description' => $description, - 'author' => $author, - 'author_uri' => $author_uri, - ); - - // Add plugin as a component - // Plugin - component will be available at the link sitename/component_name - // Example: - // www.example.org/guestbook - // www.example.org/news - if (! empty($component)) { - Plugin::$components[] = $component; - } - } -} diff --git a/engine/Plugin/Stylesheet.php b/engine/Plugin/Stylesheet.php deleted file mode 100644 index 4907805..0000000 --- a/engine/Plugin/Stylesheet.php +++ /dev/null @@ -1,153 +0,0 @@ - - * @link http://monstra.org - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - - -class Stylesheet -{ - /** - * Stylesheets - * - * @var array - */ - public static $stylesheets = array(); - - /** - * Protected constructor since this is a static class. - * - * @access protected - */ - protected function __construct() - { - // Nothing here - } - - /** - * Add stylesheet - * - * - * Stylesheet::add('path/to/my/stylesheet1.css'); - * Stylesheet::add('path/to/my/stylesheet2.css', 'frontend', 11); - * Stylesheet::add('path/to/my/stylesheet3.css', 'backend',12); - * - * - * @param string $file File path - * @param string $load Load stylesheet on frontend, backend or both - * @param integer $priority Priority. Default is 10 - */ - public static function add($file, $load = 'frontend', $priority = 10) - { - Stylesheet::$stylesheets[] = array( - 'file' => (string) $file, - 'load' => (string) $load, - 'priority' => (int) $priority, - ); - } - - /** - * Minify, combine and load site stylesheet - */ - public static function load() - { - $backend_site_css_path = MINIFY . DS . 'backend_site.minify.css'; - $frontend_site_css_path = MINIFY . DS . 'frontend_site.minify.'.Option::get('styles_version').'.css'; - - // Load stylesheets - if (count(Stylesheet::$stylesheets) > 0) { - $backend_buffer = ''; - $backend_regenerate = false; - - $frontend_buffer = ''; - $frontend_regenerate = false; - - // Sort stylesheets by priority - $stylesheets = Arr::subvalSort(Stylesheet::$stylesheets, 'priority'); - - if (BACKEND) { - - // Build backend site stylesheets - foreach ($stylesheets as $stylesheet) { - if ((file_exists(ROOT . DS . $stylesheet['file'])) and (($stylesheet['load'] == 'backend') or ($stylesheet['load'] == 'both'))) { - if (! file_exists($backend_site_css_path) or filemtime(ROOT . DS . $stylesheet['file']) > filemtime($backend_site_css_path)) { - $backend_regenerate = true; - break; - } - } - } - - // Regenerate site stylesheet - if ($backend_regenerate) { - foreach ($stylesheets as $stylesheet) { - if ((file_exists(ROOT . DS . $stylesheet['file'])) and (($stylesheet['load'] == 'backend') or ($stylesheet['load'] == 'both'))) { - $backend_buffer .= file_get_contents(ROOT . DS . $stylesheet['file']); - } - } - $backend_buffer = Stylesheet::parseVariables($backend_buffer); - file_put_contents($backend_site_css_path, MinifyCSS::process($backend_buffer)); - $backend_regenerate = false; - } - } else { - - // Build frontend site stylesheets - foreach ($stylesheets as $stylesheet) { - if ((file_exists(ROOT . DS . $stylesheet['file'])) and (($stylesheet['load'] == 'frontend') or ($stylesheet['load'] == 'both'))) { - if (! file_exists($frontend_site_css_path) or filemtime(ROOT . DS . $stylesheet['file']) > filemtime($frontend_site_css_path)) { - $frontend_regenerate = true; - break; - } - } - } - - // Regenerate site stylesheet - if ($frontend_regenerate) { - foreach ($stylesheets as $stylesheet) { - if ((file_exists(ROOT . DS . $stylesheet['file'])) and (($stylesheet['load'] == 'frontend') or ($stylesheet['load'] == 'both'))) { - $frontend_buffer .= file_get_contents(ROOT . DS . $stylesheet['file']); - } - } - $frontend_buffer = Stylesheet::parseVariables($frontend_buffer); - file_put_contents($frontend_site_css_path, MinifyCSS::process($frontend_buffer)); - $frontend_regenerate = false; - } - } - - // Render - if (BACKEND) { - echo ''; - } else { - echo ''."\n"; - } - } - } - - /** - * CSS Parser - */ - public static function parseVariables($frontend_buffer) - { - return str_replace(array('@site_url', - '@theme_site_url', - '@theme_admin_url'), - array(Option::get('siteurl'), - Option::get('siteurl').'/public/themes/'.Option::get('theme_site_name'), - Option::get('siteurl').'/admin/themes/'.Option::get('theme_admin_name')), - $frontend_buffer); - } - - /** - * stylesVersionIncrement - */ - public static function stylesVersionIncrement() - { - Option::update('styles_version', (int) Option::get('styles_version') + 1); - } -} diff --git a/engine/Plugin/View.php b/engine/Plugin/View.php deleted file mode 100644 index d24cdec..0000000 --- a/engine/Plugin/View.php +++ /dev/null @@ -1,236 +0,0 @@ - - * @link http://monstra.org - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - - -class View -{ - /** - * Path to view file. - * - * @var string - */ - protected $view_file; - - /** - * View variables. - * - * @var array - */ - protected $vars = array(); - - /** - * Global view variables. - * - * @var array - */ - protected static $global_vars = array(); - - /** - * The output. - * - * @var string - */ - protected $output; - - /** - * Create a new view object. - * - * - * // Create new view object - * $view = new View('blog/views/backend/index'); - * - * // Assign some new variables - * $view->assign('msg', 'Some message...'); - * - * // Get view - * $output = $view->render(); - * - * // Display view - * echo $output; - * - * - * @param string $view Name of the view file - * @param array $variables Array of view variables - */ - public function __construct($view, array $variables = array()) - { - // Set view file - // From current theme folder or from plugin folder - if (File::exists($theme_view_file = THEMES_SITE . DS . Site::theme() . DS . $view . '.view.php') && BACKEND == false) { - $this->view_file = $theme_view_file; - } else { - $this->view_file = PLUGINS . DS . $view . '.view.php'; - } - - // Is view file exists ? - if (file_exists($this->view_file) === false) { - throw new RuntimeException(vsprintf("%s(): The '%s' view does not exist.", array(__METHOD__, $view))); - } - - // Set view variables - $this->vars = $variables; - } - - /** - * View factory - * - * - * // Create new view object, assign some variables - * // and displays the rendered view in the browser. - * View::factory('blog/views/backend/index') - * ->assign('msg', 'Some message...') - * ->display(); - * - * - * @param string $view Name of the view file - * @param array $variables Array of view variables - * @return View - */ - public static function factory($view, array $variables = array()) - { - return new View($view, $variables); - } - - /** - * Assign a view variable. - * - * - * $view->assign('msg', 'Some message...'); - * - * - * @param string $key Variable name - * @param mixed $value Variable value - * @param boolean $global Set variable available in all views - * @return View - */ - public function assign($key, $value, $global = false) - { - // Assign a new view variable (global or locale) - if ($global === false) { - $this->vars[$key] = $value; - } else { - View::$global_vars[$key] = $value; - } - - return $this; - } - - /** - * Include the view file and extracts the view variables before returning the generated output. - * - * - * // Get view - * $output = $view->render(); - * - * // Display output - * echo $output; - * - * - * @param string $filter Callback function used to filter output - * @return string - */ - public function render($filter = null) - { - // Is output empty ? - if (empty($this->output)) { - - // Extract variables as references - extract(array_merge($this->vars, View::$global_vars), EXTR_REFS); - - // Turn on output buffering - ob_start(); - - // Include view file - include($this->view_file); - - // Output... - $this->output = ob_get_clean(); - } - - // Filter output ? - if ($filter !== null) { - $this->output = call_user_func($filter, $this->output); - } - - // Return output - return $this->output; - } - - /** - * Displays the rendered view in the browser. - * - * - * $view->display(); - * - * - */ - public function display() - { - echo $this->render(); - } - - /** - * Magic setter method that assigns a view variable. - * - * @param string $key Variable name - * @param mixed $value Variable value - */ - public function __set($key, $value) - { - $this->vars[$key] = $value; - } - - /** - * Magic getter method that returns a view variable. - * - * @param string $key Variable name - * @return mixed - */ - public function __get($key) - { - if (isset($this->vars[$key])) { - return $this->vars[$key]; - } - } - - /** - * Magic isset method that checks if a view variable is set. - * - * @param string $key Variable name - * @return boolean - */ - public function __isset($key) - { - return isset($this->vars[$key]); - } - - /** - * Magic unset method that unsets a view variable. - * - * @param string $key Variable name - */ - public function __unset($key) - { - unset($this->vars[$key]); - } - - /** - * Method that magically converts the view object into a string. - * - * @return string - */ - public function __toString() - { - return $this->render(); - } -} diff --git a/engine/Security.php b/engine/Security.php deleted file mode 100644 index d569eee..0000000 --- a/engine/Security.php +++ /dev/null @@ -1,239 +0,0 @@ - - * @link http://monstra.org - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - - -class Security -{ - /** - * Key name for token storage - * - * @var string - */ - protected static $token_name = 'security_token'; - - /** - * Protected constructor since this is a static class. - * - * @access protected - */ - protected function __construct() - { - // Nothing here - } - - /** - * Generate and store a unique token which can be used to help prevent - * [CSRF](http://wikipedia.org/wiki/Cross_Site_Request_Forgery) attacks. - * - * - * $token = Security::token(); - * - * - * You can insert this token into your forms as a hidden field: - * - * - * echo Form::hidden('csrf', Security::token()); - * - * - * This provides a basic, but effective, method of preventing CSRF attacks. - * - * @param boolean $new force a new token to be generated?. Default is false - * @return string - */ - public static function token($new = false) - { - // Get the current token - $token = Session::get(Security::$token_name); - - // Create a new unique token - if ($new === true or ! $token) { - - // Generate a new unique token - $token = sha1(uniqid(mt_rand(), true)); - - // Store the new token - Session::set(Security::$token_name, $token); - } - - // Return token - return $token; - } - - /** - * Check that the given token matches the currently stored security token. - * - * - * if (Security::check($token)) { - * // Pass - * } - * - * - * @param string $token token to check - * @return boolean - */ - public static function check($token) - { - return Security::token() === $token; - } - - /** - * Encrypt password - * - * - * $encrypt_password = Security::encryptPassword('password'); - * - * - * @param string $password Password to encrypt - */ - public static function encryptPassword($password) - { - return md5(md5(trim($password) . MONSTRA_PASSWORD_SALT)); - } - - /** - * Create safe name. Use to create safe username, filename, pagename. - * - * - * $safe_name = Security::safeName('hello world'); - * - * - * @param string $str String - * @param mixed $delimiter String delimiter - * @param boolean $lowercase String Lowercase - * @return string - */ - public static function safeName($str, $delimiter = '-', $lowercase = false) - { - // Redefine vars - $str = (string) $str; - $delimiter = $delimiter; - $lowercase = (bool) $lowercase; - $delimiter = $delimiter; - - // Remove tags - $str = filter_var($str, FILTER_SANITIZE_STRING); - - // Decode all entities to their simpler forms - $str = html_entity_decode($str, ENT_QUOTES, 'UTF-8'); - - // Reserved characters (RFC 3986) - $reserved_characters = array( - '/', '?', ':', '@', '#', '[', ']', - '!', '$', '&', '\'', '(', ')', '*', - '+', ',', ';', '=' - ); - - // Remove reserved characters - $str = str_replace($reserved_characters, ' ', $str); - - // Set locale to en_US.UTF8 - setlocale(LC_ALL, 'en_US.UTF8'); - - // Translit ua,ru => latin - $str = Text::translitIt($str); - - // Convert string - $str = iconv('UTF-8', 'ASCII//TRANSLIT', $str); - - // Remove characters - $str = preg_replace("/[^a-zA-Z0-9\/_|+ -]/", '', $str); - if ($delimiter != null) { - $str = preg_replace("/[\/_|+ -]+/", $delimiter, $str); - $str = trim($str, $delimiter); - } - - // Lowercase - if ($lowercase === true) { - $str = Text::lowercase($str); - } - - // Return safe name - return $str; - } - - /** - * Create safe url. - * - * - * $url = Security::sanitizeURL('http://test.com'); - * - * - * @param string $url Url to sanitize - * @return string - */ - public static function sanitizeURL($url) - { - $url = trim($url); - $url = rawurldecode($url); - $url = str_replace(array('--', '"', '!', '@', '#', '$', '%', '^', '*', '(', ')', '+', '{', '}', '|', ':', '"', '<', '>', - '[', ']', '\\', ';', "'", ',', '*', '+', '~', '`', 'laquo', 'raquo', ']>', '‘', '’', '“', '”', '–', '—'), - array('-', '-', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''), - $url); - $url = str_replace('--', '-', $url); - $url = rtrim($url, "-"); - - $url = str_replace('..', '', $url); - $url = str_replace('//', '', $url); - $url = preg_replace('/^\//', '', $url); - $url = preg_replace('/^\./', '', $url); - - return $url; - } - - /** - * Sanitize URL to prevent XSS - Cross-site scripting - */ - public static function runSanitizeURL() - { - $_GET = array_map('Security::sanitizeURL', $_GET); - } - - /** - * That prevents null characters between ascii characters. - * - * @param string $str String - */ - public static function removeInvisibleCharacters($str) - { - // Redefine vars - $str = (string) $str; - - // Thanks to ci for this tip :) - $non_displayables = array('/%0[0-8bcef]/', '/%1[0-9a-f]/', '/[\x00-\x08]/', '/\x0b/', '/\x0c/', '/[\x0e-\x1f]/'); - - do { - $cleaned = $str; - $str = preg_replace($non_displayables, '', $str); - } while ($cleaned != $str); - - // Return safe string - return $str; - } - - /** - * Sanitize data to prevent XSS - Cross-site scripting - * - * @param string $str String - */ - public static function xssClean($str) - { - // Remove invisible characters - $str = Security::removeInvisibleCharacters($str); - - // Convert html to plain text - $str = Html::toText($str); - - // Return safe string - return $str; - } -} diff --git a/engine/Shortcode.php b/engine/Shortcode.php deleted file mode 100644 index be2480b..0000000 --- a/engine/Shortcode.php +++ /dev/null @@ -1,164 +0,0 @@ - - * @link http://monstra.org - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - - -class Shortcode -{ - /** - * Shortcode tags array - * - * @var shortcode_tags - */ - protected static $shortcode_tags = array(); - - /** - * Protected constructor since this is a static class. - * - * @access protected - */ - protected function __construct() - { - // Nothing here - } - - /** - * Add new shortcode - * - * - * function returnSiteUrl() { - * return Option::get('siteurl'); - * } - * - * // Add shortcode {siteurl} - * Shortcode::add('siteurl', 'returnSiteUrl'); - * - * - * @param string $shortcode Shortcode tag to be searched in content. - * @param string $callback_function The callback function to replace the shortcode with. - */ - public static function add($shortcode, $callback_function) - { - // Redefine vars - $shortcode = (string) $shortcode; - - // Add new shortcode - if (is_callable($callback_function)) { - Shortcode::$shortcode_tags[$shortcode] = $callback_function; - } - } - - /** - * Remove a specific registered shortcode. - * - * - * Shortcode::delete('shortcode_name'); - * - * - * @param string $shortcode Shortcode tag. - */ - public static function delete($shortcode) - { - // Redefine vars - $shortcode = (string) $shortcode; - - // Delete shortcode - if (Shortcode::exists($shortcode)) { - unset(Shortcode::$shortcode_tags[$shortcode]); - } - } - - /** - * Remove all registered shortcodes. - * - * - * Shortcode::clear(); - * - * - */ - public static function clear() - { - Shortcode::$shortcode_tags = array(); - } - - /** - * Check if a shortcode has been registered. - * - * - * if (Shortcode::exists('shortcode_name')) { - * // do something... - * } - * - * - * @param string $shortcode Shortcode tag. - */ - public static function exists($shortcode) - { - // Redefine vars - $shortcode = (string) $shortcode; - - // Check shortcode - return array_key_exists($shortcode, Shortcode::$shortcode_tags); - } - - /** - * Parse a string, and replace any registered shortcodes within it with the result of the mapped callback. - * - * - * $content = Shortcode::parse($content); - * - * - * @param string $content Content - * @return string - */ - public static function parse($content) - { - if (! Shortcode::$shortcode_tags) { - return $content; - } - - $shortcodes = implode('|', array_map('preg_quote', array_keys(Shortcode::$shortcode_tags))); - $pattern = "/(.?)\{([$shortcodes]+)(.*?)(\/)?\}(?(4)|(?:(.+?)\{\/\s*\\2\s*\}))?(.?)/s"; - - return preg_replace_callback($pattern, 'Shortcode::_handle', $content); - } - - /** - * _handle() - */ - protected static function _handle($matches) - { - $prefix = $matches[1]; - $suffix = $matches[6]; - $shortcode = $matches[2]; - - // Allow for escaping shortcodes by enclosing them in {{shortcode}} - if ($prefix == '{' && $suffix == '}') { - return substr($matches[0], 1, -1); - } - - $attributes = array(); // Parse attributes into into this array. - - if (preg_match_all('/(\w+) *= *(?:([\'"])(.*?)\\2|([^ "\'>]+))/', $matches[3], $match, PREG_SET_ORDER)) { - foreach ($match as $attribute) { - if (! empty($attribute[4])) { - $attributes[strtolower($attribute[1])] = $attribute[4]; - } elseif (! empty($attribute[3])) { - $attributes[strtolower($attribute[1])] = $attribute[3]; - } - } - } - - // Check if this shortcode realy exists then call user function else return empty string - return (isset(Shortcode::$shortcode_tags[$shortcode])) ? $prefix . call_user_func(Shortcode::$shortcode_tags[$shortcode], $attributes, $matches[5], $shortcode) . $suffix : ''; - } -} diff --git a/engine/Site.php b/engine/Site.php deleted file mode 100644 index 1c2d01a..0000000 --- a/engine/Site.php +++ /dev/null @@ -1,222 +0,0 @@ - - * @link http://monstra.org - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - - -class Site -{ - /** - * An instance of the Site class - * - * @var site - */ - protected static $instance = null; - - /** - * Initializing site - * - * @return Site - */ - public static function init() - { - if (! isset(self::$instance)) { - self::$instance = new Site(); - } - return self::$instance; - } - - /** - * Protected clone method to enforce singleton behavior. - * - * @access protected - */ - protected function __clone() - { - // Nothing here. - } - - /** - * Construct - */ - protected function __construct() - { - call_user_func(ucfirst(Uri::command()).'::main'); - } - - /** - * Get site name - * - * - * echo Site::name(); - * - * - * @return string - */ - public static function name() - { - return Option::get('sitename'); - } - - /** - * Get site theme - * - * - * echo Site::theme(); - * - * - * @return string - */ - public static function theme() - { - return Option::get('theme_site_name'); - } - - /** - * Get Page title - * - * - * echo Site::title(); - * - * - * @return string - */ - public static function title() - { - return call_user_func(ucfirst(Uri::command()).'::title'); - } - - /** - * Get page description - * - * - * echo Site::description(); - * - * - * @return string - */ - public static function description() - { - return (($description = trim(call_user_func(ucfirst(Uri::command()).'::description'))) == '') ? Html::toText(Option::get('description')) : Html::toText($description); - } - - /** - * Get page keywords - * - * - * echo Site::keywords(); - * - * - * @return string - */ - public static function keywords() - { - return (($keywords = trim(call_user_func(ucfirst(Uri::command()).'::keywords'))) == '') ? Html::toText(Option::get('keywords')) : Html::toText($keywords); - } - - /** - * Get site slogan - * - * - * echo Site::slogan(); - * - * - * @return string - */ - public static function slogan() - { - return Option::get('slogan'); - } - - /** - * Get page content - * - * - * echo Site::content(); - * - * - * @return string - */ - public static function content() - { - return Filter::apply('content', call_user_func(ucfirst(Uri::command()).'::content')); - } - - /** - * Get compressed template - * - * - * echo Site::template(); - * - * - * @param string $theme Theme name - * @return mixed - */ - public static function template($theme = null) - { - // Get specific theme or current theme - $current_theme = ($theme == null) ? Option::get('theme_site_name') : $theme ; - - // Get template - $template = call_user_func(ucfirst(Uri::command()).'::template'); - - // Check whether is there such a template in the current theme - // else return default template: index - // also compress template file :) - if (File::exists(THEMES_SITE . DS . $current_theme . DS . $template . '.template.php')) { - if (! file_exists(MINIFY . DS . 'theme.' . $current_theme . '.minify.' . $template . '.template.php') or - filemtime(THEMES_SITE . DS . $current_theme . DS . $template .'.template.php') > filemtime(MINIFY . DS . 'theme.' . $current_theme . '.minify.' . $template . '.template.php')) { - $buffer = file_get_contents(THEMES_SITE. DS . $current_theme . DS . $template .'.template.php'); - $buffer = MinifyHTML::process($buffer); - file_put_contents(MINIFY . DS . 'theme.' . $current_theme . '.minify.' . $template . '.template.php', $buffer); - } - - return 'minify.'.$template; - } else { - if (! File::exists(MINIFY . DS . 'theme.' . $current_theme . '.' . 'minify.index.template.php') or - filemtime(THEMES_SITE . DS . $current_theme . DS . 'index.template.php') > filemtime(MINIFY . DS . 'theme.' . $current_theme . '.' . 'minify.index.template.php')) { - $buffer = file_get_contents(THEMES_SITE . DS . $current_theme . DS . 'index.template.php'); - $buffer = MinifyHTML::process($buffer); - file_put_contents(MINIFY . DS . 'theme.' . $current_theme . '.' . 'minify.index.template.php', $buffer); - } - - return 'minify.index'; - } - } - - /** - * Get site url - * - * - * echo Site::url(); - * - * - * @return string - */ - public static function url() - { - return Option::get('siteurl'); - } - - /** - * Get copyright information - * - * - * echo Site::powered(); - * - * - * @return string - */ - public static function powered() - { - return __('Powered by', 'system').' Monstra ' . Monstra::VERSION; - } -} diff --git a/engine/Uri.php b/engine/Uri.php deleted file mode 100644 index 5ff4d25..0000000 --- a/engine/Uri.php +++ /dev/null @@ -1,163 +0,0 @@ - - * @link http://monstra.org - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - - -class Uri -{ - /** - * Protected constructor since this is a static class. - * - * @access protected - */ - protected function __construct() - { - // Nothing here - } - - /** - * Default component - * - * @var string - */ - public static $default_component = 'pages'; - - /** - * Get uri and explode command/param1/param2 - * - * - * $segments = Uri::segments(); - * - * - * @return array - */ - public static function segments() - { - // Get request uri and current script path - $request_uri = explode('/', $_SERVER['REQUEST_URI']); - $script_name = explode('/', $_SERVER['SCRIPT_NAME']); - - // Delete script name - for ($i = 0; $i < sizeof($script_name); $i++) { - if ($request_uri[$i] == $script_name[$i]) { - unset($request_uri[$i]); - } - } - - // Get all the values of an array - $uri = array_values($request_uri); - - // Ability to pass parameters - foreach ($uri as $i => $u) { - if (isset($uri[$i])) { - $pos = strrpos($uri[$i], "?"); - if ($pos === false) { - $uri[$i] = Security::sanitizeURL($uri[$i]); - } else { - $uri[$i] = Security::sanitizeURL(substr($uri[$i], 0, $pos)); - } - } - } - - // Return uri segments - return $uri; - } - - /** - * Get uri segment - * - * - * $segment = Uri::segment(1); - * - * - * @param integer $segment Segment - * @return mixed - */ - public static function segment($segment) - { - $segments = Uri::segments(); - - return isset($segments[$segment]) ? $segments[$segment] : null; - } - - /** - * Get command/component from registed components - * - * - * $command = Uri::command(); - * - * - * @return array - */ - public static function command() - { - // Get uri segments - $uri = Uri::segments(); - - if (! isset($uri[0])) { - $uri[0] = Uri::$default_component; - } else { - if (! in_array($uri[0], Plugin::$components)) { - $uri[0] = Uri::$default_component; - } else { - $uri[0] = $uri[0]; - } - } - - return $uri[0]; - } - - /** - * Get uri parammeters - * - * - * $params = Uri::params(); - * - * - * @return array - */ - public static function params() - { - //Init data array - $data = array(); - - // Get URI - $uri = Uri::segments(); - - // http://site.com/ and http://site.com/index.php same main home pages - if (! isset($uri[0])) { - $uri[0] = ''; - } - - // param1/param2 - if ($uri[0] !== Uri::$default_component) { - if (isset($uri[1])) { - foreach ($uri as $part) { - $data[] = $part; - } - } else { // default - $data[0] = $uri[0]; - } - } else { - // This is good for box plugin Pages - // parent/child - if (isset($uri[2])) { - $data[0] = $uri[1]; - $data[1] = $uri[2]; - } else { // default - $data[0] = $uri[1]; - } - } - - return $data; - } -} diff --git a/engine/Xmldb/DB.php b/engine/Xmldb/DB.php deleted file mode 100644 index 41d42e5..0000000 --- a/engine/Xmldb/DB.php +++ /dev/null @@ -1,92 +0,0 @@ - - * @link http://monstra.org - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - - -class DB -{ - /** - * XMLDB directory - * - * @var string - */ - public static $db_dir = STORAGE; - - /** - * Protected constructor since this is a static class. - * - * @access protected - */ - protected function __construct() - { - // Nothing here - } - - /** - * Configure the settings of XMLDB - * - * @param mixed $setting Setting name - * @param mixed $value Setting value - */ - public static function configure($setting, $value) - { - if (property_exists("db", $setting)) { - DB::$$setting = $value; - } - } - - /** - * Create new database - * - * @param string $db_name Database name - * @param integer $mode Mode - * @return boolean - */ - public static function create($db_name, $chmod = 0775) - { - // Redefine vars - $db_name = (string) $db_name; - - // Create - if (is_dir(DB::$db_dir . '/' . $db_name)) { - return false; - } - return mkdir(DB::$db_dir . '/' . $db_name, $chmod); - } - - /** - * Drop database - * - * @param string $db_name Database name - * @return boolean - */ - public static function drop($db_name) - { - // Redefine vars - $db_name = (string) $db_name; - - // Drop - if (is_dir(DB::$db_dir . '/' . $db_name)) { - $ob=scandir(DB::$db_dir . '/' . $db_name); foreach ($ob as $o) { - if ($o!='.'&&$o!='..') { - if (filetype(DB::$db_dir . '/' . $db_name.'/'.$o)=='dir') { - DB::drop(DB::$db_dir . '/' . $db_name.'/'.$o); - } else { - unlink(DB::$db_dir . '/' . $db_name.'/'.$o); - } - } - } - } - reset($ob); - rmdir(DB::$db_dir . '/' . $db_name); - } -} diff --git a/engine/Xmldb/Table.php b/engine/Xmldb/Table.php deleted file mode 100644 index 1d0ece2..0000000 --- a/engine/Xmldb/Table.php +++ /dev/null @@ -1,857 +0,0 @@ - - * @link http://monstra.org - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - - -class Table -{ - /** - * XMLDB Tables directory - * - * @var string - */ - public static $tables_dir = XMLDB; - - /** - * Table - * - * @var object - */ - private $table; - - /** - * Table name - * - * @var string - */ - private $name; - - /** - * Configure the settings of XMLDB Tables - * - * @param mixed $setting Setting name - * @param mixed $value Setting value - */ - public static function configure($setting, $value) - { - if (property_exists("table", $setting)) { - Table::$$setting = $value; - } - } - - /** - * Table factory. - * - * - * $users = Table::factory('table_name'); - * - * - * @param string $table_name Table name - * @return Table - */ - public static function factory($table_name) - { - return new Table($table_name); - } - - /** - * Table construct - * - * - * $users = new Table('table_name'); - * - * - * @param string $table_name Table name - */ - public function __construct($table_name) - { - // Redefine vars - $table_name = (string) $table_name; - - $this->table = Table::get($table_name); - $this->name = $table_name; - } - - /** - * Create new table - * - * XMLDB Table structure: - * - * - * - * 0 - * - * - * - * - * - * value - * value - * - * - * - * - * Table::create('table_name', array('field1', 'field2')); - * - * - * @param string $table_name Table name - * @param array $fields Fields - * @return boolean - */ - public static function create($table_name, $fields) - { - // Redefine vars - $table_name = (string) $table_name; - - if (! file_exists(Table::$tables_dir . '/' . $table_name . '.table.xml') && - is_dir(dirname(Table::$tables_dir)) && - is_writable(dirname(Table::$tables_dir)) && - isset($fields) && - is_array($fields)) { - - // Create table fields - $_fields = ''; - foreach ($fields as $field) { - $_fields .= "<$field/>"; - } - $_fields .= ''; - - // Create new table - return file_put_contents(Table::$tables_dir . '/' . $table_name . '.table.xml', '0'.$_fields.'', LOCK_EX); - } else { - - // Something wrong... return false - return false; - } - } - - /** - * Delete table - * - * - * Table::drop('table_name'); - * - * - * @param string $table_name Table name - * @return boolean - */ - public static function drop($table_name) - { - // Redefine vars - $table_name = (string) $table_name; - - // Drop - if (! is_dir(Table::$tables_dir . '/' . $table_name . '.table.xml')) { - return unlink(Table::$tables_dir . '/' . $table_name . '.table.xml'); - } - - return false; - } - - /** - * Get table - * - * - * $table = Table::get('table_name'); - * - * - * @param array $table_name Table name - * @return mixed - */ - public static function get($table_name) - { - // Redefine vars - $table_name = (string) $table_name; - - // Load table - if (file_exists(Table::$tables_dir . '/' . $table_name.'.table.xml') && is_file(Table::$tables_dir . '/' . $table_name.'.table.xml')) { - $data = array('xml_object' => XML::loadFile(Table::$tables_dir . '/' . $table_name.'.table.xml'), - 'xml_filename' => Table::$tables_dir . '/' . $table_name.'.table.xml'); - - return $data; - } else { - return false; - } - } - - /** - * Get information about table - * - * - * var_dump($users->info()); - * - * - * @return array - */ - public function info() - { - return array( - 'table_name' => basename($this->table['xml_filename'], '.table.xml'), - 'table_size' => filesize($this->table['xml_filename']), - 'table_last_change' => filemtime($this->table['xml_filename']), - 'table_last_access' => fileatime($this->table['xml_filename']), - 'table_fields' => $this->fields(), - 'records_count' => $this->count(), - 'records_last_id' => $this->lastId() - ); - } - - /** - * Get table fields - * - * - * var_dump($users->fields()); - * - * - * @return array - */ - public function fields() - { - // Select fields - $fields_obj = Table::_selectOne($this->table, "fields"); - - // Create fields array - foreach ($fields_obj as $key => $field) { - $fields[] = $key; - } - - // Return array of fields - return $fields; - } - - /** - * Add new field - * - * - * $users->addField('test'); - * - * - * @param string $name Field name - * @return boolean - */ - public function addField($name) - { - // Redefine vars - $name = (string) $name; - - // Get table - $table = $this->table; - - // Select all fields - $fields = Table::_selectOne($this->table, "fields"); - - // Select current field - $field = Table::_selectOne($this->table, "fields/{$name}"); - - // If field dosnt exists than create new field - if ($field == null) { - - // Create new field - $fields->addChild($name, ''); - - // Save table - return Table::_save($table); - } else { - return false; - } - } - - /** - * Delete field - * - * - * $users->deleteField('test'); - * - * - * @param string $name Field name - * @return boolean - */ - public function deleteField($name) - { - // Redefine vars - $name = (string) $name; - - // Get table - $table = $this->table; - - // Select field - $field = Table::_selectOne($this->table, "fields/{$name}"); - - // If field exist than delete it - if ($field != null) { - - // Delete field - unset($field[0]); - - // Save table - return Table::_save($table); - } else { - return false; - } - } - - /** - * Update field - * - * - * $users->updateField('login', 'username'); - * - * - * @param string $old_name Old field name - * @param string $new_name New field name - * @return boolean - */ - public function updateField($old_name, $new_name) - { - if (file_exists(Table::$tables_dir . '/' . $this->name.'.table.xml') && is_file(Table::$tables_dir . '/' . $this->name.'.table.xml')) { - $table = strtr(file_get_contents(Table::$tables_dir . '/' . $this->name.'.table.xml'), array('<'.$old_name.'>' => '<'.$new_name.'>', - '' => '', - '<'.$old_name.'/>' => '<'.$new_name.'/>')); - if (file_put_contents(Table::$tables_dir . '/' . $this->name.'.table.xml', $table)) { - return true; - } else { - return false; - } - } - } - - /** - * Check if field exist - * - * - * if ($users->existsField('field_name')) { - * // do something... - * } - * - * - * @param string $name Name of field to check. - * @return boolean - */ - public function existsField($name) - { - // Redefine vars - $name = (string) $name; - - // Get table - $table = $this->table; - - // Select field - $field = Table::_selectOne($this->table, "fields/{$name}"); - - // Return true or false - return ($field == null) ? false : true; - } - - /** - * Add new record - * - * - * $users->insert(array('login'=>'admin', 'password'=>'pass')); - * - * - * @param array $fields Record fields to insert - * @return boolean - */ - public function insert(array $fields = null) - { - // Set save flag to true - $save = true; - - // Foreach fields check is current field alredy exists - if (count($fields) !== 0) { - foreach ($fields as $key => $value) { - if (Table::_selectOne($this->table, "fields/{$key}") == null) { - $save = false; - break; - } - } - } - - // Get table fields and create fields names array - $_fields = Table::_selectOne($this->table, "fields"); - foreach ($_fields as $key => $value) { - $field_names[(string) $key] = (string) $key; - } - - // Save record - if ($save) { - - // Find autoincrement option - $inc = Table::_selectOne($this->table, "options/autoincrement"); - - // Increment - $inc_upd = $inc + 1; - - // Add record - $node = $this->table['xml_object']->addChild(XML::safe($this->name)); - - // Update autoincrement - Table::_updateWhere($this->table, "options", array('autoincrement' => $inc_upd)); - - // Add common record fields: id and uid - $node->addChild('id', $inc_upd); - $node->addChild('uid', Table::_generateUID()); - - // If exists fields to insert then insert them - if (count($fields) !== 0) { - $table_fields = array_diff_key($field_names, $fields); - - // Defined fields - foreach ($table_fields as $table_field) { - $node->addChild($table_field, ''); - } - - // User fields - foreach ($fields as $key => $value) { - $node->addChild($key, XML::safe($value)); - } - } - - // Save table - return Table::_save($this->table); - } else { - return false; - } - } - - /** - * Select record(s) in table - * - * - * $records = $users->select('[id=2]'); - * $records = $users->select(null, 'all'); - * $records = $users->select(null, 'all', null, array('login')); - * $records = $users->select(null, 2, 1); - * - * - * @param string $query XPath query - * @param integer $row_count Row count. To select all records write 'all' - * @param integer $offset Offset - * @param array $fields Fields - * @param string $order_by Order by - * @param string $order Order type - * @return array - */ - public function select($query = null, $row_count = 'all', $offset = null, array $fields = null, $order_by = 'id', $order = 'ASC') - { - // Redefine vars - $query = ($query === null) ? null : (string) $query; - $offset = ($offset === null) ? null : (int) $offset; - $order_by = (string) $order_by; - $order = (string) $order; - - // Execute query - if ($query !== null) { - $tmp = $this->table['xml_object']->xpath('//'.$this->name.$query); - } else { - $tmp = $this->table['xml_object']->xpath($this->name); - } - - // Init vars - $data = array(); - $records = array(); - $_records = array(); - - $one_record = false; - - // If row count is null then select only one record - // eg: $users->select('[login="admin"]', null); - if ($row_count == null) { - if (isset($tmp[0])) { - $_records = $tmp[0]; - $one_record = true; - } - } else { - - // If row count is 'all' then select all records - // eg: - // $users->select('[status="active"]', 'all'); - // or - // $users->select('[status="active"]'); - foreach ($tmp as $record) { - $data[] = $record; - } - - $_records = $data; - } - - // If array of fields is exits then get records with this fields only - if (count($fields) > 0) { - if (count($_records) > 0) { - $count = 0; - foreach ($_records as $key => $record) { - foreach ($fields as $field) { - $record_array[$count][$field] = (string) $record->$field; - } - - $record_array[$count]['id'] = (int) $record->id; - - if ($order_by == 'id') { - $record_array[$count]['sort'] = (int) $record->$order_by; - } else { - $record_array[$count]['sort'] = (string) $record->$order_by; - } - - $count++; - } - - // Sort records - $records = Table::subvalSort($record_array, 'sort', $order); - - // Slice records array - if ($offset === null && is_int($row_count)) { - $records = array_slice($records, -$row_count, $row_count); - } elseif ($offset !== null && is_int($row_count)) { - $records = array_slice($records, $offset, $row_count); - } - } - } else { - - // Convert from XML object to array - - if (! $one_record) { - $count = 0; - foreach ($_records as $xml_objects) { - $vars = get_object_vars($xml_objects); - - foreach ($vars as $key => $value) { - $records[$count][$key] = (string) $value; - - if ($order_by == 'id') { - $records[$count]['sort'] = (int) $vars['id']; - } else { - $records[$count]['sort'] = (string) $vars[$order_by]; - } - } - - $count++; - } - - // Sort records - $records = Table::subvalSort($records, 'sort', $order); - - // Slice records array - if ($offset === null && is_int($row_count)) { - $records = array_slice($records, -$row_count, $row_count); - } elseif ($offset !== null && is_int($row_count)) { - $records = array_slice($records, $offset, $row_count); - } - } else { - - // Single record - $vars = get_object_vars($_records[0]); - foreach ($vars as $key => $value) { - $records[$key] = (string) $value; - } - } - } - - // Return records - return $records; - } - - /** - * Delete current record in table - * - * - * $users->delete(2); - * - * - * @param integer $id Record ID - * @return boolean - */ - public function delete($id) - { - // Redefine vars - $id = (int) $id; - - // Find record to delete - $xml_arr = Table::_selectOne($this->table, "//".$this->name."[id='".$id."']"); - - // If its exists then delete it - if (count($xml_arr) !== 0) { - - // Delete - unset($xml_arr[0]); - } - - // Save table - return Table::_save($this->table); - } - - /** - * Delete with xPath query record in xml file - * - * - * $users->deleteWhere('[id=2]'); - * - * - * @param string $query xPath query - * @return boolean - */ - public function deleteWhere($query) - { - // Redefine vars - $query = (string) $query; - - // Find record to delete - $xml_arr = Table::_selectOne($this->table, '//'.$this->name.$query); - - // If its exists then delete it - if (count($xml_arr) !== 0) { - - // Delete - unset($xml_arr[0]); - } - - // Save table - return Table::_save($this->table); - } - - /** - * Update record with xPath query in XML file - * - * - * $users->updateWhere('[id=2]', array('login'=>'Admin', 'password'=>'new pass')); - * - * - * @param string $query XPath query - * @param array $fields Record fields to udpate - * @return boolean - */ - public function updateWhere($query, array $fields = null) - { - // Redefine vars - $query = (string) $query; - - // Set save flag to true - $save = true; - - // Foreach fields check is current field alredy exists - if (count($fields) !== 0) { - foreach ($fields as $key => $value) { - if (Table::_selectOne($this->table, "fields/{$key}") == null) { - $save = false; - break; - } - } - } - - // Get table fields and create fields names array - $_fields = Table::_selectOne($this->table, "fields"); - foreach ($_fields as $key => $value) { - $field_names[(string) $key] = (string) $key; - } - - // Save record - if ($save) { - - // Find record - $xml_arr = Table::_selectOne($this->table, '//'.$this->name.$query); - - // If its exists then delete it - if (count($fields) !== 0) { - foreach ($fields as $key => $value) { - // Else: Strict Mode Error - // Creating default object from empty value - @$xml_arr->$key = XML::safe($value, false); - } - } - - // Save table - return Table::_save($this->table); - } else { - return false; - } - } - - /** - * Update current record in table - * - * - * $users->update(1, array('login'=>'Admin','password'=>'new pass')); - * - * - * @param integer $id Record ID - * @param array $fields Record fields to udpate - * @return boolean - */ - public function update($id, array $fields = null) - { - // Redefine vars - $id = (int) $id; - - // Set save flag to true - $save = true; - - // Foreach fields check is current field alredy exists - if (count($fields) !== 0) { - foreach ($fields as $key => $value) { - if (Table::_selectOne($this->table, "fields/{$key}") == null) { - $save = false; - break; - } - } - } - - // Get table fields and create fields names array - $_fields = Table::_selectOne($this->table, "fields"); - foreach ($_fields as $key => $value) { - $field_names[(string) $key] = (string) $key; - } - - // Save record - if ($save) { - - // Find record to delete - $xml_arr = Table::_selectOne($this->table, "//".$this->name."[id='".(int) $id."']"); - - // If its exists then update it - if (count($fields) !== 0) { - foreach ($fields as $key => $value) { - - // Delete current - unset($xml_arr->$key); - - // And add new one - $xml_arr->addChild($key, XML::safe($value, false)); - } - } - - // Save table - return Table::_save($this->table); - } else { - return false; - } - } - - /** - * Get last record id - * - * - * echo $users->lastId(); - * - * - * @return integer - */ - public function lastId() - { - $data = $this->table['xml_object']->xpath("//root/node()[last()]"); - - return (int) $data[0]->id; - } - - /** - * Get count of records - * - * - * echo $users->count(); - * - * - * @return integer - */ - public function count() - { - return count($this->table['xml_object'])-2; - } - - /** - * Subval sort - * - * @param array $a Array - * @param string $subkey Key - * @param string $order Order type DESC or ASC - * @return array - */ - protected static function subvalSort($a, $subkey, $order = null) - { - if (count($a) != 0 || (!empty($a))) { - foreach ($a as $k=>$v) { - $b[$k] = function_exists('mb_strtolower') ? mb_strtolower($v[$subkey]) : strtolower($v[$subkey]); - } - if ($order==null || $order== 'ASC') { - asort($b); - } elseif ($order == 'DESC') { - arsort($b); - } - foreach ($b as $key=>$val) { - $c[] = $a[$key]; - } - - return $c; - } - return $a; - } - - /** - * _selectOne - */ - protected static function _selectOne($table, $query) - { - $tmp = $table['xml_object']->xpath($query); - - return isset($tmp[0])? $tmp[0]: null; - } - - /** - * _updateWhere - */ - protected static function _updateWhere($table, $query, $fields = array()) - { - // Find record to delete - $xml_arr = Table::_selectOne($table, $query); - - // If its exists then delete it - if (count($fields) !== 0) { - foreach ($fields as $key => $value) { - $xml_arr->$key = XML::safe($value, false); - } - } - - // Save table - Table::_save($table); - } - - /** - * _generateUID - */ - protected static function _generateUID() - { - return substr(md5(uniqid(rand(), true)), 0, 10); - } - - /** - * Format XML and save - * - * @param array $table Array of database name and XML object - */ - protected static function _save($table) - { - $dom = new DOMDocument('1.0', 'utf-8'); - $dom->preserveWhiteSpace = false; - - // Save new xml data to xml file only if loadXML successful. - // Preventing the destruction of the database by unsafe data. - // note: If loadXML !successful then _save() add&save empty record. - // This record cant be removed by delete[Where]() Problem solved by hand removing... - // Possible solution: modify delete[Where]() or prevent add&saving of such records. - // the result now: database cant be destroyed :) - if ($dom->loadXML($table['xml_object']->asXML())) { - $dom->save($table['xml_filename']); - - return true; - } else { - return false; - // report about errors... - } - } -} diff --git a/engine/Xmldb/XML.php b/engine/Xmldb/XML.php deleted file mode 100644 index ab38c57..0000000 --- a/engine/Xmldb/XML.php +++ /dev/null @@ -1,94 +0,0 @@ - - * @link http://monstra.org - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - - -class XML -{ - /** - * Protected constructor since this is a static class. - * - * @access protected - */ - protected function __construct() - { - // Nothing here - } - - /** - * Create safe xml data. Removes dangerous characters for string. - * - * - * $xml_safe = XML::safe($xml_unsafe); - * - * - * @param string $str String - * @param boolean $flag Flag - * @return string - */ - public static function safe($str, $flag = true) - { - // Redefine vars - $str = (string) $str; - $flag = (bool) $flag; - - // Remove invisible chars - $non_displayables = array('/%0[0-8bcef]/', '/%1[0-9a-f]/', '/[\x00-\x08]/', '/\x0b/', '/\x0c/', '/[\x0e-\x1f]/'); - do { - $cleaned = $str; - $str = preg_replace($non_displayables, '', $str); - } while ($cleaned != $str); - - // htmlspecialchars - if ($flag) { - $str = htmlspecialchars($str, ENT_QUOTES, 'utf-8'); - } - - // Return safe string - return $str; - } - - /** - * Get XML file - * - * - * $xml_file = XML::loadFile('path/to/file.xml'); - * - * - * @param string $file File name - * @param boolean $force Method - * @return array - */ - public static function loadFile($file, $force = false) - { - // Redefine vars - $file = (string) $file; - $force = (bool) $force; - - // For CMS API XML file force method - if ($force) { - $xml = file_get_contents($file); - $data = simplexml_load_string($xml); - - return $data; - } else { - if (file_exists($file) && is_file($file)) { - $xml = file_get_contents($file); - $data = simplexml_load_string($xml); - - return $data; - } else { - return false; - } - } - } -} diff --git a/engine/_init.php b/engine/_init.php deleted file mode 100644 index 53617a7..0000000 --- a/engine/_init.php +++ /dev/null @@ -1,38 +0,0 @@ -'."\n"; -} diff --git a/engine/boot/defines.php b/engine/boot/defines.php deleted file mode 100644 index 180ada1..0000000 --- a/engine/boot/defines.php +++ /dev/null @@ -1,94 +0,0 @@ -S=v4n@!}XlvC)`~@L6xmEPF_A43{q9qzFTKox3YK;k^ zvlegn^?Kfe$f1TFxz2gs`?>G)tyxCDC^Bug?PS$#%glC#Bq?)UJ2TC8_U8C?`sPUT zqc|38G4yE6eygm8x59}x@f1Uk#tctdZA!crp8{_h%<$k{EY^48OQhu%H9UC3F;>)H ziX@xOW?ivZbk%CrLysm;052J`2Vx-nESJlQ67 zg+jqYPcg$2{MwU!2y2erYPGy~G#a^Pv+1Fym@S>3?1f0~zf!5V$zx#T&-5~&@a7zykx?+{Gabnhw-(c z?YS6; - * @link http://monstra.org - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - - -// Main engine defines -define('DS', DIRECTORY_SEPARATOR); -define('ROOT', rtrim(dirname(__FILE__), '\\/')); -define('BACKEND', false); -define('MONSTRA_ACCESS', true); - -// First check for installer then go -if (file_exists('install.php')) { - if (isset($_GET['install'])) { - if ($_GET['install'] == 'done') { - // Try to delete install file if not delete manually - @unlink('install.php'); - // Redirect to main page - header('location: index.php'); - } - } else { - include 'install.php'; - } -} else { - - // Load Engine init file - require_once ROOT. DS . 'engine'. DS . '_init.php'; - - // Check for maintenance mod - if ('on' == Option::get('maintenance_status')) { - - // Set maintenance mode for all except admin and editor - if ((Session::exists('user_role')) and (Session::get('user_role') == 'admin' or Session::get('user_role') == 'editor')) { - // Monstra show this page :) - } else { - header('HTTP/1.1 503 Service Temporarily Unavailable'); - header('Status: 503 Service Temporarily Unavailable'); - header('Retry-After: 600'); - die(Text::toHtml(Option::get('maintenance_message'))); - } - } - - // Frontend pre render - Action::run('frontend_pre_render'); - - // Load site template - require MINIFY . DS . 'theme.' . Site::theme() . '.' . Site::template() . '.template.php'; - - // Frontend pre render - Action::run('frontend_post_render'); - - // Flush (send) the output buffer and turn off output buffering - ob_end_flush(); -} diff --git a/install.php b/install.php deleted file mode 100755 index cdbd7d2..0000000 --- a/install.php +++ /dev/null @@ -1,627 +0,0 @@ - button then try to install - if (Request::post('install_submit')) { - if (Request::post('sitename') == '') { - $errors['sitename'] = __('Field "Site name" is empty', 'system'); - } - if (Request::post('siteurl') == '') { - $errors['siteurl'] = __('Field "Site url" is empty', 'system'); - } - if (Request::post('login') == '') { - $errors['login'] = __('Field "Username" is empty', 'system'); - } - if (Request::post('password') == '') { - $errors['password'] = __('Field "Password" is empty', 'system'); - } - if (Request::post('email') == '') { - $errors['email'] = __('Field "Email" is empty', 'system'); - } - if (! Valid::email(Request::post('email'))) { - $errors['email_valid'] = __('Email not valid', 'system'); - } - if (trim(Request::post('php') !== '')) { - $errors['php'] = true; - } - if (trim(Request::post('simplexml') !== '')) { - $errors['simplexml'] = true; - } - if (trim(Request::post('mod_rewrite') !== '')) { - $errors['mod_rewrite'] = true; - } - if (trim(Request::post('htaccess') !== '')) { - $errors['htaccess'] = true; - } - if (trim(Request::post('sitemap') !== '')) { - $errors['sitemap'] = true; - } - if (trim(Request::post('install') !== '')) { - $errors['install'] = true; - } - if (trim(Request::post('public') !== '')) { - $errors['public'] = true; - } - if (trim(Request::post('storage') !== '')) { - $errors['storage'] = true; - } - if (trim(Request::post('backups') !== '')) { - $errors['backups'] = true; - } - if (trim(Request::post('tmp') !== '')) { - $errors['tmp'] = true; - } - - // If errors is 0 then install cms - if (count($errors) == 0) { - - // Update options - Option::update(array('maintenance_status' => 'off', - 'sitename' => Request::post('sitename'), - 'siteurl' => Request::post('siteurl'), - 'description' => __('Site description', 'system'), - 'keywords' => __('Site keywords', 'system'), - 'slogan' => __('Site slogan', 'system'), - 'defaultpage' => 'home', - 'timezone' => Request::post('timezone'), - 'system_email' => Request::post('email'), - 'theme_site_name' => 'default', - 'theme_admin_name' => 'default')); - - // Get users table - $users = new Table('users'); - - // Insert new user with role = admin - $users->insert(array('login' => Security::safeName(Request::post('login')), - 'password' => Security::encryptPassword(Request::post('password')), - 'email' => Request::post('email'), - 'hash' => Text::random('alnum', 12), - 'date_registered' => time(), - 'role' => 'admin')); - - // Write .htaccess - $htaccess = file_get_contents('.htaccess'); - $save_htaccess_content = str_replace("/%siteurlhere%/", $rewrite_base, $htaccess); - - $handle = fopen('.htaccess', "w"); - fwrite($handle, $save_htaccess_content); - fclose($handle); - - // Installation done :) - header("location: index.php?install=done"); - } else { - Notification::setNow('errors', $errors); - } - } -?> - - - - - Monstra :: Install - - - - - - - - - - - - - - - - -
    Monstra
    - -
    - - - <?php echo $lang_code?> - -
    - -
    - -
      - 0)) { - foreach (Notification::get('errors') as $error) { - ?> -
    • - -
    - -
    -
    - - - - - - - - - - - -
    - - -
    - -
    - - -
    - -
    - - -
    - -
    - - -
    - -
    - - -
    - -
    - - -
    -
    - -
    -
    - -
    -
    - -
    -
      - '.__('PHP 5.3.2 or greater is required', 'system').''; - } else { - echo '
    • '.__('PHP Version', 'system').' '.PHP_VERSION.'
    • '; - } - - if (in_array('SimpleXML', $php_modules)) { - echo '
    • '.__('Module SimpleXML is installed', 'system').'
    • '; - } else { - echo '
    • '.__('SimpleXML module is required', 'system').'
    • '; - } - - if (in_array('dom', $php_modules)) { - echo '
    • '.__('Module DOM is installed', 'system').'
    • '; - } else { - echo '
    • '.__('Module DOM is required', 'system').'
    • '; - } - - if (function_exists('apache_get_modules')) { - if (! in_array('mod_rewrite', apache_get_modules())) { - echo '
    • '.__('Apache Mod Rewrite is required', 'system').'
    • '; - } else { - echo '
    • '.__('Module Mod Rewrite is installed', 'system').'
    • '; - } - } else { - echo '
    • '.__('Module Mod Rewrite is installed', 'system').'
    • '; - } - - foreach ($dir_array as $dir) { - if (is_writable($dir.'/')) { - echo '
    • '.__('Directory: :dir writable', 'system', array(':dir' => $dir)).'
    • '; - } else { - echo '
    • '.__('Directory: :dir not writable', 'system', array(':dir' => $dir)).'
    • '; - } - } - - if (is_writable(__FILE__)) { - echo '
    • '.__('Install script writable', 'system').'
    • '; - } else { - echo '
    • '.__('Install script not writable', 'system').'
    • '; - } - - if (is_writable('sitemap.xml')) { - echo '
    • '.__('Sitemap file writable', 'system').'
    • '; - } else { - echo '
    • '.__('Sitemap file not writable', 'system').'
    • '; - } - - if (is_writable('.htaccess')) { - echo '
    • '.__('Main .htaccess file writable', 'system').'
    • '; - } else { - echo '
    • '.__('Main .htaccess file not writable', 'system').'
    • '; - } - - if (isset($errors['sitename'])) { - echo '
    • '.$errors['sitename'].'
    • '; - } - if (isset($errors['siteurl'])) { - echo '
    • '.$errors['siteurl'].'
    • '; - } - if (isset($errors['login'])) { - echo '
    • '.$errors['login'].'
    • '; - } - if (isset($errors['password'])) { - echo '
    • '.$errors['password'].'
    • '; - } - if (isset($errors['email'])) { - echo '
    • '.$errors['email'].'
    • '; - } - if (isset($errors['email_valid'])) { - echo '
    • '.$errors['email_valid'].'
    • '; - } - ?> -
    - -
    - - - - - - diff --git a/libraries/Gelato/Agent/Agent.php b/libraries/Gelato/Agent/Agent.php deleted file mode 100644 index 039edef..0000000 --- a/libraries/Gelato/Agent/Agent.php +++ /dev/null @@ -1,170 +0,0 @@ - - * @copyright 2012-2014 Romanenko Sergey / Awilum - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -class Agent -{ - /** - * Mobiles - * - * @var array - */ - public static $mobiles = array ( - 'ipad', - 'iphone', - 'ipod', - 'android', - 'windows ce', - 'windows phone', - 'mobileexplorer', - 'opera mobi', - 'opera mini', - 'fennec', - 'blackberry', - 'nokia', - 'kindle', - 'ericsson', - 'motorola', - 'minimo', - 'iemobile', - 'symbian', - 'webos', - 'hiptop', - 'palmos', - 'palmsource', - 'xiino', - 'avantgo', - 'docomo', - 'up.browser', - 'vodafone', - 'portable', - 'pocket', - 'mobile', - 'phone', - ); - - /** - * Robots - * - * @var array - */ - public static $robots = array( - 'googlebot', - 'msnbot', - 'slurp', - 'yahoo', - 'askjeeves', - 'fastcrawler', - 'infoseek', - 'lycos', - 'ia_archiver', - 'yandex', - 'mail.ru', - 'ask.com', - 'Copyscape.com', - 'bing.com', - - ); - - /** - * Protected constructor since this is a static class. - * - * @access protected - */ - protected function __construct() - { - // Nothing here - } - - /** - * Searches for a string in the user agent string. - * - * @param array $agents Array of strings to look for - * @return boolean - */ - protected static function find($agents) - { - // If isset HTTP_USER_AGENT ? - if (isset($_SERVER['HTTP_USER_AGENT'])) { - - // Loop through $agents array - foreach ($agents as $agent) { - - // If current user agent == agents[agent] then return true - if (stripos($_SERVER['HTTP_USER_AGENT'], $agent) !== false) { - return true; - } - } - } - - // Else return false - return false; - } - - /** - * Returns true if the user agent that made the request is identified as a mobile device. - * - * - * if (Agent::isMobile()) { - * // Do something... - * } - * - * - * @return boolean - */ - public static function isMobile() - { - return Agent::find(Agent::$mobiles); - } - - /** - * Returns true if the user agent that made the request is identified as a robot/crawler. - * - * - * if (Agent::isRobot()) { - * // Do something... - * } - * - * - * @return boolean - */ - public static function isRobot() - { - return Agent::find(Agent::$robots); - } - - /** - * Returns TRUE if the string you're looking for exists in the user agent string and FALSE if not. - * - * - * if (Agent::is('iphone')) { - * // Do something... - * } - * - * if (Agent::is(array('iphone', 'ipod'))) { - * // Do something... - * } - * - * - * @param mixed $device String or array of strings you're looking for - * @return boolean - */ - public static function is($device) - { - return Agent::find((array) $device); - } - -} diff --git a/libraries/Gelato/Arr/Arr.php b/libraries/Gelato/Arr/Arr.php deleted file mode 100644 index 6da3523..0000000 --- a/libraries/Gelato/Arr/Arr.php +++ /dev/null @@ -1,187 +0,0 @@ - - * @copyright 2012-2014 Romanenko Sergey / Awilum - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -class Arr -{ - /** - * Protected constructor since this is a static class. - * - * @access protected - */ - protected function __construct() - { - // Nothing here - } - - /** - * Subval sort - * - * - * $new_array = Arr::subvalSort($old_array, 'sort'); - * - * - * @param array $a Array - * @param string $subkey Key - * @param string $order Order type DESC or ASC - * @return array - */ - public static function subvalSort($a, $subkey, $order = null) - { - if (count($a) != 0 || (!empty($a))) { - foreach ($a as $k => $v) $b[$k] = function_exists('mb_strtolower') ? mb_strtolower($v[$subkey]) : strtolower($v[$subkey]); - if ($order == null || $order == 'ASC') asort($b); else if ($order == 'DESC') arsort($b); - foreach ($b as $key => $val) $c[] = $a[$key]; - - return $c; - } - } - - /** - * Returns value from array using "dot notation". - * If the key does not exist in the array, the default value will be returned instead. - * - * - * $login = Arr::get($_POST, 'login'); - * - * $array = array('foo' => 'bar'); - * $foo = Arr::get($array, 'foo'); - * - * $array = array('test' => array('foo' => 'bar')); - * $foo = Arr::get($array, 'test.foo'); - * - * - * @param array $array Array to extract from - * @param string $path Array path - * @param mixed $default Default value - * @return mixed - */ - public static function get($array, $path, $default = null) - { - // Get segments from path - $segments = explode('.', $path); - - // Loop through segments - foreach ($segments as $segment) { - - // Check - if ( ! is_array($array) || !isset($array[$segment])) { - return $default; - } - - // Write - $array = $array[$segment]; - } - - // Return - return $array; - } - - /** - * Deletes an array value using "dot notation". - * - * - * Arr::delete($array, 'foo.bar'); - * - * - * @access public - * @param array $array Array you want to modify - * @param string $path Array path - * @return boolean - */ - public static function delete(&$array, $path) - { - // Get segments from path - $segments = explode('.', $path); - - // Loop through segments - while (count($segments) > 1) { - - $segment = array_shift($segments); - - if ( ! isset($array[$segment]) || !is_array($array[$segment])) { - return false; - } - - $array =& $array[$segment]; - } - - unset($array[array_shift($segments)]); - - return true; - } - - /** - * Checks if the given dot-notated key exists in the array. - * - * - * if (Arr::keyExists($array, 'foo.bar')) { - * // Do something... - * } - * - * - * @param array $array The search array - * @param mixed $path Array path - * @return boolean - */ - public static function keyExists($array, $path) - { - foreach (explode('.', $path) as $segment) { - - if ( ! is_array($array) or ! array_key_exists($segment, $array)) { - return false; - } - - $array = $array[$segment]; - } - - return true; - } - - /** - * Returns a random value from an array. - * - * - * Arr::random(array('php', 'js', 'css', 'html')); - * - * - * @access public - * @param array $array Array path - * @return mixed - */ - public static function random($array) - { - return $array[array_rand($array)]; - } - - /** - * Returns TRUE if the array is associative and FALSE if not. - * - * - * if (Arr::isAssoc($array)) { - * // Do something... - * } - * - * - * @param array $array Array to check - * @return boolean - */ - public static function isAssoc($array) - { - return (bool) count(array_filter(array_keys($array), 'is_string')); - } - -} diff --git a/libraries/Gelato/Cache/Cache.php b/libraries/Gelato/Cache/Cache.php deleted file mode 100644 index 7de3f6e..0000000 --- a/libraries/Gelato/Cache/Cache.php +++ /dev/null @@ -1,212 +0,0 @@ - - * @copyright 2012-2014 Romanenko Sergey / Awilum - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -class Cache -{ - /** - * Cache directory - * - * @var string - */ - protected static $cache_dir = ''; - - /** - * Cache file ext - * - * @var string - */ - protected static $cache_file_ext = 'txt'; - - /** - * Cache life time (in seconds) - * - * @var int - */ - public static $cache_time = 31556926; - - /** - * Protected constructor since this is a static class. - * - * @access protected - */ - protected function __construct() - { - // Nothing here - } - - /** - * Configure the settings of Cache - * - * - * Cache::configure('cache_dir', 'path/to/cache/dir'); - * - * - * @param mixed $setting Setting name - * @param mixed $value Setting value - */ - public static function configure($setting, $value) - { - if (property_exists("cache", $setting)) Cache::$$setting = $value; - } - - /** - * Get data from cache - * - * - * $profile = Cache::get('profiles', 'profile'); - * - * - * @param string $namespace Namespace - * @param string $key Cache key - * @return boolean - */ - public static function get($namespace, $key) - { - // Redefine vars - $namespace = (string) $namespace; - - // Get cache file id - $cache_file_id = Cache::getCacheFileID($namespace, $key); - - // Is cache file exists ? - if (file_exists($cache_file_id)) { - - // If cache file has not expired then fetch it - if ((time() - filemtime($cache_file_id)) < Cache::$cache_time) { - - $handle = fopen($cache_file_id, 'r'); - - $cache = ''; - - while ( ! feof($handle)) { - $cache .= fgets($handle); - } - - fclose($handle); - - return unserialize($cache); - - } else { - unlink($cache_file_id); - - return false; - } - } else { - return false; - } - } - - /** - * Create new cache file $key in namescapce $namespace with the given data $data - * - * - * $profile = array('login' => 'Awilum', - * 'email' => 'awilum@msn.com'); - * Cache::put('profiles', 'profile', $profile); - * - * - * @param string $namespace Namespace - * @param string $key Cache key - * @param mixed $data The variable to store - * @return boolean - */ - public static function put($namespace, $key, $data) - { - // Redefine vars - $namespace = (string) $namespace; - - // Is CACHE directory writable ? - if (file_exists(CACHE) === false || is_readable(CACHE) === false || is_writable(CACHE) === false) { - throw new RuntimeException(vsprintf("%s(): Cache directory ('%s') is not writable.", array(__METHOD__, CACHE))); - } - - // Create namespace - if ( ! file_exists(Cache::getNamespaceID($namespace))) { - mkdir(Cache::getNamespaceID($namespace), 0775, true); - } - - // Write cache to specific namespace - return file_put_contents(Cache::getCacheFileID($namespace, $key), serialize($data), LOCK_EX); - } - - /** - * Deletes a cache in specific namespace - * - * - * Cache::delete('profiles', 'profile'); - * - * - * @param string $namespace Namespace - * @param string $key Cache key - * @return boolean - */ - public static function delete($namespace, $key) - { - // Redefine vars - $namespace = (string) $namespace; - - if (file_exists(Cache::getCacheFileID($namespace, $key))) unlink(Cache::getCacheFileID($namespace, $key)); else return false; - } - - /** - * Clean specific cache namespace. - * - * - * Cache::clean('profiles'); - * - * - * @param string $namespace Namespace - * @return null - */ - public static function clean($namespace) - { - // Redefine vars - $namespace = (string) $namespace; - - array_map("unlink", glob(Cache::$cache_dir . DS . md5($namespace) . DS . "*." . Cache::$cache_file_ext)); - } - - /** - * Get cache file ID - * - * @param string $namespace Namespace - * @param string $key Cache key - * @return string - */ - protected static function getCacheFileID($namespace, $key) - { - // Redefine vars - $namespace = (string) $namespace; - - return Cache::$cache_dir . DS . md5($namespace) . DS . md5($key) . '.' . Cache::$cache_file_ext; - } - - /** - * Get namespace ID - * - * @param string $namespace Namespace - * @return string - */ - protected static function getNamespaceID($namespace) - { - // Redefine vars - $namespace = (string) $namespace; - - return Cache::$cache_dir . DS . md5($namespace); - } - -} diff --git a/libraries/Gelato/ClassLoader/ClassLoader.php b/libraries/Gelato/ClassLoader/ClassLoader.php deleted file mode 100644 index 66e737f..0000000 --- a/libraries/Gelato/ClassLoader/ClassLoader.php +++ /dev/null @@ -1,236 +0,0 @@ - - * @copyright 2012-2014 Romanenko Sergey / Awilum - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -class ClassLoader -{ - - /** - * Mapping from class names to paths. - * - * @var array - */ - protected static $classes = array(); - - /** - * PSR-0 directories. - * - * @var array - */ - protected static $directories = array(); - - /** - * Registered namespaces. - * - * @var array - */ - protected static $namespaces = array(); - - /** - * Class aliases. - * - * @var array - */ - protected static $aliases = array(); - - /** - * Protected constructor since this is a static class. - * - * @access protected - */ - protected function __construct() - { - // Nothing here - } - - /** - * Add class to mapping. - * - * - * ClassLoader::mapClass('ClassName', 'path/to/class'); - * - * - * @access public - * @param string $className Class name - * @param string $classPath Full path to class - */ - public static function mapClass($className, $classPath) - { - ClassLoader::$classes[$className] = $classPath; - } - - /** - * Add multiple classes to mapping. - * - * - * ClassLoader::mapClasses(array('ClassName' => 'path/to/class','ClassName' => 'path/to/class')); - * - * - * @access public - * @param array $classes Array of classes to map (key = class name and value = class path) - */ - public static function mapClasses(array $classes) - { - foreach ($classes as $name => $path) { - ClassLoader::$classes[$name] = $path; - } - } - - /** - * Adds a PSR-0 directory path. - * - * - * ClassLoader::directory('path/to/classes'); - * - * - * @access public - * @param string $path Path to PSR-0 directory - */ - public static function directory($path) - { - ClassLoader::$directories[] = rtrim($path, '/'); - } - - /** - * Registers a namespace. - * - * - * ClassLoader::registerNamespace('Namespace', '/path/to/namespace/'); - * - * - * @access public - * @param string $namespace Namespace - * @param string $path Path - */ - public static function registerNamespace($namespace, $path) - { - ClassLoader::$namespaces[trim($namespace, '\\') . '\\'] = rtrim($path, '/'); - } - - /** - * Set an alias for a class. - * - * - * ClassLoader::alias('ClassNameAlias', 'ClassName'); - * - * - * @access public - * @param string $alias Class alias - * @param string $className Class name - */ - public static function alias($alias, $className) - { - ClassLoader::$aliases[$alias] = $className; - } - - /** - * Try to load a PSR-0 compatible class. - * - * @access protected - * @param string $className Class name - * @param string $directory (Optional) Overrides the array of PSR-0 paths - * @return boolean - */ - protected static function loadPSR0($className, $directory = null) - { - $classPath = ''; - - if (($pos = strripos($className, '\\')) !== false) { - $namespace = substr($className, 0, $pos); - $className = substr($className, $pos + 1); - $classPath = str_replace('\\', '/', $namespace) . '/'; - } - - $classPath .= str_replace('_', '/', $className) . '.php'; - - $directories = ($directory === null) ? ClassLoader::$directories : array($directory); - - foreach ($directories as $directory) { - if (file_exists($directory . '/' . $classPath)) { - include($directory . '/' . $classPath); - - return true; - } - } - - return false; - } - - /** - * Autoloader. - * - * - * ClassLoader::load(); - * - * - * @access public - * @param string $className Class name - * @return boolean - */ - public static function load($className) - { - - $className = ltrim($className, '\\'); - - /** - * Try to autoload an aliased class - */ - if (isset(ClassLoader::$aliases[$className])) { - return class_alias(ClassLoader::$aliases[$className], $className); - } - - /** - * Try to load a mapped class - */ - if (isset(ClassLoader::$classes[$className]) && file_exists(ClassLoader::$classes[$className])) { - include ClassLoader::$classes[$className]; - - return true; - } - - /** - * Try to load class from a registered namespace - */ - foreach (ClassLoader::$namespaces as $namespace => $path) { - if (strpos($className, $namespace) === 0) { - if (ClassLoader::loadPSR0(substr($className, strlen($namespace)), $path)) { - return true; - } - } - } - - /** - * Try to load a PSR-0 compatible class - * The second call to the loadPSR0 method is used to autoload legacy code - */ - if (ClassLoader::loadPSR0($className) || ClassLoader::loadPSR0(strtolower($className))) { - return true; - } - - return false; - } - - /** - * Register the Gelato ClassLoader to the SPL autoload stack. - * - * @return void - */ - public static function register() - { - spl_autoload_register('ClassLoader::load', true); - } - -} diff --git a/libraries/Gelato/Cookie/Cookie.php b/libraries/Gelato/Cookie/Cookie.php deleted file mode 100644 index 805af4b..0000000 --- a/libraries/Gelato/Cookie/Cookie.php +++ /dev/null @@ -1,108 +0,0 @@ - - * @copyright 2012-2014 Romanenko Sergey / Awilum - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -class Cookie -{ - /** - * Protected constructor since this is a static class. - * - * @access protected - */ - protected function __construct() - { - // Nothing here - } - - /** - * Send a cookie - * - * - * Cookie::set('limit', 10); - * - * - * @param string $key A name for the cookie. - * @param mixed $value The value to be stored. Keep in mind that they will be serialized. - * @param integer $expire The number of seconds that this cookie will be available. - * @param string $path The path on the server in which the cookie will be availabe. Use / for the entire domain, /foo if you just want it to be available in /foo. - * @param string $domain The domain that the cookie is available on. Use .example.com to make it available on all subdomains of example.com. - * @param boolean $secure Should the cookie be transmitted over a HTTPS-connection? If true, make sure you use a secure connection, otherwise the cookie won't be set. - * @param boolean $httpOnly Should the cookie only be available through HTTP-protocol? If true, the cookie can't be accessed by Javascript, ... - * @return boolean - */ - public static function set($key, $value, $expire = 86400, $domain = '', $path = '/', $secure = false, $httpOnly = false) - { - // Redefine vars - $key = (string) $key; - $value = serialize($value); - $expire = time() + (int) $expire; - $path = (string) $path; - $domain = (string) $domain; - $secure = (bool) $secure; - $httpOnly = (bool) $httpOnly; - - // Set cookie - return setcookie($key, $value, $expire, $path, $domain, $secure, $httpOnly); - } - - /** - * Get a cookie - * - * - * $limit = Cookie::get('limit'); - * - * - * @param string $key The name of the cookie that should be retrieved. - * @return mixed - */ - public static function get($key) - { - // Redefine key - $key = (string) $key; - - // Cookie doesn't exist - if( ! isset($_COOKIE[$key])) return false; - - // Fetch base value - $value = (get_magic_quotes_gpc()) ? stripslashes($_COOKIE[$key]) : $_COOKIE[$key]; - - // Unserialize - $actual_value = @unserialize($value); - - // If unserialize failed - if($actual_value === false && serialize(false) != $value) return false; - - // Everything is fine - return $actual_value; - - } - - - /** - * Delete a cookie - * - * - * Cookie::delete('limit'); - * - * - * @param string $name The name of the cookie that should be deleted. - */ - public static function delete($key) - { - unset($_COOKIE[$key]); - } - -} diff --git a/libraries/Gelato/Curl/Curl.php b/libraries/Gelato/Curl/Curl.php deleted file mode 100644 index 6ed7f80..0000000 --- a/libraries/Gelato/Curl/Curl.php +++ /dev/null @@ -1,144 +0,0 @@ - - * @copyright 2012-2014 Romanenko Sergey / Awilum - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -class Curl -{ - /** - * Default curl options. - * - * @var array - */ - protected static $default_options = array( - CURLOPT_USERAGENT => 'Mozilla/5.0 (compatible; Monstra CMS; +http://monstra.org)', - CURLOPT_RETURNTRANSFER => true - ); - - /** - * Information about the last transfer. - * - * @var array - */ - protected static $info; - - /** - * Performs a curl GET request. - * - * - * $res = Curl::get('http://site.com/'); - * - * - * @param string $url The URL to fetch - * @param array $options An array specifying which options to set and their values - * @return string - */ - public static function get($url, array $options = null) - { - // Redefine vars - $url = (string) $url; - - // Check if curl is available - if ( ! function_exists('curl_init')) throw new RuntimeException(vsprintf("%s(): This method requires cURL (http://php.net/curl), it seems like the extension isn't installed.", array(__METHOD__))); - - // Initialize a cURL session - $handle = curl_init($url); - - // Merge options - $options = (array) $options + Curl::$default_options; - - // Set multiple options for a cURL transfer - curl_setopt_array($handle, $options); - - // Perform a cURL session - $response = curl_exec($handle); - - // Set information regarding a specific transfer - Curl::$info = curl_getinfo($handle); - - // Close a cURL session - curl_close($handle); - - // Return response - return $response; - } - - /** - * Performs a curl POST request. - * - * - * $res = Curl::post('http://site.com/login'); - * - * - * @param string $url The URL to fetch - * @param array $data An array with the field name as key and field data as value - * @param boolean $multipart True to send data as multipart/form-data and false to send as application/x-www-form-urlencoded - * @param array $options An array specifying which options to set and their values - * @return string - */ - public static function post($url, array $data = null, $multipart = false, array $options = null) - { - // Redefine vars - $url = (string) $url; - - // Check if curl is available - if ( ! function_exists('curl_init')) throw new RuntimeException(vsprintf("%s(): This method requires cURL (http://php.net/curl), it seems like the extension isn't installed.", array(__METHOD__))); - - // Initialize a cURL session - $handle = curl_init($url); - - // Merge options - $options = (array) $options + Curl::$default_options; - - // Add options - $options[CURLOPT_POST] = true; - $options[CURLOPT_POSTFIELDS] = ($multipart === true) ? (array) $data : http_build_query((array) $data); - - // Set multiple options for a cURL transfer - curl_setopt_array($handle, $options); - - // Perform a cURL session - $response = curl_exec($handle); - - // Set information regarding a specific transfer - Curl::$info = curl_getinfo($handle); - - // Close a cURL session - curl_close($handle); - - // Return response - return $response; - } - - /** - * Gets information about the last transfer. - * - * - * $res = Curl::getInfo(); - * - * - * @param string $value Array key of the array returned by curl_getinfo() - * @return mixed - */ - public static function getInfo($value = null) - { - if (empty(Curl::$info)) { - return false; - } - - return ($value === null) ? Curl::$info : Curl::$info[$value]; - } - -} diff --git a/libraries/Gelato/Date/Date.php b/libraries/Gelato/Date/Date.php deleted file mode 100644 index d37a261..0000000 --- a/libraries/Gelato/Date/Date.php +++ /dev/null @@ -1,422 +0,0 @@ - - * @copyright 2012-2014 Romanenko Sergey / Awilum - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -class Date -{ - /** - * Protected constructor since this is a static class. - * - * @access protected - */ - protected function __construct() - { - // Nothing here - } - - /** - * Get format date - * - * - * echo Date::format($date, 'j.n.Y'); - * - * - * @param integer $date Unix timestamp - * @param string $format Date format - * @return integer - */ - public static function format($date, $format = 'j.n.Y') - { - // Redefine vars - $format = (string) $format; - $date = (int) $date; - - return date($format, $date); - } - - /** - * Get number of seconds in a minute, incrementing by a step. - * - * - * $seconds = Date::seconds(); - * - * - * @param integer $step Amount to increment each step by, 1 to 30 - * @param integer $start Start value - * @param integer $end End value - * @return array - */ - public static function seconds($step = 1, $start = 0, $end = 60) - { - // Redefine vars - $step = (int) $step; - $start = (int) $start; - $end = (int) $end; - - return Date::_range($step, $start, $end); - } - - /** - * Get number of minutes in a hour, incrementing by a step. - * - * - * $minutes = Date::minutes(); - * - * - * @param integer $step Amount to increment each step by, 1 to 30 - * @param integer $start Start value - * @param integer $end End value - * @return array - */ - public static function minutes($step = 5, $start = 0, $end = 60) - { - // Redefine vars - $step = (int) $step; - $start = (int) $start; - $end = (int) $end; - - return Date::_range($step, $start, $end); - } - - /** - * Get number of hours, incrementing by a step. - * - * - * $hours = Date::hours(); - * - * - * @param integer $step Amount to increment each step by, 1 to 30 - * @param integer $long Start value - * @param integer $start End value - * @return array - */ - public static function hours($step = 1, $long = false, $start = null) - { - // Redefine vars - $step = (int) $step; - $long = (bool) $long; - - if ($start === null) $start = ($long === FALSE) ? 1 : 0; - $end = ($long === true) ? 23 : 12; - - return Date::_range($step, $start, $end, true); - } - - /** - * Get number of months. - * - * - * $months = Date::months(); - * - * - * @return array - */ - public static function months() - { - return Date::_range(1, 1, 12, true); - } - - /** - * Get number of days. - * - * - * $months = Date::days(); - * - * - * @return array - */ - public static function days() - { - return Date::_range(1, 1, Date::daysInMonth((int) date('M')), true); - } - - /** - * Returns the number of days in the requested month - * - * - * $days = Date::daysInMonth(1); - * - * - * @param integer $month Month as a number (1-12) - * @param integer $year The year - * @return integer - */ - public static function daysInMonth($month, $year = null) - { - // Redefine vars - $month = (int) $month; - $year = ! empty($year) ? (int) $year : (int) date('Y'); - - if ($month < 1 or $month > 12) { - return false; - } elseif ($month == 2) { - if ($year % 400 == 0 or ($year % 4 == 0 and $year % 100 != 0)) { - return 29; - } - } - - $days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); - - return $days_in_month[$month-1]; - } - - /** - * Get number of years. - * - * - * $years = Date::years(); - * - * - * @param integer $long Start value - * @param integer $start End value - * @return array - */ - public static function years($start = 1980, $end = 2024) - { - // Redefine vars - $start = (int) $start; - $end = (int) $end; - - return Date::_range(1, $start, $end, true); - } - - /** - * Get current season name - * - * - * echo Date::season(); - * - * - * @return string - */ - public static function season() - { - $seasons = array("Winter", "Spring", "Summer", "Autumn"); - - return $seasons[(int) ((date("n") %12)/3)]; - } - - /** - * Get today date - * - * - * echo Date::today(); - * - * - * @param string $format Date format - * @return string - */ - public static function today($format = '') - { - // Redefine vars - $format = (string) $format; - - if ($format != '') { return date($format); } else { return date(MONSTRA_DATE_FORMAT); } - } - - /** - * Get yesterday date - * - * - * echo Date::yesterday(); - * - * - * @param string $format Date format - * @return string - */ - public static function yesterday($format = '') - { - // Redefine vars - $format = (string) $format; - - if ($format != '') { return date($format, strtotime("-1 day")); } else { return date(MONSTRA_DATE_FORMAT, strtotime("-1 day")); } - } - - /** - * Get tomorrow date - * - * - * echo Date::tomorrow(); - * - * - * @param string $format Date format - * @return string - */ - public static function tomorrow($format = '') - { - // Redefine vars - $format = (string) $format; - - if ($format != '') { return date($format, strtotime("+1 day")); } else { return date(MONSTRA_DATE_FORMAT, strtotime("-1 day")); } - } - - /** - * Converts a UNIX timestamp to DOS format. - * - * - * $dos = Date::unix2dos($unix); - * - * - * @param integer $timestamp UNIX timestamp - * @return integer - */ - public static function unix2dos($timestamp = 0) - { - $timestamp = ($_timestamp == 0) ? getdate() : getdate($_timestamp); - - if ($timestamp['year'] < 1980) return (1 << 21 | 1 << 16); - - $timestamp['year'] -= 1980; - - return ($timestamp['year'] << 25 | $timestamp['mon'] << 21 | - $timestamp['mday'] << 16 | $timestamp['hours'] << 11 | - $timestamp['minutes'] << 5 | $timestamp['seconds'] >> 1); - } - - /** - * Converts a DOS timestamp to UNIX format. - * - * - * $unix = Date::dos2unix($dos); - * - * - * @param integer $timestamp DOS timestamp - * @return integer - */ - public static function dos2unix($timestamp) - { - $sec = 2 * ($timestamp & 0x1f); - $min = ($timestamp >> 5) & 0x3f; - $hrs = ($timestamp >> 11) & 0x1f; - $day = ($timestamp >> 16) & 0x1f; - $mon = (($timestamp >> 21) & 0x0f); - $year = (($timestamp >> 25) & 0x7f) + 1980; - - return mktime($hrs, $min, $sec, $mon, $day, $year); - } - - /** - * Get Time zones - * - * @return array - */ - public static function timezones() - { - return array('Kwajalein'=>'(GMT-12:00) International Date Line West', - 'Pacific/Samoa'=>'(GMT-11:00) Midway Island, Samoa', - 'Pacific/Honolulu'=>'(GMT-10:00) Hawaii', - 'America/Anchorage'=>'(GMT-09:00) Alaska', - 'America/Los_Angeles'=>'(GMT-08:00) Pacific Time (US & Canada)', - 'America/Tijuana'=>'(GMT-08:00) Tijuana, Baja California', - 'America/Denver'=>'(GMT-07:00) Mountain Time (US & Canada)', - 'America/Chihuahua'=>'(GMT-07:00) Chihuahua, La Paz, Mazatlan', - 'America/Phoenix'=>'(GMT-07:00) Arizona', - 'America/Regina'=>'(GMT-06:00) Saskatchewan', - 'America/Tegucigalpa'=>'(GMT-06:00) Central America', - 'America/Chicago'=>'(GMT-06:00) Central Time (US & Canada)', - 'America/Mexico_City'=>'(GMT-06:00) Guadalajara, Mexico City, Monterrey', - 'America/New_York'=>'(GMT-05:00) Eastern Time (US & Canada)', - 'America/Bogota'=>'(GMT-05:00) Bogota, Lima, Quito, Rio Branco', - 'America/Indiana/Indianapolis'=>'(GMT-05:00) Indiana (East)', - 'America/Caracas'=>'(GMT-04:30) Caracas', - 'America/Halifax'=>'(GMT-04:00) Atlantic Time (Canada)', - 'America/Manaus'=>'(GMT-04:00) Manaus', - 'America/Santiago'=>'(GMT-04:00) Santiago', - 'America/La_Paz'=>'(GMT-04:00) La Paz', - 'America/St_Johns'=>'(GMT-03:30) Newfoundland', - 'America/Argentina/Buenos_Aires'=>'(GMT-03:00) Buenos Aires', - 'America/Sao_Paulo'=>'(GMT-03:00) Brasilia', - 'America/Godthab'=>'(GMT-03:00) Greenland', - 'America/Montevideo'=>'(GMT-03:00) Montevideo', - 'America/Argentina/Buenos_Aires'=>'(GMT-03:00) Georgetown', - 'Atlantic/South_Georgia'=>'(GMT-02:00) Mid-Atlantic', - 'Atlantic/Azores'=>'(GMT-01:00) Azores', - 'Atlantic/Cape_Verde'=>'(GMT-01:00) Cape Verde Is.', - 'Europe/London'=>'(GMT) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London', - 'Atlantic/Reykjavik'=>'(GMT) Monrovia, Reykjavik', - 'Africa/Casablanca'=>'(GMT) Casablanca', - 'Europe/Belgrade'=>'(GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague', - 'Europe/Sarajevo'=>'(GMT+01:00) Sarajevo, Skopje, Warsaw, Zagreb', - 'Europe/Brussels'=>'(GMT+01:00) Brussels, Copenhagen, Madrid, Paris', - 'Africa/Algiers'=>'(GMT+01:00) West Central Africa', - 'Europe/Amsterdam'=>'(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna', - 'Africa/Cairo'=>'(GMT+02:00) Cairo', - 'Europe/Helsinki'=>'(GMT+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius', - 'Europe/Athens'=>'(GMT+02:00) Athens, Bucharest, Istanbul', - 'Asia/Jerusalem'=>'(GMT+02:00) Jerusalem', - 'Asia/Amman'=>'(GMT+02:00) Amman', - 'Asia/Beirut'=>'(GMT+02:00) Beirut', - 'Africa/Windhoek'=>'(GMT+02:00) Windhoek', - 'Africa/Harare'=>'(GMT+02:00) Harare, Pretoria', - 'Asia/Kuwait'=>'(GMT+03:00) Kuwait, Riyadh', - 'Asia/Baghdad'=>'(GMT+03:00) Baghdad', - 'Europe/Minsk'=>'(GMT+03:00) Minsk', - 'Africa/Nairobi'=>'(GMT+03:00) Nairobi', - 'Asia/Tbilisi'=>'(GMT+03:00) Tbilisi', - 'Asia/Tehran'=>'(GMT+03:30) Tehran', - 'Asia/Muscat'=>'(GMT+04:00) Abu Dhabi, Muscat', - 'Asia/Baku'=>'(GMT+04:00) Baku', - 'Europe/Moscow'=>'(GMT+04:00) Moscow, St. Petersburg, Volgograd', - 'Asia/Yerevan'=>'(GMT+04:00) Yerevan', - 'Asia/Karachi'=>'(GMT+05:00) Islamabad, Karachi', - 'Asia/Tashkent'=>'(GMT+05:00) Tashkent', - 'Asia/Kolkata'=>'(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi', - 'Asia/Colombo'=>'(GMT+05:30) Sri Jayawardenepura', - 'Asia/Katmandu'=>'(GMT+05:45) Kathmandu', - 'Asia/Dhaka'=>'(GMT+06:00) Astana, Dhaka', - 'Asia/Yekaterinburg'=>'(GMT+06:00) Ekaterinburg', - 'Asia/Rangoon'=>'(GMT+06:30) Yangon (Rangoon)', - 'Asia/Novosibirsk'=>'(GMT+07:00) Almaty, Novosibirsk', - 'Asia/Bangkok'=>'(GMT+07:00) Bangkok, Hanoi, Jakarta', - 'Asia/Beijing'=>'(GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi', - 'Asia/Ulaanbaatar'=>'(GMT+08:00) Irkutsk, Ulaan Bataar', - 'Asia/Krasnoyarsk'=>'(GMT+08:00) Krasnoyarsk', - 'Asia/Kuala_Lumpur'=>'(GMT+08:00) Kuala Lumpur, Singapore', - 'Asia/Taipei'=>'(GMT+08:00) Taipei', - 'Australia/Perth'=>'(GMT+08:00) Perth', - 'Asia/Seoul'=>'(GMT+09:00) Seoul', - 'Asia/Tokyo'=>'(GMT+09:00) Osaka, Sapporo, Tokyo', - 'Australia/Darwin'=>'(GMT+09:30) Darwin', - 'Australia/Adelaide'=>'(GMT+09:30) Adelaide', - 'Australia/Sydney'=>'(GMT+10:00) Canberra, Melbourne, Sydney', - 'Australia/Brisbane'=>'(GMT+10:00) Brisbane', - 'Australia/Hobart'=>'(GMT+10:00) Hobart', - 'Asia/Yakutsk'=>'(GMT+10:00) Yakutsk', - 'Pacific/Guam'=>'(GMT+10:00) Guam, Port Moresby', - 'Asia/Vladivostok'=>'(GMT+11:00) Vladivostok', - 'Pacific/Fiji'=>'(GMT+12:00) Fiji, Kamchatka, Marshall Is.', - 'Asia/Magadan'=>'(GMT+12:00) Magadan, Solomon Is., New Caledonia', - 'Pacific/Auckland'=>'(GMT+12:00) Auckland, Wellington', - 'Pacific/Tongatapu'=>'(GMT+13:00) Nukualofa' - ); - } - - /** - * _range() - */ - protected static function _range($step, $start, $end, $flag = false) - { - $result = array(); - if ($flag) { - for ($i = $start; $i <= $end; $i += $step) $result[$i] = (string) $i; - } else { - for ($i = $start; $i < $end; $i += $step) $result[$i] = sprintf('%02d', $i); - } - - return $result; - } - -} diff --git a/libraries/Gelato/Debug/Debug.php b/libraries/Gelato/Debug/Debug.php deleted file mode 100644 index 9c80f5a..0000000 --- a/libraries/Gelato/Debug/Debug.php +++ /dev/null @@ -1,118 +0,0 @@ - - * @copyright 2012-2014 Romanenko Sergey / Awilum - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -class Debug -{ - /** - * Time - * - * @var array - */ - protected static $time = array(); - - /** - * Memory - * - * @var array - */ - protected static $memory = array(); - - /** - * Protected constructor since this is a static class. - * - * @access protected - */ - protected function __construct() - { - // Nothing here - } - - /** - * Save current time for current point - * - * - * Debug::elapsedTimeSetPoint('point_name'); - * - * - * @param string $point_name Point name - */ - public static function elapsedTimeSetPoint($point_name) - { - Debug::$time[$point_name] = microtime(true); - } - - /** - * Get elapsed time for current point - * - * - * echo Debug::elapsedTime('point_name'); - * - * - * @param string $point_name Point name - * @return string - */ - public static function elapsedTime($point_name) - { - if (isset(Debug::$time[$point_name])) return sprintf("%01.4f", microtime(true) - Debug::$time[$point_name]); - } - - /** - * Save current memory for current point - * - * - * Debug::memoryUsageSetPoint('point_name'); - * - * - * @param string $point_name Point name - */ - public static function memoryUsageSetPoint($point_name) - { - Debug::$memory[$point_name] = memory_get_usage(); - } - - /** - * Get memory usage for current point - * - * - * echo Debug::memoryUsage('point_name'); - * - * - * @param string $point_name Point name - * @return string - */ - public static function memoryUsage($point_name) - { - if (isset(Debug::$memory[$point_name])) return Number::byteFormat(memory_get_usage() - Debug::$memory[$point_name]); - } - - /** - * Print the variable $data and exit if exit = true - * - * - * Debug::dump($data); - * - * - * @param mixed $data Data - * @param boolean $exit Exit - */ - public static function dump($data, $exit = false) - { - echo "
    dump \n---------------------- \n\n" . print_r($data, true) . "\n----------------------
    "; - if ($exit) exit; - } - -} diff --git a/libraries/Gelato/ErrorHandler/ErrorHandler.php b/libraries/Gelato/ErrorHandler/ErrorHandler.php deleted file mode 100644 index 4ec24a4..0000000 --- a/libraries/Gelato/ErrorHandler/ErrorHandler.php +++ /dev/null @@ -1,311 +0,0 @@ - - * @copyright 2012-2014 Romanenko Sergey / Awilum - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -class ErrorHandler -{ - - /** - * Error Levels - */ - public static $levels = array ( - E_ERROR => 'Fatal Error', - E_PARSE => 'Parse Error', - E_COMPILE_ERROR => 'Compile Error', - E_COMPILE_WARNING => 'Compile Warning', - E_STRICT => 'Strict Mode Error', - E_NOTICE => 'Notice', - E_WARNING => 'Warning', - E_RECOVERABLE_ERROR => 'Recoverable Error', - E_USER_NOTICE => 'Notice', - E_USER_WARNING => 'Warning', - E_USER_ERROR => 'Error', - /*E_DEPRECATED => 'Deprecated',*/ /* PHP 5.3 only */ - /*E_USER_DEPRECATED => 'Deprecated'*/ /* PHP 5.3 only */ - ); - - /** - * Protected constructor since this is a static class. - * - * @access protected - */ - protected function __construct() - { - // Nothing here - } - - /** - * Returns an array of lines from a file. - * - * @access public - * @param string $file File in which you want to highlight a line - * @param int $line Line number to highlight - * @param int $padding (optional) Number of padding lines - * @return array - */ - protected static function highlightCode($file, $line, $padding = 6) - { - if ( ! is_readable($file)) { - return false; - } - - $handle = fopen($file, 'r'); - $lines = array(); - $currentLine = 0; - - while ( ! feof($handle)) { - $currentLine++; - - $temp = fgets($handle); - - if ($currentLine > $line + $padding) { - break; // Exit loop after we have found what we were looking for - } - - if ($currentLine >= ($line - $padding) && $currentLine <= ($line + $padding)) { - $lines[] = array - ( - 'number' => str_pad($currentLine, 4, ' ', STR_PAD_LEFT), - 'highlighted' => ($currentLine === $line), - 'code' => ErrorHandler::highlightString($temp), - ); - } - } - - fclose($handle); - - return $lines; - } - - /** - * Converts errors to ErrorExceptions. - * - * @param integer $code The error code - * @param string $message The error message - * @param string $file The filename where the error occurred - * @param integer $line The line number where the error occurred - * @return boolean - */ - public static function error($code, $message, $file, $line) - { - // If isset error_reporting and $code then throw new error exception - if ((error_reporting() & $code) !== 0) { - - /** - * Dont thow NOTICE exception for PRODUCTION Environment. Just write to log. - */ - if (GELATO_DEVELOPMENT == false && $code == 8) { - - // Get exception info - $error['code'] = $code; - $error['message'] = $message; - $error['file'] = $file; - $error['line'] = $line; - $error['type'] = 'ErrorException: '; - - $codes = array ( - E_USER_NOTICE => 'Notice', - ); - - $error['type'] .= in_array($error['code'], array_keys($codes)) ? $codes[$error['code']] : 'Unknown Error'; - - // Write to log - Log::write("{$error['type']}: {$error['message']} in {$error['file']} at line {$error['line']}"); - - } else { - throw new ErrorException($message, $code, 0, $file, $line); - } - } - - // Don't execute PHP internal error handler - return true; - } - - /** - * Highlight string - * - * @param string $string String - * @return string - */ - protected static function highlightString($string) - { - $search = array("\r\n", "\n\r", "\r", "\n", '', '', '<?php ', '#$@r4!/*'); - $replace = array('', '', '', '', '', '', '', '/*'); - - return str_replace($search, $replace, highlight_string(' 0) { - foreach ($entry['args'] as $arg) { - ob_start(); - - var_dump($arg); - - $arg = htmlspecialchars(ob_get_contents()); - - ob_end_clean(); - - $arguments[] = $arg; - } - } - - /** - * Location - */ - $location = array(); - - if (isset($entry['file'])) { - $location['file'] = $entry['file']; - $location['line'] = $entry['line']; - $location['code'] = self::highlightCode($entry['file'], $entry['line']); - } - - /** - * Compile into array - */ - $trace[] = array - ( - 'function' => $function, - 'arguments' => $arguments, - 'location' => $location, - ); - } - - return $trace; - } - - /** - * Convert errors not caught by the error handler to ErrorExceptions. - */ - public static function fatal() - { - $e = error_get_last(); - - if ($e !== null && (error_reporting() & $e['type']) !== 0) { - ErrorHandler::exception(new ErrorException($e['message'], $e['type'], 0, $e['file'], $e['line'])); - - exit(1); - } - } - - /** - * Handles uncaught exceptions and returns a pretty error screen. - * - * @access public - * @param Exception $exception An exception object - */ - public static function exception($exception) - { - try { - - // Empty output buffers - while(ob_get_level() > 0) ob_end_clean(); - - // Get exception info - $error['code'] = $exception->getCode(); - $error['message'] = $exception->getMessage(); - $error['file'] = $exception->getFile(); - $error['line'] = $exception->getLine(); - - // Determine error type - if ($exception instanceof ErrorException) { - $error['type'] = 'ErrorException: '; - $error['type'] .= in_array($error['code'], array_keys(ErrorHandler::$levels)) ? ErrorHandler::$levels[$error['code']] : 'Unknown Error'; - } else { - $error['type'] = get_class($exception); - } - - // Write to log - Log::write("{$error['type']}: {$error['message']} in {$error['file']} at line {$error['line']}"); - - // Send headers and output - @header('Content-Type: text/html; charset=UTF-8'); - - if (GELATO_DEVELOPMENT) { - - $error['backtrace'] = $exception->getTrace(); - - if ($exception instanceof ErrorException) { - $error['backtrace'] = array_slice($error['backtrace'], 1); //Remove call to error handler from backtrace - } - - $error['backtrace'] = self::formatBacktrace($error['backtrace']); - $error['highlighted'] = self::highlightCode($error['file'], $error['line']); - - @header('HTTP/1.1 500 Internal Server Error'); - include 'Resources/Views/Errors/exception.php'; - - } else { - - @header('HTTP/1.1 500 Internal Server Error'); - include 'Resources/Views/Errors/production.php'; - - } - - } catch (Exception $e) { - - // Empty output buffers - while(ob_get_level() > 0) ob_end_clean(); - - echo $e->getMessage() . ' in ' . $e->getFile() . ' (line ' . $e->getLine() . ').'; - } - - exit(1); - } -} diff --git a/libraries/Gelato/ErrorHandler/Resources/Views/Errors/exception.php b/libraries/Gelato/ErrorHandler/Resources/Views/Errors/exception.php deleted file mode 100644 index 93e2af0..0000000 --- a/libraries/Gelato/ErrorHandler/Resources/Views/Errors/exception.php +++ /dev/null @@ -1,306 +0,0 @@ - - - - -Error - - -
    - -
    - [] - Gelato -
    -
    - Message: - - -

    - Location: (line ) - - - -

    -
    - - class="highlighted"> - -
    - -
    - - -
    - Backtrace + -
    - - - -
    - Superglobals + -
    - - -
    - Included Files + -
    - -
    - MONSTRA - GELATO -
    -
    - - - - diff --git a/libraries/Gelato/ErrorHandler/Resources/Views/Errors/production.php b/libraries/Gelato/ErrorHandler/Resources/Views/Errors/production.php deleted file mode 100644 index ddecb0f..0000000 --- a/libraries/Gelato/ErrorHandler/Resources/Views/Errors/production.php +++ /dev/null @@ -1,51 +0,0 @@ - - - - -Error - - - -
    -

    Error

    -
    -

    Aw, snap! An error has occurred while processing your request.

    -
    - - diff --git a/libraries/Gelato/FileSystem/Dir.php b/libraries/Gelato/FileSystem/Dir.php deleted file mode 100644 index 423ff7c..0000000 --- a/libraries/Gelato/FileSystem/Dir.php +++ /dev/null @@ -1,228 +0,0 @@ - - * @copyright 2012-2014 Romanenko Sergey / Awilum - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -class Dir -{ - /** - * Protected constructor since this is a static class. - * - * @access protected - */ - protected function __construct() - { - // Nothing here - } - - /** - * Creates a directory - * - * - * Dir::create('folder1'); - * - * - * @param string $dir Name of directory to create - * @param integer $chmod Chmod - * @return boolean - */ - public static function create($dir, $chmod = 0775) - { - // Redefine vars - $dir = (string) $dir; - - // Create new dir if $dir !exists - return ( ! Dir::exists($dir)) ? @mkdir($dir, $chmod, true) : true; - } - - /** - * Checks if this directory exists. - * - * - * if (Dir::exists('folder1')) { - * // Do something... - * } - * - * - * @param string $dir Full path of the directory to check. - * @return boolean - */ - public static function exists($dir) - { - // Redefine vars - $dir = (string) $dir; - - // Directory exists - if (file_exists($dir) && is_dir($dir)) return true; - - // Doesn't exist - return false; - } - - - /** - * Check dir permission - * - * - * echo Dir::checkPerm('folder1'); - * - * - * @param string $dir Directory to check - * @return string - */ - public static function checkPerm($dir) - { - // Redefine vars - $dir = (string) $dir; - - // Clear stat cache - clearstatcache(); - - // Return perm - return substr(sprintf('%o', fileperms($dir)), -4); - } - - - /** - * Delete directory - * - * - * Dir::delete('folder1'); - * - * - * @param string $dir Name of directory to delete - */ - public static function delete($dir) - { - // Redefine vars - $dir = (string) $dir; - - // Delete dir - if (is_dir($dir)){$ob=scandir($dir);foreach ($ob as $o) {if ($o!='.'&&$o!='..') {if(filetype($dir.'/'.$o)=='dir')Dir::delete($dir.'/'.$o); else unlink($dir.'/'.$o);}}} - reset($ob); rmdir($dir); - } - - - /** - * Get list of directories - * - * - * $dirs = Dir::scan('folders'); - * - * - * @param string $dir Directory - */ - public static function scan($dir) - { - // Redefine vars - $dir = (string) $dir; - - // Scan dir - if (is_dir($dir)&&$dh=opendir($dir)){$f=array();while ($fn=readdir($dh)) {if($fn!='.'&&$fn!='..'&&is_dir($dir.DS.$fn))$f[]=$fn;}return$f;} - } - - - /** - * Check if a directory is writable. - * - * - * if (Dir::writable('folder1')) { - * // Do something... - * } - * - * - * @param string $path The path to check. - * @return booleans - */ - public static function writable($path) - { - // Redefine vars - $path = (string) $path; - - // Create temporary file - $file = tempnam($path, 'writable'); - - // File has been created - if ($file !== false) { - - // Remove temporary file - File::delete($file); - - // Writable - return true; - } - - // Else not writable - return false; - } - - - /** - * Get directory size. - * - * - * echo Dir::size('folder1'); - * - * - * @param string $path The path to directory. - * @return integer - */ - public static function size($path) - { - // Redefine vars - $path = (string) $path; - - $total_size = 0; - $files = scandir($path); - $clean_path = rtrim($path, '/') . '/'; - - foreach ($files as $t) { - if ($t <> "." && $t <> "..") { - $current_file = $clean_path . $t; - if (is_dir($current_file)) { - $total_size += Dir::size($current_file); - } else { - $total_size += filesize($current_file); - } - } - } - - // Return total size - return $total_size; - } - - /** - * Copy directory. - * - * Dir::copy('source_folder_path', 'destination_folder_path); - * - * @param $src - * @param $dst - */ - public static function copy($src, $dst) { - $dir = opendir($src); - @mkdir($dst); - while(false !== ( $file = readdir($dir)) ) { - if (( $file != '.' ) && ( $file != '..' )) { - if ( is_dir($src .'/'. $file) ) { - self::copy($src .'/'. $file, $dst .'/'. $file); - } else { - copy($src .'/'. $file,$dst .'/'. $file); - } - } - } - closedir($dir); - } -} diff --git a/libraries/Gelato/FileSystem/File.php b/libraries/Gelato/FileSystem/File.php deleted file mode 100644 index 80e6c95..0000000 --- a/libraries/Gelato/FileSystem/File.php +++ /dev/null @@ -1,577 +0,0 @@ - - * @copyright 2012-2014 Romanenko Sergey / Awilum - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -class File -{ - /** - * Mime type list - * - * @var array - */ - public static $mime_types = array( - 'aac' => 'audio/aac', - 'atom' => 'application/atom+xml', - 'avi' => 'video/avi', - 'bmp' => 'image/x-ms-bmp', - 'c' => 'text/x-c', - 'class' => 'application/octet-stream', - 'css' => 'text/css', - 'csv' => 'text/csv', - 'deb' => 'application/x-deb', - 'dll' => 'application/x-msdownload', - 'dmg' => 'application/x-apple-diskimage', - 'doc' => 'application/msword', - 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - 'exe' => 'application/octet-stream', - 'flv' => 'video/x-flv', - 'gif' => 'image/gif', - 'gz' => 'application/x-gzip', - 'h' => 'text/x-c', - 'htm' => 'text/html', - 'html' => 'text/html', - 'ini' => 'text/plain', - 'jar' => 'application/java-archive', - 'java' => 'text/x-java', - 'jpeg' => 'image/jpeg', - 'jpg' => 'image/jpeg', - 'js' => 'text/javascript', - 'json' => 'application/json', - 'mid' => 'audio/midi', - 'midi' => 'audio/midi', - 'mka' => 'audio/x-matroska', - 'mkv' => 'video/x-matroska', - 'mp3' => 'audio/mpeg', - 'mp4' => 'application/mp4', - 'mpeg' => 'video/mpeg', - 'mpg' => 'video/mpeg', - 'odt' => 'application/vnd.oasis.opendocument.text', - 'ogg' => 'audio/ogg', - 'pdf' => 'application/pdf', - 'php' => 'text/x-php', - 'png' => 'image/png', - 'psd' => 'image/vnd.adobe.photoshop', - 'py' => 'application/x-python', - 'ra' => 'audio/vnd.rn-realaudio', - 'ram' => 'audio/vnd.rn-realaudio', - 'rar' => 'application/x-rar-compressed', - 'rss' => 'application/rss+xml', - 'safariextz' => 'application/x-safari-extension', - 'sh' => 'text/x-shellscript', - 'shtml' => 'text/html', - 'swf' => 'application/x-shockwave-flash', - 'tar' => 'application/x-tar', - 'tif' => 'image/tiff', - 'tiff' => 'image/tiff', - 'torrent' => 'application/x-bittorrent', - 'txt' => 'text/plain', - 'wav' => 'audio/wav', - 'webp' => 'image/webp', - 'wma' => 'audio/x-ms-wma', - 'xls' => 'application/vnd.ms-excel', - 'xml' => 'text/xml', - 'zip' => 'application/zip', - ); - - /** - * Protected constructor since this is a static class. - * - * @access protected - */ - protected function __construct() - { - // Nothing here - } - - /** - * Returns true if the File exists. - * - * - * if (File::exists('filename.txt')) { - * // Do something... - * } - * - * - * @param string $filename The file name - * @return boolean - */ - public static function exists($filename) - { - // Redefine vars - $filename = (string) $filename; - - // Return - return (file_exists($filename) && is_file($filename)); - } - - /** - * Delete file - * - * - * File::delete('filename.txt'); - * - * - * @param mixed $filename The file name or array of files - * @return boolean - */ - public static function delete($filename) - { - // Is array - if (is_array($filename)) { - - // Delete each file in $filename array - foreach ($filename as $file) { - @unlink((string) $file); - } - - } else { - // Is string - return @unlink((string) $filename); - } - - } - - /** - * Rename file - * - * - * File::rename('filename1.txt', 'filename2.txt'); - * - * - * @param string $from Original file location - * @param string $to Desitination location of the file - * @return boolean - */ - public static function rename($from, $to) - { - // Redefine vars - $from = (string) $from; - $to = (string) $to; - - // If file exists $to than rename it - if ( ! File::exists($to)) return rename($from, $to); - - // Else return false - return false; - } - - /** - * Copy file - * - * - * File::copy('folder1/filename.txt', 'folder2/filename.txt'); - * - * - * @param string $from Original file location - * @param string $to Desitination location of the file - * @return boolean - */ - public static function copy($from, $to) - { - // Redefine vars - $from = (string) $from; - $to = (string) $to; - - // If file !exists $from and exists $to then return false - if ( ! File::exists($from) || File::exists($to)) return false; - - // Else copy file - return copy($from, $to); - } - - /** - * Get the File extension. - * - * - * echo File::ext('filename.txt'); - * - * - * @param string $filename The file name - * @return string - */ - public static function ext($filename) - { - // Redefine vars - $filename = (string) $filename; - - // Return file extension - return substr(strrchr($filename, '.'), 1); - } - - /** - * Get the File name - * - * - * echo File::name('filename.txt'); - * - * - * @param string $filename The file name - * @return string - */ - public static function name($filename) - { - // Redefine vars - $filename = (string) $filename; - - // Return filename - return basename($filename, '.'.File::ext($filename)); - } - - /** - * Get list of files in directory recursive - * - * - * $files = File::scan('folder'); - * $files = File::scan('folder', 'txt'); - * $files = File::scan('folder', array('txt', 'log')); - * - * - * @param string $folder Folder - * @param mixed $type Files types - * @return array - */ - public static function scan($folder, $type = null) - { - $data = array(); - if (is_dir($folder)) { - $iterator = new RecursiveDirectoryIterator($folder); - foreach (new RecursiveIteratorIterator($iterator) as $file) { - if ($type !== null) { - if (is_array($type)) { - $file_ext = substr(strrchr($file->getFilename(), '.'), 1); - if (in_array($file_ext, $type)) { - if (strpos($file->getFilename(), $file_ext, 1)) { - $data[] = $file->getFilename(); - } - } - } else { - if (strpos($file->getFilename(), $type, 1)) { - $data[] = $file->getFilename(); - } - } - } else { - if ($file->getFilename() !== '.' && $file->getFilename() !== '..') $data[] = $file->getFilename(); - } - } - - return $data; - } else { - return false; - } - } - - /** - * Fetch the content from a file or URL. - * - * - * echo File::getContent('filename.txt'); - * - * - * @param string $filename The file name - * @return boolean - */ - public static function getContent($filename) - { - // Redefine vars - $filename = (string) $filename; - - // If file exists load it - if (File::exists($filename)) { - return file_get_contents($filename); - } - } - - /** - * Writes a string to a file. - * - * @param string $filename The path of the file. - * @param string $content The content that should be written. - * @param boolean $createFile Should the file be created if it doesn't exists? - * @param boolean $append Should the content be appended if the file already exists? - * @param integer $chmod Mode that should be applied on the file. - * @return boolean - */ - public static function setContent($filename, $content, $create_file = true, $append = false, $chmod = 0666) - { - // Redefine vars - $filename = (string) $filename; - $content = (string) $content; - $create_file = (bool) $create_file; - $append = (bool) $append; - - // File may not be created, but it doesn't exist either - if ( ! $create_file && File::exists($filename)) throw new RuntimeException(vsprintf("%s(): The file '{$filename}' doesn't exist", array(__METHOD__))); - - // Create directory recursively if needed - Dir::create(dirname($filename)); - - // Create file & open for writing - $handler = ($append) ? @fopen($filename, 'a') : @fopen($filename, 'w'); - - // Something went wrong - if ($handler === false) throw new RuntimeException(vsprintf("%s(): The file '{$filename}' could not be created. Check if PHP has enough permissions.", array(__METHOD__))); - - // Store error reporting level - $level = error_reporting(); - - // Disable errors - error_reporting(0); - - // Write to file - $write = fwrite($handler, $content); - - // Validate write - if($write === false) throw new RuntimeException(vsprintf("%s(): The file '{$filename}' could not be created. Check if PHP has enough permissions.", array(__METHOD__))); - - // Close the file - fclose($handler); - - // Chmod file - chmod($filename, $chmod); - - // Restore error reporting level - error_reporting($level); - - // Return - return true; - } - - /** - * Get time(in Unix timestamp) the file was last changed - * - * - * echo File::lastChange('filename.txt'); - * - * - * @param string $filename The file name - * @return boolean - */ - public static function lastChange($filename) - { - // Redefine vars - $filename = (string) $filename; - - // If file exists return filemtime - if (File::exists($filename)) { - return filemtime($filename); - } - - // Return - return false; - - } - - /** - * Get last access time - * - * - * echo File::lastAccess('filename.txt'); - * - * - * @param string $filename The file name - * @return boolean - */ - public static function lastAccess($filename) - { - // Redefine vars - $filename = (string) $filename; - - // If file exists return fileatime - if (File::exists($filename)) { - return fileatime($filename); - } - - // Return - return false; - } - - /** - * Returns the mime type of a file. Returns false if the mime type is not found. - * - * - * echo File::mime('filename.txt'); - * - * - * @param string $file Full path to the file - * @param boolean $guess Set to false to disable mime type guessing - * @return string - */ - public static function mime($file, $guess = true) - { - // Redefine vars - $file = (string) $file; - $guess = (bool) $guess; - - // Get mime using the file information functions - if (function_exists('finfo_open')) { - - $info = finfo_open(FILEINFO_MIME_TYPE); - - $mime = finfo_file($info, $file); - - finfo_close($info); - - return $mime; - - } else { - - // Just guess mime by using the file extension - if ($guess === true) { - - $mime_types = File::$mime_types; - - $extension = pathinfo($file, PATHINFO_EXTENSION); - - return isset($mime_types[$extension]) ? $mime_types[$extension] : false; - } else { - return false; - } - } - } - - /** - * Forces a file to be downloaded. - * - * - * File::download('filename.txt'); - * - * - * @param string $file Full path to file - * @param string $content_type Content type of the file - * @param string $filename Filename of the download - * @param integer $kbps Max download speed in KiB/s - */ - public static function download($file, $content_type = null, $filename = null, $kbps = 0) - { - // Redefine vars - $file = (string) $file; - $content_type = ($content_type === null) ? null : (string) $content_type; - $filename = ($filename === null) ? null : (string) $filename; - $kbps = (int) $kbps; - - // Check that the file exists and that its readable - if (file_exists($file) === false || is_readable($file) === false) { - throw new RuntimeException(vsprintf("%s(): Failed to open stream.", array(__METHOD__))); - } - - // Empty output buffers - while (ob_get_level() > 0) ob_end_clean(); - - // Send headers - if ($content_type === null) $content_type = File::mime($file); - - if ($filename === null) $filename = basename($file); - - header('Content-type: ' . $content_type); - header('Content-Disposition: attachment; filename="' . $filename . '"'); - header('Content-Length: ' . filesize($file)); - - // Read file and write it to the output - @set_time_limit(0); - - if ($kbps === 0) { - - readfile($file); - - } else { - - $handle = fopen($file, 'r'); - - while ( ! feof($handle) && !connection_aborted()) { - - $s = microtime(true); - - echo fread($handle, round($kbps * 1024)); - - if (($wait = 1e6 - (microtime(true) - $s)) > 0) usleep($wait); - - } - - fclose($handle); - } - - exit(); - } - - /** - * Display a file in the browser. - * - * - * File::display('filename.txt'); - * - * - * @param string $file Full path to file - * @param string $content_type Content type of the file - * @param string $filename Filename of the download - */ - public static function display($file, $content_type = null, $filename = null) - { - // Redefine vars - $file = (string) $file; - $content_type = ($content_type === null) ? null : (string) $content_type; - $filename = ($filename === null) ? null : (string) $filename; - - // Check that the file exists and that its readable - if (file_exists($file) === false || is_readable($file) === false) { - throw new RuntimeException(vsprintf("%s(): Failed to open stream.", array(__METHOD__))); - } - - // Empty output buffers - while (ob_get_level() > 0) ob_end_clean(); - - // Send headers - if ($content_type === null) $content_type = File::mime($file); - - if($filename === null) $filename = basename($file); - - header('Content-type: ' . $content_type); - header('Content-Disposition: inline; filename="' . $filename . '"'); - header('Content-Length: ' . filesize($file)); - - // Read file and write to output - readfile($file); - - exit(); - } - - /** - * Tests whether a file is writable for anyone. - * - * - * if (File::writable('filename.txt')) { - * // do something... - * } - * - * - * @param string $file File to check - * @return boolean - */ - public static function writable($file) - { - // Redefine vars - $file = (string) $file; - - // Is file exists ? - if ( ! file_exists($file)) throw new RuntimeException(vsprintf("%s(): The file '{$file}' doesn't exist", array(__METHOD__))); - - // Gets file permissions - $perms = fileperms($file); - - // Is writable ? - if (is_writable($file) || ($perms & 0x0080) || ($perms & 0x0010) || ($perms & 0x0002)) return true; - } - -} diff --git a/libraries/Gelato/Form/Form.php b/libraries/Gelato/Form/Form.php deleted file mode 100644 index 458e09b..0000000 --- a/libraries/Gelato/Form/Form.php +++ /dev/null @@ -1,412 +0,0 @@ - - * @copyright 2012-2014 Romanenko Sergey / Awilum - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -class Form -{ - /** - * The registered custom macros. - * - * @var array - */ - public static $macros = array(); - - /** - * Protected constructor since this is a static class. - * - * @access protected - */ - protected function __construct() - { - // Nothing here - } - - /** - * Registers a custom macro. - * - * - * - * // Registering a Form macro - * Form::macro('my_field', function() { - * return ''; - * }); - * - * // Calling a custom Form macro - * echo Form::my_field(); - * - * - * // Registering a Form macro with parameters - * Form::macro('my_field', function($value = '') { - * return ''; - * }); - * - * // Calling a custom Form macro with parameters - * echo Form::my_field('Monstra'); - * - * - * - * @param string $name Name - * @param Closure $macro Macro - */ - public static function macro($name, $macro) - { - Form::$macros[$name] = $macro; - } - - /** - * Create an opening HTML form tag. - * - * - * // Form will submit back to the current page using POST - * echo Form::open(); - * - * // Form will submit to 'search' using GET - * echo Form::open('search', array('method' => 'get')); - * - * // When "file" inputs are present, you must include the "enctype" - * echo Form::open(null, array('enctype' => 'multipart/form-data')); - * - * - * @param mixed $action Form action, defaults to the current request URI. - * @param array $attributes HTML attributes. - * @uses Url::base - * @uses Html::attributes - * @return string - */ - public static function open($action = null, array $attributes = null) - { - if (! $action) { - - // Submits back to the current url - $action = ''; - - } elseif (strpos($action, '://') === false) { - - // Make the URI absolute - $action = Url::base() . '/' . $action; - } - - // Add the form action to the attributes - $attributes['action'] = $action; - - if ( ! isset($attributes['method'])) { - - // Use POST method - $attributes['method'] = 'post'; - } - - return ''; - } - - /** - * Create a form input. - * Text is default input type. - * - * - * echo Form::input('username', $username); - * - * - * @param string $name Input name - * @param string $value Input value - * @param array $attributes HTML attributes - * @uses Html::attributes - * @return string - */ - public static function input($name, $value = null, array $attributes = null) - { - // Set the input name - $attributes['name'] = $name; - - // Set the input id - $attributes['id'] = (isset($attributes['id']))?$attributes['id']:$name; - - // Set the input value - $attributes['value'] = $value; - - if ( ! isset($attributes['type'])) { - // Default type is text - $attributes['type'] = 'text'; - } - - return ''; - } - - /** - * Create a hidden form input. - * - * - * echo Form::hidden('user_id', $user_id); - * - * - * @param string $name Input name - * @param string $value Input value - * @param array $attributes HTML attributes - * @uses Form::input - * @return string - */ - public static function hidden($name, $value = null, array $attributes = null) - { - // Set the input type - $attributes['type'] = 'hidden'; - - return Form::input($name, $value, $attributes); - } - - /** - * Creates a password form input. - * - * - * echo Form::password('password'); - * - * - * @param string $name Input name - * @param string $value Input value - * @param array $attributes HTML attributes - * @uses Form::input - * @return string - */ - public static function password($name, $value = null, array $attributes = null) - { - // Set the input type - $attributes['type'] = 'password'; - - return Form::input($name, $value, $attributes); - } - - /** - * Creates a file upload form input. - * - * - * echo Form::file('image'); - * - * - * @param string $name Input name - * @param array $attributes HTML attributes - * @uses Form::input - * @return string - */ - public static function file($name, array $attributes = null) - { - // Set the input type - $attributes['type'] = 'file'; - - return Form::input($name, null, $attributes); - } - - /** - * Creates a checkbox form input. - * - * - * echo Form::checkbox('i_am_not_a_robot'); - * - * - * @param string $name Input name - * @param string $input Input value - * @param boolean $checked Checked status - * @param array $attributes HTML attributes - * @uses Form::input - * @return string - */ - public static function checkbox($name, $value = null, $checked = false, array $attributes = null) - { - // Set the input type - $attributes['type'] = 'checkbox'; - - if ($checked === true) { - // Make the checkbox active - $attributes['checked'] = 'checked'; - } - - return Form::input($name, $value, $attributes); - } - - /** - * Creates a radio form input. - * - * - * echo Form::radio('i_am_not_a_robot'); - * - * - * @param string $name Input name - * @param string $value Input value - * @param boolean $checked Checked status - * @param array $attributes HTML attributes - * @uses Form::input - * @return string - */ - public static function radio($name, $value = null, $checked = null, array $attributes = null) - { - // Set the input type - $attributes['type'] = 'radio'; - - if ($checked === true) { - // Make the radio active - $attributes['checked'] = 'checked'; - } - - return Form::input($name, $value, $attributes); - } - - /** - * Creates a textarea form input. - * - * - * echo Form::textarea('text', $text); - * - * - * @param string $name Name - * @param string $body Body - * @param array $attributes HTML attributes - * @uses Html::attributes - * @return string - */ - public static function textarea($name, $body = '', array $attributes = null) - { - // Set the input name - $attributes['name'] = $name; - - // Set the input id - $attributes['id'] = (isset($attributes['id']))?$attributes['id']:$name; - - return ''.$body.''; - } - - /** - * Creates a select form input. - * - * - * echo Form::select('themes', array('default', 'classic', 'modern')); - * - * - * @param string $name Name - * @param array $options Options array - * @param string $selected Selected option - * @param array $attributes HTML attributes - * @uses Html::attributes - * @return string - */ - public static function select($name, array $options = null, $selected = null, array $attributes = null) - { - // Set the input name - $attributes['name'] = $name; - - // Set the input id - $attributes['id'] = (isset($attributes['id']))?$attributes['id']:$name; - - $options_output = ''; - - foreach ($options as $value => $name) { - if ($selected == $value) $current = ' selected '; else $current = ''; - $options_output .= ''; - } - - return ''.$options_output.''; - } - - /** - * Creates a submit form input. - * - * - * echo Form::submit('save', 'Save'); - * - * - * @param string $name Input name - * @param string $value Input value - * @param array $attributes HTML attributes - * @uses Form::input - * @return string - */ - public static function submit($name, $value, array $attributes = null) - { - // Set the input type - $attributes['type'] = 'submit'; - - return Form::input($name, $value, $attributes); - } - - /** - * Creates a button form input. - * - * - * echo Form::button('save', 'Save Profile', array('type' => 'submit')); - * - * - * @param string $name Input name - * @param string $value Input value - * @param array $attributes HTML attributes - * @uses Html::attributes - * @return string - */ - public static function button($name, $body, array $attributes = null) - { - // Set the input name - $attributes['name'] = $name; - - return ''.$body.''; - } - - /** - * Creates a form label. - * - * - * echo Form::label('username', 'Username'); - * - * - * @param string $input Target input - * @param string $text Label text - * @param array $attributes HTML attributes - * @uses Html::attributes - * @return string - */ - public static function label($input, $text, array $attributes = null) - { - // Set the label target - $attributes['for'] = $input; - - return ''.$text.''; - } - - /** - * Create closing form tag. - * - * - * echo Form::close(); - * - * - * @return string - */ - public static function close() - { - return ''; - } - - /** - * Dynamically handle calls to custom macros. - * - * @param string $method - * @param array $parameters - * @return mixed - */ - public static function __callStatic($method, $parameters) - { - if (isset(Form::$macros[$method])) { - return call_user_func_array(Form::$macros[$method], $parameters); - } - - throw new RuntimeException("Method [$method] does not exist."); - } - -} diff --git a/libraries/Gelato/Gelato.php b/libraries/Gelato/Gelato.php deleted file mode 100644 index b19835a..0000000 --- a/libraries/Gelato/Gelato.php +++ /dev/null @@ -1,124 +0,0 @@ - - * @copyright 2012-2014 Romanenko Sergey / Awilum - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * The version of Gelato - */ -define('GELATO_VERSION', '1.0.3'); - -/** - * Define __DIR__ constant for PHP 5.2.x - */ -if ( ! defined('__DIR__')) { - define('__DIR__', dirname(__FILE__)); -} - -/** - * Display Gelato Errors or not ? - */ -if ( ! defined('GELATO_DEVELOPMENT')) { - define('GELATO_DEVELOPMENT', true); -} - -/** - * Use Gelato Class Loader or not ? - */ -if ( ! defined('GELATO_CLASS_LOADER')) { - define('GELATO_CLASS_LOADER', true); -} - -/** - * Load Gelato Logger - */ -require_once __DIR__ . '/Log/Log.php'; - -/** - * Use Gelato Logger default path or not ? - */ -if ( ! defined('GELATO_LOGS_PATH')) { - define('GELATO_LOGS_PATH', __DIR__. '/_logs'); -} - -/** - * Configure Gelato Logger - */ -Log::configure('path', GELATO_LOGS_PATH); - -/** - * Load Gelato Error Handler - */ -require_once __DIR__ . '/ErrorHandler/ErrorHandler.php'; - -/** - * Set Error Handler - */ -set_error_handler('ErrorHandler::error'); - -/** - * Set Fatal Error Handler - */ -register_shutdown_function('ErrorHandler::fatal'); - -/** - * Set Exception Handler - */ -set_exception_handler('ErrorHandler::exception'); - -/** - * Gelato Class Loader - */ -require_once __DIR__ . '/ClassLoader/ClassLoader.php'; - -/** - * Map all Gelato Classes - */ -ClassLoader::mapClasses(array( - 'Agent' => __DIR__.'/Agent/Agent.php', - 'Arr' => __DIR__.'/Arr/Arr.php', - 'Cache' => __DIR__.'/Cache/Cache.php', - 'Cookie' => __DIR__.'/Cookie/Cookie.php', - 'Curl' => __DIR__.'/Curl/Curl.php', - 'Date' => __DIR__.'/Date/Date.php', - 'Debug' => __DIR__.'/Debug/Debug.php', - 'File' => __DIR__.'/FileSystem/File.php', - 'Dir' => __DIR__.'/FileSystem/Dir.php', - 'Form' => __DIR__.'/Form/Form.php', - 'Html' => __DIR__.'/Html/Html.php', - 'Image' => __DIR__.'/Image/Image.php', - 'Inflector' => __DIR__.'/Inflector/Inflector.php', - 'MinifyCSS' => __DIR__.'/Minify/MinifyCSS.php', - 'MinifyHTML' => __DIR__.'/Minify/MinifyHTML.php', - 'MinifyJS' => __DIR__.'/Minify/MinifyJS.php', - 'Notification' => __DIR__.'/Notification/Notification.php', - 'Number' => __DIR__.'/Number/Number.php', - 'Registry' => __DIR__.'/Registry/Registry.php', - 'Request' => __DIR__.'/Http/Request.php', - 'Response' => __DIR__.'/Http/Response.php', - 'Token' => __DIR__.'/Security/Token.php', - 'Text' => __DIR__.'/Text/Text.php', - 'Session' => __DIR__.'/Session/Session.php', - 'Url' => __DIR__.'/Url/Url.php', - 'Valid' => __DIR__.'/Validation/Valid.php', - 'Zip' => __DIR__.'/Zip/Zip.php', -)); - -/** - * Register Gelato Class Loader - */ -if (GELATO_CLASS_LOADER) { - ClassLoader::register(); -} diff --git a/libraries/Gelato/Html/Html.php b/libraries/Gelato/Html/Html.php deleted file mode 100644 index 5ceb9a9..0000000 --- a/libraries/Gelato/Html/Html.php +++ /dev/null @@ -1,371 +0,0 @@ - - * @copyright 2012-2014 Romanenko Sergey / Awilum - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -class Html -{ - /** - * Preferred order of attributes - * - * @var array - */ - public static $attribute_order = array ( - 'action', 'method', 'type', 'id', 'name', 'value', - 'href', 'src', 'width', 'height', 'cols', 'rows', - 'size', 'maxlength', 'rel', 'media', 'accept-charset', - 'accept', 'tabindex', 'accesskey', 'alt', 'title', 'class', - 'style', 'selected', 'checked', 'readonly', 'disabled', - ); - - /** - * The registered custom macros. - * - * @var array - */ - public static $macros = array(); - - /** - * Protected constructor since this is a static class. - * - * @access protected - */ - protected function __construct() - { - // Nothing here - } - - /** - * Registers a custom macro. - * - * - * - * // Registering a Html macro - * Html::macro('my_element', function() { - * return ''; - * }); - * - * // Calling a custom Html macro - * echo Html::my_element(); - * - * - * // Registering a Html macro with parameters - * Html::macro('my_element', function($id = '') { - * return ''; - * }); - * - * // Calling a custom Html macro with parameters - * echo Html::my_element('monstra'); - * - * - * - * @param string $name Name - * @param Closure $macro Macro - */ - public static function macro($name, $macro) - { - Html::$macros[$name] = $macro; - } - - /** - * Convert special characters to HTML entities. All untrusted content - * should be passed through this method to prevent XSS injections. - * - * - * echo Html::chars($username); - * - * - * @param string $value String to convert - * @param boolean $double_encode Encode existing entities - * @return string - */ - public static function chars($value, $double_encode = true) - { - return htmlspecialchars((string) $value, ENT_QUOTES, 'utf-8', $double_encode); - } - - /** - * Compiles an array of HTML attributes into an attribute string. - * Attributes will be sorted using Html::$attribute_order for consistency. - * - * - * echo ''.$content.''; - * - * - * @param array $attributes Attribute list - * @return string - */ - public static function attributes(array $attributes = null) - { - if (empty($attributes)) return ''; - - // Init var - $sorted = array(); - - foreach (Html::$attribute_order as $key) { - - if (isset($attributes[$key])) { - // Add the attribute to the sorted list - $sorted[$key] = $attributes[$key]; - } - - } - - // Combine the sorted attributes - $attributes = $sorted + $attributes; - - $compiled = ''; - foreach ($attributes as $key => $value) { - - if ($value === NULL) { - // Skip attributes that have NULL values - continue; - } - - if (is_int($key)) { - // Assume non-associative keys are mirrored attributes - $key = $value; - } - - // Add the attribute value - $compiled .= ' '.$key.'="'.Html::chars($value).'"'; - } - - return $compiled; - } - - /** - * Create br tags - * - * - * echo Html::br(2); - * - * - * @param integer $num Count of line break tag - * @return string - */ - public static function br($num = 1) - { - return str_repeat("
    ",(int) $num); - } - - /** - * Create   - * - * - * echo Html::nbsp(2); - * - * - * @param integer $num Count of   - * @return string - */ - public static function nbsp($num = 1) - { - return str_repeat(" ", (int) $num); - } - - /** - * Create an arrow - * - * - * echo Html::arrow('right'); - * - * - * @param string $direction Arrow direction [up,down,left,right] - * @param boolean $render If this option is true then render html object else return it - * @return string - */ - public static function arrow($direction) - { - switch ($direction) { - case "up": $output = ''; break; - case "down": $output = ''; break; - case "left": $output = ''; break; - case "right": $output = ''; break; - } - - return $output; - } - - /** - * Create HTML link anchor. - * - * - * echo Html::anchor('About', 'http://sitename.com/about'); - * - * - * @param string $title Anchor title - * @param string $url Anchor url - * @param array $attributes Anchor attributes - * @uses Html::attributes - * @return string - */ - public static function anchor($title, $url = null, array $attributes = null) - { - // Add link - if ($url !== null) $attributes['href'] = $url; - return ''.$title.''; - } - - /** - * Create HTML tag - * - * - * echo Html::heading('Title', 1); - * - * - * @param string $title Text - * @param integer $h Number [1-6] - * @param array $attributes Heading attributes - * @uses Html::attributes - * @return string - */ - public static function heading($title, $h = 1, array $attributes = null) - { - $output = ''.$title.''; - - return $output; - } - - /** - * Generate document type declarations - * - * - * echo Html::doctype('html5'); - * - * - * @param string $type Doctype to generated - * @return mixed - */ - public static function doctype($type = 'html5') - { - $doctypes = array('xhtml11' => '', - 'xhtml1-strict' => '', - 'xhtml1-trans' => '', - 'xhtml1-frame' => '', - 'html5' => '', - 'html4-strict' => '', - 'html4-trans' => '', - 'html4-frame' => ''); - - if (isset($doctypes[$type])) return $doctypes[$type]; else return false; - - } - - /** - * Create image - * - * - * echo Html::image('data/files/pic1.jpg'); - * - * - * @param array $attributes Image attributes - * @param string $file File - * @uses Url::base - * @return string - */ - public static function image($file, array $attributes = null) - { - if (strpos($file, '://') === FALSE) { - $file = Url::base().'/'.$file; - } - - // Add the image link - $attributes['src'] = $file; - $attributes['alt'] = (isset($attributes['alt'])) ? $attributes['alt'] : pathinfo($file, PATHINFO_FILENAME); - - return ''; - } - - /** - * Obfuscate an e-mail address to prevent spam-bots from sniffing it. - * - * - * echo Html::email('gelato@monstra.org'); - * - * - * @param string $email - * @return string - */ - public static function email($email) - { - return str_replace('@', '@', Html::obfuscate($email)); - } - - /** - * Obfuscate a string to prevent spam-bots from sniffing it. - * - * This method obfuscate the value, randomly convert each - * letter to its entity or hexadecimal representation, keeping a - * bot from sniffing the randomly obfuscated letters. - * - * - * echo Html::obfuscate('gelato@monstra.org'); - * - * - * @param string $value - * @return string - */ - public static function obfuscate($value) - { - $safe = ''; - - foreach (str_split($value) as $letter) { - switch (rand(1, 3)) { - case 1: - $safe .= '&#'.ord($letter).';'; - break; - case 2: - $safe .= '&#x'.dechex(ord($letter)).';'; - break; - case 3: - $safe .= $letter; - } - } - - return $safe; - } - - /** - * Convert html to plain text - * - * - * echo Html::toText('test'); - * - * - * @param string $str String - * @return string - */ - public static function toText($str) - { - return htmlspecialchars($str, ENT_QUOTES, 'utf-8'); - } - - /** - * Dynamically handle calls to custom macros. - * - * @param string $method - * @param array $parameters - * @return mixed - */ - public static function __callStatic($method, $parameters) - { - if (isset(Html::$macros[$method])) { - return call_user_func_array(Html::$macros[$method], $parameters); - } - - throw new RuntimeException("Method [$method] does not exist."); - } - -} diff --git a/libraries/Gelato/Http/Request.php b/libraries/Gelato/Http/Request.php deleted file mode 100644 index fb03fb4..0000000 --- a/libraries/Gelato/Http/Request.php +++ /dev/null @@ -1,155 +0,0 @@ - - * @copyright 2012-2014 Romanenko Sergey / Awilum - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -class Request -{ - /** - * Protected constructor since this is a static class. - * - * @access protected - */ - protected function __construct() - { - // Nothing here - } - - /** - * Redirects the browser to a page specified by the $url argument. - * - * - * Request::redirect('test'); - * - * - * @param string $url The URL - * @param integer $status Status - * @param integer $delay Delay - */ - public static function redirect($url, $status = 302, $delay = null) - { - // Redefine vars - $url = (string) $url; - $status = (int) $status; - - // Status codes - $messages = array(); - $messages[301] = '301 Moved Permanently'; - $messages[302] = '302 Found'; - - // Is Headers sent ? - if (headers_sent()) { - - echo "\n"; - - } else { - - // Redirect headers - Request::setHeaders('HTTP/1.1 ' . $status . ' ' . Arr::get($messages, $status, 302)); - - // Delay execution - if ($delay !== null) sleep((int) $delay); - - // Redirect - Request::setHeaders("Location: $url"); - - // Shutdown request - Request::shutdown(); - - } - - } - - /** - * Set one or multiple headers. - * - * - * Request::setHeaders('Location: http://site.com/'); - * - * - * @param mixed $headers String or array with headers to send. - */ - public static function setHeaders($headers) - { - // Loop elements - foreach ((array) $headers as $header) { - - // Set header - header((string) $header); - - } - - } - - /** - * Get - * - * - * $action = Request::get('action'); - * - * - * @param string $key Key - * @param mixed - */ - public static function get($key) - { - return Arr::get($_GET, $key); - } - - /** - * Post - * - * - * $login = Request::post('login'); - * - * - * @param string $key Key - * @param mixed - */ - public static function post($key) - { - return Arr::get($_POST, $key); - } - - /** - * Returns whether this is an ajax request or not - * - * - * if (Request::isAjax()) { - * // do something... - * } - * - * - * @return boolean - */ - public static function isAjax() - { - return isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] === 'XMLHttpRequest'; - } - - /** - * Terminate request - * - * - * Request::shutdown(); - * - * - */ - public static function shutdown() - { - exit(0); - } - -} diff --git a/libraries/Gelato/Http/Response.php b/libraries/Gelato/Http/Response.php deleted file mode 100644 index d8a3ee3..0000000 --- a/libraries/Gelato/Http/Response.php +++ /dev/null @@ -1,112 +0,0 @@ - - * @copyright 2012-2014 Romanenko Sergey / Awilum - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -class Response -{ - /** - * HTTP status codes and messages - * - * @var array - */ - public static $messages = array( - 100 => 'Continue', - 101 => 'Switching Protocols', - 102 => 'Processing', // RFC2518 - 200 => 'OK', - 201 => 'Created', - 202 => 'Accepted', - 203 => 'Non-Authoritative Information', - 204 => 'No Content', - 205 => 'Reset Content', - 206 => 'Partial Content', - 207 => 'Multi-Status', // RFC4918 - 208 => 'Already Reported', // RFC5842 - 226 => 'IM Used', // RFC3229 - 300 => 'Multiple Choices', - 301 => 'Moved Permanently', - 302 => 'Found', - 303 => 'See Other', - 304 => 'Not Modified', - 305 => 'Use Proxy', - 306 => 'Reserved', - 307 => 'Temporary Redirect', - 308 => 'Permanent Redirect', // RFC-reschke-http-status-308-07 - 400 => 'Bad Request', - 401 => 'Unauthorized', - 402 => 'Payment Required', - 403 => 'Forbidden', - 404 => 'Not Found', - 405 => 'Method Not Allowed', - 406 => 'Not Acceptable', - 407 => 'Proxy Authentication Required', - 408 => 'Request Timeout', - 409 => 'Conflict', - 410 => 'Gone', - 411 => 'Length Required', - 412 => 'Precondition Failed', - 413 => 'Request Entity Too Large', - 414 => 'Request-URI Too Long', - 415 => 'Unsupported Media Type', - 416 => 'Requested Range Not Satisfiable', - 417 => 'Expectation Failed', - 418 => 'I\'m a teapot', // RFC2324 - 422 => 'Unprocessable Entity', // RFC4918 - 423 => 'Locked', // RFC4918 - 424 => 'Failed Dependency', // RFC4918 - 425 => 'Reserved for WebDAV advanced collections expired proposal', // RFC2817 - 426 => 'Upgrade Required', // RFC2817 - 428 => 'Precondition Required', // RFC6585 - 429 => 'Too Many Requests', // RFC6585 - 431 => 'Request Header Fields Too Large', // RFC6585 - 500 => 'Internal Server Error', - 501 => 'Not Implemented', - 502 => 'Bad Gateway', - 503 => 'Service Unavailable', - 504 => 'Gateway Timeout', - 505 => 'HTTP Version Not Supported', - 506 => 'Variant Also Negotiates (Experimental)', // RFC2295 - 507 => 'Insufficient Storage', // RFC4918 - 508 => 'Loop Detected', // RFC5842 - 510 => 'Not Extended', // RFC2774 - 511 => 'Network Authentication Required', // RFC6585 - ); - - /** - * Protected constructor since this is a static class. - * - * @access protected - */ - protected function __construct() - { - // Nothing here - } - - /** - * Set header status - * - * - * Response::status(404); - * - * - * @param integer $status Status code - */ - public static function status($status) - { - if (array_key_exists($status, Response::$messages)) header('HTTP/1.1 ' . $status . ' ' . Response::$messages[$status]); - } - -} diff --git a/libraries/Gelato/Image/Image.php b/libraries/Gelato/Image/Image.php deleted file mode 100644 index a92fcc2..0000000 --- a/libraries/Gelato/Image/Image.php +++ /dev/null @@ -1,661 +0,0 @@ - - * @copyright 2012-2014 Romanenko Sergey / Awilum - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -class Image -{ - /** - * Resizing contraint. - * - * @var integer - */ - const AUTO = 1; - - /** - * Resizing contraint. - * - * @var integer - */ - const WIDTH = 2; - - /** - * Resizing contraint. - * - * @var integer - */ - const HEIGHT = 3; - - /** - * Watermark position. - */ - const TOP_LEFT = 4; - - /** - * Watermark position. - */ - const TOP_RIGHT = 5; - - /** - * Watermark position. - */ - const BOTTOM_LEFT = 6; - - /** - * Watermark position. - */ - const BOTTOM_RIGHT = 7; - - /** - * Watermark position. - */ - const CENTER = 8; - - /** - * Holds info about the image. - * - * @var array - */ - protected $image_info; - - /** - * Get value - * - * @param string $key Key - * @return mixed - */ - public function __get($key) - { - if (array_key_exists($key, $this->image_info)) return $this->image_info[$key]; - } - - /** - * Set value for specific key - * - * @param string $key Key - * @param mixed $value Value - */ - public function __set($key, $value) - { - $this->image_info[$key] = $value; - } - - /** - * Image factory. - * - * - * $image = Image::factory('original.png'); - * - * - * @param string $filename Filename - * @return Image - */ - public static function factory($filename) - { - return new Image($filename); - } - - /** - * Construct - * - * @param string $file Filename - */ - public function __construct($file) - { - // Redefine vars - $file = (string) $file; - - // Check if the file exists - if (file_exists($file)) { - - // Extract attributes of the image file - list($this->width, $this->height, $type, $a) = getimagesize($file); - - // Save image type - $this->type = $type; - - // Create a new image - $this->image = $this->createImage($file, $type); - } else { - throw new RuntimeException(vsprintf("%s(): The file '{$file}' doesn't exist", array(__METHOD__))); - } - } - - /** - * Create a new image from file. - * - * @param string $file Path to the image file - * @param integer $type Image type - * @return resource - */ - protected function createImage($file, $type) - { - // Create image from file - switch ($type) { - case IMAGETYPE_JPEG: - return imagecreatefromjpeg($file); - break; - case IMAGETYPE_GIF: - return imagecreatefromgif($file); - break; - case IMAGETYPE_PNG: - return imagecreatefrompng($file); - break; - default: - throw new RuntimeException(vsprintf("%s(): Unable to open '%s'. Unsupported image type.", array(__METHOD__, $type))); - } - } - - /** - * Resizes the image to the chosen size. - * - * - * Image::factory('original.png')->resize(800, 600)->save('edited.png'); - * - * - * @param integer $width Width of the image - * @param integer $height Height of the image - * @param integer $aspect_ratio Aspect ratio (Image::AUTO Image::WIDTH Image::HEIGHT) - * @return Image - */ - public function resize($width, $height = null, $aspect_ratio = null) - { - // Redefine vars - $width = (int) $width; - $height = ($height === null) ? null : (int) $height; - $aspect_ratio = ($aspect_ratio === null) ? null : (int) $aspect_ratio; - $xpos = $ypos = 0; - - // Resizes the image to {$width}% of the original size - if ($height === null) { - - $new_width = round($this->width * ($width / 100)); - $new_height = round($this->height * ($width / 100)); - - } else { - - // Resizes the image to the smalles possible dimension while maintaining aspect ratio - if ($aspect_ratio === Image::AUTO || $aspect_ratio === null) { - - // Calculate smallest size based on given height and width while maintaining aspect ratio - $percentage = min(($width / $this->width), ($height / $this->height)); - - $new_width = round($this->width * $percentage); - $new_height = round($this->height * $percentage); - - if ($aspect_ratio === null) { - $xpos = (int)(($width - $new_width) / 2); - $ypos = (int)(($height - $new_height) / 2); - } - - // Resizes the image using the width to maintain aspect ratio - } elseif ($aspect_ratio === Image::WIDTH) { - - // Base new size on given width while maintaining aspect ratio - $new_width = $width; - $new_height = round($this->height * ($width / $this->width)); - - // Resizes the image using the height to maintain aspect ratio - } elseif ($aspect_ratio === Image::HEIGHT) { - - // Base new size on given height while maintaining aspect ratio - $new_width = round($this->width * ($height / $this->height)); - $new_height = $height; - - // Resizes the image to a dimension of {$width}x{$height} pixels while ignoring the aspect ratio - } else { - - $new_width = $width; - $new_height = $height; - } - } - - $old_image = $this->image; - - if ($aspect_ratio === null) { - $this->image = imagecreatetruecolor($width, $height); - } else { - $this->image = imagecreatetruecolor($new_width, $new_height); - } - - if ($this->type === IMAGETYPE_PNG) { - $bgcolor = imagecolorallocatealpha($this->image, 0, 0, 0, 127); - } else { - $bgcolor = imagecolorallocate($this->image, 255, 255, 255); - } - - imagefill($this->image, 0, 0, $bgcolor); - - // Copy and resize part of an image with resampling - imagecopyresampled($this->image, $old_image, $xpos, $ypos, 0, 0, $new_width, $new_height, $this->width, $this->height); - - // Destroy an image - imagedestroy($old_image); - - // Save new width and height - $this->width = $new_width; - $this->height = $new_height; - - return $this; - } - - /** - * Crops the image - * - * - * Image::factory('original.png')->crop(800, 600, 0, 0)->save('edited.png'); - * - * - * @param integer $width Width of the crop - * @param integer $height Height of the crop - * @param integer $x The X coordinate of the cropped region's top left corner - * @param integer $y The Y coordinate of the cropped region's top left corner - * @return Image - */ - public function crop($width, $height, $x, $y) - { - // Redefine vars - $width = (int) $width; - $height = (int) $height; - $x = (int) $x; - $y = (int) $y; - - // Calculate - if ($x + $width > $this->width) $width = $this->width - $x; - if ($y + $height > $this->height) $height = $this->height - $y; - if ($width <= 0 || $height <= 0) return false; - - $old_image = $this->image; - - // Create a new true color image - $this->image = imagecreatetruecolor($width, $height); - - $transparent = imagecolorallocatealpha($this->image, 0, 0, 0, 127); - imagefill($this->image, 0, 0, $transparent); - - // Copy and resize part of an image with resampling - imagecopyresampled($this->image, $old_image, 0, 0, $x, $y, $width, $height, $width, $height); - - // Destroy an image - imagedestroy($old_image); - - // Save new width and height - $this->width = $width; - $this->height = $height; - - return $this; - } - - /** - * Adds a watermark to the image. - * - * @param string $file Path to the image file - * @param integer $position Position of the watermark - * @param integer $opacity Opacity of the watermark in percent - * @return Image - */ - public function watermark($file, $position = null, $opacity = 100) - { - // Check if the image exists - if ( ! file_exists($file)) { - throw new RuntimeException(vsprintf("%s(): The image file ('%s') does not exist.", array(__METHOD__, $file))); - } - - $watermark = $this->createImage($file, $this->type); - - $watermarkW = imagesx($watermark); - $watermarkH = imagesy($watermark); - - // Make sure that opacity is between 0 and 100 - $opacity = max(min((int) $opacity, 100), 0); - - if ($opacity < 100) { - - if (GD_BUNDLED === 0) { - throw new RuntimeException(vsprintf("%s(): Setting watermark opacity requires the 'imagelayereffect' function which is only available in the bundled version of GD.", array(__METHOD__))); - } - - // Convert alpha to 0-127 - $alpha = min(round(abs(($opacity * 127 / 100) - 127)), 127); - - $transparent = imagecolorallocatealpha($watermark, 0, 0, 0, $alpha); - - imagelayereffect($watermark, IMG_EFFECT_OVERLAY); - - imagefilledrectangle($watermark, 0, 0, $watermarkW, $watermarkH, $transparent); - } - - // Position the watermark. - switch ($position) { - case Image::TOP_RIGHT: - $x = imagesx($this->image) - $watermarkW; - $y = 0; - break; - case Image::BOTTOM_LEFT: - $x = 0; - $y = imagesy($this->image) - $watermarkH; - break; - case Image::BOTTOM_RIGHT: - $x = imagesx($this->image) - $watermarkW; - $y = imagesy($this->image) - $watermarkH; - break; - case Image::CENTER: - $x = (imagesx($this->image) / 2) - ($watermarkW / 2); - $y = (imagesy($this->image) / 2) - ($watermarkH / 2); - break; - default: - $x = 0; - $y = 0; - } - - imagealphablending($this->image, true); - - imagecopy($this->image, $watermark, $x, $y, 0, 0, $watermarkW, $watermarkH); - - imagedestroy($watermark); - - // Return Image - return $this; - } - - /** - * Convert image into grayscale - * - * - * Image::factory('original.png')->grayscale()->save('edited.png'); - * - * - * @return Image - */ - public function grayscale() - { - imagefilter($this->image, IMG_FILTER_GRAYSCALE); - - return $this; - } - - /** - * Convert image into sepia - * - * - * Image::factory('original.png')->sepia()->save('edited.png'); - * - * - * @return Image - */ - public function sepia() - { - imagefilter($this->image, IMG_FILTER_GRAYSCALE); - imagefilter($this->image, IMG_FILTER_COLORIZE, 112, 66, 20); - - return $this; - } - - /** - * Convert image into brightness - * - * - * Image::factory('original.png')->brightness(60)->save('edited.png'); - * - * - * @param integer $level Level. From -255(min) to 255(max) - * @return Image - */ - public function brightness($level = 0) - { - imagefilter($this->image, IMG_FILTER_BRIGHTNESS, (int) $level); - - return $this; - } - - /** - * Convert image into colorize - * - * - * Image::factory('original.png')->colorize(60, 0, 0)->save('edited.png'); - * - * - * @param integer $red Red - * @param integer $green Green - * @param integer $blue Blue - * @return Image - */ - public function colorize($red, $green, $blue) - { - imagefilter($this->image, IMG_FILTER_COLORIZE, (int) $red, (int) $green, (int) $blue); - - return $this; - } - - /** - * Convert image into contrast - * - * - * Image::factory('original.png')->contrast(60)->save('edited.png'); - * - * - * @param integer $level Level. From -100(max) to 100(min) note the direction! - * @return Image - */ - public function contrast($level) - { - imagefilter($this->image, IMG_FILTER_CONTRAST, (int) $level); - - return $this; - } - - /** - * Creates a color based on a hex value. - * - * @param string $hex Hex code of the color - * @param integer $alpha Alpha. Default is 100 - * @param boolean $returnRGB FALSE returns a color identifier, TRUE returns a RGB array - * @return integer - */ - protected function createColor($hex, $alpha = 100, $return_rgb = false) - { - // Redefine vars - $hex = (string) $hex; - $alpha = (int) $alpha; - $return_rgb = (bool) $return_rgb; - - $hex = str_replace('#', '', $hex); - - if (preg_match('/^([a-f0-9]{3}){1,2}$/i', $hex) === 0) { - throw new RuntimeException(vsprintf("%s(): Invalid color code ('%s').", array(__METHOD__, $hex))); - } - - if (strlen($hex) === 3) { - - $r = hexdec(str_repeat(substr($hex, 0, 1), 2)); - $g = hexdec(str_repeat(substr($hex, 1, 1), 2)); - $b = hexdec(str_repeat(substr($hex, 2, 1), 2)); - - } else { - - $r = hexdec(substr($hex, 0, 2)); - $g = hexdec(substr($hex, 2, 2)); - $b = hexdec(substr($hex, 4, 2)); - - } - - if ($return_rgb === true) { - return array('r' => $r, 'g' => $g, 'b' => $b); - - } else { - - // Convert alpha to 0-127 - $alpha = min(round(abs(($alpha * 127 / 100) - 127)), 127); - - return imagecolorallocatealpha($this->image, $r, $g, $b, $alpha); - } - } - - /** - * Rotates the image using the given angle in degrees. - * - * - * Image::factory('original.png')->rotate(90)->save('edited.png'); - * - * - * @param integer $degrees Degrees to rotate the image - * @return Image - */ - public function rotate($degrees) - { - if (GD_BUNDLED === 0) { - throw new RuntimeException(vsprintf("%s(): This method requires the 'imagerotate' function which is only available in the bundled version of GD.", array(__METHOD__))); - } - - // Redefine vars - $degrees = (int) $degrees; - - // Get image width and height - $width = imagesx($this->image); - $height = imagesy($this->image); - - // Allocate a color for an image - $transparent = imagecolorallocatealpha($this->image, 0, 0, 0, 127); - - // Rotate gif image - if ($this->image_info['type'] === IMAGETYPE_GIF) { - - // Create a new true color image - $temp = imagecreatetruecolor($width, $height); - - // Flood fill - imagefill($temp, 0, 0, $transparent); - - // Copy part of an image - imagecopy($temp, $this->image, 0, 0, 0, 0, $width, $height); - - // Destroy an image - imagedestroy($this->image); - - // Save temp image - $this->image = $temp; - } - - // Rotate an image with a given angle - $this->image = imagerotate($this->image, (360 - $degrees), $transparent); - - // Define a color as transparent - imagecolortransparent($this->image, $transparent); - - return $this; - } - - /** - * Adds a border to the image. - * - * - * Image::factory('original.png')->border('#000', 5)->save('edited.png'); - * - * - * @param string $color Hex code for the color - * @param integer $thickness Thickness of the frame in pixels - * @return Image - */ - public function border($color = '#000', $thickness = 5) - { - // Redefine vars - $color = (string) $color; - $thickness = (int) $thickness; - - // Get image width and height - $width = imagesx($this->image); - $height = imagesy($this->image); - - // Creates a color based on a hex value - $color = $this->createColor($color); - - // Create border - for ($i = 0; $i < $thickness; $i++) { - - if ($i < 0) { - - $x = $width + 1; - $y = $hidth + 1; - - } else { - - $x = --$width; - $y = --$height; - - } - - imagerectangle($this->image, $i, $i, $x, $y, $color); - } - - return $this; - } - - /** - * Save image - * - * - * Image::factory('original.png')->save('edited.png'); - * - * - * @param string $dest Desitination location of the file - * @param integer $quality Image quality. Default is 100 - * @return Image - */ - public function save($file, $quality = 100) - { - // Redefine vars - $file = (string) $file; - $quality = (int) $quality; - - $path_info = pathinfo($file); - - if ( ! is_writable($path_info['dirname'])) { - throw new RuntimeException(vsprintf("%s(): '%s' is not writable.", array(__METHOD__, $path_info['dirname']))); - } - - // Make sure that quality is between 0 and 100 - $quality = max(min((int) $quality, 100), 0); - - // Save image - switch ($path_info['extension']) { - case 'jpg': - case 'jpeg': - imagejpeg($this->image, $file, $quality); - break; - case 'gif': - imagegif($this->image, $file); - break; - case 'png': - imagealphablending($this->image, true); - imagesavealpha($this->image, true); - imagepng($this->image, $file, (9 - (round(($quality / 100) * 9)))); - break; - default: - throw new RuntimeException(vsprintf("%s(): Unable to save to '%s'. Unsupported image format.", array(__METHOD__, $path_info['extension']))); - } - - // Return Image - return $this; - } - - /** - * Destructor - */ - public function __destruct() - { - imagedestroy($this->image); - } - -} diff --git a/libraries/Gelato/Inflector/Inflector.php b/libraries/Gelato/Inflector/Inflector.php deleted file mode 100644 index a6570c1..0000000 --- a/libraries/Gelato/Inflector/Inflector.php +++ /dev/null @@ -1,226 +0,0 @@ - - * @copyright 2012-2014 Romanenko Sergey / Awilum - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -class Inflector -{ - /** - * Plural rules - * - * @var array - */ - protected static $plural_rules = array( - '/^(ox)$/' => '\1\2en', // ox - '/([m|l])ouse$/' => '\1ice', // mouse, louse - '/(matr|vert|ind)ix|ex$/' => '\1ices', // matrix, vertex, index - '/(x|ch|ss|sh)$/' => '\1es', // search, switch, fix, box, process, address - '/([^aeiouy]|qu)y$/' => '\1ies', // query, ability, agency - '/(hive)$/' => '\1s', // archive, hive - '/(?:([^f])fe|([lr])f)$/' => '\1\2ves', // half, safe, wife - '/sis$/' => 'ses', // basis, diagnosis - '/([ti])um$/' => '\1a', // datum, medium - '/(p)erson$/' => '\1eople', // person, salesperson - '/(m)an$/' => '\1en', // man, woman, spokesman - '/(c)hild$/' => '\1hildren', // child - '/(buffal|tomat)o$/' => '\1\2oes', // buffalo, tomato - '/(bu|campu)s$/' => '\1\2ses', // bus, campus - '/(alias|status|virus)$/' => '\1es', // alias - '/(octop)us$/' => '\1i', // octopus - '/(ax|cris|test)is$/' => '\1es', // axis, crisis - '/s$/' => 's', // no change (compatibility) - '/$/' => 's', - ); - - /** - * Singular rules - * - * @var array - */ - protected static $singular_rules = array( - '/(matr)ices$/' => '\1ix', - '/(vert|ind)ices$/' => '\1ex', - '/^(ox)en/' => '\1', - '/(alias)es$/' => '\1', - '/([octop|vir])i$/' => '\1us', - '/(cris|ax|test)es$/' => '\1is', - '/(shoe)s$/' => '\1', - '/(o)es$/' => '\1', - '/(bus|campus)es$/' => '\1', - '/([m|l])ice$/' => '\1ouse', - '/(x|ch|ss|sh)es$/' => '\1', - '/(m)ovies$/' => '\1\2ovie', - '/(s)eries$/' => '\1\2eries', - '/([^aeiouy]|qu)ies$/' => '\1y', - '/([lr])ves$/' => '\1f', - '/(tive)s$/' => '\1', - '/(hive)s$/' => '\1', - '/([^f])ves$/' => '\1fe', - '/(^analy)ses$/' => '\1sis', - '/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/' => '\1\2sis', - '/([ti])a$/' => '\1um', - '/(p)eople$/' => '\1\2erson', - '/(m)en$/' => '\1an', - '/(s)tatuses$/' => '\1\2tatus', - '/(c)hildren$/' => '\1\2hild', - '/(n)ews$/' => '\1\2ews', - '/([^us])s$/' => '\1', - ); - - /** - * Protected constructor since this is a static class. - * - * @access protected - */ - protected function __construct() - { - // Nothing here - } - - /** - * Returns a camelized string from a string using underscore syntax. - * - * - * // "some_text_here" becomes "SomeTextHere" - * echo Inflector::camelize('some_text_here'); - * - * - * @param string $string Word to camelize. - * @return string Camelized word. - */ - public static function camelize($string) - { - // Redefine vars - $string = (string) $string; - - return str_replace(' ', '', ucwords(str_replace('_', ' ', $string))); - } - - /** - * Returns a string using underscore syntax from a camelized string. - * - * - * // "SomeTextHere" becomes "some_text_here" - * echo Inflector::underscore('SomeTextHere'); - * - * - * @param string $string CamelCased word - * @return string Underscored version of the $string - */ - public static function underscore($string) - { - // Redefine vars - $string = (string) $string; - - return strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $string)); - } - - /** - * Returns a humanized string from a string using underscore syntax. - * - * - * // "some_text_here" becomes "Some text here" - * echo Inflector::humanize('some_text_here'); - * - * - * @param string $string String using underscore syntax. - * @return string Humanized version of the $string - */ - public static function humanize($string) - { - // Redefine vars - $string = (string) $string; - - return ucfirst(strtolower(str_replace('_', ' ', $string))); - } - - /** - * Returns ordinalize number. - * - * - * // 1 becomes 1st - * echo Inflector::ordinalize(1); - * - * - * @param integer $number Number to ordinalize - * @return string - */ - public static function ordinalize($number) - { - if ( ! is_numeric($number)) { - return $number; - } - - if (in_array(($number % 100), range(11, 13))) { - return $number . 'th'; - } else { - switch ($number % 10) { - case 1: return $number . 'st'; break; - case 2: return $number . 'nd'; break; - case 3: return $number . 'rd'; break; - default: return $number . 'th'; break; - } - } - } - - /** - * Returns the plural version of the given word - * - * - * echo Inflector::pluralize('cat'); - * - * - * @param string $word Word to pluralize - * @return string - */ - public static function pluralize($word) - { - $result = (string) $word; - - foreach (Inflector::$plural_rules as $rule => $replacement) { - if (preg_match($rule, $result)) { - $result = preg_replace($rule, $replacement, $result); - break; - } - } - - return $result; - } - - /** - * Returns the singular version of the given word - * - * - * echo Inflector::singularize('cats'); - * - * - * @param string $word Word to singularize - * @return string - */ - public static function singularize($word) - { - $result = (string) $word; - - foreach (Inflector::$singular_rules as $rule => $replacement) { - if (preg_match($rule, $result)) { - $result = preg_replace($rule, $replacement, $result); - break; - } - } - - return $result; - } - -} diff --git a/libraries/Gelato/Log/Log.php b/libraries/Gelato/Log/Log.php deleted file mode 100644 index 2485b94..0000000 --- a/libraries/Gelato/Log/Log.php +++ /dev/null @@ -1,63 +0,0 @@ - - * @copyright 2012-2014 Romanenko Sergey / Awilum - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -class Log -{ - - /** - * Path to the logs. - * - * @var string - */ - protected static $path = ''; - - /** - * Protected constructor since this is a static class. - * - * @access protected - */ - protected function __construct() - { - // Nothing here - } - - /** - * Configure Log - * - * @access public - * @param string $setting The setting - * @param string $value The value - */ - public static function configure($setting, $value) - { - if (property_exists("log", $setting)) Log::$$setting = $value; - } - - /** - * Writes message to log. - * - * @access public - * @param string $message The message to write to the log - * @return boolean - */ - public static function write($message) - { - return (bool) file_put_contents(rtrim(Log::$path, '/') . '/' . gmdate('Y_m_d') . '.log', - '[' . gmdate('d-M-Y H:i:s') . '] ' . $message . PHP_EOL, - FILE_APPEND); - } -} diff --git a/libraries/Gelato/Minify/MinifyCSS.php b/libraries/Gelato/Minify/MinifyCSS.php deleted file mode 100644 index 4cd3070..0000000 --- a/libraries/Gelato/Minify/MinifyCSS.php +++ /dev/null @@ -1,241 +0,0 @@ - - * @author Stephen Clay - * @copyright 2012-2014 Romanenko Sergey / Awilum - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -class MinifyCSS -{ - - /** - * @var array - */ - protected $_options = null; - - /** - * Are we "in" a hack? I.e. are some browsers targetted until the next comment? - * - * @var bool - */ - protected $_inHack = false; - - /** - * Constructor - * - * @param array $options (currently ignored) - */ - private function __construct($options) - { - $this->_options = $options; - } - - /** - * Minify a CSS string - * - * @param string $css - * - * @param array $options (currently ignored) - * - * @return string - */ - public static function process($css, $options = array()) - { - $obj = new MinifyCSS($options); - - return $obj->_process($css); - } - - /** - * Minify a CSS string - * - * @param string $css - * - * @return string - */ - protected function _process($css) - { - $css = str_replace("\r\n", "\n", $css); - - // preserve empty comment after '>' - // http://www.webdevout.net/css-hacks#in_css-selectors - $css = preg_replace('@>/\\*\\s*\\*/@', '>/*keep*/', $css); - - // preserve empty comment between property and value - // http://css-discuss.incutio.com/?page=BoxModelHack - $css = preg_replace('@/\\*\\s*\\*/\\s*:@', '/*keep*/:', $css); - $css = preg_replace('@:\\s*/\\*\\s*\\*/@', ':/*keep*/', $css); - - // apply callback to all valid comments (and strip out surrounding ws - $css = preg_replace_callback('@\\s*/\\*([\\s\\S]*?)\\*/\\s*@' - ,array($this, '_commentCB'), $css); - - // remove ws around { } and last semicolon in declaration block - $css = preg_replace('/\\s*{\\s*/', '{', $css); - $css = preg_replace('/;?\\s*}\\s*/', '}', $css); - - // remove ws surrounding semicolons - $css = preg_replace('/\\s*;\\s*/', ';', $css); - - // remove ws around urls - $css = preg_replace('/ - url\\( # url( - \\s* - ([^\\)]+?) # 1 = the URL (really just a bunch of non right parenthesis) - \\s* - \\) # ) - /x', 'url($1)', $css); - - // remove ws between rules and colons - $css = preg_replace('/ - \\s* - ([{;]) # 1 = beginning of block or rule separator - \\s* - ([\\*_]?[\\w\\-]+) # 2 = property (and maybe IE filter) - \\s* - : - \\s* - (\\b|[#\'"-]) # 3 = first character of a value - /x', '$1$2:$3', $css); - - // minimize hex colors - /*$css = preg_replace('/([^=])#([a-f\\d])\\2([a-f\\d])\\3([a-f\\d])\\4([\\s;\\}])/i' - , '$1#$2$3$4$5', $css);*/ - - // remove spaces between font families - $css = preg_replace_callback('/font-family:([^;}]+)([;}])/' - ,array($this, '_fontFamilyCB'), $css); - - $css = preg_replace('/@import\\s+url/', '@import url', $css); - - // replace any ws involving newlines with a single newline - $css = preg_replace('/[ \\t]*\\n+\\s*/', "\n", $css); - - // separate common descendent selectors w/ newlines (to limit line lengths) - $css = preg_replace('/([\\w#\\.\\*]+)\\s+([\\w#\\.\\*]+){/', "$1\n$2{", $css); - - // Use newline after 1st numeric value (to limit line lengths). - $css = preg_replace('/ - ((?:padding|margin|border|outline):\\d+(?:px|em)?) # 1 = prop : 1st numeric value - \\s+ - /x' - ,"$1\n", $css); - - // prevent triggering IE6 bug: http://www.crankygeek.com/ie6pebug/ - $css = preg_replace('/:first-l(etter|ine)\\{/', ':first-l$1 {', $css); - - return trim($css); - } - - /** - * Replace what looks like a set of selectors - * - * @param array $m regex matches - * - * @return string - */ - protected function _selectorsCB($m) - { - // remove ws around the combinators - return preg_replace('/\\s*([,>+~])\\s*/', '$1', $m[0]); - } - - /** - * Process a comment and return a replacement - * - * @param array $m regex matches - * - * @return string - */ - protected function _commentCB($m) - { - $hasSurroundingWs = (trim($m[0]) !== $m[1]); - $m = $m[1]; - // $m is the comment content w/o the surrounding tokens, - // but the return value will replace the entire comment. - if ($m === 'keep') { - return '/**/'; - } - if ($m === '" "') { - // component of http://tantek.com/CSS/Examples/midpass.html - return '/*" "*/'; - } - if (preg_match('@";\\}\\s*\\}/\\*\\s+@', $m)) { - // component of http://tantek.com/CSS/Examples/midpass.html - return '/*";}}/* */'; - } - if ($this->_inHack) { - // inversion: feeding only to one browser - if (preg_match('@ - ^/ # comment started like /*/ - \\s* - (\\S[\\s\\S]+?) # has at least some non-ws content - \\s* - /\\* # ends like /*/ or /**/ - @x', $m, $n)) { - // end hack mode after this comment, but preserve the hack and comment content - $this->_inHack = false; - - return "/*/{$n[1]}/**/"; - } - } - if (substr($m, -1) === '\\') { // comment ends like \*/ - // begin hack mode and preserve hack - $this->_inHack = true; - - return '/*\\*/'; - } - if ($m !== '' && $m[0] === '/') { // comment looks like /*/ foo */ - // begin hack mode and preserve hack - $this->_inHack = true; - - return '/*/*/'; - } - if ($this->_inHack) { - // a regular comment ends hack mode but should be preserved - $this->_inHack = false; - - return '/**/'; - } - // Issue 107: if there's any surrounding whitespace, it may be important, so - // replace the comment with a single space - return $hasSurroundingWs // remove all other comments - ? ' ' - : ''; - } - - /** - * Process a font-family listing and return a replacement - * - * @param array $m regex matches - * - * @return string - */ - protected function _fontFamilyCB($m) - { - // Issue 210: must not eliminate WS between words in unquoted families - $pieces = preg_split('/(\'[^\']+\'|"[^"]+")/', $m[1], null, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); - $out = 'font-family:'; - while (null !== ($piece = array_shift($pieces))) { - if ($piece[0] !== '"' && $piece[0] !== "'") { - $piece = preg_replace('/\\s+/', ' ', $piece); - $piece = preg_replace('/\\s?,\\s?/', ',', $piece); - } - $out .= $piece; - } - - return $out . $m[2]; - } - -} diff --git a/libraries/Gelato/Minify/MinifyHTML.php b/libraries/Gelato/Minify/MinifyHTML.php deleted file mode 100644 index 483fab6..0000000 --- a/libraries/Gelato/Minify/MinifyHTML.php +++ /dev/null @@ -1,47 +0,0 @@ - - * @copyright 2012-2014 Romanenko Sergey / Awilum - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -class MinifyHTML -{ - /** - * Minify html - * - * - * echo MinifyHTML::process($html); - * - * - * @param string $buffer html - * @return string - */ - public static function process($html) - { - // Remove HTML comments (not containing IE conditional comments). - $html = preg_replace_callback('//', 'MinifyHTML::_comments', $html); - - // Trim each line. - $html = preg_replace('/^\\s+|\\s+$/m', '', $html); - - // Return HTML - return $html; - } - - protected static function _comments($m) - { - return (0 === strpos($m[1], '[') || false !== strpos($m[1], ' - * @copyright 2012-2014 Romanenko Sergey / Awilum - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -class MinifyJS -{ - /** - * Minify js - * - * - * echo MinifyJS::process($js); - * - * - * @param string $buffer html - * @return string - */ - public static function process($js) - { - // newlines > linefeed - $js = str_replace(array("\r\n", "\r", "\n"), "\n", $js); - - // empty lines > collapse - $js = preg_replace('/^[ \t]*|[ \t]*$/m', '', $js); - $js = preg_replace('/\n+/m', "\n", $js); - $js = trim($js); - - // redundant whitespace > remove - $js = preg_replace('/(?<=[{}\[\]\(\)=><&\|;:,\?!\+-])[ \t]*|[ \t]*(?=[{}\[\]\(\)=><&\|;:,\?!\+-])/i', '', $js); - $js = preg_replace('/[ \t]+/', ' ', $js); - - // redundant semicolons (followed by another semicolon or closing curly bracket) > remove - $js = preg_replace('/;\s*(?=[;}])/s', '', $js); - - // Return JS - return $js; - } -} diff --git a/libraries/Gelato/Notification/Notification.php b/libraries/Gelato/Notification/Notification.php deleted file mode 100644 index b8de55f..0000000 --- a/libraries/Gelato/Notification/Notification.php +++ /dev/null @@ -1,140 +0,0 @@ - - * @copyright 2012-2014 Romanenko Sergey / Awilum - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -class Notification -{ - /** - * Notifications session key - * - * @var string - */ - const SESSION_KEY = 'notifications'; - - /** - * Notifications array - * - * @var array - */ - private static $notifications = array(); - - /** - * Protected constructor since this is a static class. - * - * @access protected - */ - protected function __construct() - { - // Nothing here - } - - /** - * Returns a specific variable from the Notifications array. - * - * - * echo Notification::get('success'); - * echo Notification::get('errors'); - * - * - * @param string $key Variable name - * @return mixed - */ - public static function get($key) - { - // Redefine arguments - $key = (string) $key; - - // Return specific variable from the Notifications array - return isset(Notification::$notifications[$key]) ? Notification::$notifications[$key] : null; - } - - /** - * Adds specific variable to the Notifications array. - * - * - * Notification::set('success', 'Data has been saved with success!'); - * Notification::set('errors', 'Data not saved!'); - * - * - * @param string $key Variable name - * @param mixed $value Variable value - */ - public static function set($key, $value) - { - // Redefine arguments - $key = (string) $key; - - // Save specific variable to the Notifications array - $_SESSION[Notification::SESSION_KEY][$key] = $value; - } - - /** - * Adds specific variable to the Notifications array for current page. - * - * - * Notification::setNow('success', 'Success!'); - * - * - * @param string $var Variable name - * @param mixed $value Variable value - */ - public static function setNow($key, $value) - { - // Redefine arguments - $key = (string) $key; - - // Save specific variable for current page only - Notification::$notifications[$key] = $value; - } - - /** - * Clears the Notifications array. - * - * - * Notification::clean(); - * - * - * Data that previous pages stored will not be deleted, just the data that - * this page stored itself. - */ - public static function clean() - { - $_SESSION[Notification::SESSION_KEY] = array(); - } - - /** - * Initializes the Notification service. - * - * - * Notification::init(); - * - * - * This will read notification/flash data from the $_SESSION variable and load it into - * the $this->previous array. - */ - public static function init() - { - // Get notification/flash data... - - if ( ! empty($_SESSION[Notification::SESSION_KEY]) && is_array($_SESSION[Notification::SESSION_KEY])) { - Notification::$notifications = $_SESSION[Notification::SESSION_KEY]; - } - - $_SESSION[Notification::SESSION_KEY] = array(); - - } - -} diff --git a/libraries/Gelato/Number/Number.php b/libraries/Gelato/Number/Number.php deleted file mode 100644 index 5108943..0000000 --- a/libraries/Gelato/Number/Number.php +++ /dev/null @@ -1,227 +0,0 @@ - - * @copyright 2012-2014 Romanenko Sergey / Awilum - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -class Number -{ - /** - * Protected constructor since this is a static class. - * - * @access protected - */ - protected function __construct() - { - // Nothing here - } - - /** - * Convert bytes in 'KB','MB','GB','TiB','PiB' - * - * - * echo Number::byteFormat(10000); - * - * - * @param integer $size Data to convert - * @return string - */ - public static function byteFormat($size) - { - // Redefine vars - $size = (int) $size; - - $unit = array('B', 'KB', 'MB', 'GB', 'TiB', 'PiB'); - - return @round($size/pow(1024, ($i=floor(log($size, 1024)))), 2).' '.$unit[($i < 0 ? 0 : $i)]; - } - - /** - * Convert 'KB','MB','GB' in bytes - * - * - * echo Number::convertToBytes('10MB'); - * - * - * @param string $num Number to convert - * @return int - */ - public static function convertToBytes( $num ) { - $num = strtolower( $num ); - $bytes = (int) $num; - if ( strpos( $num, 'k' ) !== false ) - $bytes = intval( $num ) * 1024; - elseif ( strpos( $num, 'm' ) !== false ) - $bytes = intval($num) * 1024 * 1024; - elseif ( strpos( $num, 'g' ) !== false ) - $bytes = intval( $num ) * 1024 * 1024 * 1024; - return $bytes; - } - - /** - * Converts a number into a more readable human-type number. - * - * - * echo Number::quantity(7000); // 7K - * echo Number::quantity(7500); // 8K - * echo Number::quantity(7500, 1); // 7.5K - * - * - * @param integer $num Num to convert - * @param integer $decimals Decimals - * @return string - */ - public static function quantity($num, $decimals = 0) - { - // Redefine vars - $num = (int) $num; - $decimals = (int) $decimals; - - if ($num >= 1000 && $num < 1000000) { - return sprintf('%01.'.$decimals.'f', (sprintf('%01.0f', $num) / 1000)).'K'; - } elseif ($num >= 1000000 && $num < 1000000000) { - return sprintf('%01.'.$decimals.'f', (sprintf('%01.0f', $num) / 1000000)).'M'; - } elseif ($num >= 1000000000) { - return sprintf('%01.'.$decimals.'f', (sprintf('%01.0f', $num) / 1000000000)).'B'; - } - - return $num; - } - - /** - * Checks if the value is between the minimum and maximum (min & max included). - * - * - * if (Number::between(2, 10, 5)) { - * // do something... - * } - * - * - * @param float $minimum The minimum. - * @param float $maximum The maximum. - * @param float $value The value to validate. - * @return boolean - */ - public static function between($minimum, $maximum, $value) - { - return ((float) $value >= (float) $minimum && (float) $value <= (float) $maximum); - } - - /** - * Checks the value for an even number. - * - * - * if (Number::even(2)) { - * // do something... - * } - * - * - * @param integer $value The value to validate. - * @return boolean - */ - public static function even($value) - { - return (((int) $value % 2) == 0); - } - - /** - * Checks if the value is greather than a given minimum. - * - * - * if (Number::greaterThan(2, 10)) { - * // do something... - * } - * - * - * @param float $minimum The minimum as a float. - * @param float $value The value to validate. - * @return boolean - */ - public static function greaterThan($minimum, $value) - { - return ((float) $value > (float) $minimum); - } - - /** - * Checks if the value is smaller than a given maximum. - * - * - * if (Number::smallerThan(2, 10)) { - * // do something... - * } - * - * - * @param integer $maximum The maximum. - * @param integer $value The value to validate. - * @return boolean - */ - public static function smallerThan($maximum, $value) - { - return ((int) $value < (int) $maximum); - } - - /** - * Checks if the value is not greater than or equal a given maximum. - * - * - * if (Number::maximum(2, 10)) { - * // do something... - * } - * - * - * @param integer $maximum The maximum. - * @param integer $value The value to validate. - * @return boolean - */ - public static function maximum($maximum, $value) - { - return ((int) $value <= (int) $maximum); - } - - /** - * Checks if the value is greater than or equal to a given minimum. - * - * - * if (Number::minimum(2, 10)) { - * // do something... - * } - * - * - * @param integer $minimum The minimum. - * @param integer $value The value to validate. - * @return boolean - */ - public static function minimum($minimum, $value) - { - return ((int) $value >= (int) $minimum); - } - - /** - * Checks the value for an odd number. - * - * - * if (Number::odd(2)) { - * // do something... - * } - * - * - * @param integer $value The value to validate. - * @return boolean - */ - public static function odd($value) - { - return ! Number::even((int) $value); - } - -} diff --git a/libraries/Gelato/README.md b/libraries/Gelato/README.md deleted file mode 100644 index 6d6fad1..0000000 --- a/libraries/Gelato/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Gelato Library - -Gelato is a PHP5 library for kickass Web Applications. - -## Links -- [Site](http://gelato.monstra.org) -- [Github Repository](https://github.com/MonstrLab/gelato) - -Copyright (C) 2013 Romanenko Sergey / Awilum [awilum@msn.com] \ No newline at end of file diff --git a/libraries/Gelato/Registry/Registry.php b/libraries/Gelato/Registry/Registry.php deleted file mode 100644 index e6b4ced..0000000 --- a/libraries/Gelato/Registry/Registry.php +++ /dev/null @@ -1,91 +0,0 @@ - - * @copyright 2012-2014 Romanenko Sergey / Awilum - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -class Registry -{ - - /** - * Registry of variables - * - * @var array - */ - private static $registry = array(); - - /** - * Checks if an object with this name is in the registry. - * - * - * if (Registry::exists('var')) { - * // Do something... - * } - * - * - * @return bool - * @param string $name The name of the registry item to check for existence. - */ - public static function exists($name) - { - return isset(Registry::$registry[(string) $name]); - } - - /** - * Registers a given value under a given name. - * - * - * Registry::set('var', 'value'); - * - * - * @param string $name The name of the value to store. - * @param mixed[optional] $value The value that needs to be stored. - */ - public static function set($name, $value = null) - { - // redefine name - $name = (string) $name; - - // delete item - if ($value === null) { - unset(Registry::$registry[$name]); - } else { - Registry::$registry[$name] = $value; - - return Registry::get($name); - } - } - - /** - * Fetch an item from the registry. - * - * - * $var = Registry::get('var', 'value'); - * - * - * @return mixed - * @param string $name The name of the item to fetch. - */ - public static function get($name) - { - $name = (string) $name; - - if ( ! isset(Registry::$registry[$name])) { - throw new RuntimeException('No item "' . $name . '" exists in the registry.'); - } - - return Registry::$registry[$name]; - } - -} diff --git a/libraries/Gelato/Security/Token.php b/libraries/Gelato/Security/Token.php deleted file mode 100644 index 90ae65b..0000000 --- a/libraries/Gelato/Security/Token.php +++ /dev/null @@ -1,92 +0,0 @@ - - * @copyright 2012-2014 Romanenko Sergey / Awilum - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -class Token -{ - /** - * Key name for token storage - * - * @var string - */ - protected static $token_name = 'security_token'; - - /** - * Protected constructor since this is a static class. - * - * @access protected - */ - protected function __construct() - { - // Nothing here - } - - /** - * Generate and store a unique token which can be used to help prevent - * [CSRF](http://wikipedia.org/wiki/Cross_Site_Request_Forgery) attacks. - * - * - * $token = Token::generate(); - * - * - * You can insert this token into your forms as a hidden field: - * - * - * echo Form::hidden('csrf', Token::generate()); - * - * - * This provides a basic, but effective, method of preventing CSRF attacks. - * - * @param boolean $new force a new token to be generated?. Default is false - * @return string - */ - public static function generate($new = false) - { - // Get the current token - $token = Session::get(Token::$token_name); - - // Create a new unique token - if ($new === true or ! $token) { - - // Generate a new unique token - $token = sha1(uniqid(mt_rand(), true)); - - // Store the new token - Session::set(Token::$token_name, $token); - } - - // Return token - return $token; - } - - /** - * Check that the given token matches the currently stored security token. - * - * - * if (Token::check($token)) { - * // Pass - * } - * - * - * @param string $token token to check - * @return boolean - */ - public static function check($token) - { - return Token::token() === $token; - } - -} diff --git a/libraries/Gelato/Session/Session.php b/libraries/Gelato/Session/Session.php deleted file mode 100644 index bd36d64..0000000 --- a/libraries/Gelato/Session/Session.php +++ /dev/null @@ -1,189 +0,0 @@ - - * @copyright 2012-2014 Romanenko Sergey / Awilum - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -class Session -{ - /** - * Starts the session. - * - * - * Session::start(); - * - * - */ - public static function start() - { - // Is session already started? - if ( ! session_id()) { - - // Start the session - return @session_start(); - } - - // If already started - return true; - } - - /** - * Deletes one or more session variables. - * - * - * Session::delete('user'); - * - * - */ - public static function delete() - { - // Loop all arguments - foreach (func_get_args() as $argument) { - - // Array element - if (is_array($argument)) { - - // Loop the keys - foreach ($argument as $key) { - - // Unset session key - unset($_SESSION[(string) $key]); - } - } else { - - // Remove from array - unset($_SESSION[(string) $argument]); - } - } - } - - /** - * Destroys the session. - * - * - * Session::destroy(); - * - * - */ - public static function destroy() - { - // Destroy - if (session_id()) { - session_unset(); - session_destroy(); - $_SESSION = array(); - } - - } - - /** - * Checks if a session variable exists. - * - * - * if (Session::exists('user')) { - * // Do something... - * } - * - * - * @return boolean - */ - public static function exists() - { - // Start session if needed - if ( ! session_id()) Session::start(); - - // Loop all arguments - foreach (func_get_args() as $argument) { - - // Array element - if (is_array($argument)) { - - // Loop the keys - foreach ($argument as $key) { - - // Does NOT exist - if ( ! isset($_SESSION[(string) $key])) return false; - } - } else { - - // Does NOT exist - if ( ! isset($_SESSION[(string) $argument])) return false; - } - } - - return true; - } - - /** - * Gets a variable that was stored in the session. - * - * - * echo Session::get('user'); - * - * - * @param string $key The key of the variable to get. - * @return mixed - */ - public static function get($key) - { - // Start session if needed - if ( ! session_id()) self::start(); - - // Redefine key - $key = (string) $key; - - // Fetch key - if (Session::exists((string) $key)) return $_SESSION[(string) $key]; - - // Key doesn't exist - return null; - } - - - /** - * Returns the sessionID. - * - * - * echo Session::getSessionId(); - * - * - * @return string - */ - public static function getSessionId() - { - if ( ! session_id()) Session::start(); - return session_id(); - } - - - /** - * Stores a variable in the session. - * - * - * Session::set('user', 'Awilum'); - * - * - * @param string $key The key for the variable. - * @param mixed $value The value to store. - */ - public static function set($key, $value) - { - // Start session if needed - if ( ! session_id()) self::start(); - - // Set key - $_SESSION[(string) $key] = $value; - } - -} diff --git a/libraries/Gelato/Text/Text.php b/libraries/Gelato/Text/Text.php deleted file mode 100644 index 65d74af..0000000 --- a/libraries/Gelato/Text/Text.php +++ /dev/null @@ -1,477 +0,0 @@ - - * @copyright 2012-2014 Romanenko Sergey / Awilum - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -class Text -{ - /** - * Protected constructor since this is a static class. - * - * @access protected - */ - protected function __construct() - { - // Nothing here - } - - /** - * Translit function ua,ru => latin - * - * - * echo Text::translitIt('Привет'); - * - * - * @param string $str [ua,ru] string - * @return string $str - */ - public static function translitIt($str) - { - // Redefine vars - $str = (string) $str; - - $patern = array( - "Ð" => "A", "Б" => "B", "Ð’" => "V", "Г" => "G", - "Д" => "D", "Е" => "E", "Ж" => "J", "З" => "Z", - "И" => "I", "Й" => "Y", "К" => "K", "Л" => "L", - "М" => "M", "Ð" => "N", "О" => "O", "П" => "P", - "Р" => "R", "С" => "S", "Т" => "T", "У" => "U", - "Ф" => "F", "Ð¥" => "H", "Ц" => "TS", "Ч" => "CH", - "Ш" => "SH", "Щ" => "SCH", "Ъ" => "", "Ы" => "YI", - "Ь" => "", "Э" => "E", "Ю" => "YU", "Я" => "YA", - "а" => "a", "б" => "b", "в" => "v", "г" => "g", - "д" => "d", "е" => "e", "ж" => "j", "з" => "z", - "и" => "i", "й" => "y", "к" => "k", "л" => "l", - "м" => "m", "н" => "n", "о" => "o","п" => "p", - "Ñ€" => "r", "Ñ" => "s", "Ñ‚" => "t", "у" => "u", - "Ñ„" => "f", "Ñ…" => "h", "ц" => "ts", "ч" => "ch", - "ш" => "sh", "щ" => "sch", "ÑŠ" => "y", "Ñ—" => "i", - "Ї" => "Yi", "Ñ”" => "ie", "Є" => "Ye", "Ñ‹" => "yi", - "ÑŒ" => "", "Ñ" => "e", "ÑŽ" => "yu", "Ñ" => "ya", "Ñ‘" => "yo" - ); - - return strtr($str, $patern); - } - - /** - * Removes any leading and traling slashes from a string - * - * - * echo Text::trimSlashes('some text here/'); - * - * - * @param string $str String with slashes - * @return string - */ - public static function trimSlashes($str) - { - // Redefine vars - $str = (string) $str; - - return trim($str, '/'); - } - - /** - * Removes slashes contained in a string or in an array - * - * - * echo Text::strpSlashes('some \ text \ here'); - * - * - * @param mixed $str String or array of strings with slashes - * @return mixed - */ - public static function strpSlashes($str) - { - if (is_array($str)) { - foreach ($str as $key => $val) { - $result[$key] = stripslashes($val); - } - } else { - $result = stripslashes($str); - } - - return $result; - } - - /** - * Removes single and double quotes from a string - * - * - * echo Text::stripQuotes('some "text" here'); - * - * - * @param string $str String with single and double quotes - * @return string - */ - public static function stripQuotes($str) - { - // Redefine vars - $str = (string) $str; - - return str_replace(array('"', "'"), '', $str); - } - - /** - * Convert single and double quotes to entities - * - * - * echo Text::quotesToEntities('some "text" here'); - * - * - * @param string $str String with single and double quotes - * @return string - */ - public static function quotesToEntities($str) - { - // Redefine vars - $str = (string) $str; - - return str_replace(array("\'", "\"", "'", '"'), array("'", """, "'", """), $str); - } - - /** - * Creates a random string of characters - * - * - * echo Text::random(); - * - * - * @param string $type The type of string. Default is 'alnum' - * @param integer $length The number of characters. Default is 16 - * @return string - */ - public static function random($type = 'alnum', $length = 16) - { - // Redefine vars - $type = (string) $type; - $length = (int) $length; - - switch ($type) { - - case 'basic': - return mt_rand(); - break; - - default: - case 'alnum': - case 'numeric': - case 'nozero': - case 'alpha': - case 'distinct': - case 'hexdec': - switch ($type) { - case 'alpha': - $pool = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; - break; - - default: - case 'alnum': - $pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; - break; - - case 'numeric': - $pool = '0123456789'; - break; - - case 'nozero': - $pool = '123456789'; - break; - - case 'distinct': - $pool = '2345679ACDEFHJKLMNPRSTUVWXYZ'; - break; - - case 'hexdec': - $pool = '0123456789abcdef'; - break; - } - - $str = ''; - for ($i=0; $i < $length; $i++) { - $str .= substr($pool, mt_rand(0, strlen($pool) -1), 1); - } - - return $str; - break; - - case 'unique': - return md5(uniqid(mt_rand())); - break; - - case 'sha1' : - return sha1(uniqid(mt_rand(), true)); - break; - } - } - - /** - * Add's _1 to a string or increment the ending number to allow _2, _3, etc - * - * - * $str = Text::increment($str); - * - * - * @param string $str String to increment - * @param integer $first Start with - * @param string $separator Separator - * @return string - */ - public static function increment($str, $first = 1, $separator = '_') - { - preg_match('/(.+)'.$separator.'([0-9]+)$/', $str, $match); - - return isset($match[2]) ? $match[1].$separator.($match[2] + 1) : $str.$separator.$first; - } - - - /** - * Cut string - * - * - * echo Text::cut('Some text here', 5); - * - * - * @param string $str Input string - * @param integer $length Length after cut - * @param string $cut_msg Message after cut string - * @return string - */ - public static function cut($str, $length, $cut_msg = null) - { - // Redefine vars - $str = (string) $str; - $length = (int) $length; - - if (isset($cut_msg)) $msg = $cut_msg; else $msg = '...'; - return function_exists('mb_substr') ? mb_substr($str, 0, $length, 'utf-8') . $msg : substr($str, 0, $length) . $msg; - } - - - /** - * Lowercase - * - * - * echo Text::lowercase('Some text here'); - * - * - * @param string $str String - * @return string - */ - public static function lowercase($str) - { - // Redefine vars - $str = (string) $str; - - return function_exists('mb_strtolower') ? mb_strtolower($str, 'utf-8') : strtolower($str); - } - - - /** - * Uppercase - * - * - * echo Text::uppercase('some text here'); - * - * - * @param string $str String - * @return string - */ - public static function uppercase($str) - { - // Redefine vars - $str = (string) $str; - - return function_exists('mb_strtoupper') ? mb_strtoupper($str, 'utf-8') : strtoupper($str); - } - - - /** - * Get length - * - * - * echo Text::length('Some text here'); - * - * - * @param string $str String - * @return string - */ - public static function length($str) - { - // Redefine vars - $str = (string) $str; - - return function_exists('mb_strlen') ? mb_strlen($str, 'utf-8') : strlen($str); - } - - - /** - * Create a lorem ipsum text - * - * - * echo Text::lorem(2); - * - * - * @param integer $num Count - * @return string - */ - public static function lorem($num = 1) - { - // Redefine vars - $num = (int) $num; - - return str_repeat('Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', (int) $num); - } - - - /** - * Extract the last `$num` characters from a string. - * - * - * echo Text::right('Some text here', 4); - * - * - * @param string $str The string to extract the characters from. - * @param integer $num The number of characters to extract. - * @return string - */ - public static function right($str, $num) - { - // Redefine vars - $str = (string) $str; - $num = (int) $num; - - return substr($str, Text::length($str)-$num, $num); - } - - - /** - * Extract the first `$num` characters from a string. - * - * - * echo Text::left('Some text here', 4); - * - * - * @param string $str The string to extract the characters from. - * @param integer $num The number of characters to extract. - * @return string - */ - public static function left($str, $num) - { - // Redefine vars - $str = (string) $str; - $num = (int) $num; - - return substr($str, 0, $num); - } - - - /** - * Replaces newline with
    or
    . - * - * - * echo Text::nl2br("Some \n text \n here"); - * - * - * @param string $str The input string - * @param boolean $xhtml Xhtml or not - * @return string - */ - public static function nl2br($str, $xhtml = true) - { - // Redefine vars - $str = (string) $str; - $xhtml = (bool) $xhtml; - - return str_replace(array("\r\n", "\n\r", "\n", "\r"), (($xhtml) ? '
    ' : '
    '), $str); - } - - - /** - * Replaces
    and
    with newline. - * - * - * echo Text::br2nl("Some
    text
    here"); - *
    - * - * @param string $str The input string - * @return string - */ - public static function br2nl($str) - { - // Redefine vars - $str = (string) $str; - - return str_replace(array('
    ', '
    ', '
    '), "\n", $str); - } - - - /** - * Converts & to &. - * - * - * echo Text::ampEncode("M&CMS"); - * - * - * @param string $str The input string - * @return string - */ - public static function ampEncode($str) - { - // Redefine vars - $str = (string) $str; - - return str_replace('&', '&', $str); - } - - - /** - * Converts & to &. - * - * - * echo Text::ampEncode("M&CMS"); - * - * - * @param string $str The input string - * @return string - */ - public static function ampDecode($str) - { - // Redefine vars - $str = (string) $str; - - return str_replace('&', '&', $str); - } - - - /** - * Convert plain text to html - * - * - * echo Text::toHtml('test'); - * - * - * @param string $str String - * @return string - */ - public static function toHtml($str) - { - // Redefine vars - $str = (string) $str; - - return html_entity_decode($str, ENT_QUOTES, 'utf-8'); - } - -} diff --git a/libraries/Gelato/Url/Url.php b/libraries/Gelato/Url/Url.php deleted file mode 100644 index d96faa3..0000000 --- a/libraries/Gelato/Url/Url.php +++ /dev/null @@ -1,109 +0,0 @@ - - * @copyright 2012-2014 Romanenko Sergey / Awilum - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -class Url -{ - /** - * Protected constructor since this is a static class. - * - * @access protected - */ - protected function __construct() - { - // Nothing here - } - - /** - * Takes a long url and uses the TinyURL API to return a shortened version. - * - * - * echo Url::tiny('http:://sitename.com'); - * - * - * @param string $url Long url - * @return string - */ - public static function tiny($url) - { - return file_get_contents('http://tinyurl.com/api-create.php?url='.(string) $url); - } - - /** - * Check is url exists - * - * - * if (Url::exists('http:://sitename.com')) { - * // Do something... - * } - * - * - * @param string $url Url - * @return boolean - */ - public static function exists($url) - { - $a_url = parse_url($url); - if ( ! isset($a_url['port'])) $a_url['port'] = 80; - $errno = 0; - $errstr = ''; - $timeout = 30; - if (isset($a_url['host']) && $a_url['host']!=gethostbyname($a_url['host'])) { - $fid = fsockopen($a_url['host'], $a_url['port'], $errno, $errstr, $timeout); - if ( ! $fid) return false; - $page = isset($a_url['path']) ? $a_url['path'] : ''; - $page .= isset($a_url['query']) ? '?'.$a_url['query'] : ''; - fputs($fid, 'HEAD '.$page.' HTTP/1.0'."\r\n".'Host: '.$a_url['host']."\r\n\r\n"); - $head = fread($fid, 4096); - fclose($fid); - - return preg_match('#^HTTP/.*\s+[200|302]+\s#i', $head); - } else { - return false; - } - } - - /** - * Gets the base URL - * - * - * echo Url::base(); - * - * - * @return string - */ - public static function base() - { - $https = (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') ? 'https://' : 'http://'; - - return $https . rtrim(rtrim($_SERVER['HTTP_HOST'], '\\/') . dirname($_SERVER['PHP_SELF']), '\\/'); - } - - /** - * Gets current URL - * - * - * echo Url::current(); - * - * - * @return string - */ - public static function current() - { - return (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; - } - -} diff --git a/libraries/Gelato/Validation/Valid.php b/libraries/Gelato/Validation/Valid.php deleted file mode 100644 index 4406bf1..0000000 --- a/libraries/Gelato/Validation/Valid.php +++ /dev/null @@ -1,209 +0,0 @@ - - * @copyright 2012-2014 Romanenko Sergey / Awilum - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -class Valid -{ - /** - * Protected constructor since this is a static class. - * - * @access protected - */ - protected function __construct() - { - // Nothing here - } - - /** - * Check an email address for correct format. - * - * - * if (Valid::email('test@test.com')) { - * // Do something... - * } - * - * - * @param string $email email address - * @return boolean - */ - public static function email($email) - { - return (bool) filter_var((string) $email, FILTER_VALIDATE_EMAIL); - } - - /** - * Check an ip address for correct format. - * - * - * if (Valid::ip('127.0.0.1') || Valid::ip('0:0:0:0:0:0:7f00:1')) { - * // Do something... - * } - * - * - * @param string $ip ip address - * @return boolean - */ - public static function ip($ip) - { - return (bool) filter_var((string) $ip, FILTER_VALIDATE_IP); - } - - /** - * Check an credit card for correct format. - * - * - * if (Valid::creditCard(7711111111111111, 'Visa')) { - * // Do something... - * } - * - * - * @param integer $num Credit card num - * @param string $type Credit card type: - * American - American Express - * Dinners - Diner's Club - * Discover - Discover Card - * Master - Mastercard - * Visa - Visa - * @return boolean - */ - public static function creditCard($num, $type) - { - // Redefine vars - $num = (int) $num; - $type = (string) $type; - - switch ($type) { - case "American": return (bool) preg_match("/^([34|37]{2})([0-9]{13})$/", $num); - case "Dinners": return (bool) preg_match("/^([30|36|38]{2})([0-9]{12})$/", $num); - case "Discover": return (bool) preg_match("/^([6011]{4})([0-9]{12})$/", $num); - case "Master": return (bool) preg_match("/^([51|52|53|54|55]{2})([0-9]{14})$/", $num); - case "Visa": return (bool) preg_match("/^([4]{1})([0-9]{12,15})$/", $num); - } - } - - - /** - * Check an phone number for correct format. - * - * - * if (Valid::phone(0661111117)) { - * // Do something... - * } - * - * - * @param string $num Phone number - * @return boolean - */ - public static function phone($num) - { - return (bool) preg_match("/^([0-9\(\)\/\+ \-]*)$/", (string) $num); - } - - - /** - * Check an url for correct format. - * - * - * if (Valid::url('http://site.com/')) { - * // Do something... - * } - * - * - * @param string $url Url - * @return boolean - */ - public static function url($url) - { - return (bool) filter_var((string) $url, FILTER_VALIDATE_URL); - } - - - /** - * Check an date for correct format. - * - * - * if (Valid::date('12/12/12')) { - * // Do something... - * } - * - * - * @param string $str Date - * @return boolean - */ - public static function date($str) - { - return (strtotime($str) !== false); - } - - - /** - * Checks whether a string consists of digits only (no dots or dashes). - * - * - * if (Valid::digit('12')) { - * // Do something... - * } - * - * - * @param string $str String - * @return boolean - */ - public static function digit($str) - { - return (bool) preg_match ("/[^0-9]/", $str); - } - - - /** - * Checks whether a string is a valid number (negative and decimal numbers allowed). - * - * - * if (Valid::numeric('3.14')) { - * // Do something... - * } - * - * - * Uses {@link http://www.php.net/manual/en/function.localeconv.php locale conversion} - * to allow decimal point to be locale specific. - * - * @param string $str String - * @return boolean - */ - public static function numeric($str) - { - $locale = localeconv(); - - return (bool) preg_match('/^-?[0-9'.$locale['decimal_point'].']++$/D', (string) $str); - } - - - /** - * Checks if the given regex statement is valid. - * - * @param string $regexp The value to validate. - * @return boolean - */ - public static function regexp($regexp) - { - // dummy string - $dummy = 'Gelato is a PHP5 library for kickass Web Applications.'; - - // validate - return (@preg_match((string) $regexp, $dummy) !== false); - - } - -} diff --git a/libraries/Gelato/Zip/Zip.php b/libraries/Gelato/Zip/Zip.php deleted file mode 100644 index 0198111..0000000 --- a/libraries/Gelato/Zip/Zip.php +++ /dev/null @@ -1,679 +0,0 @@ - - * @copyright 2012-2014 Romanenko Sergey / Awilum - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -class Zip -{ - public $zipdata = ''; - public $directory = ''; - public $entries = 0; - public $file_num = 0; - public $offset = 0; - public $now; - - private $_archive_info = array(); - private $_zip_signature = "\x50\x4b\x03\x04"; - private $_dir_signature = "\x50\x4b\x01\x02"; - private $_central_signature_end = "\x50\x4b\x05\x06"; - private $farc = null; - - /** - * Constructor - */ - public function __construct() - { - $this->now = time(); - } - - /** - * Zip factory - * - * - * Zip::factory(); - * - * - * @return Zip - */ - public static function factory() - { - return new Zip(); - } - - /** - * Add Directory - * - * - * Zip::factory()->addDir('test'); - * - * - * @param mixed $directory The directory name. Can be string or array - */ - public function addDir($directory) - { - foreach ((array) $directory as $dir) { - - if ( ! preg_match("|.+/$|", $dir)) { - $dir .= '/'; - } - - $dir_time = $this->_get_mod_time($dir); - - $this->_add_dir($dir, $dir_time['file_mtime'], $dir_time['file_mdate']); - } - - return $this; - } - - /** - * Get file/directory modification time - * - * @param string $dir Full path to the dir - * @return array - */ - protected function _get_mod_time($dir) - { - // If this is a newly created file/dir, we will set the time to 'now' - $date = (@filemtime($dir)) ? filemtime($dir) : getdate($this->now); - - $time['file_mtime'] = ($date['hours'] << 11) + ($date['minutes'] << 5) + $date['seconds'] / 2; - $time['file_mdate'] = (($date['year'] - 1980) << 9) + ($date['mon'] << 5) + $date['mday']; - - return $time; - } - - /** - * Add Directory - * - * @param string $dir The directory name - * @param integer $file_mtime File mtime - * @param integer $file_mdate File mdate - */ - private function _add_dir($dir, $file_mtime, $file_mdate) - { - $dir = str_replace("\\", "/", $dir); - - $this->zipdata .= - "\x50\x4b\x03\x04\x0a\x00\x00\x00\x00\x00" - .pack('v', $file_mtime) - .pack('v', $file_mdate) - .pack('V', 0) // crc32 - .pack('V', 0) // compressed filesize - .pack('V', 0) // uncompressed filesize - .pack('v', strlen($dir)) // length of pathname - .pack('v', 0) // extra field length - .$dir - // below is "data descriptor" segment - .pack('V', 0) // crc32 - .pack('V', 0) // compressed filesize - .pack('V', 0); // uncompressed filesize - - $this->directory .= - "\x50\x4b\x01\x02\x00\x00\x0a\x00\x00\x00\x00\x00" - .pack('v', $file_mtime) - .pack('v', $file_mdate) - .pack('V',0) // crc32 - .pack('V',0) // compressed filesize - .pack('V',0) // uncompressed filesize - .pack('v', strlen($dir)) // length of pathname - .pack('v', 0) // extra field length - .pack('v', 0) // file comment length - .pack('v', 0) // disk number start - .pack('v', 0) // internal file attributes - .pack('V', 16) // external file attributes - 'directory' bit set - .pack('V', $this->offset) // relative offset of local header - .$dir; - - $this->offset = strlen($this->zipdata); - $this->entries++; - } - - /** - * Add Data to Zip - * - * - * Zip::factory()->addData('test.txt', 'Some test text here'); - * - * - * Lets you add files to the archive. If the path is included - * in the filename it will be placed within a directory. Make - * sure you use add_dir() first to create the folder. - * - * @param mixed $filepath Full path to the file - * @param string $data Data - */ - public function addData($filepath, $data = null) - { - if (is_array($filepath)) { - foreach ($filepath as $path => $data) { - $file_data = $this->_get_mod_time($path); - $this->_add_data($path, $data, $file_data['file_mtime'], $file_data['file_mdate']); - } - } else { - $file_data = $this->_get_mod_time($filepath); - $this->_add_data($filepath, $data, $file_data['file_mtime'], $file_data['file_mdate']); - } - - return $this; - } - - /** - * Add Data to Zip - * - * @param string $filepath Full path to the file - * @param string $data The data to be encoded - * @param integer $file_mtime File mtime - * @param integer $file_mdate File mdate - */ - private function _add_data($filepath, $data, $file_mtime, $file_mdate) - { - $filepath = str_replace("\\", "/", $filepath); - - $uncompressed_size = strlen($data); - $crc32 = crc32($data); - - $gzdata = gzcompress($data); - $gzdata = substr($gzdata, 2, -4); - $compressed_size = strlen($gzdata); - - $this->zipdata .= - "\x50\x4b\x03\x04\x14\x00\x00\x00\x08\x00" - .pack('v', $file_mtime) - .pack('v', $file_mdate) - .pack('V', $crc32) - .pack('V', $compressed_size) - .pack('V', $uncompressed_size) - .pack('v', strlen($filepath)) // length of filename - .pack('v', 0) // extra field length - .$filepath - .$gzdata; // "file data" segment - - $this->directory .= - "\x50\x4b\x01\x02\x00\x00\x14\x00\x00\x00\x08\x00" - .pack('v', $file_mtime) - .pack('v', $file_mdate) - .pack('V', $crc32) - .pack('V', $compressed_size) - .pack('V', $uncompressed_size) - .pack('v', strlen($filepath)) // length of filename - .pack('v', 0) // extra field length - .pack('v', 0) // file comment length - .pack('v', 0) // disk number start - .pack('v', 0) // internal file attributes - .pack('V', 32) // external file attributes - 'archive' bit set - .pack('V', $this->offset) // relative offset of local header - .$filepath; - - $this->offset = strlen($this->zipdata); - $this->entries++; - $this->file_num++; - } - - /** - * Read the contents of a file and add it to the zip - * - * - * Zip::factory()->readFile('test.txt'); - * - * - * @param string $path Path - * @param boolean $preserve_filepath Preserve filepath - * @return mixed - */ - public function readFile($path, $preserve_filepath = false) - { - if ( ! file_exists($path)) { - return false; - } - - if (false !== ($data = file_get_contents($path))) { - - $name = str_replace("\\", "/", $path); - - if ($preserve_filepath === false) { - $name = preg_replace("|.*/(.+)|", "\\1", $name); - } - - $this->addData($name, $data); - - return $this; - } - - return false; - } - - /** - * Read a directory and add it to the zip. - * - * - * Zip::factory()->readDir('test/'); - * - * - * This function recursively reads a folder and everything it contains (including - * sub-folders) and creates a zip based on it. Whatever directory structure - * is in the original file path will be recreated in the zip file. - * - * @param string $path Path to source - * @param boolean $preserve_filepath Preserve filepath - * @param string $root_path Root path - * @return mixed - */ - public function readDir($path, $preserve_filepath = true, $root_path = null, $exclude_files = array()) - { - if ( ! $fp = @opendir($path)) { - return false; - } - - // Set the original directory root for child dir's to use as relative - if ($root_path === null) { - $root_path = dirname($path) . '/'; - } - - while (false !== ($file = readdir($fp))) { - - if (substr($file, 0, 1) == '.' || in_array($path.$file, $exclude_files)) { - continue; - } - - if (@is_dir($path.$file)) { - $this->readDir($path.$file."/", $preserve_filepath, $root_path, $exclude_files); - } else { - if (false !== ($data = file_get_contents($path.$file))) { - $name = str_replace("\\", "/", $path); - - if ($preserve_filepath === false) { - $name = str_replace($root_path, '', $name); - } - - $this->addData($name.$file, $data); - } - } - } - - return $this; - } - - - /** - * Get the Zip file - * - * - * Zip::factory()->getZip(); - * - * - * @return string - */ - public function getZip() - { - // Is there any data to return? - if ($this->entries == 0) { - return false; - } - - $zip_data = $this->zipdata; - $zip_data .= $this->directory."\x50\x4b\x05\x06\x00\x00\x00\x00"; - $zip_data .= pack('v', $this->entries); // total # of entries "on this disk" - $zip_data .= pack('v', $this->entries); // total # of entries overall - $zip_data .= pack('V', strlen($this->directory)); // size of central dir - $zip_data .= pack('V', strlen($this->zipdata)); // offset to start of central dir - $zip_data .= "\x00\x00"; // .zip file comment length - - return $zip_data; - } - - - /** - * Write File to the specified directory - * - * - * Zip::factory()->readDir('test1/')->readDir('test2/')->archive('test.zip'); - * - * - * @param string $filepath The file name - * @return boolean - */ - public function archive($filepath) - { - if ( ! ($fp = @fopen($filepath, "w"))) { - return false; - } - - flock($fp, LOCK_EX); - fwrite($fp, $this->getZip()); - flock($fp, LOCK_UN); - fclose($fp); - - return true; - } - - - /** - * Initialize Data - * - * - * Zip::factory()->clearData(); - * - * - * Lets you clear current zip data. Useful if you need to create - * multiple zips with different data. - */ - public function clearData() - { - $this->zipdata = ''; - $this->directory = ''; - $this->entries = 0; - $this->file_num = 0; - $this->offset = 0; - } - - public function extract($zip_file, $target_dir = null) - { - $chmod = 0777; - $this->_archive_info = array(); - - $files = $this->_read_archive($zip_file); - - if (!$files) { - return false; - } - - $file_locations = array(); - foreach ($files as $file => $trash) { - $dirname = pathinfo($file, PATHINFO_DIRNAME); - - $folders = explode('/', $dirname); - $out_dn = $target_dir . '/' . $dirname; - - if ( !is_dir($out_dn)) { - $str = ''; - foreach ($folders as $folder) { - $str = $str ? $str . '/' . $folder : $folder; - if ( !is_dir($target_dir . '/' . $str)) { - if ( ! @mkdir($target_dir . '/' . $str)) { - return false; - } - - chmod($target_dir . '/' . $str, $chmod); - } - } - } - - if (substr($file, -1, 1) == '/') { - continue; - } - - $file_locations[] = $file_location = $target_dir . '/' . $file; - - $this->_extract_file($file, $file_location); - } - - $this->_archive_info = array(); - - return $file_locations; - } - - private function _read_archive($zip_file) - { - if (sizeof($this->_archive_info)) { - return $this->_archive_info; - } - - $fh = fopen($zip_file, 'r'); - $this->farc = &$fh; - - if ( !$fh) { - return false; - } - - if ( !$this->_read_file_list_by_eof($fh)) { - if ( !$this->_read_files_by_signatures($fh)) { - return false; - } - } - - return $this->_archive_info; - } - - private function _read_file_list_by_eof(&$fh) - { - for ($x = 0; $x < 1024; $x++) { - fseek($fh, -22 - $x, SEEK_END); - - $signature = fread($fh, 4); - - if ($signature == $this->_central_signature_end) { - $eodir['disk_number_this'] = unpack("v", fread($fh, 2)); - $eodir['disk_number'] = unpack("v", fread($fh, 2)); - $eodir['total_entries_this'] = unpack("v", fread($fh, 2)); - $eodir['total_entries'] = unpack("v", fread($fh, 2)); - $eodir['size_of_cd'] = unpack("V", fread($fh, 4)); - $eodir['offset_start_cd'] = unpack("V", fread($fh, 4)); - $zip_comment_lenght = unpack("v", fread($fh, 2)); - $eodir['zipfile_comment'] = $zip_comment_lenght[1] ? fread($fh, $zip_comment_lenght[1]) : ''; - - fseek($fh, $eodir['offset_start_cd'][1]); - $signature = fread($fh, 4); - - while ($signature == $this->_dir_signature) { - $dir['version_madeby'] = unpack("v", fread($fh, 2)); - $dir['version_needed'] = unpack("v", fread($fh, 2)); - $dir['general_bit_flag'] = unpack("v", fread($fh, 2)); - $dir['compression_method'] = unpack("v", fread($fh, 2)); - $dir['lastmod_time'] = unpack("v", fread($fh, 2)); - $dir['lastmod_date'] = unpack("v", fread($fh, 2)); - $dir['crc-32'] = fread($fh, 4); - $dir['compressed_size'] = unpack("V", fread($fh, 4)); - $dir['uncompressed_size'] = unpack("V", fread($fh, 4)); - $zip_file_length = unpack("v", fread($fh, 2)); - $extra_field_length = unpack("v", fread($fh, 2)); - $fileCommentLength = unpack("v", fread($fh, 2)); - $dir['disk_number_start'] = unpack("v", fread($fh, 2)); - $dir['internal_attributes'] = unpack("v", fread($fh, 2)); - $dir['external_attributes1'] = unpack("v", fread($fh, 2)); - $dir['external_attributes2'] = unpack("v", fread($fh, 2)); - $dir['relative_offset'] = unpack("V", fread($fh, 4)); - $dir['file_name'] = fread($fh, $zip_file_length[1]); - $dir['extra_field'] = $extra_field_length[1] ? fread($fh, $extra_field_length[1]) : ''; - $dir['file_comment'] = $fileCommentLength[1] ? fread($fh, $fileCommentLength[1]) : ''; - - $binary_mod_date = str_pad(decbin($dir['lastmod_date'][1]), 16, '0', STR_PAD_LEFT); - $binary_mod_time = str_pad(decbin($dir['lastmod_time'][1]), 16, '0', STR_PAD_LEFT); - $last_mod_year = bindec(substr($binary_mod_date, 0, 7)) + 1980; - $last_mod_month = bindec(substr($binary_mod_date, 7, 4)); - $last_mod_day = bindec(substr($binary_mod_date, 11, 5)); - $last_mod_hour = bindec(substr($binary_mod_time, 0, 5)); - $last_mod_minute = bindec(substr($binary_mod_time, 5, 6)); - $last_mod_second = bindec(substr($binary_mod_time, 11, 5)); - - $central_dir_list[$dir['file_name']] = array( - 'version_madeby' => $dir['version_madeby'][1], - 'version_needed' => $dir['version_needed'][1], - 'general_bit_flag' => str_pad(decbin($dir['general_bit_flag'][1]), 8, '0', STR_PAD_LEFT), - 'compression_method' => $dir['compression_method'][1], - 'lastmod_datetime' => mktime($last_mod_hour, $last_mod_minute, $last_mod_second, $last_mod_month, $last_mod_day, $last_mod_year), - 'crc-32' => str_pad(dechex(ord($dir['crc-32'][3])), 2, '0', STR_PAD_LEFT) . - str_pad(dechex(ord($dir['crc-32'][2])), 2, '0', STR_PAD_LEFT) . - str_pad(dechex(ord($dir['crc-32'][1])), 2, '0', STR_PAD_LEFT) . - str_pad(dechex(ord($dir['crc-32'][0])), 2, '0', STR_PAD_LEFT), - 'compressed_size' => $dir['compressed_size'][1], - 'uncompressed_size' => $dir['uncompressed_size'][1], - 'disk_number_start' => $dir['disk_number_start'][1], - 'internal_attributes' => $dir['internal_attributes'][1], - 'external_attributes1' => $dir['external_attributes1'][1], - 'external_attributes2' => $dir['external_attributes2'][1], - 'relative_offset' => $dir['relative_offset'][1], - 'file_name' => $dir['file_name'], - 'extra_field' => $dir['extra_field'], - 'file_comment' => $dir['file_comment'], - ); - - $signature = fread($fh, 4); - } - - if (isset($central_dir_list)) { - foreach ($central_dir_list as $filename => $details) { - $i = $this->_get_file_header($fh, $details['relative_offset']); - - $this->_archive_info[$filename]['file_name'] = $filename; - $this->_archive_info[$filename]['compression_method'] = $details['compression_method']; - $this->_archive_info[$filename]['version_needed'] = $details['version_needed']; - $this->_archive_info[$filename]['lastmod_datetime'] = $details['lastmod_datetime']; - $this->_archive_info[$filename]['crc-32'] = $details['crc-32']; - $this->_archive_info[$filename]['compressed_size'] = $details['compressed_size']; - $this->_archive_info[$filename]['uncompressed_size'] = $details['uncompressed_size']; - $this->_archive_info[$filename]['lastmod_datetime'] = $details['lastmod_datetime']; - $this->_archive_info[$filename]['extra_field'] = $i['extra_field']; - $this->_archive_info[$filename]['contents_start_offset'] = $i['contents_start_offset']; - } - } - - return true; - } - } - return true; - } - - private function _read_files_by_signatures(&$fh) - { - fseek($fh, 0); - - $return = false; - for (;;) { - $details = $this->_get_file_header($fh); - - if ( !$details) { - fseek($fh, 12 - 4, SEEK_CUR); - $details = $this->_get_file_header($fh); - } - - if ( !$details) { - break; - } - - $filename = $details['file_name']; - $this->_archive_info[$filename] = $details; - $return = true; - } - - return $return; - } - - private function _get_file_header(&$fh, $start_offset = FALSE) - { - if ($start_offset !== false) { - fseek($fh, $start_offset); - } - - $signature = fread($fh, 4); - - if ($signature == $this->_zip_signature) { - $file['version_needed'] = unpack("v", fread($fh, 2)); - $file['general_bit_flag'] = unpack("v", fread($fh, 2)); - $file['compression_method'] = unpack("v", fread($fh, 2)); - $file['lastmod_time'] = unpack("v", fread($fh, 2)); - $file['lastmod_date'] = unpack("v", fread($fh, 2)); - $file['crc-32'] = fread($fh, 4); - $file['compressed_size'] = unpack("V", fread($fh, 4)); - $file['uncompressed_size'] = unpack("V", fread($fh, 4)); - $zip_file_length = unpack("v", fread($fh, 2)); - $extra_field_length = unpack("v", fread($fh, 2)); - $file['file_name'] = fread($fh, $zip_file_length[1]); - $file['extra_field'] = $extra_field_length[1] ? fread($fh, $extra_field_length[1]) : ''; - $file['contents_start_offset'] = ftell($fh); - - fseek($fh, $file['compressed_size'][1], SEEK_CUR); - - $binary_mod_date = str_pad(decbin($file['lastmod_date'][1]), 16, '0', STR_PAD_LEFT); - $binary_mod_time = str_pad(decbin($file['lastmod_time'][1]), 16, '0', STR_PAD_LEFT); - - $last_mod_year = bindec(substr($binary_mod_date, 0, 7)) + 1980; - $last_mod_month = bindec(substr($binary_mod_date, 7, 4)); - $last_mod_day = bindec(substr($binary_mod_date, 11, 5)); - $last_mod_hour = bindec(substr($binary_mod_time, 0, 5)); - $last_mod_minute = bindec(substr($binary_mod_time, 5, 6)); - $last_mod_second = bindec(substr($binary_mod_time, 11, 5)); - - return array( - 'file_name' => $file['file_name'], - 'compression_method' => $file['compression_method'][1], - 'version_needed' => $file['version_needed'][1], - 'lastmod_datetime' => mktime($last_mod_hour, $last_mod_minute, $last_mod_second, $last_mod_month, $last_mod_day, $last_mod_year), - 'crc-32' => str_pad(dechex(ord($file['crc-32'][3])), 2, '0', STR_PAD_LEFT) . - str_pad(dechex(ord($file['crc-32'][2])), 2, '0', STR_PAD_LEFT) . - str_pad(dechex(ord($file['crc-32'][1])), 2, '0', STR_PAD_LEFT) . - str_pad(dechex(ord($file['crc-32'][0])), 2, '0', STR_PAD_LEFT), - 'compressed_size' => $file['compressed_size'][1], - 'uncompressed_size' => $file['uncompressed_size'][1], - 'extra_field' => $file['extra_field'], - 'general_bit_flag' => str_pad(decbin($file['general_bit_flag'][1]), 8, '0', STR_PAD_LEFT), - 'contents_start_offset' => $file['contents_start_offset'] - ); - } - - return false; - } - - private function _extract_file($compressed_file_name, $target_file_name = false) - { - if ( !sizeof($this->_archive_info)) { - return false; - } - - $fdetails = &$this->_archive_info[$compressed_file_name]; - - if ( ! isset($this->_archive_info[$compressed_file_name])) { - return false; - } - - if (substr($compressed_file_name, -1) == '/') { - return false; - } - - if ( !$fdetails['uncompressed_size']) { - return $target_file_name ? file_put_contents($target_file_name, '') : ''; - } - - fseek($this->farc, $fdetails['contents_start_offset']); - $ret = $this->_uncompress( - fread($this->farc, $fdetails['compressed_size']), - $fdetails['compression_method'], - $fdetails['uncompressed_size'], - $target_file_name - ); - - if ($target_file_name) { - chmod($target_file_name, 0644); - } - - return $ret; - } - - private function _uncompress($content, $mode, $uncompressed_size, $target_file_name = false) - { - switch ($mode) { - case 0: - return $target_file_name ? file_put_contents($target_file_name, $content) : $content; - case 8: - return $target_file_name - ? file_put_contents($target_file_name, gzinflate($content, $uncompressed_size)) - : gzinflate($content, $uncompressed_size); - case 12: - return $target_file_name - ? file_put_contents($target_file_name, bzdecompress($content)) : bzdecompress($content); - default: - return false; - } - } -} diff --git a/libraries/Gelato/_logs/.empty b/libraries/Gelato/_logs/.empty deleted file mode 100644 index e69de29..0000000 diff --git a/libraries/Gelato/changelog.txt b/libraries/Gelato/changelog.txt deleted file mode 100644 index aa40a88..0000000 --- a/libraries/Gelato/changelog.txt +++ /dev/null @@ -1,21 +0,0 @@ -Gelato 1.0.3, 2013-04-03 ------------------------- -- Html Class: obfuscate() method added. -- Html Class: email() method added. -- Html Class: missing $macros var added. - -Gelato 1.0.2, 2013-03-17 ------------------------- -- Added support for PHP 5.2.3 - -Gelato 1.0.1, 2013-03-05 ------------------------- -- New constant GELATO_CLASS_LOADER instead of GELATO_AUTOLOADER -- ErrorHanler Class Improvements. -- Log Class Improvements. -- ClassLoader: new method register() added. -- Define __DIR__ constant for PHP 5.2.x - -Gelato 1.0.0, 2013-02-26 ------------------------- -- Initial release diff --git a/libraries/Gelato/license.txt b/libraries/Gelato/license.txt deleted file mode 100644 index 5bcefda..0000000 --- a/libraries/Gelato/license.txt +++ /dev/null @@ -1,221 +0,0 @@ -GNU GENERAL PUBLIC LICENSE -Version 3, 29 June 2007 - -Copyright (C) 2007 Free Software Foundation, Inc. - -Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - -Preamble -The GNU General Public License is a free, copyleft license for software and other kinds of works. - -The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. - -When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. - -To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. - -For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. - -Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. - -For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. - -Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. - -Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. - -The precise terms and conditions for copying, distribution and modification follow. - -TERMS AND CONDITIONS -0. Definitions. -�This License� refers to version 3 of the GNU General Public License. - -�Copyright� also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. - -�The Program� refers to any copyrightable work licensed under this License. Each licensee is addressed as �you�. �Licensees� and �recipients� may be individuals or organizations. - -To �modify� a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a �modified version� of the earlier work or a work �based on� the earlier work. - -A �covered work� means either the unmodified Program or a work based on the Program. - -To �propagate� a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. - -To �convey� a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. - -An interactive user interface displays �Appropriate Legal Notices� to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. - -1. Source Code. -The �source code� for a work means the preferred form of the work for making modifications to it. �Object code� means any non-source form of a work. - -A �Standard Interface� means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. - -The �System Libraries� of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A �Major Component�, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. - -The �Corresponding Source� for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. - -The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. - -The Corresponding Source for a work in source code form is that same work. - -2. Basic Permissions. -All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. - -You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. - -Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. - -3. Protecting Users' Legal Rights From Anti-Circumvention Law. -No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. - -When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. - -4. Conveying Verbatim Copies. -You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. - -You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. - -5. Conveying Modified Source Versions. -You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: - -a) The work must carry prominent notices stating that you modified it, and giving a relevant date. -b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to �keep intact all notices�. -c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. -d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. -A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an �aggregate� if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. - -6. Conveying Non-Source Forms. -You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: - -a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. -b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. -c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. -d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. -e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. -A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. - -A �User Product� is either (1) a �consumer product�, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, �normally used� refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. - -�Installation Information� for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. - -If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). - -The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. - -Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. - -7. Additional Terms. -�Additional permissions� are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. - -When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. - -Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: - -a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or -b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or -c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or -d) Limiting the use for publicity purposes of names of licensors or authors of the material; or -e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or -f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. -All other non-permissive additional terms are considered �further restrictions� within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. - -If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. - -Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. - -8. Termination. -You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). - -However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. - -Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. - -Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. - -9. Acceptance Not Required for Having Copies. -You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. - -10. Automatic Licensing of Downstream Recipients. -Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. - -An �entity transaction� is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. - -You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. - -11. Patents. -A �contributor� is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's �contributor version�. - -A contributor's �essential patent claims� are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, �control� includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. - -Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. - -In the following three paragraphs, a �patent license� is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To �grant� such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. - -If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. �Knowingly relying� means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. - -If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. - -A patent license is �discriminatory� if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. - -Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. - -12. No Surrender of Others' Freedom. -If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. - -13. Use with the GNU Affero General Public License. -Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. - -14. Revised Versions of this License. -The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License �or any later version� applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. - -If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. - -Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. - -15. Disclaimer of Warranty. -THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM �AS IS� WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - -16. Limitation of Liability. -IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -17. Interpretation of Sections 15 and 16. -If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. - -END OF TERMS AND CONDITIONS - -How to Apply These Terms to Your New Programs -If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the �copyright� line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - -If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - - Copyright (C) - - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. -The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an �about box�. - -You should also get your employer (if you work as a programmer) or school, if any, to sign a �copyright disclaimer� for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . - -The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . \ No newline at end of file diff --git a/libraries/Idiorm/ORM.php b/libraries/Idiorm/ORM.php deleted file mode 100644 index e209820..0000000 --- a/libraries/Idiorm/ORM.php +++ /dev/null @@ -1,2143 +0,0 @@ - 'sqlite::memory:', - 'id_column' => 'id', - 'id_column_overrides' => array(), - 'error_mode' => PDO::ERRMODE_EXCEPTION, - 'username' => null, - 'password' => null, - 'driver_options' => null, - 'identifier_quote_character' => null, // if this is null, will be autodetected - 'limit_clause_style' => null, // if this is null, will be autodetected - 'logging' => false, - 'logger' => null, - 'caching' => false, - 'return_result_sets' => false, - ); - - // Map of configuration settings - protected static $_config = array(); - - // Map of database connections, instances of the PDO class - protected static $_db = array(); - - // Last query run, only populated if logging is enabled - protected static $_last_query; - - // Log of all queries run, mapped by connection key, only populated if logging is enabled - protected static $_query_log = array(); - - // Query cache, only used if query caching is enabled - protected static $_query_cache = array(); - - // Reference to previously used PDOStatement object to enable low-level access, if needed - protected static $_last_statement = null; - - // --------------------------- // - // --- INSTANCE PROPERTIES --- // - // --------------------------- // - - // Key name of the connections in self::$_db used by this instance - protected $_connection_name; - - // The name of the table the current ORM instance is associated with - protected $_table_name; - - // Alias for the table to be used in SELECT queries - protected $_table_alias = null; - - // Values to be bound to the query - protected $_values = array(); - - // Columns to select in the result - protected $_result_columns = array('*'); - - // Are we using the default result column or have these been manually changed? - protected $_using_default_result_columns = true; - - // Join sources - protected $_join_sources = array(); - - // Should the query include a DISTINCT keyword? - protected $_distinct = false; - - // Is this a raw query? - protected $_is_raw_query = false; - - // The raw query - protected $_raw_query = ''; - - // The raw query parameters - protected $_raw_parameters = array(); - - // Array of WHERE clauses - protected $_where_conditions = array(); - - // LIMIT - protected $_limit = null; - - // OFFSET - protected $_offset = null; - - // ORDER BY - protected $_order_by = array(); - - // GROUP BY - protected $_group_by = array(); - - // HAVING - protected $_having_conditions = array(); - - // The data for a hydrated instance of the class - protected $_data = array(); - - // Fields that have been modified during the - // lifetime of the object - protected $_dirty_fields = array(); - - // Fields that are to be inserted in the DB raw - protected $_expr_fields = array(); - - // Is this a new object (has create() been called)? - protected $_is_new = false; - - // Name of the column to use as the primary key for - // this instance only. Overrides the config settings. - protected $_instance_id_column = null; - - // ---------------------- // - // --- STATIC METHODS --- // - // ---------------------- // - - /** - * Pass configuration settings to the class in the form of - * key/value pairs. As a shortcut, if the second argument - * is omitted and the key is a string, the setting is - * assumed to be the DSN string used by PDO to connect - * to the database (often, this will be the only configuration - * required to use Idiorm). If you have more than one setting - * you wish to configure, another shortcut is to pass an array - * of settings (and omit the second argument). - * @param string $key - * @param mixed $value - * @param string $connection_name Which connection to use - */ - public static function configure($key, $value = null, $connection_name = self::DEFAULT_CONNECTION) { - self::_setup_db_config($connection_name); //ensures at least default config is set - - if (is_array($key)) { - // Shortcut: If only one array argument is passed, - // assume it's an array of configuration settings - foreach ($key as $conf_key => $conf_value) { - self::configure($conf_key, $conf_value, $connection_name); - } - } else { - if (is_null($value)) { - // Shortcut: If only one string argument is passed, - // assume it's a connection string - $value = $key; - $key = 'connection_string'; - } - self::$_config[$connection_name][$key] = $value; - } - } - - /** - * Retrieve configuration options by key, or as whole array. - * @param string $key - * @param string $connection_name Which connection to use - */ - public static function get_config($key = null, $connection_name = self::DEFAULT_CONNECTION) { - if ($key) { - return self::$_config[$connection_name][$key]; - } else { - return self::$_config[$connection_name]; - } - } - - /** - * Delete all configs in _config array. - */ - public static function reset_config() { - self::$_config = array(); - } - - /** - * Despite its slightly odd name, this is actually the factory - * method used to acquire instances of the class. It is named - * this way for the sake of a readable interface, ie - * ORM::for_table('table_name')->find_one()-> etc. As such, - * this will normally be the first method called in a chain. - * @param string $table_name - * @param string $connection_name Which connection to use - * @return ORM - */ - public static function for_table($table_name, $connection_name = self::DEFAULT_CONNECTION) { - self::_setup_db($connection_name); - return new self($table_name, array(), $connection_name); - } - - /** - * Set up the database connection used by the class - * @param string $connection_name Which connection to use - */ - protected static function _setup_db($connection_name = self::DEFAULT_CONNECTION) { - if (!array_key_exists($connection_name, self::$_db) || - !is_object(self::$_db[$connection_name])) { - self::_setup_db_config($connection_name); - - $db = new PDO( - self::$_config[$connection_name]['connection_string'], - self::$_config[$connection_name]['username'], - self::$_config[$connection_name]['password'], - self::$_config[$connection_name]['driver_options'] - ); - - $db->setAttribute(PDO::ATTR_ERRMODE, self::$_config[$connection_name]['error_mode']); - self::set_db($db, $connection_name); - } - } - - /** - * Ensures configuration (mulitple connections) is at least set to default. - * @param string $connection_name Which connection to use - */ - protected static function _setup_db_config($connection_name) { - if (!array_key_exists($connection_name, self::$_config)) { - self::$_config[$connection_name] = self::$_default_config; - } - } - - /** - * Set the PDO object used by Idiorm to communicate with the database. - * This is public in case the ORM should use a ready-instantiated - * PDO object as its database connection. Accepts an optional string key - * to identify the connection if multiple connections are used. - * @param PDO $db - * @param string $connection_name Which connection to use - */ - public static function set_db($db, $connection_name = self::DEFAULT_CONNECTION) { - self::_setup_db_config($connection_name); - self::$_db[$connection_name] = $db; - self::_setup_identifier_quote_character($connection_name); - self::_setup_limit_clause_style($connection_name); - } - - /** - * Delete all registered PDO objects in _db array. - */ - public static function reset_db() { - self::$_db = array(); - } - - /** - * Detect and initialise the character used to quote identifiers - * (table names, column names etc). If this has been specified - * manually using ORM::configure('identifier_quote_character', 'some-char'), - * this will do nothing. - * @param string $connection_name Which connection to use - */ - protected static function _setup_identifier_quote_character($connection_name) { - if (is_null(self::$_config[$connection_name]['identifier_quote_character'])) { - self::$_config[$connection_name]['identifier_quote_character'] = - self::_detect_identifier_quote_character($connection_name); - } - } - - /** - * Detect and initialise the limit clause style ("SELECT TOP 5" / - * "... LIMIT 5"). If this has been specified manually using - * ORM::configure('limit_clause_style', 'top'), this will do nothing. - * @param string $connection_name Which connection to use - */ - public static function _setup_limit_clause_style($connection_name) { - if (is_null(self::$_config[$connection_name]['limit_clause_style'])) { - self::$_config[$connection_name]['limit_clause_style'] = - self::_detect_limit_clause_style($connection_name); - } - } - - /** - * Return the correct character used to quote identifiers (table - * names, column names etc) by looking at the driver being used by PDO. - * @param string $connection_name Which connection to use - * @return string - */ - protected static function _detect_identifier_quote_character($connection_name) { - switch(self::$_db[$connection_name]->getAttribute(PDO::ATTR_DRIVER_NAME)) { - case 'pgsql': - case 'sqlsrv': - case 'dblib': - case 'mssql': - case 'sybase': - case 'firebird': - return '"'; - case 'mysql': - case 'sqlite': - case 'sqlite2': - default: - return '`'; - } - } - - /** - * Returns a constant after determining the appropriate limit clause - * style - * @param string $connection_name Which connection to use - * @return string Limit clause style keyword/constant - */ - protected static function _detect_limit_clause_style($connection_name) { - switch(self::$_db[$connection_name]->getAttribute(PDO::ATTR_DRIVER_NAME)) { - case 'sqlsrv': - case 'dblib': - case 'mssql': - return ORM::LIMIT_STYLE_TOP_N; - default: - return ORM::LIMIT_STYLE_LIMIT; - } - } - - /** - * Returns the PDO instance used by the the ORM to communicate with - * the database. This can be called if any low-level DB access is - * required outside the class. If multiple connections are used, - * accepts an optional key name for the connection. - * @param string $connection_name Which connection to use - * @return PDO - */ - public static function get_db($connection_name = self::DEFAULT_CONNECTION) { - self::_setup_db($connection_name); // required in case this is called before Idiorm is instantiated - return self::$_db[$connection_name]; - } - - /** - * Executes a raw query as a wrapper for PDOStatement::execute. - * Useful for queries that can't be accomplished through Idiorm, - * particularly those using engine-specific features. - * @example raw_execute('SELECT `name`, AVG(`order`) FROM `customer` GROUP BY `name` HAVING AVG(`order`) > 10') - * @example raw_execute('INSERT OR REPLACE INTO `widget` (`id`, `name`) SELECT `id`, `name` FROM `other_table`') - * @param string $query The raw SQL query - * @param array $parameters Optional bound parameters - * @param string $connection_name Which connection to use - * @return bool Success - */ - public static function raw_execute($query, $parameters = array(), $connection_name = self::DEFAULT_CONNECTION) { - self::_setup_db($connection_name); - return self::_execute($query, $parameters, $connection_name); - } - - /** - * Returns the PDOStatement instance last used by any connection wrapped by the ORM. - * Useful for access to PDOStatement::rowCount() or error information - * @return PDOStatement - */ - public static function get_last_statement() { - return self::$_last_statement; - } - - /** - * Internal helper method for executing statments. Logs queries, and - * stores statement object in ::_last_statment, accessible publicly - * through ::get_last_statement() - * @param string $query - * @param array $parameters An array of parameters to be bound in to the query - * @param string $connection_name Which connection to use - * @return bool Response of PDOStatement::execute() - */ - protected static function _execute($query, $parameters = array(), $connection_name = self::DEFAULT_CONNECTION) { - self::_log_query($query, $parameters, $connection_name); - $statement = self::$_db[$connection_name]->prepare($query); - - self::$_last_statement = $statement; - - return $statement->execute($parameters); - } - - /** - * Add a query to the internal query log. Only works if the - * 'logging' config option is set to true. - * - * This works by manually binding the parameters to the query - the - * query isn't executed like this (PDO normally passes the query and - * parameters to the database which takes care of the binding) but - * doing it this way makes the logged queries more readable. - * @param string $query - * @param array $parameters An array of parameters to be bound in to the query - * @param string $connection_name Which connection to use - * @return bool - */ - protected static function _log_query($query, $parameters, $connection_name) { - // If logging is not enabled, do nothing - if (!self::$_config[$connection_name]['logging']) { - return false; - } - - if (!isset(self::$_query_log[$connection_name])) { - self::$_query_log[$connection_name] = array(); - } - - if (count($parameters) > 0) { - // Escape the parameters - $parameters = array_map(array(self::$_db[$connection_name], 'quote'), $parameters); - - // Avoid %format collision for vsprintf - $query = str_replace("%", "%%", $query); - - // Replace placeholders in the query for vsprintf - if(false !== strpos($query, "'") || false !== strpos($query, '"')) { - $query = IdiormString::str_replace_outside_quotes("?", "%s", $query); - } else { - $query = str_replace("?", "%s", $query); - } - - // Replace the question marks in the query with the parameters - $bound_query = vsprintf($query, $parameters); - } else { - $bound_query = $query; - } - - self::$_last_query = $bound_query; - self::$_query_log[$connection_name][] = $bound_query; - - - if(is_callable(self::$_config[$connection_name]['logger'])){ - $logger = self::$_config[$connection_name]['logger']; - $logger($bound_query); - } - - return true; - } - - /** - * Get the last query executed. Only works if the - * 'logging' config option is set to true. Otherwise - * this will return null. Returns last query from all connections if - * no connection_name is specified - * @param null|string $connection_name Which connection to use - * @return string - */ - public static function get_last_query($connection_name = null) { - if ($connection_name === null) { - return self::$_last_query; - } - if (!isset(self::$_query_log[$connection_name])) { - return ''; - } - - return end(self::$_query_log[$connection_name]); - } - - /** - * Get an array containing all the queries run on a - * specified connection up to now. - * Only works if the 'logging' config option is - * set to true. Otherwise, returned array will be empty. - * @param string $connection_name Which connection to use - */ - public static function get_query_log($connection_name = self::DEFAULT_CONNECTION) { - if (isset(self::$_query_log[$connection_name])) { - return self::$_query_log[$connection_name]; - } - return array(); - } - - /** - * Get a list of the available connection names - * @return array - */ - public static function get_connection_names() { - return array_keys(self::$_db); - } - - // ------------------------ // - // --- INSTANCE METHODS --- // - // ------------------------ // - - /** - * "Private" constructor; shouldn't be called directly. - * Use the ORM::for_table factory method instead. - */ - protected function __construct($table_name, $data = array(), $connection_name = self::DEFAULT_CONNECTION) { - $this->_table_name = $table_name; - $this->_data = $data; - - $this->_connection_name = $connection_name; - self::_setup_db_config($connection_name); - } - - /** - * Create a new, empty instance of the class. Used - * to add a new row to your database. May optionally - * be passed an associative array of data to populate - * the instance. If so, all fields will be flagged as - * dirty so all will be saved to the database when - * save() is called. - */ - public function create($data=null) { - $this->_is_new = true; - if (!is_null($data)) { - return $this->hydrate($data)->force_all_dirty(); - } - return $this; - } - - /** - * Specify the ID column to use for this instance or array of instances only. - * This overrides the id_column and id_column_overrides settings. - * - * This is mostly useful for libraries built on top of Idiorm, and will - * not normally be used in manually built queries. If you don't know why - * you would want to use this, you should probably just ignore it. - */ - public function use_id_column($id_column) { - $this->_instance_id_column = $id_column; - return $this; - } - - /** - * Create an ORM instance from the given row (an associative - * array of data fetched from the database) - */ - protected function _create_instance_from_row($row) { - $instance = self::for_table($this->_table_name, $this->_connection_name); - $instance->use_id_column($this->_instance_id_column); - $instance->hydrate($row); - return $instance; - } - - /** - * Tell the ORM that you are expecting a single result - * back from your query, and execute it. Will return - * a single instance of the ORM class, or false if no - * rows were returned. - * As a shortcut, you may supply an ID as a parameter - * to this method. This will perform a primary key - * lookup on the table. - */ - public function find_one($id=null) { - if (!is_null($id)) { - $this->where_id_is($id); - } - $this->limit(1); - $rows = $this->_run(); - - if (empty($rows)) { - return false; - } - - return $this->_create_instance_from_row($rows[0]); - } - - /** - * Tell the ORM that you are expecting multiple results - * from your query, and execute it. Will return an array - * of instances of the ORM class, or an empty array if - * no rows were returned. - * @return array|\IdiormResultSet - */ - public function find_many() { - if(self::$_config[$this->_connection_name]['return_result_sets']) { - return $this->find_result_set(); - } - return $this->_find_many(); - } - - /** - * Tell the ORM that you are expecting multiple results - * from your query, and execute it. Will return an array - * of instances of the ORM class, or an empty array if - * no rows were returned. - * @return array - */ - protected function _find_many() { - $rows = $this->_run(); - return array_map(array($this, '_create_instance_from_row'), $rows); - } - - /** - * Tell the ORM that you are expecting multiple results - * from your query, and execute it. Will return a result set object - * containing instances of the ORM class. - * @return \IdiormResultSet - */ - public function find_result_set() { - return new IdiormResultSet($this->_find_many()); - } - - /** - * Tell the ORM that you are expecting multiple results - * from your query, and execute it. Will return an array, - * or an empty array if no rows were returned. - * @return array - */ - public function find_array() { - return $this->_run(); - } - - /** - * Tell the ORM that you wish to execute a COUNT query. - * Will return an integer representing the number of - * rows returned. - */ - public function count($column = '*') { - return $this->_call_aggregate_db_function(__FUNCTION__, $column); - } - - /** - * Tell the ORM that you wish to execute a MAX query. - * Will return the max value of the choosen column. - */ - public function max($column) { - return $this->_call_aggregate_db_function(__FUNCTION__, $column); - } - - /** - * Tell the ORM that you wish to execute a MIN query. - * Will return the min value of the choosen column. - */ - public function min($column) { - return $this->_call_aggregate_db_function(__FUNCTION__, $column); - } - - /** - * Tell the ORM that you wish to execute a AVG query. - * Will return the average value of the choosen column. - */ - public function avg($column) { - return $this->_call_aggregate_db_function(__FUNCTION__, $column); - } - - /** - * Tell the ORM that you wish to execute a SUM query. - * Will return the sum of the choosen column. - */ - public function sum($column) { - return $this->_call_aggregate_db_function(__FUNCTION__, $column); - } - - /** - * Execute an aggregate query on the current connection. - * @param string $sql_function The aggregate function to call eg. MIN, COUNT, etc - * @param string $column The column to execute the aggregate query against - * @return int - */ - protected function _call_aggregate_db_function($sql_function, $column) { - $alias = strtolower($sql_function); - $sql_function = strtoupper($sql_function); - if('*' != $column) { - $column = $this->_quote_identifier($column); - } - $result_columns = $this->_result_columns; - $this->_result_columns = array(); - $this->select_expr("$sql_function($column)", $alias); - $result = $this->find_one(); - $this->_result_columns = $result_columns; - - $return_value = 0; - if($result !== false && isset($result->$alias)) { - if((int) $result->$alias == (float) $result->$alias) { - $return_value = (int) $result->$alias; - } else { - $return_value = (float) $result->$alias; - } - } - return $return_value; - } - - /** - * This method can be called to hydrate (populate) this - * instance of the class from an associative array of data. - * This will usually be called only from inside the class, - * but it's public in case you need to call it directly. - */ - public function hydrate($data=array()) { - $this->_data = $data; - return $this; - } - - /** - * Force the ORM to flag all the fields in the $data array - * as "dirty" and therefore update them when save() is called. - */ - public function force_all_dirty() { - $this->_dirty_fields = $this->_data; - return $this; - } - - /** - * Perform a raw query. The query can contain placeholders in - * either named or question mark style. If placeholders are - * used, the parameters should be an array of values which will - * be bound to the placeholders in the query. If this method - * is called, all other query building methods will be ignored. - */ - public function raw_query($query, $parameters = array()) { - $this->_is_raw_query = true; - $this->_raw_query = $query; - $this->_raw_parameters = $parameters; - return $this; - } - - /** - * Add an alias for the main table to be used in SELECT queries - */ - public function table_alias($alias) { - $this->_table_alias = $alias; - return $this; - } - - /** - * Internal method to add an unquoted expression to the set - * of columns returned by the SELECT query. The second optional - * argument is the alias to return the expression as. - */ - protected function _add_result_column($expr, $alias=null) { - if (!is_null($alias)) { - $expr .= " AS " . $this->_quote_identifier($alias); - } - - if ($this->_using_default_result_columns) { - $this->_result_columns = array($expr); - $this->_using_default_result_columns = false; - } else { - $this->_result_columns[] = $expr; - } - return $this; - } - - /** - * Add a column to the list of columns returned by the SELECT - * query. This defaults to '*'. The second optional argument is - * the alias to return the column as. - */ - public function select($column, $alias=null) { - $column = $this->_quote_identifier($column); - return $this->_add_result_column($column, $alias); - } - - /** - * Add an unquoted expression to the list of columns returned - * by the SELECT query. The second optional argument is - * the alias to return the column as. - */ - public function select_expr($expr, $alias=null) { - return $this->_add_result_column($expr, $alias); - } - - /** - * Add columns to the list of columns returned by the SELECT - * query. This defaults to '*'. Many columns can be supplied - * as either an array or as a list of parameters to the method. - * - * Note that the alias must not be numeric - if you want a - * numeric alias then prepend it with some alpha chars. eg. a1 - * - * @example select_many(array('alias' => 'column', 'column2', 'alias2' => 'column3'), 'column4', 'column5'); - * @example select_many('column', 'column2', 'column3'); - * @example select_many(array('column', 'column2', 'column3'), 'column4', 'column5'); - * - * @return \ORM - */ - public function select_many() { - $columns = func_get_args(); - if(!empty($columns)) { - $columns = $this->_normalise_select_many_columns($columns); - foreach($columns as $alias => $column) { - if(is_numeric($alias)) { - $alias = null; - } - $this->select($column, $alias); - } - } - return $this; - } - - /** - * Add an unquoted expression to the list of columns returned - * by the SELECT query. Many columns can be supplied as either - * an array or as a list of parameters to the method. - * - * Note that the alias must not be numeric - if you want a - * numeric alias then prepend it with some alpha chars. eg. a1 - * - * @example select_many_expr(array('alias' => 'column', 'column2', 'alias2' => 'column3'), 'column4', 'column5') - * @example select_many_expr('column', 'column2', 'column3') - * @example select_many_expr(array('column', 'column2', 'column3'), 'column4', 'column5') - * - * @return \ORM - */ - public function select_many_expr() { - $columns = func_get_args(); - if(!empty($columns)) { - $columns = $this->_normalise_select_many_columns($columns); - foreach($columns as $alias => $column) { - if(is_numeric($alias)) { - $alias = null; - } - $this->select_expr($column, $alias); - } - } - return $this; - } - - /** - * Take a column specification for the select many methods and convert it - * into a normalised array of columns and aliases. - * - * It is designed to turn the following styles into a normalised array: - * - * array(array('alias' => 'column', 'column2', 'alias2' => 'column3'), 'column4', 'column5')) - * - * @param array $columns - * @return array - */ - protected function _normalise_select_many_columns($columns) { - $return = array(); - foreach($columns as $column) { - if(is_array($column)) { - foreach($column as $key => $value) { - if(!is_numeric($key)) { - $return[$key] = $value; - } else { - $return[] = $value; - } - } - } else { - $return[] = $column; - } - } - return $return; - } - - /** - * Add a DISTINCT keyword before the list of columns in the SELECT query - */ - public function distinct() { - $this->_distinct = true; - return $this; - } - - /** - * Internal method to add a JOIN source to the query. - * - * The join_operator should be one of INNER, LEFT OUTER, CROSS etc - this - * will be prepended to JOIN. - * - * The table should be the name of the table to join to. - * - * The constraint may be either a string or an array with three elements. If it - * is a string, it will be compiled into the query as-is, with no escaping. The - * recommended way to supply the constraint is as an array with three elements: - * - * first_column, operator, second_column - * - * Example: array('user.id', '=', 'profile.user_id') - * - * will compile to - * - * ON `user`.`id` = `profile`.`user_id` - * - * The final (optional) argument specifies an alias for the joined table. - */ - protected function _add_join_source($join_operator, $table, $constraint, $table_alias=null) { - - $join_operator = trim("{$join_operator} JOIN"); - - $table = $this->_quote_identifier($table); - - // Add table alias if present - if (!is_null($table_alias)) { - $table_alias = $this->_quote_identifier($table_alias); - $table .= " {$table_alias}"; - } - - // Build the constraint - if (is_array($constraint)) { - list($first_column, $operator, $second_column) = $constraint; - $first_column = $this->_quote_identifier($first_column); - $second_column = $this->_quote_identifier($second_column); - $constraint = "{$first_column} {$operator} {$second_column}"; - } - - $this->_join_sources[] = "{$join_operator} {$table} ON {$constraint}"; - return $this; - } - - /** - * Add a simple JOIN source to the query - */ - public function join($table, $constraint, $table_alias=null) { - return $this->_add_join_source("", $table, $constraint, $table_alias); - } - - /** - * Add an INNER JOIN souce to the query - */ - public function inner_join($table, $constraint, $table_alias=null) { - return $this->_add_join_source("INNER", $table, $constraint, $table_alias); - } - - /** - * Add a LEFT OUTER JOIN souce to the query - */ - public function left_outer_join($table, $constraint, $table_alias=null) { - return $this->_add_join_source("LEFT OUTER", $table, $constraint, $table_alias); - } - - /** - * Add an RIGHT OUTER JOIN souce to the query - */ - public function right_outer_join($table, $constraint, $table_alias=null) { - return $this->_add_join_source("RIGHT OUTER", $table, $constraint, $table_alias); - } - - /** - * Add an FULL OUTER JOIN souce to the query - */ - public function full_outer_join($table, $constraint, $table_alias=null) { - return $this->_add_join_source("FULL OUTER", $table, $constraint, $table_alias); - } - - /** - * Internal method to add a HAVING condition to the query - */ - protected function _add_having($fragment, $values=array()) { - return $this->_add_condition('having', $fragment, $values); - } - - /** - * Internal method to add a HAVING condition to the query - */ - protected function _add_simple_having($column_name, $separator, $value) { - return $this->_add_simple_condition('having', $column_name, $separator, $value); - } - - /** - * Internal method to add a WHERE condition to the query - */ - protected function _add_where($fragment, $values=array()) { - return $this->_add_condition('where', $fragment, $values); - } - - /** - * Internal method to add a WHERE condition to the query - */ - protected function _add_simple_where($column_name, $separator, $value) { - return $this->_add_simple_condition('where', $column_name, $separator, $value); - } - - /** - * Internal method to add a HAVING or WHERE condition to the query - */ - protected function _add_condition($type, $fragment, $values=array()) { - $conditions_class_property_name = "_{$type}_conditions"; - if (!is_array($values)) { - $values = array($values); - } - array_push($this->$conditions_class_property_name, array( - self::CONDITION_FRAGMENT => $fragment, - self::CONDITION_VALUES => $values, - )); - return $this; - } - - /** - * Helper method to compile a simple COLUMN SEPARATOR VALUE - * style HAVING or WHERE condition into a string and value ready to - * be passed to the _add_condition method. Avoids duplication - * of the call to _quote_identifier - */ - protected function _add_simple_condition($type, $column_name, $separator, $value) { - // Add the table name in case of ambiguous columns - if (count($this->_join_sources) > 0 && strpos($column_name, '.') === false) { - $table = $this->_table_name; - if (!is_null($this->_table_alias)) { - $table = $this->_table_alias; - } - - $column_name = "{$table}.{$column_name}"; - } - $column_name = $this->_quote_identifier($column_name); - return $this->_add_condition($type, "{$column_name} {$separator} ?", $value); - } - - /** - * Return a string containing the given number of question marks, - * separated by commas. Eg "?, ?, ?" - */ - protected function _create_placeholders($fields) { - if(!empty($fields)) { - $db_fields = array(); - foreach($fields as $key => $value) { - // Process expression fields directly into the query - if(array_key_exists($key, $this->_expr_fields)) { - $db_fields[] = $value; - } else { - $db_fields[] = '?'; - } - } - return implode(', ', $db_fields); - } - } - - /** - * Add a WHERE column = value clause to your query. Each time - * this is called in the chain, an additional WHERE will be - * added, and these will be ANDed together when the final query - * is built. - */ - public function where($column_name, $value) { - return $this->where_equal($column_name, $value); - } - - /** - * More explicitly named version of for the where() method. - * Can be used if preferred. - */ - public function where_equal($column_name, $value) { - return $this->_add_simple_where($column_name, '=', $value); - } - - /** - * Add a WHERE column != value clause to your query. - */ - public function where_not_equal($column_name, $value) { - return $this->_add_simple_where($column_name, '!=', $value); - } - - /** - * Special method to query the table by its primary key - */ - public function where_id_is($id) { - return $this->where($this->_get_id_column_name(), $id); - } - - /** - * Add a WHERE ... LIKE clause to your query. - */ - public function where_like($column_name, $value) { - return $this->_add_simple_where($column_name, 'LIKE', $value); - } - - /** - * Add where WHERE ... NOT LIKE clause to your query. - */ - public function where_not_like($column_name, $value) { - return $this->_add_simple_where($column_name, 'NOT LIKE', $value); - } - - /** - * Add a WHERE ... > clause to your query - */ - public function where_gt($column_name, $value) { - return $this->_add_simple_where($column_name, '>', $value); - } - - /** - * Add a WHERE ... < clause to your query - */ - public function where_lt($column_name, $value) { - return $this->_add_simple_where($column_name, '<', $value); - } - - /** - * Add a WHERE ... >= clause to your query - */ - public function where_gte($column_name, $value) { - return $this->_add_simple_where($column_name, '>=', $value); - } - - /** - * Add a WHERE ... <= clause to your query - */ - public function where_lte($column_name, $value) { - return $this->_add_simple_where($column_name, '<=', $value); - } - - /** - * Add a WHERE ... IN clause to your query - */ - public function where_in($column_name, $values) { - $column_name = $this->_quote_identifier($column_name); - $placeholders = $this->_create_placeholders($values); - return $this->_add_where("{$column_name} IN ({$placeholders})", $values); - } - - /** - * Add a WHERE ... NOT IN clause to your query - */ - public function where_not_in($column_name, $values) { - $column_name = $this->_quote_identifier($column_name); - $placeholders = $this->_create_placeholders($values); - return $this->_add_where("{$column_name} NOT IN ({$placeholders})", $values); - } - - /** - * Add a WHERE column IS NULL clause to your query - */ - public function where_null($column_name) { - $column_name = $this->_quote_identifier($column_name); - return $this->_add_where("{$column_name} IS NULL"); - } - - /** - * Add a WHERE column IS NOT NULL clause to your query - */ - public function where_not_null($column_name) { - $column_name = $this->_quote_identifier($column_name); - return $this->_add_where("{$column_name} IS NOT NULL"); - } - - /** - * Add a raw WHERE clause to the query. The clause should - * contain question mark placeholders, which will be bound - * to the parameters supplied in the second argument. - */ - public function where_raw($clause, $parameters=array()) { - return $this->_add_where($clause, $parameters); - } - - /** - * Add a LIMIT to the query - */ - public function limit($limit) { - $this->_limit = $limit; - return $this; - } - - /** - * Add an OFFSET to the query - */ - public function offset($offset) { - $this->_offset = $offset; - return $this; - } - - /** - * Add an ORDER BY clause to the query - */ - protected function _add_order_by($column_name, $ordering) { - $column_name = $this->_quote_identifier($column_name); - $this->_order_by[] = "{$column_name} {$ordering}"; - return $this; - } - - /** - * Add an ORDER BY column DESC clause - */ - public function order_by_desc($column_name) { - return $this->_add_order_by($column_name, 'DESC'); - } - - /** - * Add an ORDER BY column ASC clause - */ - public function order_by_asc($column_name) { - return $this->_add_order_by($column_name, 'ASC'); - } - - /** - * Add an unquoted expression as an ORDER BY clause - */ - public function order_by_expr($clause) { - $this->_order_by[] = $clause; - return $this; - } - - /** - * Add a column to the list of columns to GROUP BY - */ - public function group_by($column_name) { - $column_name = $this->_quote_identifier($column_name); - $this->_group_by[] = $column_name; - return $this; - } - - /** - * Add an unquoted expression to the list of columns to GROUP BY - */ - public function group_by_expr($expr) { - $this->_group_by[] = $expr; - return $this; - } - - /** - * Add a HAVING column = value clause to your query. Each time - * this is called in the chain, an additional HAVING will be - * added, and these will be ANDed together when the final query - * is built. - */ - public function having($column_name, $value) { - return $this->having_equal($column_name, $value); - } - - /** - * More explicitly named version of for the having() method. - * Can be used if preferred. - */ - public function having_equal($column_name, $value) { - return $this->_add_simple_having($column_name, '=', $value); - } - - /** - * Add a HAVING column != value clause to your query. - */ - public function having_not_equal($column_name, $value) { - return $this->_add_simple_having($column_name, '!=', $value); - } - - /** - * Special method to query the table by its primary key - */ - public function having_id_is($id) { - return $this->having($this->_get_id_column_name(), $id); - } - - /** - * Add a HAVING ... LIKE clause to your query. - */ - public function having_like($column_name, $value) { - return $this->_add_simple_having($column_name, 'LIKE', $value); - } - - /** - * Add where HAVING ... NOT LIKE clause to your query. - */ - public function having_not_like($column_name, $value) { - return $this->_add_simple_having($column_name, 'NOT LIKE', $value); - } - - /** - * Add a HAVING ... > clause to your query - */ - public function having_gt($column_name, $value) { - return $this->_add_simple_having($column_name, '>', $value); - } - - /** - * Add a HAVING ... < clause to your query - */ - public function having_lt($column_name, $value) { - return $this->_add_simple_having($column_name, '<', $value); - } - - /** - * Add a HAVING ... >= clause to your query - */ - public function having_gte($column_name, $value) { - return $this->_add_simple_having($column_name, '>=', $value); - } - - /** - * Add a HAVING ... <= clause to your query - */ - public function having_lte($column_name, $value) { - return $this->_add_simple_having($column_name, '<=', $value); - } - - /** - * Add a HAVING ... IN clause to your query - */ - public function having_in($column_name, $values) { - $column_name = $this->_quote_identifier($column_name); - $placeholders = $this->_create_placeholders($values); - return $this->_add_having("{$column_name} IN ({$placeholders})", $values); - } - - /** - * Add a HAVING ... NOT IN clause to your query - */ - public function having_not_in($column_name, $values) { - $column_name = $this->_quote_identifier($column_name); - $placeholders = $this->_create_placeholders($values); - return $this->_add_having("{$column_name} NOT IN ({$placeholders})", $values); - } - - /** - * Add a HAVING column IS NULL clause to your query - */ - public function having_null($column_name) { - $column_name = $this->_quote_identifier($column_name); - return $this->_add_having("{$column_name} IS NULL"); - } - - /** - * Add a HAVING column IS NOT NULL clause to your query - */ - public function having_not_null($column_name) { - $column_name = $this->_quote_identifier($column_name); - return $this->_add_having("{$column_name} IS NOT NULL"); - } - - /** - * Add a raw HAVING clause to the query. The clause should - * contain question mark placeholders, which will be bound - * to the parameters supplied in the second argument. - */ - public function having_raw($clause, $parameters=array()) { - return $this->_add_having($clause, $parameters); - } - - /** - * Build a SELECT statement based on the clauses that have - * been passed to this instance by chaining method calls. - */ - protected function _build_select() { - // If the query is raw, just set the $this->_values to be - // the raw query parameters and return the raw query - if ($this->_is_raw_query) { - $this->_values = $this->_raw_parameters; - return $this->_raw_query; - } - - // Build and return the full SELECT statement by concatenating - // the results of calling each separate builder method. - return $this->_join_if_not_empty(" ", array( - $this->_build_select_start(), - $this->_build_join(), - $this->_build_where(), - $this->_build_group_by(), - $this->_build_having(), - $this->_build_order_by(), - $this->_build_limit(), - $this->_build_offset(), - )); - } - - /** - * Build the start of the SELECT statement - */ - protected function _build_select_start() { - $fragment = 'SELECT '; - $result_columns = join(', ', $this->_result_columns); - - if (!is_null($this->_limit) && - self::$_config[$this->_connection_name]['limit_clause_style'] === ORM::LIMIT_STYLE_TOP_N) { - $fragment .= "TOP {$this->_limit} "; - } - - if ($this->_distinct) { - $result_columns = 'DISTINCT ' . $result_columns; - } - - $fragment .= "{$result_columns} FROM " . $this->_quote_identifier($this->_table_name); - - if (!is_null($this->_table_alias)) { - $fragment .= " " . $this->_quote_identifier($this->_table_alias); - } - return $fragment; - } - - /** - * Build the JOIN sources - */ - protected function _build_join() { - if (count($this->_join_sources) === 0) { - return ''; - } - - return join(" ", $this->_join_sources); - } - - /** - * Build the WHERE clause(s) - */ - protected function _build_where() { - return $this->_build_conditions('where'); - } - - /** - * Build the HAVING clause(s) - */ - protected function _build_having() { - return $this->_build_conditions('having'); - } - - /** - * Build GROUP BY - */ - protected function _build_group_by() { - if (count($this->_group_by) === 0) { - return ''; - } - return "GROUP BY " . join(", ", $this->_group_by); - } - - /** - * Build a WHERE or HAVING clause - * @param string $type - * @return string - */ - protected function _build_conditions($type) { - $conditions_class_property_name = "_{$type}_conditions"; - // If there are no clauses, return empty string - if (count($this->$conditions_class_property_name) === 0) { - return ''; - } - - $conditions = array(); - foreach ($this->$conditions_class_property_name as $condition) { - $conditions[] = $condition[self::CONDITION_FRAGMENT]; - $this->_values = array_merge($this->_values, $condition[self::CONDITION_VALUES]); - } - - return strtoupper($type) . " " . join(" AND ", $conditions); - } - - /** - * Build ORDER BY - */ - protected function _build_order_by() { - if (count($this->_order_by) === 0) { - return ''; - } - return "ORDER BY " . join(", ", $this->_order_by); - } - - /** - * Build LIMIT - */ - protected function _build_limit() { - $fragment = ''; - if (!is_null($this->_limit) && - self::$_config[$this->_connection_name]['limit_clause_style'] == ORM::LIMIT_STYLE_LIMIT) { - if (self::$_db[$this->_connection_name]->getAttribute(PDO::ATTR_DRIVER_NAME) == 'firebird') { - $fragment = 'ROWS'; - } else { - $fragment = 'LIMIT'; - } - $fragment .= " {$this->_limit}"; - } - return $fragment; - } - - /** - * Build OFFSET - */ - protected function _build_offset() { - if (!is_null($this->_offset)) { - $clause = 'OFFSET'; - if (self::$_db[$this->_connection_name]->getAttribute(PDO::ATTR_DRIVER_NAME) == 'firebird') { - $clause = 'TO'; - } - return "$clause " . $this->_offset; - } - return ''; - } - - /** - * Wrapper around PHP's join function which - * only adds the pieces if they are not empty. - */ - protected function _join_if_not_empty($glue, $pieces) { - $filtered_pieces = array(); - foreach ($pieces as $piece) { - if (is_string($piece)) { - $piece = trim($piece); - } - if (!empty($piece)) { - $filtered_pieces[] = $piece; - } - } - return join($glue, $filtered_pieces); - } - - /** - * Quote a string that is used as an identifier - * (table names, column names etc). This method can - * also deal with dot-separated identifiers eg table.column - */ - protected function _quote_identifier($identifier) { - $parts = explode('.', $identifier); - $parts = array_map(array($this, '_quote_identifier_part'), $parts); - return join('.', $parts); - } - - /** - * This method performs the actual quoting of a single - * part of an identifier, using the identifier quote - * character specified in the config (or autodetected). - */ - protected function _quote_identifier_part($part) { - if ($part === '*') { - return $part; - } - - $quote_character = self::$_config[$this->_connection_name]['identifier_quote_character']; - // double up any identifier quotes to escape them - return $quote_character . - str_replace($quote_character, - $quote_character . $quote_character, - $part - ) . $quote_character; - } - - /** - * Create a cache key for the given query and parameters. - */ - protected static function _create_cache_key($query, $parameters) { - $parameter_string = join(',', $parameters); - $key = $query . ':' . $parameter_string; - return sha1($key); - } - - /** - * Check the query cache for the given cache key. If a value - * is cached for the key, return the value. Otherwise, return false. - */ - protected static function _check_query_cache($cache_key, $connection_name = self::DEFAULT_CONNECTION) { - if (isset(self::$_query_cache[$connection_name][$cache_key])) { - return self::$_query_cache[$connection_name][$cache_key]; - } - return false; - } - - /** - * Clear the query cache - */ - public static function clear_cache() { - self::$_query_cache = array(); - } - - /** - * Add the given value to the query cache. - */ - protected static function _cache_query_result($cache_key, $value, $connection_name = self::DEFAULT_CONNECTION) { - if (!isset(self::$_query_cache[$connection_name])) { - self::$_query_cache[$connection_name] = array(); - } - self::$_query_cache[$connection_name][$cache_key] = $value; - } - - /** - * Execute the SELECT query that has been built up by chaining methods - * on this class. Return an array of rows as associative arrays. - */ - protected function _run() { - $query = $this->_build_select(); - $caching_enabled = self::$_config[$this->_connection_name]['caching']; - - if ($caching_enabled) { - $cache_key = self::_create_cache_key($query, $this->_values); - $cached_result = self::_check_query_cache($cache_key, $this->_connection_name); - - if ($cached_result !== false) { - return $cached_result; - } - } - - self::_execute($query, $this->_values, $this->_connection_name); - $statement = self::get_last_statement(); - - $rows = array(); - while ($row = $statement->fetch(PDO::FETCH_ASSOC)) { - $rows[] = $row; - } - - if ($caching_enabled) { - self::_cache_query_result($cache_key, $rows, $this->_connection_name); - } - - // reset Idiorm after executing the query - $this->_values = array(); - $this->_result_columns = array('*'); - $this->_using_default_result_columns = true; - - return $rows; - } - - /** - * Return the raw data wrapped by this ORM - * instance as an associative array. Column - * names may optionally be supplied as arguments, - * if so, only those keys will be returned. - */ - public function as_array() { - if (func_num_args() === 0) { - return $this->_data; - } - $args = func_get_args(); - return array_intersect_key($this->_data, array_flip($args)); - } - - /** - * Return the value of a property of this object (database row) - * or null if not present. - */ - public function get($key) { - return isset($this->_data[$key]) ? $this->_data[$key] : null; - } - - /** - * Return the name of the column in the database table which contains - * the primary key ID of the row. - */ - protected function _get_id_column_name() { - if (!is_null($this->_instance_id_column)) { - return $this->_instance_id_column; - } - if (isset(self::$_config[$this->_connection_name]['id_column_overrides'][$this->_table_name])) { - return self::$_config[$this->_connection_name]['id_column_overrides'][$this->_table_name]; - } - return self::$_config[$this->_connection_name]['id_column']; - } - - /** - * Get the primary key ID of this object. - */ - public function id() { - return $this->get($this->_get_id_column_name()); - } - - /** - * Set a property to a particular value on this object. - * To set multiple properties at once, pass an associative array - * as the first parameter and leave out the second parameter. - * Flags the properties as 'dirty' so they will be saved to the - * database when save() is called. - */ - public function set($key, $value = null) { - return $this->_set_orm_property($key, $value); - } - - /** - * Set a property to a particular value on this object. - * To set multiple properties at once, pass an associative array - * as the first parameter and leave out the second parameter. - * Flags the properties as 'dirty' so they will be saved to the - * database when save() is called. - * @param string|array $key - * @param string|null $value - */ - public function set_expr($key, $value = null) { - return $this->_set_orm_property($key, $value, true); - } - - /** - * Set a property on the ORM object. - * @param string|array $key - * @param string|null $value - * @param bool $raw Whether this value should be treated as raw or not - */ - protected function _set_orm_property($key, $value = null, $expr = false) { - if (!is_array($key)) { - $key = array($key => $value); - } - foreach ($key as $field => $value) { - $this->_data[$field] = $value; - $this->_dirty_fields[$field] = $value; - if (false === $expr and isset($this->_expr_fields[$field])) { - unset($this->_expr_fields[$field]); - } else if (true === $expr) { - $this->_expr_fields[$field] = true; - } - } - return $this; - } - - /** - * Check whether the given field has been changed since this - * object was saved. - */ - public function is_dirty($key) { - return isset($this->_dirty_fields[$key]); - } - - /** - * Check whether the model was the result of a call to create() or not - * @return bool - */ - public function is_new() { - return $this->_is_new; - } - - /** - * Save any fields which have been modified on this object - * to the database. - */ - public function save() { - $query = array(); - - // remove any expression fields as they are already baked into the query - $values = array_values(array_diff_key($this->_dirty_fields, $this->_expr_fields)); - - if (!$this->_is_new) { // UPDATE - // If there are no dirty values, do nothing - if (empty($values) && empty($this->_expr_fields)) { - return true; - } - $query = $this->_build_update(); - $values[] = $this->id(); - } else { // INSERT - $query = $this->_build_insert(); - } - - $success = self::_execute($query, $values, $this->_connection_name); - - // If we've just inserted a new record, set the ID of this object - if ($this->_is_new) { - $this->_is_new = false; - if (is_null($this->id())) { - if(self::$_db[$this->_connection_name]->getAttribute(PDO::ATTR_DRIVER_NAME) == 'pgsql') { - $this->_data[$this->_get_id_column_name()] = self::get_last_statement()->fetchColumn(); - } else { - $this->_data[$this->_get_id_column_name()] = self::$_db[$this->_connection_name]->lastInsertId(); - } - } - } - - $this->_dirty_fields = $this->_expr_fields = array(); - return $success; - } - - /** - * Build an UPDATE query - */ - protected function _build_update() { - $query = array(); - $query[] = "UPDATE {$this->_quote_identifier($this->_table_name)} SET"; - - $field_list = array(); - foreach ($this->_dirty_fields as $key => $value) { - if(!array_key_exists($key, $this->_expr_fields)) { - $value = '?'; - } - $field_list[] = "{$this->_quote_identifier($key)} = $value"; - } - $query[] = join(", ", $field_list); - $query[] = "WHERE"; - $query[] = $this->_quote_identifier($this->_get_id_column_name()); - $query[] = "= ?"; - return join(" ", $query); - } - - /** - * Build an INSERT query - */ - protected function _build_insert() { - $query[] = "INSERT INTO"; - $query[] = $this->_quote_identifier($this->_table_name); - $field_list = array_map(array($this, '_quote_identifier'), array_keys($this->_dirty_fields)); - $query[] = "(" . join(", ", $field_list) . ")"; - $query[] = "VALUES"; - - $placeholders = $this->_create_placeholders($this->_dirty_fields); - $query[] = "({$placeholders})"; - - if (self::$_db[$this->_connection_name]->getAttribute(PDO::ATTR_DRIVER_NAME) == 'pgsql') { - $query[] = 'RETURNING ' . $this->_quote_identifier($this->_get_id_column_name()); - } - - return join(" ", $query); - } - - /** - * Delete this record from the database - */ - public function delete() { - $query = join(" ", array( - "DELETE FROM", - $this->_quote_identifier($this->_table_name), - "WHERE", - $this->_quote_identifier($this->_get_id_column_name()), - "= ?", - )); - - return self::_execute($query, array($this->id()), $this->_connection_name); - } - - /** - * Delete many records from the database - */ - public function delete_many() { - // Build and return the full DELETE statement by concatenating - // the results of calling each separate builder method. - $query = $this->_join_if_not_empty(" ", array( - "DELETE FROM", - $this->_quote_identifier($this->_table_name), - $this->_build_where(), - )); - - return self::_execute($query, $this->_values, $this->_connection_name); - } - - // --------------------- // - // --- ArrayAccess --- // - // --------------------- // - - public function offsetExists($key) { - return isset($this->_data[$key]); - } - - public function offsetGet($key) { - return $this->get($key); - } - - public function offsetSet($key, $value) { - if(is_null($key)) { - throw new InvalidArgumentException('You must specify a key/array index.'); - } - $this->set($key, $value); - } - - public function offsetUnset($key) { - unset($this->_data[$key]); - unset($this->_dirty_fields[$key]); - } - - // --------------------- // - // --- MAGIC METHODS --- // - // --------------------- // - public function __get($key) { - return $this->offsetGet($key); - } - - public function __set($key, $value) { - $this->offsetSet($key, $value); - } - - public function __unset($key) { - $this->offsetUnset($key); - } - - - public function __isset($key) { - return $this->offsetExists($key); - } - - /** - * Magic method to capture calls to undefined class methods. - * In this case we are attempting to convert camel case formatted - * methods into underscore formatted methods. - * - * This allows us to call ORM methods using camel case and remain - * backwards compatible. - * - * @param string $name - * @param array $arguments - * @return ORM - */ - public function __call($name, $arguments) - { - $method = strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $name)); - - return call_user_func_array(array($this, $method), $arguments); - } - - /** - * Magic method to capture calls to undefined static class methods. - * In this case we are attempting to convert camel case formatted - * methods into underscore formatted methods. - * - * This allows us to call ORM methods using camel case and remain - * backwards compatible. - * - * @param string $name - * @param array $arguments - * @return ORM - */ - public static function __callStatic($name, $arguments) - { - $method = strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $name)); - - return call_user_func_array(array('ORM', $method), $arguments); - } - } - - /** - * A class to handle str_replace operations that involve quoted strings - * @example IdiormString::str_replace_outside_quotes('?', '%s', 'columnA = "Hello?" AND columnB = ?'); - * @example IdiormString::value('columnA = "Hello?" AND columnB = ?')->replace_outside_quotes('?', '%s'); - * @author Jeff Roberson - * @author Simon Holywell - * @link http://stackoverflow.com/a/13370709/461813 StackOverflow answer - */ - class IdiormString { - protected $subject; - protected $search; - protected $replace; - - /** - * Get an easy to use instance of the class - * @param string $subject - * @return \self - */ - public static function value($subject) { - return new self($subject); - } - - /** - * Shortcut method: Replace all occurrences of the search string with the replacement - * string where they appear outside quotes. - * @param string $search - * @param string $replace - * @param string $subject - * @return string - */ - public static function str_replace_outside_quotes($search, $replace, $subject) { - return self::value($subject)->replace_outside_quotes($search, $replace); - } - - /** - * Set the base string object - * @param string $subject - */ - public function __construct($subject) { - $this->subject = (string) $subject; - } - - /** - * Replace all occurrences of the search string with the replacement - * string where they appear outside quotes - * @param string $search - * @param string $replace - * @return string - */ - public function replace_outside_quotes($search, $replace) { - $this->search = $search; - $this->replace = $replace; - return $this->_str_replace_outside_quotes(); - } - - /** - * Validate an input string and perform a replace on all ocurrences - * of $this->search with $this->replace - * @author Jeff Roberson - * @link http://stackoverflow.com/a/13370709/461813 StackOverflow answer - * @return string - */ - protected function _str_replace_outside_quotes(){ - $re_valid = '/ - # Validate string having embedded quoted substrings. - ^ # Anchor to start of string. - (?: # Zero or more string chunks. - "[^"\\\\]*(?:\\\\.[^"\\\\]*)*" # Either a double quoted chunk, - | \'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\' # or a single quoted chunk, - | [^\'"\\\\]+ # or an unquoted chunk (no escapes). - )* # Zero or more string chunks. - \z # Anchor to end of string. - /sx'; - if (!preg_match($re_valid, $this->subject)) { - throw new IdiormStringException("Subject string is not valid in the replace_outside_quotes context."); - } - $re_parse = '/ - # Match one chunk of a valid string having embedded quoted substrings. - ( # Either $1: Quoted chunk. - "[^"\\\\]*(?:\\\\.[^"\\\\]*)*" # Either a double quoted chunk, - | \'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\' # or a single quoted chunk. - ) # End $1: Quoted chunk. - | ([^\'"\\\\]+) # or $2: an unquoted chunk (no escapes). - /sx'; - return preg_replace_callback($re_parse, array($this, '_str_replace_outside_quotes_cb'), $this->subject); - } - - /** - * Process each matching chunk from preg_replace_callback replacing - * each occurrence of $this->search with $this->replace - * @author Jeff Roberson - * @link http://stackoverflow.com/a/13370709/461813 StackOverflow answer - * @param array $matches - * @return string - */ - protected function _str_replace_outside_quotes_cb($matches) { - // Return quoted string chunks (in group $1) unaltered. - if ($matches[1]) return $matches[1]; - // Process only unquoted chunks (in group $2). - return preg_replace('/'. preg_quote($this->search, '/') .'/', - $this->replace, $matches[2]); - } - } - - /** - * A result set class for working with collections of model instances - * @author Simon Holywell - */ - class IdiormResultSet implements Countable, IteratorAggregate, ArrayAccess, Serializable { - /** - * The current result set as an array - * @var array - */ - protected $_results = array(); - - /** - * Optionally set the contents of the result set by passing in array - * @param array $results - */ - public function __construct(array $results = array()) { - $this->set_results($results); - } - - /** - * Set the contents of the result set by passing in array - * @param array $results - */ - public function set_results(array $results) { - $this->_results = $results; - } - - /** - * Get the current result set as an array - * @return array - */ - public function get_results() { - return $this->_results; - } - - /** - * Get the current result set as an array - * @return array - */ - public function as_array() { - return $this->get_results(); - } - - /** - * Get the number of records in the result set - * @return int - */ - public function count() { - return count($this->_results); - } - - /** - * Get an iterator for this object. In this case it supports foreaching - * over the result set. - * @return \ArrayIterator - */ - public function getIterator() { - return new ArrayIterator($this->_results); - } - - /** - * ArrayAccess - * @param int|string $offset - * @return bool - */ - public function offsetExists($offset) { - return isset($this->_results[$offset]); - } - - /** - * ArrayAccess - * @param int|string $offset - * @return mixed - */ - public function offsetGet($offset) { - return $this->_results[$offset]; - } - - /** - * ArrayAccess - * @param int|string $offset - * @param mixed $value - */ - public function offsetSet($offset, $value) { - $this->_results[$offset] = $value; - } - - /** - * ArrayAccess - * @param int|string $offset - */ - public function offsetUnset($offset) { - unset($this->_results[$offset]); - } - - /** - * Serializable - * @return string - */ - public function serialize() { - return serialize($this->_results); - } - - /** - * Serializable - * @param string $serialized - * @return array - */ - public function unserialize($serialized) { - return unserialize($serialized); - } - - /** - * Call a method on all models in a result set. This allows for method - * chaining such as setting a property on all models in a result set or - * any other batch operation across models. - * @example ORM::for_table('Widget')->find_many()->set('field', 'value')->save(); - * @param string $method - * @param array $params - * @return \IdiormResultSet - */ - public function __call($method, $params = array()) { - foreach($this->_results as $model) { - call_user_func_array(array($model, $method), $params); - } - return $this; - } - } - - /** - * A placeholder for exceptions eminating from the IdiormString class - */ - class IdiormStringException extends Exception {} \ No newline at end of file diff --git a/libraries/PHPMailer/PHPMailer.php b/libraries/PHPMailer/PHPMailer.php deleted file mode 100644 index f76ecac..0000000 --- a/libraries/PHPMailer/PHPMailer.php +++ /dev/null @@ -1,2946 +0,0 @@ -UseSendmailOptions) ) { - $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($subject)), $body, $header); - } else { - $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($subject)), $body, $header, $params); - } - - return $rt; - } - - /** - * Outputs debugging info via user-defined method - * @param string $str - */ - private function edebug($str) - { - if ($this->Debugoutput == "error_log") { - error_log($str); - } else { - echo $str; - } - } - - /** - * Constructor - * @param boolean $exceptions Should we throw external exceptions? - */ - public function __construct($exceptions = false) - { - $this->exceptions = ($exceptions == true); - } - - /** - * Sets message type to HTML. - * @param bool $ishtml - * @return void - */ - public function IsHTML($ishtml = true) - { - if ($ishtml) { - $this->ContentType = 'text/html'; - } else { - $this->ContentType = 'text/plain'; - } - } - - /** - * Sets Mailer to send message using SMTP. - * @return void - */ - public function IsSMTP() - { - $this->Mailer = 'smtp'; - } - - /** - * Sets Mailer to send message using PHP mail() function. - * @return void - */ - public function IsMail() - { - $this->Mailer = 'mail'; - } - - /** - * Sets Mailer to send message using the $Sendmail program. - * @return void - */ - public function IsSendmail() - { - if (!stristr(ini_get('sendmail_path'), 'sendmail')) { - $this->Sendmail = '/var/qmail/bin/sendmail'; - } - $this->Mailer = 'sendmail'; - } - - /** - * Sets Mailer to send message using the qmail MTA. - * @return void - */ - public function IsQmail() - { - if (stristr(ini_get('sendmail_path'), 'qmail')) { - $this->Sendmail = '/var/qmail/bin/sendmail'; - } - $this->Mailer = 'sendmail'; - } - - ///////////////////////////////////////////////// - // METHODS, RECIPIENTS - ///////////////////////////////////////////////// - - /** - * Adds a "To" address. - * @param string $address - * @param string $name - * @return boolean true on success, false if address already used - */ - public function AddAddress($address, $name = '') - { - return $this->AddAnAddress('to', $address, $name); - } - - /** - * Adds a "Cc" address. - * Note: this function works with the SMTP mailer on win32, not with the "mail" mailer. - * @param string $address - * @param string $name - * @return boolean true on success, false if address already used - */ - public function AddCC($address, $name = '') - { - return $this->AddAnAddress('cc', $address, $name); - } - - /** - * Adds a "Bcc" address. - * Note: this function works with the SMTP mailer on win32, not with the "mail" mailer. - * @param string $address - * @param string $name - * @return boolean true on success, false if address already used - */ - public function AddBCC($address, $name = '') - { - return $this->AddAnAddress('bcc', $address, $name); - } - - /** - * Adds a "Reply-to" address. - * @param string $address - * @param string $name - * @return boolean - */ - public function AddReplyTo($address, $name = '') - { - return $this->AddAnAddress('Reply-To', $address, $name); - } - - /** - * Adds an address to one of the recipient arrays - * Addresses that have been added already return false, but do not throw exceptions - * @param string $kind One of 'to', 'cc', 'bcc', 'ReplyTo' - * @param string $address The email address to send to - * @param string $name - * @throws phpmailerException - * @return boolean true on success, false if address already used or invalid in some way - * @access protected - */ - protected function AddAnAddress($kind, $address, $name = '') - { - if (!preg_match('/^(to|cc|bcc|Reply-To)$/', $kind)) { - $this->SetError($this->Lang('Invalid recipient array').': '.$kind); - if ($this->exceptions) { - throw new phpmailerException('Invalid recipient array: ' . $kind); - } - if ($this->SMTPDebug) { - $this->edebug($this->Lang('Invalid recipient array').': '.$kind); - } - - return false; - } - $address = trim($address); - $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim - if (!$this->ValidateAddress($address)) { - $this->SetError($this->Lang('invalid_address').': '. $address); - if ($this->exceptions) { - throw new phpmailerException($this->Lang('invalid_address').': '.$address); - } - if ($this->SMTPDebug) { - $this->edebug($this->Lang('invalid_address').': '.$address); - } - - return false; - } - if ($kind != 'Reply-To') { - if (!isset($this->all_recipients[strtolower($address)])) { - array_push($this->$kind, array($address, $name)); - $this->all_recipients[strtolower($address)] = true; - - return true; - } - } else { - if (!array_key_exists(strtolower($address), $this->ReplyTo)) { - $this->ReplyTo[strtolower($address)] = array($address, $name); - - return true; - } - } - - return false; -} - -/** - * Set the From and FromName properties - * @param string $address - * @param string $name - * @param int $auto Also set Reply-To and Sender - * @throws phpmailerException - * @return boolean - */ - public function SetFrom($address, $name = '', $auto = 1) - { - $address = trim($address); - $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim - if (!$this->ValidateAddress($address)) { - $this->SetError($this->Lang('invalid_address').': '. $address); - if ($this->exceptions) { - throw new phpmailerException($this->Lang('invalid_address').': '.$address); - } - if ($this->SMTPDebug) { - $this->edebug($this->Lang('invalid_address').': '.$address); - } - - return false; - } - $this->From = $address; - $this->FromName = $name; - if ($auto) { - if (empty($this->ReplyTo)) { - $this->AddAnAddress('Reply-To', $address, $name); - } - if (empty($this->Sender)) { - $this->Sender = $address; - } - } - - return true; - } - - /** - * Check that a string looks roughly like an email address should - * Static so it can be used without instantiation, public so people can overload - * Conforms to RFC5322: Uses *correct* regex on which FILTER_VALIDATE_EMAIL is - * based; So why not use FILTER_VALIDATE_EMAIL? Because it was broken to - * not allow a@b type valid addresses :( - * Some Versions of PHP break on the regex though, likely due to PCRE, so use - * the older validation method for those users. (http://php.net/manual/en/pcre.installation.php) - * @link http://squiloople.com/2009/12/20/email-address-validation/ - * @copyright regex Copyright Michael Rushton 2009-10 | http://squiloople.com/ | Feel free to use and redistribute this code. But please keep this copyright notice. - * @param string $address The email address to check - * @return boolean - * @static - * @access public - */ - public static function ValidateAddress($address) - { - if ((defined('PCRE_VERSION')) && (version_compare(PCRE_VERSION, '8.0') >= 0)) { - return preg_match('/^(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){255,})(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){65,}@)((?>(?>(?>((?>(?>(?>\x0D\x0A)?[ ])+|(?>[ ]*\x0D\x0A)?[ ]+)?)(\((?>(?2)(?>[\x01-\x08\x0B\x0C\x0E-\'*-\[\]-\x7F]|\\\[\x00-\x7F]|(?3)))*(?2)\)))+(?2))|(?2))?)([!#-\'*+\/-9=?^-~-]+|"(?>(?2)(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\x7F]))*(?2)")(?>(?1)\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>([a-z0-9](?>[a-z0-9-]*[a-z0-9])?)(?>(?1)\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}|(?!(?:.*[a-f0-9][:\]]){7,})((?6)(?>:(?6)){0,5})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:|(?!(?:.*[a-f0-9]:){5,})(?8)?::(?>((?6)(?>:(?6)){0,3}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(?>\.(?9)){3}))\])(?1)$/isD', $address); - } elseif (function_exists('filter_var')) { //Introduced in PHP 5.2 - if (filter_var($address, FILTER_VALIDATE_EMAIL) === FALSE) { - return false; - } else { - return true; - } - } else { - return preg_match('/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9_](?:[a-zA-Z0-9_\-](?!\.)){0,61}[a-zA-Z0-9_-]?\.)+[a-zA-Z0-9_](?:[a-zA-Z0-9_\-](?!$)){0,61}[a-zA-Z0-9_]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/', $address); - } - } - - ///////////////////////////////////////////////// - // METHODS, MAIL SENDING - ///////////////////////////////////////////////// - - /** - * Creates message and assigns Mailer. If the message is - * not sent successfully then it returns false. Use the ErrorInfo - * variable to view description of the error. - * @throws phpmailerException - * @return bool - */ - public function Send() - { - try { - if(!$this->PreSend()) return false; - - return $this->PostSend(); - } catch (phpmailerException $e) { - $this->mailHeader = ''; - $this->SetError($e->getMessage()); - if ($this->exceptions) { - throw $e; - } - - return false; - } - } - - /** - * Prep mail by constructing all message entities - * @throws phpmailerException - * @return bool - */ - public function PreSend() - { - try { - $this->mailHeader = ""; - if ((count($this->to) + count($this->cc) + count($this->bcc)) < 1) { - throw new phpmailerException($this->Lang('provide_address'), self::STOP_CRITICAL); - } - - // Set whether the message is multipart/alternative - if (!empty($this->AltBody)) { - $this->ContentType = 'multipart/alternative'; - } - - $this->error_count = 0; // reset errors - $this->SetMessageType(); - //Refuse to send an empty message - if (empty($this->Body)) { - throw new phpmailerException($this->Lang('empty_message'), self::STOP_CRITICAL); - } - - $this->MIMEHeader = $this->CreateHeader(); - $this->MIMEBody = $this->CreateBody(); - - // To capture the complete message when using mail(), create - // an extra header list which CreateHeader() doesn't fold in - if ($this->Mailer == 'mail') { - if (count($this->to) > 0) { - $this->mailHeader .= $this->AddrAppend("To", $this->to); - } else { - $this->mailHeader .= $this->HeaderLine("To", "undisclosed-recipients:;"); - } - $this->mailHeader .= $this->HeaderLine('Subject', $this->EncodeHeader($this->SecureHeader(trim($this->Subject)))); - // if (count($this->cc) > 0) { - // $this->mailHeader .= $this->AddrAppend("Cc", $this->cc); - // } - } - - // digitally sign with DKIM if enabled - if (!empty($this->DKIM_domain) && !empty($this->DKIM_private) && !empty($this->DKIM_selector) && !empty($this->DKIM_domain) && file_exists($this->DKIM_private)) { - $header_dkim = $this->DKIM_Add($this->MIMEHeader, $this->EncodeHeader($this->SecureHeader($this->Subject)), $this->MIMEBody); - $this->MIMEHeader = str_replace("\r\n", "\n", $header_dkim) . $this->MIMEHeader; - } - - return true; - - } catch (phpmailerException $e) { - $this->SetError($e->getMessage()); - if ($this->exceptions) { - throw $e; - } - - return false; - } - } - - /** - * Actual Email transport function - * Send the email via the selected mechanism - * @throws phpmailerException - * @return bool - */ - public function PostSend() - { - try { - // Choose the mailer and send through it - switch ($this->Mailer) { - case 'sendmail': - return $this->SendmailSend($this->MIMEHeader, $this->MIMEBody); - case 'smtp': - return $this->SmtpSend($this->MIMEHeader, $this->MIMEBody); - case 'mail': - return $this->MailSend($this->MIMEHeader, $this->MIMEBody); - default: - return $this->MailSend($this->MIMEHeader, $this->MIMEBody); - } - } catch (phpmailerException $e) { - $this->SetError($e->getMessage()); - if ($this->exceptions) { - throw $e; - } - if ($this->SMTPDebug) { - $this->edebug($e->getMessage()."\n"); - } - } - - return false; - } - - /** - * Sends mail using the $Sendmail program. - * @param string $header The message headers - * @param string $body The message body - * @throws phpmailerException - * @access protected - * @return bool - */ - protected function SendmailSend($header, $body) - { - if ($this->Sender != '') { - $sendmail = sprintf("%s -oi -f%s -t", escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender)); - } else { - $sendmail = sprintf("%s -oi -t", escapeshellcmd($this->Sendmail)); - } - if ($this->SingleTo === true) { - foreach ($this->SingleToArray as $val) { - if (!@$mail = popen($sendmail, 'w')) { - throw new phpmailerException($this->Lang('execute') . $this->Sendmail, self::STOP_CRITICAL); - } - fputs($mail, "To: " . $val . "\n"); - fputs($mail, $header); - fputs($mail, $body); - $result = pclose($mail); - // implement call back function if it exists - $isSent = ($result == 0) ? 1 : 0; - $this->doCallback($isSent, $val, $this->cc, $this->bcc, $this->Subject, $body); - if ($result != 0) { - throw new phpmailerException($this->Lang('execute') . $this->Sendmail, self::STOP_CRITICAL); - } - } - } else { - if (!@$mail = popen($sendmail, 'w')) { - throw new phpmailerException($this->Lang('execute') . $this->Sendmail, self::STOP_CRITICAL); - } - fputs($mail, $header); - fputs($mail, $body); - $result = pclose($mail); - // implement call back function if it exists - $isSent = ($result == 0) ? 1 : 0; - $this->doCallback($isSent, $this->to, $this->cc, $this->bcc, $this->Subject, $body); - if ($result != 0) { - throw new phpmailerException($this->Lang('execute') . $this->Sendmail, self::STOP_CRITICAL); - } - } - - return true; - } - - /** - * Sends mail using the PHP mail() function. - * @param string $header The message headers - * @param string $body The message body - * @throws phpmailerException - * @access protected - * @return bool - */ - protected function MailSend($header, $body) - { - $toArr = array(); - foreach ($this->to as $t) { - $toArr[] = $this->AddrFormat($t); - } - $to = implode(', ', $toArr); - - if (empty($this->Sender)) { - $params = "-oi "; - } else { - $params = sprintf("-oi -f%s", $this->Sender); - } - if ($this->Sender != '' and !ini_get('safe_mode')) { - $old_from = ini_get('sendmail_from'); - ini_set('sendmail_from', $this->Sender); - } - $rt = false; - if ($this->SingleTo === true && count($toArr) > 1) { - foreach ($toArr as $val) { - $rt = $this->mail_passthru($val, $this->Subject, $body, $header, $params); - // implement call back function if it exists - $isSent = ($rt == 1) ? 1 : 0; - $this->doCallback($isSent, $val, $this->cc, $this->bcc, $this->Subject, $body); - } - } else { - $rt = $this->mail_passthru($to, $this->Subject, $body, $header, $params); - // implement call back function if it exists - $isSent = ($rt == 1) ? 1 : 0; - $this->doCallback($isSent, $to, $this->cc, $this->bcc, $this->Subject, $body); - } - if (isset($old_from)) { - ini_set('sendmail_from', $old_from); - } - if (!$rt) { - throw new phpmailerException($this->Lang('instantiate'), self::STOP_CRITICAL); - } - - return true; - } - - /** - * Sends mail via SMTP using PhpSMTP - * Returns false if there is a bad MAIL FROM, RCPT, or DATA input. - * @param string $header The message headers - * @param string $body The message body - * @throws phpmailerException - * @uses SMTP - * @access protected - * @return bool - */ - protected function SmtpSend($header, $body) - { - require_once $this->PluginDir . 'class.smtp.php'; - $bad_rcpt = array(); - - if (!$this->SmtpConnect()) { - throw new phpmailerException($this->Lang('smtp_connect_failed'), self::STOP_CRITICAL); - } - $smtp_from = ($this->Sender == '') ? $this->From : $this->Sender; - if (!$this->smtp->Mail($smtp_from)) { - $this->SetError($this->Lang('from_failed') . $smtp_from . " : " . implode(",",$this->smtp->getError())) ; - throw new phpmailerException($this->ErrorInfo, self::STOP_CRITICAL); - } - - // Attempt to send attach all recipients - foreach ($this->to as $to) { - if (!$this->smtp->Recipient($to[0])) { - $bad_rcpt[] = $to[0]; - // implement call back function if it exists - $isSent = 0; - $this->doCallback($isSent, $to[0], '', '', $this->Subject, $body); - } else { - // implement call back function if it exists - $isSent = 1; - $this->doCallback($isSent, $to[0], '', '', $this->Subject, $body); - } - } - foreach ($this->cc as $cc) { - if (!$this->smtp->Recipient($cc[0])) { - $bad_rcpt[] = $cc[0]; - // implement call back function if it exists - $isSent = 0; - $this->doCallback($isSent, '', $cc[0], '', $this->Subject, $body); - } else { - // implement call back function if it exists - $isSent = 1; - $this->doCallback($isSent, '', $cc[0], '', $this->Subject, $body); - } - } - foreach ($this->bcc as $bcc) { - if (!$this->smtp->Recipient($bcc[0])) { - $bad_rcpt[] = $bcc[0]; - // implement call back function if it exists - $isSent = 0; - $this->doCallback($isSent, '', '', $bcc[0], $this->Subject, $body); - } else { - // implement call back function if it exists - $isSent = 1; - $this->doCallback($isSent, '', '', $bcc[0], $this->Subject, $body); - } - } - - - if (count($bad_rcpt) > 0 ) { //Create error message for any bad addresses - $badaddresses = implode(', ', $bad_rcpt); - throw new phpmailerException($this->Lang('recipients_failed') . $badaddresses); - } - if (!$this->smtp->Data($header . $body)) { - throw new phpmailerException($this->Lang('data_not_accepted'), self::STOP_CRITICAL); - } - if ($this->SMTPKeepAlive == true) { - $this->smtp->Reset(); - } else { - $this->smtp->Quit(); - $this->smtp->Close(); - } - - return true; - } - - /** - * Initiates a connection to an SMTP server. - * Returns false if the operation failed. - * @uses SMTP - * @access public - * @throws phpmailerException - * @return bool - */ - public function SmtpConnect() - { - if (is_null($this->smtp)) { - $this->smtp = new SMTP; - } - - $this->smtp->Timeout = $this->Timeout; - $this->smtp->do_debug = $this->SMTPDebug; - $hosts = explode(';', $this->Host); - $index = 0; - $connection = $this->smtp->Connected(); - - // Retry while there is no connection - try { - while ($index < count($hosts) && !$connection) { - $hostinfo = array(); - if (preg_match('/^(.+):([0-9]+)$/', $hosts[$index], $hostinfo)) { - $host = $hostinfo[1]; - $port = $hostinfo[2]; - } else { - $host = $hosts[$index]; - $port = $this->Port; - } - - $tls = ($this->SMTPSecure == 'tls'); - $ssl = ($this->SMTPSecure == 'ssl'); - - if ($this->smtp->Connect(($ssl ? 'ssl://':'').$host, $port, $this->Timeout)) { - - $hello = ($this->Helo != '' ? $this->Helo : $this->ServerHostname()); - $this->smtp->Hello($hello); - - if ($tls) { - if (!$this->smtp->StartTLS()) { - throw new phpmailerException($this->Lang('connect_host')); - } - - //We must resend HELO after tls negotiation - $this->smtp->Hello($hello); - } - - $connection = true; - if ($this->SMTPAuth) { - if (!$this->smtp->Authenticate($this->Username, $this->Password, $this->AuthType, - $this->Realm, $this->Workstation)) { - throw new phpmailerException($this->Lang('authenticate')); - } - } - } - $index++; - if (!$connection) { - throw new phpmailerException($this->Lang('connect_host')); - } - } - } catch (phpmailerException $e) { - $this->smtp->Reset(); - if ($this->exceptions) { - throw $e; - } - } - - return true; - } - - /** - * Closes the active SMTP session if one exists. - * @return void - */ - public function SmtpClose() - { - if ($this->smtp !== null) { - if ($this->smtp->Connected()) { - $this->smtp->Quit(); - $this->smtp->Close(); - } - } - } - - /** - * Sets the language for all class error messages. - * Returns false if it cannot load the language file. The default language is English. - * @param string $langcode ISO 639-1 2-character language code (e.g. Portuguese: "br") - * @param string $lang_path Path to the language file directory - * @return bool - * @access public - */ - public function SetLanguage($langcode = 'en', $lang_path = 'language/') - { - //Define full set of translatable strings - $PHPMAILER_LANG = array( - 'authenticate' => 'SMTP Error: Could not authenticate.', - 'connect_host' => 'SMTP Error: Could not connect to SMTP host.', - 'data_not_accepted' => 'SMTP Error: Data not accepted.', - 'empty_message' => 'Message body empty', - 'encoding' => 'Unknown encoding: ', - 'execute' => 'Could not execute: ', - 'file_access' => 'Could not access file: ', - 'file_open' => 'File Error: Could not open file: ', - 'from_failed' => 'The following From address failed: ', - 'instantiate' => 'Could not instantiate mail function.', - 'invalid_address' => 'Invalid address', - 'mailer_not_supported' => ' mailer is not supported.', - 'provide_address' => 'You must provide at least one recipient email address.', - 'recipients_failed' => 'SMTP Error: The following recipients failed: ', - 'signing' => 'Signing Error: ', - 'smtp_connect_failed' => 'SMTP Connect() failed.', - 'smtp_error' => 'SMTP server error: ', - 'variable_set' => 'Cannot set or reset variable: ' - ); - //Overwrite language-specific strings. This way we'll never have missing translations - no more "language string failed to load"! - $l = true; - if ($langcode != 'en') { //There is no English translation file - $l = @include $lang_path.'phpmailer.lang-'.$langcode.'.php'; - } - $this->language = $PHPMAILER_LANG; - - return ($l == true); //Returns false if language not found - } - - /** - * Return the current array of language strings - * @return array - */ - public function GetTranslations() - { - return $this->language; - } - - ///////////////////////////////////////////////// - // METHODS, MESSAGE CREATION - ///////////////////////////////////////////////// - - /** - * Creates recipient headers. - * @access public - * @param string $type - * @param array $addr - * @return string - */ - public function AddrAppend($type, $addr) - { - $addr_str = $type . ': '; - $addresses = array(); - foreach ($addr as $a) { - $addresses[] = $this->AddrFormat($a); - } - $addr_str .= implode(', ', $addresses); - $addr_str .= $this->LE; - - return $addr_str; - } - - /** - * Formats an address correctly. - * @access public - * @param string $addr - * @return string - */ - public function AddrFormat($addr) - { - if (empty($addr[1])) { - return $this->SecureHeader($addr[0]); - } else { - return $this->EncodeHeader($this->SecureHeader($addr[1]), 'phrase') . " <" . $this->SecureHeader($addr[0]) . ">"; - } - } - - /** - * Wraps message for use with mailers that do not - * automatically perform wrapping and for quoted-printable. - * Original written by philippe. - * @param string $message The message to wrap - * @param integer $length The line length to wrap to - * @param boolean $qp_mode Whether to run in Quoted-Printable mode - * @access public - * @return string - */ - public function WrapText($message, $length, $qp_mode = false) - { - $soft_break = ($qp_mode) ? sprintf(" =%s", $this->LE) : $this->LE; - // If utf-8 encoding is used, we will need to make sure we don't - // split multibyte characters when we wrap - $is_utf8 = (strtolower($this->CharSet) == "utf-8"); - $lelen = strlen($this->LE); - $crlflen = strlen(self::CRLF); - - $message = $this->FixEOL($message); - if (substr($message, -$lelen) == $this->LE) { - $message = substr($message, 0, -$lelen); - } - - $line = explode($this->LE, $message); // Magic. We know FixEOL uses $LE - $message = ''; - for ($i = 0 ;$i < count($line); $i++) { - $line_part = explode(' ', $line[$i]); - $buf = ''; - for ($e = 0; $e $length)) { - $space_left = $length - strlen($buf) - $crlflen; - if ($e != 0) { - if ($space_left > 20) { - $len = $space_left; - if ($is_utf8) { - $len = $this->UTF8CharBoundary($word, $len); - } elseif (substr($word, $len - 1, 1) == "=") { - $len--; - } elseif (substr($word, $len - 2, 1) == "=") { - $len -= 2; - } - $part = substr($word, 0, $len); - $word = substr($word, $len); - $buf .= ' ' . $part; - $message .= $buf . sprintf("=%s", self::CRLF); - } else { - $message .= $buf . $soft_break; - } - $buf = ''; - } - while (strlen($word) > 0) { - $len = $length; - if ($is_utf8) { - $len = $this->UTF8CharBoundary($word, $len); - } elseif (substr($word, $len - 1, 1) == "=") { - $len--; - } elseif (substr($word, $len - 2, 1) == "=") { - $len -= 2; - } - $part = substr($word, 0, $len); - $word = substr($word, $len); - - if (strlen($word) > 0) { - $message .= $part . sprintf("=%s", self::CRLF); - } else { - $buf = $part; - } - } - } else { - $buf_o = $buf; - $buf .= ($e == 0) ? $word : (' ' . $word); - - if (strlen($buf) > $length and $buf_o != '') { - $message .= $buf_o . $soft_break; - $buf = $word; - } - } - } - $message .= $buf . self::CRLF; - } - - return $message; - } - - /** - * Finds last character boundary prior to maxLength in a utf-8 - * quoted (printable) encoded string. - * Original written by Colin Brown. - * @access public - * @param string $encodedText utf-8 QP text - * @param int $maxLength find last character boundary prior to this length - * @return int - */ - public function UTF8CharBoundary($encodedText, $maxLength) - { - $foundSplitPos = false; - $lookBack = 3; - while (!$foundSplitPos) { - $lastChunk = substr($encodedText, $maxLength - $lookBack, $lookBack); - $encodedCharPos = strpos($lastChunk, "="); - if ($encodedCharPos !== false) { - // Found start of encoded character byte within $lookBack block. - // Check the encoded byte value (the 2 chars after the '=') - $hex = substr($encodedText, $maxLength - $lookBack + $encodedCharPos + 1, 2); - $dec = hexdec($hex); - if ($dec < 128) { // Single byte character. - // If the encoded char was found at pos 0, it will fit - // otherwise reduce maxLength to start of the encoded char - $maxLength = ($encodedCharPos == 0) ? $maxLength : - $maxLength - ($lookBack - $encodedCharPos); - $foundSplitPos = true; - } elseif ($dec >= 192) { // First byte of a multi byte character - // Reduce maxLength to split at start of character - $maxLength = $maxLength - ($lookBack - $encodedCharPos); - $foundSplitPos = true; - } elseif ($dec < 192) { // Middle byte of a multi byte character, look further back - $lookBack += 3; - } - } else { - // No encoded character found - $foundSplitPos = true; - } - } - - return $maxLength; - } - - - /** - * Set the body wrapping. - * @access public - * @return void - */ - public function SetWordWrap() - { - if ($this->WordWrap < 1) { - return; - } - - switch ($this->message_type) { - case 'alt': - case 'alt_inline': - case 'alt_attach': - case 'alt_inline_attach': - $this->AltBody = $this->WrapText($this->AltBody, $this->WordWrap); - break; - default: - $this->Body = $this->WrapText($this->Body, $this->WordWrap); - break; - } - } - - /** - * Assembles message header. - * @access public - * @return string The assembled header - */ - public function CreateHeader() - { - $result = ''; - - // Set the boundaries - $uniq_id = md5(uniqid(time())); - $this->boundary[1] = 'b1_' . $uniq_id; - $this->boundary[2] = 'b2_' . $uniq_id; - $this->boundary[3] = 'b3_' . $uniq_id; - - if ($this->MessageDate == '') { - $result .= $this->HeaderLine('Date', self::RFCDate()); - } else { - $result .= $this->HeaderLine('Date', $this->MessageDate); - } - - if ($this->ReturnPath) { - $result .= $this->HeaderLine('Return-Path', trim($this->ReturnPath)); - } elseif ($this->Sender == '') { - $result .= $this->HeaderLine('Return-Path', trim($this->From)); - } else { - $result .= $this->HeaderLine('Return-Path', trim($this->Sender)); - } - - // To be created automatically by mail() - if ($this->Mailer != 'mail') { - if ($this->SingleTo === true) { - foreach ($this->to as $t) { - $this->SingleToArray[] = $this->AddrFormat($t); - } - } else { - if (count($this->to) > 0) { - $result .= $this->AddrAppend('To', $this->to); - } elseif (count($this->cc) == 0) { - $result .= $this->HeaderLine('To', 'undisclosed-recipients:;'); - } - } - } - - $from = array(); - $from[0][0] = trim($this->From); - $from[0][1] = $this->FromName; - $result .= $this->AddrAppend('From', $from); - - // sendmail and mail() extract Cc from the header before sending - if (count($this->cc) > 0) { - $result .= $this->AddrAppend('Cc', $this->cc); - } - - // sendmail and mail() extract Bcc from the header before sending - if ((($this->Mailer == 'sendmail') || ($this->Mailer == 'mail')) && (count($this->bcc) > 0)) { - $result .= $this->AddrAppend('Bcc', $this->bcc); - } - - if (count($this->ReplyTo) > 0) { - $result .= $this->AddrAppend('Reply-To', $this->ReplyTo); - } - - // mail() sets the subject itself - if ($this->Mailer != 'mail') { - $result .= $this->HeaderLine('Subject', $this->EncodeHeader($this->SecureHeader($this->Subject))); - } - - if ($this->MessageID != '') { - $result .= $this->HeaderLine('Message-ID', $this->MessageID); - } else { - $result .= sprintf("Message-ID: <%s@%s>%s", $uniq_id, $this->ServerHostname(), $this->LE); - } - $result .= $this->HeaderLine('X-Priority', $this->Priority); - if ($this->XMailer == '') { - $result .= $this->HeaderLine('X-Mailer', 'PHPMailer '.$this->Version.' (http://code.google.com/a/apache-extras.org/p/phpmailer/)'); - } else { - $myXmailer = trim($this->XMailer); - if ($myXmailer) { - $result .= $this->HeaderLine('X-Mailer', $myXmailer); - } - } - - if ($this->ConfirmReadingTo != '') { - $result .= $this->HeaderLine('Disposition-Notification-To', '<' . trim($this->ConfirmReadingTo) . '>'); - } - - // Add custom headers - for ($index = 0; $index < count($this->CustomHeader); $index++) { - $result .= $this->HeaderLine(trim($this->CustomHeader[$index][0]), $this->EncodeHeader(trim($this->CustomHeader[$index][1]))); - } - if (!$this->sign_key_file) { - $result .= $this->HeaderLine('MIME-Version', '1.0'); - $result .= $this->GetMailMIME(); - } - - return $result; - } - - /** - * Returns the message MIME. - * @access public - * @return string - */ - public function GetMailMIME() - { - $result = ''; - switch ($this->message_type) { - case 'inline': - $result .= $this->HeaderLine('Content-Type', 'multipart/related;'); - $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"'); - break; - case 'attach': - case 'inline_attach': - case 'alt_attach': - case 'alt_inline_attach': - $result .= $this->HeaderLine('Content-Type', 'multipart/mixed;'); - $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"'); - break; - case 'alt': - case 'alt_inline': - $result .= $this->HeaderLine('Content-Type', 'multipart/alternative;'); - $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"'); - break; - default: - // Catches case 'plain': and case '': - $result .= $this->HeaderLine('Content-Transfer-Encoding', $this->Encoding); - $result .= $this->TextLine('Content-Type: '.$this->ContentType.'; charset='.$this->CharSet); - break; - } - - if ($this->Mailer != 'mail') { - $result .= $this->LE; - } - - return $result; - } - - /** - * Returns the MIME message (headers and body). Only really valid post PreSend(). - * @access public - * @return string - */ - public function GetSentMIMEMessage() - { - return $this->MIMEHeader . $this->mailHeader . self::CRLF . $this->MIMEBody; - } - - /** - * Assembles the message body. Returns an empty string on failure. - * @access public - * @throws phpmailerException - * @return string The assembled message body - */ - public function CreateBody() - { - $body = ''; - - if ($this->sign_key_file) { - $body .= $this->GetMailMIME().$this->LE; - } - - $this->SetWordWrap(); - - switch ($this->message_type) { - case 'inline': - $body .= $this->GetBoundary($this->boundary[1], '', '', ''); - $body .= $this->EncodeString($this->Body, $this->Encoding); - $body .= $this->LE.$this->LE; - $body .= $this->AttachAll("inline", $this->boundary[1]); - break; - case 'attach': - $body .= $this->GetBoundary($this->boundary[1], '', '', ''); - $body .= $this->EncodeString($this->Body, $this->Encoding); - $body .= $this->LE.$this->LE; - $body .= $this->AttachAll("attachment", $this->boundary[1]); - break; - case 'inline_attach': - $body .= $this->TextLine("--" . $this->boundary[1]); - $body .= $this->HeaderLine('Content-Type', 'multipart/related;'); - $body .= $this->TextLine("\tboundary=\"" . $this->boundary[2] . '"'); - $body .= $this->LE; - $body .= $this->GetBoundary($this->boundary[2], '', '', ''); - $body .= $this->EncodeString($this->Body, $this->Encoding); - $body .= $this->LE.$this->LE; - $body .= $this->AttachAll("inline", $this->boundary[2]); - $body .= $this->LE; - $body .= $this->AttachAll("attachment", $this->boundary[1]); - break; - case 'alt': - $body .= $this->GetBoundary($this->boundary[1], '', 'text/plain', ''); - $body .= $this->EncodeString($this->AltBody, $this->Encoding); - $body .= $this->LE.$this->LE; - $body .= $this->GetBoundary($this->boundary[1], '', 'text/html', ''); - $body .= $this->EncodeString($this->Body, $this->Encoding); - $body .= $this->LE.$this->LE; - $body .= $this->EndBoundary($this->boundary[1]); - break; - case 'alt_inline': - $body .= $this->GetBoundary($this->boundary[1], '', 'text/plain', ''); - $body .= $this->EncodeString($this->AltBody, $this->Encoding); - $body .= $this->LE.$this->LE; - $body .= $this->TextLine("--" . $this->boundary[1]); - $body .= $this->HeaderLine('Content-Type', 'multipart/related;'); - $body .= $this->TextLine("\tboundary=\"" . $this->boundary[2] . '"'); - $body .= $this->LE; - $body .= $this->GetBoundary($this->boundary[2], '', 'text/html', ''); - $body .= $this->EncodeString($this->Body, $this->Encoding); - $body .= $this->LE.$this->LE; - $body .= $this->AttachAll("inline", $this->boundary[2]); - $body .= $this->LE; - $body .= $this->EndBoundary($this->boundary[1]); - break; - case 'alt_attach': - $body .= $this->TextLine("--" . $this->boundary[1]); - $body .= $this->HeaderLine('Content-Type', 'multipart/alternative;'); - $body .= $this->TextLine("\tboundary=\"" . $this->boundary[2] . '"'); - $body .= $this->LE; - $body .= $this->GetBoundary($this->boundary[2], '', 'text/plain', ''); - $body .= $this->EncodeString($this->AltBody, $this->Encoding); - $body .= $this->LE.$this->LE; - $body .= $this->GetBoundary($this->boundary[2], '', 'text/html', ''); - $body .= $this->EncodeString($this->Body, $this->Encoding); - $body .= $this->LE.$this->LE; - $body .= $this->EndBoundary($this->boundary[2]); - $body .= $this->LE; - $body .= $this->AttachAll("attachment", $this->boundary[1]); - break; - case 'alt_inline_attach': - $body .= $this->TextLine("--" . $this->boundary[1]); - $body .= $this->HeaderLine('Content-Type', 'multipart/alternative;'); - $body .= $this->TextLine("\tboundary=\"" . $this->boundary[2] . '"'); - $body .= $this->LE; - $body .= $this->GetBoundary($this->boundary[2], '', 'text/plain', ''); - $body .= $this->EncodeString($this->AltBody, $this->Encoding); - $body .= $this->LE.$this->LE; - $body .= $this->TextLine("--" . $this->boundary[2]); - $body .= $this->HeaderLine('Content-Type', 'multipart/related;'); - $body .= $this->TextLine("\tboundary=\"" . $this->boundary[3] . '"'); - $body .= $this->LE; - $body .= $this->GetBoundary($this->boundary[3], '', 'text/html', ''); - $body .= $this->EncodeString($this->Body, $this->Encoding); - $body .= $this->LE.$this->LE; - $body .= $this->AttachAll("inline", $this->boundary[3]); - $body .= $this->LE; - $body .= $this->EndBoundary($this->boundary[2]); - $body .= $this->LE; - $body .= $this->AttachAll("attachment", $this->boundary[1]); - break; - default: - // catch case 'plain' and case '' - $body .= $this->EncodeString($this->Body, $this->Encoding); - break; - } - - if ($this->IsError()) { - $body = ''; - } elseif ($this->sign_key_file) { - try { - $file = tempnam('', 'mail'); - file_put_contents($file, $body); //TODO check this worked - $signed = tempnam("", "signed"); - if (@openssl_pkcs7_sign($file, $signed, "file://".$this->sign_cert_file, array("file://".$this->sign_key_file, $this->sign_key_pass), NULL)) { - @unlink($file); - $body = file_get_contents($signed); - @unlink($signed); - } else { - @unlink($file); - @unlink($signed); - throw new phpmailerException($this->Lang("signing").openssl_error_string()); - } - } catch (phpmailerException $e) { - $body = ''; - if ($this->exceptions) { - throw $e; - } - } - } - - return $body; - } - - /** - * Returns the start of a message boundary. - * @access protected - * @param string $boundary - * @param string $charSet - * @param string $contentType - * @param string $encoding - * @return string - */ - protected function GetBoundary($boundary, $charSet, $contentType, $encoding) - { - $result = ''; - if ($charSet == '') { - $charSet = $this->CharSet; - } - if ($contentType == '') { - $contentType = $this->ContentType; - } - if ($encoding == '') { - $encoding = $this->Encoding; - } - $result .= $this->TextLine('--' . $boundary); - $result .= sprintf("Content-Type: %s; charset=%s", $contentType, $charSet); - $result .= $this->LE; - $result .= $this->HeaderLine('Content-Transfer-Encoding', $encoding); - $result .= $this->LE; - - return $result; - } - - /** - * Returns the end of a message boundary. - * @access protected - * @param string $boundary - * @return string - */ - protected function EndBoundary($boundary) - { - return $this->LE . '--' . $boundary . '--' . $this->LE; - } - - /** - * Sets the message type. - * @access protected - * @return void - */ - protected function SetMessageType() - { - $this->message_type = array(); - if($this->AlternativeExists()) $this->message_type[] = "alt"; - if($this->InlineImageExists()) $this->message_type[] = "inline"; - if($this->AttachmentExists()) $this->message_type[] = "attach"; - $this->message_type = implode("_", $this->message_type); - if($this->message_type == "") $this->message_type = "plain"; - } - - /** - * Returns a formatted header line. - * @access public - * @param string $name - * @param string $value - * @return string - */ - public function HeaderLine($name, $value) - { - return $name . ': ' . $value . $this->LE; - } - - /** - * Returns a formatted mail line. - * @access public - * @param string $value - * @return string - */ - public function TextLine($value) - { - return $value . $this->LE; - } - - ///////////////////////////////////////////////// - // CLASS METHODS, ATTACHMENTS - ///////////////////////////////////////////////// - - /** - * Adds an attachment from a path on the filesystem. - * Returns false if the file could not be found - * or accessed. - * @param string $path Path to the attachment. - * @param string $name Overrides the attachment name. - * @param string $encoding File encoding (see $Encoding). - * @param string $type File extension (MIME) type. - * @throws phpmailerException - * @return bool - */ - public function AddAttachment($path, $name = '', $encoding = 'base64', $type = 'application/octet-stream') - { - try { - if ( !@is_file($path) ) { - throw new phpmailerException($this->Lang('file_access') . $path, self::STOP_CONTINUE); - } - $filename = basename($path); - if ($name == '') { - $name = $filename; - } - - $this->attachment[] = array( - 0 => $path, - 1 => $filename, - 2 => $name, - 3 => $encoding, - 4 => $type, - 5 => false, // isStringAttachment - 6 => 'attachment', - 7 => 0 - ); - - } catch (phpmailerException $e) { - $this->SetError($e->getMessage()); - if ($this->exceptions) { - throw $e; - } - if ($this->SMTPDebug) { - $this->edebug($e->getMessage()."\n"); - } - if ( $e->getCode() == self::STOP_CRITICAL ) { - return false; - } - } - - return true; - } - - /** - * Return the current array of attachments - * @return array - */ - public function GetAttachments() - { - return $this->attachment; - } - - /** - * Attaches all fs, string, and binary attachments to the message. - * Returns an empty string on failure. - * @access protected - * @param string $disposition_type - * @param string $boundary - * @return string - */ - protected function AttachAll($disposition_type, $boundary) - { - // Return text of body - $mime = array(); - $cidUniq = array(); - $incl = array(); - - // Add all attachments - foreach ($this->attachment as $attachment) { - // CHECK IF IT IS A VALID DISPOSITION_FILTER - if ($attachment[6] == $disposition_type) { - // Check for string attachment - $string = ''; - $path = ''; - $bString = $attachment[5]; - if ($bString) { - $string = $attachment[0]; - } else { - $path = $attachment[0]; - } - - $inclhash = md5(serialize($attachment)); - if (in_array($inclhash, $incl)) { continue; } - $incl[] = $inclhash; - $filename = $attachment[1]; - $name = $attachment[2]; - $encoding = $attachment[3]; - $type = $attachment[4]; - $disposition = $attachment[6]; - $cid = $attachment[7]; - if ( $disposition == 'inline' && isset($cidUniq[$cid]) ) { continue; } - $cidUniq[$cid] = true; - - $mime[] = sprintf("--%s%s", $boundary, $this->LE); - $mime[] = sprintf("Content-Type: %s; name=\"%s\"%s", $type, $this->EncodeHeader($this->SecureHeader($name)), $this->LE); - $mime[] = sprintf("Content-Transfer-Encoding: %s%s", $encoding, $this->LE); - - if ($disposition == 'inline') { - $mime[] = sprintf("Content-ID: <%s>%s", $cid, $this->LE); - } - - $mime[] = sprintf("Content-Disposition: %s; filename=\"%s\"%s", $disposition, $this->EncodeHeader($this->SecureHeader($name)), $this->LE.$this->LE); - - // Encode as string attachment - if ($bString) { - $mime[] = $this->EncodeString($string, $encoding); - if ($this->IsError()) { - return ''; - } - $mime[] = $this->LE.$this->LE; - } else { - $mime[] = $this->EncodeFile($path, $encoding); - if ($this->IsError()) { - return ''; - } - $mime[] = $this->LE.$this->LE; - } - } - } - - $mime[] = sprintf("--%s--%s", $boundary, $this->LE); - - return implode("", $mime); - } - - /** - * Encodes attachment in requested format. - * Returns an empty string on failure. - * @param string $path The full path to the file - * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' - * @throws phpmailerException - * @see EncodeFile() - * @access protected - * @return string - */ - protected function EncodeFile($path, $encoding = 'base64') - { - try { - if (!is_readable($path)) { - throw new phpmailerException($this->Lang('file_open') . $path, self::STOP_CONTINUE); - } - // if (!function_exists('get_magic_quotes')) { - // function get_magic_quotes() { - // return false; - // } - // } - $magic_quotes = get_magic_quotes_runtime(); - if ($magic_quotes) { - if (version_compare(PHP_VERSION, '5.3.0', '<')) { - set_magic_quotes_runtime(0); - } else { - ini_set('magic_quotes_runtime', 0); - } - } - $file_buffer = file_get_contents($path); - $file_buffer = $this->EncodeString($file_buffer, $encoding); - if ($magic_quotes) { - if (version_compare(PHP_VERSION, '5.3.0', '<')) { - set_magic_quotes_runtime($magic_quotes); - } else { - ini_set('magic_quotes_runtime', $magic_quotes); - } - } - - return $file_buffer; - } catch (Exception $e) { - $this->SetError($e->getMessage()); - - return ''; - } - } - - /** - * Encodes string to requested format. - * Returns an empty string on failure. - * @param string $str The text to encode - * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' - * @access public - * @return string - */ - public function EncodeString($str, $encoding = 'base64') - { - $encoded = ''; - switch (strtolower($encoding)) { - case 'base64': - $encoded = chunk_split(base64_encode($str), 76, $this->LE); - break; - case '7bit': - case '8bit': - $encoded = $this->FixEOL($str); - //Make sure it ends with a line break - if (substr($encoded, -(strlen($this->LE))) != $this->LE) - $encoded .= $this->LE; - break; - case 'binary': - $encoded = $str; - break; - case 'quoted-printable': - $encoded = $this->EncodeQP($str); - break; - default: - $this->SetError($this->Lang('encoding') . $encoding); - break; - } - - return $encoded; - } - - /** - * Encode a header string to best (shortest) of Q, B, quoted or none. - * @access public - * @param string $str - * @param string $position - * @return string - */ - public function EncodeHeader($str, $position = 'text') - { - $x = 0; - - switch (strtolower($position)) { - case 'phrase': - if (!preg_match('/[\200-\377]/', $str)) { - // Can't use addslashes as we don't know what value has magic_quotes_sybase - $encoded = addcslashes($str, "\0..\37\177\\\""); - if (($str == $encoded) && !preg_match('/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str)) { - return ($encoded); - } else { - return ("\"$encoded\""); - } - } - $x = preg_match_all('/[^\040\041\043-\133\135-\176]/', $str, $matches); - break; - case 'comment': - $x = preg_match_all('/[()"]/', $str, $matches); - // Fall-through - case 'text': - default: - $x += preg_match_all('/[\000-\010\013\014\016-\037\177-\377]/', $str, $matches); - break; - } - - if ($x == 0) { - return ($str); - } - - $maxlen = 75 - 7 - strlen($this->CharSet); - // Try to select the encoding which should produce the shortest output - if (strlen($str)/3 < $x) { - $encoding = 'B'; - if (function_exists('mb_strlen') && $this->HasMultiBytes($str)) { - // Use a custom function which correctly encodes and wraps long - // multibyte strings without breaking lines within a character - $encoded = $this->Base64EncodeWrapMB($str, "\n"); - } else { - $encoded = base64_encode($str); - $maxlen -= $maxlen % 4; - $encoded = trim(chunk_split($encoded, $maxlen, "\n")); - } - } else { - $encoding = 'Q'; - $encoded = $this->EncodeQ($str, $position); - $encoded = $this->WrapText($encoded, $maxlen, true); - $encoded = str_replace('='.self::CRLF, "\n", trim($encoded)); - } - - $encoded = preg_replace('/^(.*)$/m', " =?".$this->CharSet."?$encoding?\\1?=", $encoded); - $encoded = trim(str_replace("\n", $this->LE, $encoded)); - - return $encoded; - } - - /** - * Checks if a string contains multibyte characters. - * @access public - * @param string $str multi-byte text to wrap encode - * @return bool - */ - public function HasMultiBytes($str) - { - if (function_exists('mb_strlen')) { - return (strlen($str) > mb_strlen($str, $this->CharSet)); - } else { // Assume no multibytes (we can't handle without mbstring functions anyway) - - return false; - } - } - - /** - * Correctly encodes and wraps long multibyte strings for mail headers - * without breaking lines within a character. - * Adapted from a function by paravoid at http://uk.php.net/manual/en/function.mb-encode-mimeheader.php - * @access public - * @param string $str multi-byte text to wrap encode - * @param string $lf string to use as linefeed/end-of-line - * @return string - */ - public function Base64EncodeWrapMB($str, $lf=null) - { - $start = "=?".$this->CharSet."?B?"; - $end = "?="; - $encoded = ""; - if ($lf === null) { - $lf = $this->LE; - } - - $mb_length = mb_strlen($str, $this->CharSet); - // Each line must have length <= 75, including $start and $end - $length = 75 - strlen($start) - strlen($end); - // Average multi-byte ratio - $ratio = $mb_length / strlen($str); - // Base64 has a 4:3 ratio - $offset = $avgLength = floor($length * $ratio * .75); - - for ($i = 0; $i < $mb_length; $i += $offset) { - $lookBack = 0; - - do { - $offset = $avgLength - $lookBack; - $chunk = mb_substr($str, $i, $offset, $this->CharSet); - $chunk = base64_encode($chunk); - $lookBack++; - } while (strlen($chunk) > $length); - - $encoded .= $chunk . $lf; - } - - // Chomp the last linefeed - $encoded = substr($encoded, 0, -strlen($lf)); - - return $encoded; - } - - /** - * Encode string to quoted-printable. - * Only uses standard PHP, slow, but will always work - * @access public - * @param string $input - * @param integer $line_max Number of chars allowed on a line before wrapping - * @param bool $space_conv - * @internal param string $string the text to encode - * @return string - */ - public function EncodeQPphp( $input = '', $line_max = 76, $space_conv = false) - { - $hex = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'); - $lines = preg_split('/(?:\r\n|\r|\n)/', $input); - $eol = "\r\n"; - $escape = '='; - $output = ''; - while ( list(, $line) = each($lines) ) { - $linlen = strlen($line); - $newline = ''; - for ($i = 0; $i < $linlen; $i++) { - $c = substr( $line, $i, 1 ); - $dec = ord( $c ); - if ( ( $i == 0 ) && ( $dec == 46 ) ) { // convert first point in the line into =2E - $c = '=2E'; - } - if ($dec == 32) { - if ( $i == ( $linlen - 1 ) ) { // convert space at eol only - $c = '=20'; - } elseif ($space_conv) { - $c = '=20'; - } - } elseif ( ($dec == 61) || ($dec < 32 ) || ($dec > 126) ) { // always encode "\t", which is *not* required - $h2 = (integer) floor($dec/16); - $h1 = (integer) floor($dec%16); - $c = $escape.$hex[$h2].$hex[$h1]; - } - if ( (strlen($newline) + strlen($c)) >= $line_max ) { // CRLF is not counted - $output .= $newline.$escape.$eol; // soft line break; " =\r\n" is okay - $newline = ''; - // check if newline first character will be point or not - if ($dec == 46) { - $c = '=2E'; - } - } - $newline .= $c; - } // end of for - $output .= $newline.$eol; - } // end of while - - return $output; - } - - /** - * Encode string to RFC2045 (6.7) quoted-printable format - * Uses a PHP5 stream filter to do the encoding about 64x faster than the old version - * Also results in same content as you started with after decoding - * @see EncodeQPphp() - * @access public - * @param string $string the text to encode - * @param integer $line_max Number of chars allowed on a line before wrapping - * @param boolean $space_conv Dummy param for compatibility with existing EncodeQP function - * @return string - * @author Marcus Bointon - */ - public function EncodeQP($string, $line_max = 76, $space_conv = false) - { - if (function_exists('quoted_printable_encode')) { //Use native function if it's available (>= PHP5.3) - - return quoted_printable_encode($string); - } - $filters = stream_get_filters(); - if (!in_array('convert.*', $filters)) { //Got convert stream filter? - - return $this->EncodeQPphp($string, $line_max, $space_conv); //Fall back to old implementation - } - $fp = fopen('php://temp/', 'r+'); - $string = preg_replace('/\r\n?/', $this->LE, $string); //Normalise line breaks - $params = array('line-length' => $line_max, 'line-break-chars' => $this->LE); - $s = stream_filter_append($fp, 'convert.quoted-printable-encode', STREAM_FILTER_READ, $params); - fputs($fp, $string); - rewind($fp); - $out = stream_get_contents($fp); - stream_filter_remove($s); - $out = preg_replace('/^\./m', '=2E', $out); //Encode . if it is first char on a line, workaround for bug in Exchange - fclose($fp); - - return $out; - } - - /** - * Encode string to q encoding. - * @link http://tools.ietf.org/html/rfc2047 - * @param string $str the text to encode - * @param string $position Where the text is going to be used, see the RFC for what that means - * @access public - * @return string - */ - public function EncodeQ($str, $position = 'text') - { - //There should not be any EOL in the string - $pattern=""; - $encoded = str_replace(array("\r", "\n"), '', $str); - switch (strtolower($position)) { - case 'phrase': - $pattern = '^A-Za-z0-9!*+\/ -'; - break; - - case 'comment': - $pattern = '\(\)"'; - //note that we dont break here! - //for this reason we build the $pattern withoud including delimiters and [] - - case 'text': - default: - //Replace every high ascii, control =, ? and _ characters - //We put \075 (=) as first value to make sure it's the first one in being converted, preventing double encode - $pattern = '\075\000-\011\013\014\016-\037\077\137\177-\377' . $pattern; - break; - } - - if (preg_match_all("/[{$pattern}]/", $encoded, $matches)) { - foreach (array_unique($matches[0]) as $char) { - $encoded = str_replace($char, '=' . sprintf('%02X', ord($char)), $encoded); - } - } - - //Replace every spaces to _ (more readable than =20) - return str_replace(' ', '_', $encoded); -} - - - /** - * Adds a string or binary attachment (non-filesystem) to the list. - * This method can be used to attach ascii or binary data, - * such as a BLOB record from a database. - * @param string $string String attachment data. - * @param string $filename Name of the attachment. - * @param string $encoding File encoding (see $Encoding). - * @param string $type File extension (MIME) type. - * @return void - */ - public function AddStringAttachment($string, $filename, $encoding = 'base64', $type = 'application/octet-stream') - { - // Append to $attachment array - $this->attachment[] = array( - 0 => $string, - 1 => $filename, - 2 => basename($filename), - 3 => $encoding, - 4 => $type, - 5 => true, // isStringAttachment - 6 => 'attachment', - 7 => 0 - ); - } - - /** - * Adds an embedded attachment. This can include images, sounds, and - * just about any other document. Make sure to set the $type to an - * image type. For JPEG images use "image/jpeg" and for GIF images - * use "image/gif". - * @param string $path Path to the attachment. - * @param string $cid Content ID of the attachment. Use this to identify - * the Id for accessing the image in an HTML form. - * @param string $name Overrides the attachment name. - * @param string $encoding File encoding (see $Encoding). - * @param string $type File extension (MIME) type. - * @return bool - */ - public function AddEmbeddedImage($path, $cid, $name = '', $encoding = 'base64', $type = 'application/octet-stream') - { - if ( !@is_file($path) ) { - $this->SetError($this->Lang('file_access') . $path); - - return false; - } - - $filename = basename($path); - if ($name == '') { - $name = $filename; - } - - // Append to $attachment array - $this->attachment[] = array( - 0 => $path, - 1 => $filename, - 2 => $name, - 3 => $encoding, - 4 => $type, - 5 => false, // isStringAttachment - 6 => 'inline', - 7 => $cid - ); - - return true; - } - - /** - * Adds an embedded stringified attachment. This can include images, sounds, and - * just about any other document. Make sure to set the $type to an - * image type. For JPEG images use "image/jpeg" and for GIF images - * use "image/gif". - * @param string $string The attachment. - * @param string $cid Content ID of the attachment. Use this to identify - * the Id for accessing the image in an HTML form. - * @param string $name Overrides the attachment name. - * @param string $encoding File encoding (see $Encoding). - * @param string $type File extension (MIME) type. - * @return bool - */ - public function AddStringEmbeddedImage($string, $cid, $name = '', $encoding = 'base64', $type = 'application/octet-stream') - { - // Append to $attachment array - $this->attachment[] = array( - 0 => $string, - 1 => $name, - 2 => $name, - 3 => $encoding, - 4 => $type, - 5 => true, // isStringAttachment - 6 => 'inline', - 7 => $cid - ); - } - - /** - * Returns true if an inline attachment is present. - * @access public - * @return bool - */ - public function InlineImageExists() - { - foreach ($this->attachment as $attachment) { - if ($attachment[6] == 'inline') { - return true; - } - } - - return false; - } - - /** - * Returns true if an attachment (non-inline) is present. - * @return bool - */ - public function AttachmentExists() - { - foreach ($this->attachment as $attachment) { - if ($attachment[6] == 'attachment') { - return true; - } - } - - return false; - } - - /** - * Does this message have an alternative body set? - * @return bool - */ - public function AlternativeExists() - { - return !empty($this->AltBody); - } - - ///////////////////////////////////////////////// - // CLASS METHODS, MESSAGE RESET - ///////////////////////////////////////////////// - - /** - * Clears all recipients assigned in the TO array. Returns void. - * @return void - */ - public function ClearAddresses() - { - foreach ($this->to as $to) { - unset($this->all_recipients[strtolower($to[0])]); - } - $this->to = array(); - } - - /** - * Clears all recipients assigned in the CC array. Returns void. - * @return void - */ - public function ClearCCs() - { - foreach ($this->cc as $cc) { - unset($this->all_recipients[strtolower($cc[0])]); - } - $this->cc = array(); - } - - /** - * Clears all recipients assigned in the BCC array. Returns void. - * @return void - */ - public function ClearBCCs() - { - foreach ($this->bcc as $bcc) { - unset($this->all_recipients[strtolower($bcc[0])]); - } - $this->bcc = array(); - } - - /** - * Clears all recipients assigned in the ReplyTo array. Returns void. - * @return void - */ - public function ClearReplyTos() - { - $this->ReplyTo = array(); - } - - /** - * Clears all recipients assigned in the TO, CC and BCC - * array. Returns void. - * @return void - */ - public function ClearAllRecipients() - { - $this->to = array(); - $this->cc = array(); - $this->bcc = array(); - $this->all_recipients = array(); - } - - /** - * Clears all previously set filesystem, string, and binary - * attachments. Returns void. - * @return void - */ - public function ClearAttachments() - { - $this->attachment = array(); - } - - /** - * Clears all custom headers. Returns void. - * @return void - */ - public function ClearCustomHeaders() - { - $this->CustomHeader = array(); - } - - ///////////////////////////////////////////////// - // CLASS METHODS, MISCELLANEOUS - ///////////////////////////////////////////////// - - /** - * Adds the error message to the error container. - * @access protected - * @param string $msg - * @return void - */ - protected function SetError($msg) - { - $this->error_count++; - if ($this->Mailer == 'smtp' and !is_null($this->smtp)) { - $lasterror = $this->smtp->getError(); - if (!empty($lasterror) and array_key_exists('smtp_msg', $lasterror)) { - $msg .= '

    ' . $this->Lang('smtp_error') . $lasterror['smtp_msg'] . "

    \n"; - } - } - $this->ErrorInfo = $msg; - } - - /** - * Returns the proper RFC 822 formatted date. - * @access public - * @return string - * @static - */ - public static function RFCDate() - { - $tz = date('Z'); - $tzs = ($tz < 0) ? '-' : '+'; - $tz = abs($tz); - $tz = (int) ($tz/3600)*100 + ($tz%3600)/60; - $result = sprintf("%s %s%04d", date('D, j M Y H:i:s'), $tzs, $tz); - - return $result; - } - - /** - * Returns the server hostname or 'localhost.localdomain' if unknown. - * @access protected - * @return string - */ - protected function ServerHostname() - { - if (!empty($this->Hostname)) { - $result = $this->Hostname; - } elseif (isset($_SERVER['SERVER_NAME'])) { - $result = $_SERVER['SERVER_NAME']; - } else { - $result = 'localhost.localdomain'; - } - - return $result; - } - - /** - * Returns a message in the appropriate language. - * @access protected - * @param string $key - * @return string - */ - protected function Lang($key) - { - if (count($this->language) < 1) { - $this->SetLanguage('en'); // set the default language - } - - if (isset($this->language[$key])) { - return $this->language[$key]; - } else { - return 'Language string failed to load: ' . $key; - } - } - - /** - * Returns true if an error occurred. - * @access public - * @return bool - */ - public function IsError() - { - return ($this->error_count > 0); - } - - /** - * Changes every end of line from CRLF, CR or LF to $this->LE. - * @access public - * @param string $str String to FixEOL - * @return string - */ - public function FixEOL($str) - { - // condense down to \n - $nstr = str_replace(array("\r\n", "\r"), "\n", $str); - // Now convert LE as needed - if ($this->LE !== "\n") { - $nstr = str_replace("\n", $this->LE, $nstr); - } - - return $nstr; - } - - /** - * Adds a custom header. $name value can be overloaded to contain - * both header name and value (name:value) - * @access public - * @param string $name custom header name - * @param string $value header value - * @return void - */ - public function AddCustomHeader($name, $value=null) - { - if ($value === null) { - // Value passed in as name:value - $this->CustomHeader[] = explode(':', $name, 2); - } else { - $this->CustomHeader[] = array($name, $value); - } - } - - /** - * Evaluates the message and returns modifications for inline images and backgrounds - * @access public - * @param string $message Text to be HTML modified - * @param string $basedir baseline directory for path - * @return string $message - */ - public function MsgHTML($message, $basedir = '') - { - preg_match_all("/(src|background)=[\"'](.*)[\"']/Ui", $message, $images); - if (isset($images[2])) { - foreach ($images[2] as $i => $url) { - // do not change urls for absolute images (thanks to corvuscorax) - if (!preg_match('#^[A-z]+://#', $url)) { - $filename = basename($url); - $directory = dirname($url); - if ($directory == '.') { - $directory = ''; - } - $cid = 'cid:' . md5($url); - $ext = pathinfo($filename, PATHINFO_EXTENSION); - $mimeType = self::_mime_types($ext); - if ( strlen($basedir) > 1 && substr($basedir, -1) != '/') { $basedir .= '/'; } - if ( strlen($directory) > 1 && substr($directory, -1) != '/') { $directory .= '/'; } - if ( $this->AddEmbeddedImage($basedir.$directory.$filename, md5($url), $filename, 'base64', $mimeType) ) { - $message = preg_replace("/".$images[1][$i]."=[\"']".preg_quote($url, '/')."[\"']/Ui", $images[1][$i]."=\"".$cid."\"", $message); - } - } - } - } - $this->IsHTML(true); - $this->Body = $message; - if (empty($this->AltBody)) { - $textMsg = trim(strip_tags(preg_replace('/<(head|title|style|script)[^>]*>.*?<\/\\1>/s', '', $message))); - if (!empty($textMsg)) { - $this->AltBody = html_entity_decode($textMsg, ENT_QUOTES, $this->CharSet); - } - } - if (empty($this->AltBody)) { - $this->AltBody = 'To view this email message, open it in a program that understands HTML!' . "\n\n"; - } - - return $message; - } - - /** - * Gets the MIME type of the embedded or inline image - * @param string $ext File extension - * @access public - * @return string MIME type of ext - * @static - */ - public static function _mime_types($ext = '') - { - $mimes = array( - 'xl' => 'application/excel', - 'hqx' => 'application/mac-binhex40', - 'cpt' => 'application/mac-compactpro', - 'bin' => 'application/macbinary', - 'doc' => 'application/msword', - 'word' => 'application/msword', - 'class' => 'application/octet-stream', - 'dll' => 'application/octet-stream', - 'dms' => 'application/octet-stream', - 'exe' => 'application/octet-stream', - 'lha' => 'application/octet-stream', - 'lzh' => 'application/octet-stream', - 'psd' => 'application/octet-stream', - 'sea' => 'application/octet-stream', - 'so' => 'application/octet-stream', - 'oda' => 'application/oda', - 'pdf' => 'application/pdf', - 'ai' => 'application/postscript', - 'eps' => 'application/postscript', - 'ps' => 'application/postscript', - 'smi' => 'application/smil', - 'smil' => 'application/smil', - 'mif' => 'application/vnd.mif', - 'xls' => 'application/vnd.ms-excel', - 'ppt' => 'application/vnd.ms-powerpoint', - 'wbxml' => 'application/vnd.wap.wbxml', - 'wmlc' => 'application/vnd.wap.wmlc', - 'dcr' => 'application/x-director', - 'dir' => 'application/x-director', - 'dxr' => 'application/x-director', - 'dvi' => 'application/x-dvi', - 'gtar' => 'application/x-gtar', - 'php3' => 'application/x-httpd-php', - 'php4' => 'application/x-httpd-php', - 'php' => 'application/x-httpd-php', - 'phtml' => 'application/x-httpd-php', - 'phps' => 'application/x-httpd-php-source', - 'js' => 'application/x-javascript', - 'swf' => 'application/x-shockwave-flash', - 'sit' => 'application/x-stuffit', - 'tar' => 'application/x-tar', - 'tgz' => 'application/x-tar', - 'xht' => 'application/xhtml+xml', - 'xhtml' => 'application/xhtml+xml', - 'zip' => 'application/zip', - 'mid' => 'audio/midi', - 'midi' => 'audio/midi', - 'mp2' => 'audio/mpeg', - 'mp3' => 'audio/mpeg', - 'mpga' => 'audio/mpeg', - 'aif' => 'audio/x-aiff', - 'aifc' => 'audio/x-aiff', - 'aiff' => 'audio/x-aiff', - 'ram' => 'audio/x-pn-realaudio', - 'rm' => 'audio/x-pn-realaudio', - 'rpm' => 'audio/x-pn-realaudio-plugin', - 'ra' => 'audio/x-realaudio', - 'wav' => 'audio/x-wav', - 'bmp' => 'image/bmp', - 'gif' => 'image/gif', - 'jpeg' => 'image/jpeg', - 'jpe' => 'image/jpeg', - 'jpg' => 'image/jpeg', - 'png' => 'image/png', - 'tiff' => 'image/tiff', - 'tif' => 'image/tiff', - 'eml' => 'message/rfc822', - 'css' => 'text/css', - 'html' => 'text/html', - 'htm' => 'text/html', - 'shtml' => 'text/html', - 'log' => 'text/plain', - 'text' => 'text/plain', - 'txt' => 'text/plain', - 'rtx' => 'text/richtext', - 'rtf' => 'text/rtf', - 'xml' => 'text/xml', - 'xsl' => 'text/xml', - 'mpeg' => 'video/mpeg', - 'mpe' => 'video/mpeg', - 'mpg' => 'video/mpeg', - 'mov' => 'video/quicktime', - 'qt' => 'video/quicktime', - 'rv' => 'video/vnd.rn-realvideo', - 'avi' => 'video/x-msvideo', - 'movie' => 'video/x-sgi-movie' - ); - - return (!isset($mimes[strtolower($ext)])) ? 'application/octet-stream' : $mimes[strtolower($ext)]; - } - - /** - * Set (or reset) Class Objects (variables) - * - * Usage Example: - * $page->set('X-Priority', '3'); - * - * @access public - * @param string $name Parameter Name - * @param mixed $value Parameter Value - * NOTE: will not work with arrays, there are no arrays to set/reset - * @throws phpmailerException - * @return bool - * @todo Should this not be using __set() magic function? - */ - public function set($name, $value = '') - { - try { - if (isset($this->$name) ) { - $this->$name = $value; - } else { - throw new phpmailerException($this->Lang('variable_set') . $name, self::STOP_CRITICAL); - } - } catch (Exception $e) { - $this->SetError($e->getMessage()); - if ($e->getCode() == self::STOP_CRITICAL) { - return false; - } - } - - return true; - } - - /** - * Strips newlines to prevent header injection. - * @access public - * @param string $str String - * @return string - */ - public function SecureHeader($str) - { - return trim(str_replace(array("\r", "\n"), '', $str)); - } - - /** - * Set the private key file and password to sign the message. - * - * @access public - * @param $cert_filename - * @param string $key_filename Parameter File Name - * @param string $key_pass Password for private key - */ - public function Sign($cert_filename, $key_filename, $key_pass) - { - $this->sign_cert_file = $cert_filename; - $this->sign_key_file = $key_filename; - $this->sign_key_pass = $key_pass; - } - - /** - * Set the private key file and password to sign the message. - * - * @access public - * @param string $txt - * @return string - */ - public function DKIM_QP($txt) - { - $line = ''; - for ($i = 0; $i < strlen($txt); $i++) { - $ord = ord($txt[$i]); - if ( ((0x21 <= $ord) && ($ord <= 0x3A)) || $ord == 0x3C || ((0x3E <= $ord) && ($ord <= 0x7E)) ) { - $line .= $txt[$i]; - } else { - $line .= "=".sprintf("%02X", $ord); - } - } - - return $line; - } - - /** - * Generate DKIM signature - * - * @access public - * @param string $s Header - * @return string - */ - public function DKIM_Sign($s) - { - $privKeyStr = file_get_contents($this->DKIM_private); - if ($this->DKIM_passphrase != '') { - $privKey = openssl_pkey_get_private($privKeyStr, $this->DKIM_passphrase); - } else { - $privKey = $privKeyStr; - } - if (openssl_sign($s, $signature, $privKey)) { - return base64_encode($signature); - } - - return ''; - } - - /** - * Generate DKIM Canonicalization Header - * - * @access public - * @param string $s Header - * @return string - */ - public function DKIM_HeaderC($s) - { - $s = preg_replace("/\r\n\s+/", " ", $s); - $lines = explode("\r\n", $s); - foreach ($lines as $key => $line) { - list($heading, $value) = explode(":", $line, 2); - $heading = strtolower($heading); - $value = preg_replace("/\s+/", " ", $value) ; // Compress useless spaces - $lines[$key] = $heading.":".trim($value) ; // Don't forget to remove WSP around the value - } - $s = implode("\r\n", $lines); - - return $s; - } - - /** - * Generate DKIM Canonicalization Body - * - * @access public - * @param string $body Message Body - * @return string - */ - public function DKIM_BodyC($body) - { - if ($body == '') return "\r\n"; - // stabilize line endings - $body = str_replace("\r\n", "\n", $body); - $body = str_replace("\n", "\r\n", $body); - // END stabilize line endings - while (substr($body, strlen($body) - 4, 4) == "\r\n\r\n") { - $body = substr($body, 0, strlen($body) - 2); - } - - return $body; - } - - /** - * Create the DKIM header, body, as new header - * - * @access public - * @param string $headers_line Header lines - * @param string $subject Subject - * @param string $body Body - * @return string - */ - public function DKIM_Add($headers_line, $subject, $body) - { - $DKIMsignatureType = 'rsa-sha1'; // Signature & hash algorithms - $DKIMcanonicalization = 'relaxed/simple'; // Canonicalization of header/body - $DKIMquery = 'dns/txt'; // Query method - $DKIMtime = time() ; // Signature Timestamp = seconds since 00:00:00 - Jan 1, 1970 (UTC time zone) - $subject_header = "Subject: $subject"; - $headers = explode($this->LE, $headers_line); - $from_header = ""; - $to_header = ""; - foreach ($headers as $header) { - if (strpos($header, 'From:') === 0) { - $from_header = $header; - } elseif (strpos($header, 'To:') === 0) { - $to_header = $header; - } - } - $from = str_replace('|', '=7C', $this->DKIM_QP($from_header)); - $to = str_replace('|', '=7C', $this->DKIM_QP($to_header)); - $subject = str_replace('|', '=7C', $this->DKIM_QP($subject_header)) ; // Copied header fields (dkim-quoted-printable - $body = $this->DKIM_BodyC($body); - $DKIMlen = strlen($body) ; // Length of body - $DKIMb64 = base64_encode(pack("H*", sha1($body))) ; // Base64 of packed binary SHA-1 hash of body - $ident = ($this->DKIM_identity == '')? '' : " i=" . $this->DKIM_identity . ";"; - $dkimhdrs = "DKIM-Signature: v=1; a=" . $DKIMsignatureType . "; q=" . $DKIMquery . "; l=" . $DKIMlen . "; s=" . $this->DKIM_selector . ";\r\n". - "\tt=" . $DKIMtime . "; c=" . $DKIMcanonicalization . ";\r\n". - "\th=From:To:Subject;\r\n". - "\td=" . $this->DKIM_domain . ";" . $ident . "\r\n". - "\tz=$from\r\n". - "\t|$to\r\n". - "\t|$subject;\r\n". - "\tbh=" . $DKIMb64 . ";\r\n". - "\tb="; - $toSign = $this->DKIM_HeaderC($from_header . "\r\n" . $to_header . "\r\n" . $subject_header . "\r\n" . $dkimhdrs); - $signed = $this->DKIM_Sign($toSign); - - return "X-PHPMAILER-DKIM: code.google.com/a/apache-extras.org/p/phpmailer/\r\n".$dkimhdrs.$signed."\r\n"; - } - - /** - * Perform callback - * @param boolean $isSent - * @param string $to - * @param string $cc - * @param string $bcc - * @param string $subject - * @param string $body - * @param string $from - */ - protected function doCallback($isSent, $to, $cc, $bcc, $subject, $body, $from=null) - { - if (!empty($this->action_function) && is_callable($this->action_function)) { - $params = array($isSent, $to, $cc, $bcc, $subject, $body, $from); - call_user_func_array($this->action_function, $params); - } - } -} - -/** - * Exception handler for PHPMailer - * @package PHPMailer - */ -class phpmailerException extends Exception -{ - /** - * Prettify error message output - * @return string - */ - public function errorMessage() - { - $errorMsg = '' . $this->getMessage() . "
    \n"; - - return $errorMsg; - } -} diff --git a/plugins/.htaccess b/plugins/.htaccess deleted file mode 100644 index 14249c5..0000000 --- a/plugins/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all \ No newline at end of file diff --git a/plugins/blog/README.md b/plugins/blog/README.md deleted file mode 100644 index 9cc1fbf..0000000 --- a/plugins/blog/README.md +++ /dev/null @@ -1,40 +0,0 @@ -Blog -================ - -### Usage - -#### Get Post - - -#### Get Posts - - -#### Get 5 Posts (could be any amount, 5 or 1 or 25): - - -#### Get related Posts - - -#### Get 4 latest posts from Blog - - -#### Get Tags&Keywords - - -#### Get Tags&Keywords for current page - - -Get Post Title - - -### Shortcode for content - -#### Divided post into 2 parts (short and full) - {cut} - -Example: - -

    Best free themes for Monstra CMS at monstrathemes.com

    - {cut} -

    There is going to display your content as blog post =)

    - \ No newline at end of file diff --git a/plugins/blog/blog.plugin.php b/plugins/blog/blog.plugin.php deleted file mode 100644 index 6d06f28..0000000 --- a/plugins/blog/blog.plugin.php +++ /dev/null @@ -1,399 +0,0 @@ - - * echo Blog::getTags(); - *
    - * - * @return string - */ - public static function getTags($slug = null) { - - // Display view - return View::factory('blog/views/frontend/tags') - ->assign('tags', Blog::getTagsArray($slug)) - ->render(); - - } - - - /** - * Get breadcrumbs - * - * - * echo Blog::breadcrumbs(); - * - * - * @return string - */ - public static function breadcrumbs() { - $current_page = Pages::$requested_page; - $parent_page = ''; - if ($current_page !== 'error404') { - $page = Pages::$pages->select('[slug="'.$current_page.'"]', null); - if (trim($page['parent']) !== '') { - $parent = true; - $parent_page = Pages::$pages->select('[slug="'.$page['parent'].'"]', null); - } else { - $parent = false; - } - - // Display view - View::factory('blog/views/frontend/breadcrumbs') - ->assign('current_page', $current_page) - ->assign('page', $page) - ->assign('parent', $parent) - ->assign('parent_page', $parent_page) - ->display(); - } - } - - - /** - * Get tags array - * - * - * echo Blog::getTagsArray(); - * - * - * @return array - */ - public static function getTagsArray($slug = null) { - - // Init vars - $tags = array(); - $tags_string = ''; - - if ($slug == null) { - $posts = Pages::$pages->select('[parent="'.Blog::$parent_page_name.'" and status="published"]', 'all'); - } else { - $posts = Pages::$pages->select('[parent="'.Blog::$parent_page_name.'" and status="published" and slug="'.$slug.'"]', 'all'); - } - - foreach($posts as $post) { - if (isset($post['tags'])) { - $tags_string .= $post['tags'].','; - } - } - - $tags_string = substr($tags_string, 0, strlen($tags_string)-1); - - // Explode tags in tags array - $tags = explode(',', $tags_string); - - // Remove empty array elementss - foreach ($tags as $key => $value) { - if ($tags[$key] == '') { - unset($tags[$key]); - } - } - - // Trim tags - array_walk($tags, create_function('&$val', '$val = trim($val);')); - - // Get unique tags - $tags = array_unique($tags); - - // Return tags - return $tags; - } - - - /** - * Get posts - * - * - * // Get all posts - * echo Blog::getPosts(); - * - * // Get last 5 posts - * echo Blog::getPosts(5); - * - * - * @param integer $num Number of posts to show - * @return string - */ - public static function getPosts($nums = 10) { - - // Get page param - $page = (Request::get('page')) ? (int)Request::get('page') : 1; - - if (Request::get('tag')) { - $query = '[parent="'.Blog::$parent_page_name.'" and status="published" and contains(tags, "'.Request::get('tag').'")]'; - Notification::set('tag', Request::get('tag')); - } else { - $query = '[parent="'.Blog::$parent_page_name.'" and status="published"]'; - Notification::clean(); - } - - // Get Elements Count - $elements = count(Pages::$pages->select($query, 'all')); - - // Get Pages Count - $pages = ceil($elements/$nums); - - - if ($page < 1) { - $page = 1; - } elseif ($page > $pages) { - $page = $pages; - } - - $start = ($page-1)*$nums; - - // If there is no posts - if ($start < 0) $start = 0; - - // Get posts and sort by DESC - $posts = Pages::$pages->select($query, $nums, $start, array('slug', 'title', 'author', 'date'), 'date', 'DESC'); - - // Loop - foreach($posts as $key => $post) { - $post_short = explode("{cut}", Text::toHtml(File::getContent(STORAGE . DS . 'pages' . DS . $post['id'] . '.page.txt'))); - $posts[$key]['content'] = Filter::apply('content', $post_short[0]); - } - - // Display view - return View::factory('blog/views/frontend/index') - ->assign('posts', $posts) - ->render(). - View::factory('blog/views/frontend/pager') - ->assign('pages', $pages) - ->assign('page', $page) - ->render(); - } - - - /** - * Get posts block - * - * - * // Get all posts - * echo Blog::getPostsBlock(); - * - * // Get last 5 posts - * echo Blog::getPostsBlock(5); - * - * - * @param integer $num Number of posts to show - * @return string - */ - public static function getPostsBlock($nums = 10) { - - // XPath Query - $query = '[parent="'.Blog::$parent_page_name.'" and status="published"]'; - - // Get posts and sort by DESC - $posts = Pages::$pages->select($query, $nums, 0, array('slug', 'title', 'author', 'date'), 'date', 'DESC'); - - // Loop - foreach($posts as $key => $post) { - $post_short = explode("{cut}", Text::toHtml(File::getContent(STORAGE . DS . 'pages' . DS . $post['id'] . '.page.txt'))); - $posts[$key]['content'] = Filter::apply('content', $post_short[0]); - } - - // Display view - return View::factory('blog/views/frontend/block') - ->assign('posts', $posts) - ->render(); - - } - - - /** - * Get related posts - * - * - * echo Blog::getRelatedPosts(); - * - * - * @return string - */ - public static function getRelatedPosts($limit = null) { - - $related_posts = array(); - $tags = Blog::getTagsArray(Page::slug()); - - foreach($tags as $tag) { - - $query = '[parent="'.Blog::$parent_page_name.'" and status="published" and contains(tags, "'.$tag.'") and slug!="'.Page::slug().'"]'; - - if ($result = Arr::subvalSort(Pages::$pages->select($query, ($limit == null) ? 'all' : (int)$limit), 'date', 'DESC')) { - $related_posts = $result; - } - } - - // Display view - return View::factory('blog/views/frontend/related_posts') - ->assign('related_posts', $related_posts) - ->render(); - - } - - - /** - * Get post content - * - * - * echo Blog::getPost(); - * - * - * @return string - */ - public static function getPost() { - - // Get post - $post = Text::toHtml(File::getContent(STORAGE . DS . 'pages' . DS . Pages::$page['id'] . '.page.txt')); - - // Apply content filter - $post = Filter::apply('content', $post); - - // Remove {cut} shortcode - $post = strtr($post, array('{cut}' => '')); - - // Return post - return $post; - } - - - /** - * Get post content before cut - * - * - * echo Blog::getPostBeforeCut('home'); - * - * - * @return string - */ - public static function getPostBeforeCut($slug) { - - $page = Pages::$pages->select('[slug="'.$slug.'"]', null); - - // Get post - $post = explode("{cut}", Text::toHtml(File::getContent(STORAGE . DS . 'pages' . DS . $page['id'] . '.page.txt'))); - - // Apply content filter - $post_content = Filter::apply('content', $post[0]); - - // Return post - return $post_content; - } - - - /** - * Get post content after cut - * - * - * echo Blog::getPostAfterCut('home'); - * - * - * @return string - */ - public static function getPostAfterCut($slug) { - - $page = Pages::$pages->select('[slug="'.$slug.'"]', null); - - // Get post - $post = explode("{cut}", Text::toHtml(File::getContent(STORAGE . DS . 'pages' . DS . $page['id'] . '.page.txt'))); - - // Apply content filter - $post_content = Filter::apply('content', $post[1]); - - // Return post - return $post_content; - } - - - /** - * Get Blog Post title - * - * - * echo Blog::getPostTitle(); - * - * - * @return string - */ - public static function getPostTitle() { - return Page::title(); - } - - - /** - * Get Blog Post Date - * - * - * echo Blog::getPostDate(); - * - * - * @param string $format Date format - * @return string - */ - public static function getPostDate($format = 'Y-m-d') { - return Page::date($format); - } - - - /** - * Get author of current post - * - * - * echo Blog::getPostAuthor(); - * - * - * @return string - */ - public static function getPostAuthor() - { - return Page::author(); - } - - /** - * _rss - */ - public static function _rss() { - if (Uri::segment(0) == 'rss') { - include PLUGINS . DS . 'blog' . DS . 'rss.php'; - Request::shutdown(); - } - } - -} - diff --git a/plugins/blog/install/blog.manifest.xml b/plugins/blog/install/blog.manifest.xml deleted file mode 100644 index 6724013..0000000 --- a/plugins/blog/install/blog.manifest.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - plugins/blog/blog.plugin.php - active - 15 - Blog - Blog plugin for Monstra - 1.7.3 - Awilum - http://monstra.org/ - \ No newline at end of file diff --git a/plugins/blog/languages/en.lang.php b/plugins/blog/languages/en.lang.php deleted file mode 100644 index 3db9241..0000000 --- a/plugins/blog/languages/en.lang.php +++ /dev/null @@ -1,12 +0,0 @@ - array( - 'Blog' => 'Blog', - 'Blog plugin for Monstra' => 'Blog plugin for Monstra', - 'begin' => 'begin', - 'end' => 'end', - 'prev' => 'prev', - 'next' => 'next', - ) - ); \ No newline at end of file diff --git a/plugins/blog/languages/es.lang.php b/plugins/blog/languages/es.lang.php deleted file mode 100644 index 3d6fecd..0000000 --- a/plugins/blog/languages/es.lang.php +++ /dev/null @@ -1,12 +0,0 @@ - array( - 'Blog' => 'Blog', - 'Blog plugin for Monstra' => 'Blog plugin for Monstra', - 'begin' => 'comienzo', - 'end' => 'final', - 'prev' => 'anterior', - 'next' => 'siguiente', - ) - ); diff --git a/plugins/blog/languages/pl.lang.php b/plugins/blog/languages/pl.lang.php deleted file mode 100644 index 1ee111e..0000000 --- a/plugins/blog/languages/pl.lang.php +++ /dev/null @@ -1,12 +0,0 @@ - array( - 'Blog' => 'Blog', - 'Blog plugin for Monstra' => 'Wtyczka Blog dla systemu Monstra', - 'begin' => 'poczÄ…tek', - 'end' => 'koniec', - 'prev' => 'poprzedni', - 'next' => 'nastÄ™pny', - ) - ); \ No newline at end of file diff --git a/plugins/blog/languages/ru.lang.php b/plugins/blog/languages/ru.lang.php deleted file mode 100644 index 817146a..0000000 --- a/plugins/blog/languages/ru.lang.php +++ /dev/null @@ -1,13 +0,0 @@ - array( - 'Blog' => 'Блог', - 'Blog plugin for Monstra' => 'Плагин блога Ð´Ð»Ñ Monstra', - 'begin' => 'начало', - 'end' => 'конец', - 'prev' => 'назад', - 'next' => 'вперед', - 'Related posts' => 'Статьи по теме', - ) - ); \ No newline at end of file diff --git a/plugins/blog/languages/sr.lang.php b/plugins/blog/languages/sr.lang.php deleted file mode 100644 index 2f5e981..0000000 --- a/plugins/blog/languages/sr.lang.php +++ /dev/null @@ -1,11 +0,0 @@ - array( - 'Blog' => 'Blog', - 'Blog plugin for Monstra' => 'Blog, dodatak za Monstra', - 'begin' => 'poÄetak', - 'end' => 'kraj', - 'prev' => 'predhodna', - 'next' => 'sledeća', - ) - ); diff --git a/plugins/blog/languages/tr.lang.php b/plugins/blog/languages/tr.lang.php deleted file mode 100644 index 6106485..0000000 --- a/plugins/blog/languages/tr.lang.php +++ /dev/null @@ -1,12 +0,0 @@ - array( - 'Blog' => 'Günce', - 'Blog plugin for Monstra' => 'Monstra için günce eklentisi', - 'begin' => 'BaÅŸ', - 'end' => 'Son', - 'prev' => 'Önceki', - 'next' => 'Sonraki', - ) - ); diff --git a/plugins/blog/languages/uk.lang.php b/plugins/blog/languages/uk.lang.php deleted file mode 100644 index a398887..0000000 --- a/plugins/blog/languages/uk.lang.php +++ /dev/null @@ -1,13 +0,0 @@ - array( - 'Blog' => 'Блог', - 'Blog plugin for Monstra' => 'Плагін блога Ð´Ð»Ñ Monstra', - 'begin' => 'початок', - 'end' => 'кінець', - 'prev' => 'назад', - 'next' => 'вперед', - 'Related posts' => 'Статті по темі', - ) - ); \ No newline at end of file diff --git a/plugins/blog/rss.php b/plugins/blog/rss.php deleted file mode 100644 index 54ebb47..0000000 --- a/plugins/blog/rss.php +++ /dev/null @@ -1,34 +0,0 @@ -select('[parent="'.Blog::$parent_page_name.'" and status="published"]', 5, 0, array('slug', 'title', 'author', 'date'), 'date', 'DESC'); - -// Date now -$now = date("D, d M Y H:i:s T"); -ob_end_clean(); -?> - -'."\n"; ?> - - -MonstraCMS::BLOG::RSS -/blog -The latest updates for . -en-us - - - -Monstra - - -<?php echo $post['title']; ?> - - - -]]> - - - - - - \ No newline at end of file diff --git a/plugins/blog/views/frontend/block.view.php b/plugins/blog/views/frontend/block.view.php deleted file mode 100644 index 309c9ea..0000000 --- a/plugins/blog/views/frontend/block.view.php +++ /dev/null @@ -1,7 +0,0 @@ - -

    - -
    - -
    - \ No newline at end of file diff --git a/plugins/blog/views/frontend/breadcrumbs.view.php b/plugins/blog/views/frontend/breadcrumbs.view.php deleted file mode 100644 index 231a682..0000000 --- a/plugins/blog/views/frontend/breadcrumbs.view.php +++ /dev/null @@ -1,5 +0,0 @@ - - ?tag=">   - - ?tag="> - \ No newline at end of file diff --git a/plugins/blog/views/frontend/index.view.php b/plugins/blog/views/frontend/index.view.php deleted file mode 100644 index c9cec0a..0000000 --- a/plugins/blog/views/frontend/index.view.php +++ /dev/null @@ -1,7 +0,0 @@ - -

    - / -
    - -
    - \ No newline at end of file diff --git a/plugins/blog/views/frontend/pager.view.php b/plugins/blog/views/frontend/pager.view.php deleted file mode 100644 index d61f4cb..0000000 --- a/plugins/blog/views/frontend/pager.view.php +++ /dev/null @@ -1,29 +0,0 @@ -

    - $pages) $right_neighbour = $pages; - - if ($page > 1) { - echo ' '.__('begin', 'blog').' ... '.__('prev', 'blog').' '; - } - - for ($i=$left_neighbour; $i<=$right_neighbour; $i++) { - if ($i != $page) { - echo ' ' . $i . ' '; - } else { - echo ' ' . $i . ' '; - } - } - - if ($page < $pages) { - echo ' '.__('next', 'blog').' ... '.__('end', 'blog').' '; - } - -?> diff --git a/plugins/blog/views/frontend/related_posts.view.php b/plugins/blog/views/frontend/related_posts.view.php deleted file mode 100644 index 37066d9..0000000 --- a/plugins/blog/views/frontend/related_posts.view.php +++ /dev/null @@ -1,7 +0,0 @@ -

    -: -
    - -
    - -
    \ No newline at end of file diff --git a/plugins/blog/views/frontend/tags.view.php b/plugins/blog/views/frontend/tags.view.php deleted file mode 100644 index 16b9ed9..0000000 --- a/plugins/blog/views/frontend/tags.view.php +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/plugins/box/backup/backup.admin.php b/plugins/box/backup/backup.admin.php deleted file mode 100755 index de13814..0000000 --- a/plugins/box/backup/backup.admin.php +++ /dev/null @@ -1,104 +0,0 @@ -readDir(STORAGE . DS, false); - - // Add public folder - $zip->readDir(ROOT . DS . 'public' . DS, false); - - // Add plugins folder - $zip->readDir(PLUGINS . DS, false, null, array(PLUGINS . DS . 'box')); - - if ($zip->archive($backups_path . DS . Date::format(time(), "Y-m-d-H-i-s").'.zip')) { - Notification::set('success', __('Backup was created', 'backup')); - } else { - Notification::set('error', __('Backup was not created', 'backup')); - } - - Request::redirect(Option::get('siteurl').'/admin/index.php?id=backup'); - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - } - - // Delete backup - // ------------------------------------- - if (Request::get('id') == 'backup' && Request::get('delete_file')) { - - if (Security::check(Request::get('token'))) { - - if (File::delete($backups_path . DS . Request::get('delete_file'))) { - Notification::set('success', __('Backup was deleted', 'backup')); - } else { - Notification::set('error', __('Backup was not deleted', 'backup')); - } - - Request::redirect(Option::get('siteurl').'/admin/index.php?id=backup'); - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - } - - // Download backup - // ------------------------------------- - if (Request::get('download')) { - if (Security::check(Request::get('token'))) { - File::download($backups_path . DS . Request::get('download')); - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - } - - // Restore backup - // ------------------------------------- - if (Request::get('restore')) { - - if (Security::check(Request::get('token'))) { - - $tmp_dir = ROOT . DS . 'tmp' . DS . uniqid('backup_'); - - if (Dir::create($tmp_dir)) { - $file_locations = Zip::factory()->extract($backups_path . DS . Request::get('restore'), $tmp_dir); - if (!empty($file_locations)) { - Dir::copy($tmp_dir, ROOT . DS); - Notification::set('success', __('Backup was restored', 'backup')); - } else { - Notification::set('error', __('Unzip error', 'backup')); - } - } else { - Notification::set('error', __('Backup was not restored', 'backup')); - } - - Request::redirect(Option::get('siteurl').'/admin/index.php?id=backup'); - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - } - - // Display view - View::factory('box/backup/views/backend/index') - ->assign('backups_list', File::scan($backups_path, '.zip')) - ->display(); - } -} diff --git a/plugins/box/backup/backup.plugin.php b/plugins/box/backup/backup.plugin.php deleted file mode 100644 index 5b7cbb0..0000000 --- a/plugins/box/backup/backup.plugin.php +++ /dev/null @@ -1,29 +0,0 @@ - - - plugins/box/backup/backup.plugin.php - active - 8 - Backup - Backup plugin - 1.0.0 - Awilum - http://monstra.org/ - diff --git a/plugins/box/backup/languages/cs.lang.php b/plugins/box/backup/languages/cs.lang.php deleted file mode 100644 index 242f5a5..0000000 --- a/plugins/box/backup/languages/cs.lang.php +++ /dev/null @@ -1,17 +0,0 @@ - array( - 'Backups' => 'Zálohy', - 'Backup' => 'Zálohy', - 'Create Backup' => 'VytvoÅ™it zálohu', - 'Delete' => 'Vymazat', - 'storage' => 'Storage/Obsah diskového místa', - 'public' => 'VeÅ™ejné', - 'plugins' => 'Pluginy', - 'Size' => 'Velikost', - 'Actions' => 'Akce', - 'Delete backup: :backup' => 'Vymazat zálohu: :backup', - 'Creating...' => 'Vytvářím...', - ) - ); diff --git a/plugins/box/backup/languages/de.lang.php b/plugins/box/backup/languages/de.lang.php deleted file mode 100644 index a2c2368..0000000 --- a/plugins/box/backup/languages/de.lang.php +++ /dev/null @@ -1,17 +0,0 @@ - array( - 'Backups' => 'Backups', - 'Backup' => 'Backup', - 'Create Backup' => 'Erstelle Backup', - 'Delete' => 'Löschen', - 'storage' => 'Speicher', - 'public' => 'Öffentliche', - 'plugins' => 'Plugins', - 'Size' => 'Größe', - 'Actions' => 'Aktionen', - 'Delete backup: :backup' => 'Lösche Backup: :backup', - 'Creating...' => 'Erstellen...', - ) - ); diff --git a/plugins/box/backup/languages/en.lang.php b/plugins/box/backup/languages/en.lang.php deleted file mode 100644 index 840c388..0000000 --- a/plugins/box/backup/languages/en.lang.php +++ /dev/null @@ -1,26 +0,0 @@ - array( - 'Backups' => 'Backups', - 'Backup' => 'Backup', - 'Backup Date' => 'Backup Date', - 'Create Backup' => 'Create Backup', - 'Restore' => 'Restore', - 'Delete' => 'Delete', - 'storage' => 'storage', - 'public' => 'public', - 'plugins' => 'plugins', - 'Size' => 'Size', - 'Actions' => 'Actions', - 'Delete backup: :backup' => 'Delete backup: :backup', - 'Creating...' => 'Creating...', - 'Backup was created' => 'Backup was created', - 'Backup was not created' => 'Backup was not created', - 'Backup was deleted' => 'Backup was deleted', - 'Backup was not deleted' => 'Backup was not deleted', - 'Backup was restored' => 'Backup was restored', - 'Unzip error' => 'Unzip error', - 'Backup was not restored' => 'Backup was not restored', - ) - ); diff --git a/plugins/box/backup/languages/es.lang.php b/plugins/box/backup/languages/es.lang.php deleted file mode 100644 index 29286a2..0000000 --- a/plugins/box/backup/languages/es.lang.php +++ /dev/null @@ -1,26 +0,0 @@ - array( - 'Backups' => 'Backups', - 'Backup' => 'Backup', - 'Backup Date' => 'Fecha del backup', - 'Create Backup' => 'Crear backup', - 'Restore' => 'Restaurar', - 'Delete' => 'Eliminar', - 'storage' => 'Almacenamiento', - 'public' => 'público', - 'plugins' => 'plugins', - 'Size' => 'Tamaño', - 'Actions' => 'Acciones', - 'Delete backup: :backup' => 'Eliminar backup: :backup', - 'Creating...' => 'Creando...', - 'Backup was created' => 'El backup fue creado', - 'Backup was not created' => 'El backup no fue creado', - 'Backup was deleted' => 'El backup fue eliminado', - 'Backup was not deleted' => 'El backup no fue eliminado', - 'Backup was restored' => 'El backup fue restaurado', - 'Unzip error' => 'Error de descompresión', - 'Backup was not restored' => 'El backup no fue restaurado', - ) - ); diff --git a/plugins/box/backup/languages/fa.lang.php b/plugins/box/backup/languages/fa.lang.php deleted file mode 100644 index ce765b6..0000000 --- a/plugins/box/backup/languages/fa.lang.php +++ /dev/null @@ -1,17 +0,0 @@ - array( - 'Backups' => 'پشتیبان گیری', - 'Backup Date' => 'تاریخ پشتیبان گیری', - 'Create Backup' => 'ایجاد نسخه پشتیبان', - 'Delete' => 'حذÙ', - 'storage' => 'ذخیره سازی', - 'public' => 'عمومی', - 'plugins' => 'پلاگین', - 'Size' => 'اندازه', - 'Actions' => 'عملیات', - 'Delete backup: :backup' => 'حذ٠نسخه پشتیبان: :backup', - 'Creating...' => 'ایجاد...', - ) - ); \ No newline at end of file diff --git a/plugins/box/backup/languages/fr.lang.php b/plugins/box/backup/languages/fr.lang.php deleted file mode 100644 index b647d87..0000000 --- a/plugins/box/backup/languages/fr.lang.php +++ /dev/null @@ -1,17 +0,0 @@ - array( - 'Backups' => 'Sauvegardes', - 'Backup date' => 'Date de la sauvegarde', - 'Create backup' => 'Créer une sauvegarde', - 'Delete' => 'Supprimer', - 'storage' => 'stockage', - 'public' => 'public', - 'plugins' => 'plugins', - 'Size' => 'Taille', - 'Actions' => 'Actions', - 'Delete backup: :backup' => 'Supprimer la sauvegarde: :backup', - 'Creating...' => 'Création...', - ) - ); \ No newline at end of file diff --git a/plugins/box/backup/languages/hu.lang.php b/plugins/box/backup/languages/hu.lang.php deleted file mode 100644 index 91fae77..0000000 --- a/plugins/box/backup/languages/hu.lang.php +++ /dev/null @@ -1,17 +0,0 @@ - array( - 'Backups' => 'Biztonsági mentések', - 'Backup date' => 'Biztonsági mentés dátuma', - 'Create Backup' => 'Biztonsági mentés készítése', - 'Delete' => 'Töröl', - 'storage' => 'tárol', - 'public' => 'nyilvános', - 'plugins' => 'pluginok', - 'Size' => 'Méret', - 'Actions' => 'Műveletek', - 'Delete backup: :backup' => 'Biztonsági mentés törlése: :backup', - 'Creating...' => 'Készítés...', - ) - ); \ No newline at end of file diff --git a/plugins/box/backup/languages/id.lang.php b/plugins/box/backup/languages/id.lang.php deleted file mode 100644 index e06a894..0000000 --- a/plugins/box/backup/languages/id.lang.php +++ /dev/null @@ -1,17 +0,0 @@ - array( - 'Backups' => 'Cadangan', - 'Backup date' => 'Tanggal Cadangan', - 'Create Backup' => 'Buat Cadangan', - 'Delete' => 'Hapus', - 'storage' => 'Penyimpanan', - 'public' => 'Umum', - 'plugins' => 'Plugins', - 'Size' => 'Ukuran', - 'Actions' => 'Tindakan', - 'Delete backup: :backup' => 'Hapus Cadangan: :backup', - 'Creating...' => 'Dibuat...', - ) - ); diff --git a/plugins/box/backup/languages/it.lang.php b/plugins/box/backup/languages/it.lang.php deleted file mode 100644 index 4c0e864..0000000 --- a/plugins/box/backup/languages/it.lang.php +++ /dev/null @@ -1,17 +0,0 @@ - array( - 'Backups' => 'Backup', - 'Backup' => 'Backup', - 'Create Backup' => 'Crea Backup', - 'Delete' => 'Elimina', - 'storage' => 'dati', - 'public' => 'pubblica', - 'plugins' => 'plugin', - 'Size' => 'Dimensione', - 'Actions' => 'Azioni', - 'Delete backup: :backup' => 'Elimina backup: :backup', - 'Creating...' => 'Creazione...', - ) - ); diff --git a/plugins/box/backup/languages/ja.lang.php b/plugins/box/backup/languages/ja.lang.php deleted file mode 100644 index cc00e16..0000000 --- a/plugins/box/backup/languages/ja.lang.php +++ /dev/null @@ -1,17 +0,0 @@ - array( - 'Backups' => 'ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—', - 'Backup Date' => 'ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—æ—¥', - 'Create Backup' => 'ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®ä½œæˆ', - 'Delete' => '削除', - 'storage' => 'ストレージ', - 'public' => '公開', - 'plugins' => 'プラグイン', - 'Size' => 'サイズ', - 'Actions' => 'アクション', - 'Delete backup: :backup' => 'ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®å‰Šé™¤: :backup', - 'Creating...' => '作æˆä¸­...', - ) - ); diff --git a/plugins/box/backup/languages/lt.lang.php b/plugins/box/backup/languages/lt.lang.php deleted file mode 100644 index 2a75564..0000000 --- a/plugins/box/backup/languages/lt.lang.php +++ /dev/null @@ -1,17 +0,0 @@ - array( - 'Backups' => 'AtsarginÄ—s kopijos', - 'Backup' => 'AtsarginÄ—s kopijos data', - 'Create Backup' => 'Sukurti atsarginÄ™ kopijÄ…', - 'Delete' => 'IÅ¡trinti', - 'storage' => 'storage', - 'public' => 'public', - 'plugins' => 'plugins', - 'Size' => 'Dydis', - 'Actions' => 'Veiksmai', - 'Delete backup: :backup' => 'IÅ¡trinti: :backup', - 'Creating...' => 'Kuriama...', - ) - ); diff --git a/plugins/box/backup/languages/nl.lang.php b/plugins/box/backup/languages/nl.lang.php deleted file mode 100644 index 0f0aa4c..0000000 --- a/plugins/box/backup/languages/nl.lang.php +++ /dev/null @@ -1,17 +0,0 @@ - array( - 'Backups' => 'Backups', - 'Backup' => 'Backup', - 'Create Backup' => 'Maak backup', - 'Delete' => 'Verwijderen', - 'storage' => 'Opslag', - 'public' => 'Publiek', - 'plugins' => 'Plugins', - 'Size' => 'Grootte', - 'Actions' => 'Acties', - 'Delete backup: :backup' => 'Verwijder backup: :backup', - 'Creating...' => 'Backup wordt gemaakt...', - ) - ); diff --git a/plugins/box/backup/languages/pl.lang.php b/plugins/box/backup/languages/pl.lang.php deleted file mode 100644 index e5b968f..0000000 --- a/plugins/box/backup/languages/pl.lang.php +++ /dev/null @@ -1,17 +0,0 @@ - array( - 'Backups' => 'Kopie zapasowe', - 'Backup Date' => 'Data kopii zapasowej', - 'Create Backup' => 'Utwórz kopiÄ™ zapasowÄ…', - 'Delete' => 'UsuÅ„', - 'storage' => 'magazyn', - 'public' => 'publiczny', - 'plugins' => 'wtyczki', - 'Size' => 'Rozmiar', - 'Actions' => 'Akcje', - 'Delete backup: :backup' => 'Czy napewno usunąć kopiÄ™ zapasowÄ…: :backup', - 'Creating...' => 'Tworzenie kopii zapasowej...', - ) - ); diff --git a/plugins/box/backup/languages/pt-br.lang.php b/plugins/box/backup/languages/pt-br.lang.php deleted file mode 100644 index c4aec1d..0000000 --- a/plugins/box/backup/languages/pt-br.lang.php +++ /dev/null @@ -1,17 +0,0 @@ - array( - 'Backups' => 'Backups', - 'Backup' => 'Backup', - 'Create Backup' => 'Criar Backup', - 'Delete' => 'Deletar', - 'storage' => 'storage', - 'public' => 'public', - 'plugins' => 'plugins', - 'Size' => 'Tamanho', - 'Actions' => 'Ações', - 'Delete backup: :backup' => 'Deletar o backup: :backup', - 'Creating...' => 'Criando backup...', - ) - ); diff --git a/plugins/box/backup/languages/ru.lang.php b/plugins/box/backup/languages/ru.lang.php deleted file mode 100644 index aa15c8a..0000000 --- a/plugins/box/backup/languages/ru.lang.php +++ /dev/null @@ -1,21 +0,0 @@ - array( - 'Backups' => 'Бекапы', - 'Backup' => 'Бекап', - 'Create Backup' => 'Сделать бекап', - 'Delete' => 'Удалить', - 'storage' => 'данные', - 'public' => 'публичнаÑ', - 'plugins' => 'плагины', - 'Size' => 'Размер', - 'Actions' => 'ДейÑтвиÑ', - 'Delete backup: :backup' => 'Удалить бекап: :backup', - 'Creating...' => 'Создание...', - 'Backup was deleted' => 'Бекап не был Ñоздан', - 'Backup was created' => 'Бекап был Ñоздан', - 'Backup was not restored' => 'Бекап не был воÑÑтановлен', - 'Backup was restored' => 'Бекап был воÑÑтановлен', - ) - ); diff --git a/plugins/box/backup/languages/sk.lang.php b/plugins/box/backup/languages/sk.lang.php deleted file mode 100644 index b319072..0000000 --- a/plugins/box/backup/languages/sk.lang.php +++ /dev/null @@ -1,17 +0,0 @@ - array( - 'Backups' => 'Zálohy', - 'Backup' => 'Zálohy', - 'Create Backup' => 'VytvoriÅ¥ Zálohu', - 'Delete' => 'VymazaÅ¥', - 'storage' => 'Storage/Obsah diskového miesta', - 'public' => 'Verejné', - 'plugins' => 'Pluginy', - 'Size' => 'VeľkosÅ¥', - 'Actions' => 'Akcie', - 'Delete backup: :backup' => 'VymazaÅ¥ zálohu: :backup', - 'Creating...' => 'Vytváram...', - ) - ); diff --git a/plugins/box/backup/languages/sr.lang.php b/plugins/box/backup/languages/sr.lang.php deleted file mode 100644 index d561862..0000000 --- a/plugins/box/backup/languages/sr.lang.php +++ /dev/null @@ -1,17 +0,0 @@ - array( - 'Backups' => 'Bekapovi', - 'Backup' => 'Backap', - 'Create Backup' => 'Kreiraj Bekap', - 'Delete' => 'ObriÅ¡i', - 'storage' => 'lokacija arhive', - 'public' => 'Javno', - 'plugins' => 'Dodaci', - 'Size' => 'VeliÄina', - 'Actions' => 'Akcija', - 'Delete backup: :backup' => 'ObriÅ¡i bekap: :backup', - 'Creating...' => 'Kreiranje...', - ) - ); diff --git a/plugins/box/backup/languages/tr.lang.php b/plugins/box/backup/languages/tr.lang.php deleted file mode 100644 index d213d20..0000000 --- a/plugins/box/backup/languages/tr.lang.php +++ /dev/null @@ -1,26 +0,0 @@ - array( - 'Backups' => 'Yedekler', - 'Backup' => 'Yedek', - 'Backup Date' => 'Yedekleme Tarihi', - 'Create Backup' => 'Yedek Al', - 'Delete' => 'Sil', - 'Restore' => 'Geri Yükle', - 'storage' => 'depo', - 'public' => 'genel', - 'plugins' => 'eklentiler', - 'Size' => 'Boyut', - 'Actions' => 'Eylemler', - 'Delete backup: :backup' => ':backup adlı yedek silinsin mi', - 'Creating...' => 'OluÅŸturuluyor...', - 'Backup was created' => 'Yedek oluÅŸturuldu', - 'Backup was not created' => 'Yedek oluÅŸturulmadı', - 'Backup was deleted' => 'Yedek silindi', - 'Backup was not deleted' => 'Yedek silinmedi', - 'Backup was restored' => 'Yedek geri yüklendi', - 'Unzip error' => 'Sıkıştırılmış yedeÄŸi açma (unzip) hatası', - 'Backup was not restored' => 'Yedek geri yüklenmedi', - ) - ); diff --git a/plugins/box/backup/languages/uk.lang.php b/plugins/box/backup/languages/uk.lang.php deleted file mode 100644 index 9b2b103..0000000 --- a/plugins/box/backup/languages/uk.lang.php +++ /dev/null @@ -1,21 +0,0 @@ - array( - 'Backups' => 'Бекапи', - 'Backup' => 'Бекап', - 'Create Backup' => 'Створити бекап', - 'Delete' => 'Видалити', - 'storage' => 'дані', - 'public' => 'публічна', - 'plugins' => 'плагіни', - 'Size' => 'Розмір', - 'Actions' => 'Дії', - 'Delete backup: :backup' => 'Видалити бекап: :backup', - 'Creating...' => 'СтвореннÑ...', - 'Backup was deleted' => 'Бекап не був Ñтворений', - 'Backup was created' => 'Бекап був Ñтворений', - 'Backup was not restored' => 'Бекап не був відновлений', - 'Backup was restored' => 'Бекап був відновлений', - ) - ); diff --git a/plugins/box/backup/languages/zh-cn.lang.php b/plugins/box/backup/languages/zh-cn.lang.php deleted file mode 100644 index 0ced446..0000000 --- a/plugins/box/backup/languages/zh-cn.lang.php +++ /dev/null @@ -1,17 +0,0 @@ - array( - 'Backups' => '备份', - 'Backup Date' => '备份日期', - 'Create Backup' => '创建备份', - 'Delete' => '删除', - 'storage' => '存储', - 'public' => '公开', - 'plugins' => 'æ’ä»¶', - 'Size' => '大å°', - 'Actions' => 'æ“作', - 'Delete backup: :backup' => '删除备份: :backup', - 'Creating...' => '正在创建...', - ) - ); \ No newline at end of file diff --git a/plugins/box/backup/views/backend/index.view.php b/plugins/box/backup/views/backend/index.view.php deleted file mode 100755 index d8d0dd6..0000000 --- a/plugins/box/backup/views/backend/index.view.php +++ /dev/null @@ -1,57 +0,0 @@ - - -
    -
    -

    -
    -
    - 'form-inline')) . - Form::hidden('csrf', Security::token()). - Form::submit('create_backup', __('Create Backup', 'backup'), array('class' => 'btn btn-phone btn-primary', 'data-loading-text' => __('Creating...', 'backup'))). - Form::close() - ); - ?> -
    -
    - - -
    - - - - - - - - - - 0) rsort($backups_list); foreach ($backups_list as $backup) { ?> - - - - - - - -
    - - - -
    - 'btn btn-primary')); - } - ?> - 'btn btn-danger', 'onclick' => "return confirmDelete('".__('Delete backup: :backup', 'backup', array(':backup' => Date::format($name, 'F jS, Y - g:i A')))."')")); - ?> -
    -
    -
    - diff --git a/plugins/box/blocks/blocks.admin.php b/plugins/box/blocks/blocks.admin.php deleted file mode 100755 index 0595969..0000000 --- a/plugins/box/blocks/blocks.admin.php +++ /dev/null @@ -1,147 +0,0 @@ -:name have been saved.', 'blocks', array(':name' => Security::safeName(Request::post('name'))))); - - if (Request::post('add_blocks_and_exit')) { - Request::redirect('index.php?id=blocks'); - } else { - Request::redirect('index.php?id=blocks&action=edit_block&filename='.Security::safeName(Request::post('name'))); - } - } - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - } - - // Save fields - if (Request::post('name')) $name = Request::post('name'); else $name = ''; - if (Request::post('editor')) $content = Request::post('editor'); else $content = ''; - - // Display view - View::factory('box/blocks/views/backend/add') - ->assign('content', $content) - ->assign('name', $name) - ->assign('errors', $errors) - ->display(); - break; - - // Edit Block - // ------------------------------------- - case "edit_block": - // Save current block action - if (Request::post('edit_blocks') || Request::post('edit_blocks_and_exit') ) { - - if (Security::check(Request::post('csrf'))) { - - if (trim(Request::post('name')) == '') $errors['blocks_empty_name'] = __('Required field', 'blocks'); - if ((file_exists($blocks_path.Security::safeName(Request::post('name')).'.block.html')) and (Security::safeName(Request::post('blocks_old_name')) !== Security::safeName(Request::post('name')))) $errors['blocks_exists'] = __('This block already exists', 'blocks'); - - // Save fields - if (Request::post('editor')) $content = Request::post('editor'); else $content = ''; - if (count($errors) == 0) { - - $block_old_filename = $blocks_path.Request::post('blocks_old_name').'.block.html'; - $block_new_filename = $blocks_path.Security::safeName(Request::post('name')).'.block.html'; - if ( ! empty($block_old_filename)) { - if ($block_old_filename !== $block_new_filename) { - rename($block_old_filename, $block_new_filename); - $save_filename = $block_new_filename; - } else { - $save_filename = $block_new_filename; - } - } else { - $save_filename = $block_new_filename; - } - - // Save block - File::setContent($save_filename, XML::safe(Request::post('editor'))); - - Notification::set('success', __('Your changes to the block :name have been saved.', 'blocks', array(':name' => basename($save_filename, '.block.html')))); - - if (Request::post('edit_blocks_and_exit')) { - Request::redirect('index.php?id=blocks'); - } else { - Request::redirect('index.php?id=blocks&action=edit_block&filename='.Security::safeName(Request::post('name'))); - } - } - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - } - if (Request::post('name')) $name = Request::post('name'); else $name = File::name(Request::get('filename')); - if (Request::post('editor')) $content = Request::post('editor'); else $content = File::getContent($blocks_path.Request::get('filename').'.block.html'); - - // Display view - View::factory('box/blocks/views/backend/edit') - ->assign('content', Text::toHtml($content)) - ->assign('name', $name) - ->assign('errors', $errors) - ->display(); - break; - case "delete_block": - - if (Security::check(Request::get('token'))) { - - File::delete($blocks_path.Request::get('filename').'.block.html'); - Notification::set('success', __('Block :name deleted', 'blocks', array(':name' => File::name(Request::get('filename'))))); - Request::redirect('index.php?id=blocks'); - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - - break; - } - } else { - - // Get blocks - $blocks_list = File::scan($blocks_path, '.block.html'); - - // Display view - View::factory('box/blocks/views/backend/index') - ->assign('blocks_list', $blocks_list) - ->display(); - - } - } - -} diff --git a/plugins/box/blocks/blocks.plugin.php b/plugins/box/blocks/blocks.plugin.php deleted file mode 100644 index 4b2b737..0000000 --- a/plugins/box/blocks/blocks.plugin.php +++ /dev/null @@ -1,115 +0,0 @@ - (string) $content, - ); - } - } - - /** - * Draw Inline Block - */ - public static function _inlineBlock($attributes) - { - if (isset($attributes['name']) && isset(Block::$inline_blocks[$attributes['name']])) { - $content = Filter::apply('content', Text::toHtml(Block::$inline_blocks[$attributes['name']]['content'])); - - return $content; - } else { - return ''; - } - } - - /** - * Get block - * - * @param string $name Block file name - */ - public static function get($name) - { - return Block::_content(array('get' => $name)); - } - - /** - * Returns block content for shortcode {block get="blockname"} - * - * @param array $attributes block filename - */ - public static function _content($attributes) - { - if (isset($attributes['get'])) $name = (string) $attributes['get']; else $name = ''; - - $block_path = STORAGE . DS . 'blocks' . DS . $name . '.block.html'; - - if (File::exists($block_path)) { - ob_start(); - include $block_path; - $block_contents = ob_get_contents(); - ob_end_clean(); - - return Filter::apply('content', Text::toHtml($block_contents)); - } else { - if (Session::exists('admin') && Session::get('admin') == true) { - return __('Block :name is not found!', 'blocks', array(':name' => $name)); - } - } - } -} diff --git a/plugins/box/blocks/install/blocks.manifest.xml b/plugins/box/blocks/install/blocks.manifest.xml deleted file mode 100644 index 562be0d..0000000 --- a/plugins/box/blocks/install/blocks.manifest.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - plugins/box/blocks/blocks.plugin.php - active - 6 - Blocks - Blocks manager plugin - 1.0.0 - Awilum - http://monstra.org/ - diff --git a/plugins/box/blocks/js/.htaccess b/plugins/box/blocks/js/.htaccess deleted file mode 100644 index b9f48ac..0000000 --- a/plugins/box/blocks/js/.htaccess +++ /dev/null @@ -1,2 +0,0 @@ -Options -Indexes -Allow from all \ No newline at end of file diff --git a/plugins/box/blocks/js/blocks.js b/plugins/box/blocks/js/blocks.js deleted file mode 100644 index dd3a300..0000000 --- a/plugins/box/blocks/js/blocks.js +++ /dev/null @@ -1,18 +0,0 @@ -if (typeof $.monstra == 'undefined') $.monstra = {}; - -$.monstra.blocks = { - - init: function() { }, - - showEmbedCodes: function(name) { - $('#shortcode').html('{block get="'+name+'"}'); - $('#phpcode').html('<?php echo Block::get("'+name+'"); ?>'); - $('#embedCodes').modal(); - } - -}; - - -$(document).ready(function(){ - $.monstra.blocks.init(); -}); \ No newline at end of file diff --git a/plugins/box/blocks/languages/cs.lang.php b/plugins/box/blocks/languages/cs.lang.php deleted file mode 100644 index a6f8df5..0000000 --- a/plugins/box/blocks/languages/cs.lang.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'Blocks' => 'Bloky', - 'Blocks manager' => 'Správce bloků', - 'Delete' => 'Vymazat', - 'Edit' => 'Editovat', - 'Name' => 'Názov', - 'Create New Block' => 'VytvoÅ™it nový blok', - 'New Block' => 'Nový blok', - 'Edit Block' => 'Editovat blok', - 'Save' => 'Uložit', - 'Save and Exit' => 'Uložit a ukonÄit', - 'Actions' => 'Akce', - 'Required field' => 'Povinné políÄko', - 'This block already exists' => 'Tento blok již existuje', - 'This block does not exist' => 'Tento blok neexistuje', - 'Delete block: :block' => 'Vymazat blok: :block', - 'Block content' => 'Obsah bloku', - 'Block :name deleted' => 'Blok :name byl vymazaný', - 'Your changes to the block :name have been saved.' => 'VaÅ¡e zmÄ›ny v bloku :name byly uloženy.', - 'Delete block: :block' => 'Vymazat blok: :block', - 'View Embed Code' => 'Zobrazit vložený kód', - 'Embed Code' => 'Vložený kód', - 'Shortcode' => 'Zkrácený kód', - 'PHP Code' => 'PHP kód', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/blocks/languages/de.lang.php b/plugins/box/blocks/languages/de.lang.php deleted file mode 100644 index 0b04fae..0000000 --- a/plugins/box/blocks/languages/de.lang.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'Blocks' => 'Blöcke', - 'Blocks manager' => 'Block-Manager', - 'Delete' => 'Löschen', - 'Edit' => 'Bearbeiten', - 'Name' => 'Name', - 'Create New Block' => 'Erstelle einen neuen Block', - 'New Block' => 'Neuer Block', - 'Edit Block' => 'Bearbeite Block', - 'Save' => 'Speichern', - 'Save and Exit' => 'Speichern und Schließen', - 'Actions' => 'Aktionen', - 'Required field' => 'Erforderliches Feld', - 'This block already exists' => 'Dieser Block existiert bereits', - 'This block does not exist' => 'Dieser Block existiert nicht', - 'Delete block: :block' => 'Lösche Block: :block', - 'Block content' => 'Block-Inhalt', - 'Block :name deleted' => 'Block :name gelöscht', - 'Your changes to the block :name have been saved.' => 'Deine Änderungen für den Block :name wurden gespeichert.', - 'Delete block: :block' => 'Lösche Block: :block', - 'View Embed Code' => 'Zeige Embed Code', - 'Embed Code' => 'Embed Code', - 'Shortcode' => 'Shortcode', - 'PHP Code' => 'PHP Code', - 'Cancel' => 'Abbrechen', - ) - ); diff --git a/plugins/box/blocks/languages/en.lang.php b/plugins/box/blocks/languages/en.lang.php deleted file mode 100644 index a77b8ee..0000000 --- a/plugins/box/blocks/languages/en.lang.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'Blocks' => 'Blocks', - 'Blocks manager' => 'Blocks manager', - 'Delete' => 'Delete', - 'Edit' => 'Edit', - 'Name' => 'Name', - 'Create New Block' => 'Create New Block', - 'New Block' => 'New Block', - 'Edit Block' => 'Edit Block', - 'Save' => 'Save', - 'Save and Exit' => 'Save and Exit', - 'Actions' => 'Actions', - 'Required field' => 'Required field', - 'This block already exists' => 'This block already exists', - 'This block does not exist' => 'This block does not exist', - 'Delete block: :block' => 'Delete block: :block', - 'Block content' => 'Block content', - 'Block :name deleted' => 'Block :name deleted', - 'Your changes to the block :name have been saved.' => 'Your changes to the block :name have been saved.', - 'Delete block: :block' => 'Delete block: :block', - 'View Embed Code' => 'View Embed Code', - 'Embed Code' => 'Embed Code', - 'Shortcode' => 'Shortcode', - 'PHP Code' => 'PHP Code', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/blocks/languages/es.lang.php b/plugins/box/blocks/languages/es.lang.php deleted file mode 100644 index 0acff1b..0000000 --- a/plugins/box/blocks/languages/es.lang.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'Blocks' => 'Bloques', - 'Blocks manager' => 'Administrador de bloques', - 'Delete' => 'Eliminar', - 'Edit' => 'Editar', - 'Name' => 'Nombre', - 'Create New Block' => 'Crear nuevo bloque', - 'New Block' => 'Nuevo bloque', - 'Edit Block' => 'Editar bloque', - 'Save' => 'Guardar', - 'Save and Exit' => 'Guardar y salir', - 'Actions' => 'Acciones', - 'Required field' => 'Dato requerido', - 'This block already exists' => 'Este bloque ya existe', - 'This block does not exist' => 'Este bloque no existe', - 'Delete block: :block' => 'Eliminar bloque: :block', - 'Block content' => 'Contenido del bloque', - 'Block :name deleted' => 'Bloque :name eliminado', - 'Your changes to the block :name have been saved.' => 'Tus cambios en el bloque :name han sido guardados.', - 'Delete block: :block' => 'Eliminar bloque: :block', - 'View Embed Code' => 'Ver código incrustado', - 'Embed Code' => 'Incrustar código', - 'Shortcode' => 'Código corto', - 'PHP Code' => 'Código PHP', - 'Cancel' => 'Cancelar', - ) - ); diff --git a/plugins/box/blocks/languages/fa.lang.php b/plugins/box/blocks/languages/fa.lang.php deleted file mode 100644 index 3161aa4..0000000 --- a/plugins/box/blocks/languages/fa.lang.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'Blocks' => 'بلوک', - 'Blocks manager' => 'مدیریت بلوک', - 'Delete' => 'حذÙ', - 'Edit' => 'ویرایش', - 'Name' => 'نام', - 'Create New Block' => 'ایجاد بلوک جدید', - 'New Block' => 'بلوک جدید', - 'Edit Block' => 'ویرایش بلوک', - 'Save' => 'ذخیره', - 'Save and Exit' => 'ذخیره Ùˆ خروج', - 'Actions' => 'عملیات', - 'Required field' => 'کادر الزامی', - 'This block already exists' => 'این بلوک در حال حاضر وجود دارد', - 'This block does not exist' => 'این بلوک وجود ندارد', - 'Delete block: :block' => 'Delete block: :block', - 'Block content' => 'حذ٠بلوک: :block', - 'Block :name deleted' => 'بلوک :name حذ٠شد', - 'Your changes to the block :name have been saved.' => 'تغییرات شما بر روی بلوک :name ذخیره شد.', - 'Delete block: :block' => 'حذ٠بلوک: :block', - 'View Embed Code' => 'نمایش کد درج شده', - 'Embed Code' => 'کد درج شده', - 'Shortcode' => 'کدکوتاه', - 'PHP Code' => 'کد PHP', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/blocks/languages/fr.lang.php b/plugins/box/blocks/languages/fr.lang.php deleted file mode 100644 index 0cdf60d..0000000 --- a/plugins/box/blocks/languages/fr.lang.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'Blocks' => 'Blocs', - 'Blocks manager' => 'Gestionnaire des blocs', - 'Delete' => 'Supprimer', - 'Edit' => 'Editer', - 'Name' => 'Nom', - 'Create new block' => 'Créer un nouveau bloc', - 'New block' => 'Nouveau bloc', - 'Edit block' => 'Editer le bloc', - 'Save' => 'Enregistrer', - 'Save and exit' => 'Enregistrer et sortir', - 'Actions' => 'Actions', - 'Required field' => 'Champ requis', - 'This block already exists' => 'Ce bloc existe déjà', - 'This block does not exist' => 'Ce bloc n\'existe pas', - 'Delete block: :block' => 'Supprimer le bloc: :block', - 'Block content' => 'Contenu du bloc', - 'Block :name deleted' => 'Bloc :name supprimé', - 'Your changes to the block :name have been saved.' => 'Vos changements pour le bloc :name ont été sauvegardés.', - 'Delete block: :block' => 'Supprimer le bloc: :block', - 'View Embed Code' => 'Voir le code intégré', - 'Embed Code' => 'Code intégré', - 'Shortcode' => 'Code court', - 'PHP Code' => 'Code PHP', - 'Cancel' => 'Cancel', - ) - ); \ No newline at end of file diff --git a/plugins/box/blocks/languages/hu.lang.php b/plugins/box/blocks/languages/hu.lang.php deleted file mode 100644 index 20e67c5..0000000 --- a/plugins/box/blocks/languages/hu.lang.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'Blocks' => 'Blokkok', - 'Blocks manager' => 'Blokk-kezelÅ‘', - 'Delete' => 'Törlés', - 'Edit' => 'Szerkesztés', - 'Name' => 'Név', - 'Create New Block' => 'Új blokk készítése', - 'New Block' => 'Új blokk', - 'Edit Block' => 'Blokk szerkesztése', - 'Save' => 'Mentés', - 'Save and Exit' => 'Mentés és Kilépés', - 'Actions' => 'Műveletek', - 'Required field' => 'KötelezÅ‘ mezÅ‘', - 'This block already exists' => 'Ez a blokk már létezik', - 'This block does not exist' => 'Ez a blokk nem létezik', - 'Delete block: :block' => 'Blokk törlése: :block', - 'Block content' => 'Blokk tartalma', - 'Block :name deleted' => 'A :name blokk törölve', - 'Your changes to the block :name have been saved.' => 'A :name blokk változtatásai elmentve.', - 'Delete block: :block' => 'Blokk törlése: :block', - 'View Embed Code' => 'Beágyazott kód mutatása', - 'Embed Code' => 'Beágyazott kód', - 'Shortcode' => 'Shortcode', - 'PHP Code' => 'PHP Code', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/blocks/languages/id.lang.php b/plugins/box/blocks/languages/id.lang.php deleted file mode 100644 index 03185db..0000000 --- a/plugins/box/blocks/languages/id.lang.php +++ /dev/null @@ -1,29 +0,0 @@ - array( - 'Blocks' => 'Block', - 'Blocks manager' => 'Pengelolaan Block', - 'Delete' => 'Hapus', - 'Edit' => 'Perbaiki', - 'Name' => 'Nama', - 'Create New Block' => 'Buat Block Baru', - 'New Block' => 'Block Baru', - 'Edit Block' => 'Edit Block', - 'Save' => 'Simpan', - 'Save and Exit' => 'Simpan dan Keluar', - 'Actions' => 'Tindakan', - 'Required field' => 'Isian yang Dibutuhkan', - 'This block already exists' => 'Block ini sudah ada', - 'This block does not exist' => 'Block ini belum ada', - 'Delete block: :block' => 'Hapus Block: :block', - 'Block content' => 'Isi Block', - 'Block :name deleted' => 'Block :nama dihapus', - 'Your changes to the block :name have been saved.' => 'Perubahan pada block :nama telah disimpan.', - 'Delete block: :block' => 'Hapus Block: :block', - 'View Embed Code' => 'Lihat Embed Code', - 'Embed Code' => 'Embed Code', - 'Shortcode' => 'Shortcode', - 'PHP Code' => 'PHP Code', - ) - ); diff --git a/plugins/box/blocks/languages/it.lang.php b/plugins/box/blocks/languages/it.lang.php deleted file mode 100644 index 81bbf8c..0000000 --- a/plugins/box/blocks/languages/it.lang.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'Blocks' => 'Blocchi', - 'Blocks manager' => 'Gestione blocchi', - 'Delete' => 'Elimina', - 'Edit' => 'Modifica', - 'New Block' => 'Nuovo blocco', - 'Create New Block' => 'Crea nuovo blocco', - 'Name' => 'Nome', - 'Edit Block' => 'Modifica blocco', - 'Save' => 'Salva', - 'Actions' => 'Azioni', - 'Save and Exit' => 'Salva ed esci', - 'Required field' => 'Campo obbligatorio', - 'This block already exists' => 'Tale blocco già esistente', - 'This block does not exist' => 'Tale blocco non esiste', - 'Delete block: :block' => 'Elimina blocco: :block', - 'Block content' => 'Contenuto del blocco', - 'Block :name deleted' => 'Snippet :name è stato eliminato', - 'Your changes to the block :name have been saved.' => 'Le modifiche al blocco: nome sono state salvate.', - 'Delete block: :block' => 'Elimina blocco: :block', - 'View Embed Code' => 'View Embed Code', - 'Embed Code' => 'Embed Code', - 'Shortcode' => 'Shortcode', - 'PHP Code' => 'PHP Code', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/blocks/languages/ja.lang.php b/plugins/box/blocks/languages/ja.lang.php deleted file mode 100644 index 0417a52..0000000 --- a/plugins/box/blocks/languages/ja.lang.php +++ /dev/null @@ -1,29 +0,0 @@ - array( - 'Blocks' => 'ブロック', - 'Blocks manager' => 'ブロックã®ç®¡ç†', - 'Delete' => '削除', - 'Edit' => '編集', - 'Name' => 'åå‰', - 'Create New Block' => 'æ–°ã—ã„ブロックを作æˆ', - 'New Block' => 'æ–°ã—ã„ブロック', - 'Edit Block' => 'ブロックを編集', - 'Save' => 'ä¿å­˜', - 'Save and Exit' => 'ä¿å­˜ã—ã¦çµ‚了', - 'Actions' => 'アクション', - 'Required field' => '必須項目', - 'This block already exists' => 'ã“ã®ãƒ–ロックã¯ã™ã§ã«å­˜åœ¨ã—ã¦ã„ã¾ã™', - 'This block does not exist' => 'ã“ã®ãƒ–ロックã¯å­˜åœ¨ã—ã¦ã„ã¾ã›ã‚“', - 'Delete block: :block' => 'ブロックã®å‰Šé™¤: :block', - 'Block content' => 'ブロックã®å†…容', - 'Block :name deleted' => ':name ブロックãŒå‰Šé™¤ã•れã¾ã—ãŸ', - 'Your changes to the block :name have been saved.' => ':name ã¸ã®å¤‰æ›´ã¯ä¿å­˜ã•れã¾ã—ãŸã€‚', - 'Delete block: :block' => 'ブロックã®å‰Šé™¤: :block', - 'View Embed Code' => '埋ã‚è¾¼ã¿ã‚³ãƒ¼ãƒ‰ã‚’表示', - 'Embed Code' => '埋ã‚è¾¼ã¿ã‚³ãƒ¼ãƒ‰', - 'Shortcode' => 'ショートコード', - 'PHP Code' => 'PHPコード', - ) - ); diff --git a/plugins/box/blocks/languages/ka-ge.lang.php b/plugins/box/blocks/languages/ka-ge.lang.php deleted file mode 100644 index 5d61d81..0000000 --- a/plugins/box/blocks/languages/ka-ge.lang.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'Blocks' => 'ბლáƒáƒ™áƒ”ბი', - 'Blocks manager' => 'ბლáƒáƒ™áƒ”ბის მენეჯერი', - 'Delete' => 'წáƒáƒ¨áƒšáƒ', - 'Edit' => 'რედáƒáƒ¥áƒ¢áƒ˜áƒ áƒ”ბáƒ', - 'New Block' => 'áƒáƒ®áƒáƒšáƒ˜ ბლáƒáƒ™áƒ˜', - 'Create New Block' => 'áƒáƒ®áƒáƒšáƒ˜ ბლáƒáƒ™áƒ˜áƒ¡ შექმნáƒ', - 'Name' => 'სáƒáƒ®áƒ”ლი', - 'Edit Block' => 'ბლáƒáƒ™áƒ˜áƒ¡ რედáƒáƒ¥áƒ¢áƒ˜áƒ áƒ”ბáƒ', - 'Save' => 'შენáƒáƒ®áƒ•áƒ', - 'Actions' => 'მáƒáƒ¥áƒ›áƒ”დებáƒ', - 'Save and Exit' => 'შენáƒáƒ®áƒ•რდრშემდეგ გáƒáƒ›áƒáƒ¡áƒ•ლáƒ', - 'Required field' => 'áƒáƒ£áƒªáƒ˜áƒšáƒ”ბელი ველი', - 'This block already exists' => 'áƒáƒ¡áƒ”თი ბლáƒáƒ™áƒ˜ უკვე áƒáƒ áƒ¡áƒ”ბáƒáƒ‘ს', - 'This block does not exist' => 'áƒáƒ¡áƒ”თი ბლáƒáƒ™áƒ˜ áƒáƒ  áƒáƒ áƒ¡áƒ”ბáƒáƒ‘ს', - 'Delete block: :block' => 'ბლáƒáƒ™áƒ˜áƒ¡ წáƒáƒ¨áƒšáƒ: :block', - 'Block content' => 'ბლáƒáƒ™áƒ˜áƒ¡ შემáƒáƒ“გენლáƒáƒ‘áƒ', - 'Block :name deleted' => 'ბლáƒáƒ™áƒ˜ :name წáƒáƒ¨áƒšáƒ˜áƒšáƒ˜áƒ', - 'Your changes to the block :name have been saved.' => 'თქვენი ცვლილებები ბლáƒáƒ™áƒ¨áƒ˜ :name დáƒáƒ›áƒáƒ®áƒ¡áƒáƒ•რებულიáƒ.', - 'Delete block: :block' => 'ბლáƒáƒ™áƒ˜áƒ¡ წáƒáƒ¨áƒšáƒ: :block', - 'View Embed Code' => 'ჩáƒáƒ¡áƒáƒ¬áƒ”რი კáƒáƒ“ი', - 'Embed Code' => 'ჩáƒáƒ¡áƒáƒ¬áƒ”რი კáƒáƒ“ი', - 'Shortcode' => 'Shortcode-ი', - 'PHP Code' => 'PHP კáƒáƒ“ი', - 'Cancel' => 'გáƒáƒ£áƒ¥áƒ›áƒ”ბáƒ', - ) - ); diff --git a/plugins/box/blocks/languages/lt.lang.php b/plugins/box/blocks/languages/lt.lang.php deleted file mode 100644 index e6b0035..0000000 --- a/plugins/box/blocks/languages/lt.lang.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'Blocks' => 'Blokai', - 'Blocks manager' => 'Blokų tvarkyklÄ—', - 'Delete' => 'IÅ¡trinti', - 'Edit' => 'Redaguoti', - 'Name' => 'Pavadinimas', - 'Create New Block' => 'Sukurti naujÄ… blokÄ…', - 'New Block' => 'Naujas blokas', - 'Edit Block' => 'Redaguoti blokÄ…', - 'Save' => 'IÅ¡saugoti', - 'Save and Exit' => 'IÅ¡saugoti ir iÅ¡eiti', - 'Actions' => 'Veiksmai', - 'Required field' => 'Privalomas laukas', - 'This block already exists' => 'Toks blokas jau yra', - 'This block does not exist' => 'Tokio bloko nÄ—ra', - 'Delete block: :block' => 'IÅ¡trinti: :block', - 'Block content' => 'Bloko turinys', - 'Block :name deleted' => 'Blokas :name iÅ¡trintas', - 'Your changes to the block :name have been saved.' => 'Bloko :name pakeitimai iÅ¡saugoti.', - 'Delete block: :block' => 'Delete block: :block', - 'View Embed Code' => 'View Embed Code', - 'Embed Code' => 'Embed Code', - 'Shortcode' => 'Shortcode', - 'PHP Code' => 'PHP Code', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/blocks/languages/nl.lang.php b/plugins/box/blocks/languages/nl.lang.php deleted file mode 100644 index 78f491d..0000000 --- a/plugins/box/blocks/languages/nl.lang.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'Blocks' => 'Blokken', - 'Blocks manager' => 'Blokken beheer', - 'Delete' => 'Verwijderen', - 'Edit' => 'Bewerken', - 'Name' => 'Naam', - 'Create New Block' => 'Nieuw blok', - 'New Block' => 'Nieuw blok', - 'Edit Block' => 'Bewerk blok', - 'Save' => 'Opslaan', - 'Save and Exit' => 'Opslaan en Terug', - 'Actions' => 'Acties', - 'Required field' => 'Vereist veld', - 'This block already exists' => 'Dit blok bestaat al', - 'This block does not exist' => 'Dit blok bestaat niet', - 'Delete block: :block' => 'Verwijder blok: :block', - 'Block content' => 'Inhoud blok', - 'Block :name deleted' => 'Blok :name verwijderd', - 'Your changes to the block :name have been saved.' => 'De aanpassingen aan blok :name zijn opgeslagen.', - 'Delete block: :block' => 'Verwijder blok: :block', - 'View Embed Code' => 'Bekijk insluitcode', - 'Embed Code' => 'Insluitcode', - 'Shortcode' => 'Verkorte code', - 'PHP Code' => 'PHP Code', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/blocks/languages/pl.lang.php b/plugins/box/blocks/languages/pl.lang.php deleted file mode 100644 index 0f51e6a..0000000 --- a/plugins/box/blocks/languages/pl.lang.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'Blocks' => 'Bloki', - 'Blocks manager' => 'ZarzÄ…dzaj blokami', - 'Delete' => 'UsuÅ„', - 'Edit' => 'Edytuj', - 'Name' => 'Nazwa', - 'Create New Block' => 'Utwórz nowy blok', - 'New Block' => 'Nowy blok', - 'Edit Block' => 'Edytuj blok', - 'Save' => 'Zapisz', - 'Save and Exit' => 'Zapisz i wyjdź', - 'Actions' => 'Akcje', - 'Required field' => 'Pole wymagane', - 'This block already exists' => 'Ten blok już istnieje', - 'This block does not exist' => 'Ten blok nie istnieje', - 'Delete block: :block' => 'Czy napewno usunąć blok: :block', - 'Block content' => 'Zawartość bloku', - 'Block :name deleted' => 'Blok :name zostaÅ‚ usuniÄ™ty', - 'Your changes to the block :name have been saved.' => 'Twoje zmiany dla bloku :name zostaÅ‚y zapisane.', - 'Delete block: :block' => 'Czy napewno usunąć blok: :block', - 'View Embed Code' => 'Pokaż osadzony kod', - 'Embed Code' => 'Osadzony kod', - 'Shortcode' => 'Krótki kod (shortcode)', - 'PHP Code' => 'Kod PHP', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/blocks/languages/pt-br.lang.php b/plugins/box/blocks/languages/pt-br.lang.php deleted file mode 100644 index d82533c..0000000 --- a/plugins/box/blocks/languages/pt-br.lang.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'Blocks' => 'Blocos', - 'Blocks manager' => 'Gerenciador de blocos', - 'Delete' => 'Deletar', - 'Edit' => 'Editar', - 'Name' => 'Nome', - 'Create New Block' => 'Criar novo bloco', - 'New Block' => 'Novo bloco', - 'Edit Block' => 'Editar bloco', - 'Save' => 'Salvar', - 'Save and Exit' => 'Salvar e sair', - 'Actions' => 'Ações', - 'Required field' => 'Campo requerido', - 'This block already exists' => 'Este bloco já existe', - 'This block does not exist' => 'Este bloco não existe', - 'Delete block: :block' => 'Deletar o bloco: :block', - 'Block content' => 'Conteúdo do bloco', - 'Block :name deleted' => 'Bloco :name deletado', - 'Your changes to the block :name have been saved.' => 'Suas mudanças no bloco :name foram salvas', - 'Delete block: :block' => 'Delete block: :block', - 'View Embed Code' => 'View Embed Code', - 'Embed Code' => 'Embed Code', - 'Shortcode' => 'Shortcode', - 'PHP Code' => 'PHP Code', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/blocks/languages/ru.lang.php b/plugins/box/blocks/languages/ru.lang.php deleted file mode 100644 index d75551c..0000000 --- a/plugins/box/blocks/languages/ru.lang.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'Blocks' => 'Блоки', - 'Blocks manager' => 'Менеджер блоков', - 'Delete' => 'Удалить', - 'Edit' => 'Редактировать', - 'New Block' => 'Ðовый блок', - 'Create New Block' => 'Создать новый блок', - 'Name' => 'Ðазвание', - 'Edit Block' => 'Редактирование блока', - 'Save' => 'Сохранить', - 'Actions' => 'ДейÑтвиÑ', - 'Save and Exit' => 'Сохранить и выйти', - 'Required field' => 'ОбÑзательное поле', - 'This block already exists' => 'Такой блок уже ÑущеÑтвует', - 'This block does not exist' => 'Такого блока не ÑущеÑтвует', - 'Delete block: :block' => 'Удалить блок: :block', - 'Block content' => 'Содержимое блока', - 'Block :name deleted' => 'Блок :name удален', - 'Your changes to the block :name have been saved.' => 'Ваши Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ðº блоку :name были Ñохранены.', - 'Delete block: :block' => 'Удалить блок: :block', - 'View Embed Code' => 'Код Ð´Ð»Ñ Ð²Ñтавки', - 'Embed Code' => 'Код Ð´Ð»Ñ Ð²Ñтавки', - 'Shortcode' => 'Шорткод', - 'PHP Code' => 'PHP код', - 'Cancel' => 'Отмена', - ) - ); diff --git a/plugins/box/blocks/languages/sk.lang.php b/plugins/box/blocks/languages/sk.lang.php deleted file mode 100644 index f70bd0e..0000000 --- a/plugins/box/blocks/languages/sk.lang.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'Blocks' => 'Bloky', - 'Blocks manager' => 'Manažér blokov', - 'Delete' => 'VymazaÅ¥', - 'Edit' => 'EditovaÅ¥', - 'Name' => 'Názov', - 'Create New Block' => 'VytvoriÅ¥ nový blok', - 'New Block' => 'Nový blok', - 'Edit Block' => 'EditovaÅ¥ blok', - 'Save' => 'UložiÅ¥', - 'Save and Exit' => 'UložiÅ¥ a ukonÄiÅ¥', - 'Actions' => 'Akcie', - 'Required field' => 'Povinné políÄko', - 'This block already exists' => 'Tento blok už existuje', - 'This block does not exist' => 'Tento blok neexistuje', - 'Delete block: :block' => 'VymazaÅ¥ blok: :block', - 'Block content' => 'Obsah bloku', - 'Block :name deleted' => 'Blok :name bol vymazaný', - 'Your changes to the block :name have been saved.' => 'VaÅ¡e zmeny v bloku :name boli uložené.', - 'Delete block: :block' => 'VymazaÅ¥ blok: :block', - 'View Embed Code' => 'PozrieÅ¥ vložený kód', - 'Embed Code' => 'Vložený kód', - 'Shortcode' => 'Skrátený kód', - 'PHP Code' => 'PHP kód', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/blocks/languages/sr.lang.php b/plugins/box/blocks/languages/sr.lang.php deleted file mode 100644 index 517c070..0000000 --- a/plugins/box/blocks/languages/sr.lang.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'Blocks' => 'Blokovi', - 'Blocks manager' => 'Menadžer blokova', - 'Delete' => 'ObriÅ¡i', - 'Edit' => 'Izmeni', - 'Name' => 'Ime', - 'Create new block' => 'Kreiraj novi blok', - 'New block' => 'Novi blok', - 'Edit block' => 'Izmeni blok', - 'Save' => 'SaÄuvaj', - 'Save and exit' => 'SaÄuvaj i izaÄ‘i', - 'Actions' => 'Akcije', - 'Required field' => 'Potrebno polje', - 'This block already exists' => 'Ovaj Blok već postoji', - 'This block does not exist' => 'Ovaj blok ne postoji', - 'Delete block: :block' => 'ObriÅ¡i blok: :block', - 'Block content' => 'Sadržaj bloka', - 'Block :name deleted' => 'Blok :name je obrisan', - 'Your changes to the block :name have been saved.' => 'Tvoje promene na bloku :name su saÄuvane.', - 'Delete block: :block' => 'ObriÅ¡i blok: :block', - 'View Embed Code' => 'Vidi embed kod', - 'Embed Code' => 'Embed Kod', - 'Shortcode' => 'Kratak kod', - 'PHP Code' => 'PHP kod', - 'Cancel' => 'Otkaži', - ) - ); diff --git a/plugins/box/blocks/languages/tr.lang.php b/plugins/box/blocks/languages/tr.lang.php deleted file mode 100644 index b762ff8..0000000 --- a/plugins/box/blocks/languages/tr.lang.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'Blocks' => 'Bloklar', - 'Blocks manager' => 'Blok yöneticisi', - 'Delete' => 'Sil', - 'Edit' => 'Düzenle', - 'Name' => 'Ad', - 'Create New Block' => 'Yeni Blok OluÅŸtur', - 'New Block' => 'Yeni Blok', - 'Edit Block' => 'BloÄŸu Düzenle', - 'Save' => 'Kaydet', - 'Save and Exit' => 'Kaydet ve Çık', - 'Actions' => 'İşlemler', - 'Required field' => 'Zorunlu alan', - 'This block already exists' => 'Bu blok zaten var.', - 'This block does not exist' => 'Blok bulunamadı.', - 'Delete block: :block' => ':block adlı blok silinsin mi', - 'Block content' => 'Blok içeriÄŸi', - 'Block :name deleted' => ':name adlı blok silindi.', - 'Your changes to the block :name have been saved.' => 'DeÄŸiÅŸiklikler :name bloÄŸuna kaydedildi.', - 'Delete block: :block' => ':block adlı blok silinsin mi', - 'View Embed Code' => 'Gömülür Kodu Görüntüle', - 'Embed Code' => 'Gömülür Kodu', - 'Shortcode' => 'Kısa Kod', - 'PHP Code' => 'PHP Kodu', - 'Cancel' => 'Vazgeç', - ) - ); diff --git a/plugins/box/blocks/languages/uk.lang.php b/plugins/box/blocks/languages/uk.lang.php deleted file mode 100644 index f520fa8..0000000 --- a/plugins/box/blocks/languages/uk.lang.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'Blocks' => 'Блоки', - 'Blocks manager' => 'Менеджер блоків', - 'Delete' => 'Видалити', - 'Edit' => 'Редагувати', - 'New Block' => 'Ðовий блок', - 'Create New Block' => 'Створити новий блок', - 'Name' => 'Ðазва', - 'Edit Block' => 'Редагувати блок', - 'Save' => 'Зберегти', - 'Actions' => 'Дії', - 'Save and Exit' => 'Зберегти та вийти', - 'Required field' => 'Обов′Ñзкове поле', - 'This block already exists' => 'Такий блок вже Ñ–Ñнує', - 'This block does not exist' => 'Такий блок не Ñ–Ñнує', - 'Delete block: :block' => 'Видалити блок: :block', - 'Block content' => 'ВміÑÑ‚ блоку', - 'Block :name deleted' => 'Сніпет :name вилучено', - 'Your changes to the block :name have been saved.' => 'Ваші зміни до блоку :name були збережені.', - 'Delete block: :block' => 'Видалити блок: :block', - 'View Embed Code' => 'Код Ð´Ð»Ñ Ð²Ñтавки', - 'Embed Code' => 'Код Ð´Ð»Ñ Ð²Ñтавки', - 'Shortcode' => 'Шорткод', - 'PHP Code' => 'PHP код', - 'Cancel' => 'Відмінити', - ) - ); diff --git a/plugins/box/blocks/languages/zh-cn.lang.php b/plugins/box/blocks/languages/zh-cn.lang.php deleted file mode 100644 index b436c0c..0000000 --- a/plugins/box/blocks/languages/zh-cn.lang.php +++ /dev/null @@ -1,29 +0,0 @@ - array( - 'Blocks' => '版å—', - 'Blocks manager' => '版å—管ç†', - 'Delete' => '删除', - 'Edit' => '编辑', - 'Name' => 'åç§°', - 'Create New Block' => '创建新版å—', - 'New Block' => '新版å—', - 'Edit Block' => '编辑版å—', - 'Save' => 'ä¿å­˜', - 'Save and Exit' => 'ä¿å­˜å¹¶é€€å‡º', - 'Actions' => 'æ“作', - 'Required field' => '必填字段', - 'This block already exists' => '此版å—已存在', - 'This block does not exist' => '此版å—ä¸å­˜åœ¨', - 'Delete block: :block' => '删除版å—: :block', - 'Block content' => '版å—内容', - 'Block :name deleted' => 'ç‰ˆå— :name 已删除', - 'Your changes to the block :name have been saved.' => 'æ‚¨ä¿®æ”¹çš„ç‰ˆå— :name å·²ä¿å­˜ã€‚', - 'Delete block: :block' => '删除版å—: :block', - 'View Embed Code' => '查看嵌入代ç ', - 'Embed Code' => '嵌入代ç ', - 'Shortcode' => '短代ç ', - 'PHP Code' => 'PHP 代ç ', - ) - ); diff --git a/plugins/box/blocks/views/backend/add.view.php b/plugins/box/blocks/views/backend/add.view.php deleted file mode 100644 index 1f755b9..0000000 --- a/plugins/box/blocks/views/backend/add.view.php +++ /dev/null @@ -1,31 +0,0 @@ -

    - - - - - - - -
    - - (isset($errors['blocks_empty_name']) || isset($errors['blocks_exists'])) ? 'form-control error-field' : 'form-control'))); ?> - '.$errors['blocks_empty_name'].''; - if (isset($errors['blocks_exists'])) echo ''.$errors['blocks_exists'].''; - ?> -
    - -
    -
    - -
    -
    - - 'btn btn-phone btn-primary')).Html::nbsp(2). - Form::submit('add_blocks', __('Save', 'blocks'), array('class' => 'btn btn-phone btn-primary')).Html::nbsp(2). - Html::anchor(__('Cancel', 'blocks'), 'index.php?id=blocks', array('title' => __('Cancel', 'blocks'), 'class' => 'btn btn-phone btn-default')). - Form::close() - ); -?> diff --git a/plugins/box/blocks/views/backend/edit.view.php b/plugins/box/blocks/views/backend/edit.view.php deleted file mode 100644 index c57a575..0000000 --- a/plugins/box/blocks/views/backend/edit.view.php +++ /dev/null @@ -1,41 +0,0 @@ -

    - - - -
    - - (isset($errors['blocks_empty_name']) || isset($errors['blocks_exists'])) ? 'form-control error-field' : 'form-control'))); ?> - '.$errors['blocks_empty_name'].''; - if (isset($errors['blocks_exists'])) echo ''.$errors['blocks_exists'].''; - ?> -
    - - -
    -
    - -
    -
    - - 'btn btn-phone btn-primary')).Html::nbsp(2). - Form::submit('edit_blocks', __('Save', 'blocks'), array('class' => 'btn btn-phone btn-primary')). Html::nbsp(2). - Html::anchor(__('Cancel', 'blocks'), 'index.php?id=blocks', array('title' => __('Cancel', 'blocks'), 'class' => 'btn btn-phone btn-default')). - Form::close() - ); - - } else { - echo '
    '.__('This block does not exist', 'blocks').'
    '; - } -?> diff --git a/plugins/box/blocks/views/backend/index.view.php b/plugins/box/blocks/views/backend/index.view.php deleted file mode 100755 index 3a0c035..0000000 --- a/plugins/box/blocks/views/backend/index.view.php +++ /dev/null @@ -1,66 +0,0 @@ -
    -
    -

    -
    -
    - __('Create New Block', 'blocks'), 'class' => 'btn btn-phone btn-primary')) - ); - ?> -
    -
    - - - - - - - - - - - - - - - - - -
    -
    -
    - 'btn btn-primary')); ?> - - -
    - 'btn btn-danger', 'onclick' => "return confirmDelete('".__('Delete block: :block', 'blocks', array(':block' => basename($block, '.block.html')))."')")); - ?> -
    -
    - - - \ No newline at end of file diff --git a/plugins/box/dashboard/dashboard.admin.php b/plugins/box/dashboard/dashboard.admin.php deleted file mode 100644 index 83aab0c..0000000 --- a/plugins/box/dashboard/dashboard.admin.php +++ /dev/null @@ -1,122 +0,0 @@ -display(); - } - -} - - -/** - * Dashboard - */ -class Dashboard -{ - - /** - * Items - * - * @var array - */ - public static $items = array(); - - - /** - * - */ - public static function addNewItem($id, $title, $url, $priority = 1) - { - Dashboard::$items[] = array( - 'id' => (string) $id, - 'title' => (string) $title, - 'url' => (string) $url, - 'priority' => (int) $priority, - ); - } - - - /** - * - */ - public static function drawItems() - { - // Sort items by priority - $items = Arr::subvalSort(Dashboard::$items, 'priority'); - - foreach ($items as $item) { - echo '
  • '; - echo Html::anchor($item['title'], $item['url'], array('title' => $item['title'])); - echo '
  • '; - } - } - -} \ No newline at end of file diff --git a/plugins/box/dashboard/dashboard.plugin.php b/plugins/box/dashboard/dashboard.plugin.php deleted file mode 100644 index 851fffd..0000000 --- a/plugins/box/dashboard/dashboard.plugin.php +++ /dev/null @@ -1,30 +0,0 @@ - - - plugins/dashboard/dashboard.plugin.php - active - 15 - Dashboard - Dashboard plugin for Monstra - 1.0.0 - Awilum - http://monstra.org/ - \ No newline at end of file diff --git a/plugins/box/dashboard/js/.htaccess b/plugins/box/dashboard/js/.htaccess deleted file mode 100644 index b9f48ac..0000000 --- a/plugins/box/dashboard/js/.htaccess +++ /dev/null @@ -1,2 +0,0 @@ -Options -Indexes -Allow from all \ No newline at end of file diff --git a/plugins/box/dashboard/js/ganalytics.js b/plugins/box/dashboard/js/ganalytics.js deleted file mode 100644 index 91e3fa4..0000000 --- a/plugins/box/dashboard/js/ganalytics.js +++ /dev/null @@ -1,183 +0,0 @@ -if (typeof $.monstra == 'undefined') $.monstra = {}; - -function glibOnloadHandle(){$.monstra.ganalytics.libOnloadHandle();} - -$.monstra.ganalytics = { - - conf: { - clientId: '', - apiKey: '', - viewId: '', - authScopes: 'https://www.googleapis.com/auth/analytics.readonly' - }, - - _gaAreas: '#authOk,#authFail,#gaSettings,#gaLoading,#reauthError,#gaHelpLink', - _startDate: moment().subtract('days', 29), - _endDate: moment(), - - init: function(data){ - $.extend(this.conf, data); - $('.gaSettingsLink').click(function(){ - $.monstra.ganalytics.show('#gaSettings,#gaHelpLink'); - $('.gaSettingsLink').hide(); - }); - }, - - initDateRangePicker: function(){ - $('#reportRange').daterangepicker({ - ranges: { - 'Today': [moment(), moment()], - 'Yesterday': [moment().subtract('days', 1), moment().subtract('days', 1)], - 'Last 7 Days': [moment().subtract('days', 6), moment()], - 'Last 30 Days': [moment().subtract('days', 29), moment()], - 'This Month': [moment().startOf('month'), moment().endOf('month')], - 'Last Month': [moment().subtract('month', 1).startOf('month'), moment().subtract('month', 1).endOf('month')] - }, - startDate: $.monstra.ganalytics._startDate, - endDate: $.monstra.ganalytics._endDate - },function(start, end) { - $.monstra.ganalytics.getAnalyticsInfo(start._d, end._d); - } - ); - $.monstra.ganalytics.getAnalyticsInfo($.monstra.ganalytics._startDate._d, $.monstra.ganalytics._endDate._d); - }, - - libOnloadHandle: function(){ - if ($.monstra.ganalytics.conf.clientId == '' - || $.monstra.ganalytics.conf.apiKey == '' - || $.monstra.ganalytics.conf.viewId == '' - ) { - $.monstra.ganalytics.show('#gaSettings,#gaHelpLink'); - $('.gaSettingsLink').hide(); - return false; - } - gapi.client.setApiKey(this.conf.apiKey); - window.setTimeout(function(){ - $.monstra.ganalytics.checkAuth(true); - },1); - }, - - checkAuth: function(immediate){ - gapi.auth.authorize({ - client_id: $.monstra.ganalytics.conf.clientId, - scope: $.monstra.ganalytics.conf.authScopes, - immediate: immediate - }, $.monstra.ganalytics.handleAuthResult); - return immediate; - }, - - handleAuthResult: function(authResult){ - if (authResult && !authResult.error) { - $.monstra.ganalytics.show('#authOk'); - $.monstra.ganalytics.initDateRangePicker(); - } else { - $.monstra.ganalytics.show('#authFail'); - if (authResult && typeof authResult.error != 'undefined') { - $.monstra.ganalytics.showError(authResult.error.message); - } - - $('#authorizeButton').on('click', function(e){ - $.monstra.ganalytics.checkAuth(false); - }); - } - }, - - getAnalyticsInfo: function(startDate, endDate) { - gapi.client.load('analytics', 'v3', function(){ - gapi.client.analytics.data.ga.get({ - 'ids': 'ga:'+ $.monstra.ganalytics.conf.viewId, - 'start-date': $.monstra.ganalytics.formatDate(startDate), - 'end-date': $.monstra.ganalytics.formatDate(endDate), - 'metrics': 'ga:visits,ga:pageviews,ga:visitors', - 'dimensions': 'ga:date' - }).execute($.monstra.ganalytics.gaReportingResults); - }); - }, - - gaReportingResults: function(res){ - if (typeof res.error != 'undefined' && typeof res.error.message != 'undefined') { - $.monstra.ganalytics.showError(res.error.message, res.error.code); - return; - } - - // build chart data - var dataArr = [['Date', 'Visits']]; - for (r in res.rows) { - var tmpr = []; - for (h in res.columnHeaders) { - if (res.columnHeaders[h].name == 'ga:visits') { - tmpr[1] = parseInt(res.rows[r][h]); - } else if (res.columnHeaders[h].name == 'ga:date') { - var parsed = res.rows[r][h].match(/([0-9]{4})([0-9]{2})([0-9]{2})/) - tmpr[0] = parsed[1] +'-'+ parsed[2] +'-'+ parsed[3]; - } - - if (res.rows.length == (parseInt(r)+1)) { - switch(res.columnHeaders[h].name) { - case 'ga:visits': $.monstra.ganalytics.setVisits(res.rows[r][h]); break; - case 'ga:pageviews': $.monstra.ganalytics.setPageviews(res.rows[r][h]); break; - case 'ga:visitors': $.monstra.ganalytics.setVisitors(res.rows[r][h]); break; - } - } - } - dataArr.push(tmpr); - } - - var data = google.visualization.arrayToDataTable(dataArr); - - var options = { - title: 'Visits', - hAxis: {title: 'Date', titleTextStyle: {color: '#333'}}, - vAxis: {minValue: 0} - }; - - var chart = new google.visualization.AreaChart(document.getElementById('gaChart')); - chart.draw(data, options); - - }, - - formatDate: function(dateObj){ - var m = dateObj.getMonth()+1; - var d = dateObj.getDate(); - m = m > 9 ? m : '0'+m; - d = d > 9 ? d : '0'+d; - return dateObj.getFullYear() +'-'+ m +'-'+ d; - }, - - show: function(selector){ - $('.gaSettingsLink').show(); - $('#gaAlerts').html(''); - $($.monstra.ganalytics._gaAreas).addClass('hide'); - $(selector).removeClass('hide').show(); - }, - - showError: function(msg, errCode){ - if (typeof errCode !== 'undefined' && errCode == 403) { - $.monstra.ganalytics.show('#reauthError,#gaHelpLink'); - } else { - $.monstra.ganalytics.show('#gaHelpLink'); - } - $('#gaAlerts').html(msg); - $('#authOk').addClass('hide'); - }, - - setVisits: function(val){ - $('#gaVisits').html(val); - }, - - setVisitors: function(val){ - $('#gaVisitors').html(val); - }, - - setPageviews: function(val){ - $('#gaPageviews').html(val); - } -}; - -$(document).ready(function(){ - $val_gaInitData = $('#gaInitData').val(); - if ($val_gaInitData !== undefined) { - $.monstra.ganalytics.init($.parseJSON($val_gaInitData)); - } -}); - diff --git a/plugins/box/dashboard/languages/cs.lang.php b/plugins/box/dashboard/languages/cs.lang.php deleted file mode 100644 index 8d42ded..0000000 --- a/plugins/box/dashboard/languages/cs.lang.php +++ /dev/null @@ -1,11 +0,0 @@ - array( - 'Dashboard' => 'Dashboard', - 'Dashboard plugin for Monstra' => 'Dashboard plugin pro Monstra', - 'Welcome back' => 'Vítejte zpÄ›t', - 'Create New' => 'VytvoÅ™it nový', - 'Upload File' => 'Nahrát soubor', - ) - ); diff --git a/plugins/box/dashboard/languages/de.lang.php b/plugins/box/dashboard/languages/de.lang.php deleted file mode 100644 index 55c0e61..0000000 --- a/plugins/box/dashboard/languages/de.lang.php +++ /dev/null @@ -1,11 +0,0 @@ - array( - 'Dashboard' => 'Dashboard', - 'Dashboard plugin for Monstra' => 'Dashboard plugin für Monstra', - 'Welcome back' => 'Willkommen zurück', - 'Create New' => 'Erstelle neue', - 'Upload File' => 'Datei hochladen', - ) - ); diff --git a/plugins/box/dashboard/languages/en.lang.php b/plugins/box/dashboard/languages/en.lang.php deleted file mode 100644 index b015d63..0000000 --- a/plugins/box/dashboard/languages/en.lang.php +++ /dev/null @@ -1,11 +0,0 @@ - array( - 'Dashboard' => 'Dashboard', - 'Dashboard plugin for Monstra' => 'Dashboard plugin for Monstra', - 'Welcome back' => 'Welcome back', - 'Create New' => 'Create New', - 'Upload File' => 'Upload File', - ) - ); diff --git a/plugins/box/dashboard/languages/es.lang.php b/plugins/box/dashboard/languages/es.lang.php deleted file mode 100644 index d26f464..0000000 --- a/plugins/box/dashboard/languages/es.lang.php +++ /dev/null @@ -1,11 +0,0 @@ - array( - 'Dashboard' => 'Escritorio', - 'Dashboard plugin for Monstra' => 'Dashboard plugin for Monstra', - 'Welcome back' => 'Bienvenido nuevamente', - 'Create New' => 'Crear nuevo', - 'Upload File' => 'Subir archivo', - ) - ); diff --git a/plugins/box/dashboard/languages/ka-ge.lang.php b/plugins/box/dashboard/languages/ka-ge.lang.php deleted file mode 100644 index 0035f9e..0000000 --- a/plugins/box/dashboard/languages/ka-ge.lang.php +++ /dev/null @@ -1,11 +0,0 @@ - array( - 'Dashboard' => 'პáƒáƒœáƒ”ლი', - 'Dashboard plugin for Monstra' => 'პáƒáƒœáƒ”ლი Monstra-თვის', - 'Welcome back' => 'მáƒáƒ’ესáƒáƒšáƒ›áƒ”ბით', - 'Create New' => 'დáƒáƒ›áƒáƒ¢áƒ”ბáƒ', - 'Upload File' => 'ფáƒáƒ˜áƒšáƒ˜áƒ¡ áƒáƒ¢áƒ•ირთვáƒ', - ) - ); diff --git a/plugins/box/dashboard/languages/pl.lang.php b/plugins/box/dashboard/languages/pl.lang.php deleted file mode 100644 index 42cd85f..0000000 --- a/plugins/box/dashboard/languages/pl.lang.php +++ /dev/null @@ -1,11 +0,0 @@ - array( - 'Dashboard' => 'Kokpit', - 'Dashboard plugin for Monstra' => 'Wtyczka kokpitu dla systemu Monstra', - 'Welcome back' => 'Witam ponownie', - 'Create New' => 'Utwórz nowy', - 'Upload File' => 'PrzeÅ›lij plik', - ) - ); diff --git a/plugins/box/dashboard/languages/ru.lang.php b/plugins/box/dashboard/languages/ru.lang.php deleted file mode 100644 index dd0fd47..0000000 --- a/plugins/box/dashboard/languages/ru.lang.php +++ /dev/null @@ -1,11 +0,0 @@ - array( - 'Dashboard' => 'Панель', - 'Dashboard plugin for Monstra' => 'Панель Ð´Ð»Ñ Monstra', - 'Welcome back' => 'Добро пожаловать', - 'Create New' => 'Добавить', - 'Upload File' => 'Загрузить Файл', - ) - ); diff --git a/plugins/box/dashboard/languages/sr.lang.php b/plugins/box/dashboard/languages/sr.lang.php deleted file mode 100644 index 3cdff67..0000000 --- a/plugins/box/dashboard/languages/sr.lang.php +++ /dev/null @@ -1,10 +0,0 @@ - array( - 'Dashboard' => 'Komandna tabla', - 'Dashboard plugin for Monstra' => 'Komandna tabla dodatak za Monstra', - 'Welcome back' => 'DobrodoÅ¡li natrag', - 'Create New' => 'Kreiraj novo', - 'Upload File' => 'Otpremi fajl', - ) - ); diff --git a/plugins/box/dashboard/languages/tr.lang.php b/plugins/box/dashboard/languages/tr.lang.php deleted file mode 100644 index d161ba3..0000000 --- a/plugins/box/dashboard/languages/tr.lang.php +++ /dev/null @@ -1,11 +0,0 @@ - array( - 'Dashboard' => 'Pano', - 'Dashboard plugin for Monstra' => 'Monstra için pano eklentisi', - 'Welcome back' => 'Merhaba', - 'Create New' => 'Yeni OluÅŸtur', - 'Upload File' => 'Dosya Yükle', - ) - ); diff --git a/plugins/box/dashboard/languages/uk.lang.php b/plugins/box/dashboard/languages/uk.lang.php deleted file mode 100644 index 5dbd295..0000000 --- a/plugins/box/dashboard/languages/uk.lang.php +++ /dev/null @@ -1,11 +0,0 @@ - array( - 'Dashboard' => 'Панель', - 'Dashboard plugin for Monstra' => 'Панель Ð´Ð»Ñ Monstra', - 'Welcome back' => 'ЛаÑкаво проÑимо', - 'Create New' => 'Додати', - 'Upload File' => 'Завантажити файл', - ) - ); diff --git a/plugins/box/dashboard/views/backend/ga.view.php b/plugins/box/dashboard/views/backend/ga.view.php deleted file mode 100644 index 459e422..0000000 --- a/plugins/box/dashboard/views/backend/ga.view.php +++ /dev/null @@ -1,96 +0,0 @@ - - - - Option::get('ga_client_id'), - 'apiKey' => Option::get('ga_api_key'), - 'viewId' => Option::get('ga_view_id') -)); ?>' /> - - -
    -
    -

    -
    -
    -
    -
    - -
    - -
    -
    Loading...
    -
    - -
    -
    - -
    -
    -
    - - -
    -
    -
    - -
    -
    -
    -
    -
    -
    -
    -

    Today

    -
    Visits:
    -
    Visitors:
    -
    Pageviews:
    -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    -
    - -
    - -
    -
    - -
    -
    - -
    -
    - -
    - -
    - -
    -
    -
    -
    - - - -
    -
    -
    diff --git a/plugins/box/dashboard/views/backend/index.view.php b/plugins/box/dashboard/views/backend/index.view.php deleted file mode 100644 index f576372..0000000 --- a/plugins/box/dashboard/views/backend/index.view.php +++ /dev/null @@ -1,58 +0,0 @@ -
    -
    -
    - , -
    -
    -
    -
    - - -
    - __('Upload File', 'filesmanager'), 'class' => 'btn btn-primary'))); ?> -
    -
    -
    -
    - - - -
    -
    -
    -

    -
      - -
    -
    -
    -

    -
      - -
    -
    -
    -

    -
      - -
    -
    -
    -

    -
      -
    • -
    • - - - - - -
    • -
    -
    -
    -
    diff --git a/plugins/box/editor/editor.plugin.php b/plugins/box/editor/editor.plugin.php deleted file mode 100644 index 03e03ef..0000000 --- a/plugins/box/editor/editor.plugin.php +++ /dev/null @@ -1,42 +0,0 @@ -
    '); - } - -} diff --git a/plugins/box/editor/install/editor.manifest.xml b/plugins/box/editor/install/editor.manifest.xml deleted file mode 100644 index 9fe3558..0000000 --- a/plugins/box/editor/install/editor.manifest.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - plugins/box/editor/editor.plugin.php - active - 1 - Editor - Editor plugin - 1.0.0 - Awilum - http://monstra.org/ - diff --git a/plugins/box/editor/languages/cs.lang.php b/plugins/box/editor/languages/cs.lang.php deleted file mode 100644 index fdce2ed..0000000 --- a/plugins/box/editor/languages/cs.lang.php +++ /dev/null @@ -1,8 +0,0 @@ - array( - 'Editor' => 'Editor', - 'Editor plugin' => 'Editor plugin', - ) - ); diff --git a/plugins/box/editor/languages/de.lang.php b/plugins/box/editor/languages/de.lang.php deleted file mode 100644 index 30794e7..0000000 --- a/plugins/box/editor/languages/de.lang.php +++ /dev/null @@ -1,8 +0,0 @@ - array( - 'Editor' => 'Editor', - 'Editor plugin' => 'Editor Plugin', - ) - ); diff --git a/plugins/box/editor/languages/en.lang.php b/plugins/box/editor/languages/en.lang.php deleted file mode 100644 index fdce2ed..0000000 --- a/plugins/box/editor/languages/en.lang.php +++ /dev/null @@ -1,8 +0,0 @@ - array( - 'Editor' => 'Editor', - 'Editor plugin' => 'Editor plugin', - ) - ); diff --git a/plugins/box/editor/languages/es.lang.php b/plugins/box/editor/languages/es.lang.php deleted file mode 100644 index fdce2ed..0000000 --- a/plugins/box/editor/languages/es.lang.php +++ /dev/null @@ -1,8 +0,0 @@ - array( - 'Editor' => 'Editor', - 'Editor plugin' => 'Editor plugin', - ) - ); diff --git a/plugins/box/editor/languages/fa.lang.php b/plugins/box/editor/languages/fa.lang.php deleted file mode 100644 index 169e952..0000000 --- a/plugins/box/editor/languages/fa.lang.php +++ /dev/null @@ -1,8 +0,0 @@ - array( - 'Editor' => 'ویرایشگر', - 'Editor plugin' => 'پلاگین ویرایشگر', - ) - ); diff --git a/plugins/box/editor/languages/fr.lang.php b/plugins/box/editor/languages/fr.lang.php deleted file mode 100644 index 70b9d0a..0000000 --- a/plugins/box/editor/languages/fr.lang.php +++ /dev/null @@ -1,8 +0,0 @@ - array( - 'Editor' => 'Editeur', - 'Editor plugin' => 'Plugin éditeur', - ) - ); \ No newline at end of file diff --git a/plugins/box/editor/languages/hu.lang.php b/plugins/box/editor/languages/hu.lang.php deleted file mode 100644 index 7eeb8fc..0000000 --- a/plugins/box/editor/languages/hu.lang.php +++ /dev/null @@ -1,8 +0,0 @@ - array( - 'Editor' => 'SzerkesztÅ‘', - 'Editor plugin' => 'SzerkesztÅ‘ bÅ‘vítmény', - ) - ); diff --git a/plugins/box/editor/languages/it.lang.php b/plugins/box/editor/languages/it.lang.php deleted file mode 100644 index fdce2ed..0000000 --- a/plugins/box/editor/languages/it.lang.php +++ /dev/null @@ -1,8 +0,0 @@ - array( - 'Editor' => 'Editor', - 'Editor plugin' => 'Editor plugin', - ) - ); diff --git a/plugins/box/editor/languages/ja.lang.php b/plugins/box/editor/languages/ja.lang.php deleted file mode 100644 index fa8978d..0000000 --- a/plugins/box/editor/languages/ja.lang.php +++ /dev/null @@ -1,8 +0,0 @@ - array( - 'Editor' => 'ƒGƒfƒBƒ^', - 'Editor plugin' => 'ƒGƒfƒBƒ^ƒvƒ‰ƒOƒCƒ“', - ) - ); diff --git a/plugins/box/editor/languages/ka-ge.lang.php b/plugins/box/editor/languages/ka-ge.lang.php deleted file mode 100644 index c0bb71e..0000000 --- a/plugins/box/editor/languages/ka-ge.lang.php +++ /dev/null @@ -1,7 +0,0 @@ - array( - 'Editor' => 'რედáƒáƒ¥áƒ¢áƒáƒ áƒ˜', - 'Editor plugin' => 'პლáƒáƒ’ინი რედáƒáƒ¥áƒ¢áƒáƒ áƒ˜', - ) - ); diff --git a/plugins/box/editor/languages/lt.lang.php b/plugins/box/editor/languages/lt.lang.php deleted file mode 100644 index ee97e58..0000000 --- a/plugins/box/editor/languages/lt.lang.php +++ /dev/null @@ -1,8 +0,0 @@ - array( - 'Editor' => 'Redaktorius', - 'Editor plugin' => 'Redaktoriaus papildinys', - ) - ); diff --git a/plugins/box/editor/languages/nl.lang.php b/plugins/box/editor/languages/nl.lang.php deleted file mode 100644 index 30794e7..0000000 --- a/plugins/box/editor/languages/nl.lang.php +++ /dev/null @@ -1,8 +0,0 @@ - array( - 'Editor' => 'Editor', - 'Editor plugin' => 'Editor Plugin', - ) - ); diff --git a/plugins/box/editor/languages/pl.lang.php b/plugins/box/editor/languages/pl.lang.php deleted file mode 100644 index 471cd42..0000000 --- a/plugins/box/editor/languages/pl.lang.php +++ /dev/null @@ -1,8 +0,0 @@ - array( - 'Editor' => 'Edytor', - 'Editor plugin' => 'Wtyczka edytora', - ) - ); diff --git a/plugins/box/editor/languages/pt-br.lang.php b/plugins/box/editor/languages/pt-br.lang.php deleted file mode 100644 index ecbf493..0000000 --- a/plugins/box/editor/languages/pt-br.lang.php +++ /dev/null @@ -1,8 +0,0 @@ - array( - 'Editor' => 'Editor', - 'Editor plugin' => 'Plugin do editor', - ) - ); diff --git a/plugins/box/editor/languages/ru.lang.php b/plugins/box/editor/languages/ru.lang.php deleted file mode 100644 index bdc4e90..0000000 --- a/plugins/box/editor/languages/ru.lang.php +++ /dev/null @@ -1,8 +0,0 @@ - array( - 'Editor' => 'Редактор', - 'Editor plugin' => 'Редактор плагин', - ) - ); diff --git a/plugins/box/editor/languages/sk.lang.php b/plugins/box/editor/languages/sk.lang.php deleted file mode 100644 index fdce2ed..0000000 --- a/plugins/box/editor/languages/sk.lang.php +++ /dev/null @@ -1,8 +0,0 @@ - array( - 'Editor' => 'Editor', - 'Editor plugin' => 'Editor plugin', - ) - ); diff --git a/plugins/box/editor/languages/sr.lang.php b/plugins/box/editor/languages/sr.lang.php deleted file mode 100644 index 0fcc977..0000000 --- a/plugins/box/editor/languages/sr.lang.php +++ /dev/null @@ -1,9 +0,0 @@ - - array( - 'Editor' => 'Editor', - 'Editor plugin' => 'Editor dodatak', - ) - ); diff --git a/plugins/box/editor/languages/tr.lang.php b/plugins/box/editor/languages/tr.lang.php deleted file mode 100644 index ce84bf7..0000000 --- a/plugins/box/editor/languages/tr.lang.php +++ /dev/null @@ -1,8 +0,0 @@ - array( - 'Editor' => 'Düzenleyici', - 'Editor plugin' => 'Düzenleyici eklentisi', - ) - ); diff --git a/plugins/box/editor/languages/uk.lang.php b/plugins/box/editor/languages/uk.lang.php deleted file mode 100644 index 90f25cd..0000000 --- a/plugins/box/editor/languages/uk.lang.php +++ /dev/null @@ -1,8 +0,0 @@ - array( - 'Editor' => 'Редактор', - 'Editor plugin' => 'Редактор плагіну', - ) - ); diff --git a/plugins/box/editor/languages/zh-cn.lang.php b/plugins/box/editor/languages/zh-cn.lang.php deleted file mode 100644 index d581f4f..0000000 --- a/plugins/box/editor/languages/zh-cn.lang.php +++ /dev/null @@ -1,8 +0,0 @@ - array( - 'Editor' => '编辑器', - 'Editor plugin' => '编辑器æ’ä»¶', - ) - ); diff --git a/plugins/box/emails/css/.htaccess b/plugins/box/emails/css/.htaccess deleted file mode 100644 index b9f48ac..0000000 --- a/plugins/box/emails/css/.htaccess +++ /dev/null @@ -1,2 +0,0 @@ -Options -Indexes -Allow from all \ No newline at end of file diff --git a/plugins/box/emails/css/inc.css b/plugins/box/emails/css/inc.css deleted file mode 100644 index 322be36..0000000 --- a/plugins/box/emails/css/inc.css +++ /dev/null @@ -1,688 +0,0 @@ -/********************************************** -* Ink v1.0.5 - Copyright 2013 ZURB Inc * -**********************************************/ - -/* Client-specific Styles & Reset */ - -#outlook a { - padding:0; -} - -body{ - width:100% !important; - min-width: 100%; - -webkit-text-size-adjust:100%; - -ms-text-size-adjust:100%; - margin:0; - padding:0; -} - -.ExternalClass { - width:100%; -} - -.ExternalClass, -.ExternalClass p, -.ExternalClass span, -.ExternalClass font, -.ExternalClass td, -.ExternalClass div { - line-height: 100%; -} - -#backgroundTable { - margin:0; - padding:0; - width:100% !important; - line-height: 100% !important; -} - -img { - outline:none; - text-decoration:none; - -ms-interpolation-mode: bicubic; - width: auto; - max-width: 100%; - float: left; - clear: both; - display: block; -} - -center { - width: 100%; - min-width: 580px; -} - -a img { - border: none; -} - -p { - margin: 0 0 0 10px; -} - -table { - border-spacing: 0; - border-collapse: collapse; -} - -td { - word-break: break-word; - -webkit-hyphens: auto; - -moz-hyphens: auto; - hyphens: auto; - border-collapse: collapse !important; -} - -table, tr, td { - padding: 0; - vertical-align: top; - text-align: left; -} - -hr { - color: #d9d9d9; - background-color: #d9d9d9; - height: 1px; - border: none; -} - -/* Responsive Grid */ - -table.body { - height: 100%; - width: 100%; -} - -table.container { - width: 580px; - margin: 0 auto; - text-align: inherit; -} - -table.row { - padding: 0px; - width: 100%; - position: relative; -} - -table.container table.row { - display: block; -} - -td.wrapper { - padding: 10px 20px 0px 0px; - position: relative; -} - -table.columns, -table.column { - margin: 0 auto; -} - -table.columns td, -table.column td { - padding: 0px 0px 10px; -} - -table.columns td.sub-columns, -table.column td.sub-columns, -table.columns td.sub-column, -table.column td.sub-column { - padding-right: 10px; -} - -td.sub-column, td.sub-columns { - min-width: 0px; -} - -table.row td.last, -table.container td.last { - padding-right: 0px; -} - -table.one { width: 30px; } -table.two { width: 80px; } -table.three { width: 130px; } -table.four { width: 180px; } -table.five { width: 230px; } -table.six { width: 280px; } -table.seven { width: 330px; } -table.eight { width: 380px; } -table.nine { width: 430px; } -table.ten { width: 480px; } -table.eleven { width: 530px; } -table.twelve { width: 580px; } - -table.one center { min-width: 30px; } -table.two center { min-width: 80px; } -table.three center { min-width: 130px; } -table.four center { min-width: 180px; } -table.five center { min-width: 230px; } -table.six center { min-width: 280px; } -table.seven center { min-width: 330px; } -table.eight center { min-width: 380px; } -table.nine center { min-width: 430px; } -table.ten center { min-width: 480px; } -table.eleven center { min-width: 530px; } -table.twelve center { min-width: 580px; } - -table.one .panel center { min-width: 10px; } -table.two .panel center { min-width: 60px; } -table.three .panel center { min-width: 110px; } -table.four .panel center { min-width: 160px; } -table.five .panel center { min-width: 210px; } -table.six .panel center { min-width: 260px; } -table.seven .panel center { min-width: 310px; } -table.eight .panel center { min-width: 360px; } -table.nine .panel center { min-width: 410px; } -table.ten .panel center { min-width: 460px; } -table.eleven .panel center { min-width: 510px; } -table.twelve .panel center { min-width: 560px; } - -.body .columns td.one, -.body .column td.one { width: 8.333333%; } -.body .columns td.two, -.body .column td.two { width: 16.666666%; } -.body .columns td.three, -.body .column td.three { width: 25%; } -.body .columns td.four, -.body .column td.four { width: 33.333333%; } -.body .columns td.five, -.body .column td.five { width: 41.666666%; } -.body .columns td.six, -.body .column td.six { width: 50%; } -.body .columns td.seven, -.body .column td.seven { width: 58.333333%; } -.body .columns td.eight, -.body .column td.eight { width: 66.666666%; } -.body .columns td.nine, -.body .column td.nine { width: 75%; } -.body .columns td.ten, -.body .column td.ten { width: 83.333333%; } -.body .columns td.eleven, -.body .column td.eleven { width: 91.666666%; } -.body .columns td.twelve, -.body .column td.twelve { width: 100%; } - -td.offset-by-one { padding-left: 50px; } -td.offset-by-two { padding-left: 100px; } -td.offset-by-three { padding-left: 150px; } -td.offset-by-four { padding-left: 200px; } -td.offset-by-five { padding-left: 250px; } -td.offset-by-six { padding-left: 300px; } -td.offset-by-seven { padding-left: 350px; } -td.offset-by-eight { padding-left: 400px; } -td.offset-by-nine { padding-left: 450px; } -td.offset-by-ten { padding-left: 500px; } -td.offset-by-eleven { padding-left: 550px; } - -td.expander { - visibility: hidden; - width: 0px; - padding: 0 !important; -} - -table.columns .text-pad, -table.column .text-pad { - padding-left: 10px; - padding-right: 10px; -} - -table.columns .left-text-pad, -table.columns .text-pad-left, -table.column .left-text-pad, -table.column .text-pad-left { - padding-left: 10px; -} - -table.columns .right-text-pad, -table.columns .text-pad-right, -table.column .right-text-pad, -table.column .text-pad-right { - padding-right: 10px; -} - -/* Block Grid */ - -.block-grid { - width: 100%; - max-width: 580px; -} - -.block-grid td { - display: inline-block; - padding:10px; -} - -.two-up td { - width:270px; -} - -.three-up td { - width:173px; -} - -.four-up td { - width:125px; -} - -.five-up td { - width:96px; -} - -.six-up td { - width:76px; -} - -.seven-up td { - width:62px; -} - -.eight-up td { - width:52px; -} - -/* Alignment & Visibility Classes */ - -table.center, td.center { - text-align: center; -} - -h1.center, -h2.center, -h3.center, -h4.center, -h5.center, -h6.center { - text-align: center; -} - -span.center { - display: block; - width: 100%; - text-align: center; -} - -img.center { - margin: 0 auto; - float: none; -} - -.show-for-small, -.hide-for-desktop { - display: none; -} - -/* Typography */ - -body, table.body, h1, h2, h3, h4, h5, h6, p, td { - color: #222222; - font-family: "Helvetica", "Arial", sans-serif; - font-weight: normal; - padding:0; - margin: 0; - text-align: left; - line-height: 1.3; -} - -h1, h2, h3, h4, h5, h6 { - word-break: normal; -} - -h1 {font-size: 40px;} -h2 {font-size: 36px;} -h3 {font-size: 32px;} -h4 {font-size: 28px;} -h5 {font-size: 24px;} -h6 {font-size: 20px;} -body, table.body, p, td {font-size: 14px;line-height:19px;} - -p.lead, p.lede, p.leed { - font-size: 18px; - line-height:21px; -} - -p { - margin-bottom: 10px; -} - -small { - font-size: 10px; -} - -a { - color: #2ba6cb; - text-decoration: none; -} - -a:hover { - color: #2795b6 !important; -} - -a:active { - color: #2795b6 !important; -} - -a:visited { - color: #2ba6cb !important; -} - -h1 a, -h2 a, -h3 a, -h4 a, -h5 a, -h6 a { - color: #2ba6cb; -} - -h1 a:active, -h2 a:active, -h3 a:active, -h4 a:active, -h5 a:active, -h6 a:active { - color: #2ba6cb !important; -} - -h1 a:visited, -h2 a:visited, -h3 a:visited, -h4 a:visited, -h5 a:visited, -h6 a:visited { - color: #2ba6cb !important; -} - -/* Panels */ - -.panel { - background: #f2f2f2; - border: 1px solid #d9d9d9; - padding: 10px !important; -} - -.sub-grid table { - width: 100%; -} - -.sub-grid td.sub-columns { - padding-bottom: 0; -} - -/* Buttons */ - -table.button, -table.tiny-button, -table.small-button, -table.medium-button, -table.large-button { - width: 100%; - overflow: hidden; -} - -table.button td, -table.tiny-button td, -table.small-button td, -table.medium-button td, -table.large-button td { - display: block; - width: auto !important; - text-align: center; - background: #2ba6cb; - border: 1px solid #2284a1; - color: #ffffff; - padding: 8px 0; -} - -table.tiny-button td { - padding: 5px 0 4px; -} - -table.small-button td { - padding: 8px 0 7px; -} - -table.medium-button td { - padding: 12px 0 10px; -} - -table.large-button td { - padding: 21px 0 18px; -} - -table.button td a, -table.tiny-button td a, -table.small-button td a, -table.medium-button td a, -table.large-button td a { - font-weight: bold; - text-decoration: none; - font-family: Helvetica, Arial, sans-serif; - color: #ffffff; - font-size: 16px; -} - -table.tiny-button td a { - font-size: 12px; - font-weight: normal; -} - -table.small-button td a { - font-size: 16px; -} - -table.medium-button td a { - font-size: 20px; -} - -table.large-button td a { - font-size: 24px; -} - -table.button:hover td, -table.button:visited td, -table.button:active td { - background: #2795b6 !important; -} - -table.button:hover td a, -table.button:visited td a, -table.button:active td a { - color: #fff !important; -} - -table.button:hover td, -table.tiny-button:hover td, -table.small-button:hover td, -table.medium-button:hover td, -table.large-button:hover td { - background: #2795b6 !important; -} - -table.button:hover td a, -table.button:active td a, -table.button td a:visited, -table.tiny-button:hover td a, -table.tiny-button:active td a, -table.tiny-button td a:visited, -table.small-button:hover td a, -table.small-button:active td a, -table.small-button td a:visited, -table.medium-button:hover td a, -table.medium-button:active td a, -table.medium-button td a:visited, -table.large-button:hover td a, -table.large-button:active td a, -table.large-button td a:visited { - color: #ffffff !important; -} - -table.secondary td { - background: #e9e9e9; - border-color: #d0d0d0; - color: #555; -} - -table.secondary td a { - color: #555; -} - -table.secondary:hover td { - background: #d0d0d0 !important; - color: #555; -} - -table.secondary:hover td a, -table.secondary td a:visited, -table.secondary:active td a { - color: #555 !important; -} - -table.success td { - background: #5da423; - border-color: #457a1a; -} - -table.success:hover td { - background: #457a1a !important; -} - -table.alert td { - background: #c60f13; - border-color: #970b0e; -} - -table.alert:hover td { - background: #970b0e !important; -} - -table.radius td { - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} - -table.round td { - -webkit-border-radius: 500px; - -moz-border-radius: 500px; - border-radius: 500px; -} - -/* Outlook First */ - -body.outlook p { - display: inline !important; -} - -/* Media Queries */ - -@media only screen and (max-width: 600px) { - - table[class="body"] img { - width: auto !important; - height: auto !important; - } - - table[class="body"] center { - min-width: 0 !important; - } - - table[class="body"] .container { - width: 95% !important; - } - - table[class="body"] .row { - width: 100% !important; - display: block !important; - } - - table[class="body"] .wrapper { - display: block !important; - padding-right: 0 !important; - } - - table[class="body"] .columns, - table[class="body"] .column { - table-layout: fixed !important; - float: none !important; - width: 100% !important; - padding-right: 0px !important; - padding-left: 0px !important; - display: block !important; - } - - table[class="body"] .wrapper.first .columns, - table[class="body"] .wrapper.first .column { - display: table !important; - } - - table[class="body"] table.columns td, - table[class="body"] table.column td { - width: 100% !important; - } - - table[class="body"] .columns td.one, - table[class="body"] .column td.one { width: 8.333333% !important; } - table[class="body"] .columns td.two, - table[class="body"] .column td.two { width: 16.666666% !important; } - table[class="body"] .columns td.three, - table[class="body"] .column td.three { width: 25% !important; } - table[class="body"] .columns td.four, - table[class="body"] .column td.four { width: 33.333333% !important; } - table[class="body"] .columns td.five, - table[class="body"] .column td.five { width: 41.666666% !important; } - table[class="body"] .columns td.six, - table[class="body"] .column td.six { width: 50% !important; } - table[class="body"] .columns td.seven, - table[class="body"] .column td.seven { width: 58.333333% !important; } - table[class="body"] .columns td.eight, - table[class="body"] .column td.eight { width: 66.666666% !important; } - table[class="body"] .columns td.nine, - table[class="body"] .column td.nine { width: 75% !important; } - table[class="body"] .columns td.ten, - table[class="body"] .column td.ten { width: 83.333333% !important; } - table[class="body"] .columns td.eleven, - table[class="body"] .column td.eleven { width: 91.666666% !important; } - table[class="body"] .columns td.twelve, - table[class="body"] .column td.twelve { width: 100% !important; } - - table[class="body"] td.offset-by-one, - table[class="body"] td.offset-by-two, - table[class="body"] td.offset-by-three, - table[class="body"] td.offset-by-four, - table[class="body"] td.offset-by-five, - table[class="body"] td.offset-by-six, - table[class="body"] td.offset-by-seven, - table[class="body"] td.offset-by-eight, - table[class="body"] td.offset-by-nine, - table[class="body"] td.offset-by-ten, - table[class="body"] td.offset-by-eleven { - padding-left: 0 !important; - } - - table[class="body"] table.columns td.expander { - width: 1px !important; - } - - table[class="body"] .right-text-pad, - table[class="body"] .text-pad-right { - padding-left: 10px !important; - } - - table[class="body"] .left-text-pad, - table[class="body"] .text-pad-left { - padding-right: 10px !important; - } - - table[class="body"] .hide-for-small, - table[class="body"] .show-for-desktop { - display: none !important; - } - - table[class="body"] .show-for-small, - table[class="body"] .hide-for-desktop { - display: inherit !important; - } -} \ No newline at end of file diff --git a/plugins/box/emails/emails.admin.php b/plugins/box/emails/emails.admin.php deleted file mode 100644 index e2d0e6b..0000000 --- a/plugins/box/emails/emails.admin.php +++ /dev/null @@ -1,72 +0,0 @@ -:name
    have been saved.', 'emails', array(':name' => Request::post('email_template_name')))); - - if (Request::post('edit_email_template_and_exit')) { - Request::redirect('index.php?id=emails'); - } else { - Request::redirect('index.php?id=emails&action=edit_email_template&filename='.Request::post('email_template_name')); - } - - } - - } - - $content = File::getContent($email_templates_path.Request::get('filename').'.email.php'); - - // Display view - View::factory('box/emails/views/backend/edit') - ->assign('content', $content) - ->display(); - break; - - } - - } else { - - // Get email templates - $email_templates_list = File::scan($email_templates_path, '.email.php'); - - // Display view - View::factory('box/emails/views/backend/index') - ->assign('email_templates_list', $email_templates_list) - ->display(); - } - } -} diff --git a/plugins/box/emails/emails.plugin.php b/plugins/box/emails/emails.plugin.php deleted file mode 100644 index 730daa8..0000000 --- a/plugins/box/emails/emails.plugin.php +++ /dev/null @@ -1,29 +0,0 @@ - - - plugins/box/emails/emails.plugin.php - active - 15 - Emails - Emails plugin for Monstra - 1.0.0 - Awilum - http://monstra.org/ - \ No newline at end of file diff --git a/plugins/box/emails/languages/cs.lang.php b/plugins/box/emails/languages/cs.lang.php deleted file mode 100644 index 6b94ea3..0000000 --- a/plugins/box/emails/languages/cs.lang.php +++ /dev/null @@ -1,19 +0,0 @@ - array( - 'Emails' => 'Emaily', - 'Emails plugin for Monstra' => 'Email plugin pro Monstra', - 'Edit Layout' => 'Upravit layout', - 'Email templates' => 'Vzory emailů', - 'Edit' => 'Upravit', - 'Edit Email Template' => 'Upravit vzory emailů', - 'Name' => 'Název', - 'Email template content' => 'Obsah vzoru emailu', - 'Save and Exit' => 'Uložit a ukonÄit', - 'Save' => 'Uložit', - 'Cancel' => 'ZruÅ¡it', - 'This email template does not exist' => 'Tento vzor emailu neexistuje', - 'Your changes to the email template :name have been saved.' => 'VaÅ¡e zmÄ›ny vzoru emailu :name byly uloženy.', - ) - ); diff --git a/plugins/box/emails/languages/de.lang.php b/plugins/box/emails/languages/de.lang.php deleted file mode 100644 index 2fbe545..0000000 --- a/plugins/box/emails/languages/de.lang.php +++ /dev/null @@ -1,19 +0,0 @@ - array( - 'Emails' => 'Emails', - 'Emails plugin for Monstra' => 'Email Plugin für Monstra', - 'Edit Layout' => 'Bearbeite Layout', - 'Email templates' => 'Email Templates', - 'Edit' => 'Bearbeiten', - 'Edit Email Template' => 'Bearbeite Email Template', - 'Name' => 'Name', - 'Email template content' => 'Email Template Inhalt', - 'Save and Exit' => 'Speichern und Beenden', - 'Save' => 'Speichern', - 'Cancel' => 'Abbrechen', - 'This email template does not exist' => 'Dieses Email Template existiert nicht', - 'Your changes to the email template :name have been saved.' => 'Deine Änderung am Email Template :name wurden gespeichert.', - ) - ); diff --git a/plugins/box/emails/languages/en.lang.php b/plugins/box/emails/languages/en.lang.php deleted file mode 100644 index c127945..0000000 --- a/plugins/box/emails/languages/en.lang.php +++ /dev/null @@ -1,19 +0,0 @@ - array( - 'Emails' => 'Emails', - 'Emails plugin for Monstra' => 'Emails plugin for Monstra', - 'Edit Layout' => 'Edit Layout', - 'Email templates' => 'Email templates', - 'Edit' => 'Edit', - 'Edit Email Template' => 'Edit Email Template', - 'Name' => 'Name', - 'Email template content' => 'Email template content', - 'Save and Exit' => 'Save and Exit', - 'Save' => 'Save', - 'Cancel' => 'Cancel', - 'This email template does not exist' => 'This email template does not exist', - 'Your changes to the email template :name have been saved.' => 'Your changes to the email template :name have been saved.', - ) - ); diff --git a/plugins/box/emails/languages/es.lang.php b/plugins/box/emails/languages/es.lang.php deleted file mode 100644 index f90dca4..0000000 --- a/plugins/box/emails/languages/es.lang.php +++ /dev/null @@ -1,19 +0,0 @@ - array( - 'Emails' => 'Emails', - 'Emails plugin for Monstra' => 'Emails plugin for Monstra', - 'Edit Layout' => 'Editar diseño', - 'Email templates' => 'Plantillas de email', - 'Edit' => 'Editar', - 'Edit Email Template' => 'Editar plantilla de email', - 'Name' => 'Nombre', - 'Email template content' => 'Contenido de la plantilla de email', - 'Save and Exit' => 'Guardar y salir', - 'Save' => 'Guardar', - 'Cancel' => 'Cancelar', - 'This email template does not exist' => 'Esta plantilla de email no existe', - 'Your changes to the email template :name have been saved.' => 'Tus cambios en la plantilla de email :name han sido guardados.', - ) - ); diff --git a/plugins/box/emails/languages/ka-ge.lang.php b/plugins/box/emails/languages/ka-ge.lang.php deleted file mode 100644 index 58b0d81..0000000 --- a/plugins/box/emails/languages/ka-ge.lang.php +++ /dev/null @@ -1,18 +0,0 @@ - array( - 'Emails' => 'ელ-ფáƒáƒ¡áƒ¢áƒ”ბი', - 'Emails plugin for Monstra' => 'პლáƒáƒ’ინი ელ-ფáƒáƒ¡áƒ¢áƒ”ბი Monstra-თვის', - 'Edit Layout' => 'ნიმუშის რედáƒáƒ¥áƒ¢áƒ˜áƒ áƒ”ბáƒ', - 'Email templates' => 'წერილების ნიმუში', - 'Edit' => 'რედáƒáƒ¥áƒ¢áƒ˜áƒ áƒ”ბáƒ', - 'Edit Email Template' => 'ელ-ფáƒáƒ¡áƒ¢áƒ”ბის ნიმუშის რედáƒáƒ¥áƒ¢áƒ˜áƒ áƒ”ბáƒ', - 'Name' => 'სáƒáƒ®áƒ”ლი', - 'Email template content' => 'ელ-ფáƒáƒ¡áƒ¢áƒ˜áƒ¡ კáƒáƒœáƒ¢áƒ”ნტის ნიმუში', - 'Save and Exit' => 'შენáƒáƒ®áƒ•რდრშემდეგ გáƒáƒ›áƒáƒ¡áƒ•ლáƒ', - 'Save' => 'შენáƒáƒ®áƒ•áƒ', - 'Cancel' => 'გáƒáƒ£áƒ¥áƒ›áƒ”ბáƒ', - 'This email template does not exist' => 'áƒáƒ¡áƒ”თი ელ-ფáƒáƒ¡áƒ¢áƒ˜áƒ¡ ნიმუში áƒáƒ  áƒáƒ áƒ¡áƒ”ბáƒáƒ‘ს', - 'Your changes to the email template :name have been saved.' => 'ელ-ფáƒáƒ¡áƒ¢áƒ˜áƒ¡ ნიმუშის ცვლილებები :name დáƒáƒ›áƒáƒ®áƒ¡áƒáƒ•რებულიáƒ.', - ) - ); diff --git a/plugins/box/emails/languages/pl.lang.php b/plugins/box/emails/languages/pl.lang.php deleted file mode 100644 index 21be9c4..0000000 --- a/plugins/box/emails/languages/pl.lang.php +++ /dev/null @@ -1,19 +0,0 @@ - array( - 'Emails' => 'WiadomoÅ›ci e-mail', - 'Emails plugin for Monstra' => 'Wtyczka wiadomoÅ›ci e-mail dla systemu Monstra', - 'Edit Layout' => 'Edit Layout', - 'Email templates' => 'Email templates', - 'Edit' => 'Edit', - 'Edit Email Template' => 'Edit Email Template', - 'Name' => 'Name', - 'Email template content' => 'Email template content', - 'Save and Exit' => 'Save and Exit', - 'Save' => 'Save', - 'Cancel' => 'Cancel', - 'This email template does not exist' => 'This email template does not exist', - 'Your changes to the email template :name have been saved.' => 'Your changes to the email template :name have been saved.', - ) - ); diff --git a/plugins/box/emails/languages/ru.lang.php b/plugins/box/emails/languages/ru.lang.php deleted file mode 100644 index fd70b09..0000000 --- a/plugins/box/emails/languages/ru.lang.php +++ /dev/null @@ -1,19 +0,0 @@ - array( - 'Emails' => 'ПиÑьма', - 'Emails plugin for Monstra' => 'Плагин emails Ð´Ð»Ñ Monstra', - 'Edit Layout' => 'Редактировать Шаблон', - 'Email templates' => 'Шаблоны ПиÑем', - 'Edit' => 'Редактировать', - 'Edit Email Template' => 'Редактировать Шаблоны ПиÑьма', - 'Name' => 'Ðазвание', - 'Email template content' => 'Конент Шаблона ПиÑьма', - 'Save and Exit' => 'Сохранить и выйты', - 'Save' => 'Сохранить', - 'Cancel' => 'Отменить', - 'This email template does not exist' => 'Этот емейл шаблон отÑутÑтвует', - 'Your changes to the email template :name have been saved.' => 'Ваши Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ðº емейл шаблону :name были Ñохранены.', - ) - ); diff --git a/plugins/box/emails/languages/sr.lang.php b/plugins/box/emails/languages/sr.lang.php deleted file mode 100644 index 9f8d4cb..0000000 --- a/plugins/box/emails/languages/sr.lang.php +++ /dev/null @@ -1,18 +0,0 @@ - array( - 'Emails' => 'Email', - 'Emails plugin for Monstra' => 'Email dodatak za Monstra', - 'Edit Layout' => 'Izmeni izgled', - 'Email templates' => 'Email Å¡abloni', - 'Edit' => 'Izmeni', - 'Edit Email Template' => 'Izmeni izgled Å¡ablonu', - 'Name' => 'Ime', - 'Email template content' => 'Email sadržaj Å¡ablona', - 'Save and Exit' => 'SaÄuvaj i izaÄ‘i', - 'Save' => 'SaÄuvaj', - 'Cancel' => 'Otkaži', - 'This email template does not exist' => 'Ovaj Å¡ablon ne postoji', - 'Your changes to the email template :name have been saved.' => 'Tvoje promene na Å¡ablonu :name su uspeÅ¡no saÄuvane.', - ) - ); diff --git a/plugins/box/emails/languages/tr.lang.php b/plugins/box/emails/languages/tr.lang.php deleted file mode 100644 index 12e6e58..0000000 --- a/plugins/box/emails/languages/tr.lang.php +++ /dev/null @@ -1,19 +0,0 @@ - array( - 'Emails' => 'E-postalar', - 'Emails plugin for Monstra' => 'Monstra için e-posta eklentisi', - 'Edit Layout' => 'Mizanpajı Düzenle', - 'Email templates' => 'E-posta ÅŸablonları', - 'Edit' => 'Düzenle', - 'Edit Email Template' => 'E-posta Åžablonunu Düzenle', - 'Name' => 'Ad', - 'Email template content' => 'E-posta ÅŸablonu içeriÄŸi', - 'Save and Exit' => 'Kaydet ve Çık', - 'Save' => 'Kaydet', - 'Cancel' => 'Vazgeç', - 'This email template does not exist' => 'Bu e-posta ÅŸablonu bulunamadı', - 'Your changes to the email template :name have been saved.' => 'DeÄŸiÅŸiklikleriniz :name adlı e-posta ÅŸablonuna kaydedildi.', - ) - ); diff --git a/plugins/box/emails/languages/uk.lang.php b/plugins/box/emails/languages/uk.lang.php deleted file mode 100644 index 2f1bd43..0000000 --- a/plugins/box/emails/languages/uk.lang.php +++ /dev/null @@ -1,19 +0,0 @@ - array( - 'Emails' => 'ЛиÑти', - 'Emails plugin for Monstra' => 'Плагін emails Ð´Ð»Ñ Monstra', - 'Edit Layout' => 'Редагувати Шаблон', - 'Email templates' => 'Шаблони ЛиÑтів', - 'Edit' => 'Редагувати', - 'Edit Email Template' => 'Редагувати Шаблони ЛиÑта', - 'Name' => 'Ðазва', - 'Email template content' => 'ВміÑÑ‚ Шаблону ЛиÑта', - 'Save and Exit' => 'Зберегти Ñ– вийти', - 'Save' => 'Зберегти', - 'Cancel' => 'Відмінити', - 'This email template does not exist' => 'Цей email шаблон відÑутній', - 'Your changes to the email template :name have been saved.' => 'Ваші зміни до email шаблону :name були збережені.', - ) - ); diff --git a/plugins/box/emails/views/backend/edit.view.php b/plugins/box/emails/views/backend/edit.view.php deleted file mode 100644 index 784db38..0000000 --- a/plugins/box/emails/views/backend/edit.view.php +++ /dev/null @@ -1,35 +0,0 @@ -

    - - - -
    - 'form-control'))); ?>.email.php -
    - -
    - 'width:100%;height:400px;', 'class' => 'source-editor form-control')) - ); -?> -
    - - 'btn btn-phone btn-primary')).Html::nbsp(2). - Form::submit('edit_email_template', __('Save', 'emails'), array('class' => 'btn btn-phone btn-primary')). Html::nbsp(2). - Html::anchor(__('Cancel', 'emails'), 'index.php?id=emails', array('title' => __('Cancel', 'emails'), 'class' => 'btn btn-phone btn-default')). - Form::close() - ); - -} else { - echo '
    '.__('This email template does not exist', 'emails').'
    '; -} -?> diff --git a/plugins/box/emails/views/backend/index.view.php b/plugins/box/emails/views/backend/index.view.php deleted file mode 100644 index 413978d..0000000 --- a/plugins/box/emails/views/backend/index.view.php +++ /dev/null @@ -1,37 +0,0 @@ -
    -
    -

    -
    -
    - __('Edit Layout', 'emails'), 'class' => 'btn btn-phone btn-primary')) - ); - ?> -
    -
    - - - - - - - - - - - - - - - - - - -
    -
    -
    - 'btn btn-primary')); ?> -
    -
    -
    diff --git a/plugins/box/emails/views/emails/email_layout.view.php b/plugins/box/emails/views/emails/email_layout.view.php deleted file mode 100644 index e2952d0..0000000 --- a/plugins/box/emails/views/emails/email_layout.view.php +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/plugins/box/filesmanager/css/.htaccess b/plugins/box/filesmanager/css/.htaccess deleted file mode 100644 index b9f48ac..0000000 --- a/plugins/box/filesmanager/css/.htaccess +++ /dev/null @@ -1,2 +0,0 @@ -Options -Indexes -Allow from all \ No newline at end of file diff --git a/plugins/box/filesmanager/css/style.css b/plugins/box/filesmanager/css/style.css deleted file mode 100644 index 065ecf4..0000000 --- a/plugins/box/filesmanager/css/style.css +++ /dev/null @@ -1,58 +0,0 @@ -.upload-area { - border:2px dashed #DEDEDE; - width:200px; - color:#DEDEDE; - text-align: center; - height: 34px; - display: inline-block; - float:left; - margin-left: 10px; -} - -.upload-area-dragenter { - border: 2px dashed #428bca !important; -} - -.upload-area-drop { - border: 2px dashed #428bca; -} - -.upload-progress { - height: 100%; - width: 0; - background-color: #428bca; - position: relative; - float: left; - max-width: 100%; - color: #ffffff; -} - -.upload-file-info { - display: inline-block; - float: left; -} - -.fileupload-controls { - float: left; -} - -.upload-file-pholder { - padding-top: 5px; -} - -.file-size-max-upload { - color: #ccc; - text-decoration: none; -} - -.file-size-max-upload:hover { - color: #ccc; - cursor: default; - text-decoration: none; -} - -@media (max-width: 320px) { - .create-new-dir { - float:left!important; - } -} \ No newline at end of file diff --git a/plugins/box/filesmanager/filesmanager.admin.php b/plugins/box/filesmanager/filesmanager.admin.php deleted file mode 100755 index 30f63d2..0000000 --- a/plugins/box/filesmanager/filesmanager.admin.php +++ /dev/null @@ -1,290 +0,0 @@ -assign('path', $path) - ->assign('current', $current) - ->assign('files_list', $files_list) - ->assign('dir_list', $dir_list) - ->assign('forbidden_types', $forbidden_types) - ->assign('image_types', $image_types) - ->assign('site_url', $site_url) - ->assign('upload_max_filesize', FilesmanagerAdmin::uploadSize()) - ->assign('files_path', $files_path) - ->assign('fileuploader', array( - 'uploadUrl' => $site_url.'/admin/index.php?id=filesmanager&path='.$path, - 'csrf' => Security::token(), - 'errorMsg' => __('Upload server error', 'filesmanager') - ))->display(); - - } - - /** - * Get directories and files in current path - */ - protected static function fdir($dir, $type = null) - { - $files = array(); - $c = 0; - $_dir = $dir; - if (is_dir($dir)) { - $dir = opendir ($dir); - while (false !== ($file = readdir($dir))) { - if (($file !=".") && ($file !="..")) { - $c++; - if (is_dir($_dir.$file)) { - $files['dirs'][$c] = $file; - } else { - $files['files'][$c] = $file; - } - } - } - closedir($dir); - - return $files; - } else { - return false; - } - } - - /** - * Get Upload Size - */ - public static function uploadSize() - { - return Number::byteFormat(min(Number::convertToBytes(ini_get('upload_max_filesize')), - Number::convertToBytes(ini_get('post_max_size')))); - } - -} diff --git a/plugins/box/filesmanager/filesmanager.plugin.php b/plugins/box/filesmanager/filesmanager.plugin.php deleted file mode 100644 index bb40dda..0000000 --- a/plugins/box/filesmanager/filesmanager.plugin.php +++ /dev/null @@ -1,29 +0,0 @@ - - - plugins/box/filesmanager/filesmanager.plugin.php - active - 2 - FilesManager - Simple file manger for Monstra - 1.0.0 - Awilum - http://monstra.org/ - diff --git a/plugins/box/filesmanager/js/.htaccess b/plugins/box/filesmanager/js/.htaccess deleted file mode 100644 index b9f48ac..0000000 --- a/plugins/box/filesmanager/js/.htaccess +++ /dev/null @@ -1,2 +0,0 @@ -Options -Indexes -Allow from all \ No newline at end of file diff --git a/plugins/box/filesmanager/js/filesmanager.js b/plugins/box/filesmanager/js/filesmanager.js deleted file mode 100644 index edacd6e..0000000 --- a/plugins/box/filesmanager/js/filesmanager.js +++ /dev/null @@ -1,54 +0,0 @@ -if (typeof $.monstra == 'undefined') $.monstra = {}; - -$.monstra.filesmanager = { - - init: function(){ - $('#filesDirsList').on('click', '.js-rename-dir', function(e){ - $.monstra.filesmanager.showRenameDialog( - 'dir', - $(e.currentTarget).attr('data-dirname'), - $(e.currentTarget).attr('data-path') - ); - }); - $('#filesDirsList').on('click', '.js-rename-file', function(e){ - $.monstra.filesmanager.showRenameDialog( - 'file', - $(e.currentTarget).attr('data-filename'), - $(e.currentTarget).attr('data-path') - ); - }); - $('#filesDirsList').on('click', '.js-file-info', function(e, el){ - $.monstra.filesmanager.showInfoDialog(e.currentTarget); - }); - }, - - showRenameDialog: function(type, renameFrom, path){ - var dialog = $('#renameDialog'); - dialog.find('input[name="rename_type"]').val(type); - dialog.find('input[name="rename_from"]').val(renameFrom); - dialog.find('input[name="path"]').val(path); - dialog.find('#renameToHolder').text(renameFrom); - dialog.find('[id$="RenameType"]').hide(); - dialog.find('#'+ type +'RenameType').show(); - dialog.modal('show'); - }, - - showInfoDialog: function(btnEl){ - var dialog = $('#fileInfoDialog'); - dialog.find('.js-dimension-blck').hide(); - dialog.find('.js-filename').html($(btnEl).attr('data-filename')); - dialog.find('.js-filetype').html($(btnEl).attr('data-filetype')); - dialog.find('.js-filesize').html($(btnEl).attr('data-filesize')); - dialog.find('.js-link').html($(btnEl).attr('data-link')); - var dimension = $(btnEl).attr('data-dimension').trim(); - if (dimension) { - dialog.find('.js-dimension').html(dimension); - dialog.find('.js-dimension-blck').show(); - } - dialog.modal('show'); - } -}; - -$(document).ready(function(){ - $.monstra.filesmanager.init(); -}); \ No newline at end of file diff --git a/plugins/box/filesmanager/js/fileuploader.js b/plugins/box/filesmanager/js/fileuploader.js deleted file mode 100644 index f0b3cce..0000000 --- a/plugins/box/filesmanager/js/fileuploader.js +++ /dev/null @@ -1,123 +0,0 @@ -if (typeof $.monstra == 'undefined') $.monstra = {}; - -$.monstra.fileuploader = { - - conf: { - uploadUrl: '', - csrf: '', - errorMsg: '', - uploaderId: '' - }, - - _uploaderObj: null, - - init: function(conf){ - if (!conf.uploaderId) { - throw 'uploaderId not specified'; - } - $.extend(this.conf, conf); - this._uploaderObj = $('#'+ this.conf.uploaderId); - var area = this._uploaderObj.find('.upload-area'); - area.off('dragenter.fuploader').on('dragenter.fuploader', function(e){ - e.stopPropagation(); - e.preventDefault(); - $(this).addClass('upload-area-dragenter'); - }); - area.off('dragover.fuploader').on('dragover.fuploader', function(e){ - e.stopPropagation(); - e.preventDefault(); - }); - area.off('drop.fuploader').on('drop.fuploader', function(e){ - $(this).removeClass('upload-area-dragenter').removeClass('upload-area-dragover').addClass('upload-area-drop'); - e.preventDefault(); - var files = e.originalEvent.dataTransfer.files; - $.monstra.fileuploader.uploadFileHandle(files, area); - }); - $(document).off('dragover.fuploader').on('dragover.fuploader', function(e){ - e.stopPropagation(); - e.preventDefault(); - area.removeClass('upload-area-dragenter').removeClass('upload-area-drop').addClass('upload-area-dragover'); - }); - $(document).off('dragenter.fuploader').on('dragenter.fuploader', function(e){ - e.stopPropagation(); - e.preventDefault(); - }); - $(document).off('drop.fuploader').on('drop.fuploader', function(e){ - e.stopPropagation(); - e.preventDefault(); - }); - }, - - uploadFileHandle: function(files, area){ - for (var i = 0; i < files.length; i++){ - var fd = new FormData(); - fd.append('file', files[i]); - fd.append('upload_file', 'upload_file'); - fd.append('dragndrop', '1'); - fd.append('csrf', $.monstra.fileuploader.conf.csrf); - //this.setFileNameSize(files[i].name, files[i].size); - - this.uploadFile(fd, status); - } - }, - - uploadFile: function(formData, status){ - var jqXHR = $.ajax({ - url: $.monstra.fileuploader.conf.uploadUrl, - type: 'POST', - contentType: false, - processData: false, - cache: false, - data: formData, - xhr: function() { - var xhrobj = $.ajaxSettings.xhr(); - if (xhrobj.upload) { - xhrobj.upload.addEventListener('progress', function(event) { - var percent = 0; - var position = event.loaded || event.position; - var total = event.total; - if (event.lengthComputable) { - percent = Math.ceil(position / total * 100); - } - $.monstra.fileuploader.setProgress(percent); - }, false); - } - return xhrobj; - }, - success: function(data){ - $.monstra.fileuploader.setProgress(100); - $.event.trigger('uploaded.fuploader'); - }, - error: function(){ - Messenger().post({ - type: 'error', - message : $.monstra.fileuploader.conf.errorMsg, - hideAfter: 3 - }); - this._uploaderObj.find('.upload-progress').animate({ width: 0 }, 1); - this._uploaderObj.find('.upload-file-pholder').show(); - } - }); - }, - - setProgress: function(progress){ - if (parseInt(progress) > 0) { - this._uploaderObj.find('.upload-file-pholder').hide(); - } - var progressBarWidth = progress * this._uploaderObj.find('.upload-area').width() / 100; - this._uploaderObj.find('.upload-progress').animate({ width: progressBarWidth }, 10); - }, - - setFileNameSize: function(fname, fsize){ - var sizeStr = ''; - var sizeKB = fsize / 1024; - if(parseInt(sizeKB) > 1024){ - var sizeMB = sizeKB/1024; - sizeStr = sizeMB.toFixed(2)+' MB'; - } else { - sizeStr = sizeKB.toFixed(2)+' KB'; - } - - this._uploaderObj.find('.upload-file-info').html(fname +' '+ sizeStr); - } -}; diff --git a/plugins/box/filesmanager/languages/cs.lang.php b/plugins/box/filesmanager/languages/cs.lang.php deleted file mode 100644 index e8ff896..0000000 --- a/plugins/box/filesmanager/languages/cs.lang.php +++ /dev/null @@ -1,42 +0,0 @@ - array( - 'Files' => 'Soubory', - 'Files manager' => 'Správce souborů', - 'Name' => 'Název', - 'Actions' => 'Akce', - 'Delete' => 'Vymazat', - 'Upload' => 'Nahrat', - 'Drop File Here' => 'Sem vložte soubory', - 'Maximum upload file size: :upload_max_filesize' => 'Maximální velikost souboru: :upload_max_filesize', - 'Rename' => 'PÅ™ejmenovat', - 'Renamed successfully' => 'PÅ™ejmenováno', - 'Failure' => 'Chyba', - 'Forbidden file type' => 'Nepovolený typ souboru', - 'Upload server error' => 'Chyba pÅ™i nahrávání', - 'Can not be empty' => 'Nesmí být prázdné', - 'Create New Directory' => 'VytvoÅ™it nový adresář', - 'Directory Name' => 'Název adresáře', - 'Directory:' => 'Adresář:', - 'Directory was not created' => 'Adresář nebyl vytvoÅ™en', - 'Directory was created' => 'Adresář byl vytvoÅ™en', - 'Directory was deleted' => 'Adresář byl odstranÄ›n', - 'Directory was not deleted' => 'Adresář nebyl odstranÄ›n', - 'Directory exists' => 'Adresář existuje', - 'File:' => 'Soubor:', - 'File was uploaded' => 'Soubor nebyl vytvoÅ™en', - 'File was not uploaded' => 'Soubor byl vytvoÅ™en', - 'File was deleted' => 'Soubor byl odstranÄ›n', - 'File was not deleted' => 'Soubor nebyl odstranÄ›n', - 'File exists' => 'Soubor existuje', - 'Cancel' => 'ZruÅ¡it', - 'Create' => 'VytvoÅ™it', - 'directory' => 'adresář', - 'Delete directory: :dir' => 'Vymazat adresář: :dir', - 'Delete file: :file' => 'Vymazat soubor :file', - 'Extension' => 'Přípona', - 'Size' => 'Velikost', - 'Select file' => 'Vybrat soubor', - ) - ); diff --git a/plugins/box/filesmanager/languages/de.lang.php b/plugins/box/filesmanager/languages/de.lang.php deleted file mode 100644 index 6773130..0000000 --- a/plugins/box/filesmanager/languages/de.lang.php +++ /dev/null @@ -1,19 +0,0 @@ - array( - 'Files' => 'Dateien', - 'Files manager' => 'Datei-Manager', - 'Name' => 'Name', - 'Actions' => 'Aktionen', - 'Delete' => 'Löschen', - 'Upload' => 'Hochladen', - 'directory' => 'Ordner', - 'Delete directory: :dir' => 'Lösche Ordner: :dir', - 'Delete file: :file' => 'Lösche Datei: file', - 'Extension' => 'Dateiendung', - 'Size' => 'Größe', - 'Select file' => 'Datei wählen', - 'Change' => 'Ändern', - ) - ); diff --git a/plugins/box/filesmanager/languages/en.lang.php b/plugins/box/filesmanager/languages/en.lang.php deleted file mode 100644 index 562fea3..0000000 --- a/plugins/box/filesmanager/languages/en.lang.php +++ /dev/null @@ -1,38 +0,0 @@ - array( - 'Files' => 'Files', - 'Files manager' => 'Files manager', - 'Name' => 'Name', - 'Actions' => 'Actions', - 'Delete' => 'Delete', - 'Upload' => 'Upload', - 'Create New Directory' => 'Create New Directory', - 'directory' => 'directory', - 'Delete directory: :dir' => 'Delete directory: :dir', - 'Delete file: :file' => 'Delete file :file', - 'Extension' => 'Extension', - 'Size' => 'Size', - 'Select file' => 'Select file', - 'Change' => 'Change', - 'Rename' => 'Rename', - 'File was deleted' => 'File was deleted', - 'File was not deleted' => 'File was not deleted', - 'Directory was deleted' => 'Directory was deleted', - 'Directory was not deleted' => 'Directory was not deleted', - 'Can not be empty' => 'Can not be empty', - 'Directory exists' => 'Directory exists', - 'File exists' => 'File exists', - 'Renamed successfully' => 'Renamed successfully', - 'Failure' => 'Failure', - 'File was uploaded' => 'File was uploaded', - 'Directory was not created' => 'Directory was not created', - 'Directory was created' => 'Directory was created', - 'Upload server error' => 'Upload server error', - 'Directory:' => 'Directory:', - 'File:' => 'File:', - 'Drop File Here' => 'Drop File Here', - 'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize', - ) - ); diff --git a/plugins/box/filesmanager/languages/es.lang.php b/plugins/box/filesmanager/languages/es.lang.php deleted file mode 100644 index 03ed0a4..0000000 --- a/plugins/box/filesmanager/languages/es.lang.php +++ /dev/null @@ -1,43 +0,0 @@ - array( - 'Files' => 'Archivos', - 'Files manager' => 'Administrador de archivos', - 'Name' => 'Nombre', - 'Actions' => 'Acciones', - 'Delete' => 'Eliminar', - 'Upload' => 'Subir', - 'Drop File Here' => 'Arrastrar archivo aquí', - 'Maximum upload file size: :upload_max_filesize' => 'Tamaño máximo de subida: :upload_max_filesize', - 'Rename' => 'Renombrar', - 'Renamed successfully' => 'Renombrado exitoso', - 'Failure' => 'Fracaso', - 'Forbidden file type' => 'Tipo de archivo prohibido', - 'Upload server error' => 'Error de subida del servidor', - 'Can not be empty' => 'No puede estar vacío', - 'Create New Directory' => 'Crear nuevo directorio', - 'Directory Name' => 'Nombre del directorio', - 'Directory:' => 'Directorio:', - 'Directory was not created' => 'El directorio no fue creado', - 'Directory was created' => 'El directorio fue creado', - 'Directory was deleted' => 'El directorio fue eliminado', - 'Directory was not deleted' => 'El directorio no fue eliminado', - 'Directory exists' => 'El directorio ya existe', - 'File:' => 'Archivo:', - 'File was uploaded' => 'El archivo fue subido', - 'File was not uploaded' => 'El archivo no fue subido', - 'File was deleted' => 'El archivo fue eliminado', - 'File was not deleted' => 'El archivo no fue eliminado', - 'File exists' => 'El archivo ya existe', - 'Cancel' => 'Cancelar', - 'Create' => 'Crear', - 'directory' => 'directorio', - 'Delete directory: :dir' => 'Eliminar directorio: :dir', - 'Delete file: :file' => 'Eliminar archivo: :file', - 'Extension' => 'Extensión', - 'Size' => 'Tamaño', - 'Select file' => 'Seleccionar archivo', - 'Change' => 'Cambiar', - ) - ); diff --git a/plugins/box/filesmanager/languages/fa.lang.php b/plugins/box/filesmanager/languages/fa.lang.php deleted file mode 100644 index 04e0e6b..0000000 --- a/plugins/box/filesmanager/languages/fa.lang.php +++ /dev/null @@ -1,43 +0,0 @@ - array( - 'Files' => 'ÙØ§ÛŒÙ„ها', - 'Files manager' => 'مدیریت ÙØ§ÛŒÙ„ها', - 'Name' => 'نام', - 'Actions' => 'عملیات', - 'Delete' => 'حذÙ', - 'Upload' => 'آپلود', - 'Drop File Here' => 'Drop File Here', - 'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize', - 'Rename' => 'Rename', - 'Renamed successfully' => 'Renamed successfully', - 'Failure' => 'Failure', - 'Forbidden file type' => 'Forbidden file type', - 'Upload server error' => 'Upload server error', - 'Can not be empty' => 'Can not be empty', - 'Create New Directory' => 'Create New Directory', - 'Directory Name' => 'Directory Name', - 'Directory:' => 'Directory:', - 'Directory was not created' => 'Directory was not created', - 'Directory was created' => 'Directory was created', - 'Directory was deleted' => 'Directory was deleted', - 'Directory was not deleted' => 'Directory was not deleted', - 'Directory exists' => 'Directory exists', - 'File:' => 'File:', - 'File was uploaded' => 'File was uploaded', - 'File was not uploaded' => 'File was not uploaded', - 'File was deleted' => 'File was deleted', - 'File was not deleted' => 'File was not deleted', - 'File exists' => 'File exists', - 'Cancel' => 'Cancel', - 'Create' => 'Create', - 'directory' => 'شاخه', - 'Delete directory: :dir' => 'حذ٠شاخه: :dir', - 'Delete file: :file' => 'Ø­Ø°Ù ÙØ§ÛŒÙ„ :file', - 'Extension' => 'پسوند', - 'Size' => 'اندازه', - 'Select file' => 'Select file', - 'Change' => 'Change', - ) - ); diff --git a/plugins/box/filesmanager/languages/fr.lang.php b/plugins/box/filesmanager/languages/fr.lang.php deleted file mode 100644 index 1b542f4..0000000 --- a/plugins/box/filesmanager/languages/fr.lang.php +++ /dev/null @@ -1,43 +0,0 @@ - array( - 'Files' => 'Fichiers', - 'Files manager' => 'Gestionnaire de fichiers', - 'Name' => 'Nom', - 'Actions' => 'Actions', - 'Delete' => 'Supprimer', - 'Upload' => 'Upload', - 'Drop File Here' => 'Drop File Here', - 'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize', - 'Rename' => 'Rename', - 'Renamed successfully' => 'Renamed successfully', - 'Failure' => 'Failure', - 'Forbidden file type' => 'Forbidden file type', - 'Upload server error' => 'Upload server error', - 'Can not be empty' => 'Can not be empty', - 'Create New Directory' => 'Create New Directory', - 'Directory Name' => 'Directory Name', - 'Directory:' => 'Directory:', - 'Directory was not created' => 'Directory was not created', - 'Directory was created' => 'Directory was created', - 'Directory was deleted' => 'Directory was deleted', - 'Directory was not deleted' => 'Directory was not deleted', - 'Directory exists' => 'Directory exists', - 'File:' => 'File:', - 'File was uploaded' => 'File was uploaded', - 'File was not uploaded' => 'File was not uploaded', - 'File was deleted' => 'File was deleted', - 'File was not deleted' => 'File was not deleted', - 'File exists' => 'File exists', - 'Cancel' => 'Cancel', - 'Create' => 'Create', - 'directory' => 'Répertoire', - 'Delete directory: :dir' => 'Supprimer le répertoire: :dir', - 'Delete file: :file' => 'Supprimer le fichier :file', - 'Extension' => 'Extension', - 'Size' => 'Taille', - 'Select file' => 'Select file', - 'Change' => 'Change', - ) - ); diff --git a/plugins/box/filesmanager/languages/hu.lang.php b/plugins/box/filesmanager/languages/hu.lang.php deleted file mode 100644 index a7920ed..0000000 --- a/plugins/box/filesmanager/languages/hu.lang.php +++ /dev/null @@ -1,43 +0,0 @@ - array( - 'Files' => 'Fájlok', - 'Files manager' => 'FájlkezelÅ‘', - 'Name' => 'Név', - 'Actions' => 'Műveletek', - 'Delete' => 'Törlés', - 'Upload' => 'Feltöltés', - 'Drop File Here' => 'Drop File Here', - 'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize', - 'Rename' => 'Rename', - 'Renamed successfully' => 'Renamed successfully', - 'Failure' => 'Failure', - 'Forbidden file type' => 'Forbidden file type', - 'Upload server error' => 'Upload server error', - 'Can not be empty' => 'Can not be empty', - 'Create New Directory' => 'Create New Directory', - 'Directory Name' => 'Directory Name', - 'Directory:' => 'Directory:', - 'Directory was not created' => 'Directory was not created', - 'Directory was created' => 'Directory was created', - 'Directory was deleted' => 'Directory was deleted', - 'Directory was not deleted' => 'Directory was not deleted', - 'Directory exists' => 'Directory exists', - 'File:' => 'File:', - 'File was uploaded' => 'File was uploaded', - 'File was not uploaded' => 'File was not uploaded', - 'File was deleted' => 'File was deleted', - 'File was not deleted' => 'File was not deleted', - 'File exists' => 'File exists', - 'Cancel' => 'Cancel', - 'Create' => 'Create', - 'directory' => 'directory', - 'Delete directory: :dir' => 'Directory törlése: :dir', - 'Delete file: :file' => 'Fájl törlése :file', - 'Extension' => 'BÅ‘vítmény', - 'Size' => 'Méret', - 'Select file' => 'Select file', - 'Change' => 'Change', - ) - ); diff --git a/plugins/box/filesmanager/languages/id.lang.php b/plugins/box/filesmanager/languages/id.lang.php deleted file mode 100644 index bd260d0..0000000 --- a/plugins/box/filesmanager/languages/id.lang.php +++ /dev/null @@ -1,43 +0,0 @@ - array( - 'Files' => 'File', - 'Files manager' => 'Pengaturan File', - 'Name' => 'Nama', - 'Actions' => 'Tindakan', - 'Delete' => 'Hapus', - 'Upload' => 'Unduh', - 'Drop File Here' => 'Drop File Here', - 'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize', - 'Rename' => 'Rename', - 'Renamed successfully' => 'Renamed successfully', - 'Failure' => 'Failure', - 'Forbidden file type' => 'Forbidden file type', - 'Upload server error' => 'Upload server error', - 'Can not be empty' => 'Can not be empty', - 'Create New Directory' => 'Create New Directory', - 'Directory Name' => 'Directory Name', - 'Directory:' => 'Directory:', - 'Directory was not created' => 'Directory was not created', - 'Directory was created' => 'Directory was created', - 'Directory was deleted' => 'Directory was deleted', - 'Directory was not deleted' => 'Directory was not deleted', - 'Directory exists' => 'Directory exists', - 'File:' => 'File:', - 'File was uploaded' => 'File was uploaded', - 'File was not uploaded' => 'File was not uploaded', - 'File was deleted' => 'File was deleted', - 'File was not deleted' => 'File was not deleted', - 'File exists' => 'File exists', - 'Cancel' => 'Cancel', - 'Create' => 'Create', - 'directory' => 'Direktori', - 'Delete directory: :dir' => 'Hapus Direktori: :dir', - 'Delete file: :file' => 'Hapus File: :file', - 'Extension' => 'Tambahan', - 'Size' => 'Ukuran', - 'Select file' => 'Pilih File', - 'Change' => 'Ubah', - ) - ); diff --git a/plugins/box/filesmanager/languages/it.lang.php b/plugins/box/filesmanager/languages/it.lang.php deleted file mode 100644 index 89ff5ef..0000000 --- a/plugins/box/filesmanager/languages/it.lang.php +++ /dev/null @@ -1,43 +0,0 @@ - array( - 'Files' => 'File', - 'Files manager' => 'Gestione file', - 'Name' => 'Nome', - 'Actions' => 'Azioni', - 'Delete' => 'Elimina', - 'Upload' => 'Carica', - 'Drop File Here' => 'Drop File Here', - 'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize', - 'Rename' => 'Rename', - 'Renamed successfully' => 'Renamed successfully', - 'Failure' => 'Failure', - 'Forbidden file type' => 'Forbidden file type', - 'Upload server error' => 'Upload server error', - 'Can not be empty' => 'Can not be empty', - 'Create New Directory' => 'Create New Directory', - 'Directory Name' => 'Directory Name', - 'Directory:' => 'Directory:', - 'Directory was not created' => 'Directory was not created', - 'Directory was created' => 'Directory was created', - 'Directory was deleted' => 'Directory was deleted', - 'Directory was not deleted' => 'Directory was not deleted', - 'Directory exists' => 'Directory exists', - 'File:' => 'File:', - 'File was uploaded' => 'File was uploaded', - 'File was not uploaded' => 'File was not uploaded', - 'File was deleted' => 'File was deleted', - 'File was not deleted' => 'File was not deleted', - 'File exists' => 'File exists', - 'Cancel' => 'Cancel', - 'Create' => 'Create', - 'directory' => 'cartella', - 'Delete directory: :dir' => 'Elimina cartella: :dir', - 'Delete file: :file' => 'Elimina file :file', - 'Extension' => 'Estensione', - 'Size' => 'Dimensione', - 'Select file' => 'Select file', - 'Change' => 'Change', - ) - ); diff --git a/plugins/box/filesmanager/languages/ja.lang.php b/plugins/box/filesmanager/languages/ja.lang.php deleted file mode 100644 index 9fb8062..0000000 --- a/plugins/box/filesmanager/languages/ja.lang.php +++ /dev/null @@ -1,43 +0,0 @@ - array( - 'Files' => 'ファイル', - 'Files manager' => 'ファイルã®ç®¡ç†', - 'Name' => 'åå‰', - 'Actions' => 'æ“作', - 'Delete' => '削除', - 'Upload' => 'アップロード', - 'Drop File Here' => 'Drop File Here', - 'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize', - 'Rename' => 'Rename', - 'Renamed successfully' => 'Renamed successfully', - 'Failure' => 'Failure', - 'Forbidden file type' => 'Forbidden file type', - 'Upload server error' => 'Upload server error', - 'Can not be empty' => 'Can not be empty', - 'Create New Directory' => 'Create New Directory', - 'Directory Name' => 'Directory Name', - 'Directory:' => 'Directory:', - 'Directory was not created' => 'Directory was not created', - 'Directory was created' => 'Directory was created', - 'Directory was deleted' => 'Directory was deleted', - 'Directory was not deleted' => 'Directory was not deleted', - 'Directory exists' => 'Directory exists', - 'File:' => 'File:', - 'File was uploaded' => 'File was uploaded', - 'File was not uploaded' => 'File was not uploaded', - 'File was deleted' => 'File was deleted', - 'File was not deleted' => 'File was not deleted', - 'File exists' => 'File exists', - 'Cancel' => 'Cancel', - 'Create' => 'Create', - 'directory' => 'ディレクトリ', - 'Delete directory: :dir' => 'ディレクトリã®å‰Šé™¤: :dir', - 'Delete file: :file' => 'ファイルã®å‰Šé™¤ :file', - 'Extension' => 'æ‹¡å¼µå­', - 'Size' => 'サイズ', - 'Select file' => 'ファイルã®é¸æŠž', - 'Change' => '変更', - ) - ); diff --git a/plugins/box/filesmanager/languages/ka-ge.lang.php b/plugins/box/filesmanager/languages/ka-ge.lang.php deleted file mode 100644 index a279ba1..0000000 --- a/plugins/box/filesmanager/languages/ka-ge.lang.php +++ /dev/null @@ -1,50 +0,0 @@ - array( - 'Files' => 'ფáƒáƒ˜áƒšáƒ”ბი', - 'Files manager' => 'ფáƒáƒ˜áƒšáƒ”ბის მენეჯერი', - 'Name' => 'სáƒáƒ®áƒ”ლი', - 'Actions' => 'მáƒáƒ¥áƒ›áƒ”დებáƒ', - 'Delete' => 'წáƒáƒ¨áƒšáƒ', - 'Upload' => 'áƒáƒ¢áƒ•ირთვáƒ', - 'Drop File Here' => 'გáƒáƒ“áƒáƒ˜áƒ¢áƒáƒœáƒ”თ ფáƒáƒ˜áƒšáƒ˜ áƒáƒ¥', - 'Maximum upload file size: :upload_max_filesize' => 'ფáƒáƒ˜áƒšáƒ˜áƒ¡ მáƒáƒ¥áƒ¡áƒ˜áƒ›áƒáƒšáƒ£áƒ áƒ˜ ზáƒáƒ›áƒ: :upload_max_filesize', - 'Rename' => 'გáƒáƒ“áƒáƒ áƒ¥áƒ›áƒ”ვáƒ', - 'Renamed successfully' => 'წáƒáƒ áƒ›áƒáƒ¢áƒ”ბით გáƒáƒ“áƒáƒ˜áƒ áƒ¥áƒ•áƒ', - 'Failure' => 'ვერ მáƒáƒ®áƒ”რხდáƒ', - 'Forbidden file type' => 'ფáƒáƒ˜áƒšáƒ˜áƒ¡ áƒáƒ™áƒ áƒ«áƒáƒšáƒ£áƒšáƒ˜ ტიპი', - 'Upload server error' => 'სერვერის შეცდáƒáƒ›áƒ áƒáƒ¢áƒ•ირთვის დრáƒáƒ¡', - 'Can not be empty' => 'áƒáƒ  შეიძლებრცáƒáƒ áƒ˜áƒ”ლი იყáƒáƒ¡', - 'Create New Directory' => 'áƒáƒ®áƒáƒšáƒ˜ დირექტáƒáƒ áƒ˜áƒ˜áƒ¡ შექმნáƒ', - 'Directory Name' => 'დირექტáƒáƒ áƒ˜áƒ˜áƒ¡ სáƒáƒ®áƒ”ლი', - 'Directory:' => 'დირექტáƒáƒ áƒ˜áƒ:', - 'Directory was not created' => 'დირექტáƒáƒ áƒ˜áƒ ვერ შეიქმნáƒ', - 'Directory was created' => 'დირექტáƒáƒ áƒ˜áƒ შეიქმნáƒ', - 'Directory was deleted' => 'დირექტáƒáƒ áƒ˜áƒ წáƒáƒ¨áƒšáƒ˜áƒšáƒ˜áƒ', - 'Directory was not deleted' => 'დირექტáƒáƒ áƒ˜áƒ ვერ წáƒáƒ˜áƒ¨áƒáƒšáƒ', - 'Directory exists' => 'დირექტáƒáƒ áƒ˜áƒ უკვე áƒáƒ áƒ¡áƒ”ბáƒáƒ‘ს', - 'File:' => 'ფáƒáƒ˜áƒšáƒ˜:', - 'File was uploaded' => 'ფáƒáƒ˜áƒšáƒ˜ áƒáƒ˜áƒ¢áƒ•ირთáƒ', - 'File was not uploaded' => 'ფáƒáƒ˜áƒšáƒ˜ ვერ áƒáƒ˜áƒ¢áƒ•ირთáƒ', - 'File was deleted' => 'ფáƒáƒ˜áƒšáƒ˜ წáƒáƒ¨áƒšáƒ˜áƒšáƒ˜áƒ', - 'File was not deleted' => 'ფáƒáƒ˜áƒšáƒ˜ ვერ წáƒáƒ˜áƒ¨áƒáƒšáƒ', - 'File exists' => 'ფáƒáƒ˜áƒšáƒ˜ უკვე áƒáƒ áƒ¡áƒ”ბáƒáƒ‘ს', - 'Cancel' => 'გáƒáƒ£áƒ¥áƒ›áƒ”ბáƒ', - 'Create' => 'შექმნáƒ', - 'directory' => 'დირექტáƒáƒ áƒ˜áƒ', - 'Delete directory: :dir' => 'დირექტáƒáƒ áƒ˜áƒ˜áƒ¡ წáƒáƒ¨áƒšáƒ: :dir', - 'Delete file: :file' => 'ფáƒáƒ˜áƒšáƒ˜áƒ¡ წáƒáƒ¨áƒšáƒ:file', - 'Extension' => 'გáƒáƒ¤áƒáƒ áƒ—áƒáƒ”ბáƒ', - 'Size' => 'ფáƒáƒ˜áƒšáƒ˜', - 'Select file' => 'ფáƒáƒ˜áƒšáƒ˜áƒ¡ áƒáƒ›áƒáƒ áƒ©áƒ”ვáƒ', - 'Change' => 'შეცვლáƒ', - 'Info' => 'ინფáƒ', - 'File Information' => 'ინფáƒáƒ áƒ›áƒáƒªáƒ˜áƒ ფáƒáƒ˜áƒšáƒ–ე', - 'Filename' => 'ფáƒáƒ˜áƒšáƒ˜áƒ¡ სáƒáƒ®áƒ”ლწáƒáƒ“ებáƒ', - 'Filetype' => 'ფáƒáƒ˜áƒšáƒ˜áƒ¡ ტიპი', - 'Filesize' => 'ფáƒáƒ˜áƒšáƒ˜áƒ¡ ზáƒáƒ›áƒ', - 'Dimension' => 'სიდიდე', - 'Link' => 'ბმული', - ) - ); diff --git a/plugins/box/filesmanager/languages/lt.lang.php b/plugins/box/filesmanager/languages/lt.lang.php deleted file mode 100644 index 1e37f53..0000000 --- a/plugins/box/filesmanager/languages/lt.lang.php +++ /dev/null @@ -1,43 +0,0 @@ - array( - 'Files' => 'Bylos', - 'Files manager' => 'Bylų tvarkyklÄ—', - 'Name' => 'Pavadinimas', - 'Actions' => 'Veiksmai', - 'Delete' => 'IÅ¡trinti', - 'Upload' => 'Ä®kelti', - 'Drop File Here' => 'Drop File Here', - 'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize', - 'Rename' => 'Rename', - 'Renamed successfully' => 'Renamed successfully', - 'Failure' => 'Failure', - 'Forbidden file type' => 'Forbidden file type', - 'Upload server error' => 'Upload server error', - 'Can not be empty' => 'Can not be empty', - 'Create New Directory' => 'Create New Directory', - 'Directory Name' => 'Directory Name', - 'Directory:' => 'Directory:', - 'Directory was not created' => 'Directory was not created', - 'Directory was created' => 'Directory was created', - 'Directory was deleted' => 'Directory was deleted', - 'Directory was not deleted' => 'Directory was not deleted', - 'Directory exists' => 'Directory exists', - 'File:' => 'File:', - 'File was uploaded' => 'File was uploaded', - 'File was not uploaded' => 'File was not uploaded', - 'File was deleted' => 'File was deleted', - 'File was not deleted' => 'File was not deleted', - 'File exists' => 'File exists', - 'Cancel' => 'Cancel', - 'Create' => 'Create', - 'directory' => 'aplankas', - 'Delete directory: :dir' => 'IÅ¡trinti aplankÄ…: :dir', - 'Delete file: :file' => 'IÅ¡trinti bylÄ… :file', - 'Extension' => 'PlÄ—tinys', - 'Size' => 'Dydis', - 'Select file' => 'Select file', - 'Change' => 'Change', - ) - ); diff --git a/plugins/box/filesmanager/languages/nl.lang.php b/plugins/box/filesmanager/languages/nl.lang.php deleted file mode 100644 index f114279..0000000 --- a/plugins/box/filesmanager/languages/nl.lang.php +++ /dev/null @@ -1,43 +0,0 @@ - array( - 'Files' => 'Bestanden', - 'Files manager' => 'Bestandsbeheer', - 'Name' => 'Naam', - 'Actions' => 'Acties', - 'Delete' => 'Verwijderen', - 'Upload' => 'Uploaden', - 'Drop File Here' => 'Drop File Here', - 'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize', - 'Rename' => 'Rename', - 'Renamed successfully' => 'Renamed successfully', - 'Failure' => 'Failure', - 'Forbidden file type' => 'Forbidden file type', - 'Upload server error' => 'Upload server error', - 'Can not be empty' => 'Can not be empty', - 'Create New Directory' => 'Create New Directory', - 'Directory Name' => 'Directory Name', - 'Directory:' => 'Directory:', - 'Directory was not created' => 'Directory was not created', - 'Directory was created' => 'Directory was created', - 'Directory was deleted' => 'Directory was deleted', - 'Directory was not deleted' => 'Directory was not deleted', - 'Directory exists' => 'Directory exists', - 'File:' => 'File:', - 'File was uploaded' => 'File was uploaded', - 'File was not uploaded' => 'File was not uploaded', - 'File was deleted' => 'File was deleted', - 'File was not deleted' => 'File was not deleted', - 'File exists' => 'File exists', - 'Cancel' => 'Cancel', - 'Create' => 'Create', - 'directory' => 'Map', - 'Delete directory: :dir' => 'Verwijder map: :dir', - 'Delete file: :file' => 'Verwijder bestand: :file', - 'Extension' => 'Type', - 'Size' => 'Grootte', - 'Select file' => 'Select file', - 'Change' => 'Change', - ) - ); diff --git a/plugins/box/filesmanager/languages/pl.lang.php b/plugins/box/filesmanager/languages/pl.lang.php deleted file mode 100644 index fbed8a0..0000000 --- a/plugins/box/filesmanager/languages/pl.lang.php +++ /dev/null @@ -1,43 +0,0 @@ - array( - 'Files' => 'Pliki', - 'Files manager' => 'ZarzÄ…dzaj plikami', - 'Name' => 'Nazwa', - 'Actions' => 'Akcje', - 'Delete' => 'UsuÅ„', - 'Upload' => 'PrzeÅ›lij', - 'Drop File Here' => 'Drop File Here', - 'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize', - 'Rename' => 'Rename', - 'Renamed successfully' => 'Renamed successfully', - 'Failure' => 'Failure', - 'Forbidden file type' => 'Forbidden file type', - 'Upload server error' => 'Upload server error', - 'Can not be empty' => 'Can not be empty', - 'Create New Directory' => 'Create New Directory', - 'Directory Name' => 'Directory Name', - 'Directory:' => 'Directory:', - 'Directory was not created' => 'Directory was not created', - 'Directory was created' => 'Directory was created', - 'Directory was deleted' => 'Directory was deleted', - 'Directory was not deleted' => 'Directory was not deleted', - 'Directory exists' => 'Directory exists', - 'File:' => 'File:', - 'File was uploaded' => 'File was uploaded', - 'File was not uploaded' => 'File was not uploaded', - 'File was deleted' => 'File was deleted', - 'File was not deleted' => 'File was not deleted', - 'File exists' => 'File exists', - 'Cancel' => 'Cancel', - 'Create' => 'Create', - 'directory' => 'katalog', - 'Delete directory: :dir' => 'Czy napewno usunąć katalog: :dir', - 'Delete file: :file' => 'Czy napewno usunąć plik :file', - 'Extension' => 'Rozszerzenie', - 'Size' => 'Rozmiar', - 'Select file' => 'Select file', - 'Change' => 'Change', - ) - ); diff --git a/plugins/box/filesmanager/languages/pt-br.lang.php b/plugins/box/filesmanager/languages/pt-br.lang.php deleted file mode 100644 index 61853be..0000000 --- a/plugins/box/filesmanager/languages/pt-br.lang.php +++ /dev/null @@ -1,42 +0,0 @@ - array( - 'Files' => 'Arquivos', - 'Files manager' => 'Gerenciador de arquivos', - 'Name' => 'Nome', - 'Actions' => 'Ações', - 'Delete' => 'Deletar', - 'Upload' => 'Upload', - 'Drop File Here' => 'Drop File Here', - 'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize', - 'Rename' => 'Rename', - 'Renamed successfully' => 'Renamed successfully', - 'Failure' => 'Failure', - 'Forbidden file type' => 'Forbidden file type', - 'Upload server error' => 'Upload server error', - 'Can not be empty' => 'Can not be empty', - 'Create New Directory' => 'Create New Directory', - 'Directory Name' => 'Directory Name', - 'Directory:' => 'Directory:', - 'Directory was not created' => 'Directory was not created', - 'Directory was created' => 'Directory was created', - 'Directory was deleted' => 'Directory was deleted', - 'Directory was not deleted' => 'Directory was not deleted', - 'Directory exists' => 'Directory exists', - 'File:' => 'File:', - 'File was uploaded' => 'File was uploaded', - 'File was not uploaded' => 'File was not uploaded', - 'File was deleted' => 'File was deleted', - 'File was not deleted' => 'File was not deleted', - 'File exists' => 'File exists', - 'Cancel' => 'Cancel', - 'Create' => 'Create', - 'directory' => 'directory', - 'Delete directory: :dir' => 'Deletar o diretório: :dir', - 'Delete file: :file' => 'Deletar o arquivo :file', - 'Extension' => 'Extensão', - 'Size' => 'Tamanho', - 'Select file' => 'Select file', - ) - ); diff --git a/plugins/box/filesmanager/languages/ru.lang.php b/plugins/box/filesmanager/languages/ru.lang.php deleted file mode 100644 index 35b5714..0000000 --- a/plugins/box/filesmanager/languages/ru.lang.php +++ /dev/null @@ -1,50 +0,0 @@ - array( - 'Files' => 'Файлы', - 'Files manager' => 'Менеджер файлов', - 'Name' => 'Ðазвание', - 'Actions' => 'ДейÑтвиÑ', - 'Delete' => 'Удалить', - 'Upload' => 'Загрузить', - 'Drop File Here' => 'Перетащите файл Ñюда', - 'Maximum upload file size: :upload_max_filesize' => 'МакÑимальный размер файла: :upload_max_filesize', - 'Rename' => 'Переименовать', - 'Renamed successfully' => 'УÑпешно переименован', - 'Failure' => 'Провал', - 'Forbidden file type' => 'Запрещенный тип файла', - 'Upload server error' => 'Ошибка Ñервера при загрузке', - 'Can not be empty' => 'Ðе может быть пуÑтым', - 'Create New Directory' => 'Создать новую директорию', - 'Directory Name' => 'Ðазвание директории', - 'Directory:' => 'ДиректориÑ:', - 'Directory was not created' => 'Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ð½Ðµ была Ñоздана', - 'Directory was created' => 'Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ð±Ñ‹Ð»Ð° Ñоздана', - 'Directory was deleted' => 'Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ð±Ñ‹Ð»Ð° удалена', - 'Directory was not deleted' => 'Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ð½Ðµ была удалена', - 'Directory exists' => 'Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ ÑƒÐ¶Ðµ ÑущеÑтвует', - 'File:' => 'Файл:', - 'File was uploaded' => 'Файл был загружен', - 'File was not uploaded' => 'Файл не был загружен', - 'File was deleted' => 'Файл был удален', - 'File was not deleted' => 'Файл не был удален', - 'File exists' => 'Файл ÑущеÑтвует', - 'Cancel' => 'Отменить', - 'Create' => 'Создать', - 'directory' => 'директориÑ', - 'Delete directory: :dir' => 'Удалить директорию: :dir', - 'Delete file: :file' => 'Удалить файл :file', - 'Extension' => 'РаÑширение', - 'Size' => 'Размер', - 'Select file' => 'Выбрать файл', - 'Change' => 'Изменить', - 'Info' => 'Инфо', - 'File Information' => 'Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ файле', - 'Filename' => 'Ðазвание файла', - 'Filetype' => 'Тип файла', - 'Filesize' => 'Размер файла', - 'Dimension' => 'Разрешение', - 'Link' => 'СÑылка', - ) - ); diff --git a/plugins/box/filesmanager/languages/sk.lang.php b/plugins/box/filesmanager/languages/sk.lang.php deleted file mode 100644 index c2df4d7..0000000 --- a/plugins/box/filesmanager/languages/sk.lang.php +++ /dev/null @@ -1,42 +0,0 @@ - array( - 'Files' => 'Súbory', - 'Files manager' => 'Manažér súborov', - 'Name' => 'Názov', - 'Actions' => 'Akcie', - 'Delete' => 'VymazaÅ¥', - 'Upload' => 'NahraÅ¥', - 'Drop File Here' => 'Drop File Here', - 'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize', - 'Rename' => 'Rename', - 'Renamed successfully' => 'Renamed successfully', - 'Failure' => 'Failure', - 'Forbidden file type' => 'Forbidden file type', - 'Upload server error' => 'Upload server error', - 'Can not be empty' => 'Can not be empty', - 'Create New Directory' => 'Create New Directory', - 'Directory Name' => 'Directory Name', - 'Directory:' => 'Directory:', - 'Directory was not created' => 'Directory was not created', - 'Directory was created' => 'Directory was created', - 'Directory was deleted' => 'Directory was deleted', - 'Directory was not deleted' => 'Directory was not deleted', - 'Directory exists' => 'Directory exists', - 'File:' => 'File:', - 'File was uploaded' => 'File was uploaded', - 'File was not uploaded' => 'File was not uploaded', - 'File was deleted' => 'File was deleted', - 'File was not deleted' => 'File was not deleted', - 'File exists' => 'File exists', - 'Cancel' => 'Cancel', - 'Create' => 'Create', - 'directory' => 'prieÄinok', - 'Delete directory: :dir' => 'VymazaÅ¥ prieÄinok: :dir', - 'Delete file: :file' => 'VymazaÅ¥ súbor :file', - 'Extension' => 'Rozšírenie', - 'Size' => 'VeľkosÅ¥', - 'Select file' => 'Select file', - ) - ); diff --git a/plugins/box/filesmanager/languages/sr.lang.php b/plugins/box/filesmanager/languages/sr.lang.php deleted file mode 100644 index cd7aac8..0000000 --- a/plugins/box/filesmanager/languages/sr.lang.php +++ /dev/null @@ -1,42 +0,0 @@ - array( - 'Files' => 'Fajlovi', - 'Files manager' => 'Menadžer fajlova', - 'Name' => 'Ime', - 'Actions' => 'Akcije', - 'Delete' => 'ObriÅ¡i', - 'Upload' => 'Dodaj', - 'Drop File Here' => 'Ostavi fajl ovde', - 'Maximum upload file size: :upload_max_filesize' => 'Maksimum veliÄina fajla za dodavanje: :upload_max_filesize', - 'Rename' => 'Promeni ime', - 'Renamed successfully' => 'Ime uspeÅ¡no promenjeno', - 'Failure' => 'Dogodila se greÅ¡ka', - 'Forbidden file type' => 'Zabranjena ekstenzija fajla', - 'Upload server error' => 'GreÅ¡ka prilikom dodavanja servera', - 'Can not be empty' => 'Ne može biti prazno', - 'Create New Directory' => 'Napravi novi direktorijum', - 'Directory Name' => 'Ime direktorijuma', - 'Directory:' => 'Direktorijum:', - 'Directory was not created' => 'Direktorijum nije kreiran', - 'Directory was created' => 'Diektorijum je kreiran', - 'Directory was deleted' => 'Direktorijum je obrisan', - 'Directory was not deleted' => 'Direktorijum nije obrisan', - 'Directory exists' => 'Direktorijum već postoji', - 'File:' => 'Fajl:', - 'File was uploaded' => 'Fajl je dodat', - 'File was not uploaded' => 'Fajl nije dodat', - 'File was deleted' => 'Fajl je obrisan', - 'File was not deleted' => 'Fajl nije obrisan', - 'File exists' => 'Fajl već postoji', - 'Cancel' => 'Otkaži', - 'Create' => 'Kreiraj', - 'directory' => 'Direktorijum', - 'Delete directory: :dir' => 'ObriÅ¡i direktorijum: :dir', - 'Delete file: :file' => 'ObriÅ¡i fajl :file', - 'Extension' => 'Extenzija', - 'Size' => 'VeliÄina', - 'Select file' => 'Odaberi fajl', - ) - ); diff --git a/plugins/box/filesmanager/languages/tr.lang.php b/plugins/box/filesmanager/languages/tr.lang.php deleted file mode 100644 index a139f90..0000000 --- a/plugins/box/filesmanager/languages/tr.lang.php +++ /dev/null @@ -1,40 +0,0 @@ - array( - 'Files' => 'Dosyalar', - 'Files manager' => 'Dosya yöneticisi', - 'Name' => 'Ad', - 'Actions' => 'İşlemler', - 'Delete' => 'Sil', - 'Upload' => 'Yükle', - 'Create New Directory' => 'Yeni Dizin OluÅŸtur', - 'directory' => 'dizin', - 'Delete directory: :dir' => ':dir dizini silinsin mi', - 'Delete file: :file' => ':file dosyası silinsin mi', - 'Extension' => 'Uzantı', - 'Size' => 'Boyut', - 'Directory Name' => 'Dizin Adı', - 'Select file' => 'Dosya seç', - 'Cancel' => 'Vazgeç', - 'Create' => 'OluÅŸtur', - 'Rename' => 'Yeniden Adlandır', - 'File was deleted' => 'Dosya silindi', - 'File was not deleted' => 'Dosya silinmedi', - 'Directory was deleted' => 'Dizin silindi', - 'Directory was not deleted' => 'Dizin silinmedi', - 'Can not be empty' => 'BoÅŸ olamaz', - 'Directory exists' => 'Dizin zaten var', - 'File exists' => 'Dosya zaten var', - 'Renamed successfully' => 'BaÅŸarıyla yeniden adlandırıldı', - 'Failure' => 'BaÅŸarısız', - 'File was uploaded' => 'Dosya yüklendi', - 'Directory was not created' => 'Dizin oluÅŸturulmadı', - 'Directory was created' => 'Dizin oluÅŸturuldu', - 'Upload server error' => 'Yükleme sunucusunda hata', - 'Directory:' => 'Dizin:', - 'File:' => 'Dosya:', - 'Drop File Here' => 'Dosyayı Buraya Bırakınız', - 'Maximum upload file size: :upload_max_filesize' => 'Dosya büyüklüğü üst sınırı: :upload_max_filesize', - ) - ); diff --git a/plugins/box/filesmanager/languages/uk.lang.php b/plugins/box/filesmanager/languages/uk.lang.php deleted file mode 100644 index a0e6855..0000000 --- a/plugins/box/filesmanager/languages/uk.lang.php +++ /dev/null @@ -1,50 +0,0 @@ - array( - 'Files' => 'Файли', - 'Files manager' => 'Менеджер файлів', - 'Name' => 'Ðазва', - 'Actions' => 'Дії', - 'Delete' => 'Видалити', - 'Upload' => 'Завантажити', - 'Drop File Here' => 'Вкиньте файл Ñюди', - 'Maximum upload file size: :upload_max_filesize' => 'МакÑимальний розмір файлу: :upload_max_filesize', - 'Rename' => 'Перейменувати', - 'Renamed successfully' => 'УÑпішно перейменований', - 'Failure' => 'Помилка', - 'Forbidden file type' => 'Заборонений тип файлу', - 'Upload server error' => 'Помилка Ñервера при завантаженні', - 'Can not be empty' => 'Ðе може бути порожнім', - 'Create New Directory' => 'Створити нову теку', - 'Directory Name' => 'Ðазва теки', - 'Directory:' => 'Тека:', - 'Directory was not created' => 'Тека не була Ñтворена', - 'Directory was created' => 'Тека була Ñтворена', - 'Directory was deleted' => 'Тека була видалена', - 'Directory was not deleted' => 'Тека не була видалена', - 'Directory exists' => 'Тека Ñ–Ñнує', - 'File:' => 'Файл:', - 'File was uploaded' => 'Файл був завантажений', - 'File was not uploaded' => 'Файл не був завантажений', - 'File was deleted' => 'Файл був видалений', - 'File was not deleted' => 'Файл не був видалений', - 'File exists' => 'Файл Ñ–Ñнує', - 'Cancel' => 'Відмінити', - 'Create' => 'Створити', - 'directory' => 'тека', - 'Delete directory: :dir' => 'Видалити теку: :dir', - 'Delete file: :file' => 'Видалити файл: :file', - 'Extension' => 'РозширеннÑ', - 'Size' => 'Розмір', - 'Select file' => 'Вибрати файл', - 'Change' => 'Змінити', - 'Info' => 'Інфо', - 'File Information' => 'Ð†Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ñ–Ñ Ð¿Ñ€Ð¾ файл', - 'Filename' => 'Ðазва файлу', - 'Filetype' => 'Тип файлу', - 'Filesize' => 'Размір файлу', - 'Dimension' => 'ВирішеннÑ', - 'Link' => 'Лінк', - ) - ); diff --git a/plugins/box/filesmanager/languages/zh-cn.lang.php b/plugins/box/filesmanager/languages/zh-cn.lang.php deleted file mode 100644 index bf6b1f4..0000000 --- a/plugins/box/filesmanager/languages/zh-cn.lang.php +++ /dev/null @@ -1,19 +0,0 @@ - array( - 'Files' => '文件', - 'Files manager' => '文件管ç†', - 'Name' => 'åç§°', - 'Actions' => 'æ“作', - 'Delete' => '删除', - 'Upload' => '上传', - 'directory' => '目录', - 'Delete directory: :dir' => '删除目录: :dir', - 'Delete file: :file' => '删除文件 :file', - 'Extension' => '扩展å', - 'Size' => '尺寸', - 'Select file' => '选择文件', - 'Change' => '更改', - ) - ); diff --git a/plugins/box/filesmanager/views/backend/index.view.php b/plugins/box/filesmanager/views/backend/index.view.php deleted file mode 100755 index c548e0b..0000000 --- a/plugins/box/filesmanager/views/backend/index.view.php +++ /dev/null @@ -1,244 +0,0 @@ - - -

    - - -
    - 'multipart/form-data', 'class' => 'form-inline')). - Form::hidden('csrf', Security::token()) - ); - ?> -
    - -
    - - 'btn btn-primary')). - Form::close() - ) - ?> - - × -
    - - -
    -
    -
    - -
    -
    -
    - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - > - - $site_url.'/public/' . $path.$file, 'class' => 'chocolat', 'data-toggle' => 'lightbox'));?> - - '_blank'));?> - - - - - - - - -
    - - - - - - -
    - - 'btn btn-danger', 'onclick' => "return confirmDelete('".__('Delete directory: :dir', 'filesmanager', array(':dir' => $dir))."')")); - ?> -
    -
    - - - - -
    - - - 'btn btn-danger', 'onclick' => "return confirmDelete('".__('Delete file: :file', 'filesmanager', array(':file' => $file))."')")); - ?> -
    -
    -
    - - - - - - \ No newline at end of file diff --git a/plugins/box/information/information.admin.php b/plugins/box/information/information.admin.php deleted file mode 100644 index 064a00e..0000000 --- a/plugins/box/information/information.admin.php +++ /dev/null @@ -1,28 +0,0 @@ -assign('php_modules', $php_modules) - ->display(); - } - -} diff --git a/plugins/box/information/information.plugin.php b/plugins/box/information/information.plugin.php deleted file mode 100644 index 2e7d7cb..0000000 --- a/plugins/box/information/information.plugin.php +++ /dev/null @@ -1,29 +0,0 @@ - - - plugins/box/information/information.plugin.php - active - 7 - Information - Information plugin - 1.0.0 - Awilum - http://monstra.org/ - diff --git a/plugins/box/information/languages/cs.lang.php b/plugins/box/information/languages/cs.lang.php deleted file mode 100644 index b799eda..0000000 --- a/plugins/box/information/languages/cs.lang.php +++ /dev/null @@ -1,40 +0,0 @@ - array( - 'Information' => 'Informace', - 'Debugging' => 'LadÄ›ní', - 'Name' => 'Název', - 'Value' => 'Hodnota', - 'Security' => 'BezpeÄnost', - 'System' => 'System', - 'on' => 'zapnuto', - 'off'=> 'vypnuto', - 'Server' => 'Server', - 'PHP version' => 'Verze PHP', - 'SimpleXML module' => 'Modul SimpleXML', - 'DOM module' => 'Modul DOM', - 'Installed' => 'Nainstalované', - 'Not Installed' => 'Nenainstalované', - 'Security check results' => 'Výsledky bezpeÄnostní kontroly', - 'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' => - 'KonfiguraÄní soubor je zapisovatelný. DoporuÄujeme Vám odstranit oprávnÄ›ní jakéhokoliv zápisu pro defines.php na produkÄních systémech', - 'The Monstra core directory (":path") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod -R a-w :path' => - 'Základní adresář Monstra (":path") a/anebo soubory jsou zapisovatelné. DoporuÄujeme Vám odstranit oprávnÄ›ní jakéhokoliv zápisu.
    Na Unix systémech provedete opravu příkazem: chmod -R a-w :path', - 'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'Monstra .htaccess jsoubor je zapisovatelný. DoporuÄujeme Vám odstranit oprávnÄ›ní jakéhokoliv zápisu.
    Na Unix systémech provedete opravu příkazem: chmod a-w :path', - 'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'Monstra index.php jsoubor je zapisovatelný. DoporuÄujeme Vám odstranit oprávnÄ›ní jakéhokoliv zápisu.
    Na Unix systémech provedete opravu příkazem: chmod a-w :path', - 'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.' => - 'Vzhledem k povaze a množství informácí, které mohou obsahovat chybová hlášení pÅ™i nastavení Core::$environment = Core::DEVELOPMENT, na produkÄních systémech důraznÄ› doporuÄujeme nastavit Core::PRODUCTION.', - 'Monstra version' => 'Verze Monstra', - 'Directory Permissions' => 'Práva adresáře', - 'Directory' => 'Adresář', - 'Writable' => 'Zapisovatelný', - 'Unwritable' => 'Nezapisovatelný', - 'Status' => 'Status', - 'PHP Built On' => 'PHP Built On', - 'Web Server' => 'Web Server', - 'WebServer to PHP Interface' => 'WebServer to PHP Interface', - ) - ); diff --git a/plugins/box/information/languages/de.lang.php b/plugins/box/information/languages/de.lang.php deleted file mode 100644 index 2cc9cee..0000000 --- a/plugins/box/information/languages/de.lang.php +++ /dev/null @@ -1,38 +0,0 @@ - array( - 'Information' => 'Informationen', - 'Debuging' => 'Debugging', - 'Name' => 'Name', - 'Value' => 'Wert', - 'Security' => 'Sicherheit', - 'System' => 'System', - 'on' => 'An', - 'off'=> 'Aus', - 'Server' => 'Server', - 'PHP version' => 'PHP Version', - 'SimpleXML module' => 'SimpleXML Modul', - 'DOM module' => 'DOM Modul', - 'Installed' => 'Installiert', - 'Not Installed' => 'Nicht Installiert', - 'Security check results' => 'Sicherheits-Check Ergebnisse', - 'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' => - 'Die Konfigurationsdatei wurde als beschreibbar entdeckt. Wir empfehlen alle Schreibrechte für defines.php auf Produktionssystemen zu entfernen.', - 'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'Die Monstra .htaccess Datei wurde als beschreibbar entdeckt. Wir empfehlen alle Schreibrechte zu entfernen.
    Du kannst dies auf Unix-Systemen ganz einfach mit: chmod a-w :path erledigen.', - 'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'Die Monstra index.php Datei wurde als beschreibbar entdeckt. Wir empfehlen alle Schreibrechte zu entfernen.
    Du kannst dies auf Unix-Systemen ganz einfach mit: chmod a-w :path erledigen.', - 'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, we strongly advise setting Monstra::PRODUCTION in production systems.' => - 'Aufgrund der Art und Menge der Informationen kann ein Fehler Eindringlinge ergeben wenn Monstra::$environment = Monstra::DEVELOPMENT, wir raten dringend dazu folgendermaßen Monstra::PRODUCTION in Produktionssystemen einzustellen.', - 'Monstra version' => 'Monstra version', - 'Directory Permissions' => 'Directory Berechtigungen', - 'Directory' => 'Verzeichnis', - 'Writable' => 'Beschreibbar', - 'Unwritable' => 'Nicht beschreibbar', - 'Status' => 'Status', - 'PHP Built On' => 'PHP Built On', - 'Web Server' => 'Web Server', - 'WebServer to PHP Interface' => 'WebServer to PHP Interface', - ) - ); diff --git a/plugins/box/information/languages/en.lang.php b/plugins/box/information/languages/en.lang.php deleted file mode 100644 index f6f8aa2..0000000 --- a/plugins/box/information/languages/en.lang.php +++ /dev/null @@ -1,40 +0,0 @@ - array( - 'Information' => 'Information', - 'Debugging' => 'Debugging', - 'Name' => 'Name', - 'Value' => 'Value', - 'Security' => 'Security', - 'System' => 'System', - 'on' => 'on', - 'off'=> 'off', - 'Server' => 'Server', - 'PHP version' => 'PHP version', - 'SimpleXML module' => 'SimpleXML module', - 'DOM module' => 'DOM module', - 'Installed' => 'Installed', - 'Not Installed' => 'Not Installed', - 'Security check results' => 'Security check results', - 'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' => - 'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.', - 'The Monstra core directory (":path") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod -R a-w :path' => - 'The Monstra core directory (":path") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod -R a-w :path', - 'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path', - 'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path', - 'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, we strongly advise setting Monstra::PRODUCTION in production systems.' => - 'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, we strongly advise setting Monstra::PRODUCTION in production systems.', - 'Monstra version' => 'Monstra version', - 'Directory Permissions' => 'Directory Permissions', - 'Directory' => 'Directory', - 'Writable' => 'Writable', - 'Unwritable' => 'Unwritable', - 'Status' => 'Status', - 'PHP Built On' => 'PHP Built On', - 'Web Server' => 'Web Server', - 'WebServer to PHP Interface' => 'WebServer to PHP Interface', - ) - ); diff --git a/plugins/box/information/languages/es.lang.php b/plugins/box/information/languages/es.lang.php deleted file mode 100644 index f964056..0000000 --- a/plugins/box/information/languages/es.lang.php +++ /dev/null @@ -1,40 +0,0 @@ - array( - 'Information' => 'Información', - 'Debugging' => 'Depuración', - 'Name' => 'Nombre', - 'Value' => 'Valor', - 'Security' => 'Seguridad', - 'System' => 'Sistema', - 'on' => 'Activado', - 'off'=> 'Desactivado', - 'Server' => 'Servidor', - 'PHP version' => 'Versión PHP', - 'SimpleXML module' => 'Módulo SimpleXML', - 'DOM module' => 'Módulo DOM', - 'Installed' => 'Instalado', - 'Not Installed' => 'No instalado', - 'Security check results' => 'Resultados del control de seguridad', - 'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' => - 'El archivo de configuración se ha encontrado ser accesible. Te recomendamos quitar todos los permisos de escritura en defines.php en los sistemas de producción.', - 'The Monstra core directory (":path") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod -R a-w :path' => - 'El directorio núcleo de Monstra (":path") y/o los archivos por debajo del mismo se han encontrado ser accesibles. Te recomendamos quitar todos los permisos de escritura.
    Puedes hacer esto en sistemas Unix con: chmod -R a-w :path', - 'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'El archivo .htaccess de Monstra se ha encontrado ser accesible. Te recomendamos quitar todos los permisos de escritura.
    Puedes hacer esto en sistemas Unix con: chmod a-w :path', - 'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'El archivo index.php de Monstra se ha encontrado ser accesible. Te recomendamos quitar todos los permisos de escritura.
    Puedes hacer esto en sistemas Unix con: chmod a-w :path', - 'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.' => - 'Debido al tipo y cantidad de información que un error podría dar a los intrusos cuando Core::$environment = Core::DEVELOPMENT, te recomendamos ajustar Core::PRODUCTION en sistemas de producción.', - 'Monstra version' => 'Versión Monstra', - 'Directory Permissions' => 'Permisos de directorio', - 'Directory' => 'Directorio', - 'Writable' => 'Accesible', - 'Unwritable' => 'No accesible', - 'Status' => 'Estado', - 'PHP Built On' => 'PHP construido en', - 'Web Server' => 'Servidor web', - 'WebServer to PHP Interface' => 'Servidor web para interfaz PHP', - ) - ); diff --git a/plugins/box/information/languages/fa.lang.php b/plugins/box/information/languages/fa.lang.php deleted file mode 100644 index 2d743e8..0000000 --- a/plugins/box/information/languages/fa.lang.php +++ /dev/null @@ -1,40 +0,0 @@ - array( - 'Information' => 'اطلاعات', - 'Debugging' => 'اشکال زدایی', - 'Name' => 'نام', - 'Value' => 'مقدار', - 'Security' => 'امنیت', - 'System' => 'سیستم', - 'on' => 'روشن', - 'off'=> 'خاموش', - 'Server' => 'سرور', - 'PHP version' => 'نسخه PHP', - 'SimpleXML module' => 'ماژول SimpleXML', - 'DOM module' => 'ماژول DOM', - 'Installed' => 'نصب شده', - 'Not Installed' => 'نصب نشده', - 'Security check results' => 'نتایج بررسیهای امنیتی', - 'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' => - 'ÙØ§ÛŒÙ„ پیکربندی قابل نوشتن میباشد . توصیه میکنیم همه مجوزهای نوشتن را در define.php سیستمهای تولیدی حذ٠کنید.', - 'The Monstra core directory (":path") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod -R a-w :path' => - 'شاخه هسته مونسترا (":path") Ùˆ/ یا ÙØ§ÛŒÙ„هایی درون آن قابل نوشتن میباشند . توصیه میکنیم همه مجوزهای نوشتن را حذ٠کنید.
    در سیستمهای یونیکس میتوانید با دستور : chmod -R a-w :path انجام دهید', - 'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'ÙØ§ÛŒÙ„ .htaccess مونسترا قابل نوشتن میباشند . توصیه میکنیم همه مجوزهای نوشتن را حذ٠کنید.
    در سیستمهای یونیکس میتوانید با دستور : chmod -R a-w :path انجام دهید', - 'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'ÙØ§ÛŒÙ„ index.php مونسترا قابل نوشتن میباشند . توصیه میکنیم همه مجوزهای نوشتن را حذ٠کنید.
    در سیستمهای یونیکس میتوانید با دستور : chmod -R a-w :path انجام دهید', - 'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.' => - 'با توجه به نوع و مقدار اطلاعات ممکن است هنگام Core::$environment = Core::DEVELOPMENT خطایی رخ بدهد ، ما شدیداً Core::PRODUCTION را د رسیستم تولید توصیه میکنیم ', - 'Monstra version' => 'نسخه مونسترا', - 'Directory Permissions' => 'مجوزهای شاخه', - 'Directory' => 'شاخه', - 'Writable' => 'قابل نوشتن', - 'Unwritable' => 'غیرقابل نوشتن', - 'Status' => 'وضعیت', - 'PHP Built On' => 'ساخته شده باPHP', - 'Web Server' => 'وب سرور', - 'WebServer to PHP Interface' => 'وب سرور به رابط PHP', - ) - ); diff --git a/plugins/box/information/languages/fr.lang.php b/plugins/box/information/languages/fr.lang.php deleted file mode 100644 index 0d6e78c..0000000 --- a/plugins/box/information/languages/fr.lang.php +++ /dev/null @@ -1,40 +0,0 @@ - array( - 'Information' => 'Information', - 'Debugging' => 'Débogage', - 'Name' => 'Nom', - 'Value' => 'Valeur', - 'Security' => 'Sécurité', - 'System' => 'Système', - 'on' => 'on', - 'off'=> 'off', - 'Server' => 'Serveur', - 'PHP version' => 'Version PHP', - 'SimpleXML module' => 'Module SimpleXML', - 'DOM module' => 'Module DOM', - 'Installed' => 'Installé', - 'Not Installed' => 'Non installé', - 'Security check results' => 'Résultats du contrôle de sécurité', - 'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' => - 'Le fichier de configuration a été trouvé pour être accessible en écriture. Nous vous conseillons de supprimer toutes les autorisations d\'écriture sur defines.php lors de la mise en production.', - 'The Monstra core directory (":path") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod -R a-w :path' => - 'Le répertoire de base Monstra (":path") et/ou les fichiers inclus, ont été trouvés accessible en écriture. Nous vous conseillons de supprimer toutes les permissions d\'écriture.
    Vous pouvez le faire sur les systèmes Unix avec: chmod-R a-w :chemin ', - 'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'Le fichier ". Htaccess" a été trouvé accessible en écriture. Nous vous conseillons de supprimer toutes les permissions d\'écriture.
    Vous pouvez le faire sur les systèmes Unix avec: chmod a-w :chemin', - 'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'Le fichier index.php de Monstra a été trouvé pour être accessible en écriture. Nous vous conseillons de supprimer toutes les permissions d\'écriture.
    Vous pouvez le faire sur les systèmes Unix avec: chmod a-w :chemin ', - 'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.' => - 'En raison du type et de la quantité d\'informations se peut qu\'une erreur peut être des intrusions lorsque Core::$environment = Core::DEVELOPMENT, nous vous conseillons vivement la mise de Core::PRODUCTION dans les systèmes de production.', - 'Monstra version' => 'Monstra version', - 'Directory Permissions' => 'Directory Permissions', - 'Directory' => 'Répertoire', - 'Writable' => 'Accessible en écriture', - 'Unwritable' => 'Pas accessible en écriture', - 'Status' => 'Statut', - 'PHP Built On' => 'PHP construit sur', - 'Web Server' => 'Serveur Web', - 'WebServer to PHP Interface' => 'Interface PHP du serveur web', - ) - ); \ No newline at end of file diff --git a/plugins/box/information/languages/hu.lang.php b/plugins/box/information/languages/hu.lang.php deleted file mode 100644 index 396fce0..0000000 --- a/plugins/box/information/languages/hu.lang.php +++ /dev/null @@ -1,40 +0,0 @@ - array( - 'Information' => 'Információk', - 'Debugging' => 'Hibakeresés', - 'Name' => 'Név', - 'Value' => 'Érték', - 'Security' => 'Biztonság', - 'System' => 'Rendszer', - 'on' => 'be', - 'off'=> 'ki', - 'Server' => 'Szerver', - 'PHP version' => 'PHP verzió', - 'SimpleXML module' => 'SimpleXML modul', - 'DOM module' => 'DOM modul', - 'Installed' => 'Telepítve', - 'Not Installed' => 'Nincs Telepítve', - 'Security check results' => 'Biztonsági ellenőrzés eredményei', - 'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' => - 'A konfigurációs fájl írható. Azt javasoljuk, hogy távolítsa el az összes írási jogosultságot itt: defines.php.', - 'The Monstra core directory (":path") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod -R a-w :path' => - 'A Monstra core directory (":path") és/vagy fájlok írhatók. Azt javasoljuk, hogy távolítsa el az összes írási jogosultságot.
    Unix rendszeren: chmod -R a-w :path', - 'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'A Monstra .htaccess fájl írható. Azt javasoljuk, hogy távolítsa el az összes írási jogosultságot.
    Unix rendszeren: chmod a-w :path', - 'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'A Monstra index.php fájl írható. Azt javasoljuk, hogy távolítsa el az összes írási jogosultságot.
    Unix rendszeren: chmod a-w :path', - 'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.' => - 'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.', - 'Monstra version' => 'Monstra verzió', - 'Directory Permissions' => 'Kategória Jogosultságok', - 'Directory' => 'Kategória', - 'Writable' => 'Ãrható', - 'Unwritable' => 'Nem Ãrható', - 'Status' => 'Státusz', - 'PHP Built On' => 'PHP Built On', - 'Web Server' => 'Web Szerver', - 'WebServer to PHP Interface' => 'WebServer to PHP Interface', - ) - ); \ No newline at end of file diff --git a/plugins/box/information/languages/id.lang.php b/plugins/box/information/languages/id.lang.php deleted file mode 100644 index 0853c97..0000000 --- a/plugins/box/information/languages/id.lang.php +++ /dev/null @@ -1,38 +0,0 @@ - array( - 'Information' => 'Informasi', - 'Debuging' => 'Debugging', - 'Name' => 'Nama', - 'Value' => 'Value', - 'Security' => 'Keamanan', - 'System' => 'Sistem', - 'on' => 'Nyala', - 'off'=> 'Mati', - 'Server' => 'Server', - 'PHP version' => 'Versi PHP', - 'SimpleXML module' => 'Modul SimpleXML', - 'DOM module' => 'Modul DOM', - 'Installed' => 'Sudah terpasang', - 'Not Installed' => 'Belum terpasang', - 'Security check results' => 'Hasil Cek Keamanan', - 'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' => - 'File Konfigurasi ditemukan writable . Disarankan untuk menghilangkan semua izin write pada defines.php di sistem produksi.', - 'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'File .htaccess Monstra ditemukan writable. Disarankan untuk menghilangkan semua izin write.
    Anda bisa melakukannya pada sistem unix dengan: chmod a-w :path', - 'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'File index.php Monstra ditemukan writable. Disarankan untuk menghilangkan semua izin write.
    Anda bisa melakukannya pada sistem unix dengan: chmod a-w :path', - 'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, we strongly advise setting Monstra::PRODUCTION in production systems.' => - 'Dikarenakan jenis dan jumlah informasi ada potensial kerusakan saat Monstra::$environment = Monstra::DEVELOPMENT, disarankan untuk melakukan pengaturan Monstra::PRODUCTION pada sistem produksi.', - 'Monstra version' => 'Versi Monstra', - 'Directory Permissions' => 'Direktori Perizinan', - 'Directory' => 'Direktori', - 'Writable' => 'Beschreibbar', - 'Unwritable' => 'Nicht beschreibbar', - 'Status' => 'Status', - 'PHP Built On' => 'PHP Built On', - 'Web Server' => 'Web Server', - 'WebServer to PHP Interface' => 'WebServer ke PHP Interface', - ) - ); diff --git a/plugins/box/information/languages/it.lang.php b/plugins/box/information/languages/it.lang.php deleted file mode 100644 index dbd411a..0000000 --- a/plugins/box/information/languages/it.lang.php +++ /dev/null @@ -1,40 +0,0 @@ - array( - 'Information' => 'Informazioni', - 'Debugging' => 'Debugging', - 'Name' => 'Nome', - 'Value' => 'Valore', - 'Security' => 'Sicurezza', - 'System' => 'Sistema', - 'on' => 'on', - 'off'=> 'off', - 'Server' => 'Server', - 'PHP version' => 'Versione PHP', - 'SimpleXML module' => 'Modulo SimpleXML', - 'DOM module' => 'Modulo DOM', - 'Installed' => 'Installato', - 'Not Installed' => 'Non installato', - 'Security check results' => 'Risultato del controllo di sicurezza', - 'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' => - 'Il file di configurazione è scrivibile. Si consiglia di rimuovere le autorizzazioni di scrittura per defines.php file sul sito funzionante.', - 'The Monstra core directory (":path") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod -R a-w :path' => - 'Directory Monstra (":path") è scrivibile. Si consiglia di rimuovere le autorizzazioni di scrittura per la directory (":path") sul sito funzionante.
    È possibile eseguire questa operazione su sistemi UNIX così: chmod -R a-w :path', - 'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'Principale file .htaccess è scrivibile. Si consiglia di rimuovere le autorizzazioni di scrittura per il file principale .htaccess.
    È possibile eseguire questa operazione su sistemi UNIX così: chmod -R a-w :path', - 'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'Principale file index.php è scrivibile. Si consiglia di rimuovere le autorizzazioni di scrittura per il file principale index.php.
    È possibile eseguire questa operazione su sistemi UNIX così: chmod -R a-w :path', - 'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, we strongly advise setting Monstra::PRODUCTION in production systems.' => - 'Il sistema opera con lo stato Monstra::DEVELOPMENT Si consiglia di impostare lo stato Monstra::PRODUCTION sul sito funzionante.', - 'Monstra version' => 'Monstra versione', - 'Directory Permissions' => 'Directory Autorizzazioni', - 'Directory' => 'Directory', - 'Writable' => 'Scrivibile', - 'Unwritable' => 'Non scrivibile', - 'Status' => 'Stato', - 'PHP Built On' => 'PHP Built On', - 'Web Server' => 'Web Server', - 'WebServer to PHP Interface' => 'WebServer to PHP Interface', - ) - ); diff --git a/plugins/box/information/languages/ja.lang.php b/plugins/box/information/languages/ja.lang.php deleted file mode 100644 index b659c6f..0000000 --- a/plugins/box/information/languages/ja.lang.php +++ /dev/null @@ -1,45 +0,0 @@ - array( - 'Information' => '情報', - 'Debugging' => 'デãƒãƒƒã‚°ãƒ¢ãƒ¼ãƒ‰', - 'Name' => 'åå‰', - 'Value' => '値', - 'Security' => 'セキュリティ', - 'System' => 'システム', - 'on' => 'オン', - 'off'=> 'オフ', - 'Server' => 'サーãƒãƒ¼', - 'PHP version' => 'PHPãƒãƒ¼ã‚¸ãƒ§ãƒ³', - 'SimpleXML module' => 'SimpleXMLモジュール', - 'DOM module' => 'DOMモジュール', - 'Installed' => 'インストール済ã¿', - 'Not Installed' => '未インストール', - 'Security check results' => 'セキュリティãƒã‚§ãƒƒã‚¯ã®çµæžœ', - 'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' => - 'è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ãŒæ›¸ãè¾¼ã¿å¯èƒ½ã«ãªã£ã¦ã„ã¾ã™ã€‚システムを公開ã™ã‚‹å ´åˆã¯ã™ã¹ã¦ã® defines.php ã‹ã‚‰æ›¸ãè¾¼ã¿æ¨©é™ã‚’除去ã™ã‚‹ã“ã¨ã‚’ãŠã™ã™ã‚ã—ã¾ã™ã€‚', - - 'The Monstra core directory (":path") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod -R a-w :path' => - 'The Monstra core directory (":path") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod -R a-w :path', - - 'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'Monstraã® .htaccess ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ›¸ãè¾¼ã¿å¯èƒ½ã«ãªã£ã¦ã„ã¾ã™ã€‚書ãè¾¼ã¿æ¨©é™ã‚’除去ã™ã‚‹ã“ã¨ã‚’ãŠã™ã™ã‚ã—ã¾ã™ã€‚
    Linuxシステムã§ã¯æ¬¡ã®ã‚ˆã†ã«é™¤åŽ»ã§ãã¾ã™: chmod a-w :path', - - 'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'Monstraã® index.php ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ›¸ãè¾¼ã¿å¯èƒ½ã«ãªã£ã¦ã„ã¾ã™ã€‚書ãè¾¼ã¿æ¨©é™ã‚’除去ã™ã‚‹ã“ã¨ã‚’ãŠã™ã™ã‚ã—ã¾ã™ã€‚
    Linuxシステムã§ã¯æ¬¡ã®ã‚ˆã†ã«é™¤åŽ»ã§ãã¾ã™: chmod a-w :path', - - 'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, we strongly advise setting Monstra::PRODUCTION in production systems.' => - 'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, we strongly advise setting Monstra::PRODUCTION in production systems.', - - 'Monstra version' => 'Monstraã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³', - 'Directory Permissions' => 'ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã®æ¨©é™', - 'Directory' => 'ディレクトリ', - 'Writable' => '書ãè¾¼ã¿å¯èƒ½', - 'Unwritable' => '書ãè¾¼ã¿ä¸å¯èƒ½', - 'Status' => 'ステータス', - 'PHP Built On' => 'PHPæ§‹æˆã‚·ã‚¹ãƒ†ãƒ ', - 'Web Server' => 'Webサーãƒ', - 'WebServer to PHP Interface' => 'Webサーãƒã®æä¾›ã™ã‚‹PHPインターフェイス', - ) - ); diff --git a/plugins/box/information/languages/ka-ge.lang.php b/plugins/box/information/languages/ka-ge.lang.php deleted file mode 100644 index baf3848..0000000 --- a/plugins/box/information/languages/ka-ge.lang.php +++ /dev/null @@ -1,40 +0,0 @@ - array( - 'Information' => 'ინფáƒáƒ áƒ›áƒáƒªáƒ˜áƒ', - 'Debugging' => 'Debugging-ი', - 'Name' => 'სáƒáƒ®áƒ”ლი', - 'Value' => 'მნიშვნელáƒáƒ‘áƒ', - 'Security' => 'უსáƒáƒ¤áƒ áƒ—ხáƒáƒ”ბáƒ', - 'System' => 'სისტემáƒ', - 'on' => 'ჩáƒáƒ áƒ—ულიáƒ', - 'off'=> 'გáƒáƒ›áƒáƒ áƒ—ულიáƒ', - 'Server' => 'სერვერი', - 'PHP version' => 'PHP-ის ვერსიáƒ', - 'SimpleXML module' => 'SimpleXML მáƒáƒ“ული', - 'DOM module' => 'DOM მáƒáƒ“ული', - 'Installed' => 'დáƒáƒ§áƒ”ნებულიáƒ', - 'Not Installed' => 'áƒáƒ  áƒáƒ áƒ˜áƒ¡ დáƒáƒ§áƒ”ნებული', - 'Security check results' => 'უსáƒáƒ¤áƒ áƒ—ხáƒáƒ”ბის შემáƒáƒ¬áƒ›áƒ”ბის შედეგები', - 'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' => - 'კáƒáƒœáƒ¤áƒ˜áƒ’ურáƒáƒªáƒ˜áƒ˜áƒ¡ ფáƒáƒ˜áƒšáƒ˜áƒ¡ ჩáƒáƒ¬áƒ”რრშესáƒáƒ«áƒšáƒ”ბელიáƒ. გირჩევთ წáƒáƒ¨áƒáƒšáƒáƒ— ფáƒáƒ˜áƒšáƒ˜áƒ¡ (defines.php) ჩáƒáƒ¬áƒ”რის უფლებები.', - 'The Monstra core directory (":path") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod -R a-w :path' => - 'Monstra-ს დირექტáƒáƒ áƒ˜áƒ (":path") ჩáƒáƒ¡áƒáƒ¬áƒ”რáƒáƒ“ ხელმისáƒáƒ¬áƒ•დáƒáƒ›áƒ˜áƒ. გირჩევთ წáƒáƒ¨áƒáƒšáƒáƒ— ჩáƒáƒ¬áƒ”რის უფლებები დირექტáƒáƒ áƒ˜áƒáƒ–ე (":path") .
    áƒáƒ›áƒ˜áƒ¡ გáƒáƒ™áƒ”თებრUNIX სისტემებზე áƒáƒ¡áƒ” შეგიძლიáƒáƒ—: chmod -R a-w :path', - 'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'მთáƒáƒ•áƒáƒ áƒ˜ .htaccess ფáƒáƒ˜áƒšáƒ˜ ჩáƒáƒ¡áƒáƒ¬áƒ”რáƒáƒ“ ხელმისáƒáƒ¬áƒ•დáƒáƒ›áƒ˜áƒ. გირჩევთ წáƒáƒ¨áƒáƒšáƒáƒ— ჩáƒáƒ¬áƒ”რის უფლებები მთáƒáƒ•áƒáƒ  .htaccess ფáƒáƒ˜áƒšáƒ–ე.
    áƒáƒ›áƒ˜áƒ¡ გáƒáƒ™áƒ”თებრUNIX სისტემებზე áƒáƒ¡áƒ” შეგიძლიáƒáƒ—: chmod -R a-w :path', - 'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'მთáƒáƒ•áƒáƒ áƒ˜ index.php ფáƒáƒ˜áƒšáƒ˜ ჩáƒáƒ¡áƒáƒ¬áƒ”რáƒáƒ“ ხელმისáƒáƒ¬áƒ•დáƒáƒ›áƒ˜áƒ. გირჩევთ წáƒáƒ¨áƒáƒšáƒáƒ— ჩáƒáƒ¬áƒ”რის უფლებები მთáƒáƒ•áƒáƒ  index.php ფáƒáƒ˜áƒšáƒ–ე.
    áƒáƒ›áƒ˜áƒ¡ გáƒáƒ™áƒ”თებრUNIX სისტემებზე áƒáƒ¡áƒ” შეგიძლიáƒáƒ—: chmod -R a-w :path', - 'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, we strongly advise setting Monstra::PRODUCTION in production systems.' => - 'სისტემრმუშáƒáƒáƒ‘ს Monstra::DEVELOPMENT რეჟიმზáƒ, გირჩევთ Monstra::PRODUCTION რეჟიმის დáƒáƒ§áƒ”ნებáƒáƒ¡.', - 'Monstra version' => 'Monstra-ს ვერსიáƒ', - 'Directory Permissions' => 'დáƒáƒ¨áƒ•ების უფლებები', - 'Directory' => 'კáƒáƒ¢áƒáƒšáƒáƒ’ი', - 'Writable' => 'ჩáƒáƒ¡áƒáƒ¬áƒ”რáƒáƒ“ ხელმისáƒáƒ¬áƒ•დáƒáƒ›áƒ˜áƒ', - 'Unwritable' => 'ჩáƒáƒ¡áƒáƒ¬áƒ”რáƒáƒ“ áƒáƒ  áƒáƒ áƒ˜áƒ¡ ხელმისáƒáƒ¬áƒ•დáƒáƒ›áƒ˜áƒ', - 'Status' => 'სტáƒáƒ¢áƒ£áƒ¡áƒ˜', - 'PHP Built On' => 'PHP áƒáƒ’ებულიáƒ', - 'Web Server' => 'Web სერვერი', - 'WebServer to PHP Interface' => 'Web სერვერი PHP ინტერფეისისთვის', - ) - ); diff --git a/plugins/box/information/languages/lt.lang.php b/plugins/box/information/languages/lt.lang.php deleted file mode 100644 index bffc50a..0000000 --- a/plugins/box/information/languages/lt.lang.php +++ /dev/null @@ -1,40 +0,0 @@ - array( - 'Information' => 'Informacija', - 'Debuging' => 'Derinimas', - 'Name' => 'Pavadinimas', - 'Value' => 'ReikÅ¡mÄ—', - 'Security' => 'Saugumas', - 'System' => 'Systema', - 'on' => 'Ä®jungta', - 'off'=> 'IÅ¡jungta', - 'Server' => 'Serveris', - 'PHP version' => 'PHP versija', - 'SimpleXML module' => 'SimpleXML modulis', - 'DOM module' => 'DOM modulis', - 'Installed' => 'Ä®diegta', - 'Not Installed' => 'Neįdiegta', - 'Security check results' => 'Saugumo patikrinimo rezultatai', - 'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' => - 'Leidžiama perraÅ¡yti nustatymų bylÄ…. SiÅ«lome paÅ¡alinti visus raÅ¡ymo leidimus sistemos bylai defines.php.', - 'The Monstra core directory (":path") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod -R a-w :path' => - 'Monstra pagrindinį aplanką (":path") ir/arba jo bylas leidžiama perrašyti. Siūlome pašalinti visus rašymo leidimus.
    Tai galite padaryti Unix sistemoje su: chmod -R a-w :path', - 'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'Monstra .htaccess bylą galima perrašyti. Siūlome pašalinti visus rašymo leidimus.
    Tai galite padaryti Unix sistemoje su: chmod a-w :path', - 'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'Monstra index.php bylą galima perrašyti. Siūlome pašalinti visus rašymo leidimus.
    Tai galite padaryti Unix sistemoje su: chmod a-w :path', - 'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, we strongly advise setting Monstra::PRODUCTION in production systems.' => - 'Dėl įsilaužimų grėsmės atvaiduojant klaidų pranešimus Monstra::$environment = Monstra::DEVELOPMENT veiksenoje, rekomenduojame naudoti Monstra::PRODUCTION nustatymą nuolatinėje tinklapio veiksenoje.', - 'Monstra version' => 'Monstra versija', - 'Directory Permissions' => 'Katalogo teisės', - 'Directory' => 'Katalogas', - 'Writable' => 'Rašomas', - 'Unwritable' => 'Nerašomas', - 'Status' => 'Būsena', - 'PHP Built On' => 'PHP veikia su', - 'Web Server' => 'Serverio prog. įranga', - 'WebServer to PHP Interface' => 'PHP naudoja šį SAPI', - ) - ); diff --git a/plugins/box/information/languages/nl.lang.php b/plugins/box/information/languages/nl.lang.php deleted file mode 100644 index a3dcfee..0000000 --- a/plugins/box/information/languages/nl.lang.php +++ /dev/null @@ -1,38 +0,0 @@ - array( - 'Information' => 'Informatie', - 'Debuging' => 'Debuggen', - 'Name' => 'Naam', - 'Value' => 'Waarde', - 'Security' => 'Beveiliging', - 'System' => 'Systeem', - 'on' => 'Aan', - 'off'=> 'Uit', - 'Server' => 'Server', - 'PHP version' => 'PHP Versie', - 'SimpleXML module' => 'SimpleXML Module', - 'DOM module' => 'DOM Module', - 'Installed' => 'Geinstalleerd', - 'Not Installed' => 'Niet geinstalleerd', - 'Security check results' => 'Resultaten beveiligings-check', - 'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' => - 'Het configuratiebestand is schrijfbaar. We adviseren u om alle schrijfrechten op defines.php te verwijderen op productiewebsites.', - 'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'Het Monstra .htaccess bestand is schrijfbaar. We adviseren u om alle schrijfrechten voor dit bestand te verwijderen.
    Op unix-systemen doet u dit als volgt: chmod a-w :path.', - 'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'Het Monstra index.php bestand is schrijfbaar. We adviseren u alle schrijfrechten voor dit bestand te verwijderen.
    Op Unix-systemen doet u dit als volgt: chmod a-w :path.', - 'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, we strongly advise setting Monstra::PRODUCTION in production systems.' => - 'Door het type en de hoeveelheid informatie die foutmeldingen kunnen geven aan indringers wanneer Monstra::$environment = Monstra::DEVELOPMENT, raden we u ten zeerste aan om de instelling op Monstra::PRODUCTION te zetten, wanneer u met een productiewebsite werkt.', - 'Monstra version' => 'Monstra versie', - 'Directory Permissions' => 'Map-rechten', - 'Directory' => 'Map', - 'Writable' => 'Schrijfbaar', - 'Unwritable' => 'Niet schrijfbaar', - 'Status' => 'Status', - 'PHP Built On' => 'Systeem', - 'Web Server' => 'Web Server', - 'WebServer to PHP Interface' => 'WebServer PHP Interface', - ) - ); diff --git a/plugins/box/information/languages/pl.lang.php b/plugins/box/information/languages/pl.lang.php deleted file mode 100644 index 1075985..0000000 --- a/plugins/box/information/languages/pl.lang.php +++ /dev/null @@ -1,40 +0,0 @@ - array( - 'Information' => 'Informacja', - 'Debugging' => 'Odpluskwianie', - 'Name' => 'Nazwa', - 'Value' => 'Wartość', - 'Security' => 'Bezpieczeństwo', - 'System' => 'System', - 'on' => 'włączone', - 'off'=> 'wyłączone', - 'Server' => 'Serwer', - 'PHP version' => 'Wersja PHP', - 'SimpleXML module' => 'Moduł SimpleXML', - 'DOM module' => 'Moduł DOM', - 'Installed' => 'Zainstalowane', - 'Not Installed' => 'Nie zainstalowane', - 'Security check results' => 'Wyniki sprawdzenia bezpieczeństwa', - 'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' => - 'Plik konfiguracyjny ma możliwość zapisu. Radzimy, aby w systemach produkcyjnych usunąć wszystkie uprawnienia zapisu dla pliku defines.php.', - 'The Monstra core directory (":path") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod -R a-w :path' => - 'Katalog główny systemu Monstra (":path") i/lub pliki w nim zawarte mają możliwość zapisu. Radzimy, aby usunąć wszystkie uprawnienia zapisu.
    Na systemach UNIX możesz to zrobić za pomocą: chmod -R a-w :path', - 'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'Plik .htaccess systemu Monstra ma możliwość zapisu. Radzimy, aby usunąć wszystkie uprawnienia zapisu.
    Na systemach UNIX możesz to zrobić za pomocą: chmod a-w :path', - 'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'Plik index.php systemu Monstra ma możliwość zapisu. Radzimy, aby usunąć wszystkie uprawnienia zapisu.
    Na systemach UNIX możesz to zrobić za pomocą: chmod a-w :path', - 'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, we strongly advise setting Monstra::PRODUCTION in production systems.' => - 'Ze względu na rodzaj i ilość informacji o błędach, które mogą dostać się w niepowołane ręce, gdy Monstra::$environment = Monstra::DEVELOPMENT, zdecydowanie zalecamy ustawienie Monstra::PRODUCTION w systemach produkcyjnych.', - 'Monstra version' => 'Wersja systemu Monstra', - 'Directory Permissions' => 'Uprawnienia katalogu', - 'Directory' => 'Katalog', - 'Writable' => 'Możliwość zapisu', - 'Unwritable' => 'Brak możliwości zapisu', - 'Status' => 'Status', - 'PHP Built On' => 'Oparty na systemie', - 'Web Server' => 'Serwer WWW', - 'WebServer to PHP Interface' => 'Serwerowy interfejs PHP', - ) - ); diff --git a/plugins/box/information/languages/pt-br.lang.php b/plugins/box/information/languages/pt-br.lang.php deleted file mode 100644 index dfe9b72..0000000 --- a/plugins/box/information/languages/pt-br.lang.php +++ /dev/null @@ -1,40 +0,0 @@ - array( - 'Information' => 'Informações', - 'Debugging' => 'Debug', - 'Name' => 'Nome', - 'Value' => 'Valor', - 'Security' => 'Segurança', - 'System' => 'Sistema', - 'on' => 'on', - 'off'=> 'off', - 'Server' => 'Servidor', - 'PHP version' => 'Versão do PHP', - 'SimpleXML module' => 'Módulo SimpleXML', - 'DOM module' => 'Módulo DOM', - 'Installed' => 'Instalado', - 'Not Installed' => 'Não instalado', - 'Security check results' => 'Resultados da verificação de segurança', - 'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' => - 'O arquivo de configuração está com permissões de escrita. Para melhor segurança, você deve remover as permissões de escrita do arquivo defines.php em sistemas de produções.', - 'The Monstra core directory (":path") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod -R a-w :path' => - 'O diretório núcleo do Monstra (":path") e/ou arquivos dentro do diretório estão com permissões de escrita. Para melhor segurança, você deve remover as permissões de escritas.
    Você pode fazer isso em sistemas UNIX com: chmod -R a-w :path', - 'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'O arquivo .htaccess da pasta de instalação do Monstra está com permissões de escrita. Para sua melhor segurança, você deve remover as permissões de escritas.
    Você pode fazer isso em sistemas UNIX com: chmod a-w :path', - 'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'O arquivo index.php do diretório de instalação do Monstra está com permissões de escrita. Para sua melhor segurança, você deve remover as permissões de escritas.
    Vocês pode fazer isso em sistemas UNIX com: chmod a-w :path', - 'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, we strongly advise setting Monstra::PRODUCTION in production systems.' => - 'Devide ao tipo e quantidade de informações, um erro pode trazer possíveis intrusos se a variável Monstra::$environment for igual à Monstra::DEVELOPMENT, para isso nós recomendamos fortemente que você sete a variável para o seguinte valor: Monstra::PRODUCTION em sistemas de produção.', - 'Monstra version' => 'Monstra versão', - 'Directory Permissions' => 'Permissões de Diretório', - 'Directory' => 'Diretório', - 'Writable' => 'Gravável', - 'Unwritable' => 'Unwritable', - 'Status' => 'Estado', - 'PHP Built On' => 'PHP Built On', - 'Web Server' => 'Web Server', - 'WebServer to PHP Interface' => 'WebServer to PHP Interface', - ) - ); diff --git a/plugins/box/information/languages/ru.lang.php b/plugins/box/information/languages/ru.lang.php deleted file mode 100644 index 5606813..0000000 --- a/plugins/box/information/languages/ru.lang.php +++ /dev/null @@ -1,40 +0,0 @@ - array( - 'Information' => 'ИнформациÑ', - 'Debugging' => 'Дебаггинг', - 'Name' => 'Ðазвание', - 'Value' => 'Значение', - 'Security' => 'БезопаÑноÑть', - 'System' => 'СиÑтема', - 'on' => 'включен', - 'off'=> 'выключен', - 'Server' => 'Сервер', - 'PHP version' => 'ВерÑÐ¸Ñ PHP', - 'SimpleXML module' => 'SimpleXML модуль', - 'DOM module' => 'DOM модуль', - 'Installed' => 'УÑтановлен', - 'Not Installed' => 'Ðе уÑтановлен', - 'Security check results' => 'Результаты проверки безопаÑноÑти', - 'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' => - 'Конфигурационный файл доÑтупен Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи. Мы рекомендуем вам удалить права запиÑи на файл defines.php на живом Ñайте.', - 'The Monstra core directory (":path") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod -R a-w :path' => - 'Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Monstra (":path") доÑтупна Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи. Мы рекомендуем вам удалить права запиÑи на директорию (":path") на живом Ñайте.
    Ð’Ñ‹ можете Ñделать Ñто на UNIX ÑиÑтемах так: chmod -R a-w :path', - 'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'Главный .htaccess доÑтупен Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи. Мы рекомендуем вам удалить права запиÑи на главный .htaccess файл.
    Ð’Ñ‹ можете Ñделать Ñто на UNIX ÑиÑтемах так: chmod -R a-w :path', - 'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'Главный index.php файл доÑтупен Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи. Мы рекомендуем вам удалить права запиÑи на главный index.php файл.
    Ð’Ñ‹ можете Ñделать Ñто на UNIX ÑиÑтемах так: chmod -R a-w :path', - 'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, we strongly advise setting Monstra::PRODUCTION in production systems.' => - 'СиÑтема работает в режиме Monstra::DEVELOPMENT Мы рекомендуем вам уÑтановить режим Monstra::PRODUCTION на живом Ñайте.', - 'Monstra version' => 'Monstra ВерÑиÑ', - 'Directory Permissions' => 'Права доÑтупа', - 'Directory' => 'Каталог', - 'Writable' => 'ДоÑтупна Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи', - 'Unwritable' => 'ÐедоÑтупна Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи', - 'Status' => 'СтатуÑ', - 'PHP Built On' => 'PHP поÑтроен на', - 'Web Server' => 'Веб Ñервер', - 'WebServer to PHP Interface' => 'Веб Ñервер Ð´Ð»Ñ PHP интерфейÑа', - ) - ); diff --git a/plugins/box/information/languages/sk.lang.php b/plugins/box/information/languages/sk.lang.php deleted file mode 100644 index ec53fe4..0000000 --- a/plugins/box/information/languages/sk.lang.php +++ /dev/null @@ -1,40 +0,0 @@ - array( - 'Information' => 'Informácie', - 'Debugging' => 'Ladenie', - 'Name' => 'Názov', - 'Value' => 'Hodnota', - 'Security' => 'BezpeÄnosÅ¥', - 'System' => 'System', - 'on' => 'zapnuté', - 'off'=> 'vypnuté', - 'Server' => 'Server', - 'PHP version' => 'Verzia PHP', - 'SimpleXML module' => 'Modul SimpleXML', - 'DOM module' => 'Modul DOM', - 'Installed' => 'NainÅ¡talované', - 'Not Installed' => 'NenainÅ¡talované', - 'Security check results' => 'Výsledky bezpeÄnostnej kontroly', - 'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' => - 'KonfiguraÄný súbor je zapisovateľný. OdporúÄame Vám odstrániÅ¥ oprávnenie akéhokoľvek zápisu pre defines.php na produkÄných systémoch.', - 'The Monstra core directory (":path") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod -R a-w :path' => - 'Základný Monstra prieÄinok (":path") a/alebo súbory sú zapisovateľné. OdporúÄame Vám odstrániÅ¥ oprávnenie akéhokoľvek zápisu.
    Na Unix systémoch prevediete opravu príkazom: chmod -R a-w :path', - 'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'Monstra .htaccess súbor je zapisovateľný. OdporúÄame Vám odstrániÅ¥ oprávnenie akéhokoľvek zápisu.
    Na Unix systémoch prevediete opravu príkazom: chmod a-w :path', - 'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'Monstra index.php súbor je zapisovateľný. OdporúÄame Vám odstrániÅ¥ oprávnenie akéhokoľvek zápisu.
    Na Unix systémoch prevediete opravu príkazom: chmod a-w :path', - 'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.' => - 'Vzhľadom na druh a množstvo informácií, chyby možno odhaliÅ¥ nastavením: Core::$environment = Core::DEVELOPMENT, na produkÄných systémoch dôrazne odporúÄame nastaviÅ¥ Core::PRODUCTION.', - 'Monstra version' => 'Verzia Monstra', - 'Directory Permissions' => 'Práva prieÄinkov', - 'Directory' => 'PrieÄinok', - 'Writable' => 'Zapisovateľný', - 'Unwritable' => 'Nezapisovateľný', - 'Status' => 'Status', - 'PHP Built On' => 'PHP Built On', - 'Web Server' => 'Web Server', - 'WebServer to PHP Interface' => 'WebServer to PHP Interface', - ) - ); diff --git a/plugins/box/information/languages/sr.lang.php b/plugins/box/information/languages/sr.lang.php deleted file mode 100644 index e20a1dd..0000000 --- a/plugins/box/information/languages/sr.lang.php +++ /dev/null @@ -1,35 +0,0 @@ - array( - 'Information' => 'Informacije', - 'Debugging' => 'Debugging', - 'Name' => 'Ime', - 'Value' => 'Vrednost', - 'Security' => 'Sigurnost', - 'System' => 'Sistem', - 'on' => 'ukljuÄeno', - 'off'=> 'iskljuÄeno', - 'Server' => 'Server', - 'PHP version' => 'PHP Verzija', - 'SimpleXML module' => 'SimpleXML modul', - 'DOM module' => 'DOM modul', - 'Installed' => 'Instalirano', - 'Not Installed' => 'Nije instalirano', - 'Security check results' => 'Sigurnosna provera rezultata', - 'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' => 'Konfiguracioni fajl je nadjen da može biti upisan. Mi vas savetujemo da uklonite dozvole na fajlu defines.php ukoliko vam je svaniÄni sajt.', - 'The Monstra core directory (":path") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod -R a-w :path' => 'Monstra direktorijum je (":path") i/ili fajlovi unutar toga su nadjeni da mogu biti zapisani. Mi vas savetujemo da uklonite te dozvole zapisivanja.
    Na unix sistemima možete to uraditi sa: chmod -R a-w :path', - 'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => 'Monstra je .htaccess fajlu našla mogućnost upisivanja. Mi vas savetujemo da promenite te dozvole.
    Na unix sistemima možete to uraditi sa: chmod a-w :path', - 'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => 'Monstra je pronašla index.php fajl da može da se upisuje. Mi vas savetujemo da promenite dozvole upisivanja.
    Na unix sistemima možete to uraditi sa: chmod a-w :path', - 'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.' => 'Tokom ovolike koliÄine informacija o greÅ¡kama, moguće je da imate uljeze ili hakerske napade u Core::$environment = Core::DEVELOPMENT, Mi vas savetujemo da se prebacite na Core::PRODUCTION U produkciskim sistemima.', - 'Monstra version' => 'Monstra verzija', - 'Directory Permissions' => 'Dozvole direktorijuma', - 'Directory' => 'Direktorijum', - 'Writable' => 'Dozvoljen ua pisanje', - 'Unwritable' => 'Zabranjen za pisanje', - 'Status' => 'Status', - 'PHP Built On' => 'PHP graÄ‘en na', - 'Web Server' => 'Web Server', - 'WebServer to PHP Interface' => 'WebServer to PHP Interface', - ) - ); diff --git a/plugins/box/information/languages/tr.lang.php b/plugins/box/information/languages/tr.lang.php deleted file mode 100644 index ee8df96..0000000 --- a/plugins/box/information/languages/tr.lang.php +++ /dev/null @@ -1,40 +0,0 @@ - array( - 'Information' => 'Bilgi', - 'Debugging' => 'Hata Ayıklama', - 'Name' => 'Ad', - 'Value' => 'DeÄŸer', - 'Security' => 'Güvenlik', - 'System' => 'Sistem', - 'on' => 'açık', - 'off'=> 'kapalı', - 'Server' => 'Sunucu', - 'PHP version' => 'PHP sürümü', - 'SimpleXML module' => 'SimpleXML modülü', - 'DOM module' => 'DOM modülü', - 'Installed' => 'Yüklü', - 'Not Installed' => 'Yüklü DeÄŸil', - 'Security check results' => 'Güvenlik denetlemesi sonuçları', - 'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' => - 'Konfigürasyon dosyası yazma iznine sahip. Yayındayken defines.php üzerindeki bütün yazma izinlerini kaldırmanızı öneririz.', - 'The Monstra core directory (":path") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod -R a-w :path' => - 'Monstra dizini (":path") ve/ya da altındaki dosyalar yazma iznine sahipler. Bütün yazma izinlerini kaldırmanızı öneririz.
    Unix sistemlerde, bunu, chmod -R a-w :path ile gerçekleştirebilirsiniz.', - 'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'Monstra .htaccess dosyası yazma iznine sahip. Bütün yazma izinlerini kaldırmanızı öneririz.
    Unix sistemlerde, bunu, chmod -R a-w :path ile gerçekleştirebilirsiniz.', - 'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'Monstra index.php dosyası yazma iznine sahip. Bütün yazma izinlerini kaldırmanızı öneririz.
    Unix sistemlerde, bunu, chmod -R a-w :path ile gerçekleÅŸtirebilirsiniz.', - 'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, we strongly advise setting Monstra::PRODUCTION in production systems.' => - 'Monstra::$environment = Monstra::DEVELOPMENT ayarı yapılmışken, yayın sırasında çıkabilecek bir hata ile, bilginin türü ve miktarına baÄŸlı olarak saldırı açıkları yaratmış olabilirsiniz. Siteniz yayındayken Monstra::PRODUCTION ayarı yapmanızı kesinlikle öneririz.', - 'Monstra version' => 'Monstra sürümü', - 'Directory Permissions' => 'Dizin İzinleri', - 'Directory' => 'Dizin', - 'Writable' => 'Yazılabilir', - 'Unwritable' => 'Yazılamaz', - 'Status' => 'Durum', - 'PHP Built On' => 'PHP\'nin DerlendiÄŸi Ortam', - 'Web Server' => 'Web Sunucusu', - 'WebServer to PHP Interface' => 'PHP Arayüzü', - ) - ); diff --git a/plugins/box/information/languages/uk.lang.php b/plugins/box/information/languages/uk.lang.php deleted file mode 100644 index d88b0ed..0000000 --- a/plugins/box/information/languages/uk.lang.php +++ /dev/null @@ -1,39 +0,0 @@ - array( - 'Information' => 'ІнформаціÑ', - 'Debugging' => 'Дебаггінг', - 'Name' => 'Ðазва', - 'Value' => 'ЗначеннÑ', - 'Security' => 'Безпека', - 'System' => 'СиÑтема', - 'on' => 'увімкнено', - 'off'=> 'вимкнено', - 'Server' => 'Сервер', - 'PHP version' => 'ВерÑÑ–Ñ PHP', - 'SimpleXML module' => 'SimpleXML модуль', - 'DOM module' => 'DOM модуль', - 'Installed' => 'Ð’Ñтановлено', - 'Not Installed' => 'Ðе вÑтановлено', - 'Security check results' => 'Результати перевірки безпеки', - 'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' => - 'Конфігураційний файл доÑтупний Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñу. Ми рекомендуємо вам видалити права запиÑу на файл defines.php на живому Ñайті.', - 'The Monstra core directory (":path") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod -R a-w :path' => - 'Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ñ–Ñ Monstra (":path") доÑтупна Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñу. Ми рекомендуємо вам видалити права запиÑу на теку (":path") на живому Ñайті.
    Ви можете зробити це на UNIX ÑиÑтемах так: chmod -R a-w :path', - 'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'Головний .htaccess доÑтупний Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñу. Ми рекомендуємо вам видалити права запиÑу на головний .htaccess файл.
    Ви можете зробити це на UNIX ÑиÑтемах так: chmod -R a-w :path', - 'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'Головний index.php файл доÑтупний Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñу. Ми рекомендуємо вам видалити права запиÑу на головний index.php файл.
    Ви можете зробити це на UNIX ÑиÑтемах так: chmod -R a-w :path', - 'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, we strongly advise setting Monstra::PRODUCTION in production systems.' => - 'СиÑтема працює в режимі Monstra::DEVELOPMENT Ми рекомендуємо вам вÑтановити режим Monstra::PRODUCTION на живому Ñайті.', - 'Monstra version' => 'Monstra ВерÑÑ–Ñ', - 'Directory Permissions' => 'Права ДоÑтупу', - 'Directory' => 'Тека', - 'Writable' => 'ДоÑтупна Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñу', - 'Unwritable' => 'ÐедоÑтупна Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñу', - 'Status' => 'СтатуÑ', - 'PHP Built On' => 'PHP побудовано на', - 'Web Server' => 'Веб Ñервер', - 'WebServer to PHP Interface' => 'Веб Ñервер Ð´Ð»Ñ PHP інтерфейÑу', ) - ); diff --git a/plugins/box/information/languages/zh-cn.lang.php b/plugins/box/information/languages/zh-cn.lang.php deleted file mode 100644 index 70451d5..0000000 --- a/plugins/box/information/languages/zh-cn.lang.php +++ /dev/null @@ -1,40 +0,0 @@ - array( - 'Information' => 'ä¿¡æ¯', - 'Debugging' => '调试', - 'Name' => 'åç§°', - 'Value' => '值', - 'Security' => '安全', - 'System' => '系统', - 'on' => 'å¼€', - 'off'=> 'å…³', - 'Server' => 'æœåС噍', - 'PHP version' => 'PHP 版本', - 'SimpleXML module' => 'SimpleXML 模å—', - 'DOM module' => 'DOM 模å—', - 'Installed' => '已安装', - 'Not Installed' => '未安装', - 'Security check results' => '安全检查结果', - 'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' => - 'Monstra 系统å‘现é…置文件是å¯å†™çš„。我们建议您删除 defines.php 文件的所有å¯å†™æƒé™ã€‚', - 'The Monstra core directory (":path") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod -R a-w :path' => - 'å‘现 Monstra 核心目录 (":path") 和下级文件是å¯å†™çš„。我们建议您删除所有的å¯å†™æƒé™ã€‚
    您å¯ä»¥åœ¨ UNIX 系统上设置: chmod -R a-w :path', - 'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'Monstra 系统å‘现 .htaccess 文件是å¯å†™çš„。我们建议您删除所有的å¯å†™æƒé™ã€‚
    您å¯ä»¥åœ¨ UNIX 系统上设置: chmod a-w :path', - 'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => - 'Monstra 系统å‘现 index.php 文件å¯å†™ã€‚我们建议您删除所有的å¯å†™æƒé™ã€‚
    您å¯ä»¥åœ¨ UNIX 系统上设置: chmod a-w :path', - 'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, we strongly advise setting Monstra::PRODUCTION in production systems.' => - 'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, 我们强烈建议设置 Monstra::PRODUCTION in production systems.', - 'Monstra version' => 'Monstra 版本', - 'Directory Permissions' => '目录æƒé™', - 'Directory' => '目录', - 'Writable' => 'å¯å†™', - 'Unwritable' => 'ä¸å¯å†™', - 'Status' => '状æ€', - 'PHP Built On' => 'PHP 建立在', - 'Web Server' => 'Web æœåС噍', - 'WebServer to PHP Interface' => 'æœåŠ¡å™¨åˆ° PHP 接å£', - ) - ); diff --git a/plugins/box/information/views/backend/index.view.php b/plugins/box/information/views/backend/index.view.php deleted file mode 100644 index 0365d4a..0000000 --- a/plugins/box/information/views/backend/index.view.php +++ /dev/null @@ -1,168 +0,0 @@ -

    - -
    - - -
    - -
    - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - '; - } else { - echo ''; - } - } else { - echo ''; - } - - ?> - -
    '.__('Apache Mod Rewrite', 'information').''.__('Not Installed', 'information').'
    '.__('Apache Mod Rewrite', 'information').''.__('Installed', 'information').'
    '.__('Apache Mod Rewrite', 'information').''.__('Installed', 'information').'
    - -
    - -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    - -
    - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ! You can do this on unix systems with: chmod a-w :path', 'information', array(':path' => ROOT . DS . '.htaccess')); ?>
    ! You can do this on unix systems with: chmod a-w :path', 'information', array(':path' => ROOT . DS . 'index.php')); ?>
    !
    -
    - -
    - -
    -
    diff --git a/plugins/box/menu/install/menu.manifest.xml b/plugins/box/menu/install/menu.manifest.xml deleted file mode 100644 index 295c47f..0000000 --- a/plugins/box/menu/install/menu.manifest.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - plugins/box/menu/menu.plugin.php - active - 4 - Menu - Menu managment plugin - 1.0.0 - Awilum - http://monstra.org/ - diff --git a/plugins/box/menu/js/.htaccess b/plugins/box/menu/js/.htaccess deleted file mode 100644 index b9f48ac..0000000 --- a/plugins/box/menu/js/.htaccess +++ /dev/null @@ -1,2 +0,0 @@ -Options -Indexes -Allow from all \ No newline at end of file diff --git a/plugins/box/menu/js/menu.js b/plugins/box/menu/js/menu.js deleted file mode 100644 index 958ba06..0000000 --- a/plugins/box/menu/js/menu.js +++ /dev/null @@ -1,23 +0,0 @@ -if (typeof $.monstra == 'undefined') $.monstra = {}; - -$.monstra.menu = { - - init: function() { }, - - selectPage: function (slug, title) { - $('input[name=menu_item_link]').val(slug); - $('input[name=menu_item_name]').val(title); - $('#selectPageModal').modal('hide'); - }, - - selectCategory: function (name) { - $('input[name=menu_item_category]').val(name); - $('#selectCategoryModal').modal('hide'); - } - -}; - - -$(document).ready(function(){ - $.monstra.menu.init(); -}); \ No newline at end of file diff --git a/plugins/box/menu/languages/cs.lang.php b/plugins/box/menu/languages/cs.lang.php deleted file mode 100644 index 3152582..0000000 --- a/plugins/box/menu/languages/cs.lang.php +++ /dev/null @@ -1,28 +0,0 @@ - array( - 'Menu' => 'Menu', - 'Menu manager' => 'Manažer menu', - 'Edit' => 'Editovat', - 'Name' => 'Název', - 'Delete' => 'Vymazat', - 'Order' => 'PoÅ™adí', - 'Actions' => 'Akce', - 'Create New Item' => 'VytvoÅ™it novou položku', - 'New item' => 'Nová položka', - 'Item name' => 'Název položky', - 'Item order' => 'PoÅ™adí položky', - 'Item target' => 'Cíl položky', - 'Item link' => 'Odkaz položky', - 'Item category' => 'Kategorie položky', - 'Save' => 'Uložit', - 'Edit item' => 'Editovat položku', - 'Delete item :name' => 'Vymazat položku :name', - 'Select page' => 'Vybrat stránku', - 'Category' => 'Kategorie', - 'Select category' => 'Vybrat kategorii', - 'Required field' => 'Povinné políÄko', - 'Cancel' => 'ZruÅ¡it', - ) - ); diff --git a/plugins/box/menu/languages/de.lang.php b/plugins/box/menu/languages/de.lang.php deleted file mode 100644 index 7a7721e..0000000 --- a/plugins/box/menu/languages/de.lang.php +++ /dev/null @@ -1,28 +0,0 @@ - array( - 'Menu' => 'Menü', - 'Menu manager' => 'Menü Manager', - 'Edit' => 'Bearbeiten', - 'Name' => 'Name', - 'Delete' => 'Löschen', - 'Order' => 'Reihenfolge', - 'Actions' => 'Aktionen', - 'Create New Item' => 'Erstelle neuen Eintrag', - 'New item' => 'Neuer Eintrag', - 'Item name' => 'Eintrags Name', - 'Item order' => 'Eintrags Reihenfolge', - 'Item target' => 'Eintrags Ziel', - 'Item link' => 'Eintrags Link', - 'Item category' => 'Eintrags Kategorie', - 'Save' => 'Speichern', - 'Edit item' => 'Bearbeite Eintrag', - 'Delete item :name' => 'Lösche Eintrag :name', - 'Select page' => 'Seite auswählen', - 'Category' => 'Kategorie', - 'Select category' => 'Kategorie auswählen', - 'Required field' => 'Pflichtfeld', - 'Cancel' => 'Abbrechen', - ) - ); diff --git a/plugins/box/menu/languages/en.lang.php b/plugins/box/menu/languages/en.lang.php deleted file mode 100644 index b2138b5..0000000 --- a/plugins/box/menu/languages/en.lang.php +++ /dev/null @@ -1,28 +0,0 @@ - array( - 'Menu' => 'Menu', - 'Menu manager' => 'Menu manager', - 'Edit' => 'Edit', - 'Name' => 'Name', - 'Delete' => 'Delete', - 'Order' => 'Order', - 'Actions' => 'Actions', - 'Create New Item' => 'Create new item', - 'New item' => 'New item', - 'Item name' => 'Item name', - 'Item order' => 'Item order', - 'Item target' => 'Item target', - 'Item link' => 'Item link', - 'Item category' => 'Item category', - 'Save' => 'Save', - 'Edit item' => 'Edit item', - 'Delete item :name' => 'Delete item :name', - 'Select page' => 'Select page', - 'Category' => 'Category', - 'Select category' => 'Select category', - 'Required field' => 'Required field', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/menu/languages/es.lang.php b/plugins/box/menu/languages/es.lang.php deleted file mode 100644 index 4212eda..0000000 --- a/plugins/box/menu/languages/es.lang.php +++ /dev/null @@ -1,28 +0,0 @@ - array( - 'Menu' => 'Menús', - 'Menu Manager' => 'Administrador de menús', - 'Edit' => 'Editar', - 'Name' => 'Nombre', - 'Delete' => 'Eliminar', - 'Order' => 'Orden', - 'Actions' => 'Acciones', - 'Create New Item' => 'Crear nuevo item', - 'New item' => 'Nuevo item', - 'Item name' => 'Nombre del item', - 'Item order' => 'Orden del item', - 'Item target' => 'Target del item', - 'Item link' => 'Enlace del item', - 'Item category' => 'Categoría del item', - 'Save' => 'Guardar', - 'Edit item' => 'Editar item', - 'Delete item :name' => 'Eliminar item: :name', - 'Select page' => 'Seleccionar página', - 'Category' => 'Categoría', - 'Select category' => 'Seleccionar categoría', - 'Required Field' => 'Dato requerido', - 'Cancel' => 'Cancelar', - ) - ); diff --git a/plugins/box/menu/languages/fa.lang.php b/plugins/box/menu/languages/fa.lang.php deleted file mode 100644 index 9c5637e..0000000 --- a/plugins/box/menu/languages/fa.lang.php +++ /dev/null @@ -1,28 +0,0 @@ - array( - 'Menu' => 'منو', - 'Menu manager' => 'مدیریت منو', - 'Edit' => 'ویرایش', - 'Name' => 'نام', - 'Delete' => 'حذÙ', - 'Order' => 'ترتیب', - 'Actions' => 'عملیات', - 'Create New Item' => 'ایجاد آیتم جدید', - 'New item' => 'آیتم جدید', - 'Item name' => 'نام آیتم', - 'Item order' => 'ترتیب آیتم', - 'Item target' => 'هد٠آیتم', - 'Item link' => 'لینک آیتم', - 'Item category' => 'مجموعه آیتم', - 'Save' => 'ذخیره', - 'Edit item' => 'ویرایش آیتم', - 'Delete item :name' => 'حذ٠آیتم :name', - 'Select page' => 'انتخاب ØµÙØ­Ù‡', - 'Category' => 'مجموعه', - 'Select category' => 'انتخاب مجموعه', - 'Required field' => 'کادر الزامی', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/menu/languages/fr.lang.php b/plugins/box/menu/languages/fr.lang.php deleted file mode 100644 index 1da6d0a..0000000 --- a/plugins/box/menu/languages/fr.lang.php +++ /dev/null @@ -1,28 +0,0 @@ - array( - 'Menu' => 'Menu', - 'Menu manager' => 'Gestionnaire du menu', - 'Edit' => 'Editer', - 'Name' => 'Nom', - 'Delete' => 'Supprimer', - 'Order' => 'Ordre', - 'Actions' => 'Actions', - 'Create new item' => 'Créer un nouvel item', - 'New item' => 'Nouveau item', - 'Item name' => 'Nom de l\'item', - 'Item order' => 'Ordre de l\'item', - 'Item target' => 'Cible de l\'item', - 'Item link' => 'Lien de l\'item', - 'Item category' => 'Catégorie de l\'item', - 'Save' => 'Enregistrer', - 'Edit item' => 'Editer l\'item', - 'Delete item :name' => 'Supprimer l\'item :name', - 'Select page' => 'Sélectionner la page', - 'Category' => 'Catégorie', - 'Select category' => 'Sélectionner une catégorie', - 'Required field' => 'Champ requis', - 'Cancel' => 'Cancel', - ) - ); \ No newline at end of file diff --git a/plugins/box/menu/languages/hu.lang.php b/plugins/box/menu/languages/hu.lang.php deleted file mode 100644 index ea4a970..0000000 --- a/plugins/box/menu/languages/hu.lang.php +++ /dev/null @@ -1,28 +0,0 @@ - array( - 'Menu' => 'Menü', - 'Menu manager' => 'MenükezelÅ‘', - 'Edit' => 'Szerkeszt', - 'Name' => 'Név', - 'Delete' => 'Töröl', - 'Order' => 'Rendezés', - 'Actions' => 'Műveletek', - 'Create New Item' => 'Új menü készítése', - 'New item' => 'Új menü', - 'Item name' => 'Menü neve', - 'Item order' => 'Menü rendezés', - 'Item target' => 'Menü célpont', - 'Item link' => 'Menü link', - 'Item category' => 'Menü kategória', - 'Save' => 'Mentés', - 'Edit item' => 'Menü szerkesztése', - 'Delete item :name' => 'Menü törlése :name', - 'Select page' => 'Válassza ki az oldalt', - 'Category' => 'Kategória', - 'Select category' => 'Válassza ki a kategóriát', - 'Required field' => 'KötelezÅ‘ mezÅ‘', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/menu/languages/id.lang.php b/plugins/box/menu/languages/id.lang.php deleted file mode 100644 index d8e111a..0000000 --- a/plugins/box/menu/languages/id.lang.php +++ /dev/null @@ -1,27 +0,0 @@ - array( - 'Menu' => 'Menu', - 'Menu manager' => 'Pengelolaan Menu', - 'Edit' => 'Perbaiki', - 'Name' => 'Nama', - 'Delete' => 'Hapus', - 'Order' => 'Urutan', - 'Actions' => 'Tindakan', - 'Create New Item' => 'Buat Perihal Baru', - 'New item' => 'Perihal Baru', - 'Item name' => 'Nama Perihal', - 'Item order' => 'Urutan Perihal', - 'Item target' => 'Target Perihal', - 'Item link' => 'Link Perihal', - 'Item category' => 'Kategori Perihal', - 'Save' => 'Simpan', - 'Edit item' => 'Perbaiki Perihal', - 'Delete item :name' => 'Hapus perihal :nama', - 'Select page' => 'Pilih Halaman', - 'Category' => 'Kategori', - 'Select category' => 'Pilih Kategori', - 'Required field' => 'Isian yang Dibutuhkan', - ) - ); diff --git a/plugins/box/menu/languages/it.lang.php b/plugins/box/menu/languages/it.lang.php deleted file mode 100644 index 7ae32f0..0000000 --- a/plugins/box/menu/languages/it.lang.php +++ /dev/null @@ -1,28 +0,0 @@ - array( - 'Menu' => 'Menu', - 'Menu manager' => 'Gestione menu', - 'Edit' => 'Modifica', - 'Name' => 'Nome', - 'Delete' => 'Elimina', - 'Order' => 'Ordine', - 'Actions' => 'Azioni', - 'Create New Item' => 'Crea nuova voce', - 'New item' => 'Nuova voce', - 'Item name' => 'Nome', - 'Item order' => 'Ordine', - 'Item target' => 'Target', - 'Item link' => 'Collegamento', - 'Item category' => 'Categoria', - 'Save' => 'Salva', - 'Edit item' => 'Modifica voce menu', - 'Delete item :name' => 'Elimina voce menu :name', - 'Select page' => 'Scegli pagina', - 'Category' => 'Categoria', - 'Select category' => 'Scegli categoria', - 'Required field' => 'Campo obbligatorio', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/menu/languages/ja.lang.php b/plugins/box/menu/languages/ja.lang.php deleted file mode 100644 index dde5e6f..0000000 --- a/plugins/box/menu/languages/ja.lang.php +++ /dev/null @@ -1,27 +0,0 @@ - array( - 'Menu' => 'メニュー', - 'Menu manager' => 'メニューã®ç®¡ç†', - 'Edit' => '編集', - 'Name' => 'åå‰', - 'Delete' => '削除', - 'Order' => 'é †åº', - 'Actions' => 'æ“作', - 'Create New Item' => 'æ–°è¦ã‚¢ã‚¤ãƒ†ãƒ ã‚’作æˆ', - 'New item' => 'æ–°è¦ã‚¢ã‚¤ãƒ†ãƒ ', - 'Item name' => 'アイテムã®åå‰', - 'Item order' => 'アイテムã®é †åº', - 'Item target' => 'アイテムã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆ', - 'Item link' => 'アイテムã®ãƒªãƒ³ã‚¯å…ˆ', - 'Item category' => 'アイテムã®ã‚«ãƒ†ã‚´ãƒª', - 'Save' => 'ä¿å­˜', - 'Edit item' => 'アイテムã®ç·¨é›†', - 'Delete item :name' => 'アイテムã®å‰Šé™¤ :name', - 'Select page' => 'ページã®é¸æŠž', - 'Category' => 'カテゴリ', - 'Select category' => 'カテゴリã®é¸æŠž', - 'Required field' => '必須項目', - ) - ); diff --git a/plugins/box/menu/languages/ka-ge.lang.php b/plugins/box/menu/languages/ka-ge.lang.php deleted file mode 100644 index 3466326..0000000 --- a/plugins/box/menu/languages/ka-ge.lang.php +++ /dev/null @@ -1,28 +0,0 @@ - array( - 'Menu' => 'მენიუ', - 'Menu manager' => 'მენიუს მენეჯერი', - 'Edit' => 'რედáƒáƒ¥áƒ¢áƒ˜áƒ áƒ”ბáƒ', - 'Name' => 'სáƒáƒ®áƒ”ლწáƒáƒ“ებáƒ', - 'Delete' => 'წáƒáƒ¨áƒšáƒ', - 'Order' => 'რიგი', - 'Actions' => 'მáƒáƒ¥áƒ›áƒ”დებáƒ', - 'Create New Item' => 'მენიუს áƒáƒ®áƒáƒšáƒ˜ პუნქტის შექმნáƒ', - 'New item' => 'მენიუს áƒáƒ®áƒáƒšáƒ˜ პუნქტი', - 'Item name' => 'სáƒáƒ®áƒ”ლი', - 'Item order' => 'რიგი', - 'Item target' => 'მიზáƒáƒœáƒ˜', - 'Item link' => 'ბმული', - 'Item category' => 'კáƒáƒ¢áƒ”გáƒáƒ áƒ˜áƒ', - 'Save' => 'შენáƒáƒ®áƒ•áƒ', - 'Edit item' => 'მენიუს პუნქტის რედáƒáƒ¥áƒ¢áƒ˜áƒ áƒ”ბáƒ', - 'Delete item :name' => 'მენიუს პუქტის წáƒáƒ¨áƒšáƒ :name', - 'Select page' => 'გვერდის áƒáƒ áƒ©áƒ”ვáƒ', - 'Category' => 'კáƒáƒ¢áƒ”გáƒáƒ áƒ˜áƒ', - 'Select category' => 'კáƒáƒ¢áƒ”გáƒáƒ áƒ˜áƒ˜áƒ¡ áƒáƒ áƒ©áƒ”ვáƒ', - 'Required field' => 'áƒáƒ£áƒªáƒ˜áƒšáƒ”ბელი ველი', - 'Cancel' => 'გáƒáƒ£áƒ¥áƒ›áƒ”ბáƒ', - ) - ); diff --git a/plugins/box/menu/languages/lt.lang.php b/plugins/box/menu/languages/lt.lang.php deleted file mode 100644 index cdcfa87..0000000 --- a/plugins/box/menu/languages/lt.lang.php +++ /dev/null @@ -1,29 +0,0 @@ - array( - 'Menu' => 'Meniu', - 'Menu manager' => 'Meniu tvarkyklÄ—', - 'Edit' => 'Redaguoti', - 'Name' => 'Pavadinimas', - 'Delete' => 'Trinti', - 'Order' => 'EiliÅ¡kumas', - 'Actions' => 'Veiksmai', - 'Create New Item' => 'Sukurti naujÄ… nuorodÄ…', - 'New item' => 'Nauja nuoroda', - 'Item name' => 'Pavadinimas', - 'Item order' => 'EiliÅ¡kumas', - 'Item target' => 'Nuorodos atidarymo bÅ«das', - 'Item link' => 'Nuoroda', - 'Item category' => 'Kategorija', - 'Save' => 'IÅ¡saugoti', - 'Edit item' => 'Redaguoti nuorodÄ…', - 'Delete item :name' => 'IÅ¡trinti nuorodÄ… :name', - 'Add page' => 'PridÄ—ti puslapį', - 'Select page' => 'Pasirinkti puslapį', - 'Category' => 'Kategorija', - 'Select category' => 'Pasirinkti kategorijÄ…', - 'Required field' => 'Privalomas laukas', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/menu/languages/nl.lang.php b/plugins/box/menu/languages/nl.lang.php deleted file mode 100644 index d015fdd..0000000 --- a/plugins/box/menu/languages/nl.lang.php +++ /dev/null @@ -1,28 +0,0 @@ - array( - 'Menu' => 'Menu', - 'Menu manager' => 'Menu beheer', - 'Edit' => 'Bewerken', - 'Name' => 'Naam', - 'Delete' => 'Verwijderen', - 'Order' => 'Volgorde', - 'Actions' => 'Acties', - 'Create New Item' => 'Nieuw menu', - 'New item' => 'Nieuw menu', - 'Item name' => 'Menu naam', - 'Item order' => 'Menu volgorde', - 'Item target' => 'Menu doel', - 'Item link' => 'Menu link', - 'Item category' => 'Menu categorie', - 'Save' => 'Opslaan', - 'Edit item' => 'Bewerk menu', - 'Delete item :name' => 'Verwijder menu: :name', - 'Select page' => 'Selecteer pagina', - 'Category' => 'Categorie', - 'Select category' => 'Selecteer categorie', - 'Required field' => 'Vereist veld', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/menu/languages/pl.lang.php b/plugins/box/menu/languages/pl.lang.php deleted file mode 100644 index 4cd9c6f..0000000 --- a/plugins/box/menu/languages/pl.lang.php +++ /dev/null @@ -1,28 +0,0 @@ - array( - 'Menu' => 'Menu', - 'Menu manager' => 'ZarzÄ…dzaj menu', - 'Edit' => 'Edytuj', - 'Name' => 'Nazwa', - 'Delete' => 'UsuÅ„', - 'Order' => 'Kolejność', - 'Actions' => 'Akcje', - 'Create New Item' => 'Utwórz nowÄ… pozycjÄ™', - 'New item' => 'Nowa pozycja', - 'Item name' => 'Nazwa pozycji', - 'Item order' => 'Kolejność pozycji', - 'Item target' => 'Cel pozycji', - 'Item link' => 'ÅÄ…cze pozycji', - 'Item category' => 'Kategoria pozycji', - 'Save' => 'Zapisz', - 'Edit item' => 'Edytuj pozycjÄ™', - 'Delete item :name' => 'Czy napewno usunąć pozycjÄ™ :name', - 'Select page' => 'Wybierz stronÄ™', - 'Category' => 'Kategoria', - 'Select category' => 'Wybierz kategoriÄ™', - 'Required field' => 'Pole wymagane', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/menu/languages/pt-br.lang.php b/plugins/box/menu/languages/pt-br.lang.php deleted file mode 100644 index 50a45c9..0000000 --- a/plugins/box/menu/languages/pt-br.lang.php +++ /dev/null @@ -1,28 +0,0 @@ - array( - 'Menu' => 'Menu', - 'Menu manager' => 'Gerenciador do menu', - 'Edit' => 'Editar', - 'Name' => 'Nome', - 'Delete' => 'Deletar', - 'Order' => 'Ordem', - 'Actions' => 'Ações', - 'Create New Item' => 'Criar novo item', - 'New item' => 'Novo item', - 'Item name' => 'Nome do item', - 'Item order' => 'ordem do item', - 'Item target' => 'Target do item (atributo HTML)', - 'Item link' => 'Link do item', - 'Item category' => 'Categoria do item', - 'Save' => 'Salvar', - 'Edit item' => 'Editar item', - 'Delete item :name' => 'Deletar o item :name', - 'Select page' => 'Selecionar página', - 'Category' => 'Categoria', - 'Select category' => 'Selecionar categoria', - 'Required field' => 'Campo requerido', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/menu/languages/ru.lang.php b/plugins/box/menu/languages/ru.lang.php deleted file mode 100644 index b27eee6..0000000 --- a/plugins/box/menu/languages/ru.lang.php +++ /dev/null @@ -1,28 +0,0 @@ - array( - 'Menu' => 'Меню', - 'Menu manager' => 'Менеджер меню', - 'Edit' => 'Редактировать', - 'Name' => 'Ðазвание', - 'Delete' => 'Удалить', - 'Order' => 'ПорÑдок', - 'Actions' => 'ДейÑтвиÑ', - 'Create New Item' => 'Создать новый пункт меню', - 'New item' => 'Ðовый пункт меню', - 'Item name' => 'Ðазвание', - 'Item order' => 'ПорÑдок', - 'Item target' => 'Цель', - 'Item link' => 'СÑылка', - 'Item category' => 'КатегориÑ', - 'Save' => 'Сохранить', - 'Edit item' => 'Редактирование пункта меню', - 'Delete item :name' => 'Удалить пункт меню :name', - 'Select page' => 'Выбрать Ñтраницу', - 'Category' => 'КатегориÑ', - 'Select category' => 'Выбрать категорию', - 'Required field' => 'ОбÑзательное поле', - 'Cancel' => 'Отмена', - ) - ); diff --git a/plugins/box/menu/languages/sk.lang.php b/plugins/box/menu/languages/sk.lang.php deleted file mode 100644 index ea8a927..0000000 --- a/plugins/box/menu/languages/sk.lang.php +++ /dev/null @@ -1,28 +0,0 @@ - array( - 'Menu' => 'Menu', - 'Menu manager' => 'Manažér menu', - 'Edit' => 'EditovaÅ¥', - 'Name' => 'Názov', - 'Delete' => 'VymazaÅ¥', - 'Order' => 'Poradie', - 'Actions' => 'Akcie', - 'Create New Item' => 'VytvoriÅ¥ novú položku', - 'New item' => 'Nová položka', - 'Item name' => 'Názov položky', - 'Item order' => 'Poradie položky', - 'Item target' => 'Cieľ položky', - 'Item link' => 'Odkaz položky', - 'Item category' => 'Kategória položky', - 'Save' => 'UložiÅ¥', - 'Edit item' => 'EditovaÅ¥ položku', - 'Delete item :name' => 'VymazaÅ¥ položku :name', - 'Select page' => 'VybraÅ¥ stránku', - 'Category' => 'Kategória', - 'Select category' => 'VybraÅ¥ kategóriu', - 'Required field' => 'Povinné políÄko', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/menu/languages/sr.lang.php b/plugins/box/menu/languages/sr.lang.php deleted file mode 100644 index 27e7da3..0000000 --- a/plugins/box/menu/languages/sr.lang.php +++ /dev/null @@ -1,28 +0,0 @@ - array( - 'Menu' => 'Menu', - 'Menu manager' => 'Menu menadžer', - 'Edit' => 'Izmeni', - 'Name' => 'Ime', - 'Delete' => 'ObriÅ¡i', - 'Order' => 'PoreÄ‘enje', - 'Actions' => 'Akcije', - 'Create new item' => 'Kreiraj novu stavku', - 'New item' => 'Nova stavka', - 'Item name' => 'Ime', - 'Item order' => 'Poredjenje', - 'Item target' => 'Otvaranje stranice', - 'Item link' => 'Link', - 'Item category' => 'Kategorija', - 'Save' => 'SaÄuvaj', - 'Edit item' => 'Izmeni', - 'Delete item :name' => 'ObriÅ¡i stavku :name', - 'Select page' => 'Odaberi stranicu', - 'Category' => 'Kategorija', - 'Select category' => 'Odaberi kategoriju', - 'Required field' => 'Polje je potrebno', - 'Cancel' => 'Otkaži', - ) - ); diff --git a/plugins/box/menu/languages/tr.lang.php b/plugins/box/menu/languages/tr.lang.php deleted file mode 100644 index fd82163..0000000 --- a/plugins/box/menu/languages/tr.lang.php +++ /dev/null @@ -1,28 +0,0 @@ - array( - 'Menu' => 'Menü', - 'Menu manager' => 'Menü Yöneticisi', - 'Edit' => 'Düzenle', - 'Name' => 'Ad', - 'Delete' => 'Sil', - 'Order' => 'Sıra', - 'Actions' => 'İşlemler', - 'Create New Item' => 'Yeni BaÄŸlantı OluÅŸtur', - 'New item' => 'Yeni baÄŸlantı', - 'Item name' => 'BaÄŸlantı adı', - 'Item order' => 'BaÄŸlantı sırası', - 'Item target' => 'BaÄŸlantı hedefi', - 'Item link' => 'BaÄŸlantı yolu', - 'Item category' => 'BaÄŸlantı kategorisi', - 'Save' => 'Kaydet', - 'Edit item' => 'BaÄŸlantıyı düzenle', - 'Delete item :name' => ':name adlı baÄŸlantıyı sil', - 'Select page' => 'Sayfa seç', - 'Category' => 'Kategori', - 'Select category' => 'Kategori seç', - 'Required field' => 'Zorunlu alan', - 'Cancel' => 'Vazgeç', - ) - ); diff --git a/plugins/box/menu/languages/uk.lang.php b/plugins/box/menu/languages/uk.lang.php deleted file mode 100644 index 1d60f94..0000000 --- a/plugins/box/menu/languages/uk.lang.php +++ /dev/null @@ -1,28 +0,0 @@ - array( - 'Menu' => 'Меню', - 'Menu manager' => 'Менеджер меню', - 'Edit' => 'Редагувати', - 'Name' => 'Ðазва', - 'Delete' => 'Видалити', - 'Order' => 'ПорÑдок', - 'Actions' => 'Дії', - 'Create New Item' => 'Створити новий пункт меню', - 'New item' => 'Ðовий пункт меню', - 'Item name' => 'Ðазва', - 'Item order' => 'ПорÑдок', - 'Item target' => 'Ціль', - 'Item link' => 'Лінк', - 'Item category' => 'КатегоріÑ', - 'Save' => 'Зберегти', - 'Edit item' => 'Редагувати пункт меню', - 'Delete item :name' => 'Видалити пункт меню :name', - 'Select page' => 'Вибрати Ñторінку', - 'Category' => 'КатегоріÑ', - 'Select category' => 'Вибрати категорію', - 'Required field' => 'Обов’Ñзкове поле', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/menu/languages/zh-cn.lang.php b/plugins/box/menu/languages/zh-cn.lang.php deleted file mode 100644 index 911ded3..0000000 --- a/plugins/box/menu/languages/zh-cn.lang.php +++ /dev/null @@ -1,27 +0,0 @@ - array( - 'Menu' => 'èœå•', - 'Menu manager' => 'èœå•管ç†', - 'Edit' => '编辑', - 'Name' => 'åç§°', - 'Delete' => '删除', - 'Order' => '顺åº', - 'Actions' => 'æ“作', - 'Create New Item' => '创建新项目', - 'New item' => '新项目', - 'Item name' => '项目åç§°', - 'Item order' => '项目顺åº', - 'Item target' => '项目目标', - 'Item link' => '项目链接', - 'Item category' => '项目类别', - 'Save' => 'ä¿å­˜', - 'Edit item' => '布局项目', - 'Delete item :name' => '删除项目 :name', - 'Select page' => '选择页é¢', - 'Category' => '类别', - 'Select category' => '选择类别', - 'Required field' => '必填字段', - ) - ); diff --git a/plugins/box/menu/menu.admin.php b/plugins/box/menu/menu.admin.php deleted file mode 100644 index ce6076d..0000000 --- a/plugins/box/menu/menu.admin.php +++ /dev/null @@ -1,273 +0,0 @@ - '', - '_blank' => '_blank', - '_parent' => '_parent', - '_top' => '_top'); - - // Create order array - $menu_item_order_array = range(0, 40); - - // Check for get actions - // --------------------------------------------- - if (Request::get('action')) { - - // Switch actions - // ----------------------------------------- - switch (Request::get('action')) { - - // Edit menu item - // ----------------------------------------- - case "edit": - - // Select item - $item = MenuAdmin::$menu->select('[id="'.Request::get('item_id').'"]', null); - - $menu_item_name = $item['name']; - $menu_item_link = $item['link']; - $menu_item_category = $item['category']; - $menu_item_target = $item['target']; - $menu_item_order = $item['order']; - - $errors = array(); - - // Edit current menu item - if (Request::post('menu_add_item')) { - - if (Security::check(Request::post('csrf'))) { - - if (trim(Request::post('menu_item_name')) == '') { - - if (Request::post('menu_item_name')) $menu_item_name = Request::post('menu_item_name'); else $menu_item_name = $item['name']; - if (Request::post('menu_item_link')) $menu_item_link = Request::post('menu_item_link'); else $menu_item_link = $item['link']; - if (Request::post('menu_item_category')) $menu_item_category = Request::post('menu_item_category'); else $menu_item_category = $item['category']; - if (Request::post('menu_item_target')) $menu_item_target = Request::post('menu_item_target'); else $menu_item_target = $item['target']; - if (Request::post('menu_item_order')) $menu_item_order = Request::post('menu_item_order'); else $menu_item_order = $item['order']; - - $errors['menu_item_name_empty'] = __('Required field', 'menu'); - } - - // Update menu item - if (count($errors) == 0) { - MenuAdmin::$menu->update(Request::get('item_id'), - array('name' => Request::post('menu_item_name'), - 'link' => Request::post('menu_item_link'), - 'category' => Security::safeName(Request::post('menu_item_category'), '-', true), - 'target' => Request::post('menu_item_target'), - 'order' => Request::post('menu_item_order'))); - - Request::redirect('index.php?id=menu'); - } - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - - } - - // Display view - View::factory('box/menu/views/backend/edit') - ->assign('menu_item_name', $menu_item_name) - ->assign('menu_item_link', $menu_item_link) - ->assign('menu_item_category', $menu_item_category) - ->assign('menu_item_target', $menu_item_target) - ->assign('menu_item_order', $menu_item_order) - ->assign('menu_item_target_array', $menu_item_target_array) - ->assign('menu_item_order_array', $menu_item_order_array) - ->assign('errors', $errors) - ->assign('categories', MenuAdmin::getCategories()) - ->assign('pages_list', MenuAdmin::getPages()) - ->assign('components_list', MenuAdmin::getComponents()) - ->display(); - - break; - - // Add menu item - // ----------------------------------------- - case "add": - - $menu_item_name = ''; - $menu_item_link = ''; - $menu_item_category = ''; - $menu_item_target = ''; - $menu_item_order = ''; - $errors = array(); - - // Get current category - $menu_item_category = $current_category = (Request::get('category')) ? Request::get('category') : '' ; - - // Add new menu item - if (Request::post('menu_add_item')) { - - if (Security::check(Request::post('csrf'))) { - - if (trim(Request::post('menu_item_name')) == '') { - - if (Request::post('menu_item_name')) $menu_item_name = Request::post('menu_item_name'); else $menu_item_name = ''; - if (Request::post('menu_item_link')) $menu_item_link = Request::post('menu_item_link'); else $menu_item_link = ''; - if (Request::post('menu_item_category')) $menu_item_category = Request::post('menu_item_category'); else $menu_item_category = $current_category; - if (Request::post('menu_item_target')) $menu_item_target = Request::post('menu_item_target'); else $menu_item_target = ''; - if (Request::post('menu_item_order')) $menu_item_order = Request::post('menu_item_order'); else $menu_item_order = ''; - - $errors['menu_item_name_empty'] = __('Required field', 'menu'); - } - - // Insert new menu item - if (count($errors) == 0) { - MenuAdmin::$menu->insert(array('name' => Request::post('menu_item_name'), - 'link' => Request::post('menu_item_link'), - 'category' => Security::safeName(Request::post('menu_item_category'), '-', true), - 'target' => Request::post('menu_item_target'), - 'order' => Request::post('menu_item_order'))); - - Request::redirect('index.php?id=menu'); - } - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - } - - // Display view - View::factory('box/menu/views/backend/add') - ->assign('menu_item_name', $menu_item_name) - ->assign('menu_item_link', $menu_item_link) - ->assign('menu_item_category', $menu_item_category) - ->assign('menu_item_target', $menu_item_target) - ->assign('menu_item_order', $menu_item_order) - ->assign('menu_item_target_array', $menu_item_target_array) - ->assign('menu_item_order_array', $menu_item_order_array) - ->assign('errors', $errors) - ->assign('categories', MenuAdmin::getCategories()) - ->assign('pages_list', MenuAdmin::getPages()) - ->assign('components_list', MenuAdmin::getComponents()) - ->display(); - - break; - } - - } else { - - // Delete menu item - if (Request::get('delete_item')) { - MenuAdmin::$menu->delete((int) Request::get('delete_item')); - } - - // Display view - View::factory('box/menu/views/backend/index') - ->assign('categories', MenuAdmin::getCategories()) - ->assign('menu', MenuAdmin::$menu) - ->display(); - - } - - } - - /** - * Get categories - */ - public static function getCategories() - { - $categories = array(); - - $_categories = MenuAdmin::$menu->select(null, 'all', null, array('category')); - - foreach ($_categories as $category) { - $categories[] = $category['category']; - } - - return array_unique($categories); - } - - /** - * Get pages - */ - protected static function getPages() - { - // Init vars - $pages_array = array(); - $count = 0; - - // Get pages table - $pages = new Table('pages'); - - // Get Pages List - $pages_list = $pages->select('[slug!="error404" and status="published"]'); - - foreach ($pages_list as $page) { - - $pages_array[$count]['title'] = Html::toText($page['title']); - $pages_array[$count]['parent'] = $page['parent']; - $pages_array[$count]['date'] = $page['date']; - $pages_array[$count]['author'] = $page['author']; - $pages_array[$count]['slug'] = ($page['slug'] == Option::get('defaultpage')) ? '' : $page['slug'] ; - - if (isset($page['parent'])) { - $c_p = $page['parent']; - } else { - $c_p = ''; - } - - if ($c_p != '') { - $_page = $pages->select('[slug="'.$page['parent'].'"]', null); - - if (isset($_page['title'])) { - $_title = $_page['title']; - } else { - $_title = ''; - } - $pages_array[$count]['sort'] = $_title . ' ' . $page['title']; - } else { - $pages_array[$count]['sort'] = $page['title']; - } - $_title = ''; - $count++; - } - - // Sort pages - $_pages_list = Arr::subvalSort($pages_array, 'sort'); - - // return - return $_pages_list; - } - - /** - * Get components - */ - protected static function getComponents() - { - $components = array(); - - if (count(Plugin::$components) > 0) { - foreach (Plugin::$components as $component) { - if ($component !== 'pages' && $component !== 'sitemap') $components[] = Text::lowercase($component); - } - } - - return $components; - } - -} diff --git a/plugins/box/menu/menu.plugin.php b/plugins/box/menu/menu.plugin.php deleted file mode 100644 index 3d0a378..0000000 --- a/plugins/box/menu/menu.plugin.php +++ /dev/null @@ -1,57 +0,0 @@ -assign('items', $menu->select('[category="'.$category.'"]', 'all', null, array('id', 'name', 'link', 'target', 'order', 'category'), 'order', 'ASC')) - ->assign('uri', Uri::segments()) - ->assign('defpage', Option::get('defaultpage')) - ->display(); - - } -} diff --git a/plugins/box/menu/views/backend/add.view.php b/plugins/box/menu/views/backend/add.view.php deleted file mode 100644 index 7e4ed76..0000000 --- a/plugins/box/menu/views/backend/add.view.php +++ /dev/null @@ -1,102 +0,0 @@ -

    - - - - - - - - - -
    -
    - -
    - (isset($errors['menu_item_name_empty']) || isset($errors['menu_item_name_empty'])) ? 'form-control error-field' : 'form-control')); - if (isset($errors['menu_item_name_empty'])) echo '
    '.$errors['menu_item_name_empty'].'
    '; - ?> -
    -
    - 'form-control')) - ); - ?> -
    -
    - 'form-control')) - ); - ?> -
    -
    - 'form-control')) - ); - ?> -
    -
    - 'form-control')) - ); - ?> -
    -
    - 'btn btn-phone btn-primary')).Html::nbsp(2). - Html::anchor(__('Cancel', 'menu'), 'index.php?id=menu', array('title' => __('Cancel', 'menu'), 'class' => 'btn btn-phone btn-default')). - Form::close() - ); - ?> -
    -
    -
    - - - - \ No newline at end of file diff --git a/plugins/box/menu/views/backend/edit.view.php b/plugins/box/menu/views/backend/edit.view.php deleted file mode 100644 index c83ce35..0000000 --- a/plugins/box/menu/views/backend/edit.view.php +++ /dev/null @@ -1,103 +0,0 @@ -

    - -
    -
    - - - - - - - - - - - -
    - (isset($errors['menu_item_name_empty']) || isset($errors['menu_item_name_empty'])) ? 'form-control error-field' : 'form-control')); - ?> -
    - -
    - '.$errors['menu_item_name_empty'].''; - echo ( - Form::label('menu_item_link', __('Item link', 'menu')). - Form::input('menu_item_link', $menu_item_link, array('class' => 'form-control')) - ); - ?> -
    -
    - 'form-control')) - ); - ?> -
    -
    - 'form-control')) - ); - ?> -
    -
    - 'form-control')) - ); - ?> -
    - 'btn btn-phone btn-primary')).Html::nbsp(2). - Html::anchor(__('Cancel', 'menu'), 'index.php?id=menu', array('title' => __('Cancel', 'menu'), 'class' => 'btn btn-phone btn-default')). - Form::close() - ); - ?> -
    -
    - - - - \ No newline at end of file diff --git a/plugins/box/menu/views/backend/index.view.php b/plugins/box/menu/views/backend/index.view.php deleted file mode 100644 index e35d910..0000000 --- a/plugins/box/menu/views/backend/index.view.php +++ /dev/null @@ -1,80 +0,0 @@ -

    - -count() == 0) { ?> -
    -
    -

    :

    -
    -
    - __('Create New Item', 'menu'), 'class' => 'btn btn-phone btn-primary')) - ); - ?> -
    -
    - - -select('[category="'.$category.'"]', 'all', null, array('id', 'name', 'link', 'target', 'order', 'category'), 'order', 'ASC'); - $category_to_add = ($category == '') ? '' : '&category='.$category; -?> - -
    -
    -

    :

    -
    -
    -
    - __('Create New Item', 'menu'), 'class' => 'btn btn-phone btn-primary')) - ); - ?> -
    -
    - - - - - - - - - - - - - - - - - - - -
    - - - - -
    - 'btn btn-primary')); ?> - 'btn btn-danger', 'onclick' => "return confirmDelete('".__('Delete item :name', 'menu', array(':name' => $item['name']))."')")); - ?> -
    -
    - diff --git a/plugins/box/menu/views/frontend/index.view.php b/plugins/box/menu/views/frontend/index.view.php deleted file mode 100644 index eafd4f1..0000000 --- a/plugins/box/menu/views/frontend/index.view.php +++ /dev/null @@ -1,52 +0,0 @@ - 0) { - foreach ($items as $item) { - - $item['link'] = Html::toText($item['link']); - $item['name'] = Html::toText($item['name']); - - $pos = strpos($item['link'], 'http://'); - if ($pos === false) { - $link = Option::get('siteurl').'/'.$item['link']; - } else { - $link = $item['link']; - } - - if (isset($uri[1])) { - $child_link = explode("/",$item['link']); - if (isset($child_link[1])) { - if (in_array($child_link[1], $uri)) { - $anchor_active = ' class="current" '; - $li_active = ' class="active"'; - } - } - } - - if (isset($uri[0]) && $uri[0] !== '') { - if (in_array($item['link'], $uri)) { - $anchor_active = ' class="current" '; - $li_active = ' class="active"'; - } - } else { - if ($defpage == trim($item['link'])) { - $anchor_active = ' class="current" '; - $li_active = ' class="active"'; - } - } - - if (trim($item['target']) !== '') { - $target = ' target="'.$item['target'].'" '; - } - - echo ''.''.$item['name'].''.''; - - $anchor_active = ''; - $li_active = ''; - $target = ''; - } - } diff --git a/plugins/box/pages/install/pages.manifest.xml b/plugins/box/pages/install/pages.manifest.xml deleted file mode 100644 index 9bf53f8..0000000 --- a/plugins/box/pages/install/pages.manifest.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - plugins/box/pages/pages.plugin.php - active - 1 - Pages - Pages managment plugin - 1.0.0 - Awilum - http://monstra.org/ - diff --git a/plugins/box/pages/js/.htaccess b/plugins/box/pages/js/.htaccess deleted file mode 100644 index b9f48ac..0000000 --- a/plugins/box/pages/js/.htaccess +++ /dev/null @@ -1,2 +0,0 @@ -Options -Indexes -Allow from all \ No newline at end of file diff --git a/plugins/box/pages/js/pages.js b/plugins/box/pages/js/pages.js deleted file mode 100644 index 749f22e..0000000 --- a/plugins/box/pages/js/pages.js +++ /dev/null @@ -1,36 +0,0 @@ -if (typeof $.monstra == 'undefined') $.monstra = {}; - -$.monstra.pages = { - - init: function() { - this.pagesExpandProcess(); - }, - - pageExpand: function(slug, expand, token) { - $.ajax({ - type:"post", - data:"page_slug="+slug+"&page_expand="+expand+"&token="+token, - url: $('form input[name="url"]').val() - }); - }, - - pagesExpandProcess: function() { - $(".parent").click(function() { - if ($(this).html() == "-") { - $('[rel="children_' + $(this).attr('rel')+'"]').hide(); - $(this).html("+"); - $.monstra.pages.pageExpand($(this).attr("rel"), "1", $(this).attr("token")); - } else { - $('[rel="children_' + $(this).attr('rel')+'"]').show(); - $(this).html("-"); - $.monstra.pages.pageExpand($(this).attr("rel"), "0", $(this).attr("token")); - } - }); - } - -}; - - -$(document).ready(function(){ - $.monstra.pages.init(); -}); \ No newline at end of file diff --git a/plugins/box/pages/languages/cs.lang.php b/plugins/box/pages/languages/cs.lang.php deleted file mode 100644 index e6dd441..0000000 --- a/plugins/box/pages/languages/cs.lang.php +++ /dev/null @@ -1,55 +0,0 @@ - array( - 'Pages' => 'Stránky', - 'Pages manager' => 'Manažer stránek', - 'Content' => 'Obsah', - 'Create new page' => 'VytvoÅ™it novou stránku', - 'New page' => 'Nová stránka', - 'Edit page' => 'Editovat stránku', - 'Date' => 'Datum', - 'Clone' => 'Klonovat', - 'Edit' => 'Editovat', - 'Delete' => 'Vymazat', - 'Delete page: :page' => 'Vymazat stránku: :page', - 'Title' => 'Titulka', - 'Name' => 'Název', - 'Author' => 'Autor', - 'Name (slug)' => 'Název (slug)', - 'Description' => 'Popis', - 'Keywords' => 'KlíÄová slová', - 'Parent' => 'RodiÄ - NadÅ™azená stránka', - 'Template' => 'Téma', - 'Year' => 'Rok', - 'Day' => 'Den', - 'Month' => 'MÄ›síc', - 'Hour' => 'Hodina', - 'Minute' => 'Minuta', - 'Second' => 'Sekunda', - 'This field should not be empty' => 'Toto políÄko nesmí být prázdné', - 'This page already exists' => 'Tato stránka již existuje', - 'Extra' => 'Extra', - 'Save' => 'Uložit', - 'Save and Exit' => 'Uložit a ukonÄit', - 'Your changes to the page :page have been saved.' => 'VaÅ¡e zmÄ›ny na stránce :page byly uloženy.', - 'The page :page cloned.' => 'Stránka :page byla klonována.', - 'Status' => 'Status', - 'Actions' => 'Akcie', - 'Add' => 'PÅ™idat', - 'Published' => 'ZveÅ™ejnÄ›né', - 'Draft' => 'Rozpísané', - 'Published on' => 'ZveÅ™ejnÄ›né dne', - 'Edit 404 Page' => 'Editovat stránku 404', - 'Page :page deleted' => 'Vymazat stránku: :page', - 'Search Engines Robots' => 'Vyhledávací roboti', - 'Page' => 'Stránka', - 'Metadata' => 'Metadata', - 'Settings' => 'Nastavení', - 'Required field' => 'Povinné políÄko', - 'Access' => 'Přístup', - 'Public' => 'VeÅ™ejný', - 'Registered' => 'Po pÅ™ihlášení', - 'Cancel' => 'ZruÅ¡it', - ) - ); diff --git a/plugins/box/pages/languages/de.lang.php b/plugins/box/pages/languages/de.lang.php deleted file mode 100644 index 323ba36..0000000 --- a/plugins/box/pages/languages/de.lang.php +++ /dev/null @@ -1,55 +0,0 @@ - array( - 'Pages' => 'Seiten', - 'Pages manager' => 'Seiten Manager', - 'Content' => 'Inhalt', - 'Create New Page' => 'Neue Seite erstellen', - 'New Page' => 'Neue Seite', - 'Edit Page' => 'Seite bearbeiten', - 'Date' => 'Datum', - 'Clone' => 'Klonen', - 'Edit' => 'Bearbeiten', - 'Delete' => 'Löschen', - 'Delete page: :page' => 'Lösche Seite: :page', - 'Title' => 'Titel', - 'Name' => 'Name', - 'Author' => 'Author', - 'Name (slug)' => 'Name (slug)', - 'Description' => 'Beschreibung', - 'Keywords' => 'Schlagwörter', - 'Parent' => 'Übergeordnete', - 'Template' => 'Vorlage', - 'Year' => 'Jahr', - 'Day' => 'Tag', - 'Month' => 'Monat', - 'Hour' => 'Stunde', - 'Minute' => 'Minute', - 'Second' => 'Sekunde', - 'This field should not be empty' => 'Dieses Feld darf nicht leer sein', - 'This page already exists' => 'Diese Seite existiert bereits', - 'Extra' => 'Extra', - 'Save' => 'Speichern', - 'Save and Exit' => 'Speichern und Beenden', - 'Your changes to the page :page have been saved.' => 'Deine Änderungen an der Seite :page wurden gespeichert.', - 'The page :page cloned.' => 'Die Seite :page wurde gekloned.', - 'Status' => 'Status', - 'Actions' => 'Aktionen', - 'Add' => 'Hinzufügen', - 'Published' => 'Veröffentlicht', - 'Draft' => 'Entwurf', - 'Published on' => 'Veröffentlicht am', - 'Edit 404 Page' => 'Bearbeite 404-Fehler Seite', - 'Page :page deleted' => 'Seite :page wurde gelöscht', - 'Search Engines Robots' => 'Suchmaschinen-Roboter', - 'Page' => 'Seite', - 'Metadata' => 'Metadata', - 'Settings' => 'Einstellungen', - 'Required field' => 'Pflichtfeld', - 'Access' => 'Zugriff', - 'Public' => 'Öffentlich', - 'Registered' => 'Angemeldet', - 'Cancel' => 'Abbrechen', - ) - ); diff --git a/plugins/box/pages/languages/en.lang.php b/plugins/box/pages/languages/en.lang.php deleted file mode 100644 index 56f0bf6..0000000 --- a/plugins/box/pages/languages/en.lang.php +++ /dev/null @@ -1,57 +0,0 @@ - array( - 'Pages' => 'Pages', - 'Pages manager' => 'Pages manager', - 'Content' => 'Content', - 'Create New Page' => 'Create New Page', - 'New Page' => 'New Page', - 'Edit Page' => 'Edit Page', - 'Date' => 'Date', - 'Clone' => 'Clone', - 'Edit' => 'Edit', - 'Delete' => 'Delete', - 'Delete page: :page' => 'Delete page: :page', - 'Title' => 'Title', - 'Name' => 'Name', - 'Author' => 'Author', - 'Name (slug)' => 'Name (slug)', // check whether in use or not - 'Slug (url)' => 'Slug (url)', - 'Description' => 'Description', - 'Keywords' => 'Keywords', - 'Parent' => 'Parent', - 'Template' => 'Template', - 'Year' => 'Year', - 'Day' => 'day', - 'Month' => 'Month', - 'Hour' => 'Hour', - 'Minute' => 'Minute', - 'Second' => 'Second', - 'This field should not be empty' => 'This field should not be empty', - 'This page already exists' => 'This page already exists', - 'Extra' => 'Extra', - 'Save' => 'Save', - 'Save and Exit' => 'Save and Exit', - 'Your changes to the page :page have been saved.' => 'Your changes to the page :page have been saved.', - 'The page :page cloned.' => 'The page :page cloned.', - 'Status' => 'Status', - 'Actions' => 'Actions', - 'Add' => 'Add', - 'Published' => 'Published', - 'Draft' => 'Draft', - 'Published on' => 'Published on', - 'Edit 404 Page' => 'Edit 404 Page', - 'Page :page deleted' => 'Page :page deleted', - 'Search Engines Robots' => 'Search Engines Robots', - 'Page' => 'Page', - 'Metadata' => 'Metadata', - 'Settings' => 'Settings', - 'Required field' => 'Required field', - 'Access' => 'Access', - 'Public' => 'Public', - 'Registered' => 'Registered', - 'Cancel' => 'Cancel', - 'Tags' => 'Tags', - ) - ); diff --git a/plugins/box/pages/languages/es.lang.php b/plugins/box/pages/languages/es.lang.php deleted file mode 100644 index 110dfc4..0000000 --- a/plugins/box/pages/languages/es.lang.php +++ /dev/null @@ -1,55 +0,0 @@ - array( - 'Pages' => 'Páginas', - 'Pages manager' => 'Administrador de páginas', - 'Content' => 'Contenido', - 'Create New Page' => 'Crear nueva página', - 'New Page' => 'Nueva página', - 'Edit Page' => 'Editar página', - 'Date' => 'Fecha', - 'Clone' => 'Clonar', - 'Edit' => 'Editar', - 'Delete' => 'Eliminar', - 'Delete page: :page' => 'Eliminar página: :page', - 'Title' => 'Título', - 'Name' => 'Nombre', - 'Author' => 'Autor', - 'Name (slug)' => 'Nombre (slug)', - 'Description' => 'Descripción', - 'Keywords' => 'Palabras claves', - 'Parent' => 'Página padre', - 'Template' => 'Plantilla', - 'Year' => 'Año', - 'Day' => 'Día', - 'Month' => 'Mes', - 'Hour' => 'Hora', - 'Minute' => 'Minuto', - 'Second' => 'Segundo', - 'This field should not be empty' => 'Este campo no puede quedar vacío', - 'This page already exists' => 'Esta página ya existe', - 'Extra' => 'Extra', - 'Save' => 'Guardar', - 'Save and Exit' => 'Guardar y salir', - 'Your changes to the page :page have been saved.' => 'Tus cambios realizados en la página :page han sido guardados.', - 'The page :page cloned.' => 'La página :page ha sido clonada.', - 'Status' => 'Estado', - 'Actions' => 'Acciones', - 'Add' => 'Añadir', - 'Published' => 'Publicada', - 'Draft' => 'Borrador', - 'Published on' => 'Publicada', - 'Edit 404 Page' => 'Editar página 404', - 'Page :page deleted' => 'Página :page eliminada', - 'Search Engines Robots' => 'Motores de búsqueda robots', - 'Page' => 'Página', - 'Metadata' => 'Metadatos', - 'Settings' => 'Ajustes', - 'Required field' => 'Dato requerido', - 'Access' => 'Acceso', - 'Public' => 'Público', - 'Registered' => 'Registrado', - 'Cancel' => 'Cancelar', - ) - ); diff --git a/plugins/box/pages/languages/fa.lang.php b/plugins/box/pages/languages/fa.lang.php deleted file mode 100644 index 70047ee..0000000 --- a/plugins/box/pages/languages/fa.lang.php +++ /dev/null @@ -1,55 +0,0 @@ - array( - 'Pages' => 'ØµÙØ­Ù‡', - 'Pages manager' => 'مدیریت ØµÙØ­Ù‡', - 'Content' => 'محتوی', - 'Create New Page' => 'ایجاد ØµÙØ­Ù‡ جدید', - 'New Page' => 'ØµÙØ­Ù‡ جدید', - 'Edit Page' => 'ویرایش ØµÙØ­Ù‡', - 'Date' => 'تاریخ', - 'Clone' => 'Ú©Ù¾ÛŒ برداری', - 'Edit' => 'ویرایش', - 'Delete' => 'حذÙ', - 'Delete page: :page' => 'Ø­Ø°Ù ØµÙØ­Ù‡: :page', - 'Title' => 'عنوان', - 'Name' => 'نام', - 'Author' => 'نویسنده', - 'Name (slug)' => 'نام (برچسب)', - 'Description' => 'توضیحات', - 'Keywords' => 'کلمات کلیدی', - 'Parent' => 'والد', - 'Template' => 'قالب', - 'Year' => 'سال', - 'Day' => 'روز', - 'Month' => 'ماه', - 'Hour' => 'ساعت', - 'Minute' => 'دقیقه', - 'Second' => 'ثانیه', - 'This field should not be empty' => 'این کادر نباید خالی باشد', - 'This page already exists' => 'این ØµÙØ­Ù‡ در حال حاضر وجود دارد', - 'Extra' => 'اضاÙÛŒ', - 'Save' => 'ذخیره', - 'Save and Exit' => 'ذخیره Ùˆ خروج', - 'Your changes to the page :page have been saved.' => 'تغییرات شما بر روی ØµÙØ­Ù‡ :page ذخیره شد.', - 'The page :page cloned.' => 'ØµÙØ­Ù‡ :page Ú©Ù¾ÛŒ برداری شد.', - 'Status' => 'وضعیت', - 'Actions' => 'عملیات', - 'Add' => 'Ø§ÙØ²ÙˆØ¯Ù†', - 'Published' => 'منتشر شده', - 'Draft' => 'پیش نویس', - 'Published on' => 'منتشر شده در', - 'Edit 404 Page' => 'ویرایش ØµÙØ­Ù‡ 404', - 'Page :page deleted' => 'ØµÙØ­Ù‡ :page حذ٠شد', - 'Search Engines Robots' => 'روباتهای موتور جستجوگر', - 'Page' => 'ØµÙØ­Ù‡', - 'Metadata' => 'ÙØ±Ø§Ø¯Ø§Ø¯Ù‡', - 'Settings' => 'تنظیمات', - 'Required field' => 'کادر الزامی', - 'Access' => 'دسترسی', - 'Public' => 'عمومی', - 'Registered' => 'اعضاء', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/pages/languages/fr.lang.php b/plugins/box/pages/languages/fr.lang.php deleted file mode 100644 index f9ba4cb..0000000 --- a/plugins/box/pages/languages/fr.lang.php +++ /dev/null @@ -1,55 +0,0 @@ - array( - 'Pages' => 'Pages', - 'Pages manager' => 'Gestionnaire des pages', - 'Content' => 'Contenu', - 'Create new page' => 'Créer une nouvelle page', - 'New page' => 'Nouvelle page', - 'Edit page' => 'Editer la page', - 'Date' => 'Date', - 'Clone' => 'Cloner', - 'Edit' => 'Editer', - 'Delete' => 'Supprimer', - 'Delete page: :page' => 'Supprimer la page: :page', - 'Title' => 'Titre', - 'Name' => 'Nom', - 'Author' => 'Auteur', - 'Name (slug)' => 'Nom (Permalien)', - 'Description' => 'Description', - 'Keywords' => 'Mots clés', - 'Parent' => 'Parent', - 'Template' => 'Modèle', - 'Year' => 'Année', - 'Day' => 'Jour', - 'Month' => 'Mois', - 'Hour' => 'Heure', - 'Minute' => 'Minute', - 'Second' => 'Seconde', - 'This field should not be empty' => 'Ce champ ne doit pas être vide', - 'This page already exists' => 'Cette page existe déjà', - 'Extra' => 'Extra', - 'Save' => 'Enregistrer', - 'Save and exit' => 'Enregistrer et sortir', - 'Your changes to the page :page have been saved.' => 'Vos changements sur la page :page ont été sauvegardés.', - 'The page :page cloned.' => 'La page :page est cloné.', - 'Status' => 'Statut', - 'Actions' => 'Actions', - 'Add' => 'Ajouter', - 'Published' => 'Publiée', - 'Draft' => 'Brouillon', - 'Published on' => 'Publiée le', - 'Edit 404 Page' => 'Editer la page 404', - 'Page :page deleted' => 'Page :page supprimé', - 'Search Engines Robots' => 'Robots des moteurs de recherche', - 'Page' => 'Page', - 'Metadata' => 'Métadonnées', - 'Settings' => 'Paramètres', - 'Required field' => 'Champ requis', - 'Access' => 'Accès', - 'Public' => 'Public', - 'Registered' => 'Inscrit', - 'Cancel' => 'Cancel', - ) - ); \ No newline at end of file diff --git a/plugins/box/pages/languages/hu.lang.php b/plugins/box/pages/languages/hu.lang.php deleted file mode 100644 index 4813872..0000000 --- a/plugins/box/pages/languages/hu.lang.php +++ /dev/null @@ -1,55 +0,0 @@ - array( - 'Pages' => 'Oldalak', - 'Pages manager' => 'OldalkezelÅ‘', - 'Content' => 'Tartalom', - 'Create New Page' => 'Új oldal létrehozása', - 'New Page' => 'Új oldal', - 'Edit page' => 'Oldal szerkesztése', - 'Date' => 'Dátum', - 'Clone' => 'Klón', - 'Edit' => 'Szerkeszt', - 'Delete' => 'Töröl', - 'Delete page: :page' => 'Oldal törlése: :page', - 'Title' => 'Cím', - 'Name' => 'Név', - 'Author' => 'SzerzÅ‘', - 'Name (slug)' => 'Név (slug)', - 'Description' => 'Leírás', - 'Keywords' => 'Kulcsszavak', - 'Parent' => 'SzülÅ‘', - 'Template' => 'Sablon', - 'Year' => 'Év', - 'Day' => 'Nap', - 'Month' => 'Hónap', - 'Hour' => 'Óra', - 'Minute' => 'Perc', - 'Second' => 'Másodperc', - 'This field should not be empty' => 'Ez a mezÅ‘ nem lehet üres', - 'This page already exists' => 'Ez az oldal már létezik', - 'Extra' => 'Extra', - 'Save' => 'Mentés', - 'Save and Exit' => 'Mentés és Kilépés', - 'Your changes to the page :page have been saved.' => 'A módosításoksok az oldalra :page mentve.', - 'The page :page cloned.' => 'A(z) :page oldal kónozva.', - 'Status' => 'Ãllapot', - 'Actions' => 'Műveletek', - 'Add' => 'Hozzáad', - 'Published' => 'Közzétett', - 'Draft' => 'Vázlat', - 'Published on' => 'Publikálva', - 'Edit 404 Page' => 'A 404-es oldal szerkesztése', - 'Page :page deleted' => 'A(z) :page oldal törölve', - 'Search Engines Robots' => 'KeresÅ‘robotok', - 'Page' => 'Oldal', - 'Metadata' => 'Metaadat', - 'Settings' => 'Beállítások', - 'Required field' => 'KötelezÅ‘ mezÅ‘', - 'Access' => 'Hozzáférés', - 'Public' => 'Nyilvános', - 'Registered' => 'Regisztrált', - 'Cancel' => 'Cancel', - ) - ); \ No newline at end of file diff --git a/plugins/box/pages/languages/id.lang.php b/plugins/box/pages/languages/id.lang.php deleted file mode 100644 index bf5d511..0000000 --- a/plugins/box/pages/languages/id.lang.php +++ /dev/null @@ -1,54 +0,0 @@ - array( - 'Pages' => 'Halaman', - 'Pages manager' => 'Pengelolaan Halaman', - 'Content' => 'Isi', - 'Create New Page' => 'Buat Halaman Baru', - 'New Page' => 'Halaman Baru', - 'Edit Page' => 'Perbaiki Halaman', - 'Date' => 'Tanggal', - 'Clone' => 'Duplikasi', - 'Edit' => 'Perbaiki', - 'Delete' => 'Hapus', - 'Delete page: :page' => 'Hapus Halaman: :page', - 'Title' => 'Judul', - 'Name' => 'Nama', - 'Author' => 'Penulis', - 'Name (slug)' => 'Nama (slug)', - 'Description' => 'Deskripsi', - 'Keywords' => 'Kata Kunci', - 'Parent' => 'Induk', - 'Template' => 'Contoh', - 'Year' => 'Tahun', - 'Day' => 'Hari', - 'Month' => 'Bulan', - 'Hour' => 'Jam', - 'Minute' => 'Menit', - 'Second' => 'Detik', - 'This field should not be empty' => 'Isian ini tidak boleh kosong', - 'This page already exists' => 'Halaman ini sudah ada', - 'Extra' => 'Extra', - 'Save' => 'Simpan', - 'Save and Exit' => 'Simpan dan Keluar', - 'Your changes to the page :page have been saved.' => 'Perubahan pada halaman :page telah disimpan.', - 'The page :page cloned.' => 'Halaman ini :page telah diduplikasi.', - 'Status' => 'Status', - 'Actions' => 'Tindakan', - 'Add' => 'Tambah', - 'Published' => 'Dimuat', - 'Draft' => 'Konsep', - 'Published on' => 'Dimuat pada', - 'Edit 404 Page' => 'Perbaiki Halaman 404', - 'Page :page deleted' => 'Halaman :page dihapus', - 'Search Engines Robots' => 'Mesin Pencari Otomatis', - 'Page' => 'Halaman', - 'Metadata' => 'Metadata', - 'Settings' => 'Pengaturan', - 'Required field' => 'Isian yang Diperlukan', - 'Access' => 'Akses', - 'Public' => 'Umum', - 'Registered' => 'Terdaftar', - ) - ); diff --git a/plugins/box/pages/languages/it.lang.php b/plugins/box/pages/languages/it.lang.php deleted file mode 100644 index eb1cc0f..0000000 --- a/plugins/box/pages/languages/it.lang.php +++ /dev/null @@ -1,55 +0,0 @@ - array( - 'Pages' => 'Pagine', - 'Pages manager' => 'Gestione pagine', - 'Content' => 'Contenuto', - 'Create New Page' => 'Crea Nuova Pagina', - 'New Page' => 'Nuova Pagina', - 'Edit Page' => 'Modifica Pagina', - 'Date' => 'Data', - 'Clone' => 'Clona', - 'Edit' => 'Modifica', - 'Delete' => 'Elimina', - 'Delete page: :page' => 'Elimina pagina: :page', - 'Title' => 'Titolo', - 'Name' => 'Nome', - 'Author' => 'Autore', - 'Name (slug)' => 'Nome (slug)', - 'Description' => 'Descrizione', - 'Keywords' => 'Parole chiavi', - 'Parent' => 'Parente', - 'Template' => 'Modello', - 'Year' => 'Anno', - 'Day' => 'Giorno', - 'Month' => 'Mese', - 'Hours' => 'Ora', - 'Minute' => 'Minuto', - 'Second' => 'Secondo', - 'This field should not be empty' => 'Campo obbligatorio', - 'This page already exists' => 'Tale pagina già esistente', - 'Extra' => 'Extra', - 'Save' => 'Salva', - 'Save and Exit' => 'Salva ed Esci', - 'Your changes to the page :page have been saved.' => 'Le modifiche alla pagina :page sono state salvate.', - 'The page :page cloned.' => 'Pagina :page è stata clonata.', - 'Status' => 'Stato', - 'Actions' => 'Azioni', - 'Add' => 'Aggiungi', - 'Published' => 'Pubblicato', - 'Draft' => 'Bozza', - 'Published on' => 'Pubblicato il', - 'Edit 404 Page' => 'Modifica Pagina 404', - 'Page :page deleted' => 'Pagina :page è stata cancellata', - 'Search Engines Robots' => 'Robot dei motori di ricerca', - 'Page' => 'Pagina', - 'Metadata' => 'Metadata', - 'Settings' => 'Impostazioni', - 'Required field' => 'Campo obbligatorio', - 'Access' => 'Accesso', - 'Public' => 'Pubblico', - 'Registered' => 'Registrato', - 'Cancel' => 'Cancel', - ), - ); diff --git a/plugins/box/pages/languages/ja.lang.php b/plugins/box/pages/languages/ja.lang.php deleted file mode 100644 index eb65066..0000000 --- a/plugins/box/pages/languages/ja.lang.php +++ /dev/null @@ -1,54 +0,0 @@ - array( - 'Pages' => 'ページ', - 'Pages manager' => 'ページã®ç®¡ç†', - 'Content' => '内容', - 'Create New Page' => 'æ–°è¦ãƒšãƒ¼ã‚¸ã®ä½œæˆ', - 'New Page' => 'æ–°è¦ãƒšãƒ¼ã‚¸', - 'Edit Page' => 'ページã®ç·¨é›†', - 'Date' => '日付', - 'Clone' => '複製', - 'Edit' => '編集', - 'Delete' => '削除', - 'Delete page: :page' => 'ページã®å‰Šé™¤: :page', - 'Title' => 'タイトル', - 'Name' => 'åå‰', - 'Author' => '作æˆè€…', - 'Name (slug)' => 'åå‰ (スラッグ)', - 'Description' => '説明', - 'Keywords' => 'キーワード', - 'Parent' => '親', - 'Template' => 'テンプレート', - 'Year' => 'å¹´', - 'Day' => 'æ—¥', - 'Month' => '月', - 'Hour' => '時', - 'Minute' => '分', - 'Second' => 'ç§’', - 'This field should not be empty' => 'ã“ã®é …ç›®ã¯ç©ºç™½ã«ã§ãã¾ã›ã‚“', - 'This page already exists' => 'ã“ã®ãƒšãƒ¼ã‚¸ã¯ã™ã§ã«å­˜åœ¨ã—ã¦ã„ã¾ã™', - 'Extra' => 'æ‹¡å¼µ', - 'Save' => 'ä¿å­˜', - 'Save and Exit' => 'ä¿å­˜ã—ã¦çµ‚了', - 'Your changes to the page :page have been saved.' => ' :page ã¸ã®å¤‰æ›´ã¯ä¿å­˜ã•れã¾ã—ãŸã€‚', - 'The page :page cloned.' => ':page ãŒè¤‡è£½ã•れã¾ã—ãŸã€‚', - 'Status' => 'ステータス', - 'Actions' => 'æ“作', - 'Add' => '追加', - 'Published' => '公開済ã¿', - 'Draft' => '下書ã', - 'Published on' => '公開日', - 'Edit 404 Page' => '404 ページã®ç·¨é›†', - 'Page :page deleted' => ':page ã¯å‰Šé™¤ã•れã¾ã—ãŸã€‚', - 'Search Engines Robots' => 'サーãƒã‚¨ãƒ³ã‚¸ãƒ³ãƒ­ãƒœãƒƒãƒˆã¸ã®é€šçŸ¥', - 'Page' => 'ページ', - 'Metadata' => 'メタデータ', - 'Settings' => '設定', - 'Required field' => '必須項目', - 'Access' => 'アクセス許å¯', - 'Public' => '一般公開', - 'Registered' => '登録者ã®ã¿', - ) - ); diff --git a/plugins/box/pages/languages/ka-ge.lang.php b/plugins/box/pages/languages/ka-ge.lang.php deleted file mode 100644 index ad94eb0..0000000 --- a/plugins/box/pages/languages/ka-ge.lang.php +++ /dev/null @@ -1,56 +0,0 @@ - array( - 'Pages' => 'გვერდები', - 'Pages manager' => 'გვერდების მენეჯერი', - 'Content' => 'კáƒáƒœáƒ¢áƒ”ნტი', - 'Create New Page' => 'áƒáƒ®áƒáƒšáƒ˜ გვერდის შექმნáƒ', - 'New Page' => 'áƒáƒ®áƒáƒšáƒ˜ გვერდი', - 'Edit Page' => 'გვერდის რედáƒáƒ¥áƒ¢áƒ˜áƒ áƒ”ბáƒ', - 'Date' => 'თáƒáƒ áƒ˜áƒ¦áƒ˜', - 'Clone' => 'კლáƒáƒœáƒ˜áƒ áƒ”ბáƒ', - 'Edit' => 'რედáƒáƒ¥áƒ¢áƒ˜áƒ áƒ”ბáƒ', - 'Delete' => 'წáƒáƒ¨áƒšáƒ', - 'Delete page: :page' => 'გვერდის წáƒáƒ¨áƒšáƒ: :page', - 'Title' => 'სáƒáƒ—áƒáƒ£áƒ áƒ˜', - 'Name' => 'სáƒáƒ®áƒ”ლწáƒáƒ“ებáƒ', - 'Author' => 'áƒáƒ•ტáƒáƒ áƒ˜', - 'Slug (url)' => 'ბმული (url)', - 'Tags' => 'Tag-ევი', - 'Description' => 'áƒáƒ¦áƒ¬áƒ”რáƒ', - 'Keywords' => 'სáƒáƒ™áƒ•áƒáƒœáƒ«áƒ სიტყვები', - 'Parent' => 'მშáƒáƒ‘ელი', - 'Template' => 'Template-ი', - 'Year' => 'წელი', - 'Day' => 'დღე', - 'Month' => 'თვე', - 'Hours' => 'სáƒáƒáƒ—ი', - 'Minute' => 'წუთი', - 'Second' => 'წáƒáƒ›áƒ˜', - 'This field should not be empty' => 'ეს ველი áƒáƒ  უნდრიყáƒáƒ¡ ცáƒáƒ áƒ˜áƒ”ლი', - 'This page already exists' => 'áƒáƒ¡áƒ”თი გვერდი უკვე áƒáƒ áƒ¡áƒ”ბáƒáƒ‘ს', - 'Extra' => 'დáƒáƒ›áƒáƒ¢áƒ”ბით', - 'Save' => 'შენáƒáƒ®áƒ•áƒ', - 'Save and Exit' => 'დáƒáƒ›áƒáƒ®áƒ¡áƒáƒ•რებრდრშემდეგ გáƒáƒáƒ¡áƒ•ლáƒ', - 'Your changes to the page :page have been saved.' => 'თქვენი ცვლილებები გვერდი :page მიმáƒáƒ áƒ— შენáƒáƒ®áƒ£áƒšáƒ˜áƒ.', - 'The page :page cloned.' => 'გვერდი :page კლáƒáƒœáƒ˜áƒ áƒ”ბულიáƒ.', - 'Status' => 'სტáƒáƒ¢áƒ£áƒ¡áƒ˜', - 'Actions' => 'მáƒáƒ¥áƒ›áƒ”დებáƒ', - 'Add' => 'დáƒáƒ›áƒáƒ¢áƒ”ბáƒ', - 'Published' => 'გáƒáƒ›áƒáƒ¥áƒ•ეყნებულიáƒ', - 'Draft' => 'ესკიზი', - 'Published on' => 'გáƒáƒ›áƒáƒ¥áƒ•ეყნებულიáƒ', - 'Edit 404 Page' => '404 გვერდის რედáƒáƒ¥áƒ¢áƒ˜áƒ áƒ”ბáƒ', - 'Page :page deleted' => 'გვერდი :page წáƒáƒ¨áƒšáƒ˜áƒšáƒ˜áƒ', - 'Search Engines Robots' => 'სáƒáƒ«áƒ˜áƒ”ბრრáƒáƒ‘áƒáƒ¢áƒ”ბი', - 'Page' => 'გვერდები', - 'Metadata' => 'Metadata', - 'Settings' => 'პáƒáƒ áƒáƒ›áƒ”ტრები', - 'Required field' => 'áƒáƒ£áƒªáƒ˜áƒšáƒ”ბელი ველი', - 'Access' => 'მისáƒáƒ¬áƒ•დáƒáƒ›áƒáƒ‘áƒ', - 'Public' => 'სáƒáƒ¯áƒáƒ áƒ', - 'Registered' => 'დáƒáƒ áƒ”გისტრირებულთáƒáƒ—ვის', - 'Cancel' => 'გáƒáƒ£áƒ¥áƒ›áƒ”ბáƒ', - ), - ); diff --git a/plugins/box/pages/languages/lt.lang.php b/plugins/box/pages/languages/lt.lang.php deleted file mode 100644 index db25937..0000000 --- a/plugins/box/pages/languages/lt.lang.php +++ /dev/null @@ -1,55 +0,0 @@ - array( - 'Pages' => 'Puslapiai', - 'Pages manager' => 'Puslapių tvarkyklÄ—', - 'Content' => 'Turinys', - 'Create New Page' => 'Sukurti NaujÄ… Puslapį', - 'New Page' => 'Naujas Puslapis', - 'Edit Page' => 'Redaguoti Puslapį', - 'Date' => 'Data', - 'Clone' => 'Klonuoti', - 'Edit' => 'Redaguoti', - 'Delete' => 'IÅ¡trinti', - 'Delete page: :page' => 'IÅ¡trinti puslapį :page', - 'Title' => 'AntraÅ¡tÄ—', - 'Name' => 'Pavadinimas', - 'Author' => 'Autorius', - 'Name (slug)' => 'Nuoroda (slug)', - 'Description' => 'ApraÅ¡ymas', - 'Keywords' => 'Raktažodžiai', - 'Parent' => 'Pirminis puslapis', - 'Template' => 'Å ablonas', - 'Year' => 'Metai', - 'Day' => 'Diena', - 'Month' => 'MÄ—nesis', - 'Hour' => 'Valanda', - 'Minute' => 'MinutÄ—', - 'Second' => 'SekundÄ—', - 'This field should not be empty' => 'Å is laukas negali bÅ«ti tuÅ¡Äias', - 'This page already exists' => 'Toks puslapis jau yra', - 'Extra' => 'Papildoma', - 'Save' => 'IÅ¡saugoti', - 'Save and Exit' => 'IÅ¡saugoti ir IÅ¡eiti', - 'Your changes to the page :page have been saved.' => 'Puslapio :page pakeitimai iÅ¡saugoti.', - 'The page :page cloned.' => 'Puslapis :page klonuotas.', - 'Status' => 'BÅ«klÄ—', - 'Actions' => 'Veiksmai', - 'Add' => 'PridÄ—ti', - 'Published' => 'Publikuotas', - 'Draft' => 'JuodraÅ¡tis', - 'Published on' => 'Publikuota', - 'Edit 404 Page' => 'Redaguoti 404 puslapį', - 'Page :page deleted' => 'Puslapis :page iÅ¡trintas', - 'Search Engines Robots' => 'PaieÅ¡kos variklių robotai', - 'Page' => 'Puslapis', - 'Metadata' => 'Metadata', - 'Settings' => 'Nustatymai', - 'Required field' => 'Privalomas laukas', - 'Access' => 'Prieiga', - 'Public' => 'VieÅ¡as', - 'Registered' => 'Registruotas', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/pages/languages/nl.lang.php b/plugins/box/pages/languages/nl.lang.php deleted file mode 100644 index 964b56b..0000000 --- a/plugins/box/pages/languages/nl.lang.php +++ /dev/null @@ -1,55 +0,0 @@ - array( - 'Pages' => 'Pagina\'s', - 'Pages manager' => 'Pagina beheer', - 'Content' => 'Inhoud', - 'Create New Page' => 'Nieuwe pagina', - 'New Page' => 'Nieuwe pagina', - 'Edit Page' => 'Bewerk pagina', - 'Date' => 'Datum', - 'Clone' => 'Kopieren', - 'Edit' => 'Bewerken', - 'Delete' => 'Verwijderen', - 'Delete page: :page' => 'Verwijder pagina: :page', - 'Title' => 'Titel', - 'Name' => 'Naam', - 'Author' => 'Auteur', - 'Name (slug)' => 'Naam (alias)', - 'Description' => 'Beschrijving', - 'Keywords' => 'Trefwoorden', - 'Parent' => 'Root', - 'Template' => 'Template', - 'Year' => 'Jaar', - 'Day' => 'Dag', - 'Month' => 'Maand', - 'Hour' => 'Uur', - 'Minute' => 'Minuut', - 'Second' => 'Seconde', - 'This field should not be empty' => 'Dit veld mag niet leeg zijn', - 'This page already exists' => 'Deze pagina bestaat al', - 'Extra' => 'Extra', - 'Save' => 'Opslaan', - 'Save and Exit' => 'Opslaan en Terug', - 'Your changes to the page :page have been saved.' => 'De wijzigingen aan :page zijn opgeslagen.', - 'The page :page cloned.' => 'De pagina :page is gekopieerd.', - 'Status' => 'Status', - 'Actions' => 'Acties', - 'Add' => 'Toevoegen', - 'Published' => 'Gepubliceerd', - 'Draft' => 'Concept', - 'Published on' => 'Gepubliceerd op', - 'Edit 404 Page' => 'Bewerk 404 pagina', - 'Page :page deleted' => 'Pagina :page is verwijderd', - 'Search Engines Robots' => 'Zoekmachine Robots ', - 'Page' => 'Pagina', - 'Metadata' => 'Metadata', - 'Settings' => 'Instellingen', - 'Required field' => 'Vereist veld', - 'Access' => 'Toegang', - 'Public' => 'Publiek', - 'Registered' => 'Geregistreerd', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/pages/languages/pl.lang.php b/plugins/box/pages/languages/pl.lang.php deleted file mode 100644 index 4a0c4ef..0000000 --- a/plugins/box/pages/languages/pl.lang.php +++ /dev/null @@ -1,55 +0,0 @@ - array( - 'Pages' => 'Strony', - 'Pages manager' => 'ZarzÄ…dzaj stronami', - 'Content' => 'Zawartość', - 'Create New Page' => 'Utwórz nowÄ… stronÄ™', - 'New Page' => 'Nowa strona', - 'Edit Page' => 'Edytuj stronÄ™', - 'Date' => 'Data', - 'Clone' => 'Skopiuj', - 'Edit' => 'Edytuj', - 'Delete' => 'UsuÅ„', - 'Delete page: :page' => 'Czy napewno usunąć stronÄ™: :page', - 'Title' => 'TytuÅ‚', - 'Name' => 'Nazwa', - 'Author' => 'Autor', - 'Name (slug)' => 'Krótka nazwa (slug)', - 'Description' => 'Opis', - 'Keywords' => 'SÅ‚owa kluczowe', - 'Parent' => 'Rodzic', - 'Template' => 'Szablon', - 'Year' => 'rok', - 'Day' => 'dzieÅ„', - 'Month' => 'miesiÄ…c', - 'Hour' => 'godzina', - 'Minute' => 'minuta', - 'Second' => 'sekunda', - 'This field should not be empty' => 'To pole nie może być puste', - 'This page already exists' => 'Ta strona już istnieje', - 'Extra' => 'Ekstra', - 'Save' => 'Zapisz', - 'Save and Exit' => 'Zapisz i wyjdź', - 'Your changes to the page :page have been saved.' => 'Twoje zmiany na stronie :page zostaÅ‚y zapisane.', - 'The page :page cloned.' => 'Strona :page zostaÅ‚a skopiowana.', - 'Status' => 'Status', - 'Actions' => 'Akcje', - 'Add' => 'Dodaj podstronÄ™', - 'Published' => 'Opublikowana', - 'Draft' => 'Projekt', - 'Published on' => 'Opublikowane', - 'Edit 404 Page' => 'Edytuj stronÄ™ błędu 404', - 'Page :page deleted' => 'Strona :page zostaÅ‚a usuniÄ™ta', - 'Search Engines Robots' => 'Roboty wyszukiwarek', - 'Page' => 'Strona', - 'Metadata' => 'Metadane', - 'Settings' => 'Ustawienia', - 'Required field' => 'Pole wymagane', - 'Access' => 'DostÄ™p', - 'Public' => 'Dla wszystkich', - 'Registered' => 'Dla zarejestrowanych', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/pages/languages/pt-br.lang.php b/plugins/box/pages/languages/pt-br.lang.php deleted file mode 100644 index 1c9d96b..0000000 --- a/plugins/box/pages/languages/pt-br.lang.php +++ /dev/null @@ -1,55 +0,0 @@ - array( - 'Pages' => 'Páginas', - 'Pages manager' => 'Gerenciador de páginas', - 'Content' => 'Conteúdo', - 'Create new page' => 'Criar nova página', - 'New page' => 'Nova página', - 'Edit page' => 'Editar página', - 'Date' => 'Data', - 'Clone' => 'Clonar', - 'Edit' => 'Editar', - 'Delete' => 'Deletar', - 'Delete page: :page' => 'Deletar a página: :page', - 'Title' => 'Título', - 'Name' => 'Nome', - 'Author' => 'Autor', - 'Name (slug)' => 'Nome (slug)', - 'Description' => 'Descrição', - 'Keywords' => 'Keywords', - 'Parent' => 'Parente', - 'Template' => 'Template', - 'Year' => 'Ano', - 'Day' => 'Dia', - 'Month' => 'Mês', - 'Hour' => 'Hora', - 'Minute' => 'Minuto', - 'Second' => 'Segundo', - 'This field should not be empty' => 'Este arquivo não deve ser vazio', - 'This page already exists' => 'Esta página já existe', - 'Extra' => 'Extra', - 'Save' => 'Salvar', - 'Save and Exit' => 'Salvar e sair', - 'Your changes to the page :page have been saved.' => 'Suas alterações na página :page foram salvas.', - 'The page :page cloned.' => 'Página :page clonada.', - 'Status' => 'Status', - 'Actions' => 'Ações', - 'Add' => 'Adicionar', - 'Published' => 'Publicado', - 'Draft' => 'Rascunho', - 'Published on' => 'Publicada em', - 'Edit 404 Page' => 'Editar página de erro 404', - 'Page :page deleted' => 'Página :page deletada', - 'Search Engines Robots' => 'Crawlers de sistemas de buscas.', - 'Page' => 'Página', - 'Metadata' => 'Metadata', - 'Settings' => 'Configurações', - 'Required field' => 'Campo requerido', - 'Access' => 'Acesso', - 'Public' => 'Público', - 'Registered' => 'Registrado', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/pages/languages/ru.lang.php b/plugins/box/pages/languages/ru.lang.php deleted file mode 100644 index c687fec..0000000 --- a/plugins/box/pages/languages/ru.lang.php +++ /dev/null @@ -1,56 +0,0 @@ - array( - 'Pages' => 'Страницы', - 'Pages manager' => 'Менеджер Ñтраниц', - 'Content' => 'Контент', - 'Create New Page' => 'Создать новую Ñтраницу', - 'New Page' => 'ÐÐ¾Ð²Ð°Ñ Ñтраница', - 'Edit Page' => 'Редактирование Ñтраницы', - 'Date' => 'Дата', - 'Clone' => 'Клонировать', - 'Edit' => 'Редактировать', - 'Delete' => 'Удалить', - 'Delete page: :page' => 'Удалить Ñтраницу: :page', - 'Title' => 'Заголовок', - 'Name' => 'Ðазвание', - 'Author' => 'Ðвтор', - 'Slug (url)' => 'СÑылка (url)', - 'Tags' => 'Теги', - 'Description' => 'ОпиÑание', - 'Keywords' => 'Ключевые Ñлова', - 'Parent' => 'Родитель', - 'Template' => 'Шаблон', - 'Year' => 'Год', - 'Day' => 'День', - 'Month' => 'МеÑÑц', - 'Hours' => 'ЧаÑ', - 'Minute' => 'Минута', - 'Second' => 'Секунда', - 'This field should not be empty' => 'Это поле не должно быть пуÑтым', - 'This page already exists' => 'Ð¢Ð°ÐºÐ°Ñ Ñтраница уже ÑущеÑтвует', - 'Extra' => 'Дополнительно', - 'Save' => 'Сохранить', - 'Save and Exit' => 'Сохранить и выйти', - 'Your changes to the page :page have been saved.' => 'Ваши Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ðº Ñтранице :page были Ñохранены.', - 'The page :page cloned.' => 'Страница :page клонирована.', - 'Status' => 'СтатуÑ', - 'Actions' => 'ДейÑтвиÑ', - 'Add' => 'Добавить', - 'Published' => 'Опубликовано', - 'Draft' => 'Черновик', - 'Published on' => 'Опубликовано', - 'Edit 404 Page' => 'Редактировать Ñтраницу 404', - 'Page :page deleted' => 'Страница :page удалена', - 'Search Engines Robots' => 'ПоиÑковые роботы', - 'Page' => 'Страница', - 'Metadata' => 'Метаданные', - 'Settings' => 'ÐаÑтройки', - 'Required field' => 'ОбÑзательное поле', - 'Access' => 'ДоÑтуп', - 'Public' => 'Публичный', - 'Registered' => 'ЗарегиÑтрированным', - 'Cancel' => 'Отмена', - ), - ); diff --git a/plugins/box/pages/languages/sk.lang.php b/plugins/box/pages/languages/sk.lang.php deleted file mode 100644 index 28378b3..0000000 --- a/plugins/box/pages/languages/sk.lang.php +++ /dev/null @@ -1,55 +0,0 @@ - array( - 'Pages' => 'Stránky', - 'Pages manager' => 'Manažér stránok', - 'Content' => 'Obsah', - 'Create new page' => 'VytvoriÅ¥ novú stránku', - 'New page' => 'Nová stránka', - 'Edit page' => 'EditovaÅ¥ stránku', - 'Date' => 'Dátum', - 'Clone' => 'KlonovaÅ¥', - 'Edit' => 'EditovaÅ¥', - 'Delete' => 'VymazaÅ¥', - 'Delete page: :page' => 'VymazaÅ¥ stránku: :page', - 'Title' => 'Titulka', - 'Name' => 'Názov', - 'Author' => 'Autor', - 'Name (slug)' => 'Názov (slug)', - 'Description' => 'Popis', - 'Keywords' => 'KľúÄové slová', - 'Parent' => 'RodiÄ - Nadradená stránka', - 'Template' => 'Téma', - 'Year' => 'Rok', - 'Day' => 'Deň', - 'Month' => 'Mesiac', - 'Hour' => 'Hodina', - 'Minute' => 'Minúta', - 'Second' => 'Sekunda', - 'This field should not be empty' => 'Toto políÄko nesmie byÅ¥ prázdne', - 'This page already exists' => 'Táto stránka už existuje', - 'Extra' => 'Extra', - 'Save' => 'UložiÅ¥', - 'Save and Exit' => 'UložiÅ¥ a ukonÄiÅ¥', - 'Your changes to the page :page have been saved.' => 'VaÅ¡e zmeny na stránke :page boli uložené.', - 'The page :page cloned.' => 'The page :page cloned.', - 'Status' => 'Status', - 'Actions' => 'Akcie', - 'Add' => 'PridaÅ¥', - 'Published' => 'Zverejnené', - 'Draft' => 'Rozpísané', - 'Published on' => 'Zverejnené dňa', - 'Edit 404 Page' => 'EditovaÅ¥ stránku 404', - 'Page :page deleted' => 'VymazaÅ¥ stránku: :page', - 'Search Engines Robots' => 'Vyhľadávacie roboty', - 'Page' => 'Stránka', - 'Metadata' => 'Metadata', - 'Settings' => 'Nastavenia', - 'Required field' => 'Povinné políÄko', - 'Access' => 'Prístup', - 'Public' => 'Verejný', - 'Registered' => 'Po prihlásení', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/pages/languages/sr.lang.php b/plugins/box/pages/languages/sr.lang.php deleted file mode 100644 index 2da13d4..0000000 --- a/plugins/box/pages/languages/sr.lang.php +++ /dev/null @@ -1,55 +0,0 @@ - array( - 'Pages' => 'Strane', - 'Pages manager' => 'Menadžer strana', - 'Content' => 'Sadržaj', - 'Create new page' => 'Kreiraj novu stranu', - 'New page' => 'Nova strana', - 'Edit page' => 'Izemni stranu', - 'Date' => 'Datum', - 'Clone' => 'Kloniraj', - 'Edit' => 'Izmeni', - 'Delete' => 'ObriÅ¡i', - 'Delete page: :page' => 'ObriÅ¡i stranu: :page', - 'Title' => 'Naslov', - 'Name' => 'Ime', - 'Author' => 'Autor', - 'Name (slug)' => 'Ime (SEO)', - 'Description' => 'Opis', - 'Keywords' => 'KljuÄne reÄi', - 'Parent' => 'Roditelj', - 'Template' => 'Å ablon', - 'Year' => 'Godina', - 'Day' => 'dan', - 'Month' => 'mesec', - 'Hour' => 'Sat', - 'Minute' => 'Minut', - 'Second' => 'Sekunda', - 'This field should not be empty' => 'Ovo polje ne sme biti prazno', - 'This page already exists' => 'Ova strana već postoji', - 'Extra' => 'Dodatno polje', - 'Save' => 'SaÄuvaj', - 'Save and exit' => 'SaÄuvaj i izadji', - 'Your changes to the page :page have been saved.' => 'VaÅ¡e promene na stranici :page su saÄuvane.', - 'The page :page cloned.' => 'Strana :page je klonirana.', - 'Status' => 'Status', - 'Actions' => 'Akcija', - 'Add' => 'Dodaj', - 'Published' => 'Objavljeno', - 'Draft' => 'Nacrt', - 'Published on' => 'Objavljeno od', - 'Edit 404 Page' => 'Izmeni 404 stranu', - 'Page :page deleted' => 'Strana :page je obrisana', - 'Search Engines Robots' => 'Roboti pretrage', - 'Page' => 'Strana', - 'Metadata' => 'Metadata', - 'Settings' => 'PodeÅ¡avanja', - 'Required field' => 'Potrebno', - 'Access' => 'Pristup', - 'Public' => 'Javno', - 'Registered' => 'Registrovani', - 'Cancel' => 'Otkaži', - ) - ); diff --git a/plugins/box/pages/languages/tr.lang.php b/plugins/box/pages/languages/tr.lang.php deleted file mode 100644 index 4ccdbfb..0000000 --- a/plugins/box/pages/languages/tr.lang.php +++ /dev/null @@ -1,57 +0,0 @@ - array( - 'Pages' => 'Sayfalar', - 'Pages manager' => 'Sayfa Yöneticisi', - 'Content' => 'İçerik', - 'Create New Page' => 'Yeni Sayfa OluÅŸtur', - 'New Page' => 'Yeni Sayfa', - 'Edit Page' => 'Sayfayı Düzenle', - 'Date' => 'Tarih', - 'Clone' => 'Klonla', - 'Edit' => 'Düzenle', - 'Delete' => 'Sil', - 'Delete page: :page' => ':page adlı sayfa silinsin mi', - 'Title' => 'BaÅŸlık', - 'Name' => 'Ad', - 'Author' => 'Yazar', - 'Name (slug)' => 'Ad (makine adı)', // check whether in use or not - 'Slug (url)' => 'Url Adı (Makine Adı)', - 'Description' => 'Açıklama', - 'Keywords' => 'Anahtar Sözcükler', - 'Parent' => 'Üst Sayfa', - 'Template' => 'Åžablon', - 'Year' => 'Yıl', - 'Day' => 'Gün', - 'Month' => 'Ay', - 'Hour' => 'Saat', - 'Minute' => 'Dakika', - 'Second' => 'Saniye', - 'This field should not be empty' => 'Bu alan boÅŸ olmamalı!', - 'This page already exists' => 'Sayfa zaten var', - 'Extra' => 'Ek', - 'Save' => 'Kaydet', - 'Save and Exit' => 'Kaydet ve Çık', - 'Your changes to the page :page have been saved.' => 'DeÄŸiÅŸiklikleriniz :page sayfasına kaydedildi.', - 'The page :page cloned.' => ':page adlı sayfa klonlandı.', - 'Status' => 'Durum', - 'Actions' => 'İşlemler', - 'Add' => 'Ekle', - 'Published' => 'Yayında', - 'Draft' => 'Taslak', - 'Published on' => 'Yayınlanma Tarihi:', - 'Edit 404 Page' => '404 Sayfasını Düzenle', - 'Page :page deleted' => ':page adlı sayfa silindi', - 'Search Engines Robots' => 'Arama Motoru Robotları', - 'Page' => 'Sayfa', - 'Metadata' => 'Metadata', - 'Settings' => 'Ayarlar', - 'Required field' => 'Zorunlu alan', - 'Access' => 'EriÅŸim', - 'Public' => 'Herkese Açık', - 'Registered' => 'Yalnızca Üyelere Açık', - 'Cancel' => 'Vazgeç', - 'Tags' => 'Etiketler', - ) - ); diff --git a/plugins/box/pages/languages/uk.lang.php b/plugins/box/pages/languages/uk.lang.php deleted file mode 100644 index 1ec7cf5..0000000 --- a/plugins/box/pages/languages/uk.lang.php +++ /dev/null @@ -1,56 +0,0 @@ - array( - 'Pages' => 'Сторінки', - 'Pages manager' => 'Менеджер Ñторінок', - 'Content' => 'Контент', - 'Create New Page' => 'Створити нову Ñторінку', - 'New Page' => 'Ðова Ñторінка', - 'Edit Page' => 'Ð ÐµÐ´Ð°Ð³ÑƒÐ²Ð°Ð½Ð½Ñ Ñторінки', - 'Date' => 'Дата', - 'Clone' => 'Клонувати', - 'Edit' => 'Редагувати', - 'Delete' => 'Видалити', - 'Delete page: :page' => 'Видалити Ñторінку: :page', - 'Title' => 'Заголовок', - 'Name' => 'Ðазва', - 'Author' => 'Ðвтор', - 'Slug (url)' => 'Лінк (url)', - 'Tags' => 'Теги', - 'Description' => 'ОпиÑ', - 'Keywords' => 'Ключові Ñлова', - 'Parent' => 'Батько', - 'Template' => 'Шаблон', - 'Year' => 'Рік', - 'Day' => 'День', - 'Month' => 'МіÑÑц', - 'Hours' => 'ЧаÑ', - 'Minute' => 'Хвилина', - 'Second' => 'Секунда', - 'This field should not be empty' => 'Це поле не може бути порожнім', - 'This page already exists' => 'Така Ñторінка вже Ñ–Ñнує', - 'Extra' => 'Додатково', - 'Save' => 'Зберегти', - 'Save and Exit' => 'Зберегти Ñ– вийти', - 'Your changes to the page :page have been saved.' => 'Ваші зміни до Ñторінки :page були збережені.', - 'The page :page cloned.' => 'Сторінка :page клонована.', - 'Status' => 'СтатуÑ', - 'Actions' => 'Дії', - 'Add' => 'Додати', - 'Published' => 'Опубліковано', - 'Draft' => 'Чернетка', - 'Published on' => 'Опубліковано', - 'Edit 404 Page' => 'Редагувати Ñторінку 404', - 'Page :page deleted' => 'Сторінка :page видалена', - 'Search Engines Robots' => 'Пошукові роботи', - 'Page' => 'Сторінка', - 'Metadata' => 'Метадані', - 'Settings' => 'ÐалаштуваннÑ', - 'Required field' => 'Обов’Ñзкове поле', - 'Access' => 'ДоÑтуп', - 'Public' => 'Публічний', - 'Registered' => 'ЗареєÑтрованим', - 'Cancel' => 'Відмінити', - ), - ); diff --git a/plugins/box/pages/languages/zh-cn.lang.php b/plugins/box/pages/languages/zh-cn.lang.php deleted file mode 100644 index f2cd531..0000000 --- a/plugins/box/pages/languages/zh-cn.lang.php +++ /dev/null @@ -1,54 +0,0 @@ - array( - 'Pages' => '页é¢', - 'Pages manager' => '页é¢ç®¡ç†', - 'Content' => '内容管ç†', - 'Create New Page' => '创建新页é¢', - 'New Page' => '新建页é¢', - 'Edit Page' => '布局页é¢', - 'Date' => '日期', - 'Clone' => '克隆', - 'Edit' => '编辑', - 'Delete' => '删除', - 'Delete page: :page' => '删除页é¢: :page', - 'Title' => '标题', - 'Name' => 'åç§°', - 'Author' => '作者', - 'Name (slug)' => 'åç§° (slug)', - 'Description' => 'æè¿°', - 'Keywords' => '关键è¯', - 'Parent' => '父级', - 'Template' => '模æ¿', - 'Year' => 'å¹´', - 'Day' => 'æ—¥', - 'Month' => '月', - 'Hour' => 'æ—¶', - 'Minute' => '分', - 'Second' => 'ç§’', - 'This field should not be empty' => '此字段ä¸èƒ½ä¸ºç©º', - 'This page already exists' => '此页é¢å·²å­˜åœ¨', - 'Extra' => '附加', - 'Save' => 'ä¿å­˜', - 'Save and Exit' => 'ä¿å­˜å¹¶é€€å‡º', - 'Your changes to the page :page have been saved.' => 'æ‚¨ä¿®æ”¹çš„é¡µé¢ :page å·²ä¿å­˜ã€‚', - 'The page :page cloned.' => 'æ­¤é¡µé¢ :page 已克隆。', - 'Status' => '状æ€', - 'Actions' => 'æ“作', - 'Add' => '添加', - 'Published' => 'å‘布', - 'Draft' => 'è‰æ¡ˆ', - 'Published on' => 'å‘布于', - 'Edit 404 Page' => '编辑 404 页é¢', - 'Page :page deleted' => 'é¡µé¢ :page 已删除。', - 'Search Engines Robots' => 'æœç´¢å¼•擎机器人', - 'Page' => '页é¢', - 'Metadata' => 'Meta æ•°æ®', - 'Settings' => '设置', - 'Required field' => '必填字段', - 'Access' => '访问', - 'Public' => '公开', - 'Registered' => '注册用户', - ) - ); diff --git a/plugins/box/pages/pages.admin.php b/plugins/box/pages/pages.admin.php deleted file mode 100755 index fbc9e4d..0000000 --- a/plugins/box/pages/pages.admin.php +++ /dev/null @@ -1,639 +0,0 @@ -updateWhere('[slug="'.Request::post('page_slug').'"]', array('expand' => Request::post('page_expand'))); - Request::shutdown(); - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - } - } - - /** - * Pages admin function - */ - public static function main() - { - $current_theme = Option::get('theme_site_name'); - $site_url = Option::get('siteurl'); - - $templates_path = THEMES_SITE; - - $errors = array(); - - $pages = new Table('pages'); - PagesAdmin::$pages = $pages; - - $users = new Table('users'); - $user = $users->select('[id='.Session::get('user_id').']', null); - - // Page author - if ( ! empty($user['firstname'])) { - $author = (empty($user['lastname'])) ? $user['firstname'] : $user['firstname'].' '.$user['lastname']; - } else { - $author = Session::get('user_login'); - } - - $author = Html::toText($author); - - // Status array - $status_array = array('published' => __('Published', 'pages'), - 'draft' => __('Draft', 'pages')); - - // Access array - $access_array = array('public' => __('Public', 'pages'), - 'registered' => __('Registered', 'pages')); - - // Check for get actions - // --------------------------------------------- - if (Request::get('action')) { - - // Switch actions - // ----------------------------------------- - switch (Request::get('action')) { - - // Clone page - // ------------------------------------- - case "clone_page": - - if (Security::check(Request::get('token'))) { - - // Generate rand page name - $rand_page_name = Request::get('name').'_clone_'.date("Ymd_His"); - - // Get original page - $orig_page = $pages->select('[slug="'.Request::get('name').'"]', null); - - // Generate rand page title - $rand_page_title = $orig_page['title'].' [copy]'; - - // Clone page - if ($pages->insert(array('slug' => $rand_page_name, - 'template' => $orig_page['template'], - 'parent' => $orig_page['parent'], - 'robots_index' => $orig_page['robots_index'], - 'robots_follow'=> $orig_page['robots_follow'], - 'status' => $orig_page['status'], - 'access' => (isset($orig_page['access'])) ? $orig_page['access'] : 'public', - 'expand' => (isset($orig_page['expand'])) ? $orig_page['expand'] : '0', - 'title' => $rand_page_title, - 'meta_title' => $orig_page['meta_title'], - 'description' => $orig_page['description'], - 'keywords' => $orig_page['keywords'], - 'tags' => $orig_page['tags'], - 'date' => $orig_page['date'], - 'author' => $orig_page['author']))) { - - // Get cloned page ID - $last_id = $pages->lastId(); - - // Save cloned page content - File::setContent(STORAGE . DS . 'pages' . DS . $last_id . '.page.txt', - File::getContent(STORAGE . DS . 'pages' . DS . $orig_page['id'] . '.page.txt')); - - // Send notification - Notification::set('success', __('The page :page cloned.', 'pages', array(':page' => Security::safeName(Request::get('name'), '-', true)))); - } - - // Run add extra actions - Action::run('admin_pages_action_clone'); - - // Redirect - Request::redirect('index.php?id=pages'); - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - - break; - - // Add page - // ------------------------------------- - case "add_page": - - // Add page - if (Request::post('add_page') || Request::post('add_page_and_exit')) { - - if (Security::check(Request::post('csrf'))) { - - // Get parent page - if (Request::post('pages') == '0') { - $parent_page = ''; - } else { - $parent_page = Request::post('pages'); - } - - // Validate - //-------------- - if (trim(Request::post('page_name')) == '') $errors['pages_empty_name'] = __('Required field', 'pages'); - if (trim(Request::post('page_title')) == '') $errors['pages_empty_title'] = __('Required field', 'pages'); - if (count($pages->select('[slug="'.Security::safeName(Request::post('page_name'), '-', true).'"]')) != 0) $errors['pages_exists'] = __('This page already exists', 'pages'); - - // Prepare date - if (Valid::date(Request::post('page_date'))) { - $date = strtotime(Request::post('page_date')); - } else { - $date = time(); - } - - if (Request::post('robots_index')) $robots_index = 'noindex'; else $robots_index = 'index'; - if (Request::post('robots_follow')) $robots_follow = 'nofollow'; else $robots_follow = 'follow'; - - // If no errors then try to save - if (count($errors) == 0) { - - // Insert new page - if ($pages->insert(array('slug' => Security::safeName(Request::post('page_name'), '-', true), - 'template' => Request::post('templates'), - 'parent' => $parent_page, - 'status' => Request::post('status'), - 'access' => Request::post('access'), - 'expand' => '0', - 'robots_index' => $robots_index, - 'robots_follow'=> $robots_follow, - 'title' => Request::post('page_title'), - 'meta_title' => Request::post('page_meta_title'), - 'description' => Request::post('page_description'), - 'keywords' => Request::post('page_keywords'), - 'tags' => Request::post('page_tags'), - 'date' => $date, - 'author' => $author))) { - - // Get inserted page ID - $last_id = $pages->lastId(); - - // Save content - File::setContent(STORAGE . DS . 'pages' . DS . $last_id . '.page.txt', XML::safe(Request::post('editor'))); - - // Send notification - Notification::set('success', __('Your changes to the page :page have been saved.', 'pages', array(':page' => Security::safeName(Request::post('page_title'), '-', true)))); - } - - // Run add extra actions - Action::run('admin_pages_action_add'); - - // Redirect - if (Request::post('add_page_and_exit')) { - Request::redirect('index.php?id=pages'); - } else { - Request::redirect('index.php?id=pages&action=edit_page&name='.Security::safeName(Request::post('page_name'), '-', true)); - } - } - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - - } - - // Get all pages - $pages_list = $pages->select('[slug!="error404" and parent=""]'); - $pages_array[] = '-none-'; - foreach ($pages_list as $page) { - $pages_array[$page['slug']] = $page['title']; - } - - // Get all templates - $templates_list = File::scan($templates_path, '.template.php'); - foreach ($templates_list as $file) { - $templates_array[basename($file, '.template.php')] = basename($file, '.template.php'); - } - - // Save fields - if (Request::post('page_name')) $post_name = Request::post('page_name'); else $post_name = ''; - if (Request::post('page_title')) $post_title = Request::post('page_title'); else $post_title = ''; - if (Request::post('page_meta_title')) $post_meta_title = Request::post('page_meta_title'); else $post_meta_title = ''; - if (Request::post('page_keywords')) $post_keywords = Request::post('page_keywords'); else $post_keywords = ''; - if (Request::post('page_description')) $post_description = Request::post('page_description'); else $post_description = ''; - if (Request::post('page_tags')) $post_tags = Request::post('page_tags'); else $post_tags = ''; - if (Request::post('editor')) $post_content = Request::post('editor'); else $post_content = ''; - if (Request::post('templates')) $post_template = Request::post('templates'); else $post_template = 'index'; - if (Request::post('status')) $post_status = Request::post('status'); else $post_status = 'published'; - if (Request::post('access')) $post_access = Request::post('access'); else $post_access = 'public'; - if (Request::post('pages')) $parent_page = Request::post('pages'); else if(Request::get('parent_page')) $parent_page = Request::get('parent_page'); else $parent_page = ''; - if (Request::post('robots_index')) $post_robots_index = true; else $post_robots_index = false; - if (Request::post('robots_follow')) $post_robots_follow = true; else $post_robots_follow = false; - //-------------- - - // Generate date - $date = Date::format(time(), 'Y-m-d H:i:s'); - - // Set Tabs State - page - Notification::setNow('page', 'page'); - - // Display view - View::factory('box/pages/views/backend/add') - ->assign('post_name', $post_name) - ->assign('post_title', $post_title) - ->assign('post_meta_title', $post_meta_title) - ->assign('post_description', $post_description) - ->assign('post_keywords', $post_keywords) - ->assign('post_tags', $post_tags) - ->assign('post_content', $post_content) - ->assign('pages_array', $pages_array) - ->assign('parent_page', $parent_page) - ->assign('templates_array', $templates_array) - ->assign('post_template', $post_template) - ->assign('post_status', $post_status) - ->assign('post_access', $post_access) - ->assign('status_array', $status_array) - ->assign('access_array', $access_array) - ->assign('date', $date) - ->assign('post_robots_index', $post_robots_index) - ->assign('post_robots_follow', $post_robots_follow) - ->assign('errors', $errors) - ->display(); - - break; - - // Edit page - // ------------------------------------- - case "edit_page": - - if (Request::post('edit_page') || Request::post('edit_page_and_exit')) { - - if (Security::check(Request::post('csrf'))) { - - // Get pages parent - if (Request::post('pages') == '0') { - $parent_page = ''; - } else { - $parent_page = Request::post('pages'); - } - - // Save field - $post_parent = Request::post('pages'); - - // Validate - //-------------- - if (trim(Request::post('page_name')) == '') $errors['pages_empty_name'] = __('Required field', 'pages'); - if ((count($pages->select('[slug="'.Security::safeName(Request::post('page_name'), '-', true).'"]')) != 0) and (Security::safeName(Request::post('page_old_name'), '-', true) !== Security::safeName(Request::post('page_name'), '-', true))) $errors['pages_exists'] = __('This page already exists', 'pages'); - if (trim(Request::post('page_title')) == '') $errors['pages_empty_title'] = __('Required field', 'pages'); - - // Save fields - if (Request::post('page_name')) $post_name = Request::post('page_name'); else $post_name = ''; - if (Request::post('page_title')) $post_title = Request::post('page_title'); else $post_title = ''; - if (Request::post('page_meta_title')) $post_meta_title = Request::post('page_meta_title'); else $post_meta_title = ''; - if (Request::post('page_keywords')) $post_keywords = Request::post('page_keywords'); else $post_keywords = ''; - if (Request::post('page_description')) $post_description = Request::post('page_description'); else $post_description = ''; - if (Request::post('page_tags')) $post_tags = Request::post('page_tags'); else $post_tags = ''; - if (Request::post('editor')) $post_content = Request::post('editor'); else $post_content = ''; - if (Request::post('templates')) $post_template = Request::post('templates'); else $post_template = 'index'; - if (Request::post('status')) $post_status = Request::post('status'); else $post_status = 'published'; - if (Request::post('access')) $post_access = Request::post('access'); else $post_access = 'public'; - if (Request::post('robots_index')) $post_robots_index = true; else $post_robots_index = false; - if (Request::post('robots_follow')) $post_robots_follow = true; else $post_robots_follow = false; - //-------------- - - // Prepare date - if (Valid::date(Request::post('page_date'))) { - $date = strtotime(Request::post('page_date')); - } else { - $date = time(); - } - - if (Request::post('robots_index')) $robots_index = 'noindex'; else $robots_index = 'index'; - if (Request::post('robots_follow')) $robots_follow = 'nofollow'; else $robots_follow = 'follow'; - - if (count($errors) == 0) { - - // Update parents in all childrens - if ((Security::safeName(Request::post('page_name'), '-', true)) !== (Security::safeName(Request::post('page_old_name'), '-', true)) and (Request::post('old_parent') == '')) { - - $_pages = $pages->select('[parent="'.Text::translitIt(trim(Request::post('page_old_name'))).'"]'); - - if ( ! empty($_pages)) { - foreach ($_pages as $_page) { - $pages->updateWhere('[parent="'.$_page['parent'].'"]', array('parent' => Security::safeName(Request::post('page_name'), '-', true))); - } - } - - if ($pages->updateWhere('[slug="'.Request::get('name').'"]', - array('slug' => Security::safeName(Request::post('page_name'), '-', true), - 'template' => Request::post('templates'), - 'parent' => $parent_page, - 'title' => Request::post('page_title'), - 'meta_title' => Request::post('page_meta_title'), - 'description' => Request::post('page_description'), - 'keywords' => Request::post('page_keywords'), - 'tags' => Request::post('page_tags'), - 'robots_index' => $robots_index, - 'robots_follow'=> $robots_follow, - 'status' => Request::post('status'), - 'access' => Request::post('access'), - 'date' => $date, - 'author' => $author))) { - - File::setContent(STORAGE . DS . 'pages' . DS . Request::post('page_id') . '.page.txt', XML::safe(Request::post('editor'))); - Notification::set('success', __('Your changes to the page :page have been saved.', 'pages', array(':page' => Security::safeName(Request::post('page_title'), '-', true)))); - } - - // Run edit extra actions - Action::run('admin_pages_action_edit'); - - } else { - - if ($pages->updateWhere('[slug="'.Request::get('name').'"]', - array('slug' => Security::safeName(Request::post('page_name'), '-', true), - 'template' => Request::post('templates'), - 'parent' => $parent_page, - 'title' => Request::post('page_title'), - 'meta_title' => Request::post('page_meta_title'), - 'description' => Request::post('page_description'), - 'keywords' => Request::post('page_keywords'), - 'tags' => Request::post('page_tags'), - 'robots_index' => $robots_index, - 'robots_follow'=> $robots_follow, - 'status' => Request::post('status'), - 'access' => Request::post('access'), - 'date' => $date, - 'author' => $author))) { - - File::setContent(STORAGE . DS . 'pages' . DS . Request::post('page_id') . '.page.txt', XML::safe(Request::post('editor'))); - Notification::set('success', __('Your changes to the page :page have been saved.', 'pages', array(':page' => Security::safeName(Request::post('page_title'), '-', true)))); - } - - // Run edit extra actions - Action::run('admin_pages_action_edit'); - } - - // Redirect - if (Request::post('edit_page_and_exit')) { - Request::redirect('index.php?id=pages'); - } else { - Request::redirect('index.php?id=pages&action=edit_page&name='.Security::safeName(Request::post('page_name'), '-', true)); - } - } - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - } - - // Get all pages - $pages_list = $pages->select(); - $pages_array[] = '-none-'; - // Foreach pages find page whithout parent - foreach ($pages_list as $page) { - if (isset($page['parent'])) { - $c_p = $page['parent']; - } else { - $c_p = ''; - } - if ($c_p == '') { - // error404 is system "constant" and no child for it - if ($page['slug'] !== 'error404' && $page['slug'] !== Request::get('name')) { - $pages_array[$page['slug']] = $page['title']; - } - } - } - - // Get all templates - $templates_list = File::scan($templates_path,'.template.php'); - foreach ($templates_list as $file) { - $templates_array[basename($file,'.template.php')] = basename($file, '.template.php'); - } - - $page = $pages->select('[slug="'.Request::get('name').'"]', null); - - if ($page) { - - $page_content = File::getContent(STORAGE . DS . 'pages' . DS . $page['id'] . '.page.txt'); - - // Safe fields or load fields - if (Request::post('page_name')) $slug_to_edit = Request::post('page_name'); else $slug_to_edit = $page['slug']; - if (Request::post('page_title')) $title_to_edit = Request::post('page_title'); else $title_to_edit = $page['title']; - if (Request::post('page_meta_title')) $meta_title_to_edit = Request::post('page_meta_title'); else $meta_title_to_edit = isset($page['meta_title']) ? $page['meta_title'] : ''; - if (Request::post('page_description')) $description_to_edit = Request::post('page_description'); else $description_to_edit = $page['description']; - if (Request::post('page_keywords')) $keywords_to_edit = Request::post('page_keywords'); else $keywords_to_edit = $page['keywords']; - if (Request::post('page_tags')) $tags_to_edit = Request::post('page_tags'); else $tags_to_edit = isset($page['tags']) ? $page['tags'] : '';; - if (Request::post('editor')) $to_edit = Request::post('editor'); else $to_edit = Text::toHtml($page_content); - - if (Request::post('robots_index')) $post_robots_index = true; else if ($page['robots_index'] == 'noindex') $post_robots_index = true; else $post_robots_index = false; - if (Request::post('robots_follow')) $post_robots_follow = true; else if ($page['robots_follow'] == 'nofollow') $post_robots_follow = true; else $post_robots_follow = false; - - if (Request::post('pages')) { - // Get pages parent - if (Request::post('pages') == '-none-') { - $parent_page = ''; - } else { - $parent_page = Request::post('pages'); - } - // Save field - $parent_page = Request::post('pages'); - } else { - $parent_page = $page['parent']; - } - if (Request::post('templates')) $template = Request::post('templates'); else $template = $page['template']; - if (Request::post('status')) $status = Request::post('status'); else $status = $page['status']; - if (Request::post('access')) $access = Request::post('access'); else $access = (isset($page['access'])) ? $page['access'] : 'public'; - - // Generate date - $date = Request::post('date') ? Request::post('date') : Date::format($page['date'], 'Y-m-d H:i:s'); - - Notification::setNow('page', 'page'); - - // Display view - View::factory('box/pages/views/backend/edit') - ->assign('slug_to_edit', $slug_to_edit) - ->assign('title_to_edit', $title_to_edit) - ->assign('meta_title_to_edit', $meta_title_to_edit) - ->assign('description_to_edit', $description_to_edit) - ->assign('keywords_to_edit', $keywords_to_edit) - ->assign('tags_to_edit', $tags_to_edit) - ->assign('page', $page) - ->assign('to_edit', $to_edit) - ->assign('pages_array', $pages_array) - ->assign('parent_page', $parent_page) - ->assign('templates_array', $templates_array) - ->assign('template', $template) - ->assign('status_array', $status_array) - ->assign('access_array', $access_array) - ->assign('status', $status) - ->assign('access', $access) - ->assign('date', $date) - ->assign('post_robots_index', $post_robots_index) - ->assign('post_robots_follow', $post_robots_follow) - ->assign('errors', $errors) - ->display(); - } - - break; - - // Delete page - // ------------------------------------- - case "delete_page": - - // Error 404 page can not be removed - if (Request::get('slug') !== 'error404') { - - if (Security::check(Request::get('token'))) { - - // Get specific page - $page = $pages->select('[slug="'.Request::get('name').'"]', null); - - // Delete page and update fields - if ($pages->deleteWhere('[slug="'.$page['slug'].'" ]')) { - - $_pages = $pages->select('[parent="'.$page['slug'].'"]'); - - if ( ! empty($_pages)) { - foreach ($_pages as $_page) { - $pages->updateWhere('[slug="'.$_page['slug'].'"]', array('parent' => '')); - } - } - - File::delete(STORAGE . DS . 'pages' . DS . $page['id'] . '.page.txt'); - Notification::set('success', __('Page :page deleted', 'pages', array(':page' => Html::toText($page['title'])))); - } - - // Run delete extra actions - Action::run('admin_pages_action_delete'); - - // Redirect - Request::redirect('index.php?id=pages'); - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - } - - break; - - // Update page access - // ------------------------------------- - case "update_access": - - if (Request::get('slug') !== 'error404') { - - if (Security::check(Request::get('token'))) { - - $pages->updateWhere('[slug="'.Request::get('slug').'"]', array('access' => Request::get('access'))); - - // Run delete extra actions - Action::run('admin_pages_action_update_access'); - - // Send notification - Notification::set('success', __('Your changes to the page :page have been saved.', 'pages', array(':page' => Request::get('slug')))); - - // Redirect - Request::redirect('index.php?id=pages'); - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - } - - break; - - // Update page status - // ------------------------------------- - case "update_status": - - if (Request::get('name') !== 'error404') { - - if (Security::check(Request::get('token'))) { - - $pages->updateWhere('[slug="'.Request::get('slug').'"]', array('status' => Request::get('status'))); - - // Run delete extra actions - Action::run('admin_pages_action_update_status'); - - // Send notification - Notification::set('success', __('Your changes to the page :page have been saved.', 'pages', array(':page' => Request::get('slug')))); - - // Redirect - Request::redirect('index.php?id=pages'); - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - } - - break; - } - - // Its mean that you can add your own actions for this plugin - Action::run('admin_pages_extra_actions'); - - } else { - - // Index action - // ------------------------------------- - - // Init vars - $pages_array = array(); - $count = 0; - - // Get pages - $pages_list = $pages->select(null, 'all', null, array('slug', 'title', 'status', 'date', 'author', 'expand', 'access', 'parent', 'template', 'tags')); - - // Loop - foreach ($pages_list as $page) { - - $pages_array[$count]['title'] = $page['title']; - $pages_array[$count]['meta_title'] = isset($page['meta_title']) ? $page['meta_title'] : ''; - $pages_array[$count]['parent'] = $page['parent']; - $pages_array[$count]['_status'] = $page['status']; - $pages_array[$count]['_access'] = $page['access']; - $pages_array[$count]['status'] = $status_array[$page['status']]; - $pages_array[$count]['access'] = isset($access_array[$page['access']]) ? $access_array[$page['access']] : $access_array['public']; // hack for old Monstra Versions - $pages_array[$count]['date'] = $page['date']; - $pages_array[$count]['author'] = $page['author']; - $pages_array[$count]['expand'] = $page['expand']; - $pages_array[$count]['slug'] = $page['slug']; - $pages_array[$count]['tags'] = $page['tags']; - $pages_array[$count]['template']= $page['template']; - - if (isset($page['parent'])) { - $c_p = $page['parent']; - } else { - $c_p = ''; - } - - if ($c_p != '') { - - $_page = $pages->select('[slug="'.$page['parent'].'"]', null); - - if (isset($_page['title'])) { - $_title = $_page['title']; - } else { - $_title = ''; - } - - $pages_array[$count]['sort'] = $_title . ' ' . $page['title']; - - } else { - - $pages_array[$count]['sort'] = $page['title']; - - } - - $_title = ''; - $count++; - } - - // Sort pages - $pages = Arr::subvalSort($pages_array, 'sort'); - - // Display view - View::factory('box/pages/views/backend/index') - ->assign('pages', $pages) - ->assign('site_url', $site_url) - ->display(); - } - - } -} diff --git a/plugins/box/pages/pages.plugin.php b/plugins/box/pages/pages.plugin.php deleted file mode 100644 index 88afb07..0000000 --- a/plugins/box/pages/pages.plugin.php +++ /dev/null @@ -1,540 +0,0 @@ -select('[slug="'.$requested_page.'"]', null); - } - - /** - * Load current page - * - * @global string $defpage default page - * @param array $data uri - * @return string - */ - public static function lowLoader($data) - { - $defpage = Option::get('defaultpage'); - - // If data count 2 then it has Parent/Child - if (count($data) >= 2) { - - // If exists parent file - if (count(Pages::$pages->select('[slug="'.$data[0].'"]')) !== 0) { - - // Get child file and get parent page name - $child_page = Pages::$pages->select('[slug="'.$data[1].'"]', null); - - // If child page parent is not empty then get his parent - if (count($child_page) == 0) { - $c_p = ''; - } else { - if ($child_page['parent'] != '') { - $c_p = $child_page['parent']; - } else { - $c_p = ''; - } - } - - // Hack For old Monstra - $child_page['access'] = (isset($child_page['access'])) ? $child_page['access'] : 'public' ; - - // Check is child_parent -> request parent - if ($c_p == $data[0]) { - - if (count($data) < 3) { // Checking only for the parent and one child, the remaining issue 404 - - if ((($child_page['status'] == 'published') or - (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor')))) and - ($child_page['access'] == 'public')) { - - $id = $data[1]; - - } elseif (($child_page['access'] == 'registered') and - (Session::exists('user_id')) and - ($child_page['status'] == 'published')) { - - $id = $data[1]; - - } else { - $id = 'error404'; - Response::status(404); - } - } else { - $id = 'error404'; - Response::status(404); - } - - } else { - $id = 'error404'; - Response::status(404); - } - } else { - $id = 'error404'; - Response::status(404); - } - - } else { // Only parent page come - if (empty($data[0])) { - - $id = $defpage; - - } else { - - // Get current page - $current_page = Pages::$pages->select('[slug="'.$data[0].'"]', null); - - // Hack For old Monstra - $current_page['access'] = (isset($current_page['access'])) ? $current_page['access'] : 'public' ; - - if (count($current_page) != 0) { - if ( ! empty($current_page['parent'])) { - $c_p = $current_page['parent']; - } else { - $c_p = ''; - } - } else { - $c_p = ''; - } - - // Check if this page has parent - if ($c_p !== '') { - - if ($c_p == $data[0]) { - if (count(Pages::$pages->select('[slug="'.$data[0].'"]', null)) != 0) { - - if ((($current_page['status'] == 'published') or - (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor')))) and - ($current_page['access'] == 'public')) { - - $id = $data[0]; - - } elseif (($current_page['access'] == 'registered') and - (Session::exists('user_id')) and - ($current_page['status'] == 'published')) { - - $id = $data[0]; - - } else { - $id = 'error404'; - Response::status(404); - } - } else { - $id = 'error404'; - Response::status(404); - } - } else { - $id = 'error404'; - Response::status(404); - } - } else { - - if (count(Pages::$pages->select('[slug="'.$data[0].'"]', null)) != 0) { - if ((($current_page['status'] == 'published') or - (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor')))) and - ($current_page['access'] == 'public')) { - - $id = $data[0]; - - } elseif (($current_page['access'] == 'registered') and - (Session::exists('user_id')) and - ($current_page['status'] == 'published')) { - - $id = $data[0]; - - } else { - $id = 'error404'; - Response::status(404); - } - } else { - $id = 'error404'; - Response::status(404); - } - } - } - } - - // Return page name/id to load - return $id; - } - - /** - * Get pages template - * - * @return string - */ - public static function template() - { - if (Pages::$page['template'] == '') return 'index'; else return Pages::$page['template']; - } - - /** - * Get pages contents - * - * @return string - */ - public static function content($slug = '') - { - if ( ! empty($slug)) { - - $page = Table::factory('pages')->select('[slug="'.$slug.'"]', null); - - if ( ! empty($page)) { - - $content = Text::toHtml(File::getContent(STORAGE . DS . 'pages' . DS . $page['id'] . '.page.txt')); - - $content = Filter::apply('content', $content); - - return $content; - - } else { - return ''; - } - - } else { - return Text::toHtml(File::getContent(STORAGE . DS . 'pages' . DS . Pages::$page['id'] . '.page.txt')); - } - - } - - /** - * Get pages title - * - * - * echo Page::title(); - * - * - * @return string - */ - public static function title() - { - return !empty(Pages::$page['meta_title']) ? Pages::$page['meta_title'] : Pages::$page['title']; - } - - /** - * Get pages Description - * - * - * echo Page::description(); - * - * - * @return string - */ - public static function description() - { - return Pages::$page['description']; - } - - /** - * Get pages Keywords - * - * - * echo Page::keywords(); - * - * - * @return string - */ - public static function keywords() - { - return Pages::$page['keywords']; - } - - - /** - * Get pages - */ - public static function getPages() - { - // Init vars - $pages_array = array(); - $count = 0; - - // Get pages table - $pages = new Table('pages'); - - // Get Pages List - $pages_list = $pages->select('[slug!="error404" and status="published"]'); - - foreach ($pages_list as $page) { - - $pages_array[$count]['title'] = Html::toText($page['title']); - $pages_array[$count]['meta_title'] = !empty($page['meta_title']) ? Html::toText($page['meta_title']) : $page['title']; - $pages_array[$count]['parent'] = $page['parent']; - $pages_array[$count]['date'] = $page['date']; - $pages_array[$count]['author'] = $page['author']; - $pages_array[$count]['slug'] = ($page['slug'] == Option::get('defaultpage')) ? '' : $page['slug'] ; - - if (isset($page['parent'])) { - $c_p = $page['parent']; - } else { - $c_p = ''; - } - - if ($c_p != '') { - $_page = $pages->select('[slug="'.$page['parent'].'"]', null); - - if (isset($_page['title'])) { - $_title = $_page['title']; - } else { - $_title = ''; - } - $pages_array[$count]['sort'] = $_title . ' ' . $page['title']; - } else { - $pages_array[$count]['sort'] = $page['title']; - } - $_title = ''; - $count++; - } - - // Sort pages - $_pages_list = Arr::subvalSort($pages_array, 'sort'); - - // return - return $_pages_list; - } - -} - -/** - * Page class - */ -class Page extends Pages -{ - /** - * Get date of current page - * - * - * echo Page::date(); - * - * - * @param string $format Date format - * @return string - */ - public static function date($format = 'Y-m-d') - { - return Date::format(Pages::$page['date'], $format); - } - - /** - * Get author of current page - * - * - * echo Page::author(); - * - * - * @return string - */ - public static function author() - { - return Pages::$page['author']; - } - - /** - * Get children pages for a specific parent page - * - * - * $pages = Page::children('page'); - * - * - * @param string $parent Parent page - * @return array - */ - public static function children($parent) - { - return Pages::$pages->select('[parent="'.(string) $parent.'"]', 'all'); - } - - /** - * Get the available children pages for requested page. - * - * - * echo Page::available(); - * - * - */ - public static function available() - { - $pages = Pages::$pages->select('[parent="'.Pages::$requested_page.'"]', 'all'); - - // Display view - View::factory('box/pages/views/frontend/available_pages') - ->assign('pages', $pages) - ->display(); - } - - /** - * Get page breadcrumbs - * - * - * echo Page::breadcrumbs(); - * - * - */ - public static function breadcrumbs() - { - if (Uri::command() == 'pages') { - $current_page = Pages::$requested_page; - $parent_page = ''; - if ($current_page !== 'error404') { - $page = Pages::$pages->select('[slug="'.$current_page.'"]', null); - if (trim($page['parent']) !== '') { - $parent = true; - $parent_page = Pages::$pages->select('[slug="'.$page['parent'].'"]', null); - } else { - $parent = false; - } - - // Display view - View::factory('box/pages/views/frontend/breadcrumbs') - ->assign('current_page', $current_page) - ->assign('page', $page) - ->assign('parent', $parent) - ->assign('parent_page', $parent_page) - ->display(); - } - } - } - - /** - * Get page url - * - * - * echo Page::url(); - * - * - */ - public static function url() - { - return Option::get('siteurl').'/'.Pages::$page['slug']; - } - - /** - * Get page slug - * - * - * echo Page::slug(); - * - * - */ - public static function slug() - { - return Pages::$page['slug']; - } - - /** - * Get page meta robots - * - * - * echo Page::robots(); - * - * - */ - public static function robots() - { - if (Pages::$page !== null) { - $_index = (isset(Pages::$page['robots_index'])) ? Pages::$page['robots_index'] : ''; - $_follow = (isset(Pages::$page['robots_follow'])) ? Pages::$page['robots_follow'] : ''; - $robots = ( ! empty($_index) && ! empty($_follow)) ? $_index.', '.$_follow : ''; - } else { - $robots = ''; - } - - return $robots; - } - - public static function _date($attributes) - { - return Page::date((isset($attributes['format'])) ? $attributes['format'] : 'Y-m-d'); - } - - public static function _content($attributes) - { - return Pages::content((isset($attributes['name']) ? $attributes['name'] : '')); - } - -} - - -/** - * Add new shortcodes {page_author} {page_slug} {page_url} {page_date} {page_content} - */ -Shortcode::add('page_author', 'Page::author'); -Shortcode::add('page_slug', 'Page::slug'); -Shortcode::add('page_url', 'Page::url'); -Shortcode::add('page_content', 'Page::_content'); -Shortcode::add('page_date', 'Page::_date'); diff --git a/plugins/box/pages/views/backend/add.view.php b/plugins/box/pages/views/backend/add.view.php deleted file mode 100644 index ad71f22..0000000 --- a/plugins/box/pages/views/backend/add.view.php +++ /dev/null @@ -1,157 +0,0 @@ -

    - - - - - -
    -
    -
    - (isset($errors['pages_empty_title'])) ? 'form-control error-field' : 'form-control')) - ); - if (isset($errors['pages_empty_title'])) echo Html::nbsp(3).''.$errors['pages_empty_title'].''; - ?> -
    -
    - (isset($errors['pages_empty_name'])) ? 'form-control error-field' : 'form-control')) - ); - - if (isset($errors['pages_exists'])) echo ''.$errors['pages_exists'].''; - if (isset($errors['pages_empty_name'])) echo ''.$errors['pages_empty_name'].''; - ?> -
    - -
    -
    -
    - 'form-control')) - ); - ?> -
    -
    - 'form-control')) - ); - ?> -
    -
    - 'form-control')) - ); - ?> -
    -
    - -
    -
    -
    -
    - 'form-control')) - ); - ?> -
    -
    - 'form-control')) - ); - ?> -
    -
    - 'form-control')) - ); - ?> -
    -
    - 'form-control')) - ); - ?> -
    -
    -
    - -
    -
    - -
    -
    - -
    -
    -
    -
    - 'form-control')) - ); - ?> - - - -
    -
    -
    -
    - -
    -
    - 'btn btn-phone btn-primary')).Html::nbsp(2). - Form::submit('add_page', __('Save', 'pages'), array('class' => 'btn btn-phone btn-primary')).Html::nbsp(2). - Html::anchor(__('Cancel', 'pages'), 'index.php?id=pages', array('title' => __('Cancel', 'pages'), 'class' => 'btn btn-phone btn-default')) - ); - ?> -
    -
    -
    -
    - 'form-control')); ?> - - - -
    -
    - -
    -
    \ No newline at end of file diff --git a/plugins/box/pages/views/backend/edit.view.php b/plugins/box/pages/views/backend/edit.view.php deleted file mode 100644 index ed3a1bb..0000000 --- a/plugins/box/pages/views/backend/edit.view.php +++ /dev/null @@ -1,190 +0,0 @@ -

    - - - - - -
    -
    -
    - (isset($errors['pages_empty_title'])) ? 'form-control error-field' : 'form-control')) - ); - if (isset($errors['pages_empty_title'])) echo ''.$errors['pages_empty_title'].''; - ?> -
    -
    - (isset($errors['pages_empty_name'])) ? 'form-control error-field' : 'form-control')) - ); - } - - if (isset($errors['pages_empty_name'])) echo ''.$errors['pages_empty_name'].''; - if (isset($errors['pages_exists'])) echo ''.$errors['pages_exists'].''; - ?> -
    -
    -
    -
    - 'form-control')) - ); - ?> -
    -
    - 'form-control')) - ); - ?> -
    -
    - 'form-control')) - ); - ?> -
    -
    - -
    -
    -
    - -
    - 'form-control')) - ); - ?> -
    - - -
    - -
    - - 'form-control')) - ); - ?> -
    - -
    - 'form-control')) - ); - ?> -
    - - -
    - 'form-control')) - ); - ?> -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    -
    -
    - 'form-control')) - ); - ?> - - - -
    -
    -
    -
    - -
    -
    - 'btn btn-phone btn-primary')).Html::nbsp(2). - Form::submit('edit_page', __('Save', 'pages'), array('class' => 'btn btn-phone btn-primary')).Html::nbsp(2). - Html::anchor(__('Cancel', 'pages'), 'index.php?id=pages', array('title' => __('Cancel', 'pages'), 'class' => 'btn btn-phone btn-default')) - ); - ?> -
    -
    -
    -
    - 'form-control')); ?> - - - -
    -
    - -
    -
    diff --git a/plugins/box/pages/views/backend/index.view.php b/plugins/box/pages/views/backend/index.view.php deleted file mode 100755 index a8e9a4e..0000000 --- a/plugins/box/pages/views/backend/index.view.php +++ /dev/null @@ -1,113 +0,0 @@ -
    -
    -

    -
    -
    - __('Create New Page', 'pages'), 'class' => 'btn btn-phone btn-primary')). Html::nbsp(3). - Html::anchor(__('Edit 404 Page', 'pages'), 'index.php?id=pages&action=edit_page&name=error404', array('title' => __('Create New Page', 'pages'), 'class' => 'btn btn-phone btn-default')) - ); - ?> -
    -
    - -
    - - - - - - - - - - - - - - - - select('[slug="'.(string) $page['parent'].'"]', null); - if ($page['parent'] !== '' && isset($expand['expand']) && $expand['expand'] == '1') { $visibility = 'style="display:none;"'; } else { $visibility = ''; } - ?> - rel="children_" > - - - - - - - - - - - - -
    - select('[parent="'.(string) $page['slug'].'"]', 'all')) > 0) { - if (isset($page['expand']) && $page['expand'] == '1') { - echo '+'; - } else { - echo '-'; - } - } - ?> - - '_blank', 'rel' => 'children_'.$_parent)); - ?> - - - -
    -
    - 'btn btn-primary')); ?> - - -
    - - 'btn btn-danger btn-actions btn-actions-default', 'onclick' => "return confirmDelete('".__("Delete page: :page", 'pages', array(':page' => Html::toText($page['title'])))."')")); - ?> -
    -
    -
    - -
    - -
    diff --git a/plugins/box/pages/views/frontend/available_pages.view.php b/plugins/box/pages/views/frontend/available_pages.view.php deleted file mode 100644 index e646dc1..0000000 --- a/plugins/box/pages/views/frontend/available_pages.view.php +++ /dev/null @@ -1,11 +0,0 @@ -
      - -
    • - -
    diff --git a/plugins/box/pages/views/frontend/breadcrumbs.view.php b/plugins/box/pages/views/frontend/breadcrumbs.view.php deleted file mode 100644 index 12a5320..0000000 --- a/plugins/box/pages/views/frontend/breadcrumbs.view.php +++ /dev/null @@ -1,5 +0,0 @@ - -    - - - - - plugins/box/plugins/plugins.plugin.php - active - 2 - Plugins - Plugins manager plugin - 1.0.0 - Awilum - http://monstra.org/ - diff --git a/plugins/box/plugins/js/.htaccess b/plugins/box/plugins/js/.htaccess deleted file mode 100644 index b9f48ac..0000000 --- a/plugins/box/plugins/js/.htaccess +++ /dev/null @@ -1,2 +0,0 @@ -Options -Indexes -Allow from all \ No newline at end of file diff --git a/plugins/box/plugins/js/plugins.js b/plugins/box/plugins/js/plugins.js deleted file mode 100644 index 4726bbb..0000000 --- a/plugins/box/plugins/js/plugins.js +++ /dev/null @@ -1,15 +0,0 @@ -if (typeof $.monstra == 'undefined') $.monstra = {}; - -$.monstra.plugins = { - - init: function(){ - if (window.location.hash && $('a[href="'+ window.location.hash +'"]')) { - $('a[href="'+ window.location.hash +'"]').click(); - } - } - -}; - -$(document).ready(function(){ - $.monstra.plugins.init(); -}); \ No newline at end of file diff --git a/plugins/box/plugins/languages/cs.lang.php b/plugins/box/plugins/languages/cs.lang.php deleted file mode 100644 index 84d6c60..0000000 --- a/plugins/box/plugins/languages/cs.lang.php +++ /dev/null @@ -1,21 +0,0 @@ - array( - 'Plugins' => 'Pluginy', - 'Name' => 'Název', - 'Actions' => 'Akce', - 'Description' => 'Popis', - 'Installed' => 'Nainstalované', - 'Install New' => 'Instalovat nový', - 'Delete' => 'Vymazat', - 'Delete plugin :plugin' => 'Vymazat plugin :plugin', - 'This plugin does not exist' => 'Tento plugin neexistuje', - 'Version' => 'Verze', - 'Author' => 'Autor', - 'Get More Plugins' => 'Získat víc pluginů', - 'Install' => 'Instalovat', - 'Uninstall' => 'Odinstalovat', - 'README.md not found' => 'README.md nenalezeno', - ) - ); diff --git a/plugins/box/plugins/languages/de.lang.php b/plugins/box/plugins/languages/de.lang.php deleted file mode 100644 index a82161d..0000000 --- a/plugins/box/plugins/languages/de.lang.php +++ /dev/null @@ -1,21 +0,0 @@ - array( - 'Plugins' => 'Plugins', - 'Name' => 'Name', - 'Actions' => 'Aktionen', - 'Description' => 'Beschreibung', - 'Installed' => 'Installiert', - 'Install New' => 'Installiere Neue', - 'Delete' => 'Löschen', - 'Delete plugin :plugin' => 'Lösche Plugin :plugin', - 'This plugins does not exist' => 'Diese Plugins existieren nicht', - 'Version' => 'Version', - 'Author' => 'Author', - 'Get More Plugins' => 'Hole weitere Plugins', - 'Install' => 'Installieren', - 'Uninstall' => 'Deinstallieren', - 'README.md not found' => 'README.md nicht gefunden', - ) - ); diff --git a/plugins/box/plugins/languages/en.lang.php b/plugins/box/plugins/languages/en.lang.php deleted file mode 100644 index 6cbe795..0000000 --- a/plugins/box/plugins/languages/en.lang.php +++ /dev/null @@ -1,21 +0,0 @@ - array( - 'Plugins' => 'Plugins', - 'Name' => 'Name', - 'Actions' => 'Actions', - 'Description' => 'Description', - 'Installed' => 'Installed', - 'Install New' => 'Install New', - 'Delete' => 'Delete', - 'Delete plugin :plugin' => 'Delete plugin :plugin', - 'This plugin does not exist' => 'This plugin does not exist', - 'Version' => 'Version', - 'Author' => 'Author', - 'Get More Plugins' => 'Get More Plugins', - 'Install' => 'Install', - 'Uninstall' => 'Uninstall', - 'README.md not found' => 'README.md not found', - ) - ); diff --git a/plugins/box/plugins/languages/es.lang.php b/plugins/box/plugins/languages/es.lang.php deleted file mode 100644 index adaf6a9..0000000 --- a/plugins/box/plugins/languages/es.lang.php +++ /dev/null @@ -1,21 +0,0 @@ - array( - 'Plugins' => 'Plugins', - 'Name' => 'Nombre', - 'Actions' => 'Acciones', - 'Description' => 'Descripción', - 'Installed' => 'Instalado', - 'Install New' => 'Instalar nuevo', - 'Delete' => 'Eliminar', - 'Delete plugin :plugin' => 'Eliminar plugin: :plugin', - 'This plugin does not exist' => 'Este plugin no existe', - 'Version' => 'Versión', - 'Author' => 'Autor', - 'Get More Plugins' => 'Obtener más plugins', - 'Install' => 'Instalar', - 'Uninstall' => 'Desinstalar', - 'README.md not found' => 'README.md no encontrado', - ) - ); diff --git a/plugins/box/plugins/languages/fa.lang.php b/plugins/box/plugins/languages/fa.lang.php deleted file mode 100644 index 849e026..0000000 --- a/plugins/box/plugins/languages/fa.lang.php +++ /dev/null @@ -1,21 +0,0 @@ - array( - 'Plugins' => 'Ø§ÙØ²ÙˆÙ†Ù‡ ها', - 'Name' => 'نام', - 'Actions' => 'عملیات', - 'Description' => 'توضیحات', - 'Installed' => 'نصب شده', - 'Install New' => 'نصب جدید', - 'Delete' => 'حذÙ', - 'Delete plugin :plugin' => 'Ø­Ø°Ù Ø§ÙØ²ÙˆÙ†Ù‡ :plugin', - 'This plugin does not exist' => 'این Ø§ÙØ²ÙˆÙ†Ù‡ وجود ندارد', - 'Version' => 'نسخه', - 'Author' => 'مولÙ', - 'Get More Plugins' => 'Ø¯Ø±ÛŒØ§ÙØª Ø§ÙØ²ÙˆÙ†Ù‡ های بیشتر', - 'Install' => 'نصب', - 'Uninstall' => 'حذÙ', - 'README.md not found' => 'README.md not found', - ) - ); diff --git a/plugins/box/plugins/languages/fr.lang.php b/plugins/box/plugins/languages/fr.lang.php deleted file mode 100644 index e1324fb..0000000 --- a/plugins/box/plugins/languages/fr.lang.php +++ /dev/null @@ -1,21 +0,0 @@ - array( - 'Plugins' => 'Plugins', - 'Name' => 'Nom', - 'Actions' => 'Actions', - 'Description' => 'Description', - 'Installed' => 'Installé', - 'Install New' => 'Installer un nouveau', - 'Delete' => 'Supprimer', - 'Delete plugin :plugin' => 'Supprimer le plugin :plugin', - 'This plugin does not exist' => 'Ce plugin n\\\'existe pas', - 'Version' => 'Version', - 'Author' => 'Auteur', - 'Get More Plugins' => 'Obtenez plus de plugins', - 'Install' => 'Installer', - 'Uninstall' => 'Désinstaller', - 'README.md not found' => 'README.md not found', - ) - ); \ No newline at end of file diff --git a/plugins/box/plugins/languages/hu.lang.php b/plugins/box/plugins/languages/hu.lang.php deleted file mode 100644 index ee20943..0000000 --- a/plugins/box/plugins/languages/hu.lang.php +++ /dev/null @@ -1,21 +0,0 @@ - array( - 'Plugins' => 'Pluginok', - 'Name' => 'Név', - 'Actions' => 'Műveletek', - 'Description' => 'Leírás', - 'Installed' => 'Telepítve', - 'Install New' => 'Új Telepítése', - 'Delete' => 'Törlés', - 'Delete plugin :plugin' => 'Plugin törlése :plugin', - 'This plugin does not exist' => 'Ez a plugin nem létezik', - 'Version' => 'Verzió', - 'Author' => 'SzerzÅ‘', - 'Get More Plugins' => 'Még több Plugin', - 'Install' => 'Telepít', - 'Uninstall' => 'Töröl', - 'README.md not found' => 'README.md not found', - ) - ); diff --git a/plugins/box/plugins/languages/id.lang.php b/plugins/box/plugins/languages/id.lang.php deleted file mode 100644 index b53dd87..0000000 --- a/plugins/box/plugins/languages/id.lang.php +++ /dev/null @@ -1,21 +0,0 @@ - array( - 'Plugins' => 'Plugins', - 'Name' => 'Nama', - 'Actions' => 'Tindakan', - 'Description' => 'Deskripsi', - 'Installed' => 'Terpasang', - 'Install New' => 'Pemasangan Baru', - 'Delete' => 'Hapus', - 'Delete plugin :plugin' => 'Hapus Plugin :plugin', - 'This plugins does not exist' => 'Plugin ini tidak ada', - 'Version' => 'Versi', - 'Author' => 'Penulis', - 'Get More Plugins' => 'Cari Plugins Baru', - 'Install' => 'Memasangkan', - 'Uninstall' => 'Menghapus Program', - 'README.md not found' => 'README.md not found', - ) - ); diff --git a/plugins/box/plugins/languages/it.lang.php b/plugins/box/plugins/languages/it.lang.php deleted file mode 100644 index e47599a..0000000 --- a/plugins/box/plugins/languages/it.lang.php +++ /dev/null @@ -1,21 +0,0 @@ - array( - 'Plugins' => 'Plugin', - 'Installed' => 'Installati', - 'Install New' => 'Installa nuovi', - 'Actions' => 'Azioni', - 'Name' => 'Nome', - 'Description' => 'Descrizione', - 'Delete' => 'Elimina', - 'Delete plugin :plugin' => 'Elimina plugin :plugin', - 'This plugin does not exist' => 'Tale plugin non esiste', - 'Version' => 'Versione', - 'Author' => 'Autore', - 'Get More Plugins' => 'Scarica altri plugin', - 'Install' => 'Installa', - 'Uninstall' => 'Disinstalla', - 'README.md not found' => 'README.md not found', - ) - ); diff --git a/plugins/box/plugins/languages/ja.lang.php b/plugins/box/plugins/languages/ja.lang.php deleted file mode 100644 index 816afd4..0000000 --- a/plugins/box/plugins/languages/ja.lang.php +++ /dev/null @@ -1,21 +0,0 @@ - array( - 'Plugins' => 'プラグイン', - 'Name' => 'åå‰', - 'Actions' => 'æ“作', - 'Description' => '説明', - 'Installed' => 'インストール済ã¿', - 'Install New' => 'インストールå¯èƒ½', - 'Delete' => '削除', - 'Delete plugin :plugin' => 'プラグインã®å‰Šé™¤: :plugin', - 'This plugin does not exist' => 'プラグインãŒå­˜åœ¨ã—ã¾ã›ã‚“。', - 'Version' => 'ãƒãƒ¼ã‚¸ãƒ§ãƒ³', - 'Author' => '作æˆè€…', - 'Get More Plugins' => 'ã•らã«ãƒ—ラグインをå–å¾—', - 'Install' => 'インストール', - 'Uninstall' => 'åœæ­¢', - 'README.md not found' => 'README.md not found', - ) - ); diff --git a/plugins/box/plugins/languages/ka-ge.lang.php b/plugins/box/plugins/languages/ka-ge.lang.php deleted file mode 100644 index c4026f5..0000000 --- a/plugins/box/plugins/languages/ka-ge.lang.php +++ /dev/null @@ -1,24 +0,0 @@ - array( - 'Plugins' => 'პლáƒáƒ’ინები', - 'Installed' => 'დáƒáƒ§áƒ”ნებული', - 'Install New' => 'áƒáƒ®áƒáƒšáƒ˜áƒ¡ დáƒáƒ§áƒ”ნებáƒ', - 'Actions' => 'მáƒáƒ¥áƒ›áƒ”დებáƒ', - 'Name' => 'სáƒáƒ®áƒ”ლწáƒáƒ“ებáƒ', - 'Description' => 'áƒáƒ¦áƒ¬áƒ”რáƒ', - 'Delete' => 'წáƒáƒ¨áƒšáƒ', - 'Delete plugin :plugin' => ':plugin პლáƒáƒ’ინის წáƒáƒ¨áƒšáƒ', - 'This plugin does not exist' => 'áƒáƒ¡áƒ”თი პლáƒáƒ’ინი áƒáƒ  áƒáƒ áƒ¡áƒ”ბáƒáƒ‘ს', - 'Version' => 'ვერსიáƒ', - 'Author' => 'áƒáƒ•ტáƒáƒ áƒ˜', - 'Get More Plugins' => 'სხვრპლáƒáƒ’ინების გáƒáƒ“მáƒáƒ¬áƒ”რáƒ', - 'Install' => 'დáƒáƒ§áƒ”ნებáƒ', - 'Uninstall' => 'წáƒáƒ¨áƒšáƒ', - 'README.md not found' => 'README.md áƒáƒ  áƒáƒ áƒ˜áƒ¡ ნáƒáƒžáƒáƒ•ნი', - 'Info' => 'ინფáƒ', - 'Upload' => 'áƒáƒ¢áƒ•ირთვáƒ', - 'Drop File Here' => 'გáƒáƒ“áƒáƒ˜áƒ¢áƒáƒœáƒ”თ ფáƒáƒ˜áƒšáƒ˜ áƒáƒ¥', - ) - ); diff --git a/plugins/box/plugins/languages/lt.lang.php b/plugins/box/plugins/languages/lt.lang.php deleted file mode 100644 index 6bcefbb..0000000 --- a/plugins/box/plugins/languages/lt.lang.php +++ /dev/null @@ -1,21 +0,0 @@ - array( - 'Plugins' => 'Papildiniai', - 'Name' => 'Pavadinimas', - 'Actions' => 'Veiksmai', - 'Description' => 'ApraÅ¡ymas', - 'Installed' => 'Ä®diegti', - 'Install New' => 'Ä®diegti naujÄ…', - 'Delete' => 'IÅ¡trinti', - 'Delete plugin :plugin' => 'IÅ¡trinti papildinį :plugin', - 'This plugins does not exist' => 'Tokio papildinio nÄ—ra', - 'Version' => 'Versija', - 'Author' => 'Autorius', - 'Get More Plugins' => 'Gauti daugiau papildinių', - 'Install' => 'Ä®diegti', - 'Uninstall' => 'IÅ¡diegti', - 'README.md not found' => 'README.md not found', - ) - ); diff --git a/plugins/box/plugins/languages/nl.lang.php b/plugins/box/plugins/languages/nl.lang.php deleted file mode 100644 index 44b2171..0000000 --- a/plugins/box/plugins/languages/nl.lang.php +++ /dev/null @@ -1,21 +0,0 @@ - array( - 'Plugins' => 'Plugins', - 'Name' => 'Naam', - 'Actions' => 'Acties', - 'Description' => 'Beschrijving', - 'Installed' => 'Geinstalleerd', - 'Install New' => 'Installeer nieuwe plugin', - 'Delete' => 'Verwijderen', - 'Delete plugin :plugin' => 'Verwijder plugin: :plugin', - 'This plugins does not exist' => 'Deze plugin bestaat niet', - 'Version' => 'Versie', - 'Author' => 'Auteur', - 'Get More Plugins' => 'Vind meer plugins', - 'Install' => 'Installeren', - 'Uninstall' => 'Deinstalleren', - 'README.md not found' => 'README.md not found', - ) - ); diff --git a/plugins/box/plugins/languages/pl.lang.php b/plugins/box/plugins/languages/pl.lang.php deleted file mode 100644 index 8b97cf4..0000000 --- a/plugins/box/plugins/languages/pl.lang.php +++ /dev/null @@ -1,21 +0,0 @@ - array( - 'Plugins' => 'Wtyczki', - 'Name' => 'Nazwa', - 'Actions' => 'Akcje', - 'Description' => 'Opis', - 'Installed' => 'Zainstalowane', - 'Install New' => 'Zainstaluj nowÄ…', - 'Delete' => 'UsuÅ„', - 'Delete plugin :plugin' => 'Czy napewno usunąć wtyczkÄ™ :plugin', - 'This plugin does not exist' => 'Ta wtyczka nie istnieje', - 'Version' => 'Wersja', - 'Author' => 'Autor', - 'Get More Plugins' => 'Pobierz wiÄ™cej wtyczek', - 'Install' => 'Instaluj', - 'Uninstall' => 'Odinstaluj', - 'README.md not found' => 'README.md not found', - ) - ); diff --git a/plugins/box/plugins/languages/pt-br.lang.php b/plugins/box/plugins/languages/pt-br.lang.php deleted file mode 100644 index cb10e0d..0000000 --- a/plugins/box/plugins/languages/pt-br.lang.php +++ /dev/null @@ -1,21 +0,0 @@ - array( - 'Plugins' => 'Plugins', - 'Name' => 'Nome', - 'Actions' => 'Ações', - 'Description' => 'Descrição', - 'Installed' => 'Instalado', - 'Install New' => 'Instalar novo', - 'Delete' => 'Deletar', - 'Delete plugin :plugin' => 'Deletar o plugin :plugin', - 'This plugins does not exist' => 'Estes plugins não existem', - 'Version' => 'Versão', - 'Author' => 'Autor', - 'Get More Plugins' => 'Ver mais plugins', - 'Install' => 'Instalar', - 'Uninstall' => 'Desinstalar', - 'README.md not found' => 'README.md not found', - ) - ); diff --git a/plugins/box/plugins/languages/ru.lang.php b/plugins/box/plugins/languages/ru.lang.php deleted file mode 100644 index af5bec8..0000000 --- a/plugins/box/plugins/languages/ru.lang.php +++ /dev/null @@ -1,24 +0,0 @@ - array( - 'Plugins' => 'Плагины', - 'Installed' => 'УÑтановленные', - 'Install New' => 'УÑтановить новые', - 'Actions' => 'ДейÑтвиÑ', - 'Name' => 'Ðазвание', - 'Description' => 'ОпиÑание', - 'Delete' => 'Удалить', - 'Delete plugin :plugin' => 'Удалить плагин :plugin', - 'This plugin does not exist' => 'Такого плагина не ÑущеÑтвует', - 'Version' => 'ВерÑиÑ', - 'Author' => 'Ðвтор', - 'Get More Plugins' => 'Скачать другие плагины', - 'Install' => 'УÑтановить', - 'Uninstall' => 'Удалить', - 'README.md not found' => 'README.md не найден', - 'Info' => 'Инфо', - 'Upload' => 'Загрузить', - 'Drop File Here' => 'Перетащите файл Ñюда', - ) - ); diff --git a/plugins/box/plugins/languages/sk.lang.php b/plugins/box/plugins/languages/sk.lang.php deleted file mode 100644 index e09265c..0000000 --- a/plugins/box/plugins/languages/sk.lang.php +++ /dev/null @@ -1,21 +0,0 @@ - array( - 'Plugins' => 'Pluginy', - 'Name' => 'Názov', - 'Actions' => 'Akcie', - 'Description' => 'Popis', - 'Installed' => 'NainÅ¡talované', - 'Install New' => 'InÅ¡talovaÅ¥ nový', - 'Delete' => 'VymazaÅ¥', - 'Delete plugin :plugin' => 'VymazaÅ¥ plugin :plugin', - 'This plugin does not exist' => 'Tento plugin neexistuje', - 'Version' => 'Verzia', - 'Author' => 'Autor', - 'Get More Plugins' => 'ZískaÅ¥ viacej pluginov', - 'Install' => 'InÅ¡talovaÅ¥', - 'Uninstall' => 'OdinÅ¡talovaÅ¥', - 'README.md not found' => 'README.md not found', - ) - ); diff --git a/plugins/box/plugins/languages/sr.lang.php b/plugins/box/plugins/languages/sr.lang.php deleted file mode 100644 index cc54c12..0000000 --- a/plugins/box/plugins/languages/sr.lang.php +++ /dev/null @@ -1,21 +0,0 @@ - array( - 'Plugins' => 'Dodaci', - 'Name' => 'Ime', - 'Actions' => 'Akcije', - 'Description' => 'Opis', - 'Installed' => 'Instalirani', - 'Install New' => 'Instaliraj novi', - 'Delete' => 'ObriÅ¡i', - 'Delete plugin :plugin' => 'ObriÅ¡i dodatak :plugin', - 'This plugin does not exist' => 'Ovaj dodatak ne postoji', - 'Version' => 'Verzija', - 'Author' => 'Autor', - 'Get More Plugins' => 'Dodaj joÅ¡ dodataka', - 'Install' => 'Instaliraj', - 'Uninstall' => 'Deinstaliraj', - 'README.md not found' => 'README.md Nije naÄ‘eno', - ) - ); diff --git a/plugins/box/plugins/languages/tr.lang.php b/plugins/box/plugins/languages/tr.lang.php deleted file mode 100644 index f5c1dd9..0000000 --- a/plugins/box/plugins/languages/tr.lang.php +++ /dev/null @@ -1,20 +0,0 @@ - array( - 'Plugins' => 'Eklentiler', - 'Name' => 'Ad', - 'Actions' => 'İşlemler', - 'Description' => 'Açıklama', - 'Installed' => 'Yüklenenler', - 'Install New' => 'Yeni Yükle', - 'Delete' => 'Sil', - 'Delete plugin :plugin' => ':plugin adlı eklenti silinsin mi', - 'This plugin does not exist' => 'Eklenti bulunamadı', - 'Version' => 'Sürüm', - 'Author' => 'Yazar', - 'Get More Plugins' => 'Daha Fazla Eklenti', - 'Install' => 'Yükle', - 'Uninstall' => 'Kaldır', - ) - ); diff --git a/plugins/box/plugins/languages/uk.lang.php b/plugins/box/plugins/languages/uk.lang.php deleted file mode 100644 index 3f75ad0..0000000 --- a/plugins/box/plugins/languages/uk.lang.php +++ /dev/null @@ -1,24 +0,0 @@ - array( - 'Plugins' => 'Плагіни', - 'Installed' => 'Ð’Ñтановлені', - 'Install New' => 'Ð’Ñтановити нові', - 'Actions' => 'Дії', - 'Name' => 'Ðазва', - 'Description' => 'ОпиÑ', - 'Delete' => 'Видалити', - 'Delete plugin :plugin' => 'Видалити плагін :plugin', - 'This plugin does not exist' => 'Такий плагін не Ñ–Ñнує', - 'Version' => 'ВерÑÑ–Ñ', - 'Author' => 'Ðвтор', - 'Get More Plugins' => 'Завантажити інші плагіни', - 'Install' => 'Ð’Ñтановити', - 'Uninstall' => 'Видалити', - 'README.md not found' => 'README.md не знайдено', - 'Info' => 'Інфо', - 'Upload' => 'Завантажити', - 'Drop File Here' => 'ПеренеÑіть файл Ñюди', - ) - ); diff --git a/plugins/box/plugins/languages/zh-cn.lang.php b/plugins/box/plugins/languages/zh-cn.lang.php deleted file mode 100644 index 4f2fcf9..0000000 --- a/plugins/box/plugins/languages/zh-cn.lang.php +++ /dev/null @@ -1,20 +0,0 @@ - array( - 'Plugins' => 'æ’ä»¶', - 'Name' => 'åç§°', - 'Actions' => 'æ“作', - 'Description' => 'æè¿°', - 'Installed' => '已安装', - 'Install New' => '安装新æ’ä»¶', - 'Delete' => '删除', - 'Delete plugin :plugin' => '删除æ’ä»¶ :plugin', - 'This plugin does not exist' => 'æ­¤æ’ä»¶ä¸å­˜åœ¨', - 'Version' => '版本', - 'Author' => '作者', - 'Get More Plugins' => 'èŽ·å–æ›´å¤šæ’ä»¶', - 'Install' => '安装', - 'Uninstall' => 'å¸è½½', - ) - ); diff --git a/plugins/box/plugins/plugins.admin.php b/plugins/box/plugins/plugins.admin.php deleted file mode 100755 index 7416466..0000000 --- a/plugins/box/plugins/plugins.admin.php +++ /dev/null @@ -1,243 +0,0 @@ -deleteWhere('[name="'.Request::get('delete_plugin').'"]'); - - // Redirect - Request::redirect('index.php?id=plugins'); - } - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - } - - // Install new plugin - // ------------------------------------- - if (Request::get('install')) { - - if (Security::check(Request::get('token'))) { - - // Load plugin install xml file - $plugin_xml = XML::loadFile(PLUGINS . DS . basename(Text::lowercase(Request::get('install')), '.manifest.xml') . DS . 'install' . DS . Request::get('install')); - - // Add plugin to plugins table - $plugins->insert(array('name' => basename(Request::get('install'), '.manifest.xml'), - 'location' => (string) $plugin_xml->plugin_location, - 'status' => (string) $plugin_xml->plugin_status, - 'priority' => (int) $plugin_xml->plugin_priority)); - - // Clean Monstra TMP folder. - Monstra::cleanTmp(); - - Stylesheet::stylesVersionIncrement(); - Javascript::javascriptVersionIncrement(); - - // Run plugin installer file - $plugin_name = str_replace(array("Plugin", ".manifest.xml"), "", Request::get('install')); - if (File::exists(PLUGINS . DS .basename(Text::lowercase(Request::get('install')), '.manifest.xml') . DS . 'install' . DS . $plugin_name . '.install.php')) { - include PLUGINS . DS . basename(Text::lowercase(Request::get('install')), '.manifest.xml') . DS . 'install' . DS . $plugin_name . '.install.php'; - } - - Request::redirect('index.php?id=plugins'); - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - } - - // Delete plugin from server - // ------------------------------------- - if (Request::get('delete_plugin_from_server')) { - - if (Security::check(Request::get('token'))) { - - // Clean Monstra TMP folder. - Monstra::cleanTmp(); - - Stylesheet::stylesVersionIncrement(); - Javascript::javascriptVersionIncrement(); - - Dir::delete(PLUGINS . DS . basename(Request::get('delete_plugin_from_server'), '.manifest.xml')); - Request::redirect('index.php?id=plugins'); - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - - } - - - // Upload & extract plugin archive - // ------------------------------------- - if (Request::post('upload_file')) { - - if (Security::check(Request::post('csrf'))) { - - if ($_FILES['file']) { - if (in_array(File::ext($_FILES['file']['name']), array('zip'))) { - - $tmp_dir = ROOT . DS .'tmp'. DS . uniqid('plugin_'); - - $error = 'Plugin was not uploaded'; - - if (Dir::create($tmp_dir)) { - $file_locations = Zip::factory()->extract($_FILES['file']['tmp_name'], $tmp_dir); - if (!empty($file_locations)) { - - $manifest = ''; - foreach ($file_locations as $filepath) { - if (substr($filepath, -strlen('.manifest.xml')) === '.manifest.xml') { - $manifest = $filepath; - break; - } - } - - if (!empty($manifest) && basename(dirname($manifest)) === 'install') { - $manifest_file = pathinfo($manifest, PATHINFO_BASENAME); - $plugin_name = str_replace('.manifest.xml', '', $manifest_file); - - if (Dir::create(PLUGINS . DS . $plugin_name)) { - $tmp_plugin_dir = dirname(dirname($manifest)); - Dir::copy($tmp_plugin_dir, PLUGINS . DS . $plugin_name); - Notification::set('success', __('Plugin was uploaded', 'plugins')); - $error = false; - } - } - } - } else { - $error = 'System error'; - } - } else { - $error = 'Forbidden plugin file type'; - } - } else { - $error = 'Plugin was not uploaded'; - } - - if ($error) { - Notification::set('error', __($error, 'plugins')); - } - - if (Request::post('dragndrop')) { - Request::shutdown(); - } else { - Request::redirect($site_url.'/admin/index.php?id=plugins#installnew'); - } - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - } - - // Installed plugins - $plugins_installed = array(); - - // New plugins - $plugins_new = array(); - - // Plugins to install - $plugins_to_intall = array(); - - // Scan plugins directory for .manifest.xml - $plugins_new = File::scan(PLUGINS, '.manifest.xml'); - - // Get installed plugins from plugins table - $plugins_installed = $plugins->select(null, 'all', null, array('location', 'priority'), 'priority', 'ASC'); - - // Update $plugins_installed array. extract plugins names - foreach ($plugins_installed as $plg) { - $_plg[] = basename($plg['location'], 'plugin.php').'manifest.xml'; - } - - // Diff - $plugins_to_install = array_diff($plugins_new, $_plg); - - // Create array of plugins to install - $count = 0; - foreach ($plugins_to_install as $plugin) { - $plg_path = PLUGINS . DS . Text::lowercase(basename($plugin, '.manifest.xml')) . DS . 'install' . DS . $plugin; - if (file_exists($plg_path)) { - $plugins_to_intall[$count]['path'] = $plg_path; - $plugins_to_intall[$count]['plugin'] = $plugin; - $count++; - } - } - - // Draw template - View::factory('box/plugins/views/backend/index') - ->assign('installed_plugins', $installed_plugins) - ->assign('plugins_to_intall', $plugins_to_intall) - ->assign('_users_plugins', $_users_plugins) - ->assign('fileuploader', array( - 'uploadUrl' => $site_url.'/admin/index.php?id=plugins', - 'csrf' => Security::token(), - 'errorMsg' => __('Upload server error', 'filesmanager') - )) - ->display(); - } - - /** - * _readmeLoadAjax - */ - public static function _readmeLoadAjax() { - if (Request::post('readme_plugin')) { - if (File::exists($file = PLUGINS . DS . Request::post('readme_plugin') . DS . 'README.md')) { - echo Text::toHtml(markdown(Html::toText(File::getContent($file)))); - } else { - echo __('README.md not found', 'plugins'); - } - Request::shutdown(); - } - } - -} diff --git a/plugins/box/plugins/plugins.plugin.php b/plugins/box/plugins/plugins.plugin.php deleted file mode 100644 index 51ced5d..0000000 --- a/plugins/box/plugins/plugins.plugin.php +++ /dev/null @@ -1,29 +0,0 @@ - - -
    - - - - - -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    - - - - - - - - -
    - - 'btn btn-info hidden-sm hidden-md readme_plugin', 'data-toggle' => 'modal', 'data-target' => '#readme', 'readme_plugin' => $plugin['id'])); - ?> - - 'btn btn-danger', 'onclick' => "return confirmDelete('".__('Delete plugin :plugin', 'plugins', array(':plugin' => $plugin['title']))."')")); - ?> -
    -
    -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - -
    - plugin_name; ?> - - plugin_description; ?> - - plugin_author; ?> - - plugin_version; ?> - -
    - - 'btn btn-info readme_plugin', 'data-toggle' => 'modal', 'data-target' => '#readme', 'readme_plugin' => basename($plug['plugin'], '.manifest.xml'))); - ?> - - 'btn btn-primary')); ?> - 'btn btn-danger', 'onclick' => "return confirmDelete('".__('Delete plugin :plugin', 'plugins', array(':plugin' => $plugin_xml->plugin_name))."')")); - ?> -
    -
    -
    - - -
    -
    - 'multipart/form-data', 'class' => 'form-inline')). - Form::hidden('csrf', Security::token()) - ); - ?> -
    - - 'btn btn-primary')). - Form::close() - ); - ?> - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - - -
    - - -
    - -
    - - - - - - diff --git a/plugins/box/sitemap/install/sitemap.manifest.xml b/plugins/box/sitemap/install/sitemap.manifest.xml deleted file mode 100644 index 126231c..0000000 --- a/plugins/box/sitemap/install/sitemap.manifest.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - plugins/box/sitemap/sitemap.plugin.php - active - 10 - Sitemap - Show sitemap - 1.0.0 - Awilum - http://monstra.org/ - diff --git a/plugins/box/sitemap/languages/cs.lang.php b/plugins/box/sitemap/languages/cs.lang.php deleted file mode 100644 index 4b63f14..0000000 --- a/plugins/box/sitemap/languages/cs.lang.php +++ /dev/null @@ -1,7 +0,0 @@ - array( - 'Sitemap' => 'Mapa webu', - ) - ); diff --git a/plugins/box/sitemap/languages/de.lang.php b/plugins/box/sitemap/languages/de.lang.php deleted file mode 100644 index 6c6d8aa..0000000 --- a/plugins/box/sitemap/languages/de.lang.php +++ /dev/null @@ -1,7 +0,0 @@ - array( - 'Sitemap' => 'Sitemap', - ) - ); diff --git a/plugins/box/sitemap/languages/en.lang.php b/plugins/box/sitemap/languages/en.lang.php deleted file mode 100644 index 6c6d8aa..0000000 --- a/plugins/box/sitemap/languages/en.lang.php +++ /dev/null @@ -1,7 +0,0 @@ - array( - 'Sitemap' => 'Sitemap', - ) - ); diff --git a/plugins/box/sitemap/languages/es.lang.php b/plugins/box/sitemap/languages/es.lang.php deleted file mode 100644 index b0b1fb8..0000000 --- a/plugins/box/sitemap/languages/es.lang.php +++ /dev/null @@ -1,7 +0,0 @@ - array( - 'Sitemap' => 'Mapa del sitio', - ) - ); \ No newline at end of file diff --git a/plugins/box/sitemap/languages/fa.lang.php b/plugins/box/sitemap/languages/fa.lang.php deleted file mode 100644 index 6e7dae6..0000000 --- a/plugins/box/sitemap/languages/fa.lang.php +++ /dev/null @@ -1,7 +0,0 @@ - array( - 'Sitemap' => 'نقشه سایت', - ) - ); diff --git a/plugins/box/sitemap/languages/fr.lang.php b/plugins/box/sitemap/languages/fr.lang.php deleted file mode 100644 index fc10bc8..0000000 --- a/plugins/box/sitemap/languages/fr.lang.php +++ /dev/null @@ -1,7 +0,0 @@ - array( - 'Sitemap' => 'Plan du site', - ) - ); \ No newline at end of file diff --git a/plugins/box/sitemap/languages/hu.lang.php b/plugins/box/sitemap/languages/hu.lang.php deleted file mode 100644 index 8cdd06b..0000000 --- a/plugins/box/sitemap/languages/hu.lang.php +++ /dev/null @@ -1,7 +0,0 @@ - array( - 'Sitemap' => 'Oldaltérkép', - ) - ); diff --git a/plugins/box/sitemap/languages/it.lang.php b/plugins/box/sitemap/languages/it.lang.php deleted file mode 100644 index 6c6d8aa..0000000 --- a/plugins/box/sitemap/languages/it.lang.php +++ /dev/null @@ -1,7 +0,0 @@ - array( - 'Sitemap' => 'Sitemap', - ) - ); diff --git a/plugins/box/sitemap/languages/ja.lang.php b/plugins/box/sitemap/languages/ja.lang.php deleted file mode 100644 index 8be775a..0000000 --- a/plugins/box/sitemap/languages/ja.lang.php +++ /dev/null @@ -1,7 +0,0 @@ - array( - 'Sitemap' => 'サイトマップ', - ) - ); diff --git a/plugins/box/sitemap/languages/ka-ge.lang.php b/plugins/box/sitemap/languages/ka-ge.lang.php deleted file mode 100644 index b541bf0..0000000 --- a/plugins/box/sitemap/languages/ka-ge.lang.php +++ /dev/null @@ -1,7 +0,0 @@ - array( - 'Sitemap' => 'სáƒáƒ˜áƒ¢áƒ˜áƒ¡ რუქáƒ', - ) - ); diff --git a/plugins/box/sitemap/languages/lt.lang.php b/plugins/box/sitemap/languages/lt.lang.php deleted file mode 100644 index 6c6d8aa..0000000 --- a/plugins/box/sitemap/languages/lt.lang.php +++ /dev/null @@ -1,7 +0,0 @@ - array( - 'Sitemap' => 'Sitemap', - ) - ); diff --git a/plugins/box/sitemap/languages/nl.lang.php b/plugins/box/sitemap/languages/nl.lang.php deleted file mode 100644 index 6c6d8aa..0000000 --- a/plugins/box/sitemap/languages/nl.lang.php +++ /dev/null @@ -1,7 +0,0 @@ - array( - 'Sitemap' => 'Sitemap', - ) - ); diff --git a/plugins/box/sitemap/languages/pl.lang.php b/plugins/box/sitemap/languages/pl.lang.php deleted file mode 100644 index 71ad352..0000000 --- a/plugins/box/sitemap/languages/pl.lang.php +++ /dev/null @@ -1,7 +0,0 @@ - array( - 'Sitemap' => 'Mapa witryny', - ) - ); diff --git a/plugins/box/sitemap/languages/pt-br.lang.php b/plugins/box/sitemap/languages/pt-br.lang.php deleted file mode 100644 index 549f360..0000000 --- a/plugins/box/sitemap/languages/pt-br.lang.php +++ /dev/null @@ -1,7 +0,0 @@ - array( - 'Sitemap' => 'Mapa do site', - ) - ); diff --git a/plugins/box/sitemap/languages/ru.lang.php b/plugins/box/sitemap/languages/ru.lang.php deleted file mode 100644 index 9f30327..0000000 --- a/plugins/box/sitemap/languages/ru.lang.php +++ /dev/null @@ -1,7 +0,0 @@ - array( - 'Sitemap' => 'Карта Ñайта', - ) - ); diff --git a/plugins/box/sitemap/languages/sk.lang.php b/plugins/box/sitemap/languages/sk.lang.php deleted file mode 100644 index 6fb83ac..0000000 --- a/plugins/box/sitemap/languages/sk.lang.php +++ /dev/null @@ -1,7 +0,0 @@ - array( - 'Sitemap' => 'Mapa webstánky', - ) - ); diff --git a/plugins/box/sitemap/languages/sr.lang.php b/plugins/box/sitemap/languages/sr.lang.php deleted file mode 100644 index 4547d31..0000000 --- a/plugins/box/sitemap/languages/sr.lang.php +++ /dev/null @@ -1,7 +0,0 @@ - array( - 'Sitemap' => 'Mapa sajta', - ) - ); diff --git a/plugins/box/sitemap/languages/tr.lang.php b/plugins/box/sitemap/languages/tr.lang.php deleted file mode 100644 index 0cd2cc2..0000000 --- a/plugins/box/sitemap/languages/tr.lang.php +++ /dev/null @@ -1,7 +0,0 @@ - array( - 'Sitemap' => 'Site Haritası', - ) - ); diff --git a/plugins/box/sitemap/languages/uk.lang.php b/plugins/box/sitemap/languages/uk.lang.php deleted file mode 100644 index ab3f305..0000000 --- a/plugins/box/sitemap/languages/uk.lang.php +++ /dev/null @@ -1,7 +0,0 @@ - array( - 'Sitemap' => 'Мапа Ñайту', - ) - ); diff --git a/plugins/box/sitemap/languages/zh-cn.lang.php b/plugins/box/sitemap/languages/zh-cn.lang.php deleted file mode 100644 index eeabdb5..0000000 --- a/plugins/box/sitemap/languages/zh-cn.lang.php +++ /dev/null @@ -1,7 +0,0 @@ - array( - 'Sitemap' => '网站地图', - ) - ); diff --git a/plugins/box/sitemap/sitemap.plugin.php b/plugins/box/sitemap/sitemap.plugin.php deleted file mode 100644 index 8ea39a5..0000000 --- a/plugins/box/sitemap/sitemap.plugin.php +++ /dev/null @@ -1,121 +0,0 @@ -assign('pages_list', Pages::getPages()) - ->assign('components', Sitemap::getComponents()) - ->render(); - } - - /** - * Create sitemap - */ - public static function create() - { - // Get pages list - $pages_list = Pages::getPages(); - - // Create sitemap content - $map = ''."\n"; - $map .= ''."\n"; - foreach ($pages_list as $page) { - if ($page['parent'] != '') { $parent = $page['parent'].'/'; $priority = '0.5'; } else { $parent = ''; $priority = '1.0'; } - $map .= "\t".''."\n\t\t".''.Option::get('siteurl').'/'.$parent.$page['slug'].''."\n\t\t".''.date("Y-m-d", (int) $page['date']).''."\n\t\t".'weekly'."\n\t\t".''.$priority.''."\n\t".''."\n"; - } - - // Get list of components - $components = Sitemap::getComponents(); - - // Add components to sitemap - if (count($components) > 0) { - foreach ($components as $component) { - $map .= "\t".''."\n\t\t".''.Option::get('siteurl').'/'.Text::lowercase($component).''."\n\t\t".''.date("Y-m-d", time()).''."\n\t\t".'weekly'."\n\t\t".'1.0'."\n\t".''."\n"; - } - } - - // Close sitemap - $map .= ''; - - // Save sitemap - return File::setContent(ROOT . DS . 'sitemap.xml', $map); - } - - /** - * Get components - */ - protected static function getComponents() - { - $components = array(); - - if (count(Plugin::$components) > 0) { - foreach (Plugin::$components as $component) { - if ( ! in_array($component, Sitemap::$forbidden_components)) $components[] = Text::lowercase($component); - } - } - - return $components; - } - -} diff --git a/plugins/box/sitemap/views/frontend/index.view.php b/plugins/box/sitemap/views/frontend/index.view.php deleted file mode 100644 index 5c732ca..0000000 --- a/plugins/box/sitemap/views/frontend/index.view.php +++ /dev/null @@ -1,47 +0,0 @@ - -
      - 0) { - $children_started = false; - $first = true; - foreach ($pages_list as $page) { - - if (trim($page['parent']) === '' && $children_started) { - $children_started = false; - $sitemap_html .= "
    \n"; - } elseif(!$first && (trim($page['parent']) !== '' && $children_started || trim($page['parent']) === '')) { - $sitemap_html .= "\n"; - } - - if (trim($page['parent']) !== '') $parent = $page['parent'].'/'; else $parent = ''; - if (trim($page['parent']) !== '' && !$children_started) { - $children_started = true; - $sitemap_html .= "
      \n"; - } - $sitemap_html .= '
    • '.$page['title'].''; - $first = false; - } - if (trim($page['parent']) === '' && $children_started) { - $sitemap_html .= "
    \n"; - } else { - $sitemap_html .= "\n"; - } - } - - - - // Display components - if (count($components) > 0) { - foreach ($components as $component) { - $sitemap_html .= '
  • '.__(ucfirst($component), $component).'
  • '."\n"; - } - } - - echo $sitemap_html; - -?> - diff --git a/plugins/box/snippets/install/snippets.manifest.xml b/plugins/box/snippets/install/snippets.manifest.xml deleted file mode 100644 index 8546642..0000000 --- a/plugins/box/snippets/install/snippets.manifest.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - plugins/box/snippets/snippets.plugin.php - active - 6 - Snippets - Snippets manager plugin - 1.0.0 - Awilum - http://monstra.org/ - diff --git a/plugins/box/snippets/js/.htaccess b/plugins/box/snippets/js/.htaccess deleted file mode 100644 index b9f48ac..0000000 --- a/plugins/box/snippets/js/.htaccess +++ /dev/null @@ -1,2 +0,0 @@ -Options -Indexes -Allow from all \ No newline at end of file diff --git a/plugins/box/snippets/js/snippets.js b/plugins/box/snippets/js/snippets.js deleted file mode 100644 index 6cdf9d3..0000000 --- a/plugins/box/snippets/js/snippets.js +++ /dev/null @@ -1,18 +0,0 @@ -if (typeof $.monstra == 'undefined') $.monstra = {}; - -$.monstra.snippets = { - - init: function() { }, - - showEmbedCodes: function(name) { - $('#shortcode').html('{snippet get="'+name+'"}'); - $('#phpcode').html('<?php echo Snippet::get("'+name+'"); ?>'); - $('#embedCodes').modal(); - } - -}; - - -$(document).ready(function(){ - $.monstra.snippets.init(); -}); \ No newline at end of file diff --git a/plugins/box/snippets/languages/cs.lang.php b/plugins/box/snippets/languages/cs.lang.php deleted file mode 100644 index 38bc8b7..0000000 --- a/plugins/box/snippets/languages/cs.lang.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'Snippets' => 'Snippets / doplňky', - 'Snippets manager' => 'Manažer Snippets', - 'Actions' => 'Akce', - 'Delete' => 'Vymazat', - 'Edit' => 'Editovat', - 'Name' => 'Název', - 'Create New Snippet' => 'VytvoÅ™it nový snippet', - 'New Snippet' => 'Nový snippet', - 'Edit Snippet' => 'Editovat snippet', - 'Save' => 'Uložit', - 'Save and Exit' => 'Uložit a ukonÄit', - 'This snippet already exists' => 'Tento snippet už existuje', - 'This snippet does not exist' => 'Tento snippet neexistuje', - 'Delete snippet: :snippet' => 'Vymazat snippet: :snippet', - 'Snippet content' => 'Obsah snippetu', - 'Snippet :name deleted' => 'Snippet :name byl vymazaný', - 'Your changes to the snippet :name have been saved.' => 'VaÅ¡e zmÄ›ny ve snippetu :name byly uložené.', - 'Delete snippet: :snippet' => 'Vymazat snippet: :snippet', - 'Required field' => 'Povinné políÄko', - 'View Embed Code' => 'Zobrazit vložený kód', - 'Embed Code' => 'Vložený Kód', - 'Shortcode' => 'Zkrácený kód', - 'PHP Code' => 'PHP Kód', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/snippets/languages/de.lang.php b/plugins/box/snippets/languages/de.lang.php deleted file mode 100644 index b2c1602..0000000 --- a/plugins/box/snippets/languages/de.lang.php +++ /dev/null @@ -1,31 +0,0 @@ - array( - 'Snippets' => 'Snippets', - 'Snippets manager' => 'Snippet Manager', - 'Actions' => 'Aktionen', - 'Delete' => 'Löschen', - 'Edit' => 'Bearbeiten', - 'Name' => 'Name', - 'Create New Snippet' => 'Erstelle neues Snippet', - 'New Snippet' => 'Neues Snippet', - 'Edit Snippet' => 'Bearbeite Snippet', - 'Save' => 'Speichern', - 'Save and Exit' => 'Speichern und Schließen', - 'This field should not be empty' => 'Dieses Feld darf nicht leer sein', - 'This snippet already exists' => 'Dieses Snippet existiert bereits', - 'This snippet does not exist' => 'Dieses Snippet existiert nicht', - 'Delete snippet: :snippet' => 'Lösche Snippet: :snippet', - 'Snippet content' => 'Snippet Inhalt', - 'Snippet :name deleted' => 'Snippet :name wurde gelöscht', - 'Your changes to the snippet :name have been saved.' => 'Deine Änderungen für das Snippet :name wurden gespeichert.', - 'Delete snippet: :snippet' => 'Lösche Snippet: :snippet', - 'Required field' => 'Pflichtfeld', - 'View Embed Code' => 'Zeige Embed Code', - 'Embed Code' => 'Embed Code', - 'Shortcode' => 'Shortcode', - 'PHP Code' => 'PHP Code', - 'Cancel' => 'Abbrechen', - ) - ); diff --git a/plugins/box/snippets/languages/en.lang.php b/plugins/box/snippets/languages/en.lang.php deleted file mode 100644 index 38667bf..0000000 --- a/plugins/box/snippets/languages/en.lang.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'Snippets' => 'Snippets', - 'Snippets manager' => 'Snippets manager', - 'Actions' => 'Actions', - 'Delete' => 'Delete', - 'Edit' => 'Edit', - 'Name' => 'Name', - 'Create New Snippet' => 'Create New Snippet', - 'New Snippet' => 'New Snippet', - 'Edit Snippet' => 'Edit Snippet', - 'Save' => 'Save', - 'Save and Exit' => 'Save and Exit', - 'This snippet already exists' => 'This snippet already exists', - 'This snippet does not exist' => 'This snippet does not exist', - 'Delete snippet: :snippet' => 'Delete snippet: :snippet', - 'Snippet content' => 'Snippet content', - 'Snippet :name deleted' => 'Snippet :name deleted', - 'Your changes to the snippet :name have been saved.' => 'Your changes to the snippet :name have been saved.', - 'Delete snippet: :snippet' => 'Delete snippet: :snippet', - 'Required field' => 'Required field', - 'View Embed Code' => 'View Embed Code', - 'Embed Code' => 'Embed Code', - 'Shortcode' => 'Shortcode', - 'PHP Code' => 'PHP Code', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/snippets/languages/es.lang.php b/plugins/box/snippets/languages/es.lang.php deleted file mode 100644 index a353923..0000000 --- a/plugins/box/snippets/languages/es.lang.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'Snippets' => 'Snippets', - 'Snippets manager' => 'Administrador de snippets', - 'Actions' => 'Acciones', - 'Delete' => 'Eliminar', - 'Edit' => 'Editar', - 'Name' => 'Nombre', - 'Create New Snippet' => 'Crear nuevo snippet', - 'New Snippet' => 'Nuevo snippet', - 'Edit Snippet' => 'Editar snippet', - 'Save' => 'Guardar', - 'Save and Exit' => 'Guardar y salir', - 'This snippet already exists' => 'Este snippet ya existe', - 'This snippet does not exist' => 'Este snippet no existe', - 'Delete snippet: :snippet' => 'Eliminar snippet: :snippet', - 'Snippet content' => 'Contenido del snippet', - 'Snippet :name deleted' => 'Snippet :name eliminado', - 'Your changes to the snippet :name have been saved.' => 'Tus cambios realizados en el snippet :name han sido guardados.', - 'Delete snippet: :snippet' => 'Eliminar snippet: :snippet', - 'Required field' => 'Dato requerido', - 'View Embed Code' => 'Ver código incrustado', - 'Embed Code' => 'Código incrustado', - 'Shortcode' => 'Código corto', - 'PHP Code' => 'Código PHP', - 'Cancel' => 'Cancelar', - ) - ); diff --git a/plugins/box/snippets/languages/fa.lang.php b/plugins/box/snippets/languages/fa.lang.php deleted file mode 100644 index 87196c4..0000000 --- a/plugins/box/snippets/languages/fa.lang.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'Snippets' => 'کدآماده', - 'Snippets manager' => 'مدیریت کدآماده', - 'Actions' => 'عملیات', - 'Delete' => 'حذÙ', - 'Edit' => 'ویرایش', - 'Name' => 'نام', - 'Create New Snippet' => 'ایجاد کد آماده جدید', - 'New Snippet' => 'کدآماده جدید', - 'Edit Snippet' => 'ویرایش کدآماده', - 'Save' => 'ذخیره', - 'Save and Exit' => 'ذخیره Ùˆ خروج', - 'This snippet already exists' => 'این کدآماده از قبل موجود است', - 'This snippet does not exist' => 'این کدآماده وجود ندارد', - 'Delete snippet: :snippet' => 'حذ٠کدآماده: :snippet', - 'Snippet content' => 'محتوی کدآماده', - 'Snippet :name deleted' => 'کدآماده :name حذ٠شد', - 'Your changes to the snippet :name have been saved.' => 'تغییرات شما بر روی کدآماده :name ذخیره شد.', - 'Delete snippet: :snippet' => 'حذ٠کدآماده: :snippet', - 'Required field' => 'کادر الزامی', - 'View Embed Code' => 'مشاهده کد درج شده', - 'Embed Code' => 'کد درج شده', - 'Shortcode' => 'کدکوتاه', - 'PHP Code' => 'کد PHP', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/snippets/languages/fr.lang.php b/plugins/box/snippets/languages/fr.lang.php deleted file mode 100644 index 3057731..0000000 --- a/plugins/box/snippets/languages/fr.lang.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'Snippets' => 'Snippets', - 'Snippets manager' => 'Gestionnaire de snippets', - 'Actions' => 'Actions', - 'Delete' => 'Supprimer', - 'Edit' => 'Editer', - 'Name' => 'Nom', - 'Create new snippet' => 'Créer un nouveau snippet', - 'New snippet' => 'Nouveau snippet', - 'Edit snippet' => 'Editer le snippet', - 'Save' => 'Enregistrer', - 'Save and exit' => 'Enregistrer et sortir', - 'This snippet already exists' => 'Ce snippet existe déjà', - 'This snippet does not exist' => 'Ce snippet n\\\'existe pas', - 'Delete snippet: :snippet' => 'Supprimer le snippet: :snippet', - 'Snippet content' => 'Contenu du snippet', - 'Snippet :name deleted' => 'Snippet :name supprimé', - 'Your changes to the snippet :name have been saved.' => 'Vos changements pour le snippet :name ont été enregistrés.', - 'Delete snippet: :snippet' => 'Supprimer le snippet: :snippet', - 'Required field' => 'Champs requis', - 'View Embed Code' => 'Voir le code intégré', - 'Embed Code' => 'Code intégré', - 'Shortcode' => 'Code court', - 'PHP Code' => 'Code PHP', - 'Cancel' => 'Cancel', - ) - ); \ No newline at end of file diff --git a/plugins/box/snippets/languages/hu.lang.php b/plugins/box/snippets/languages/hu.lang.php deleted file mode 100644 index efcd0de..0000000 --- a/plugins/box/snippets/languages/hu.lang.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'Snippets' => 'Snippets', - 'Snippets manager' => 'Snippets manager', - 'Actions' => 'Műveletek', - 'Delete' => 'Töröl', - 'Edit' => 'Szerkeszt', - 'Name' => 'Név', - 'Create New Snippet' => 'Új Snippet készítése', - 'New Snippet' => 'Új Snippet', - 'Edit Snippet' => 'Snippet szerkesztése', - 'Save' => 'Mentés', - 'Save and Exit' => 'Mentés és Kilépés', - 'This snippet already exists' => 'Ez a snippet már létezik', - 'This snippet does not exist' => 'Ez a snippet nem létezik', - 'Delete snippet: :snippet' => 'Snippet törlés: :snippet', - 'Snippet content' => 'Snippet tartalom', - 'Snippet :name deleted' => 'A :name Snippet törölve', - 'Your changes to the snippet :name have been saved.' => 'YA változtatások :name elmentve.', - 'Delete snippet: :snippet' => 'Snippet törlés: :snippet', - 'Required field' => 'KötelezÅ‘ mezÅ‘', - 'View Embed Code' => 'View Embed Code', - 'Embed Code' => 'Embed Code', - 'Shortcode' => 'Shortcode', - 'PHP Code' => 'PHP Code', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/snippets/languages/id.lang.php b/plugins/box/snippets/languages/id.lang.php deleted file mode 100644 index 83990bc..0000000 --- a/plugins/box/snippets/languages/id.lang.php +++ /dev/null @@ -1,29 +0,0 @@ - array( - 'Snippets' => 'Snippets', - 'Snippets manager' => 'Pengelolaan Snippets', - 'Actions' => 'Tindakan', - 'Delete' => 'Hapus', - 'Edit' => 'Perbaiki', - 'Name' => 'Nama', - 'Create New Snippet' => 'Buat Snippet Baru', - 'New Snippet' => 'Snippet Baru', - 'Edit snippet' => 'Perbaiki Snippet', - 'Save' => 'Simpan', - 'Save and Exit' => 'Simpan dan Keluar', - 'This snippet already exists' => 'Snippet ini sudah ada', - 'This snippet does not exist' => 'Snippet ini belum ada', - 'Delete snippet: :snippet' => 'Hapus snippet: :snippet', - 'Snippet content' => 'Isi snippet', - 'Snippet :name deleted' => 'Snippet :name dihapus', - 'Your changes to the snippet :name have been saved.' => 'Perubahan pada snippet :name telah disimpan.', - 'Delete snippet: :snippet' => 'Hapus snippet: :snippet', - 'Required field' => 'Isian yang Diperlukan', - 'View Embed Code' => 'Lihat Kodingan yang Disisipkan', - 'Embed Code' => 'Kode Sisipan', - 'Shortcode' => 'Shortcode', - 'PHP Code' => 'PHP Code', - ) - ); diff --git a/plugins/box/snippets/languages/it.lang.php b/plugins/box/snippets/languages/it.lang.php deleted file mode 100644 index 1354614..0000000 --- a/plugins/box/snippets/languages/it.lang.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'Snippets' => 'Snippet', - 'Snippets manager' => 'Gestione snippet', - 'Actions' => 'Azioni', - 'Delete' => 'Elimina', - 'Edit' => 'Modifica', - 'New Snippet' => 'Nuovo snippet', - 'Create New Snippet' => 'Crea nuovo snippet', - 'Name' => 'Nome', - 'Edit Snippet' => 'Modifica snippet', - 'Save' => 'Salva', - 'Save and Exit' => 'Salva ed esci', - 'This snippet already exists' => 'Tale snippet già esistente', - 'This snippet does not exist' => 'Tale snippet non esiste', - 'Delete snippet: :block' => 'Elimina snippet: :snippet', - 'Snippet content' => 'Contenuto del snippet', - 'Snippet :name deleted' => 'Snippet :name eliminato', - 'Your changes to the snippet :name have been saved.' => 'Le modifiche al snippet :name sono state salvate.', - 'Delete snippet: :snippet' => 'Elimina snippet: :snippet', - 'Required field' => 'Campo obbligatorio', - 'View Embed Code' => 'View Embed Code', - 'Embed Code' => 'Embed Code', - 'Shortcode' => 'Shortcode', - 'PHP Code' => 'PHP Code', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/snippets/languages/ja.lang.php b/plugins/box/snippets/languages/ja.lang.php deleted file mode 100644 index a8170b4..0000000 --- a/plugins/box/snippets/languages/ja.lang.php +++ /dev/null @@ -1,29 +0,0 @@ - array( - 'Snippets' => 'スニペット', - 'Snippets manager' => 'スニペットã®ç®¡ç†', - 'Actions' => 'æ“作', - 'Delete' => '削除', - 'Edit' => '編集', - 'Name' => 'åå‰', - 'Create New Snippet' => 'æ–°è¦ã‚¹ãƒ‹ãƒšãƒƒãƒˆã®ä½œæˆ', - 'New Snippet' => 'æ–°è¦ã‚¹ãƒ‹ãƒšãƒƒãƒˆ', - 'Edit Snippet' => 'スニペットã®ç·¨é›†', - 'Save' => 'ä¿å­˜', - 'Save and Exit' => 'ä¿å­˜ã—ã¦çµ‚了', - 'This snippet already exists' => 'スニペットã¯ã™ã§ã«å­˜åœ¨ã—ã¦ã„ã¾ã™', - 'This snippet does not exist' => 'スニペットã¯å­˜åœ¨ã—ã¾ã›ã‚“', - 'Delete snippet: :snippet' => 'スニペットã®å‰Šé™¤: :snippet', - 'Snippet content' => 'スニペットã®å†…容', - 'Snippet :name deleted' => ':name スニペットã¯å‰Šé™¤ã•れã¾ã—ãŸã€‚', - 'Your changes to the snippet :name have been saved.' => ':name スニペットã¸ã®å¤‰æ›´ã¯ä¿å­˜ã•れã¾ã—ãŸã€‚', - 'Delete snippet: :snippet' => 'スニペットã®å‰Šé™¤: :snippet', - 'Required field' => '必須項目', - 'View Embed Code' => '埋ã‚è¾¼ã¿ã‚³ãƒ¼ãƒ‰ã‚’表示', - 'Embed Code' => '埋ã‚è¾¼ã¿ã‚³ãƒ¼ãƒ‰', - 'Shortcode' => 'ショートコード', - 'PHP Code' => 'PHPコード', - ) - ); diff --git a/plugins/box/snippets/languages/ka-ge.lang.php b/plugins/box/snippets/languages/ka-ge.lang.php deleted file mode 100644 index 46a9e3b..0000000 --- a/plugins/box/snippets/languages/ka-ge.lang.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'Snippets' => 'Snippet-ები', - 'Snippets manager' => 'Snippet-ების მენეჯერი', - 'Actions' => 'მáƒáƒ¥áƒ›áƒ”დებáƒ', - 'Delete' => 'წáƒáƒ¨áƒšáƒ', - 'Edit' => 'რედáƒáƒ¥áƒ¢áƒ˜áƒ áƒ”ბáƒ', - 'New Snippet' => 'áƒáƒ®áƒáƒšáƒ˜ Snippet-ი', - 'Create New Snippet' => 'áƒáƒ®áƒáƒšáƒ˜ Snippet-ის შექმნáƒ', - 'Name' => 'სáƒáƒ®áƒ”ლწáƒáƒ“ებáƒ', - 'Edit Snippet' => 'Snippet-ის რედáƒáƒ¥áƒ¢áƒ˜áƒ áƒ”ბáƒ', - 'Save' => 'შენáƒáƒ®áƒ•áƒ', - 'Save and Exit' => 'შენáƒáƒ®áƒ•რდრშემდეგ გáƒáƒ›áƒáƒ¡áƒ•ლáƒ', - 'This snippet already exists' => 'áƒáƒ¡áƒ”თი Snippet-ი უკვე áƒáƒ áƒ¡áƒ”ბáƒáƒ‘ს', - 'This snippet does not exist' => 'áƒáƒ¡áƒ”თი Snippet-ი áƒáƒ  áƒáƒ áƒ¡áƒ”ბáƒáƒ‘ს', - 'Delete snippet: :block' => 'Snippet-ის წáƒáƒ¨áƒšáƒ: :snippet', - 'Snippet content' => 'Snippet-ის შედგენილáƒáƒ‘áƒ', - 'Snippet :name deleted' => 'Snippet-ი :name წáƒáƒ¨áƒšáƒ˜áƒšáƒ˜áƒ', - 'Your changes to the snippet :name have been saved.' => 'თქვენი ცვლილებები Snippet-ის მიმáƒáƒ áƒ— :name შენáƒáƒ®áƒ£áƒšáƒ˜áƒ.', - 'Delete snippet: :snippet' => 'Snippet-ის წáƒáƒ¨áƒšáƒ: :snippet', - 'Required field' => 'áƒáƒ£áƒªáƒ˜áƒšáƒ”ბელი ველი', - 'View Embed Code' => 'ჩáƒáƒ¡áƒáƒ¬áƒ”რი კáƒáƒ“ი', - 'Embed Code' => 'ჩáƒáƒ¡áƒáƒ¬áƒ”რი კáƒáƒ“ი', - 'Shortcode' => 'Shortcode-ი', - 'PHP Code' => 'PHP კáƒáƒ“ი', - 'Cancel' => 'გáƒáƒ£áƒ¥áƒ›áƒ”ბáƒ', - ) - ); diff --git a/plugins/box/snippets/languages/lt.lang.php b/plugins/box/snippets/languages/lt.lang.php deleted file mode 100644 index e3f5eb0..0000000 --- a/plugins/box/snippets/languages/lt.lang.php +++ /dev/null @@ -1,29 +0,0 @@ - array( - 'Snippets' => 'Fragmentai', - 'Snippets manager' => 'Fragmentų tvarkyklÄ—', - 'Actions' => 'Veiksmai', - 'Delete' => 'IÅ¡trinti', - 'Edit' => 'Redaguoti', - 'Name' => 'Pavadinimas', - 'Create New Snippet' => 'Kurti naujÄ… fragmentÄ…', - 'New Snippet' => 'Naujas fragmentas', - 'Edit Snippet' => 'Redaguoti fragmentÄ…', - 'Save' => 'IÅ¡saugoti', - 'Save and Exit' => 'IÅ¡saugoti ir iÅ¡eiti', - 'Required field' => 'Privalomas laukas', - 'This snippet already exists' => 'Toks fragmentas jau yra', - 'This snippet does not exist' => 'Tokio fragmento nÄ—ra', - 'Delete snippet: :snippet' => 'IÅ¡trinti fragmentÄ… :snippet', - 'Snippet content' => 'Fragmento turinys', - 'Snippet :name deleted' => 'Fragmentas :name iÅ¡trintas', - 'Your changes to the snippet :name have been saved.' => 'Fragmento :name pakeitimai iÅ¡saugoti.', - 'View Embed Code' => 'View Embed Code', - 'Embed Code' => 'Embed Code', - 'Shortcode' => 'Shortcode', - 'PHP Code' => 'PHP Code', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/snippets/languages/nl.lang.php b/plugins/box/snippets/languages/nl.lang.php deleted file mode 100644 index 111ef08..0000000 --- a/plugins/box/snippets/languages/nl.lang.php +++ /dev/null @@ -1,31 +0,0 @@ - array( - 'Snippets' => 'Snippets', - 'Snippets manager' => 'Snippet Beheer', - 'Actions' => 'Acties', - 'Delete' => 'Verwijderen', - 'Edit' => 'Bewerken', - 'Name' => 'Naam', - 'Create New Snippet' => 'Nieuwe Snippet', - 'New Snippet' => 'Nieuwe snippet', - 'Edit Snippet' => 'Bewerk snippet', - 'Save' => 'Opslaan', - 'Save and Exit' => 'Opslaan en Terug', - 'This field should not be empty' => 'Dit veld mag niet leeg zijn', - 'This snippet already exists' => 'Deze snippet bestaat al', - 'This snippet does not exist' => 'Deze snippet bestaat niet', - 'Delete snippet: :snippet' => 'Verwijder snippet: :snippet', - 'Snippet content' => 'Snippet inhoud', - 'Snippet :name deleted' => 'Snippet :name is verwijderd', - 'Your changes to the snippet :name have been saved.' => 'De wijzigingen aan snippet :name zijn opgeslagen.', - 'Delete snippet: :snippet' => 'Verwijder snippet: :snippet', - 'Required field' => 'Vereist veld', - 'View Embed Code' => 'Bekijk Insluitcode', - 'Embed Code' => 'Insluitcode', - 'Shortcode' => 'Korte code', - 'PHP Code' => 'PHP Code', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/snippets/languages/pl.lang.php b/plugins/box/snippets/languages/pl.lang.php deleted file mode 100644 index 13d6076..0000000 --- a/plugins/box/snippets/languages/pl.lang.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'Snippets' => 'Skrawki (snippets)', - 'Snippets manager' => 'ZarzÄ…dzaj skrawkami', - 'Actions' => 'Akcje', - 'Delete' => 'UsuÅ„', - 'Edit' => 'Edytuj', - 'Name' => 'Nazwa', - 'Create New Snippet' => 'Utwórz nowy skrawek', - 'New Snippet' => 'Nowy skrawek', - 'Edit Snippet' => 'Edytuj skrawek', - 'Save' => 'Zapisz', - 'Save and Exit' => 'Zapisz i wyjdź', - 'This snippet already exists' => 'Ten skrawek już istnieje', - 'This snippet does not exist' => 'Ten skrawek nie istnieje', - 'Delete snippet: :snippet' => 'Czy napewno usunąć skrawek: :snippet', - 'Snippet content' => 'Zawartość skrawka', - 'Snippet :name deleted' => 'Skrawek :name zostaÅ‚ usuniÄ™ty', - 'Your changes to the snippet :name have been saved.' => 'Twoje zmiany dla skrawka :name zostaÅ‚y zapisane.', - 'Delete snippet: :snippet' => 'Czy napewno usunąć skrawek: :snippet', - 'Required field' => 'Pole wymagane', - 'View Embed Code' => 'Pokaż osadzony kod', - 'Embed Code' => 'Osadzony kod', - 'Shortcode' => 'Krótki kod (shortcode)', - 'PHP Code' => 'Kod PHP', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/snippets/languages/pt-br.lang.php b/plugins/box/snippets/languages/pt-br.lang.php deleted file mode 100644 index 659c9c7..0000000 --- a/plugins/box/snippets/languages/pt-br.lang.php +++ /dev/null @@ -1,31 +0,0 @@ - array( - 'Snippets' => 'Códigos', - 'Snippets manager' => 'Gerenciador de códigos', - 'Actions' => 'Ações', - 'Delete' => 'Deletar', - 'Edit' => 'Editar', - 'Name' => 'Nome', - 'Create New Snippet' => 'Criar novo código', - 'New Snippet' => 'Novo código', - 'Edit Snippet' => 'Editar código', - 'Save' => 'Salvar', - 'Save and Exit' => 'Salvar e sair', - 'This field should not be empty' => 'Este campo não pode estar vazio', - 'This snippet already exists' => 'Este código já existe', - 'This snippet does not exist' => 'Este código não existe', - 'Delete snippet: :snippet' => 'Deletar o código: :snippet', - 'Snippet content' => 'Conteúdo do código', - 'Snippet :name deleted' => 'Código :name deletado', - 'Your changes to the snippet :name have been saved.' => 'Suas alterações no código :name foram salvas', - 'Delete snippet: :snippet' => 'Deletar o código: :snippet', - 'Required field' => 'Campo requerido', - 'View Embed Code' => 'View Embed Code', - 'Embed Code' => 'Embed Code', - 'Shortcode' => 'Shortcode', - 'PHP Code' => 'PHP Code', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/snippets/languages/ru.lang.php b/plugins/box/snippets/languages/ru.lang.php deleted file mode 100644 index 779e9bd..0000000 --- a/plugins/box/snippets/languages/ru.lang.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'Snippets' => 'Сниппеты', - 'Snippets manager' => 'Менеджер Ñниппетов', - 'Actions' => 'ДейÑтвиÑ', - 'Delete' => 'Удалить', - 'Edit' => 'Редактировать', - 'New Snippet' => 'Ðовый Ñниппет', - 'Create New Snippet' => 'Создать новый Ñниппет', - 'Name' => 'Ðазвание', - 'Edit Snippet' => 'Редактирование Ñниппета', - 'Save' => 'Сохранить', - 'Save and Exit' => 'Сохранить и выйти', - 'This snippet already exists' => 'Такой Ñниппет уже ÑущеÑтвует', - 'This snippet does not exist' => 'Такого Ñниппета не ÑущеÑтвует', - 'Delete snippet: :block' => 'Удалить Ñниппет: :snippet', - 'Snippet content' => 'Содержимое Ñниппета', - 'Snippet :name deleted' => 'Сниппет :name удален', - 'Your changes to the snippet :name have been saved.' => 'Ваши Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ðº Ñниппету :name были Ñохранены.', - 'Delete snippet: :snippet' => 'Удалить Ñниппет: :snippet', - 'Required field' => 'ОбÑзательное поле', - 'View Embed Code' => 'Код Ð´Ð»Ñ Ð²Ñтавки', - 'Embed Code' => 'Код Ð´Ð»Ñ Ð²Ñтавки', - 'Shortcode' => 'Шорткод', - 'PHP Code' => 'PHP код', - 'Cancel' => 'Отмена', - ) - ); diff --git a/plugins/box/snippets/languages/sk.lang.php b/plugins/box/snippets/languages/sk.lang.php deleted file mode 100644 index 1cc0095..0000000 --- a/plugins/box/snippets/languages/sk.lang.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'Snippets' => 'Snippets / Doplnky', - 'Snippets manager' => 'Manažér Snippets', - 'Actions' => 'Akcie', - 'Delete' => 'VymazaÅ¥', - 'Edit' => 'EditovaÅ¥', - 'Name' => 'Názov', - 'Create New Snippet' => 'VytvoriÅ¥ nový snippet', - 'New Snippet' => 'Nový snippet', - 'Edit Snippet' => 'EditovaÅ¥ snippet', - 'Save' => 'UložiÅ¥', - 'Save and Exit' => 'UložiÅ¥ a ukonÄiÅ¥', - 'This snippet already exists' => 'Tento snippet už existuje', - 'This snippet does not exist' => 'Tento snippet neexistuje', - 'Delete snippet: :snippet' => 'VymazaÅ¥ snippet: :snippet', - 'Snippet content' => 'Obsah snippet', - 'Snippet :name deleted' => 'Snippet :name bol vymazaný', - 'Your changes to the snippet :name have been saved.' => 'VaÅ¡e zmeny v snippet :name boli uložené.', - 'Delete snippet: :snippet' => 'VymazaÅ¥ snippet: :snippet', - 'Required field' => 'Povinné políÄko', - 'View Embed Code' => 'PozrieÅ¥ vložený kód', - 'Embed Code' => 'Vložený Kód', - 'Shortcode' => 'Skrátený kód', - 'PHP Code' => 'PHP Kód', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/snippets/languages/sr.lang.php b/plugins/box/snippets/languages/sr.lang.php deleted file mode 100644 index f2b3ea4..0000000 --- a/plugins/box/snippets/languages/sr.lang.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'Snippets' => 'Klipovi', - 'Snippets manager' => 'Menadžer klipova', - 'Actions' => 'Akcije', - 'Delete' => 'ObriÅ¡i', - 'Edit' => 'Izmeni', - 'Name' => 'Ime', - 'Create new snippet' => 'Kreiraj novi klip', - 'New snippet' => 'Novi klip', - 'Edit snippet' => 'Izmeni klip', - 'Save' => 'SaÄuvaj', - 'Save and exit' => 'SaÄuvaj i izaÄ‘i', - 'This snippet already exists' => 'Ovaj klip već postoji', - 'This snippet does not exist' => 'Ovaj klip ne postoji', - 'Delete snippet: :snippet' => 'ObriÅ¡i klip: :snippet', - 'Snippet content' => 'Sadržaj klipa', - 'Snippet :name deleted' => 'Klip :name je uspeÅ¡no obrisan', - 'Your changes to the snippet :name have been saved.' => 'Promene na klipu :name su uspeÅ¡no saÄuvane.', - 'Delete snippet: :snippet' => 'ObriÅ¡i klipove: :snippet', - 'Required field' => 'Potrebno polje', - 'View Embed Code' => 'Pogledaj Embed Kod', - 'Embed Code' => 'Embed kod', - 'Shortcode' => 'Kratak kod', - 'PHP Code' => 'PHP kod', - 'Cancel' => 'Otkaži', - ) - ); diff --git a/plugins/box/snippets/languages/tr.lang.php b/plugins/box/snippets/languages/tr.lang.php deleted file mode 100644 index 6938ac4..0000000 --- a/plugins/box/snippets/languages/tr.lang.php +++ /dev/null @@ -1,29 +0,0 @@ - array( - 'Snippets' => 'Betikler', - 'Snippets manager' => 'Betik Yöneticisi', - 'Actions' => 'İşlemler', - 'Delete' => 'Sil', - 'Edit' => 'Düzenle', - 'Name' => 'Ad', - 'Create New Snippet' => 'Yeni Betik OluÅŸtur', - 'New Snippet' => 'Yeni Betik', - 'Edit Snippet' => 'BetiÄŸi Düzenle', - 'Save' => 'Kaydet', - 'Save and Exit' => 'Kaydet ve Çık', - 'This snippet already exists' => 'Bu betik zaten var', - 'This snippet does not exist' => 'Betik bulunamadı', - 'Delete snippet: :snippet' => ':snippet adlı betik silinsin mi', - 'Snippet content' => 'Betik içeriÄŸi', - 'Snippet :name deleted' => ':name adlı betik silindi', - 'Your changes to the snippet :name have been saved.' => 'DeÄŸiÅŸiklikleriniz :name adlı betiÄŸe kaydedildi.', - 'Required field' => 'Zorunlu alan', - 'View Embed Code' => 'Gömülü Kodu Görüntüle', - 'Embed Code' => 'Gömülü Kod', - 'Shortcode' => 'Kısa Kod', - 'PHP Code' => 'PHP Kodu', - 'Cancel' => 'Vazgeç', - ) - ); diff --git a/plugins/box/snippets/languages/uk.lang.php b/plugins/box/snippets/languages/uk.lang.php deleted file mode 100644 index 8df6371..0000000 --- a/plugins/box/snippets/languages/uk.lang.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'Snippets' => 'Сніпети', - 'Snippets manager' => 'Менеджер Ñніпетів', - 'Actions' => 'Дії', - 'Delete' => 'Видалити', - 'Edit' => 'Редагувати', - 'New Snippet' => 'Ðовий Ñніпет', - 'Create New Snippet' => 'Створити новий Ñніпет', - 'Name' => 'Ðазва', - 'Edit Snippet' => 'Ð ÐµÐ´Ð°Ð³ÑƒÐ²Ð°Ð½Ð½Ñ Ñніпета', - 'Save' => 'Зберегти', - 'Save and Exit' => 'Зберегти та вийти', - 'This snippet already exists' => 'Такий Ñніпет вже Ñ–Ñнує', - 'This snippet does not exist' => 'Такий Ñніпет не Ñ–Ñнує', - 'Delete snippet: :block' => 'Видалити Ñніпет: :snippet', - 'Snippet content' => 'ВміÑÑ‚ Ñніпета', - 'Snippet :name deleted' => 'Сніпет :name видалено', - 'Your changes to the snippet :name have been saved.' => 'Ваші зміни до Ñніпету :name були збережені.', - 'Delete snippet: :snippet' => 'Видалити Ñніпет: :snippet', - 'Required field' => 'Обов’Ñзкове поле', - 'View Embed Code' => 'Код Ð´Ð»Ñ Ð²Ñтавки', - 'Embed Code' => 'Код Ð´Ð»Ñ Ð²Ñтавки', - 'Shortcode' => 'Шорткод', - 'PHP Code' => 'PHP код', - 'Cancel' => 'Відмінити', - ) - ); diff --git a/plugins/box/snippets/languages/zh-cn.lang.php b/plugins/box/snippets/languages/zh-cn.lang.php deleted file mode 100644 index cbe0877..0000000 --- a/plugins/box/snippets/languages/zh-cn.lang.php +++ /dev/null @@ -1,29 +0,0 @@ - array( - 'Snippets' => '片段', - 'Snippets manager' => '片段管ç†', - 'Actions' => 'æ“作', - 'Delete' => '删除', - 'Edit' => '编辑', - 'Name' => 'åç§°', - 'Create New Snippet' => '创建新片段', - 'New Snippet' => '新建片段', - 'Edit Snippet' => '编辑片段', - 'Save' => 'ä¿å­˜', - 'Save and Exit' => 'ä¿å­˜å¹¶é€€å‡º', - 'This snippet already exists' => '此片段已存在', - 'This snippet does not exist' => '此片段ä¸å­˜åœ¨', - 'Delete snippet: :snippet' => '删除片段: :snippet', - 'Snippet content' => '片段内容', - 'Snippet :name deleted' => '片段 :name 已删除', - 'Your changes to the snippet :name have been saved.' => 'Y您修改的片段 :name å·²ä¿å­˜ã€‚', - 'Delete snippet: :snippet' => '删除片段: :snippet', - 'Required field' => '必填字段', - 'View Embed Code' => '查看嵌入代ç ', - 'Embed Code' => '嵌入代ç ', - 'Shortcode' => '短代ç ', - 'PHP Code' => 'PHP 代ç ', - ) - ); diff --git a/plugins/box/snippets/snippets.admin.php b/plugins/box/snippets/snippets.admin.php deleted file mode 100755 index fa22bba..0000000 --- a/plugins/box/snippets/snippets.admin.php +++ /dev/null @@ -1,145 +0,0 @@ -:name have been saved.', 'snippets', array(':name' => Security::safeName(Request::post('name'))))); - - if (Request::post('add_snippets_and_exit')) { - Request::redirect('index.php?id=snippets'); - } else { - Request::redirect('index.php?id=snippets&action=edit_snippet&filename='.Security::safeName(Request::post('name'))); - } - } - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - } - // Save fields - if (Request::post('name')) $name = Request::post('name'); else $name = ''; - if (Request::post('content')) $content = Request::post('content'); else $content = ''; - - // Display view - View::factory('box/snippets/views/backend/add') - ->assign('content', $content) - ->assign('name', $name) - ->assign('errors', $errors) - ->display(); - break; - - // Edit snippet - // ------------------------------------- - case "edit_snippet": - // Save current snippet action - if (Request::post('edit_snippets') || Request::post('edit_snippets_and_exit') ) { - - if (Security::check(Request::post('csrf'))) { - - if (trim(Request::post('name')) == '') $errors['snippets_empty_name'] = __('Required field', 'snippets'); - if ((file_exists($snippets_path.Security::safeName(Request::post('name')).'.snippet.php')) and (Security::safeName(Request::post('snippets_old_name')) !== Security::safeName(Request::post('name')))) $errors['snippets_exists'] = __('This snippet already exists', 'snippets'); - - // Save fields - if (Request::post('content')) $content = Request::post('content'); else $content = ''; - if (count($errors) == 0) { - - $snippet_old_filename = $snippets_path.Request::post('snippets_old_name').'.snippet.php'; - $snippet_new_filename = $snippets_path.Security::safeName(Request::post('name')).'.snippet.php'; - if ( ! empty($snippet_old_filename)) { - if ($snippet_old_filename !== $snippet_new_filename) { - rename($snippet_old_filename, $snippet_new_filename); - $save_filename = $snippet_new_filename; - } else { - $save_filename = $snippet_new_filename; - } - } else { - $save_filename = $snippet_new_filename; - } - - // Save snippet - File::setContent($save_filename, Request::post('content')); - - Notification::set('success', __('Your changes to the snippet :name have been saved.', 'snippets', array(':name' => basename($save_filename, '.snippet.php')))); - - if (Request::post('edit_snippets_and_exit')) { - Request::redirect('index.php?id=snippets'); - } else { - Request::redirect('index.php?id=snippets&action=edit_snippet&filename='.Security::safeName(Request::post('name'))); - } - } - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - } - if (Request::post('name')) $name = Request::post('name'); else $name = File::name(Request::get('filename')); - $content = File::getContent($snippets_path.Request::get('filename').'.snippet.php'); - - // Display view - View::factory('box/snippets/views/backend/edit') - ->assign('content', $content) - ->assign('name', $name) - ->assign('errors', $errors) - ->display(); - break; - case "delete_snippet": - - if (Security::check(Request::get('token'))) { - - File::delete($snippets_path.Request::get('filename').'.snippet.php'); - Notification::set('success', __('Snippet :name deleted', 'snippets', array(':name' => File::name(Request::get('filename'))))); - Request::redirect('index.php?id=snippets'); - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - - break; - } - } else { - - // Get snippets - $snippets_list = File::scan($snippets_path, '.snippet.php'); - - // Display view - View::factory('box/snippets/views/backend/index') - ->assign('snippets_list', $snippets_list) - ->display(); - - } - } - -} diff --git a/plugins/box/snippets/snippets.plugin.php b/plugins/box/snippets/snippets.plugin.php deleted file mode 100644 index e19a564..0000000 --- a/plugins/box/snippets/snippets.plugin.php +++ /dev/null @@ -1,101 +0,0 @@ - - * echo Snippet::get('snippetname'); - * echo Snippet::get('snippetname', array('message' => 'Hello World')); - *
    - * - * @param string $name Snippet file name - * @param string $vars Vars - * @return string - */ - public static function get($name, $vars = array()) - { - $vars['get'] = $name; - - return Snippet::_content($vars); - } - - /** - * Returns snippet content for shortcode {snippet get="snippetname"} - * - * - * {snippet get="snippetname"} - * {snippet get="snippetname" message="Hello World"} - * - * - * @param array $attributes Array of attributes - * @return string - */ - public static function _content($attributes) - { - // Extracst attributes - extract($attributes); - - // Get snippet name - $name = (isset($get)) ? (string) $get : ''; - - // Get snippet path - $snippet_path = STORAGE . DS . 'snippets' . DS . $name . '.snippet.php'; - - // Get snippet content - if (File::exists($snippet_path)) { - - // Turn on output buffering - ob_start(); - - // Include view file - include $snippet_path; - - // Output... - return ob_get_clean(); - - } else { - if (Session::exists('admin') && Session::get('admin') == true) { - return __('Snippet :name is not found!', 'snippets', array(':name' => $name)); - } - } - } -} diff --git a/plugins/box/snippets/views/backend/add.view.php b/plugins/box/snippets/views/backend/add.view.php deleted file mode 100644 index a441b9c..0000000 --- a/plugins/box/snippets/views/backend/add.view.php +++ /dev/null @@ -1,35 +0,0 @@ -

    - - - - 'form-horizontal'))); ?> - - - - -
    - (isset($errors['snippets_empty_name']) || isset($errors['snippets_exists'])) ? 'form-control error-field' : 'form-control'))); ?>.snippet.php -
    - -'.$errors['snippets_empty_name'].''; - if (isset($errors['snippets_exists'])) echo ''.$errors['snippets_exists'].''; -?> - -
    - 'width:100%;height:400px;', 'class'=>'source-editor form-control')) - ); -?> -
    - - 'btn btn-phone btn-primary')).Html::nbsp(2). - Form::submit('add_snippets', __('Save', 'snippets'), array('class' => 'btn btn-phone btn-primary')).Html::nbsp(2). - Html::anchor(__('Cancel', 'snippets'), 'index.php?id=snippets', array('title' => __('Cancel', 'snippets'), 'class' => 'btn btn-phone btn-default')). - Form::close() - ); -?> \ No newline at end of file diff --git a/plugins/box/snippets/views/backend/edit.view.php b/plugins/box/snippets/views/backend/edit.view.php deleted file mode 100644 index 2a0671d..0000000 --- a/plugins/box/snippets/views/backend/edit.view.php +++ /dev/null @@ -1,47 +0,0 @@ -

    - - 'form-horizontal'))); - - echo (Form::hidden('csrf', Security::token())); - - echo (Form::hidden('snippets_old_name', Request::get('filename'))); - -?> - - - -
    - (isset($errors['snippets_empty_name']) || isset($errors['snippets_exists'])) ? 'form-control error-field' : 'form-control'))); ?>.snippet.php -
    - - '.$errors['snippets_empty_name'].''; - if (isset($errors['snippets_exists'])) echo ''.$errors['snippets_exists'].''; - ?> - -
    - 'width:100%;height:400px;', 'class' => 'source-editor form-control')) - ); -?> -
    - - 'btn btn-phone btn-primary')).Html::nbsp(2). - Form::submit('edit_snippets', __('Save', 'snippets'), array('class' => 'btn btn-phone btn-primary')). Html::nbsp(2). - Html::anchor(__('Cancel', 'snippets'), 'index.php?id=snippets', array('title' => __('Cancel', 'snippets'), 'class' => 'btn btn-phone btn-default')). - Form::close() - ); - - } else { - echo '
    '.__('This snippet does not exist', 'snippets').'
    '; - } -?> diff --git a/plugins/box/snippets/views/backend/index.view.php b/plugins/box/snippets/views/backend/index.view.php deleted file mode 100755 index 58e6457..0000000 --- a/plugins/box/snippets/views/backend/index.view.php +++ /dev/null @@ -1,66 +0,0 @@ -
    -
    -

    -
    -
    - __('Create New Snippet', 'snippets'), 'class' => 'btn btn-phone btn-primary')) - ); - ?> -
    -
    - - - - - - - - - - - - - - - - - -
    -
    -
    - 'btn btn-primary')); ?> - - -
    - 'btn btn-danger', 'onclick' => "return confirmDelete('".__('Delete snippet: :snippet', 'snippets', array(':snippet' => basename($snippet, '.snippet.php')))."')")); - ?> -
    -
    - - - \ No newline at end of file diff --git a/plugins/box/system/install/system.manifest.xml b/plugins/box/system/install/system.manifest.xml deleted file mode 100644 index 2a6a9ee..0000000 --- a/plugins/box/system/install/system.manifest.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - plugins/box/system/system.plugin.php - active - 4 - System - Monstra System plugin - 1.0.0 - Awilum - http://monstra.org/ - diff --git a/plugins/box/system/languages/cs.lang.php b/plugins/box/system/languages/cs.lang.php deleted file mode 100644 index b6bca9e..0000000 --- a/plugins/box/system/languages/cs.lang.php +++ /dev/null @@ -1,80 +0,0 @@ - array( - 'System' => 'Systém', - 'Published a new version of the :monstra' => 'Byla vydaná nová verze :monstra', - 'Sitemap Created' => 'Mapa webu byla vytvoÅ™ená', - 'Create Sitemap' => 'VytvoÅ™it mapu webu', - 'on' => 'Zapnout', - 'off'=> 'Vypnout', - 'Site url' => 'URL webu', - 'Maintenance Mode' => 'Údržba webu', - 'Maintenance Mode On' => 'Zapnout údržbu webu', - 'Maintenance Mode Off' => 'Vypnout údržbu webu', - 'Site Settings' => 'Nastavení webu', - 'System Settings' => 'Nastavení systému', - 'Site Name' => 'Název webu', - 'Site Description' => 'Popis webu', - 'Site Keywords' => 'KlíÄová slova webu', - 'Site Slogan' => 'Slogan webu', - 'Default Page' => 'Úvodní stránka', - 'Time zone' => 'ÄŒasové pásmo', - 'Language' => 'Jazyk', - 'Email' => 'Email', - 'Save' => 'Uložit', - 'System version' => 'Verze systému', - 'System version ID' => 'ID verze systému', - 'GZIP' => 'GZIP', - 'Debugging' => 'LadÄ›ní', - 'Plugin API' => 'Plugin API', - 'Plugins active' => 'Aktivní pluginy', - 'Actions registered' => 'Registrované akce', - 'Filters registered' => 'Registrované filtry', - 'Core' => 'Jádro', - 'Delete Temporary Files' => 'Vymazat doÄasné soubory', - 'Download the latest version' => 'Stáhnout nejnovÄ›jší verzi', - 'Powered by' => 'Beží na', - 'Administration' => 'Administrace', - 'Settings' => 'Nastavení', - 'Temporary files deleted' => 'DoÄasné soubory byly odstranÄ›ny', - 'Extends' => 'Rozšírení', - 'View Site' => 'Zobrazit web', - 'Welcome, :username' => 'Vítej, :username', - 'Reset Password' => 'Obnovit heslo', - 'Back to Website' => 'ZpÄ›t na web', - 'Forgot your password ?' => 'ZapomnÄ›li jste heslo?', - 'Administration' => 'Administrace', - 'Send New Password' => 'Zaslat nové heslo', - 'This user does not exist' => 'Tento uživatel neexistuje', - 'Version' => 'Verze', - 'Plugin does not exist' => 'Plugin neexistuje', - - 'Install script writable' => 'InstalaÄní skript je zapisovatelný', - 'Install script not writable' => 'InstalaÄní skript není zapisovatelný', - 'Directory: :dir writable' => 'Adresář: :dir je zapisovatelný', - 'Directory: :dir not writable' => 'Adresář: :dir není zapisovatelný', - 'PHP Version' => 'Verze PHP', - 'Module DOM is installed' => 'Modul DOM je nainstalovaný', - 'Module DOM is required' => 'Modul DOM je vyžadovaný', - 'Module Mod Rewrite is installed' => 'Modul Apache Rewrite je nainstalovaný', - 'Module SimpleXML is installed' => 'Modul SimpleXML je nainstalovaný', - 'PHP 5.2 or greater is required' => 'PHP 5.2 alebo vyšší je vyžadovaný', - 'Apache Mod Rewrite is required' => 'Modul Apache Rewrite je vyžadovaný', - 'SimpleXML module is required' => 'SimpleXML modul je vyžadovaný', - 'Field "Site name" is empty' => 'PolíÄko "Název webu" je prázdné', - 'Field "Email" is empty' => 'PolíÄko "Email" je prázdné', - 'Field "Username" is empty' => 'PolíÄko "Používateľ" je prázdné', - 'Field "Password" is empty' => 'PolíÄko "Heslo" je prázdné', - 'Field "Site url" is empty' => 'PolíÄko "URL webu" je prázdné', - 'Email not valid' => 'Email není ve správném tvaru', - 'Install' => 'Instalovat', - '...Monstra says...' => '...Monstra říká...', - 'Sitemap file writable' => 'Soubor sitemap je zapisovatelný', - 'Sitemap file not writable' => 'Soubor sitemap není zapisovatelný', - 'Main .htaccess file writable' => 'Hlavní soubor .htaccess je zapisovatelný', - 'Main .htaccess file not writable' => 'Hlavní soubor .htaccess není zapisovatelný', - 'Official Support Forum' => 'Oficiální podpora - Fórum', - 'Documentation' => 'Dokumentace', - ) - ); diff --git a/plugins/box/system/languages/de.lang.php b/plugins/box/system/languages/de.lang.php deleted file mode 100644 index df31167..0000000 --- a/plugins/box/system/languages/de.lang.php +++ /dev/null @@ -1,82 +0,0 @@ - array( - 'System' => 'System', - 'Published a new version of the :monstra' => 'Veröffentlicht eine neue Version von :monstra', - 'Sitemap created' => 'Sitemap wurde erstellt', - 'Create Sitemap' => 'Erstelle Sitemap', - 'on' => 'An', - 'off'=> 'Aus', - 'Site Url' => 'Seiten-URL', - 'Maintenance Mode' => 'Wartungsmodus', - 'Maintenance Mode On' => 'Wartungsmodus An', - 'Maintenance Mode Off' => 'Wartungsmodus Aus', - 'Site Settings' => 'Seiteneinstellungen', - 'System Settings' => 'Systemeinstellungen', - 'Site Name' => 'Seiten-Name', - 'Site Description' => 'Seiten-Beschreibung', - 'Site Keywords' => 'Seiten-Schlagwörter', - 'Site Slogan' => 'Seiten-Slogan', - 'Default Page' => 'Standardseite', - 'Time zone' => 'Zeitzone', - 'Language' => 'Sprache', - 'Email' => 'Email', - 'Save' => 'Speichern', - 'Site' => 'Seite', - 'System version' => 'Systemversion', - 'System version ID' => 'Systemversions ID', - 'GZIP' => 'GZIP', - 'Debugging' => 'Fehlerbeseitigung', - 'Plugin API' => 'Plugin API', - 'Plugins active' => 'Plugins aktiv', - 'Actions registered' => 'Aktionen registriert', - 'Filters registered' => 'Filter registriert', - 'Log Out' => 'Log Out', - 'Site' => 'Seite', - 'Delete Temporary Files' => 'Temporäre Dateien löschen', - 'Download the latest version' => 'Lade die letzte Version herunter', - 'Powered by' => 'Powered by', - 'Administration' => 'Administration', - 'Settings' => 'Einstellungen', - 'Temporary files deleted' => 'Temporäre Dateien wurden gelöscht', - 'Extends' => 'Erweitert', - 'View Site' => 'Seite ansehen', - 'Welcome, :username' => 'Willkommen, :username', - 'Reset Password' => 'Password zurücksetzen', - 'Back to Website' => 'Zurück zur Webseite', - 'Forgot your password ?' => 'Passwort vergessen ?', - 'Administration' => 'Administration', - 'Send New Password' => 'Neues Passwort zusenden', - 'This user does not exist' => 'Dieser Benutzer existiert nicht', - 'Version' => 'Version', - - 'Install script writable' => 'Installationsskript beschreibbar', - 'Install script not writable' => 'Installationsskript nicht beschreibbar', - 'Directory: :dir writable' => 'Ordner: :dir beschreibbar', - 'Directory: :dir not writable' => 'Ordner: :dir nicht beschreibbar', - 'PHP Version' => 'PHP Version', - 'Module DOM is installed' => 'Modul DOM ist installiert', - 'Module DOM is required' => 'Modul DOM ist erforderlich', - 'Module Mod Rewrite is installed' => 'Modul Mod Rewrite ist installiert', - 'Module SimpleXML is installed' => 'Modul SimpleXML ist installiert', - 'PHP 5.2 or greater is required' => 'PHP 5.2 oder höher erforderlich', - 'Apache Mod Rewrite is required' => 'Apache Mod Rewrite ist erforderlich', - 'SimpleXML module is required' => 'SimpleXML-Modul ist erforderlich', - 'Field "Site name" is empty' => 'Feld "Seiten-Name" ist leer', - 'Field "Email" is empty' => 'Feld "Email" ist leer', - 'Field "Username" is empty' => 'Feld "Benutzername" ist leer', - 'Field "Password" is empty' => 'Feld "Passwort" ist leer', - 'Field "Site url" is empty' => 'Feld "Seiten-URL" ist leer', - 'Email not valid' => 'E-Mail ist ungültig', - 'Install' => 'Installieren', - '...Monstra says...' => '...Monstra sagt...', - 'Sitemap file writable' => 'Sitemap-Datei beschreibbar', - 'Sitemap file not writable' => 'Sitemap-Datei ist nicht beschreibbar', - 'Main .htaccess file writable' => 'Haupt .htaccess-Datei ist beschreibbar', - 'Main .htaccess file not writable' => 'Haupt .htaccess-Datei ist nicht beschreibbar', - 'Official Support Forum' => 'Offizielles Support Forum', - 'Documentation' => 'Dokumentation', - 'Your changes have been saved.' => 'Änderungen wurden gespeichert.', - ) - ); diff --git a/plugins/box/system/languages/en.lang.php b/plugins/box/system/languages/en.lang.php deleted file mode 100644 index 04d1e8b..0000000 --- a/plugins/box/system/languages/en.lang.php +++ /dev/null @@ -1,83 +0,0 @@ - array( - 'System' => 'System', - 'Published a new version of the :monstra' => 'Published a new version of the :monstra', - 'Sitemap created' => 'Sitemap created', - 'Create Sitemap' => 'Create Sitemap', - 'on' => 'on', - 'off'=> 'off', - 'Site Url' => 'Site Url', - 'Maintenance Mode' => 'Maintenance Mode', - 'Maintenance Mode On' => 'Maintenance Mode On', - 'Maintenance Mode Off' => 'Maintenance Mode Off', - 'Site Settings' => 'Site Settings', - 'System Settings' => 'System Settings', - 'Site Name' => 'Site Name', - 'Site Description' => 'Site Description', - 'Site Keywords' => 'Site Keywords', - 'Site Slogan' => 'Site Slogan', - 'Default Page' => 'Default Page', - 'Time zone' => 'Time zone', - 'Language' => 'Language', - 'Email' => 'Email', - 'Save' => 'Save', - 'Site' => 'Site', - 'System version' => 'System version', - 'System version ID' => 'System version ID', - 'GZIP' => 'GZIP', - 'Debugging' => 'Debugging', - 'Plugin API' => 'Plugin API', - 'Plugins active' => 'Plugins active', - 'Actions registered' => 'Actions registered', - 'Filters registered' => 'Filters registered', - 'Delete Temporary Files' => 'Delete Temporary Files', - 'Download the latest version' => 'Download the latest version', - 'Powered by' => 'Powered by', - 'Administration' => 'Administration', - 'Settings' => 'Settings', - 'Temporary files deleted' => 'Temporary files deleted', - 'Extends' => 'Extends', - 'View Site' => 'View Site', - 'Welcome, :username' => 'Welcome, :username', - 'Reset Password' => 'Reset Password', - '< Back to Website' => '< Back to Website', - 'Forgot your password? >' => 'Forgot your password? >', - 'Administration >' => 'Administration >', - 'Send New Password' => 'Send New Password', - 'This user does not exist' => 'This user does not exist', - 'Version' => 'Version', - 'Plugin does not exist' => 'Plugin does not exist', - 'Help' => 'Help', - - 'Install script writable' => 'Install script writable', - 'Install script not writable' => 'Install script not writable', - 'Directory: :dir writable' => 'Directory: :dir writable', - 'Directory: :dir not writable' => 'Directory: :dir not writable', - 'PHP Version' => 'PHP Version', - 'Module DOM is installed' => 'Module DOM is installed', - 'Module DOM is required' => 'Module DOM is required', - 'Module Mod Rewrite is installed' => 'Module Mod Rewrite is installed', - 'Module SimpleXML is installed' => 'Module SimpleXML is installed', - 'PHP 5.2 or greater is required' => 'PHP 5.2 or greater is required', - 'Apache Mod Rewrite is required' => 'Apache Mod Rewrite is required', - 'SimpleXML module is required' => 'SimpleXML module is required', - 'Field "Site name" is empty' => 'Field "Site name" is empty', - 'Field "Email" is empty' => 'Field "Email" is empty', - 'Field "Username" is empty' => 'Field "Username" is empty', - 'Field "Password" is empty' => 'Field "Password" is empty', - 'Field "Site url" is empty' => 'Field "Site url" is empty', - 'Email not valid' => 'Email not valid', - 'Continue' => 'Continue', - 'Install' => 'Install', - '...Monstra says...' => '...Monstra says...', - 'Sitemap file writable' => 'Sitemap file writable', - 'Sitemap file not writable' => 'Sitemap file not writable', - 'Main .htaccess file writable' => 'Main .htaccess file writable', - 'Main .htaccess file not writable' => 'Main .htaccess file not writable', - 'Official Support Forum' => 'Official Support Forum', - 'Documentation' => 'Documentation', - 'Your changes have been saved.' => 'Your changes have been saved.', - ) - ); diff --git a/plugins/box/system/languages/es.lang.php b/plugins/box/system/languages/es.lang.php deleted file mode 100644 index 419feee..0000000 --- a/plugins/box/system/languages/es.lang.php +++ /dev/null @@ -1,82 +0,0 @@ - array( - 'System' => 'Sistema', - 'Published a new version of the :monstra' => 'Publicada una nueva versión de :monstra', - 'Sitemap created' => 'Mapa del sitio creado', - 'Create Sitemap' => 'Crear mapa del sitio', - 'on' => 'Activar', - 'off'=> 'Desactivar', - 'Site Url' => 'URL del sitio', - 'Maintenance Mode' => 'Modo mantenimiento', - 'Maintenance Mode On' => 'Activar modo mantenimiento', - 'Maintenance Mode Off' => 'Desactivar modo mantenimiento', - 'Site Settings' => 'Configuración del sitio', - 'System Settings' => 'Configuración del sistema', - 'Site Name' => 'Nombre del sitio', - 'Site Description' => 'Descripción del sitio', - 'Site Keywords' => 'Palabras claves del sitio', - 'Site Slogan' => 'Lema del sitio', - 'Default Page' => 'Página por defecto', - 'Time zone' => 'Zona horaria', - 'Language' => 'Lenguaje', - 'Email' => 'Correo electrónico', - 'Save' => 'Guardar', - 'Site' => 'Sitio', - 'System Version' => 'Versión del sistema', - 'System Version ID' => 'ID de versión web', - 'GZIP' => 'GZIP', - 'Debugging' => 'Depuración', - 'Plugin API' => 'Plugin API', - 'Plugins active' => 'Plugins activos', - 'Actions registered' => 'Acciones registradas', - 'Filters registered' => 'Filtros registrados', - 'Delete Temporary Files' => 'Eliminar archivos temporales', - 'Download the latest version' => 'Descargar versión más reciente', - 'Powered by' => 'Powered by', - 'Administration' => 'Administración', - 'Settings' => 'Configuración', - 'Temporary files deleted' => 'Archivos temporales eliminados', - 'Extends' => 'Extensiones', - 'View Site' => 'Ver sitio web', - 'Welcome, :username' => 'Bienvenido, :username', - 'Reset Password' => 'Restablecer Contraseña', - 'Back to Website' => 'Regresar al sitio web', - 'Forgot your password ?' => '¿Olvidaste tu contraseña?', - 'Administration >' => 'Administración', - 'Send New Password' => 'Enviar nueva contraseña', - 'This user does not exist' => 'Este usuario no existe', - 'Version' => 'Versión', - 'Plugin does not exist' => 'El plugin no existe', - 'Help' => 'Ayuda', - 'Install script writable' => 'Instalación de scripts accesible', - 'Install script not writable' => 'Instalación de scripts no accesible', - 'Directory: :dir writable' => 'Directorio: :dir accesible', - 'Directory: :dir not writable' => 'Directorio: :dir no accesible', - 'PHP Version' => 'Versión PHP', - 'Module DOM is installed' => 'El módulo DOM está instalado', - 'Module DOM is required' => 'El módulo DOM es requerido', - 'Module Mod Rewrite is installed' => 'El módulo Mod Rewrite está instalado', - 'Module SimpleXML is installed' => 'El módulo SimpleXML está instalado', - 'PHP 5.2 or greater is required' => 'PHP 5.2 o superior es requerido', - 'Apache Mod Rewrite is required' => 'Apache Mod Rewrite es requerido', - 'SimpleXML module is required' => 'El Módulo SimpleXML es requerido', - 'Field "Site name" is empty' => 'El campo "Nombre del sitio" está vacío', - 'Field "Email" is empty' => 'El campo "Correo electrónico" está vacío', - 'Field "Username" is empty' => 'El campo "Nombre de usuario" está vacío', - 'Field "Password" is empty' => 'El campo "Contraseña" está vacío', - 'Field "Site url" is empty' => 'El campo "URL del sitio" está vacío', - 'Email not valid' => 'El correo electrónico es inválido', - 'Continue' => 'Continuar', - 'Install' => 'Instalar', - '...Monstra says...' => '...Monstra dice...', - 'Sitemap file writable' => 'El archivo del mapa del sitio es accesible', - 'Sitemap file not writable' => 'El archivo del mapa del sitio no es accesible', - 'Main .htaccess file writable' => 'El archivo principal .htaccess es accesible', - 'Main .htaccess file not writable' => 'El archivo principal .htaccess no es accesible', - 'Official Support Forum' => 'Foro de Soporte Oficial', - 'Documentation' => 'Documentación', - 'Your changes have been saved.' => 'Tus cambios han sido guardados.', - ) - ); diff --git a/plugins/box/system/languages/fa.lang.php b/plugins/box/system/languages/fa.lang.php deleted file mode 100644 index 490a30a..0000000 --- a/plugins/box/system/languages/fa.lang.php +++ /dev/null @@ -1,79 +0,0 @@ - array( - 'System' => 'سیستم', - 'Published a new version of the :monstra' => 'نسخه جدید :monstra منتشر شده', - 'Sitemap created' => 'نقشه سایت ایجاد شد', - 'Create Sitemap' => 'ایجاد نقشه سایت', - 'on' => 'روشن', - 'off'=> 'خاموش', - 'Site Url' => 'آدرس سایت', - 'Maintenance Mode' => 'حالت تعمیر Ùˆ نگهداری', - 'Maintenance Mode On' => 'حالت تعمیر Ùˆ نگهداری روشن', - 'Maintenance Mode Off' => 'حالت تعمیر Ùˆ نگهداری خاموش', - 'Site Settings' => 'تنظیمات سایت', - 'System Settings' => 'تنظیمات سیستم', - 'Site Name' => 'نام سایت', - 'Site Description' => 'توضیحات سایت', - 'Site Keywords' => 'کلمات کلیدی سایت', - 'Site Slogan' => 'شعار سایت', - 'Default Page' => 'ØµÙØ­Ù‡ Ù¾ÛŒØ´ÙØ±Ø¶', - 'Time zone' => 'منطقه زمانی', - 'Language' => 'زبان', - 'Save' => 'ذخیره', - 'Site' => 'سایت', - 'System version' => 'نسخه سیستم', - 'System version ID' => 'شناسه نسخه سیستم', - 'GZIP' => 'GZIP', - 'Debugging' => 'اشکال زدائی', - 'Plugin API' => 'API پلاگین', - 'Plugins active' => 'پلاگینهای ÙØ¹Ø§Ù„', - 'Actions registered' => 'عملیات ثبت شده', - 'Filters registered' => 'Ùیلترهای ثبت شده', - 'Delete Temporary Files' => 'Ø­Ø°Ù ÙØ§ÛŒÙ„های موقت', - 'Download the latest version' => 'دانلود جدیدترین نسخه', - 'Powered by' => 'قدرت Ú¯Ø±ÙØªÙ‡ از', - 'Administration' => 'مدیریت', - 'Settings' => 'تنظیمات', - 'Temporary files deleted' => 'ÙØ§ÛŒÙ„های موقت حذ٠شدند', - 'Extends' => 'گسترش', - 'View site' => 'نمایش سایت', - 'Welcome, :username' => 'خوش آمدید ØŒ :username', - 'Reset Password' => 'تنظیم مجدد پسورد', - '< Back to Website' => '< بازگشت به وبسایت', - 'Forgot your password? >' => 'پسورد خود را ÙØ±Ø§Ù…وش کرده اید؟ >', - 'Administration >' => 'مدیریت >', - 'Send New Password' => 'ارسال پسورد جدید', - 'This user does not exist' => 'این کاربر وجود ندارد', - 'Version' => 'نسخه', - 'Plugin does not exist' => 'پلاگین وجود ندارد', - - 'Install script writable' => 'اسکریپت نصب قابل نوشتن میباشد', - 'Install script not writable' => 'اسکریپت نصب غیرقابل نوشتن میباشد', - 'Directory: :dir writable' => 'شاخه: :dir قابل نوشتن میباشد', - 'Directory: :dir not writable' => 'شاخه: :dir غیرقابل نوشتن میباشد', - 'PHP Version' => 'نسخه PHP', - 'Module DOM is installed' => 'ماژول DOM نصب شده است', - 'Module DOM is required' => 'ماژول DOM مورد نیاز است', - 'Module Mod Rewrite is installed' => 'ماژول Mod Rewrite نصب شده است', - 'Module SimpleXML is installed' => 'ماژول SimpleXML نصب شده است', - 'PHP 5.2 or greater is required' => 'PHP 5.2 یا بالاتر مورد نیاز است', - 'Apache Mod Rewrite is required' => 'Mod Rewrite آپاچی مورد نیاز است', - 'SimpleXML module is required' => 'ماژول SimpleXML مورد نیاز است', - 'Field "Site name" is empty' => 'کادر "نام سایت" خالی است', - 'Field "Email" is empty' => 'کادر "ایمیل" خالی است', - 'Field "Username" is empty' => 'کادر "نام کاربری" خالی است', - 'Field "Password" is empty' => 'کادر "پسورد" خالی است', - 'Field "Site url" is empty' => 'کادر "آدرس سایت" خالی است', - 'Email not valid' => 'ایمیل معتبر نیست', - 'Install' => 'نصب', - '...Monstra says...' => '...مونسترا میگوید...', - 'Sitemap file writable' => 'ÙØ§ÛŒÙ„ نقشه سایت قابل نوشتن میباشد', - 'Sitemap file not writable' => 'ÙØ§ÛŒÙ„ نقشه سایت غیرقابل نوشتن میباشد', - 'Main .htaccess file writable' => 'ÙØ§ÛŒÙ„ اصلی .htaccess قابل نوشتن میباشد', - 'Main .htaccess file not writable' => 'ÙØ§ÛŒÙ„ اصلی .htaccess غیرقابل نوشتن میباشد', - 'Official Support Forum' => 'انجمن پشتیبانی', - 'Documentation' => 'مستندات', - ) - ); \ No newline at end of file diff --git a/plugins/box/system/languages/fr.lang.php b/plugins/box/system/languages/fr.lang.php deleted file mode 100644 index 55509ee..0000000 --- a/plugins/box/system/languages/fr.lang.php +++ /dev/null @@ -1,83 +0,0 @@ - array( - 'System' => 'Système', - 'Published a new version of the :monstra' => 'Publication d\'une nouvelle version de :monstra', - 'Sitemap created' => 'Plan du site créé', - 'Create sitemap' => 'Créer un plan du site', - 'on' => 'on', - 'off'=> 'off', - 'Site url' => 'Url du site', - 'Maintenance Mode' => 'Mode de maintenance', - 'Maintenance Mode On' => 'Mode de maintenance On', - 'Maintenance Mode Off' => 'Mode de maintenance Off', - 'Site settings' => 'Paramètres du site', - 'System settings' => 'Paramètres du système', - 'Site name' => 'Nom du site', - 'Site description' => 'Description du site', - 'Site keywords' => 'Mots clés du site', - 'Site slogan' => 'Slogan du site', - 'Default page' => 'Page par défaut', - 'Time zone' => 'Fuseau horaire', - 'Language' => 'Langue', - 'Email' => 'Email', - 'Save' => 'Enregistrer', - 'Site' => 'Site', - 'System version' => 'Version du système', - 'System version ID' => 'ID de la version du système', - 'GZIP' => 'GZIP', - 'Debugging' => 'Débogage', - 'Plugin API' => 'Plugin API', - 'Plugins active' => 'Plugins actifs', - 'Actions registered' => 'Actions enregistrées', - 'Filters registered' => 'Filtres enregistrées', - 'logout' => 'déconnexion', - 'site' => 'site', - 'Core' => 'Noyau', - 'Delete temporary files' => 'Supprimer les fichiers temporaires', - 'Download the latest version' => 'Télécharger la dernière version', - 'Powered by' => 'Propulsé par', - 'Administration' => 'Administration', - 'Settings' => 'Paramètres', - 'Temporary files deleted' => 'Les fichiers temporaires ont été supprimés', - 'Extends' => 'Extensions', - 'View site' => 'Voir le site', - 'Welcome, :username' => 'Bienvenue, :username', - 'Reset Password' => 'Réinitialiser le mot de passe', - 'Back to Website' => '< Retour au site', - 'Forgot your password ?' => 'Mot de passe oublié ?', - 'Administration >' => 'Administration >', - 'Send New Password' => 'Envoyer un nouveau mot de passe', - 'This user does not exist' => 'Cet utilisateur n\'existe pas', - 'Version' => 'Version', - 'Plugin does not exist' => 'Ce plugin n\'existe pas', - - 'Install script writable' => 'Le script d\'installation est accessible en écriture', // pour ' = ’ (a voir) - 'Install script not writable' => 'Le script d\'installation n\' est pas accessible en écriture', - 'Directory: :dir writable' => 'Répertoire: :dir writable', - 'Directory: :dir not writable' => 'Répertoire: :dir pas accessible en écriture', - 'PHP Version' => 'Version de PHP', - 'Module DOM is installed' => 'Module DOM est installé', - 'Module DOM is required' => 'Module DOM est requis', - 'Module Mod Rewrite is installed' => 'Module Mod Rewrite est installé', - 'Module SimpleXML is installed' => 'Module SimpleXML est installé', - 'PHP 5.2 or greater is required' => 'PHP 5.2 ou supérieur est requis', - 'Apache Mod Rewrite is required' => 'Apache Mod Rewrite est requis', - 'SimpleXML module is required' => 'Le module SimpleXML est requis', - 'Field "Site name" is empty' => 'Le champ "Nom du site" est vide', - 'Field "Email" is empty' => 'Le champ "Email" est vide', - 'Field "Username" is empty' => 'Le champ "Nom d\'utilisateur" est vide', - 'Field "Password" is empty' => 'Le champ "Mot de Passe" est vide', - 'Field "Site url" is empty' => 'Le champ "Url du site" est vide', - 'Email not valid' => 'Email non valide', - 'Install' => 'Installer', - '...Monstra says...' => '...Monstra dit...', - 'Sitemap file writable' => 'Fichier Sitemap accessible en écriture', - 'Sitemap file not writable' => 'Fcihier Sitemap non accessible en écriture', - 'Main .htaccess file writable' => 'Fichier .htaccess pricipale accessible en écriture', - 'Main .htaccess file not writable' => 'Fichier .htaccess pricipale non accessible en écriture', - 'Official Support Forum' => 'Forum Support Officiel', - 'Documentation' => 'Documentation', - ) - ); diff --git a/plugins/box/system/languages/hu.lang.php b/plugins/box/system/languages/hu.lang.php deleted file mode 100644 index 7c1bd6e..0000000 --- a/plugins/box/system/languages/hu.lang.php +++ /dev/null @@ -1,83 +0,0 @@ - array( - 'System' => 'Rendszer', - 'Published a new version of the :monstra' => 'Megjelent egy új Monstra változat', - 'Sitemap created' => 'Oldaltérkép elkészült', - 'Create Sitemap' => 'Oldaltérkép készítése', - 'on' => 'be', - 'off'=> 'ki', - 'Site Url' => 'Weboldal címe (url)', - 'Maintenance Mode' => 'Karbantartási mód', - 'Maintenance Mode On' => 'Karbantartási mód Be', - 'Maintenance Mode Off' => 'Karbantartási mód Ki', - 'Site Settings' => 'Weboldal beállítások', - 'System Settings' => 'Rendszer beállítások', - 'Site Name' => 'Weboldal neve', - 'Site Description' => 'Weboldal leírása', - 'Site Keywords' => 'Weboldal kulcsszavak', - 'Site Slogan' => 'Weboldal szlogen', - 'Default Page' => 'Alapértelmezett kezdÅ‘oldal', - 'Time zone' => 'IdÅ‘zóna', - 'Language' => 'Nyelv', - 'Email' => 'Email', - 'Save' => 'Mentés', - 'Site' => 'Weboldal', - 'System version' => 'Rendszer verzió', - 'System version ID' => 'Rendszer verziószám', - 'GZIP' => 'GZIP', - 'Debugging' => 'Hibakeresés', - 'Plugin API' => 'Plugin API', - 'Plugins active' => 'A Pluginok aktívak', - 'Actions registered' => 'Actions registered', - 'Filters registered' => 'Filters registered', - 'logout' => 'Kilépés', - 'site' => 'oldal', - 'Core' => 'Core', - 'Delete Temporary Files' => 'Az ideiglenes fájlok törlése', - 'Download the latest version' => 'Töltse le a legújabb verziót', - 'Powered by' => 'Powered by', - 'Administration' => 'Adminisztráció', - 'Settings' => 'Beállítások', - 'Temporary files deleted' => 'Ideiglenes fájlok törölve', - 'Extends' => 'BÅ‘vítmények', - 'View Site' => 'Oldal megtekintése', - 'Welcome, :username' => 'Üdvözöllek :username', - 'Reset Password' => 'Jelszó Törlése', - 'Back to Website' => 'Vissza a weboldalra', - 'Forgot your password ?' => 'Elfelejtette a jelszavát ?', - 'Administration >' => 'Adminisztráció >', - 'Send New Password' => 'Új Jelszó Küldése', - 'This user does not exist' => 'Ez a felhasználó nem létezik', - 'Version' => 'Verzió', - 'Plugin does not exist' => 'Plugin nem létezik', - - 'Install script writable' => 'Install script írható', - 'Install script not writable' => 'Install script nem írható', - 'Directory: :dir writable' => 'Directory: :dir írható', - 'Directory: :dir not writable' => 'Directory: :dir nem írható', - 'PHP Version' => 'PHP Verzió', - 'Module DOM is installed' => 'DOM modul telepítve van', - 'Module DOM is required' => 'DOM modul szükséges', - 'Module Mod Rewrite is installed' => 'Mod Rewrite modul telepítve van', - 'Module SimpleXML is installed' => 'SimpleXML modul telepítve van', - 'PHP 5.2 or greater is required' => 'PHP 5.2 vagy újabb szükséges', - 'Apache Mod Rewrite is required' => 'Apache Mod Rewrite szükséges', - 'SimpleXML module is required' => 'SimpleXML modul szükséges', - 'Field "Site name" is empty' => 'MezÅ‘ "Weboldal neve" üres', - 'Field "Email" is empty' => 'MezÅ‘ "Email" üres', - 'Field "Username" is empty' => 'MezÅ‘ "Felhasználónév" üres', - 'Field "Password" is empty' => 'MezÅ‘ "Jelszó" üres', - 'Field "Site url" is empty' => 'MezÅ‘ "Weboldal címe (url)" üres', - 'Email not valid' => 'E-mail nem érvényes', - 'Install' => 'Telepítés', - '...Monstra says...' => '... Monstra mondja ...', - 'Sitemap file writable' => 'Sitemap fájl írható', - 'Sitemap file not writable' => 'Sitemap fájl nem írható', - 'Main .htaccess file writable' => 'Main .htaccess fájl írható', - 'Main .htaccess file not writable' => 'Main .htaccess fájl nem írható', - 'Official Support Forum' => 'Hivatalos Fórum', - 'Documentation' => 'Dokumentáció', - ) - ); diff --git a/plugins/box/system/languages/id.lang.php b/plugins/box/system/languages/id.lang.php deleted file mode 100644 index 411dd2a..0000000 --- a/plugins/box/system/languages/id.lang.php +++ /dev/null @@ -1,82 +0,0 @@ - array( - 'System' => 'System', - 'Published a new version of the :monstra' => 'Memuat versi baru dari :monstra', - 'Sitemap created' => 'Sitemap dibuat', - 'Create Sitemap' => 'Buat Sitemap', - 'on' => 'Nyala', - 'off'=> 'Mati', - 'Site Url' => 'URL Situs', - 'Maintenance Mode' => 'Mode Perbaikan', - 'Maintenance Mode On' => 'Nyalakan Mode Perbaikan', - 'Maintenance Mode Off' => 'Matikan Mode Perbaikan', - 'Site Settings' => 'Pengaturan Situs', - 'System Settings' => 'Pengaturan Situs', - 'Site Name' => 'Nama Situs', - 'Site Description' => 'Deskripsi Situs', - 'Site Keywords' => 'Kata Kunci Situs', - 'Site Slogan' => 'Slogan Situs', - 'Default Page' => 'Halaman Standart', - 'Time zone' => 'Zona Waktu', - 'Language' => 'Bahasa', - 'Email' => 'Email', - 'Save' => 'Simpan', - 'Site' => 'Situs', - 'System version' => 'Versi Sistem', - 'System version ID' => 'ID Versi Sistem', - 'GZIP' => 'GZIP', - 'Debugging' => 'Debugging', - 'Plugin API' => 'Plugin API', - 'Plugins active' => 'Plugins aktif', - 'Actions registered' => 'Tindakan telah terdaftar', - 'Filters registered' => 'Filter telah terdaftar', - 'Log Out' => 'Keluar', - 'Site' => 'Situs', - 'Delete Temporary Files' => 'Hapus File Sementara', - 'Download the latest version' => 'Unduh Versi Terbaru', - 'Powered by' => 'Didukung oleh', - 'Administration' => 'Administrasi', - 'Settings' => 'Pengaturan', - 'Temporary files deleted' => 'Hapus File Sementara', - 'Extends' => 'Ekstensi', - 'View Site' => 'Lihat Situs', - 'Welcome, :username' => 'Selamat datang, :username', - 'Reset Password' => 'Reset Password', - 'Back to Website' => '< Kembali ke Situs Web', - 'Forgot your password ?' => 'Lupa Password ?', - 'Administration' => 'Administrasi', - 'Send New Password' => 'Kirim Password Baru', - 'This user does not exist' => 'Pengguna ini tidak terdaftar', - 'Version' => 'Versi', - - 'Install script writable' => 'Skrip Instalasi writable', - 'Install script not writable' => 'Skrip Instalasi tidak writable', - 'Directory: :dir writable' => 'Direktori: :dir writable', - 'Directory: :dir not writable' => 'Direktori: :dir tidak writable', - 'PHP Version' => 'Versi PHP', - 'Module DOM is installed' => 'Modul DOM telah terpasang', - 'Module DOM is required' => 'diperlukan Modul DOM', - 'Module Mod Rewrite is installed' => 'Modul Mod Rewrite telah terpasang', - 'Module SimpleXML is installed' => 'Modul SimpleXML telah terpasang', - 'PHP 5.2 or greater is required' => 'diperlukan PHP 5.2 atau yang lebih baru', - 'Apache Mod Rewrite is required' => 'diperlukan Apache Mod Rewrite', - 'SimpleXML module is required' => 'diperlukan Modul simpleXML', - 'Field "Site name" is empty' => 'Isian "Nama Situs" kosong', - 'Field "Email" is empty' => 'Isian "Email" kosong', - 'Field "Username" is empty' => 'Isian "Nama Pengguna" kosong', - 'Field "Password" is empty' => 'Isian "Password" kosong', - 'Field "Site url" is empty' => 'Isian "Situs URL" kosong', - 'Email not valid' => 'E-Mail tidak cocok', - 'Install' => 'Memasangkan', - '...Monstra says...' => '...Katanya Monstra...', - 'Sitemap file writable' => 'File sitemap writable', - 'Sitemap file not writable' => 'File sitemap tidak writable', - 'Main .htaccess file writable' => 'File .htaccess-Datei writable', - 'Main .htaccess file not writable' => 'File .htaccess tidak writable', - 'Official Support Forum' => 'Forum Support Resmi', - 'Documentation' => 'Dokumentasi', - 'Your changes have been saved.' => 'Perubahan Telah Disimpan.', - ) - ); diff --git a/plugins/box/system/languages/it.lang.php b/plugins/box/system/languages/it.lang.php deleted file mode 100644 index af54315..0000000 --- a/plugins/box/system/languages/it.lang.php +++ /dev/null @@ -1,78 +0,0 @@ - array( - 'System' => 'Sistema', - 'Published a new version of the :monstra' => 'È disponibile una nuova versione :monstra', - 'Sitemap created' => 'Sitemap è stata creata', - 'Create Sitemap' => 'Crea Sitemap', - 'on' => 'on', - 'off'=> 'off', - 'Site Url' => 'URL del sito', - 'Maintenance Mode' => 'Modalità manutenzione', - 'Maintenance Mode On' => 'Abilita modalità manutenzione', - 'Maintenance Mode Off' => 'Disabilita modalità manutenzione', - 'Site Settings' => 'Impostazioni del sito', - 'System Settings' => 'Impostazioni di sistema', - 'Site Name' => 'Nome del sito', - 'Site Description' => 'Descrizione', - 'Site Keywords' => 'Parole chiavi', - 'Site Slogan' => 'Slogan', - 'Default Page' => 'Pagina Predefinita', - 'Time zone' => 'Fuso orario', - 'Language' => 'Lingua', - 'Email' => 'Email', - 'Save' => 'Salva', - 'System version' => 'Versione del sistema', - 'System version ID' => 'ID del sistema', - 'GZIP' => 'Compressione GZIP', - 'Debugging' => 'Debugging', - 'Plugin API' => 'Plugin API', - 'Plugins active' => 'Plugin attivi', - 'Actions registered' => 'Azioni registrati', - 'Filters registered' => 'Filtri registrati', - 'Delete Temporary Files' => 'Cancella i file temporanei', - 'Download the latest version' => 'Scarica l’ultima versione', - 'Powered by' => 'Powered by', - 'Administration' => 'Amministrazione', - 'Settings' => 'Impostazioni', - 'Temporary files deleted' => 'File temporanei eliminati', - 'Extends' => 'Estensioni', - 'View site' => 'Visita sito', - 'Welcome, :username' => 'Benvenuto, :username', - 'Reset Password' => 'Resetta la password', - 'Back to Website' => 'Vai al sito', - 'Forgot your password ?' => 'Dimenticato la password ?', - 'Administration >' => 'Amministrazione >', - 'Send New Password' => 'Invia la nuova password', - 'This user does not exist' => 'Tale utente non esiste', - 'Version' => 'Versione', - - 'Install script writable' => 'Script d’installazione è scrivibile', - 'Install script not writable' => 'Script d’installazione non è scrivibile', - 'Directory: :dir writable' => 'Directory :dir è scrivibile', - 'Directory: :dir not writable' => 'Directory :dir non è scrivibile', - 'PHP Version' => 'Versione PHP', - 'Module DOM is installed' => 'Modulo DOM installato', - 'Module DOM is required' => 'Modulo DOM è richiesto', - 'Module Mod Rewrite is installed' => 'Modulo Mod Rewrite installato', - 'Module SimpleXML is installed' => 'Modulo SimpleXML installato', - 'PHP 5.2 or greater is required' => 'PHP 5.2 o superiore', - 'Apache Mod Rewrite is required' => 'Apache Mod Rewrite è richiesto', - 'SimpleXML module is required' => 'Modulo SimpleXML è richiesto', - 'Field "Site name" is empty' => 'Campo "Nome del sito" è vuoto', - 'Field "Email" is empty' => 'Campo "E-mail" è vuoto', - 'Field "Username" is empty' => 'Campo "Nome utente" è vuoto', - 'Field "Password" is empty' => 'Campo "Password" è vuoto', - 'Field "Site url" is empty' => 'Campo "URL del sito" è vuoto', - 'Email not valid' => 'E-mail non valido', - 'Install' => 'Installa', - '...Monstra says...' => '...Monstra dice...', - 'Sitemap file writable' => 'Sitemap file è scrivibile', - 'Sitemap file not writable' => 'Sitemap file non è scrivibile', - 'Main .htaccess file writable' => 'Principale file .htaccess è scrivibile', - 'Main .htaccess file not writable' => 'Principale file .htaccess non è scrivibile', - 'Official Support Forum' => 'Official Support Forum', - 'Documentation' => 'Documentation', - ) - ); diff --git a/plugins/box/system/languages/ja.lang.php b/plugins/box/system/languages/ja.lang.php deleted file mode 100644 index 7c7c1a1..0000000 --- a/plugins/box/system/languages/ja.lang.php +++ /dev/null @@ -1,80 +0,0 @@ - array( - 'System' => 'システム', - 'Published a new version of the :monstra' => 'æ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®:monstraãŒå…¬é–‹ã•れã¦ã„ã¾ã™', - 'Sitemap created' => 'サイトマップを作æˆã—ã¾ã—ãŸ', - 'Create Sitemap' => 'サイトマップã®ä½œæˆ', - 'on' => 'オン', - 'off'=> 'オフ', - 'Site Url' => 'サイトã®URL', - 'Maintenance Mode' => 'メンテナンスモード', - 'Maintenance Mode On' => 'メンテナンスモード On', - 'Maintenance Mode Off' => 'メンテナンスモード Off', - 'Site Settings' => 'サイトã®è¨­å®š', - 'System Settings' => 'システム設定', - 'Site Name' => 'サイトå', - 'Site Description' => 'サイトã®èª¬æ˜Ž', - 'Site Keywords' => 'サイトã®ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰', - 'Site Slogan' => 'サイトã®ã‚¹ãƒ­ãƒ¼ã‚¬ãƒ³', - 'Default Page' => 'デフォルトã®ãƒšãƒ¼ã‚¸', - 'Time zone' => 'タイムゾーン', - 'Language' => '言語', - 'Email' => 'Eメール', - 'Save' => 'ä¿å­˜', - 'Site' => 'サイト', - 'System version' => 'システムãƒãƒ¼ã‚¸ãƒ§ãƒ³', - 'System version ID' => 'システムãƒãƒ¼ã‚¸ãƒ§ãƒ³ID', - 'GZIP' => 'GZIP', - 'Debugging' => 'デãƒãƒƒã‚°', - 'Plugin API' => 'プラグインAPI', - 'Plugins active' => 'Plugins active', - 'Actions registered' => 'アクションãŒç™»éŒ²ã•れã¾ã—ãŸ', - 'Filters registered' => 'フィルタãŒç™»éŒ²ã•れã¾ã—ãŸ', - 'Delete Temporary Files' => 'テンãƒãƒ©ãƒªãƒ•ァイルを削除', - 'Download the latest version' => '最新ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’ダウンロード', - 'Powered by' => 'Powered by', - 'Administration' => '管ç†è€…モード', - 'Settings' => '設定', - 'Temporary files deleted' => 'テンãƒãƒ©ãƒªãƒ•ァイルを削除ã—ã¾ã—ãŸ', - 'Extends' => 'æ‹¡å¼µ', - 'View Site' => 'サイトを見る', - 'Welcome, :username' => ':usernameã•ã‚“ã€ã‚ˆã†ã“ã', - 'Reset Password' => 'パスワードã®ãƒªã‚»ãƒƒãƒˆ', - 'Back to Website' => '< Webã‚µã‚¤ãƒˆã«æˆ»ã‚‹', - 'Forgot your password ?' => 'パスワードを忘れã¾ã—ãŸã‹ï¼Ÿ >', - 'Administration' => '管ç†è€… >', - 'Send New Password' => 'æ–°ã—ã„パスワードをé€ä¿¡', - 'This user does not exist' => 'ã“ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯å­˜åœ¨ã—ã¾ã›ã‚“', - 'Version' => 'ãƒãƒ¼ã‚¸ãƒ§ãƒ³', - 'Plugin does not exist' => 'プラグインãŒå­˜åœ¨ã—ã¾ã›ã‚“', - 'Install script writable' => 'ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã‚¹ã‚¯ãƒªãƒ—ãƒˆã¯æ›¸ãè¾¼ã¿å¯èƒ½ã§ã™', - 'Install script not writable' => 'ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã‚¹ã‚¯ãƒªãƒ—ãƒˆã¯æ›¸ãè¾¼ã¿ä¸å¯èƒ½ã§ã™', - 'Directory: :dir writable' => 'ディレクトリ: :dir ã¯æ›¸ãè¾¼ã¿å¯èƒ½ã§ã™', - 'Directory: :dir not writable' => 'ディレクトリ: :dir ã¯æ›¸ãè¾¼ã¿ä¸å¯èƒ½ã§ã™', - 'PHP Version' => 'PHPãƒãƒ¼ã‚¸ãƒ§ãƒ³', - 'Module DOM is installed' => 'DOMモジュールã¯ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ã„ã¾ã™', - 'Module DOM is required' => 'DOMモジュールãŒå¿…è¦ã§ã™', - 'Module Mod Rewrite is installed' => 'Mod Rewriteモジュールã¯ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ã„ã¾ã™', - 'Module SimpleXML is installed' => 'SimpleXMLモジュールã¯ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ã„ã¾ã™', - 'PHP 5.2 or greater is required' => 'PHP 5.2以上ãŒå¿…è¦ã§ã™', - 'Apache Mod Rewrite is required' => 'Apacheã®Mod RewriteãŒå¿…è¦ã§ã™', - 'SimpleXML module is required' => 'SimpleXMLモジュールãŒå¿…è¦ã§ã™', - 'Field "Site name" is empty' => '"サイトå"フィールドãŒç©ºã§ã™', - 'Field "Email" is empty' => '"Eメール"フィールドãŒç©ºã§ã™', - 'Field "Username" is empty' => '"ユーザーå"フィールドãŒç©ºã§ã™', - 'Field "Password" is empty' => '"パスワード"フィールドãŒç©ºã§ã™', - 'Field "Site url" is empty' => '"サイトURL"フィールドãŒç©ºã§ã™', - 'Email not valid' => '有効ãªEメールアドレスã§ã¯ã‚りã¾ã›ã‚“', - 'Install' => 'インストール', - '...Monstra says...' => '...Monstraより...', - 'Sitemap file writable' => 'ã‚µã‚¤ãƒˆãƒžãƒƒãƒ—ãƒ•ã‚¡ã‚¤ãƒ«ã¯æ›¸ãè¾¼ã¿å¯èƒ½ã§ã™', - 'Sitemap file not writable' => 'ã‚µã‚¤ãƒˆãƒžãƒƒãƒ—ãƒ•ã‚¡ã‚¤ãƒ«ã¯æ›¸ãè¾¼ã¿ä¸å¯èƒ½ã§', - 'Main .htaccess file writable' => 'メイン .htaccess ãƒ•ã‚¡ã‚¤ãƒ«ã¯æ›¸ãè¾¼ã¿å¯èƒ½ã§ã™', - 'Main .htaccess file not writable' => 'メイン .htaccess ãƒ•ã‚¡ã‚¤ãƒ«ã¯æ›¸ãè¾¼ã¿ä¸å¯èƒ½ã§ã™', - 'Official Support Forum' => 'オフィシャルサãƒãƒ¼ãƒˆãƒ•ォーラム', - 'Documentation' => 'ドキュメント', - 'Your changes have been saved.' => '変更ã•れãŸè¨­å®šã¯ä¿å­˜ã•れã¾ã—ãŸã€‚', - ) - ); diff --git a/plugins/box/system/languages/ka-ge.lang.php b/plugins/box/system/languages/ka-ge.lang.php deleted file mode 100644 index af0e657..0000000 --- a/plugins/box/system/languages/ka-ge.lang.php +++ /dev/null @@ -1,82 +0,0 @@ - array( - 'System' => 'სისტემáƒ', - 'Published a new version of the :monstra' => 'გáƒáƒ›áƒáƒ¥áƒ•ეყნდრáƒáƒ®áƒáƒšáƒ˜ ვერსირ:monstra', - 'Sitemap created' => 'სáƒáƒ˜áƒ¢áƒ˜áƒ¡ რუქრშეიქმნáƒ', - 'Create Sitemap' => 'სáƒáƒ˜áƒ¢áƒ˜áƒ¡ რუქის შექმნáƒ', - 'on' => 'ჩáƒáƒ áƒ—ულიáƒ', - 'off'=> 'გáƒáƒ›áƒáƒ áƒ—ულიáƒ', - 'Site Url' => 'სáƒáƒ˜áƒ¢áƒ˜áƒ¡ áƒáƒ“რესი', - 'Maintenance Mode' => 'ტექნიკური სáƒáƒ›áƒ£áƒ¨áƒáƒáƒ”ბი', - 'Maintenance Mode On' => 'ტექნიკური სáƒáƒ›áƒ£áƒ¨áƒáƒáƒ‘ების ჩáƒáƒ áƒ—ვáƒ', - 'Maintenance Mode Off' => 'ტექნიკური სáƒáƒ›áƒ£áƒ¨áƒáƒáƒ‘ების. გáƒáƒ›áƒáƒ áƒ—ვáƒ', - 'Site Settings' => 'სáƒáƒ˜áƒ¢áƒ˜áƒ¡ პáƒáƒ áƒáƒ›áƒ”ტრები', - 'System Settings' => 'სისტემის პáƒáƒ áƒáƒ›áƒ”ტრები', - 'Site Name' => 'სáƒáƒ˜áƒ¢áƒ˜áƒ¡ სáƒáƒ®áƒ”ლწáƒáƒ“ებáƒ', - 'Site Description' => 'სáƒáƒ˜áƒ¢áƒ˜áƒ¡ áƒáƒ¦áƒ¬áƒ”რáƒ', - 'Site Keywords' => 'სáƒáƒ˜áƒ¢áƒ˜áƒ¡ სáƒáƒ™áƒ•áƒáƒœáƒ«áƒ სიტყვები', - 'Site Slogan' => 'სáƒáƒ˜áƒ¢áƒ˜áƒ¡ სლáƒáƒ’áƒáƒœáƒ˜', - 'Default Page' => 'მთáƒáƒ•áƒáƒ áƒ˜ გვერდი', - 'Time zone' => 'დრáƒáƒ˜áƒ¡ სáƒáƒ áƒ¢áƒ§áƒ”ლი', - 'Language' => 'ენáƒ', - 'Email' => 'ელ-ფáƒáƒ¡áƒ¢áƒ', - 'Save' => 'დáƒáƒ›áƒáƒ®áƒ¡áƒáƒ•რებáƒ', - 'System version' => 'სისტემის ვერსიáƒ', - 'System version ID' => 'სისტემის ვერსიის ID', - 'GZIP' => 'GZIP', - 'Debugging' => 'Debugging', - 'Plugin API' => 'პლáƒáƒ’ინი API', - 'Plugins active' => 'შეერთებული პლáƒáƒ’ინები', - 'Actions registered' => 'დáƒáƒ áƒ”გისტრირებული მáƒáƒ¥áƒ›áƒ”დებები', - 'Filters registered' => 'დáƒáƒ áƒ”გისტრირებული ფილტრები', - 'Delete Temporary Files' => 'დრáƒáƒ”ბითი ფáƒáƒ˜áƒšáƒ”ბის წáƒáƒ¨áƒšáƒ', - 'Download the latest version' => 'ბáƒáƒšáƒ ვერსიის გáƒáƒ“მáƒáƒ¬áƒ”რáƒ', - 'Powered by' => 'Powered by', - 'Administration' => 'áƒáƒ“მინისტრირებáƒ', - 'Settings' => 'პáƒáƒ áƒáƒ›áƒ”ტრები', - 'Temporary files deleted' => 'დრáƒáƒ”ბითი ფáƒáƒ˜áƒšáƒ”ბი წáƒáƒ¨áƒšáƒ˜áƒšáƒ˜áƒ', - 'Extends' => 'extend-ები', - 'View Site' => 'სáƒáƒ˜áƒ¢áƒ˜áƒ¡ ნáƒáƒ®áƒ•áƒ', - 'Welcome, :username' => 'მáƒáƒ’ესáƒáƒšáƒ›áƒ”ბით, :username', - 'Reset Password' => 'პáƒáƒ áƒáƒšáƒ˜áƒ¡ Reset-ი', - 'Back to Website' => 'ვებ გვერდზე დáƒáƒ‘რუნებáƒ', - 'Forgot your password ?' => 'დáƒáƒ’áƒáƒ•იწყდáƒáƒ— პáƒáƒ áƒáƒšáƒ˜?', - 'Administration' => 'áƒáƒ“მინისტრირებáƒ', - 'Send New Password' => 'áƒáƒ®áƒáƒšáƒ˜ პáƒáƒ áƒáƒšáƒ˜áƒ¡ გáƒáƒ’ზáƒáƒ•ნáƒ', - 'This user does not exist' => 'ესეთი მáƒáƒ›áƒ®áƒ›áƒáƒ áƒ”ბელი áƒáƒ  áƒáƒ áƒ¡áƒ”ბáƒáƒ‘ს', - 'Version' => 'ვერსიáƒ', - 'Plugin does not exist' => 'პლáƒáƒ’ინი áƒáƒ  áƒáƒ áƒ¡áƒ”ბáƒáƒ‘ს', - 'Help' => 'დáƒáƒ®áƒ›áƒáƒ áƒ”ბáƒ', - 'Continue' => 'გáƒáƒ’რძელებáƒ', - - 'Install script writable' => 'დáƒáƒ¡áƒáƒ§áƒ”ნი script-ის წáƒáƒ™áƒ˜áƒ—ხვრშესáƒáƒ«áƒšáƒ”ბელიáƒ', - 'Install script not writable' => 'დáƒáƒ¡áƒáƒ§áƒ”ნი script-ის წáƒáƒ™áƒ˜áƒ—ხვრშეუძლებელიáƒ', - 'Directory: :dir writable' => 'დირეკტáƒáƒ áƒ˜áƒ :dir ჩáƒáƒ¬áƒ”რისთვის ხელმისáƒáƒ¬áƒ•დáƒáƒ›áƒ˜áƒ', - 'Directory: :dir not writable' => 'დირეკტáƒáƒ áƒ˜áƒ :dir ჩáƒáƒ¬áƒ”რისთვის áƒáƒ  áƒáƒ áƒ˜áƒ¡ ხელმისáƒáƒ¬áƒ•დáƒáƒ›áƒ˜', - 'PHP Version' => 'PHP-ის ვერსიáƒ', - 'Module DOM is installed' => 'DOM მáƒáƒ“ული დáƒáƒ§áƒ”ნებულიáƒ', - 'Module DOM is required' => 'სáƒáƒ­áƒ˜áƒ áƒáƒ DOM მáƒáƒ“ული', - 'Module Mod Rewrite is installed' => 'მáƒáƒ“ული Mod Rewrite დáƒáƒ§áƒ”ნებულიáƒ', - 'Module SimpleXML is installed' => 'მáƒáƒ“ული SimpleXML დáƒáƒ§áƒ”ნებულიáƒ', - 'PHP 5.2 or greater is required' => 'სáƒáƒ­áƒ˜áƒ áƒáƒ PHP 5.2 áƒáƒœ უფრრáƒáƒ®áƒáƒšáƒ˜', - 'Apache Mod Rewrite is required' => 'სáƒáƒ­áƒ˜áƒ áƒáƒ Apache Mod Rewrite', - 'SimpleXML module is required' => 'სáƒáƒ­áƒ˜áƒ áƒáƒ SimpleXML მáƒáƒ“ული', - 'Field "Site name" is empty' => '"სáƒáƒ˜áƒ¢áƒ˜áƒ¡ სáƒáƒ®áƒ”ლის" ველი áƒáƒ  áƒáƒ áƒ˜áƒ¡ შევსებული', - 'Field "Email" is empty' => '"ელ-ფáƒáƒ¡áƒ¢áƒ˜áƒ¡" ველი áƒáƒ  áƒáƒ áƒ˜áƒ¡ შევსებული', - 'Field "Username" is empty' => '"მáƒáƒ›áƒ®áƒ›áƒáƒ áƒ”ბლის სáƒáƒ®áƒ”ლის" ველი áƒáƒ  áƒáƒ áƒ˜áƒ¡ შევსებული', - 'Field "Password" is empty' => '"პáƒáƒ áƒáƒšáƒ˜áƒ¡" ველი áƒáƒ  áƒáƒ áƒ˜áƒ¡ შევსებული', - 'Field "Site url" is empty' => '"სáƒáƒ˜áƒ¢áƒ˜áƒ¡ áƒáƒ“რესის" ველი áƒáƒ  áƒáƒ áƒ˜áƒ¡ შევსებული', - 'Email not valid' => 'ელ-ფáƒáƒ¡áƒ¢áƒ áƒáƒ áƒáƒ¡áƒ¬áƒáƒ áƒ˜áƒ', - 'Install' => 'დáƒáƒ§áƒ”ნებáƒ', - '...Monstra says...' => '...Monstra áƒáƒ›áƒ‘áƒáƒ‘ს...', - 'Sitemap file writable' => 'სáƒáƒ˜áƒ¢áƒ˜áƒ¡ რუქის ჩáƒáƒ¬áƒ”რრშესáƒáƒ«áƒšáƒ”ბელიáƒ', - 'Sitemap file not writable' => 'სáƒáƒ˜áƒ¢áƒ˜áƒ¡ რუქის ჩáƒáƒ¬áƒ”რრშეუძლებელიáƒ', - 'Main .htaccess file writable' => 'მთáƒáƒ•áƒáƒ áƒ˜ .htaccess ფáƒáƒ˜áƒšáƒ˜áƒ¡ ჩáƒáƒ¬áƒ”რრშესáƒáƒ«áƒšáƒ”ბელიáƒ', - 'Main .htaccess file not writable' => 'მთáƒáƒ•áƒáƒ áƒ˜ .htaccess ფáƒáƒ˜áƒšáƒ˜áƒ¡ ჩáƒáƒ¬áƒ”რრშეუძლებელიáƒ', - 'Official Support Forum' => 'áƒáƒ¤áƒ˜áƒªáƒ˜áƒáƒšáƒ£áƒ áƒ˜ დáƒáƒ®áƒ›áƒáƒ áƒ”ბის ფáƒáƒ áƒ£áƒ›áƒ˜', - 'Documentation' => 'დáƒáƒ™áƒ£áƒ›áƒ”ნტáƒáƒªáƒ˜áƒ', - 'Your changes have been saved.' => 'თქვენი ცვლილებები შენáƒáƒ®áƒ£áƒšáƒ˜áƒ.', - ) - ); diff --git a/plugins/box/system/languages/lt.lang.php b/plugins/box/system/languages/lt.lang.php deleted file mode 100644 index a847380..0000000 --- a/plugins/box/system/languages/lt.lang.php +++ /dev/null @@ -1,80 +0,0 @@ - array( - 'System' => 'Sistema', - 'Published a new version of the :monstra' => 'IÅ¡leista nauja :monstra versija', - 'Sitemap created' => 'Sitemap sukurtas', - 'Create Sitemap' => 'Sukurti sitemap', - 'on' => 'įjungti', - 'off'=> 'iÅ¡jungti', - 'Site Url' => 'Tinklapio adresas (url)', - 'Maintenance Mode' => 'Remonto režimas', - 'Maintenance Mode On' => 'Ä®jungti remonto režimÄ…', - 'Maintenance Mode Off' => 'IÅ¡jungti remonto režimÄ…', - 'Site Settings' => 'Tinklapio nustatymai', - 'System Settings' => 'Sistemos nustatymai', - 'Site Name' => 'Tinklapio pavadinimas', - 'Site Description' => 'Tinklapio apraÅ¡ymas', - 'Site Keywords' => 'Tinklapio raktažodžiai', - 'Site Slogan' => 'Tinklapio šūkis', - 'Default Page' => 'Pagrindinis puslapis', - 'Time zone' => 'Laiko zona', - 'Language' => 'Kalba', - 'Email' => 'El. paÅ¡tas', - 'Save' => 'IÅ¡saugoti', - 'Site' => 'Tinklapis', - 'System version' => 'Sistemos versija', - 'System version ID' => 'Sistemos versijos ID', - 'GZIP' => 'GZIP', - 'Debugging' => 'Derinimas', - 'Plugin API' => 'Ä®skiepių API', - 'Plugins active' => 'AktyvÅ«s įskiepiai', - 'Actions registered' => 'Veiksmai užregistruoti', - 'Filters registered' => 'Filtrai užregistruoti', - 'Delete Temporary Files' => 'Trinti laikinas bylas', - 'Download the latest version' => 'Atsisiųsti naujausiÄ… versijÄ…', - 'Powered by' => 'Veikia su', - 'Administration' => 'Administravimas', - 'Settings' => 'Nustatymai', - 'Temporary files deleted' => 'Laikinos bylos iÅ¡trintos', - 'Extends' => 'IÅ¡plÄ—timas', - 'View Site' => 'PeržiÅ«rÄ—ti tinklapį', - 'Welcome, :username' => 'Sveiki, :username', - 'Reset Password' => 'Gauti naujÄ… slaptažodį', - 'Back to Website' => 'Grįžti į tinklapį', - 'Forgot your password ?' => 'PamiÅ¡ote slaptažodį ?', - 'Administration' => 'Administravimas', - 'Send New Password' => 'Siųsti naujÄ… slaptažodį', - 'This user does not exist' => 'Tokio naudotojo nÄ—ra', - 'Version' => 'Versija', - 'Plugin does not exist' => 'Papildinio nÄ—ra', - - 'Install script writable' => 'Galima raÅ¡yti į diegimo scenarijų', - 'Install script not writable' => 'Negalima raÅ¡yti į diegimo scenarijų', - 'Directory: :dir writable' => 'Aplankas: galima raÅ¡yti į :dir ', - 'Directory: :dir not writable' => 'Aplankas: negalima raÅ¡yti į :dir ', - 'PHP Version' => 'PHP versija', - 'Module DOM is installed' => 'DOM modulis yra įdiegtas', - 'Module DOM is required' => 'Reikalingas DOM modulis', - 'Module Mod Rewrite is installed' => 'Apache Mod Rewrite yra įdiegtas', - 'Module SimpleXML is installed' => 'SimpleXML modulis yra įdiegtas', - 'PHP 5.2 or greater is required' => 'Reikalingas PHP 5.2 ar naujesnis', - 'Apache Mod Rewrite is required' => 'Reikalingas Apache Mod Rewrite', - 'SimpleXML module is required' => 'Reikalingas SimpleXML modulis', - 'Field "Site name" is empty' => 'Laukas „Tinklapio pavadimas“ yra tuÅ¡Äias', - 'Field "Email" is empty' => 'Laukas „El. paÅ¡tas“ yra tuÅ¡Äias', - 'Field "Username" is empty' => 'Laukas „Prisijungimo vardas“ yra tuÅ¡Äias', - 'Field "Password" is empty' => 'Laukas „Slaptažodis“ yra tuÅ¡Äias', - 'Field "Site url" is empty' => 'Laukas „Tinklapio adresas (url)“ yra tuÅ¡Äias', - 'Email not valid' => 'Neteisingas el. paÅ¡to adresas', - 'Install' => 'Ä®diegti', - '...Monstra says...' => '...Monstra sako...', - 'Sitemap file writable' => 'Galima raÅ¡yti į sitemap bylÄ…', - 'Sitemap file not writable' => 'Negalima raÅ¡yti į sitemap bylÄ…', - 'Main .htaccess file writable' => 'Galima raÅ¡yti į pagrindinÄ™ .htaccess bylÄ…', - 'Main .htaccess file not writable' => 'Negalima raÅ¡yti į pagrindinÄ™ .htaccess bylÄ…', - 'Official Support Forum' => 'Pagalbos forumas', - 'Documentation' => 'Dokumentacija', - ) - ); diff --git a/plugins/box/system/languages/nl.lang.php b/plugins/box/system/languages/nl.lang.php deleted file mode 100644 index 1a118af..0000000 --- a/plugins/box/system/languages/nl.lang.php +++ /dev/null @@ -1,81 +0,0 @@ - array( - 'System' => 'Systeem', - 'Published a new version of the :monstra' => 'Een nieuwe versie van :monstra is gepubliceerd', - 'Sitemap created' => 'Sitemap is aangemaakt', - 'Create Sitemap' => 'Maak sitemap aan', - 'on' => 'Aan', - 'off'=> 'Uit', - 'Site Url' => 'Website URL', - 'Maintenance Mode' => 'Onderhoudsmodus', - 'Maintenance Mode On' => 'Onderhoudsmodus Aan', - 'Maintenance Mode Off' => 'Onderhoudsmodus Uit', - 'Site Settings' => 'Website Instellingen', - 'System Settings' => 'Systeem Instellingen', - 'Site Name' => 'Website Naam', - 'Site Description' => 'Website Beschrijving', - 'Site Keywords' => 'Website Trefwoorden', - 'Site Slogan' => 'Website Slogan', - 'Default Page' => 'Standaard Pagina', - 'Time zone' => 'Tijdzone', - 'Language' => 'Taal', - 'Email' => 'Email', - 'Save' => 'Opslaan', - 'Site' => 'Website', - 'System version' => 'Systeemversie', - 'System version ID' => 'Systeemversie ID', - 'GZIP' => 'GZIP', - 'Debugging' => 'Debuggen', - 'Plugin API' => 'Plugin API', - 'Plugins active' => 'Plugins aktief', - 'Actions registered' => 'Acties opgeslagen', - 'Filters registered' => 'Filters opgeslagen', - 'Log Out' => 'Log uit', - 'Site' => 'Website', - 'Delete Temporary Files' => 'Verwijder tijdelijke bestanden', - 'Download the latest version' => 'Download de laatste versie', - 'Powered by' => 'Mogelijk gemaakt door', - 'Administration' => 'Beheer', - 'Settings' => 'Instellingen', - 'Temporary files deleted' => 'Tijdelijke bestanden verwijderd', - 'Extends' => 'Uitbreidingen', - 'View Site' => 'Bekijk website', - 'Welcome, :username' => 'Welkom, :username', - 'Reset Password' => 'Wachtwoord opnieuw instellen', - 'Back to Website' => 'Terug naar website', - 'Forgot your password ?' => 'Wachtwoord vergeten ?', - 'Administration' => 'Beheer', - 'Send New Password' => 'Verstuur nieuw wachtwoord', - 'This user does not exist' => 'Deze gebruiker bestaat niet', - 'Version' => 'Versie', - - 'Install script writable' => 'Installatiescript schrijfbaar', - 'Install script not writable' => 'Installatiescript niet schrijfbaar', - 'Directory: :dir writable' => 'Map: :dir schrijfbaar', - 'Directory: :dir not writable' => 'Map: :dir niet schrijfbaar', - 'PHP Version' => 'PHP Versie', - 'Module DOM is installed' => 'Modul DOM is geinstalleerd', - 'Module DOM is required' => 'Modul DOM is vereist', - 'Module Mod Rewrite is installed' => 'Modul Mod Rewrite is geinstalleerd', - 'Module SimpleXML is installed' => 'Modul SimpleXML is geinstalleerd', - 'PHP 5.2 or greater is required' => 'PHP 5.2 of nieuwer is vereist', - 'Apache Mod Rewrite is required' => 'Apache Mod Rewrite is vereist', - 'SimpleXML module is required' => 'SimpleXML-Modul is vereist', - 'Field "Site name" is empty' => 'Veld "Website naam" is leeg', - 'Field "Email" is empty' => 'Veld "Email" is leeg', - 'Field "Username" is empty' => 'Veld "Gebruikersnaam" is leeg', - 'Field "Password" is empty' => 'Veld "Wachtwoord" is leeg', - 'Field "Site url" is empty' => 'Veld "Website-URL" is leeg', - 'Email not valid' => 'E-Mail is niet geldig', - 'Install' => 'Installeren', - '...Monstra says...' => '...Monstra zegt...', - 'Sitemap file writable' => 'Sitemap-bestand schrijfbaar', - 'Sitemap file not writable' => 'Sitemap-bestand niet schrijfbaar', - 'Main .htaccess file writable' => 'Hoofd .htaccess-bestand schrijfbaar', - 'Main .htaccess file not writable' => 'Hoofd .htaccess-bestand niet schrijfbaar', - 'Official Support Forum' => 'Officeel ondersteuningsforum', - 'Documentation' => 'Documentatie', - ) - ); diff --git a/plugins/box/system/languages/pl.lang.php b/plugins/box/system/languages/pl.lang.php deleted file mode 100644 index 7301cab..0000000 --- a/plugins/box/system/languages/pl.lang.php +++ /dev/null @@ -1,83 +0,0 @@ - array( - 'System' => 'System', - 'Published a new version of the :monstra' => 'Opublikowano nowÄ… wersjÄ™ systemu :monstra', - 'Sitemap created' => 'Utworzono mapÄ™ witryny', - 'Create Sitemap' => 'Utwórz mapÄ™ witryny', - 'on' => 'włączone', - 'off'=> 'wyłączone', - 'Site Url' => 'Adres URL witryny', - 'Maintenance Mode' => 'Tryb konserwacji', - 'Maintenance Mode On' => 'Włącz tryb konserwacji', - 'Maintenance Mode Off' => 'Wyłącz tryb konserwacji', - 'Site Settings' => 'Ustawienia witryny', - 'System Settings' => 'Ustawienia systemu', - 'Site Name' => 'Nazwa witryny', - 'Site Description' => 'Opis witryny', - 'Site Keywords' => 'SÅ‚owa kluczowe dla witryny', - 'Site Slogan' => 'Dewiza witryny', - 'Default Page' => 'Strona domyÅ›lna', - 'Time zone' => 'Strefa czasowa', - 'Language' => 'JÄ™zyk', - 'Email' => 'Email', - 'Save' => 'Zapisz', - 'Site' => 'Witryna', - 'System version' => 'Wersja systemu', - 'System version ID' => 'Id wersji systemu', - 'GZIP' => 'GZIP', - 'Debugging' => 'Odpluskwianie', - 'Plugin API' => 'API wtyczek', - 'Plugins active' => 'Aktywne wtyczki', - 'Actions registered' => 'Zarejestrowane akcje', - 'Filters registered' => 'Zarejestrowane filtry', - 'Delete Temporary Files' => 'UsuÅ„ pliki tymczasowe', - 'Download the latest version' => 'Pobierz najnowszÄ… wersjÄ™', - 'Powered by' => 'NapÄ™dzane przez', - 'Administration' => 'Administracja', - 'Settings' => 'Ustawienia', - 'Temporary files deleted' => 'UsuniÄ™to pliki tymczasowe', - 'Extends' => 'Rozszerzenia', - 'View Site' => 'Pokaż witrynÄ™', - 'Welcome, :username' => 'Witaj, :username', - 'Reset Password' => 'Resetuj hasÅ‚o', - 'Back to Website' => 'Wróć do witryny internetowej', - 'Forgot your password ?' => 'Nie pamiÄ™tasz swojego hasÅ‚a ?', - 'Administration' => 'Administracja', - 'Send New Password' => 'WyÅ›lij nowe hasÅ‚o', - 'This user does not exist' => 'Ten użytkownik nie istnieje', - 'Version' => 'Wersja', - 'Plugin does not exist' => 'Wtyczka nie istnieje', - 'Help' => 'Pomoc', - - 'Install script writable' => 'Skrypt instalacyjny ma możliwość zapisu', - 'Install script not writable' => 'Skrypt instalacyjny nie ma możliwoÅ›ci zapisu', - 'Directory: :dir writable' => 'Katalog: :dir z możliwoÅ›ciÄ… zapisu', - 'Directory: :dir not writable' => 'Katalog: :dir bez możliwoÅ›ci zapisu', - 'PHP Version' => 'Wersja PHP', - 'Module DOM is installed' => 'ModuÅ‚ DOM jest zainstalowany', - 'Module DOM is required' => 'ModuÅ‚ DOM jest wymagany', - 'Module Mod Rewrite is installed' => 'ModuÅ‚ Mod Rewrite jest zainstalowany', - 'Module SimpleXML is installed' => 'ModuÅ‚ SimpleXML jest zainstalowany', - 'PHP 5.2 or greater is required' => 'Wymagane jest PHP 5.2 lub nowsze', - 'Apache Mod Rewrite is required' => 'Apache Mod Rewrite jest wymagany', - 'SimpleXML module is required' => 'ModuÅ‚ SimpleXML jest wymagany', - 'Field "Site name" is empty' => 'Pole "Nazwa witryny" jest puste', - 'Field "Email" is empty' => 'Pole "Email" jest puste', - 'Field "Username" is empty' => 'Pole "Nazwa użytkownika" jest puste', - 'Field "Password" is empty' => 'Pole "HasÅ‚o" jest puste', - 'Field "Site url" is empty' => 'Pole "URL witryny" jest puste', - 'Email not valid' => 'Email jest nieprawidÅ‚owy', - 'Continue' => 'Kontynuuj', - 'Install' => 'Instaluj', - '...Monstra says...' => '...Monstra mówi...', - 'Sitemap file writable' => 'Plik mapy witryny ma możliwość zapisu', - 'Sitemap file not writable' => 'Plik mapy witryny nie ma możliwoÅ›ci zapisu', - 'Main .htaccess file writable' => 'Główny plik .htaccess ma możliwość zapisu', - 'Main .htaccess file not writable' => 'Główny plik .htaccess nie ma możliwoÅ›ci zapisu', - 'Official Support Forum' => 'Wsparcie oficjalnego forum', - 'Documentation' => 'Dokumentacja', - 'Your changes have been saved.' => 'Twoje zmiany zostaÅ‚y zapisane.', - ) - ); diff --git a/plugins/box/system/languages/pt-br.lang.php b/plugins/box/system/languages/pt-br.lang.php deleted file mode 100644 index db68c03..0000000 --- a/plugins/box/system/languages/pt-br.lang.php +++ /dev/null @@ -1,77 +0,0 @@ - array( - 'System' => 'Sistema', - 'Published a new version of the :monstra' => 'Foi publicada uma nova versão do :monstra', - 'Sitemap created' => 'Mapa do site criado', - 'Create Sitemap' => 'Criar mapa do site', - 'on' => 'on', - 'off'=> 'off', - 'Site url' => 'URL do site', - 'Maintenance Mode' => 'Modo de manutenção', - 'Maintenance Mode On' => 'Modo de manutenção online', - 'Maintenance Mode Off' => 'Modo de manutenção offline', - 'Site Settings' => 'Configurações do site', - 'System Settings' => 'Configurações do sistema', - 'Site Name' => 'Nome do site', - 'Site Description' => 'Descrição do site', - 'Site Keywords' => 'Keywords do site', - 'Site Slogan' => 'Slogan do site', - 'Default Page' => 'Página padrão', - 'Time zone' => 'Timezone padrão', - 'Language' => 'Linguagem', - 'Email' => 'Email', - 'Save' => 'Salvar', - 'System version' => 'Versão do sistema', - 'System version ID' => 'ID (longo) da versão do sistema', - 'GZIP' => 'GZIP', - 'Debugging' => 'Debugando', - 'Plugin API' => 'API do Plugin', - 'Plugins active' => 'Plugins ativos', - 'Actions registered' => 'Ações registradas', - 'Filters registered' => 'Filtros registrados', - 'Delete Temporary Files' => 'Deletar arquivo temporário', - 'Download the latest version' => 'Baixar a última versão', - 'Powered by' => 'Feito com', - 'Administration' => 'Administração', - 'Settings' => 'Configurações', - 'Temporary files deleted' => 'Arquivos temporários deletados', - 'Extends' => 'Extender', - 'View Site' => 'Ver Site', - 'Welcome, :username' => 'Olá, :username', - 'Reset Password' => 'Resetar senha', - 'Back to Website' => 'Voltar para o site', - 'Forgot your password ?' => 'Esqueceu sua senha ?', - 'Administration' => 'Administração', - 'Send New Password' => 'Enviar nova senha', - 'This user does not exist' => 'Este usuário não existe', - 'Version' => 'Versão', - 'Install script writable' => 'Script de instalação com permissões de escrita', - 'Install script not writable' => 'Script de instalação sem permissões de escrita', - 'Directory: :dir writable' => 'Diretório: :dir com permissões de escrita', - 'Directory: :dir not writable' => 'Diretório: :dir sem permissões de escrita', - 'PHP Version' => 'Versão do PHP', - 'Module DOM is installed' => 'O módulo DOM está instalado', - 'Module DOM is required' => 'O módulo DOM é necessário', - 'Module Mod Rewrite is installed' => 'O módulo mod_rewrite está instalado', - 'Module SimpleXML is installed' => 'O module SimpleXML está instalado', - 'PHP 5.2 or greater is required' => 'A versão do PHP precisa ser acima da 5.2.*', - 'Apache Mod Rewrite is required' => 'O módulo mod_rewrite do apache é requerido', - 'SimpleXML module is required' => 'o módulo SimpleXML é requerido', - 'Field "Site name" is empty' => 'O campo "Nome do site" está vazio', - 'Field "Email" is empty' => 'O campo "Email" está vazio', - 'Field "Username" is empty' => 'O campo "Usuário" está vazio', - 'Field "Password" is empty' => 'O campo "Senha" está vazio', - 'Field "Site url" is empty' => 'O campo "URL do site" está vazio', - 'Email not valid' => 'Email inválido', - 'Install' => 'Instalar', - '...Monstra says...' => '... O Monstra diz ...', - 'Sitemap file writable' => 'O arquivo \'sitemap.xml\' tem permissões de escrita', - 'Sitemap file not writable' => 'O arquivo \'sitemap.xml\' não tem permissões de escrita', - 'Main .htaccess file writable' => 'O arquivo .htaccess principal tem permissões de escrita', - 'Main .htaccess file not writable' => 'O arquivo .htacces principal não tem permissões de escrita', - 'Official Support Forum' => 'Official Support Forum', - 'Documentation' => 'Documentation', - ) - ); diff --git a/plugins/box/system/languages/ru.lang.php b/plugins/box/system/languages/ru.lang.php deleted file mode 100644 index a936b9a..0000000 --- a/plugins/box/system/languages/ru.lang.php +++ /dev/null @@ -1,82 +0,0 @@ - array( - 'System' => 'СиÑтема', - 'Published a new version of the :monstra' => 'Опубликована Ð½Ð¾Ð²Ð°Ñ Ð²ÐµÑ€ÑÐ¸Ñ :monstra', - 'Sitemap created' => 'Карта Ñайта Ñоздана', - 'Create Sitemap' => 'Создать карту Ñайта', - 'on' => 'включен', - 'off'=> 'выключен', - 'Site Url' => 'ÐÐ´Ñ€ÐµÑ Ñайта', - 'Maintenance Mode' => 'Тех. обÑлуживание', - 'Maintenance Mode On' => 'Включить тех. обÑлуживание', - 'Maintenance Mode Off' => 'Выключить тех. обÑлуживание', - 'Site Settings' => 'ÐаÑтройки Ñайта', - 'System Settings' => 'ÐаÑтройки ÑиÑтемы', - 'Site Name' => 'Ðазвание Ñайта', - 'Site Description' => 'ОпиÑание Ñайта', - 'Site Keywords' => 'Ключевые Ñлова', - 'Site Slogan' => 'Слоган', - 'Default Page' => 'Страница по умолчанию', - 'Time zone' => 'Ð’Ñ€ÐµÐ¼ÐµÐ½Ð½Ð°Ñ Ð·Ð¾Ð½Ð°', - 'Language' => 'Язык', - 'Email' => 'Эл. почта', - 'Save' => 'Сохранить', - 'System version' => 'ВерÑÐ¸Ñ ÑиÑтемы', - 'System version ID' => 'ВерÑÐ¸Ñ ÑиÑтемы ID', - 'GZIP' => 'Cжатие GZIP', - 'Debugging' => 'Дебаггинг', - 'Plugin API' => 'Plugin API', - 'Plugins active' => 'Подключенные плагины', - 'Actions registered' => 'ЗарегиÑтрированные Ñкшны', - 'Filters registered' => 'ЗарегиÑтрированные фильтры', - 'Delete Temporary Files' => 'Удалить временные файлы', - 'Download the latest version' => 'Скачать поÑледнюю верÑию', - 'Powered by' => 'Работает на', - 'Administration' => 'ÐдминиÑтрирование', - 'Settings' => 'ÐаÑтройки', - 'Temporary files deleted' => 'Временные файлы удалены', - 'Extends' => 'РаÑширениÑ', - 'View Site' => 'Сайт', - 'Welcome, :username' => 'Добро пожаловать, :username', - 'Reset Password' => 'Ð¡Ð±Ñ€Ð¾Ñ Ð¿Ð°Ñ€Ð¾Ð»Ñ', - 'Back to Website' => 'ВернутьÑÑ Ð½Ð° Ñайт', - 'Forgot your password ?' => 'Забыли пароль ?', - 'Administration' => 'ÐдминиÑтрирование', - 'Send New Password' => 'Отправить новый пароль', - 'This user does not exist' => 'Такого Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð½Ðµ ÑущеÑтвует', - 'Version' => 'ВерÑиÑ', - 'Plugin does not exist' => 'Такого плагина не ÑущеÑтвует', - 'Help' => 'Помощь', - 'Continue' => 'Продолжить', - - 'Install script writable' => 'УÑтановочный Ñкрипт доÑтупен Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи', - 'Install script not writable' => 'УÑтановочный Ñкрипт не доÑтупен Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи', - 'Directory: :dir writable' => 'Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ :dir доÑтупна Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи', - 'Directory: :dir not writable' => 'Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ :dir не доÑтупна Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи', - 'PHP Version' => 'ВерÑÐ¸Ñ PHP', - 'Module DOM is installed' => 'Модуль DOM уÑтановлен', - 'Module DOM is required' => 'ТребуетÑÑ DOM модуль', - 'Module Mod Rewrite is installed' => 'Модуль Mod Rewrite уÑтановлен', - 'Module SimpleXML is installed' => 'Модуль SimpleXML уÑтановлен', - 'PHP 5.2 or greater is required' => 'PHP 5.2 или выÑше', - 'Apache Mod Rewrite is required' => 'ТребуетÑÑ Apache Mod Rewrite', - 'SimpleXML module is required' => 'ТребуетÑÑ SimpleXML модуль', - 'Field "Site name" is empty' => 'Поле "Ðазвание Ñайта" не заполнено', - 'Field "Email" is empty' => 'Поле "Эл. почта" не заполнено', - 'Field "Username" is empty' => 'Поле "Ð˜Ð¼Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ" не заполнено', - 'Field "Password" is empty' => 'Поле "Пароль" не заполнено', - 'Field "Site url" is empty' => 'Поле "ÐÐ´Ñ€ÐµÑ Ñайта" не заполнено', - 'Email not valid' => 'Эл. почта недейÑтвительна', - 'Install' => 'УÑтановить', - '...Monstra says...' => '...Monstra говорит...', - 'Sitemap file writable' => 'Карта Ñайта доÑтупна Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи', - 'Sitemap file not writable' => 'Карта Ñайта не доÑтупна Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи', - 'Main .htaccess file writable' => 'Главный .htaccess файл доÑтупен Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи', - 'Main .htaccess file not writable' => 'Главный .htaccess файл не доÑтупен Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи', - 'Official Support Forum' => 'Официальный Форум Поддержки', - 'Documentation' => 'ДокументациÑ', - 'Your changes have been saved.' => 'Ваши Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ñохранены.', - ) - ); diff --git a/plugins/box/system/languages/sk.lang.php b/plugins/box/system/languages/sk.lang.php deleted file mode 100644 index fbfdfd9..0000000 --- a/plugins/box/system/languages/sk.lang.php +++ /dev/null @@ -1,80 +0,0 @@ - array( - 'System' => 'Systém', - 'Published a new version of the :monstra' => 'Bola vydaná nová verzia :monstra', - 'Sitemap Created' => 'Mapa webstránky bola vytvorená', - 'Create Sitemap' => 'VytvoriÅ¥ mapu webstránky', - 'on' => 'Zapnúť', - 'off'=> 'Vypnúť', - 'Site url' => 'URL Webstránky', - 'Maintenance Mode' => 'Údržba webstránky', - 'Maintenance Mode On' => 'Zapnúť údržbu webstránky', - 'Maintenance Mode Off' => 'Vypnúť údržbu webstránky', - 'Site Settings' => 'Nastavenia webstránky', - 'System Settings' => 'Nastavenia systému', - 'Site Name' => 'Názov webstránky', - 'Site Description' => 'Popis webstránky', - 'Site Keywords' => 'KľúÄové slová webstránky', - 'Site Slogan' => 'Slogan webstránky', - 'Default Page' => 'Základná stránka - Default page', - 'Time zone' => 'ÄŒasové pásmo', - 'Language' => 'Jazyk', - 'Email' => 'Email', - 'Save' => 'UložiÅ¥', - 'System version' => 'Verzia systému', - 'System version ID' => 'ID verzie systému', - 'GZIP' => 'GZIP', - 'Debugging' => 'Ladenie', - 'Plugin API' => 'Plugin API', - 'Plugins active' => 'Aktívne pluginy', - 'Actions registered' => 'Registrované akcie', - 'Filters registered' => 'Registrované filtre', - 'Core' => 'Jadro', - 'Delete Temporary Files' => 'VymazaÅ¥ doÄasné súbory', - 'Download the latest version' => 'StiahnuÅ¥ najnovÅ¡iu verziu', - 'Powered by' => 'Beží na', - 'Administration' => 'Administrácia', - 'Settings' => 'Nastavenia', - 'Temporary files deleted' => 'DoÄasné súbory boli vymazané', - 'Extends' => 'Rozšírenia', - 'View Site' => 'ZobraziÅ¥ webstránku', - 'Welcome, :username' => 'Vitaj, :username', - 'Reset Password' => 'ObnoviÅ¥ heslo', - 'Back to Website' => 'Späť na webstránku', - 'Forgot your password ?' => 'Zabudli ste heslo ?', - 'Administration' => 'Administrácia', - 'Send New Password' => 'ZaslaÅ¥ nové heslo', - 'This user does not exist' => 'Tento používateľ neexistuje', - 'Version' => 'Verzia', - 'Plugin does not exist' => 'Plugin neexistuje', - - 'Install script writable' => 'InÅ¡talaÄný skript je zapisovateľný', - 'Install script not writable' => 'InÅ¡talaÄný skript nie je zapisovateľný', - 'Directory: :dir writable' => 'PrieÄinok: :dir je zapisovateľný', - 'Directory: :dir not writable' => 'PrieÄinok: :dir nie je zapisovateľný', - 'PHP Version' => 'Verzia PHP', - 'Module DOM is installed' => 'Modul DOM je nainÅ¡talovaný', - 'Module DOM is required' => 'Modul DOM je požadovaný', - 'Module Mod Rewrite is installed' => 'Modul Apache Rewrite je nainÅ¡talovaný', - 'Module SimpleXML is installed' => 'Modul SimpleXML je nainÅ¡talovaný', - 'PHP 5.2 or greater is required' => 'PHP 5.2 alebo vyšší je požadovaný', - 'Apache Mod Rewrite is required' => 'Modul Apache Rewrite je požadovaný', - 'SimpleXML module is required' => 'SimpleXML modul je požadovaný', - 'Field "Site name" is empty' => 'PolíÄko "Názov webstránky" je prázdne', - 'Field "Email" is empty' => 'PolíÄko "Email" je prázdne', - 'Field "Username" is empty' => 'PolíÄko "Používateľ" je prázdne', - 'Field "Password" is empty' => 'PolíÄko "Heslo" je prázdne', - 'Field "Site url" is empty' => 'PolíÄko "URL webstránky" je prázdne', - 'Email not valid' => 'Email nie je v správnom tvare', - 'Install' => 'InÅ¡talovaÅ¥', - '...Monstra says...' => '...Monstra hovorí...', - 'Sitemap file writable' => 'Súbor sitemap je zapisovateľný', - 'Sitemap file not writable' => 'Súbor sitemap nie je zapisovateľný', - 'Main .htaccess file writable' => 'Hlavný súbor .htaccess je zapisovateľný', - 'Main .htaccess file not writable' => 'Hlavný súbor .htaccess nie je zapisovateľný', - 'Official Support Forum' => 'Oficiálna podpora - Fórum', - 'Documentation' => 'Dokumentácia', - ) - ); diff --git a/plugins/box/system/languages/sr.lang.php b/plugins/box/system/languages/sr.lang.php deleted file mode 100644 index 1f43a7f..0000000 --- a/plugins/box/system/languages/sr.lang.php +++ /dev/null @@ -1,82 +0,0 @@ - array( - 'System' => 'Sistem', - 'Published a new version of the :monstra' => 'Objavili smo novu verziju :monstr-e', - 'Sitemap created' => 'Mapa sajta je Kreirana!!!', - 'Create sitemap' => 'Kreiraj Mapu sajta', - 'on' => 'ukljuÄeno', - 'off'=> 'iskljuÄeno', - 'Site url' => 'URL sajta', - 'Maintenance Mode' => 'Mod Održavanja', - 'Maintenance Mode On' => 'UkljuÄi Mod Održavanja', - 'Maintenance Mode Off' => 'IskljuÄi Mod Održavanja', - 'Site settings' => 'PodeÅ¡avanja sajta', - 'System settings' => 'PodeÅ¡avanja sistema', - 'Site name' => 'Ime sajta', - 'Site description' => 'Opis sajta', - 'Site keywords' => 'KljuÄne reÄi sajta', - 'Site slogan' => 'Slogan sajta', - 'Default page' => 'PoÄetna stranica', - 'Time zone' => 'Vremenska zona', - 'Language' => 'Jezik', - 'Email' => 'Email', - 'Save' => 'SaÄuvaj', - 'Site' => 'Sajt', - 'System version' => 'Sistemska verzija', - 'System version ID' => 'ID sistemske verzije', - 'GZIP' => 'GZIP', - 'Debugging' => 'Odklanjanje greÅ¡aka', - 'Plugin API' => 'Dodatak API', - 'Plugins active' => 'Aktivni Dodaci', - 'Actions registered' => 'Akcije su registrovane', - 'Filters registered' => 'Filteri su registrovani', - 'logout' => 'Izloguj se', - 'site' => 'Sajt', - 'Core' => 'Sistem', - 'Delete temporary files' => 'ObriÅ¡i privremene datoteke', - 'Download the latest version' => 'Preuzmi poslednju verziju', - 'Powered by' => 'Pokreće', - 'Administration' => 'Administracija', - 'Settings' => 'Podesavanja', - 'Temporary files deleted' => 'Privremeni fajlovi obrisani', - 'Extends' => 'ProÅ¡irenja', - 'View site' => 'Pogledaj sajt', - 'Welcome, :username' => 'DobrodoÅ¡ao, :username', - 'Reset Password' => 'Resetuj Å¡ifru', - 'Back to Website' => 'Nazad da websajt', - 'Forgot your password ?' => 'Zaboravio si svoju Å¡ifru ?', - 'Administration' => 'Administracija', - 'Send New Password' => 'PoÅ¡alji novu Å¡ifru', - 'This user does not exist' => 'Ovaj korisnik ne postoji', - 'Version' => 'Verzija', - 'Plugin does not exist' => 'Ovaj Dodatak ne postoji', - 'Install script writable' => 'Instaliranje skripte', - 'Install script not writable' => 'Nemoguće je instalirati skriptu', - 'Directory: :dir writable' => 'Direktorijum: :dir dozvoljen za pisanje', - 'Directory: :dir not writable' => 'Direktorijum: :dir nije dozvoljen za posanje', - 'PHP Version' => 'PHP Verzija', - 'Module DOM is installed' => 'Modul DOM je instaliran', - 'Module DOM is required' => 'Modul DOM je Potreban', - 'Module Mod Rewrite is installed' => 'Modul Mod Rewrite je instaliran', - 'Module SimpleXML is installed' => 'Modul SimpleXML je instaliran', - 'PHP 5.2 or greater is required' => 'PHP 5.2 ili noviji je potreban', - 'Apache Mod Rewrite is required' => 'Apache Mod Rewrite je potreban', - 'SimpleXML module is required' => 'SimpleXML modul je potreban', - 'Field "Site name" is empty' => 'Polje "Site name" je prazno', - 'Field "Email" is empty' => 'Polje "Email" je prazno', - 'Field "Username" is empty' => 'Polje "Username" je prazno', - 'Field "Password" is empty' => 'Polje "Password" je prazno', - 'Field "Site url" is empty' => 'Polje "Site url" je prazno', - 'Email not valid' => 'Email nije validan', - 'Install' => 'Instaliraj', - '...Monstra says...' => '...Monstra kaže...', - 'Sitemap file writable' => 'Sitemap Fajl je dozvoljen za pisanje', - 'Sitemap file not writable' => 'Sitemap Fajl nije dozvoljen za pisanje', - 'Main .htaccess file writable' => 'Glavni .htaccess je dozvoljen za pisanje', - 'Main .htaccess file not writable' => 'Glavni .htaccess nije dozvoljen za pisanje', - 'Official Support Forum' => 'ZvaniÄan forum podrÅ¡ke', - 'Documentation' => 'Dokumentacija', - ) - ); diff --git a/plugins/box/system/languages/tr.lang.php b/plugins/box/system/languages/tr.lang.php deleted file mode 100644 index 9e0150c..0000000 --- a/plugins/box/system/languages/tr.lang.php +++ /dev/null @@ -1,83 +0,0 @@ - array( - 'System' => 'Sistem', - 'Published a new version of the :monstra' => ':monstra için yeni bir sürüm yayınlandı.', - 'Sitemap created' => 'Site haritası oluÅŸturuldu.', - 'Create Sitemap' => 'Site Haritası OluÅŸtur', - 'on' => 'açık', - 'off'=> 'kapalı', - 'Site Url' => 'Site Url\'si', - 'Maintenance Mode' => 'Bakım Modu', - 'Maintenance Mode On' => 'Bakım Modunu Aç', - 'Maintenance Mode Off' => 'Bakım Modunu Kapat', - 'Site Settings' => 'Site Ayarları', - 'System Settings' => 'Sistem Ayarları', - 'Site Name' => 'Site Adı', - 'Site Description' => 'Site Açıklaması', - 'Site Keywords' => 'Site Anahtar Sözcükleri', - 'Site Slogan' => 'Site Sloganı', - 'Default Page' => 'Açılış Sayfası', - 'Time zone' => 'Zaman Dilimi', - 'Language' => 'Dil', - 'Email' => 'E-posta', - 'Save' => 'Kaydet', - 'Site' => 'Site', - 'System version' => 'Sistem sürümü', - 'System version ID' => 'Sistem sürüm ID', - 'GZIP' => 'GZIP', - 'Debugging' => 'Hata Ayıklama', - 'Plugin API' => 'Eklenti API\'si', - 'Plugins active' => 'Etkin eklentiler', - 'Actions registered' => 'Kayıtlı eylemler', - 'Filters registered' => 'Kayıtlı filtreler', - 'Delete Temporary Files' => 'Geçici Dosyaları Sil', - 'Download the latest version' => 'En güncel sürümü indir', - 'Powered by' => 'GeliÅŸtiren:', - 'Administration' => 'Yönetim', - 'Settings' => 'Ayarlar', - 'Temporary files deleted' => 'Geçici dosyalar silindi', - 'Extends' => 'Uzantılar', - 'View Site' => 'Siteyi Gör', - 'Welcome, :username' => 'HoÅŸ geldin, :username', - 'Reset Password' => 'Parola Sıfırla', - '< Back to Website' => '< Siteye Dön', - 'Forgot your password? >' => 'Parolanızı unuttunuz mu? >', - 'Administration >' => 'Yönetim >', - 'Send New Password' => 'Yeni Parola Gönder', - 'This user does not exist' => 'Bu kullanıcı bulunamadı', - 'Version' => 'Sürüm', - 'Plugin does not exist' => 'Eklenti bulunamadı', - 'Help' => 'Yardım', - - 'Install script writable' => 'Kurulum betiÄŸi, yazma izinlerine sahip', - 'Install script not writable' => 'Kurulum betiÄŸi, yazma izinlerine sahip deÄŸil', - 'Directory: :dir writable' => ' :dir dizini, yazma izinlerine sahip', - 'Directory: :dir not writable' => ' :dir dizini, yazma izinlerine sahip deÄŸil', - 'PHP Version' => 'PHP Sürümü', - 'Module DOM is installed' => 'DOM modülü kurulu', - 'Module DOM is required' => 'DOM modülü gerekiyor', - 'Module Mod Rewrite is installed' => 'Mod Rewrite modülü kurulu', - 'Module SimpleXML is installed' => 'SimpleXML modülü kurulu', - 'PHP 5.2 or greater is required' => 'PHP 5.2 ya da sonrası gerekiyor', - 'Apache Mod Rewrite is required' => 'Apache Mod Rewrite gerekiyor', - 'SimpleXML module is required' => 'SimpleXML modülü gerekiyor', - 'Field "Site name" is empty' => '"Site Adı" alanı boÅŸ', - 'Field "Email" is empty' => '"E-posta" alanı boÅŸ', - 'Field "Username" is empty' => '"Kullanıcı Adı" alanı boÅŸ', - 'Field "Password" is empty' => '"Parola" alanı boÅŸ', - 'Field "Site url" is empty' => '"Site Url\'si" alanı boÅŸ', - 'Email not valid' => 'E-posta adresi geçersiz', - 'Continue' => 'Devam et', - 'Install' => 'Yükle', - '...Monstra says...' => '...Monstra diyor ki...', - 'Sitemap file writable' => 'Site haritası dosyası, yazma izinlerine sahip', - 'Sitemap file not writable' => 'Site haritası dosyası, yazma izinlerine sahip deÄŸil', - 'Main .htaccess file writable' => 'Ana dizindeki .htaccess dosyası, yazma izinlerine sahip', - 'Main .htaccess file not writable' => 'Ana dizindeki .htaccess dosyası, yazma izinlerine sahip deÄŸil', - 'Official Support Forum' => 'Resmi Destek Forumu', - 'Documentation' => 'Belgeler', - 'Your changes have been saved.' => 'DeÄŸiÅŸiklikleriniz kaydedildi.', - ) - ); diff --git a/plugins/box/system/languages/uk.lang.php b/plugins/box/system/languages/uk.lang.php deleted file mode 100644 index 022c236..0000000 --- a/plugins/box/system/languages/uk.lang.php +++ /dev/null @@ -1,83 +0,0 @@ - array( - 'System' => 'СиÑтема', - 'Published a new version of the :monstra' => 'Опублікована нова верÑÑ–Ñ :monstra', - 'Sitemap created' => 'Мапа Ñайту Ñтворена', - 'Create Sitemap' => 'Створити мапу Ñайту', - 'on' => 'увімкнено', - 'off'=> 'вимкнено', - 'Site Url' => 'ÐдреÑа Ñайту', - 'Maintenance Mode' => 'Технічне обÑлуговуваннÑ', - 'Maintenance Mode On' => 'Увімкнути технічне обÑлуговуваннÑ', - 'Maintenance Mode Off' => 'Вимкнути технічне обÑлуговуваннÑ', - 'Site Settings' => 'ÐÐ°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ñайту', - 'System Settings' => 'ÐÐ°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ ÑиÑтеми', - 'Site Name' => 'Ðазва Ñайту', - 'Site Description' => 'ÐžÐ¿Ð¸Ñ Ñайту', - 'Site Keywords' => 'Ключові Ñлова', - 'Site Slogan' => 'Слоган (гаÑло)', - 'Default Page' => 'Сторінка за замовчуваннÑм', - 'Time zone' => 'ЧаÑовий поÑÑ', - 'Language' => 'Мова', - 'Email' => 'Електронна пошта (Email)', - 'Save' => 'Зберегти', - 'Site' => 'Сайт', - 'System version' => 'ВерÑÑ–Ñ ÑиÑтеми', - 'System version ID' => 'ВерÑÑ–Ñ ÑиÑтеми ID', - 'GZIP' => 'СтиÑÐ½ÐµÐ½Ð½Ñ GZIP', - 'Debugging' => 'Дебаггінг', - 'Plugin API' => 'Плагін API', - 'Plugins active' => 'Підключені плагіни', - 'Actions registered' => 'ЗареєÑтровані дії', - 'Filters registered' => 'ЗареєÑтровані фільтри', - 'Delete Temporary Files' => 'Видалити тимчаÑові файли', - 'Download the latest version' => 'Завантажити оÑтанню верÑÑ–ÑŽ', - 'Powered by' => 'Працює на', - 'Administration' => 'ÐдмініÑтруваннÑ', - 'Settings' => 'ÐалаштуваннÑ', - 'Temporary files deleted' => 'ТимчаÑові файли видалені', - 'Extends' => 'РозширеннÑ', - 'View Site' => 'Сайт', - 'Welcome, :username' => 'ЛаÑкаво проÑимо, :username', - 'Reset Password' => 'Ð¡ÐºÐ¸Ð´Ð°Ð½Ð½Ñ Ð¿Ð°Ñ€Ð¾Ð»Ñ', - 'Back to Website' => 'ПовернутиÑÑ Ð½Ð° Ñайт', - 'Forgot your password ?' => 'Ðе пам’Ñтаєте пароль ?', - 'Administration' => 'ÐдмініÑтруваннÑ', - 'Send New Password' => 'ÐадіÑлати новий пароль', - 'This user does not exist' => 'Такого кориÑтувача не Ñ–Ñнує', - 'Version' => 'ВерÑÑ–Ñ', - 'Plugin does not exist' => 'Такий плагін не Ñ–Ñнує', - 'Help' => 'Довідка', - - 'Install script writable' => 'ІнÑталÑційний Ñкрипт доÑтупний Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñу', - 'Install script not writable' => 'ІнÑталÑційний Ñкрипт не доÑтупний Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñу', - 'Directory: :dir writable' => 'Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ñ–Ñ :dir доÑтупна Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñу', - 'Directory: :dir not writable' => 'Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ñ–Ñ :dir не доÑтупна Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñу', - 'PHP Version' => 'ВерÑÑ–Ñ PHP', - 'Module DOM is installed' => 'Модуль DOM вÑтановлено', - 'Module DOM is required' => 'Потрібен DOM модуль', - 'Module Mod Rewrite is installed' => 'Модуль Mod Rewrite вÑтановлено', - 'Module SimpleXML is installed' => 'Модуль SimpleXML вÑтановлено', - 'PHP 5.2 or greater is required' => 'PHP 5.2 або вище', - 'Apache Mod Rewrite is required' => 'Потрібен Apache Mod Rewrite', - 'SimpleXML module is required' => 'Потрібен SimpleXML модуль', - 'Field "Site name" is empty' => 'Поле "Ðазва Ñайту" не заповнено', - 'Field "Email" is empty' => 'Поле "Ел. пошта" не заповнено', - 'Field "Username" is empty' => 'Поле "Ð†Ð¼â€™Ñ ÐºÐ¾Ñ€Ð¸Ñтувача" не заповнено', - 'Field "Password" is empty' => 'Поле "Пароль" не заповнено', - 'Field "Site url" is empty' => 'Поле "ÐдреÑа Ñайту" не заповнено', - 'Email not valid' => 'Ел. пошта не дійÑна', - 'Continue' => 'Продовжити', - 'Install' => 'ІнÑталювати', - '...Monstra says...' => '... Monstra каже ...', - 'Sitemap file writable' => 'Карта Ñайту доÑтупна Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñу', - 'Sitemap file not writable' => 'Карта Ñайту не доÑтупна Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñу', - 'Main .htaccess file writable' => 'Головний .htaccess файл - доÑтупний Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñу', - 'Main .htaccess file not writable' => 'Головний .htaccess файл - не доÑтупний Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñу', - 'Official Support Forum' => 'Офіційний Форум Підтримки', - 'Documentation' => 'ДокументаціÑ', - 'Your changes have been saved.' => 'Ваші зміни були збережені.', - ) - ); diff --git a/plugins/box/system/languages/zh-cn.lang.php b/plugins/box/system/languages/zh-cn.lang.php deleted file mode 100644 index 22a6ccc..0000000 --- a/plugins/box/system/languages/zh-cn.lang.php +++ /dev/null @@ -1,81 +0,0 @@ - array( - 'System' => '系统管ç†', - 'Published a new version of the :monstra' => 'å‘布一个新版本 :monstra', - 'Sitemap created' => '网站地图已创建', - 'Create Sitemap' => '创建网站地图', - 'on' => 'å¼€', - 'off'=> 'å…³', - 'Site Url' => '网站 Url', - 'Maintenance Mode' => '维护模å¼', - 'Maintenance Mode On' => '维护模å¼å¼€', - 'Maintenance Mode Off' => '维护模å¼å…³', - 'Site Settings' => '网站设置', - 'System Settings' => '系统设置', - 'Site Name' => '网站åç§°', - 'Site Description' => '网站æè¿°', - 'Site Keywords' => '文章关键è¯', - 'Site Slogan' => '网站å£å·', - 'Default Page' => '默认页é¢', - 'Time zone' => '时区', - 'Language' => '语言', - 'Email' => '邮箱', - 'Save' => 'ä¿å­˜', - 'Site' => '网站', - 'System version' => '系统版本', - 'System version ID' => '系统版本 ID', - 'GZIP' => 'GZIP', - 'Debugging' => '调试', - 'Plugin API' => 'æ’ä»¶ API', - 'Plugins active' => 'æ’件激活', - 'Actions registered' => '注册æ“作', - 'Filters registered' => '注册过滤', - 'Delete Temporary Files' => '删除临时文件', - 'Download the latest version' => '下载最新的版本', - 'Powered by' => '技术支æŒ', - 'Administration' => 'åŽå°ç®¡ç†', - 'Settings' => '设置', - 'Temporary files deleted' => '临时文件已删除', - 'Extends' => '扩展管ç†', - 'View Site' => '查看网站', - 'Welcome, :username' => '欢迎, :username', - 'Reset Password' => 'é‡è®¾å¯†ç ', - 'Back to Website' => '返回网站', - 'Forgot your password ?' => 'å¿˜è®°å¯†ç  ï¼Ÿ', - 'Administration' => '管ç†', - 'Send New Password' => 'å‘逿–°å¯†ç ', - 'This user does not exist' => '此用户ä¸å­˜åœ¨', - 'Version' => '版本', - 'Plugin does not exist' => 'æ’ä»¶ä¸å­˜åœ¨', - - 'Install script writable' => '安装脚本å¯å†™', - 'Install script not writable' => '安装脚本ä¸å¯å†™', - 'Directory: :dir writable' => '目录: :dir å¯å†™', - 'Directory: :dir not writable' => '目录: :dir ä¸å¯å†™', - 'PHP Version' => 'PHP 版本', - 'Module DOM is installed' => 'æ¨¡å— DOM 已安装', - 'Module DOM is required' => 'æ¨¡å— DOM 是必需的', - 'Module Mod Rewrite is installed' => 'æ¨¡å— Mod Rewrite 已安装', - 'Module SimpleXML is installed' => 'æ¨¡å— SimpleXML 已安装', - 'PHP 5.2 or greater is required' => '必须是 PHP 5.2 或更高版本', - 'Apache Mod Rewrite is required' => 'å¿…é¡»å¼€å¯ Apache Mod Rewrite', - 'SimpleXML module is required' => 'å¿…é¡»å¼€å¯ SimpleXML 模å—', - 'Field "Site name" is empty' => '"网站åç§°" 字段为空', - 'Field "Email" is empty' => '"邮箱地å€" 字段为空', - 'Field "Username" is empty' => '"用户å" 字段为空', - 'Field "Password" is empty' => '"密ç " 字段为空', - 'Field "Site url" is empty' => '"网站 url" 字段为空', - 'Email not valid' => 'é‚®ç®±åœ°å€æ— æ•ˆ', - 'Install' => '安装', - '...Monstra says...' => '...Monstra æç¤º...', - 'Sitemap file writable' => '网站地图文件å¯å†™', - 'Sitemap file not writable' => '网站地图文件ä¸å¯å†™', - 'Main .htaccess file writable' => 'ä¸»è¦ .htaccess 文件å¯å†™', - 'Main .htaccess file not writable' => 'ä¸»è¦ .htaccess 文件ä¸å¯å†™', - 'Official Support Forum' => '官方支æŒè®ºå›', - 'Documentation' => '文档', - 'Your changes have been saved.' => '您的更改已ä¿å­˜ã€‚', - ) - ); diff --git a/plugins/box/system/system.admin.php b/plugins/box/system/system.admin.php deleted file mode 100755 index b1372aa..0000000 --- a/plugins/box/system/system.admin.php +++ /dev/null @@ -1,156 +0,0 @@ - - $.getJSON("http://monstra.org/api/version.php?jsoncallback=?", - function(data){ - var current_monstra_version = "'.Monstra::VERSION.'"; - var stable_monstra_version = data.version; - if (current_monstra_version < stable_monstra_version) { - $("#update-monstra").addClass("alert alert-info").html("'.__("Published a new version of the :monstra", "system", array(":monstra" => "Monstra")).'"); - } - } - ); - - '); -} - -/** - * System Admin - */ -class SystemAdmin extends Backend -{ - /** - * System plugin admin - */ - public static function main() - { - if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) { - - $filters = Filter::$filters; - $plugins = Plugin::$plugins; - $components = Plugin::$components; - $actions = Action::$actions; - - // Get pages table - $pages = new Table('pages'); - - // Get system timezone - $system_timezone = Option::get('timezone'); - - // Get languages files - $language_files = File::scan(PLUGINS_BOX . DS . 'system' . DS . 'languages' . DS, '.lang.php'); - foreach ($language_files as $language) { - $parts = explode('.', $language); - $languages_array[$parts[0]] = I18n::$locales[$parts[0]]; - } - - // Get all pages - $pages_array = array(); - $pages_list = $pages->select('[slug!="error404" and parent="" and status="published"]'); - foreach ($pages_list as $page) { - $pages_array[$page['slug']] = Html::toText($page['title']); - } - - // Create Sitemap - // ------------------------------------- - if (Request::get('sitemap') == 'create') { - - if (Security::check(Request::get('token'))) { - - Notification::set('success', __('Sitemap created', 'system')); - - Sitemap::create(); - - Request::redirect('index.php?id=system'); - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - - } - - // Delete temporary files - // ------------------------------------- - if (Request::get('temporary_files') == 'delete') { - - if (Security::check(Request::get('token'))) { - - Monstra::cleanTmp(); - - if (count(File::scan(MINIFY, array('css', 'js', 'php'))) == 0 && count(Dir::scan(CACHE)) == 0) { - Notification::set('success', __('Temporary files deleted', 'system')); - Request::redirect('index.php?id=system'); - } - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - } - - // Set maintenance state on or off - // ------------------------------------- - if (Request::get('maintenance')) { - - if (Security::check(Request::get('token'))) { - - if ('on' == Request::get('maintenance')) { - Option::update('maintenance_status', 'on'); - Request::redirect('index.php?id=system'); - } - - if ('off' == Request::get('maintenance')) { - Option::update('maintenance_status', 'off'); - Request::redirect('index.php?id=system'); - } - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - } - - // Edit settings - // ------------------------------------- - if (Request::post('edit_settings')) { - - if (Security::check(Request::post('csrf'))) { - - // Add trailing slashes - $_site_url = Request::post('system_url'); - - Option::update(array('sitename' => Request::post('site_name'), - 'keywords' => Request::post('site_keywords'), - 'description' => Request::post('site_description'), - 'slogan' => Request::post('site_slogan'), - 'defaultpage' => Request::post('site_default_page'), - 'siteurl' => $_site_url, - 'timezone' => Request::post('system_timezone'), - 'system_email' => Request::post('system_email'), - 'language' => Request::post('system_language'), - 'maintenance_message' => Request::post('site_maintenance_message'))); - - Notification::set('success', __('Your changes have been saved.', 'system')); - Request::redirect('index.php?id=system'); - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - } - - // Its mean that you can add your own actions for this plugin - Action::run('admin_system_extra_actions'); - - // Display view - View::factory('box/system/views/backend/index') - ->assign('pages_array', $pages_array) - ->assign('languages_array', $languages_array) - ->display(); - - } else { - - Request::redirect('index.php?id=users&action=edit&user_id='.Session::get('user_id')); - } - } -} diff --git a/plugins/box/system/system.plugin.php b/plugins/box/system/system.plugin.php deleted file mode 100644 index 33b6469..0000000 --- a/plugins/box/system/system.plugin.php +++ /dev/null @@ -1,37 +0,0 @@ - Session::get('user_login'))), 'top', 'users&action=edit&user_id='.Session::get('user_id'), 1, Navigation::TOP, false); - Navigation::add(__('View Site', 'system'), 'top', Option::get('siteurl'), 2, Navigation::TOP, true); - Navigation::add(__('Log Out', 'users'), 'top', '&logout=do', 3, Navigation::TOP, false); - - if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) { - Navigation::add(__('Settings', 'system'), 'system', 'system', 1); - } - -} - -Plugin::Admin('system', 'box'); diff --git a/plugins/box/system/views/backend/index.view.php b/plugins/box/system/views/backend/index.view.php deleted file mode 100755 index ee1fb72..0000000 --- a/plugins/box/system/views/backend/index.view.php +++ /dev/null @@ -1,121 +0,0 @@ - 'btn btn-phone btn-default')).Html::nbsp(2); ?> - 'btn btn-phone btn-default')).Html::nbsp(2); ?> - - 'btn btn-phone btn-default')); ?> - - 'btn btn-phone btn-danger')); ?> - - - -
    - -
    -
    -

    - -
    - 'form-control')) - ); - ?> -
    -
    - 'form-control')) - ); - ?> -
    -
    - 'form-control')) - ); - ?> -
    -
    - 'form-control')) - ); - ?> -
    -
    - 'form-control')) - ); - ?> -
    -
    -
    -

    -
    - 'form-control')) - ); - ?> -
    -
    - 'form-control')) - ); - ?> -
    -
    - 'form-control')) - ); - ?> -
    -
    - 'form-control')) - ); - ?> -
    -
    - 'form-control', 'style' => 'height:160px;')) - ); - ?> -
    -
    -
    - -
    -
    - 'btn btn-phone btn-primary')). - Form::close() - ); - ?> -
    -
    - - diff --git a/plugins/box/themes/install/themes.manifest.xml b/plugins/box/themes/install/themes.manifest.xml deleted file mode 100644 index a6f0d80..0000000 --- a/plugins/box/themes/install/themes.manifest.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - plugins/box/themes/themes.plugin.php - active - 3 - Themes - Themes managment plugin - 1.0.0 - Awilum - http://monstra.org/ - diff --git a/plugins/box/themes/languages/cs.lang.php b/plugins/box/themes/languages/cs.lang.php deleted file mode 100644 index d6a0eb4..0000000 --- a/plugins/box/themes/languages/cs.lang.php +++ /dev/null @@ -1,52 +0,0 @@ - array( - 'Themes' => 'Témata', - 'Themes manager' => 'Manažer témat', - 'Select Theme' => 'Vybrat téma', - 'Save' => 'Uložit', - 'Save and Exit' => 'Uložit a ukonÄit', - 'Name' => 'Název', - 'Create New Template' => 'VytvoÅ™it nové téma', - 'New Template' => 'Nová téma', - 'Delete template: :name' => 'Vymazat téma: :name', - 'Delete chunk: :name' => 'Vymazat sekci: :name', - 'Delete styles: :name' => 'Vymazat CSS styl: :name', - 'Templates' => 'Témy', - 'Clone' => 'Klonovat', - 'Edit' => 'Editovat', - 'Delete' => 'Vymazat', - 'Actions' => 'Akcie', - 'Create New Chunk' => 'VytvoÅ™it novou sekci', - 'New Chunk' => 'Nová sekce', - 'Chunks' => 'Sekce', - 'Create New Styles' => 'VytvoÅ™it nový CSS styl', - 'New Styles' => 'Nový CSS styl', - 'Styles' => 'CSS styly', - 'Template content' => 'Obsah tématu', - 'Styles content' => 'Obsah CSS stylu', - 'Chunk content' => 'Obsah sekce', - 'Edit Template' => 'Editovat téma', - 'Edit Chunk' => 'Editovat sekci', - 'Edit Styles' => 'Editovat CSS styl', - 'Current Site Theme' => 'Aktuální téma webu', - 'Current admin theme' => 'Aktuální téma administrace', - 'This template already exists' => 'Toto téma již existuje', - 'This chunk already exists' => 'Tato sekce již existuje', - 'This styles already exist' => 'Tento CSS styl již existuje', - 'Components templates' => 'Téma komponentů', - 'Your changes to the chunk :name have been saved.' => 'VaÅ¡e zmÄ›ny v sekci :name byly uloženy.', - 'Your changes to the styles :name have been saved.' => 'VaÅ¡e zmÄ›ny v CSS stylu :name byly uloženy.', - 'Your changes to the template :name have been saved.' => 'VaÅ¡e zmÄ›ny v tématu :name byly uloženy.', - 'Chunk :name deleted' => 'Sekce :name odstranÄ›na', - 'Required field' => 'Povinné políÄko', - 'Scripts' => 'Skripty', - 'Site Theme' => 'Téma webu', - 'Admin Theme' => 'Téma administrace', - 'Create New Script' => 'VytvoÅ™it nový skript', - 'Script content' => 'Obsah skriptu', - 'New Script' => 'Nový skript', - 'Edit Script' => 'Editovat skript', - ) - ); diff --git a/plugins/box/themes/languages/de.lang.php b/plugins/box/themes/languages/de.lang.php deleted file mode 100644 index ca93545..0000000 --- a/plugins/box/themes/languages/de.lang.php +++ /dev/null @@ -1,52 +0,0 @@ - array( - 'Themes' => 'Themes', - 'Themes manager' => 'Themes Manager', - 'Select Theme' => 'Wähle Theme', - 'Save' => 'Speichern', - 'Save and Exit' => 'Speichern und Schließen', - 'Name' => 'Name', - 'Create New Template' => 'Erstelle neues Template', - 'New Template' => 'Neues Template', - 'Admin Theme' => 'Admin Theme', - 'Delete template: :name' => 'Lösche Template: :name', - 'Delete chunk: :name' => 'Lösche Chunk: :name', - 'Delete styles: :name' => 'Lösche Styles: :name', - 'Templates' => 'Templates', - 'Clone' => 'Klonen', - 'Edit' => 'Bearbeiten', - 'Delete' => 'Löschen', - 'Actions' => 'Aktionen', - 'Create New Chunk' => 'Erstelle neuen chunk', - 'New Chunk' => 'Neuer Chunk', - 'Chunks' => 'Chunks', - 'Create New Styles' => 'Erstelle neue Styles', - 'New Styles' => 'Neue Styles', - 'Styles' => 'Styles', - 'Template content' => 'Template Inhalt', - 'Styles content' => 'Styles Inhalt', - 'Chunk content' => 'Chunk Inhalt', - 'Edit Template' => 'Bearbeite Template', - 'Edit Chunk' => 'Bearbeite Chunk', - 'Edit Styles' => 'Bearbeite Styles', - 'Current Site Theme' => 'Aktuelles Seiten Template', - 'Current admin theme' => 'Aktuelles Admin Template', - 'This template already exists' => 'Dieses Template existiert bereits', - 'This chunk already exists' => 'Dieser Chunk exisitert bereits', - 'This styles already exists' => 'Diese Styles existieren bereits', - 'Components templates' => 'Komponenten Templates', - 'Your changes to the chunk :name have been saved.' => 'Deine Änderungen für das Chunk :name wurden gespeichert.', - 'Your changes to the styles :name have been saved.' => 'Deine Änderungen für die Styles :name wurden gespeichert.', - 'Your changes to the template :name have been saved.' => 'Deine Änderungen für das Template :name wurden gespeichert.', - 'Chunk :name deleted' => 'Chunk :name deleted', - 'This field should not be empty' => 'Dieses Feld darf nicht leer sein.', - 'Scripts' => 'Scripts', - 'Create New Script' => 'Erstelle neues Script', - 'Script content' => 'Script Inhalt', - 'New Script' => 'Neues Script', - 'Edit Script' => 'Bearbeite Script', - 'Site Theme' => 'Seiten Theme', - ) - ); diff --git a/plugins/box/themes/languages/en.lang.php b/plugins/box/themes/languages/en.lang.php deleted file mode 100644 index b49ab54..0000000 --- a/plugins/box/themes/languages/en.lang.php +++ /dev/null @@ -1,53 +0,0 @@ - array( - 'Themes' => 'Themes', - 'Themes manager' => 'Themes manager', - 'Select Theme' => 'Select Theme', - 'Save' => 'Save', - 'Save and Exit' => 'Save and Exit', - 'Name' => 'Name', - 'Create New Template' => 'Create New Template', - 'New Template' => 'New Template', - 'Delete template: :name' => 'Delete template: :name', - 'Delete chunk: :name' => 'Delete chunk: :name', - 'Delete styles: :name' => 'Delete styles: :name', - 'Templates' => 'Templates', - 'Clone' => 'Clone', - 'Edit' => 'Edit', - 'Delete' => 'Delete', - 'Actions' => 'Actions', - 'Admin Theme' => 'Admin Theme', - 'Create New Chunk' => 'Create New Chunk', - 'New Chunk' => 'New Chunk', - 'Chunks' => 'Chunks', - 'Create New Styles' => 'Create New Styles', - 'New Styles' => 'New Styles', - 'Styles' => 'Styles', - 'Template content' => 'Template content', - 'Styles content' => 'Styles content', - 'Chunk content' => 'Chunk content', - 'Edit Template' => 'Edit Template', - 'Edit Chunk' => 'Edit Chunk', - 'Edit Styles' => 'Edit Styles', - 'Current Site Theme' => 'Current Site Theme', - 'Current admin theme' => 'Current admin theme', - 'This template already exists' => 'This template already exists', - 'This chunk already exists' => 'This chunk already exists', - 'This styles already exist' => 'This styles already exists', - 'Components templates' => 'Components templates', - 'Your changes to the chunk :name have been saved.' => 'Your changes to the chunk :name have been saved.', - 'Your changes to the styles :name have been saved.' => 'Your changes to the styles :name have been saved.', - 'Your changes to the template :name have been saved.' => 'Your changes to the template :name have been saved.', - 'Chunk :name deleted' => 'Chunk :name deleted', - 'Required field' => 'Required field', - 'Scripts' => 'Scripts', - 'Create New Script' => 'Create New Script', - 'Script content' => 'Script content', - 'New Script' => 'New Script', - 'Edit Script' => 'Edit Script', - 'Site Theme' => 'Site Theme', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/themes/languages/es.lang.php b/plugins/box/themes/languages/es.lang.php deleted file mode 100644 index 9e95f9a..0000000 --- a/plugins/box/themes/languages/es.lang.php +++ /dev/null @@ -1,56 +0,0 @@ - array( - 'Themes' => 'Temas', - 'Themes manager' => 'Administrador de temas', - 'Select Theme' => 'Seleccionar tema', - 'Save' => 'Guardar', - 'Save and Exit' => 'Guardar y salir', - 'Name' => 'Nombre', - 'Create New Template' => 'Crear nueva plantilla', - 'New Template' => 'Nueva plantilla', - 'Delete template: :name' => 'Eliminar plantilla: :name', - 'Delete chunk: :name' => 'Eliminar chunk: :name', - 'Delete styles: :name' => 'Eliminar estilo: :name', - 'Templates' => 'Plantillas', - 'Clone' => 'Clonar', - 'Edit' => 'Editar', - 'Delete' => 'Eliminar', - 'Actions' => 'Acciones', - 'Create New Chunk' => 'Crear nuevo chunk', - 'New Chunk' => 'Nuevo chunk', - 'Chunks' => 'Chunks', - 'Create New Styles' => 'Crear nuevo estilo', - 'New Styles' => 'Nuevo estilo', - 'Styles' => 'Estilos', - 'Template content' => 'Contenido de la plantilla', - 'Styles content' => 'Contenido del estilo', - 'Chunk content' => 'Contenido del chunk', - 'Edit Template' => 'Editar plantilla', - 'Edit Chunk' => 'Editar chunk', - 'Edit Styles' => 'Editar estilo', - 'Site Theme' => 'Tema del sitio', - 'Admin Theme' => 'Tema del backend', - 'Current Site Theme' => 'Tema actual del sitio', - 'Current admin theme' => 'Tema actual de administración', - 'This template already exists' => 'Esta plantilla ya existe', - 'This chunk already exists' => 'Este chunk ya existe', - 'This styles already exist' => 'Este estilo ya existe', - 'Components templates' => 'Componentes de plantillas', - 'Your changes to the chunk :name have been saved.' => 'Tus cambios realizados en el chunk :name han sido guardados.', - 'Your changes to the styles :name have been saved.' => 'Tus cambios realizados en el estilo :name han sido guardados.', - 'Your changes to the template :name have been saved.' => 'Tus cambios realizados en la plantilla :name han sido guardados.', - 'Chunk :name deleted' => 'Chunk :name eliminado', - 'Template :name deleted' => 'Plantilla :name eliminada', - 'Styles :name deleted' => 'Estilo :name eliminado', - 'Required field' => 'Dato requerido', - 'Scripts' => 'Scripts', - 'Create New Script' => 'Crear nuevo script', - 'Script content' => 'Contenido del script', - 'New Script' => 'Nuevo script', - 'Edit Script' => 'Editar script', - 'Site Theme' => 'Tema del sitio', - 'Cancel' => 'Cancelar', - ) - ); diff --git a/plugins/box/themes/languages/fa.lang.php b/plugins/box/themes/languages/fa.lang.php deleted file mode 100644 index 91ef0d9..0000000 --- a/plugins/box/themes/languages/fa.lang.php +++ /dev/null @@ -1,51 +0,0 @@ - array( - 'Themes' => 'پوسته', - 'Themes manager' => 'مدیریت پوسته', - 'Select Theme' => 'انتخاب پوسته', - 'Save' => 'ذخیره', - 'Save and Exit' => 'ذخیره Ùˆ خروج', - 'Name' => 'نام', - 'Create New Template' => 'ایجاد قالب جدید', - 'New Template' => 'قالب جدید', - 'Delete template: :name' => 'حذ٠قالب: :name', - 'Delete chunk: :name' => 'حذ٠قسمت: :name', - 'Delete styles: :name' => 'حذ٠استایل: :name', - 'Templates' => 'قالب ها', - 'Clone' => 'Ú©Ù¾ÛŒ برداری', - 'Edit' => 'ویرایش', - 'Delete' => 'حذÙ', - 'Actions' => 'عملیات', - 'Admin Theme' => 'قالب مدیریت', - 'Create New Chunk' => 'ایجاد قسمت جدید', - 'New Chunk' => 'قسمت جدید', - 'Chunks' => 'قسمتها', - 'Create New Styles' => 'ایجاد استایل جدید', - 'New Styles' => 'استایل جدید', - 'Styles' => 'استایل', - 'Template content' => 'محتوی قالب', - 'Styles content' => 'محتوی استایل', - 'Chunk content' => 'محتوی قسمت', - 'Edit Template' => 'ویرایش قالب', - 'Edit Chunk' => 'ویرایش قسمت', - 'Edit Styles' => 'ویرایش استایل', - 'Current site theme' => 'پوسته ÙØ¹Ù„ÛŒ سایت', - 'Current admin theme' => 'پوسته ÙØ¹Ù„ÛŒ مدیریت', - 'This template already exists' => 'این قالب هم اکنون موجود است', - 'This chunk already exists' => 'این قسمت هم اکنون موجود است', - 'This styles already exist' => 'این استایل هم اکنون موجود است', - 'Components templates' => 'قالب کامپوننت', - 'Your changes to the chunk :name have been saved.' => 'تغییرات شما بر روی قسمت :name ذخیره شد.', - 'Your changes to the styles :name have been saved.' => 'تغییرات شما بر روی استایل :name ذخیره شد.', - 'Your changes to the template :name have been saved.' => 'تغییرات شما بر روی قالب :name ذخیره شد.', - 'Chunk :name deleted' => 'Chunk :name deleted', - 'Required field' => 'کادرهای الزامی', - 'Scripts' => 'اسکریپت ها', - 'Create New Script' => 'ایجاد اسکریپت جدید', - 'Script content' => 'اسکریپت محتوا', - 'New Script' => 'اسکریپت جدید', - 'Edit Script' => 'ویرایش اسکریپت', - ) - ); diff --git a/plugins/box/themes/languages/fr.lang.php b/plugins/box/themes/languages/fr.lang.php deleted file mode 100644 index 7010ecd..0000000 --- a/plugins/box/themes/languages/fr.lang.php +++ /dev/null @@ -1,50 +0,0 @@ - array( - 'Themes' => 'Thèmes', - 'Themes manager' => 'Gestionnaire de thèmes', - 'Select theme' => 'Sélectionner un thème', - 'Save' => 'Enregistrer', - 'Save and exit' => 'Enregistrer et sortir', - 'Name' => 'Nom', - 'Create new template' => 'Créer un nouveau modèle', - 'New template' => 'Nouveau modèle', - 'Delete template: :name' => 'Supprimer le modèle :name', - 'Delete chunk: :name' => 'Supprimer le chunk: :name', // pièce ou composants - 'Delete styles: :name' => 'Supprimer les styles: :name', - 'Templates' => 'Mdèles', - 'Clone' => 'Clone', - 'Edit' => 'Editer', - 'Delete' => 'Supprimer', - 'Actions' => 'Actions', - 'Create new chunk' => 'Créer un nouveau chunk', - 'New chunk' => 'Nouveau chunk', - 'Chunks' => 'Chunks', - 'Create new styles' => 'Créer de nouveaux styles', - 'New styles' => 'Nouveaux styles', - 'Styles' => 'Styles', - 'Template content' => 'Contenu du modèle', - 'Styles content' => 'Contenu des styles', - 'Chunk content' => 'Contenu du chunk', - 'Edit template' => 'Editer le modèle', - 'Edit chunk' => 'Editer le chunk', - 'Edit styles' => 'Editer les styles', - 'Current site theme' => 'Thème actuel du site', - 'Current admin theme' => 'Thème actuel de l\'admin', - 'This template already exists' => 'Ce modèle existe déjà', - 'This chunk already exists' => 'Ce chunk existe déjà', - 'This styles already exist' => 'Ce style existe déjà', - 'Components templates' => 'modèles de composants', - 'Your changes to the chunk :name have been saved.' => 'Les modifications apportées au chunk :name ont été enregistrées.', - 'Your changes to the styles :name have been saved.' => 'Les modifications apportées au styles :name ont été enregistrées.', - 'Your changes to the template :name have been saved.' => 'Les modifications apportées au modèle :name ont été enregistrées.', - 'Chunk :name deleted' => 'Chunk :name deleted', - 'Required field' => 'Champs requis', - 'Scripts' => 'Scripts', - 'Create new script' => 'Créer un nouveau script', - 'Script content' => 'contenu du script', - 'New script' => 'Nouveau script', - 'Edit script' => 'Editer le script', - ) - ); \ No newline at end of file diff --git a/plugins/box/themes/languages/hu.lang.php b/plugins/box/themes/languages/hu.lang.php deleted file mode 100644 index 92ebd44..0000000 --- a/plugins/box/themes/languages/hu.lang.php +++ /dev/null @@ -1,51 +0,0 @@ - array( - 'Themes' => 'Sablonok', - 'Themes manager' => 'SablonkezelÅ‘', - 'Select Theme' => 'Sablon választás', - 'Save' => 'Mentés', - 'Save and Exit' => 'Mentés és Kilépés', - 'Name' => 'Név', - 'Create New Template' => 'Új Sablon Készítése', - 'New Template' => 'Új Sablon', - 'Delete template: :name' => 'Sablon törölve: :name', - 'Delete chunk: :name' => 'Chunk törölve: :name', - 'Delete styles: :name' => 'Styles törölve: :name', - 'Templates' => 'Sablonok', - 'Clone' => 'Klón', - 'Edit' => 'Szerkeszt', - 'Delete' => 'Törlés', - 'Actions' => 'Műveletek', - 'Admin Theme' => 'Admin Sablon', - 'Create New Chunk' => 'Új Chunk készítése', - 'New Chunk' => 'Új Chunk', - 'Chunks' => 'Chunks', - 'Create New Styles' => 'Új Styles készítése', - 'New Styles' => 'Új Styles', - 'Styles' => 'Styles', - 'Template content' => 'Sablon tartalma', - 'Styles content' => 'Styles tartalma', - 'Chunk content' => 'Chunk tartalma', - 'Edit Template' => 'Sablon szerkesztése', - 'Edit Chunk' => 'Chunk szerkesztése', - 'Edit Styles' => 'Styles szerkesztése', - 'Current Site Theme' => 'Jelenlegi Oldal Sablon', - 'Current admin theme' => 'Jelenlegi admin Sablon', - 'This template already exists' => 'Ez a sablon már létezik', - 'This chunk already exists' => 'Ez a chunk már létezik', - 'This styles already exist' => 'Ez a styles már létezik', - 'Components templates' => 'Components sablonok', - 'Your changes to the chunk :name have been saved.' => 'A chunk :name változtatásai mentve.', - 'Your changes to the styles :name have been saved.' => 'A styles :name változtatásai mentve.', - 'Your changes to the template :name have been saved.' => 'A sablon :name változtatásai mentve.', - 'Chunk :name deleted' => 'Chunk :name deleted', - 'Required field' => 'KötelezÅ‘ mezÅ‘', - 'Scripts' => 'Szkriptek', - 'Create New Script' => 'Új Szkript Készítése', - 'Script content' => 'Szkript tartalma', - 'New Script' => 'Új Szkript', - 'Edit Script' => 'Szkript Szerkesztése', - ) - ); diff --git a/plugins/box/themes/languages/id.lang.php b/plugins/box/themes/languages/id.lang.php deleted file mode 100644 index 589e6a7..0000000 --- a/plugins/box/themes/languages/id.lang.php +++ /dev/null @@ -1,52 +0,0 @@ - array( - 'Themes' => 'Tema', - 'Themes manager' => 'Pengelolaan Tema', - 'Select Theme' => 'Pilih Tema', - 'Save' => 'Simpan', - 'Save and Exit' => 'Simpan dan Keluar', - 'Name' => 'Nama', - 'Create New Template' => 'Buat Template Baru', - 'New Template' => 'Template Baru', - 'Delete template: :name' => 'Hapus Template: :name', - 'Delete chunk: :name' => 'Hapus chunk: :name', - 'Delete styles: :name' => 'Hapus model: :name', - 'Templates' => 'Template', - 'Clone' => 'Duplikasi', - 'Edit' => 'Perbaiki', - 'Delete' => 'Hapus', - 'Actions' => 'Tindakan', - 'Create New Chunk' => 'Buat Chunk Baru', - 'New chunk' => 'Chunk Baru', - 'Chunks' => 'chunks', - 'Create New Styles' => 'Buat Model Baru', - 'New Styles' => 'Model Baru', - 'Styles' => 'Model', - 'Template Content' => 'Isi Template', - 'Styles Content' => 'Model Template', - 'Chunk content' => 'Isi Chunk', - 'Edit Cemplate' => 'Perbaiki Template', - 'Edit Chunk' => 'Perbaiki Chunk', - 'Edit Styles' => 'Perbaiki Model', - 'Site Theme' => 'Tema Situs', - 'Admin Theme' => 'Tema Admin', - 'Current Site Theme' => 'Tema Situs Sekarang', - 'Current Admin Theme' => 'Tema Admin Sekarang', - 'This template already exists' => 'Template ini sudah ada', - 'This chunk already exists' => 'Chunk ini sudah ada', - 'This styles already exist' => 'Model ini sudah ada', - 'Components Templates' => 'Komponen template', - 'Your changes to the chunk :name have been saved.' => 'Perubahan pada chunk :name telah disimpan.', - 'Your changes to the styles :name have been saved.' => 'Perubahan pada model :name telah disimpan.', - 'Your changes to the template :name have been saved.' => 'Perubahan pada template :name telah disimpan.', - 'Chunk :name deleted' => 'Chunk :name deleted', - 'Required field' => 'Isian yang Diperlukan', - 'Scripts' => 'Skrip', - 'Create New Script' => 'Buat Skrip Baru', - 'Script Content' => 'Isi Skrip', - 'New Script' => 'Skrip Baru', - 'Edit Script' => 'Perbaiki Skrip', - ) - ); diff --git a/plugins/box/themes/languages/it.lang.php b/plugins/box/themes/languages/it.lang.php deleted file mode 100644 index a03ce37..0000000 --- a/plugins/box/themes/languages/it.lang.php +++ /dev/null @@ -1,52 +0,0 @@ - array( - 'Themes' => 'Temi', - 'Themes manager' => 'Gestione temi', - 'Select Theme' => 'Scegli tema', - 'Save' => 'Salva', - 'Name' => 'Nome', - 'Save and Exit' => 'Salva ed esci', - 'Create New Template' => 'Crea nuovo modello', - 'New Template' => 'Nuovo modello', - 'Delete template: :name' => 'Elimina modello: :name', - 'Delete chunk: :name' => 'Elimina chunk: :name', - 'Delete styles: :name' => 'Elimina stili: :name', - 'Templates' => 'Templates', - 'Clone' => 'Duplica', - 'Edit' => 'Modifica', - 'Delete' => 'Elimina', - 'Actions' => 'Azioni', - 'Create New Chunk' => 'Crea nuovo chunk', - 'New Chunk' => 'Nuovo chunk', - 'Chunks' => 'Chunks', - 'Create New Styles' => 'Crea nuovi stili', - 'New Styles' => 'Nuovi stili', - 'Styles' => 'Stili', - 'Template content' => 'Contenuto del modello', - 'Styles content' => 'Contenuto dei stili', - 'Chunk content' => 'Contenuto del chunk', - 'Edit Template' => 'Modifica modello', - 'Edit Chunk' => 'Modifica chunk', - 'Edit Styles' => 'Modifica stili', - 'Site Theme' => 'Tema del sito', - 'Admin Theme' => 'Tema del backend', - 'Current Site Theme' => 'Tema corrente del sito', - 'Current admin theme' => 'Tema corrente del backend', - 'This template already exists' => 'Tale modello già esistente', - 'This chunk already exists' => 'Tale chunk già esistente', - 'This styles already exist' => 'Tale stili già esistenti', - 'Components templates' => 'Modello dei componenti', - 'Your changes to the chunk :name have been saved.' => 'Le modifiche al chunk :name sono state salvate', - 'Your changes to the styles :name have been saved.' => 'Le modifiche ai stili :name sono state salvate', - 'Your changes to the template :name have been saved.' => 'Le modifiche al modello :name sono state salvate', - 'Chunk :name deleted' => 'Chunk :name deleted', - 'Required field' => 'Campo obbligatorio', - 'Scripts' => 'Script', - 'Create New Script' => 'Crea nuovo script', - 'Script content' => 'Contenuto dello script', - 'New Script' => 'Nuovo script', - 'Edit Script' => 'Modifica script', - ) - ); diff --git a/plugins/box/themes/languages/ja.lang.php b/plugins/box/themes/languages/ja.lang.php deleted file mode 100644 index b09f87e..0000000 --- a/plugins/box/themes/languages/ja.lang.php +++ /dev/null @@ -1,51 +0,0 @@ - array( - 'Themes' => 'テーマ', - 'Themes manager' => 'テーマã®ç®¡ç†', - 'Select Theme' => 'テーマã®é¸æŠž', - 'Save' => 'ä¿å­˜', - 'Save and Exit' => 'ä¿å­˜ã—ã¦çµ‚了', - 'Name' => 'åå‰', - 'Create New Template' => 'æ–°è¦ãƒ†ãƒ³ãƒ—レートã®ä½œæˆ', - 'New Template' => 'æ–°è¦ãƒ†ãƒ³ãƒ—レート', - 'Delete template: :name' => 'テンプレートã®å‰Šé™¤: :name', - 'Delete chunk: :name' => 'ãƒãƒ£ãƒ³ã‚¯ã®å‰Šé™¤: :name', - 'Delete styles: :name' => 'スタイルã®å‰Šé™¤: :name', - 'Templates' => 'テンプレート', - 'Clone' => '複製', - 'Edit' => '編集', - 'Delete' => '削除', - 'Actions' => 'æ“作', - 'Admin Theme' => '管ç†è€…テーマ', - 'Create New Chunk' => 'æ–°è¦ãƒãƒ£ãƒ³ã‚¯ã®ä½œæˆ', - 'New Chunk' => 'æ–°è¦ãƒãƒ£ãƒ³ã‚¯', - 'Chunks' => 'ãƒãƒ£ãƒ³ã‚¯', - 'Create New Styles' => 'æ–°è¦ã‚¹ã‚¿ã‚¤ãƒ«ã®ä½œæˆ', - 'New Styles' => 'æ–°è¦ã‚¹ã‚¿ã‚¤ãƒ«', - 'Styles' => 'スタイル', - 'Template content' => '内容ã®ãƒ†ãƒ³ãƒ—レート', - 'Styles content' => 'スタイルã®å†…容', - 'Chunk content' => 'ãƒãƒ£ãƒ³ã‚¯ã®å†…容', - 'Edit Template' => 'テンプレートã®ç·¨é›†', - 'Edit Chunk' => 'ãƒãƒ£ãƒ³ã‚¯ã®ç·¨é›†', - 'Edit Styles' => 'スタイルã®ç·¨é›†', - 'Current Site Theme' => 'ç¾åœ¨ã®ã‚µã‚¤ãƒˆãƒ†ãƒ¼ãƒž', - 'Current admin theme' => 'ç¾åœ¨ã®ç®¡ç†è€…ã®ãƒ†ãƒ¼ãƒž', - 'This template already exists' => 'テンプレートã¯ã™ã§ã«å­˜åœ¨ã—ã¦ã„ã¾ã™', - 'This chunk already exists' => 'ãƒãƒ£ãƒ³ã‚¯ã¯ã™ã§ã«å­˜åœ¨ã—ã¦ã„ã¾ã™', - 'This styles already exist' => 'スタイルã¯ã™ã§ã«å­˜åœ¨ã—ã¦ã„ã¾ã™', - 'Components templates' => 'コンãƒãƒ¼ãƒãƒ³ãƒˆã®ãƒ†ãƒ³ãƒ—レート', - 'Your changes to the chunk :name have been saved.' => ':name ãƒãƒ£ãƒ³ã‚¯ã¸ã®å¤‰æ›´ã¯ä¿å­˜ã•れã¾ã—ãŸã€‚', - 'Your changes to the styles :name have been saved.' => ' :name スタイルã¸ã®å¤‰æ›´ã¯ä¿å­˜ã•れã¾ã—ãŸã€‚', - 'Your changes to the template :name have been saved.' => ':name テンプレートã¸ã®å¤‰æ›´ã¯ä¿å­˜ã•れã¾ã—ãŸã€‚', - 'Chunk :name deleted' => 'Chunk :name deleted', - 'Required field' => '必須項目', - 'Scripts' => 'スクリプト', - 'Create New Script' => 'æ–°è¦ã‚¹ã‚¯ãƒªãƒ—トã®ä½œæˆ', - 'Script content' => 'スクリプトã®å†…容', - 'New Script' => 'æ–°è¦ã‚¹ã‚¯ãƒªãƒ—ト', - 'Edit Script' => 'スクリプトã®ç·¨é›†', - ) - ); diff --git a/plugins/box/themes/languages/ka-ge.lang.php b/plugins/box/themes/languages/ka-ge.lang.php deleted file mode 100644 index d5c71bf..0000000 --- a/plugins/box/themes/languages/ka-ge.lang.php +++ /dev/null @@ -1,54 +0,0 @@ - array( - 'Themes' => 'თემები', - 'Themes manager' => 'თემების მენეჯერი', - 'Select Theme' => 'თემის áƒáƒ áƒ©áƒ”ვáƒ', - 'Save' => 'შენáƒáƒ®áƒ•áƒ', - 'Name' => 'სáƒáƒ®áƒ”ლწáƒáƒ“ებáƒ', - 'Save and Exit' => 'შენáƒáƒ®áƒ•რდრშემდეგ გáƒáƒ›áƒáƒ¡áƒ•ლáƒ', - 'Create New Template' => 'áƒáƒ®áƒáƒšáƒ˜ Template-ის შექმნáƒ', - 'New Template' => 'áƒáƒ®áƒáƒšáƒ˜ Template-ი', - 'Delete template: :name' => 'Template-ის წáƒáƒ¨áƒšáƒ: :name', - 'Delete chunk: :name' => 'chunk-ის წáƒáƒ¨áƒšáƒ: :name', - 'Delete styles: :name' => 'სტილის წáƒáƒ¨áƒšáƒ: :name', - 'Templates' => 'Template-ები', - 'Clone' => 'კლáƒáƒœáƒ˜áƒ áƒ”ბáƒ', - 'Edit' => 'რედáƒáƒ¥áƒ¢áƒ˜áƒ áƒ”ბáƒ', - 'Delete' => 'წáƒáƒ¨áƒšáƒ', - 'Actions' => 'მáƒáƒ¥áƒ›áƒ”დებáƒ', - 'Admin Theme' => 'თემáƒ', - 'Create New Chunk' => 'áƒáƒ®áƒáƒšáƒ˜ Chunk-ის შექმნáƒ', - 'New Chunk' => 'áƒáƒ®áƒáƒšáƒ˜ Chunk-ი', - 'Chunks' => 'Chunk-ები', - 'Create New Styles' => 'áƒáƒ®áƒáƒšáƒ˜ სტილის შექმნáƒ', - 'New Styles' => 'áƒáƒ®áƒáƒšáƒ˜ სტილები', - 'Styles' => 'სტილები', - 'Template content' => 'Template-ის შემáƒáƒ“გენლáƒáƒ‘áƒ', - 'Styles content' => 'სტილების შემáƒáƒ“გენლáƒáƒ‘áƒ', - 'Chunk content' => 'Chunk-ის შემáƒáƒ“გენლáƒáƒ‘áƒ', - 'Edit Template' => 'Template-ის რედáƒáƒ¥áƒ¢áƒ˜áƒ áƒ”ბáƒ', - 'Edit Chunk' => 'Chunk-ის რედáƒáƒ¥áƒ¢áƒ˜áƒ áƒ”ბáƒ', - 'Edit Styles' => 'სტილების რედáƒáƒ¥áƒ¢áƒ˜áƒ áƒ”ბáƒ', - 'Site Theme' => 'სáƒáƒ˜áƒ¢áƒ˜áƒ¡ თემáƒ', - 'Admin Theme' => 'áƒáƒ“მინის პáƒáƒœáƒ”ლის თემáƒ', - 'Current Site Theme' => 'სáƒáƒ˜áƒ¢áƒ˜áƒ¡ მიმდინáƒáƒ áƒ” თემáƒ', - 'Current admin theme' => 'áƒáƒ“მინის პáƒáƒœáƒ”ლის მიმდინáƒáƒ áƒ” თემáƒ', - 'This template already exists' => 'ეს Template-ი უკვე áƒáƒ áƒ¡áƒ”ბáƒáƒ‘ს', - 'This chunk already exists' => 'ეს Chunk-ი უკვე áƒáƒ áƒ¡áƒ”ბáƒáƒ‘ს', - 'This styles already exist' => 'ეს სტილები უკვე áƒáƒ áƒ¡áƒ”ბáƒáƒ‘ენ', - 'Components templates' => 'კáƒáƒ›áƒžáƒáƒœáƒ”ნტების Template-ები', - 'Your changes to the chunk :name have been saved.' => 'თქვენი ცვლილებები chunk-ის მიმáƒáƒ áƒ— :name შენáƒáƒ®áƒ£áƒšáƒ˜áƒ', - 'Your changes to the styles :name have been saved.' => 'თქვენი ცვლილებები სტილების მიმáƒáƒ áƒ— :name შენáƒáƒ®áƒ£áƒšáƒ˜áƒ', - 'Your changes to the template :name have been saved.' => 'თქვენი ცვლილებები Template-ის მიმáƒáƒ áƒ— :name შენáƒáƒ®áƒ£áƒšáƒ˜áƒ', - 'Chunk :name deleted' => 'Chunk-ი :name წáƒáƒ¨áƒšáƒ˜áƒšáƒ˜áƒ', - 'Required field' => 'áƒáƒ£áƒªáƒ˜áƒšáƒ”ბელი ველი', - 'Scripts' => 'Script-ები', - 'Create New Script' => 'áƒáƒ®áƒáƒšáƒ˜ Script-ის შექმნáƒ', - 'Script content' => 'Script-ის შემáƒáƒ“გენლáƒáƒ‘áƒ', - 'New Script' => 'áƒáƒ®áƒáƒšáƒ˜ Script-ი', - 'Edit Script' => 'Script-ის რედáƒáƒ¥áƒ¢áƒ˜áƒ áƒ”ბáƒ', - 'Cancel' => 'გáƒáƒ£áƒ¥áƒ›áƒ”ბáƒ', - ) - ); diff --git a/plugins/box/themes/languages/lt.lang.php b/plugins/box/themes/languages/lt.lang.php deleted file mode 100644 index e31861a..0000000 --- a/plugins/box/themes/languages/lt.lang.php +++ /dev/null @@ -1,52 +0,0 @@ - array( - 'Themes' => 'IÅ¡vaizda', - 'Themes manager' => 'IÅ¡vaizdos tvarkyklÄ—', - 'Select Theme' => 'Pasirinkti iÅ¡vaizdÄ…', - 'Save' => 'IÅ¡saugoti', - 'Save and Exit' => 'IÅ¡saugoti ir iÅ¡eiti', - 'Name' => 'Pavadinimas', - 'Create New Template' => 'Sukurti naujÄ… Å¡ablonÄ…', - 'New Template' => 'Naujas Å¡ablonas', - 'Delete template: :name' => 'Trinti Å¡ablonÄ… :name', - 'Delete chunk: :name' => 'Trinti Å¡ablono dalį :name', - 'Delete styles: :name' => 'Trinti stiliaus aprašą :name', - 'Templates' => 'Å ablonai', - 'Clone' => 'Klonuoti', - 'Edit' => 'Redaguoti', - 'Delete' => 'IÅ¡trinti', - 'Actions' => 'Veiksmai', - 'Admin Theme' => 'Admin Theme', - 'Site Theme' => 'Site Theme', - 'Create New Chunk' => 'Sukurti naujÄ… Å¡ablono dalį', - 'New Chunk' => 'Nauja Å¡ablono dalis', - 'Chunks' => 'Å ablono dalys', - 'Create New Styles' => 'Sukurti naujÄ… stiliaus aprašą', - 'New Styles' => 'Naujas stiliaus apraÅ¡as', - 'Styles' => 'Stiliaus apraÅ¡ai', - 'Template content' => 'Å ablono turinys', - 'Styles content' => 'Stiliaus apraÅ¡o turinys', - 'Chunk content' => 'Å ablono dalies turinys', - 'Edit Template' => 'Redaguoti Å¡ablonÄ…', - 'Edit Chunk' => 'Redaguoti Å¡ablono dalį', - 'Edit Styles' => 'Redaguoti stiliaus aprašą', - 'Current Site Theme' => 'DabartinÄ— tema', - 'Current admin theme' => 'DabartinÄ— administravimo tema', - 'This template already exists' => 'Toks Å¡ablonas jau yra', - 'This chunk already exists' => 'Tokia Å¡ablono dalis jau yra', - 'This styles already exists' => 'Toks stiliaus apraÅ¡as jau yra', - 'Components templates' => 'Å ablonų komponentai', - 'Your changes to the chunk :name have been saved.' => 'Å ablono dalies :name pakeitimai iÅ¡saugoti.', - 'Your changes to the styles :name have been saved.' => 'Stiliaus apraÅ¡o :name pakeitimai iÅ¡saugoti.', - 'Your changes to the template :name have been saved.' => 'Å ablono :name pakeitimai iÅ¡saugoti.', - 'Chunk :name deleted' => 'Chunk :name deleted', - 'This field should not be empty' => 'Å is laukas negali bÅ«ti tuÅ¡Äias', - 'Scripts' => 'Skriptai', - 'Create New Script' => 'Sukurti naujÄ… skriptÄ…', - 'Script content' => 'Skripto turinys', - 'New Script' => 'Naujas skriptas', - 'Edit Script' => 'Redaguoti skriptÄ…', - ) - ); diff --git a/plugins/box/themes/languages/nl.lang.php b/plugins/box/themes/languages/nl.lang.php deleted file mode 100644 index 06dc4a6..0000000 --- a/plugins/box/themes/languages/nl.lang.php +++ /dev/null @@ -1,51 +0,0 @@ - array( - 'Themes' => 'Thema\'s', - 'Themes manager' => 'Thema beheer', - 'Select Theme' => 'Selecteer thema', - 'Save' => 'Opslaan', - 'Save and Exit' => 'Opslaan en Terug', - 'Name' => 'Naam', - 'Create New Template' => 'Nieuwe Template', - 'New Template' => 'Nieuwe template', - 'Admin Theme' => 'Admin thema', - 'Delete template: :name' => 'Verwijder thema: :name', - 'Delete chunk: :name' => 'Verwijder onderdeel: :name', - 'Delete styles: :name' => 'Verwijder stijl: :name', - 'Templates' => 'Templates', - 'Clone' => 'Kopieren', - 'Edit' => 'Bewerken', - 'Delete' => 'Verwijderen', - 'Actions' => 'Acties', - 'Create New Chunk' => 'Nieuw Onderdeel', - 'New Chunk' => 'Nieuwe onderdeel', - 'Chunks' => 'Onderdelen', - 'Create New Styles' => 'Nieuwe Stijl', - 'New Styles' => 'Nieuwe stijl', - 'Styles' => 'Stijlen', - 'Template content' => 'Template inhoud', - 'Styles content' => 'Inhoud stijlen', - 'Chunk content' => 'Inhoud onderdeel', - 'Edit Template' => 'Bewerk Template', - 'Edit Chunk' => 'Bewerk Onderdeel', - 'Edit Styles' => 'Bewerk stijlen', - 'Current Site Theme' => 'Huidige Website Thema', - 'Current admin theme' => 'Huidige Admin Template', - 'This template already exists' => 'Deze template bestaat al', - 'This chunk already exists' => 'Dit onderdeel bestaat al', - 'This styles already exists' => 'Deze stijl bestaat al', - 'Components templates' => 'Componenten templates', - 'Your changes to the chunk :name have been saved.' => 'Uw wijzigingen aan onderdeel :name zijn opgeslagen.', - 'Your changes to the styles :name have been saved.' => 'Uw wijzigingen aan stijl :name zijn opgeslagen.', - 'Your changes to the template :name have been saved.' => 'Uw wijzigingen aan template :name zijn opgeslagen.', - 'Chunk :name deleted' => 'Chunk :name deleted', - 'This field should not be empty' => 'Dit veld mag niet leeg zijn.', - 'Scripts' => 'Scripts', - 'Create New Script' => 'Nieuw Script', - 'Script content' => 'Inhoud script', - 'New Script' => 'Nieuw Script', - 'Edit Script' => 'Bewerk Script', - ) - ); diff --git a/plugins/box/themes/languages/pl.lang.php b/plugins/box/themes/languages/pl.lang.php deleted file mode 100644 index 474921d..0000000 --- a/plugins/box/themes/languages/pl.lang.php +++ /dev/null @@ -1,52 +0,0 @@ - array( - 'Themes' => 'Motywy', - 'Themes manager' => 'ZarzÄ…dzaj motywami', - 'Select Theme' => 'Wybierz motyw', - 'Save' => 'Zapisz', - 'Save and Exit' => 'Zapisz i wyjdź', - 'Name' => 'Nazwa', - 'Create New Template' => 'Utwórz nowy szablon', - 'New Template' => 'Nowy szablon', - 'Delete template: :name' => 'Czy napewno usunąć szablon: :name', - 'Delete chunk: :name' => 'Czy napewno usunąć cegieÅ‚kÄ™: :name', - 'Delete styles: :name' => 'Czy napewno usunąć style: :name', - 'Templates' => 'Szablony', - 'Clone' => 'Skopiuj', - 'Edit' => 'Edytuj', - 'Delete' => 'UsuÅ„', - 'Actions' => 'Akcje', - 'Admin Theme' => 'Motyw administracji', - 'Create New Chunk' => 'Utwórz nowÄ… cegieÅ‚kÄ™', - 'New Chunk' => 'Nowa cegieÅ‚ka', - 'Chunks' => 'CegieÅ‚ki', - 'Create New Styles' => 'Utwórz nowe style', - 'New Styles' => 'Nowe style', - 'Styles' => 'Style', - 'Template content' => 'Zawartość szablonu', - 'Styles content' => 'Zawartość stylów', - 'Chunk content' => 'Zawartość cegieÅ‚ki', - 'Edit Template' => 'Edytuj szablon', - 'Edit Chunk' => 'Edytuj cegieÅ‚kÄ™', - 'Edit Styles' => 'Edytuj style', - 'Current Site Theme' => 'Bieżący motyw strony', - 'Current admin theme' => 'Bieżący motyw administracji', - 'This template already exists' => 'Ten szablon już istnieje', - 'This chunk already exists' => 'Ta cegieÅ‚ka już istnieje', - 'This styles already exist' => 'Te style już istniejÄ…', - 'Components templates' => 'Części skÅ‚adowe szablonów', - 'Your changes to the chunk :name have been saved.' => 'Twoje zmiany dla cegieÅ‚ki :name zostaÅ‚y zapisane.', - 'Your changes to the styles :name have been saved.' => 'Twoje zmiany dla stylów :name zostaÅ‚y zapisane.', - 'Your changes to the template :name have been saved.' => 'Twoje zmiany dla szablonu :name zostaÅ‚y zapisane.', - 'Chunk :name deleted' => 'Chunk :name deleted', - 'Required field' => 'Pole wymagane', - 'Scripts' => 'Skrypty', - 'Create New Script' => 'Utwórz nowy skrypt', - 'Script content' => 'Zawartość skryptu', - 'New Script' => 'Nowy skrypt', - 'Edit Script' => 'Edytuj skrypt', - 'Site Theme' => 'Motyw strony', - ) - ); diff --git a/plugins/box/themes/languages/pt-br.lang.php b/plugins/box/themes/languages/pt-br.lang.php deleted file mode 100644 index b5f68bc..0000000 --- a/plugins/box/themes/languages/pt-br.lang.php +++ /dev/null @@ -1,52 +0,0 @@ - array( - 'Themes' => 'Temas', - 'Themes manager' => 'Gerenciador de temas', - 'Select Theme' => 'Selecionar tema', - 'Save' => 'Salvar', - 'Save and Exit' => 'Salvar e sair', - 'Name' => 'Nome', - 'Create New Template' => 'Criar novo template', - 'New Template' => 'Novo template', - 'Delete template: :name' => 'Deletar o template: :name', - 'Delete chunk: :name' => 'Deletar o pedaço: :name', - 'Delete styles: :name' => 'Deletar o estilo :name', - 'Templates' => 'Templates', - 'Clone' => 'Clonar', - 'Edit' => 'Editar', - 'Delete' => 'Deletar', - 'Actions' => 'Ações', - 'Admin Theme' => 'Admin Theme', - 'Site Theme' => 'Site Theme', - 'Create New Chunk' => 'Criar novo pedaço', - 'New Chunk' => 'Novo pedaço', - 'Chunks' => 'Pedaços', - 'Create New Styles' => 'Criar novo estilo', - 'New Styles' => 'Novo estilo', - 'Styles' => 'Estilos', - 'Template content' => 'Conteúdo do template', - 'Styles content' => 'Conteúdo do estilo', - 'Chunk content' => 'Conteúdo do pedaço', - 'Edit Template' => 'Editar template', - 'Edit Chunk' => 'Editar pedaço', - 'Edit Styles' => 'Editar estilo', - 'Current Site Theme' => 'Tema atual do site', - 'Current admin theme' => 'Tema atual da administração', - 'This template already exists' => 'Este template já existe', - 'This chunk already exists' => 'Este pedaço já existe', - 'This styles already exists' => 'Este estilo já existe', - 'Components templates' => 'Componentes do template', - 'Your changes to the chunk :name have been saved.' => 'Suas alterações no pedaço :name foram salvas', - 'Your changes to the styles :name have been saved.' => 'Suas alterações no estilo :name foram salvas.', - 'Your changes to the template :name have been saved.' => 'Suas alterações no template :name foram salvas.', - 'Chunk :name deleted' => 'Chunk :name deleted', - 'This field should not be empty' => 'Este campo não pode estar vazio', - 'Scripts' => 'Scripts', - 'Create New Script' => 'Criar novo script', - 'Script content' => 'Conteúdo do script', - 'New Script' => 'Novo script', - 'Edit Script' => 'Editar script', - ) - ); diff --git a/plugins/box/themes/languages/ru.lang.php b/plugins/box/themes/languages/ru.lang.php deleted file mode 100644 index 5ec3d31..0000000 --- a/plugins/box/themes/languages/ru.lang.php +++ /dev/null @@ -1,54 +0,0 @@ - array( - 'Themes' => 'Темы', - 'Themes manager' => 'Менеджер тем', - 'Select Theme' => 'Выбрать тему', - 'Save' => 'Сохранить', - 'Name' => 'Ðазвание', - 'Save and Exit' => 'Сохранить и выйти', - 'Create New Template' => 'Создать новый шаблон', - 'New Template' => 'Ðовый шаблон', - 'Delete template: :name' => 'Удалить шаблон: :name', - 'Delete chunk: :name' => 'Удалить чанк: :name', - 'Delete styles: :name' => 'Удалить Ñтили: :name', - 'Templates' => 'Шаблоны', - 'Clone' => 'Клонировать', - 'Edit' => 'Редактировать', - 'Delete' => 'Удалить', - 'Actions' => 'ДейÑтвиÑ', - 'Admin Theme' => 'Тема ', - 'Create New Chunk' => 'Создать новый чанк', - 'New Chunk' => 'Ðовый чанк', - 'Chunks' => 'Чанки', - 'Create New Styles' => 'Создать новые Ñтили', - 'New Styles' => 'Ðовые Ñтили', - 'Styles' => 'Стили', - 'Template content' => 'Содержимое шаблона', - 'Styles content' => 'Содержимое Ñтилей', - 'Chunk content' => 'Содержимое чанка', - 'Edit Template' => 'Редактирование шаблона', - 'Edit Chunk' => 'Редактирование чанка', - 'Edit Styles' => 'Редкатирование Ñтилей', - 'Site Theme' => 'Тема Ñайта', - 'Admin Theme' => 'Тема админки', - 'Current Site Theme' => 'Ð¢ÐµÐºÑƒÑ‰Ð°Ñ Ñ‚ÐµÐ¼Ð° Ñайта', - 'Current admin theme' => 'Ð¢ÐµÐºÑƒÑ‰Ð°Ñ Ñ‚ÐµÐ¼Ð° админки', - 'This template already exists' => 'Этот шаблон уже ÑущеÑтвует', - 'This chunk already exists' => 'Этот чанк уже ÑущеÑтвует', - 'This styles already exist' => 'Эти Ñтили уже ÑущеÑтвуют', - 'Components templates' => 'Шаблоны компонентов', - 'Your changes to the chunk :name have been saved.' => 'Ваши Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ðº чанку :name были Ñохранены', - 'Your changes to the styles :name have been saved.' => 'Ваши Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ðº ÑтилÑм :name были Ñохранены', - 'Your changes to the template :name have been saved.' => 'Ваши Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ðº шаблону :name были Ñохранены', - 'Chunk :name deleted' => 'Чанк :name удален', - 'Required field' => 'ОбÑзательное поле', - 'Scripts' => 'Скрипты', - 'Create New Script' => 'Создать новый Ñкрипт', - 'Script content' => 'Содержимое Ñкрипта', - 'New Script' => 'Ðовый Ñкрипт', - 'Edit Script' => 'Редактирование Ñкрипта', - 'Cancel' => 'Отмена', - ) - ); diff --git a/plugins/box/themes/languages/sk.lang.php b/plugins/box/themes/languages/sk.lang.php deleted file mode 100644 index 0a1386b..0000000 --- a/plugins/box/themes/languages/sk.lang.php +++ /dev/null @@ -1,52 +0,0 @@ - array( - 'Themes' => 'Témy', - 'Themes manager' => 'Manažér tém', - 'Select Theme' => 'VybraÅ¥ tému', - 'Save' => 'UložiÅ¥', - 'Save and Exit' => 'UložiÅ¥ a ukonÄiÅ¥', - 'Name' => 'Názov', - 'Create New Template' => 'VytvoriÅ¥ novú tému', - 'New Template' => 'Nová téma', - 'Delete template: :name' => 'VymazaÅ¥ tému: :name', - 'Delete chunk: :name' => 'VymazaÅ¥ sekciu: :name', - 'Delete styles: :name' => 'VymazaÅ¥ CSS Å¡týl: :name', - 'Templates' => 'Témy', - 'Clone' => 'KlonovaÅ¥', - 'Edit' => 'EditovaÅ¥', - 'Delete' => 'VymazaÅ¥', - 'Actions' => 'Akcie', - 'Create New Chunk' => 'VytvoriÅ¥ novú sekciu', - 'New Chunk' => 'Nová sekcia', - 'Chunks' => 'Sekcie', - 'Create New Styles' => 'VytvoriÅ¥ nový CSS Å¡týl', - 'New Styles' => 'Nový CSS Å¡týl', - 'Styles' => 'CSS Å¡týly', - 'Template content' => 'Obsah témy', - 'Styles content' => 'Obsah CSS Å¡týlu', - 'Chunk content' => 'Obsah sekcie', - 'Edit Template' => 'EditovaÅ¥ tému', - 'Edit Chunk' => 'EditovaÅ¥ sekciu', - 'Edit Styles' => 'EditovaÅ¥ CSS Å¡týl', - 'Current Site Theme' => 'Aktuálna téma webstránky', - 'Current admin theme' => 'Aktuálna téma administrácie', - 'This template already exists' => 'Táto téma už existuje', - 'This chunk already exists' => 'Táto sekcia už existuje', - 'This styles already exist' => 'Tento CSS Å¡týl už existuje', - 'Components templates' => 'Témy komponentov', - 'Your changes to the chunk :name have been saved.' => 'VaÅ¡e zmeny v sekcii :name boli uložené.', - 'Your changes to the styles :name have been saved.' => 'VaÅ¡e zmeny v CSS Å¡týle :name boli uložené.', - 'Your changes to the template :name have been saved.' => 'VaÅ¡e zmeny v téme :name boli uložené.', - 'Chunk :name deleted' => 'Chunk :name deleted', - 'Required field' => 'Povinné políÄko', - 'Scripts' => 'Skripty', - 'Site Theme' => 'Site Theme', - 'Admin Theme' => 'Admin Theme', - 'Create New Script' => 'VytvoriÅ¥ nový skript', - 'Script content' => 'Obsah skriptu', - 'New Script' => 'Nový skript', - 'Edit Script' => 'EditovaÅ¥ skript', - ) - ); diff --git a/plugins/box/themes/languages/sr.lang.php b/plugins/box/themes/languages/sr.lang.php deleted file mode 100644 index 2f0885f..0000000 --- a/plugins/box/themes/languages/sr.lang.php +++ /dev/null @@ -1,50 +0,0 @@ - array( - 'Themes' => 'Å abloni', - 'Themes manager' => 'Menadžer Å¡ablona', - 'Select theme' => 'Odaberi temu', - 'Save' => 'SaÄuvaj', - 'Save and exit' => 'SaÄuvaj i izaÄ‘i', - 'Name' => 'Ime', - 'Create new template' => 'Kreiraj novi Å¡ablon', - 'New template' => 'Novi Å¡ablon', - 'Delete template: :name' => 'ObriÅ¡i Å¡ablon: :name', - 'Delete chunk: :name' => 'ObriÅ¡i komade: :name', - 'Delete styles: :name' => 'ObriÅ¡i stilove: :name', - 'Templates' => 'Å abloni', - 'Clone' => 'Kloniraj', - 'Edit' => 'Izmeni', - 'Delete' => 'ObriÅ¡i', - 'Actions' => 'Akcije', - 'Create new chunk' => 'Napravi novi parÄe', - 'New chunk' => 'Novo parÄe', - 'Chunks' => 'ParÄići', - 'Create new styles' => 'Kreiraj novi stil', - 'New styles' => 'Novi stil', - 'Styles' => 'Stilovi', - 'Template content' => 'Sadržaj Å¡ablona', - 'Styles content' => 'Stil sadržaja', - 'Chunk content' => 'Sadržaj komada', - 'Edit template' => 'Izmeni Å¡ablon', - 'Edit chunk' => 'Izmeni komad', - 'Edit styles' => 'Izmeni stil', - 'Current site theme' => 'Trenutni Å¡ablon sajta', - 'Current admin theme' => 'Trenutni administratorski Å¡ablon', - 'This template already exists' => 'Ovaj Å¡ablon već postoji', - 'This chunk already exists' => 'Ovaj komad već postoji', - 'This styles already exist' => 'Ovaj stil već postoji', - 'Components templates' => 'Komponente Å¡ablona', - 'Your changes to the chunk :name have been saved.' => 'VaÅ¡e promene na komadićima :name su saÄuvane.', - 'Your changes to the styles :name have been saved.' => 'Promene na stilovima :name su saÄuvane.', - 'Your changes to the template :name have been saved.' => 'Promene na Å¡ablonu :name su saÄuvane.', - 'Chunk :name deleted' => 'Chunk :name deleted', - 'Required field' => 'Potrebno polje', - 'Scripts' => 'Skripte', - 'Create new script' => 'Kreiraj novu skriptu', - 'Script content' => 'Sadržaj skripte', - 'New script' => 'Nova skripta', - 'Edit script' => 'Izmeni skriptu', - ) - ); diff --git a/plugins/box/themes/languages/tr.lang.php b/plugins/box/themes/languages/tr.lang.php deleted file mode 100644 index 7e763bb..0000000 --- a/plugins/box/themes/languages/tr.lang.php +++ /dev/null @@ -1,53 +0,0 @@ - array( - 'Themes' => 'Temalar', - 'Themes manager' => 'Tema Yöneticisi', - 'Select Theme' => 'Tema Seç', - 'Save' => 'Kaydet', - 'Save and Exit' => 'Kaydet ve Çık', - 'Name' => 'Ad', - 'Create New Template' => 'Yeni Åžablon OluÅŸtur', - 'New Template' => 'Yeni Åžablon', - 'Delete template: :name' => ':name adlı ÅŸablon silinsin mi', - 'Delete chunk: :name' => ':name adlı yığın silinsin mi', - 'Delete styles: :name' => ':name adlı stil silinsin mi', - 'Templates' => 'Åžablonlar', - 'Clone' => 'Klonla', - 'Edit' => 'Düzenle', - 'Delete' => 'Sil', - 'Actions' => 'İşlemler', - 'Admin Theme' => 'Yönetim Teması', - 'Create New Chunk' => 'Yeni Yığın OluÅŸtur', - 'New Chunk' => 'Yeni Yığın', - 'Chunks' => 'Yığın', - 'Create New Styles' => 'Yeni Stil OluÅŸtur', - 'New Styles' => 'Yeni Stil', - 'Styles' => 'Stil', - 'Template content' => 'Åžablon İçeriÄŸi', - 'Styles content' => 'Stil İçeriÄŸi', - 'Chunk content' => 'Yığın İçeriÄŸi', - 'Edit Template' => 'Åžablonu Düzenle', - 'Edit Chunk' => 'Yığını Düzenle', - 'Edit Styles' => 'Stili Düzenle', - 'Current Site Theme' => 'Kullanılan site teması', - 'Current admin theme' => 'Kullanılan yönetim teması', - 'This template already exists' => 'Bu ÅŸablon zaten var', - 'This chunk already exists' => 'Bu yığın zaten var', - 'This styles already exist' => 'Bu stil zaten var', - 'Components templates' => 'Eklenti ÅŸablonları', - 'Your changes to the chunk :name have been saved.' => 'DeÄŸiÅŸiklikleriniz :name adlı yığına kaydedildi.', - 'Your changes to the styles :name have been saved.' => 'DeÄŸiÅŸiklikleriniz :name adlı stile kaydedildi.', - 'Your changes to the template :name have been saved.' => 'DeÄŸiÅŸiklikleriniz :name adlı ÅŸablona kaydedildi.', - 'Chunk :name deleted' => ':name adlı yığın silindi', - 'Required field' => 'Zorunlu alan', - 'Scripts' => 'Betikler', - 'Create New Script' => 'Yeni Betik OluÅŸtur', - 'Script content' => 'Betik içeriÄŸi', - 'New Script' => 'Yeni Betik', - 'Edit Script' => 'BetiÄŸi Düzenle', - 'Site Theme' => 'Site Teması', - 'Cancel' => 'Vazgeç', - ) - ); diff --git a/plugins/box/themes/languages/uk.lang.php b/plugins/box/themes/languages/uk.lang.php deleted file mode 100644 index 3707d37..0000000 --- a/plugins/box/themes/languages/uk.lang.php +++ /dev/null @@ -1,54 +0,0 @@ - array( - 'Themes' => 'Теми', - 'Themes manager' => 'Менеджер тем', - 'Select Theme' => 'Вибрати тему', - 'Save' => 'Зберегти', - 'Name' => 'Ðазва', - 'Save and Exit' => 'Зберегти та вийти', - 'Create New Template' => 'Створити новий шаблон', - 'New Template' => 'Ðовий шаблон', - 'Delete template: :name' => 'Видалити шаблон: :name', - 'Delete chunk: :name' => 'Видалити чанк: :name', - 'Delete styles: :name' => 'Видалити Ñтилі: :name', - 'Templates' => 'Шаблони', - 'Clone' => 'Клонувати', - 'Edit' => 'Редагувати', - 'Delete' => 'Видалити', - 'Actions' => 'Дії', - 'Admin Theme' => 'Тема ', - 'Create New Chunk' => 'Створити новий чанк', - 'New Chunk' => 'Ðовий чанк', - 'Chunks' => 'Чанки', - 'Create New Styles' => 'Створити нові Ñтилі', - 'New Styles' => 'Ðові Ñтилі', - 'Styles' => 'Стилі', - 'Template content' => 'ВміÑÑ‚ шаблону', - 'Styles content' => 'ВміÑÑ‚ Ñтилів', - 'Chunk content' => 'ВміÑÑ‚ чанка', - 'Edit Template' => 'Ð ÐµÐ´Ð°Ð³ÑƒÐ²Ð°Ð½Ð½Ñ ÑˆÐ°Ð±Ð»Ð¾Ð½Ñƒ', - 'Edit Chunk' => 'Ð ÐµÐ´Ð°Ð³ÑƒÐ²Ð°Ð½Ð½Ñ Ñ‡Ð°Ð½ÐºÐ°', - 'Edit Styles' => 'Ð ÐµÐ´Ð°Ð³ÑƒÐ²Ð°Ð½Ð½Ñ Ñтилів', - 'Site Theme' => 'Тема Ñайту', - 'Admin Theme' => 'Тема адмінки', - 'Current Site Theme' => 'Поточна тема Ñайтау', - 'Current admin theme' => 'Поточна тема адмінки', - 'This template already exists' => 'Цей шаблон вже Ñ–Ñнує', - 'This chunk already exists' => 'Цей чанк вже Ñ–Ñнує', - 'This styles already exist' => 'Цей Ñтиль вже Ñ–Ñнує', - 'Components templates' => 'Шаблони компонентів', - 'Your changes to the chunk :name have been saved.' => 'Ваші зміни до чанку :name були збережені', - 'Your changes to the styles :name have been saved.' => 'Ваші зміни до ÑÑ‚Ð¸Ð»Ñ :name були збережені', - 'Your changes to the template :name have been saved.' => 'Ваші зміни до шаблону :name були збережені', - 'Chunk :name deleted' => 'Чанк :name видалено', - 'Required field' => 'Обов’Ñзкове поле', - 'Scripts' => 'Скрипти', - 'Create New Script' => 'Створити новий Ñкрипт', - 'Script content' => 'ВміÑÑ‚ Ñкрипта', - 'New Script' => 'Ðовий Ñкрипт', - 'Edit Script' => 'Ð ÐµÐ´Ð°Ð³ÑƒÐ²Ð°Ð½Ð½Ñ Ñкрипту', - 'Cancel' => 'Відмінити', - ) - ); diff --git a/plugins/box/themes/languages/zh-cn.lang.php b/plugins/box/themes/languages/zh-cn.lang.php deleted file mode 100644 index 281b337..0000000 --- a/plugins/box/themes/languages/zh-cn.lang.php +++ /dev/null @@ -1,51 +0,0 @@ - array( - 'Themes' => '主题', - 'Themes manager' => '主题管ç†', - 'Select Theme' => '选择主题', - 'Save' => 'ä¿å­˜', - 'Save and Exit' => 'ä¿å­˜å¹¶é€€å‡º', - 'Name' => 'åç§°', - 'Create New Template' => '创建新模æ¿', - 'New Template' => '新建模æ¿', - 'Delete template: :name' => '删除模æ¿: :name', - 'Delete chunk: :name' => '删除区å—: :name', - 'Delete styles: :name' => '删除样å¼: :name', - 'Templates' => '模æ¿', - 'Clone' => '克隆', - 'Edit' => '编辑', - 'Delete' => '删除', - 'Actions' => 'æ“作', - 'Admin Theme' => 'åŽå°ä¸»é¢˜', - 'Create New Chunk' => '创建新区å—', - 'New Chunk' => '新建区å—', - 'Chunks' => '区å—', - 'Create New Styles' => '创建新样å¼', - 'New Styles' => '新建样å¼', - 'Styles' => 'æ ·å¼', - 'Template content' => '模æ¿å†…容', - 'Styles content' => 'æ ·å¼å†…容', - 'Chunk content' => '区å—内容', - 'Edit Template' => '编辑模æ¿', - 'Edit Chunk' => '编辑区å—', - 'Edit Styles' => '编辑样å¼', - 'Current Site Theme' => '当å‰ç½‘站主题', - 'Current admin theme' => '当å‰åŽå°ä¸»é¢˜', - 'This template already exists' => '此模æ¿å·²å­˜åœ¨', - 'This chunk already exists' => '此区å—已存在', - 'This styles already exist' => '此样å¼å·²å­˜åœ¨', - 'Components templates' => '组件模æ¿', - 'Your changes to the chunk :name have been saved.' => 'æ‚¨ä¿®æ”¹çš„åŒºå— :name å·²ä¿å­˜ã€‚', - 'Your changes to the styles :name have been saved.' => 'æ‚¨ä¿®æ”¹çš„æ ·å¼ :name å·²ä¿å­˜ã€‚', - 'Your changes to the template :name have been saved.' => 'æ‚¨ä¿®æ”¹çš„æ¨¡æ¿ :name å·²ä¿å­˜ã€‚', - 'Chunk :name deleted' => 'Chunk :name deleted', - 'Required field' => '必填字段', - 'Scripts' => '脚本', - 'Create New Script' => '创建新脚本', - 'Script content' => '脚本内容', - 'New Script' => '新建脚本', - 'Edit Script' => '编辑脚本', - ) - ); diff --git a/plugins/box/themes/themes.admin.php b/plugins/box/themes/themes.admin.php deleted file mode 100755 index a13cba4..0000000 --- a/plugins/box/themes/themes.admin.php +++ /dev/null @@ -1,646 +0,0 @@ -:name have been saved.', 'themes', array(':name' => Security::safeName(Request::post('name'), null, false)))); - - if (Request::post('add_file_and_exit')) { - Request::redirect('index.php?id=themes'); - } else { - Request::redirect('index.php?id=themes&action=edit_chunk&filename='.Security::safeName(Request::post('name'), null, false)); - } - } - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - } - - // Save fields - if (Request::post('name')) $name = Request::post('name'); else $name = ''; - if (Request::post('content')) $content = Request::post('content'); else $content = ''; - - // Display view - View::factory('box/themes/views/backend/add') - ->assign('name', $name) - ->assign('content', $content) - ->assign('errors', $errors) - ->assign('action', 'chunk') - ->display(); - break; - - // Add template - // ------------------------------------- - case "add_template": - if (Request::post('add_file') || Request::post('add_file_and_exit')) { - - if (Security::check(Request::post('csrf'))) { - - if (trim(Request::post('name')) == '') $errors['file_empty_name'] = __('Required field', 'themes'); - if (file_exists($template_path.Security::safeName(Request::post('name'), null, false).'.template.php')) $errors['file_exists'] = __('This template already exists', 'themes'); - - if (count($errors) == 0) { - - // Save chunk - File::setContent($template_path.Security::safeName(Request::post('name'), null, false).'.template.php', Request::post('content')); - - Notification::set('success', __('Your changes to the chunk :name have been saved.', 'themes', array(':name' => Security::safeName(Request::post('name'), null, false)))); - - if (Request::post('add_file_and_exit')) { - Request::redirect('index.php?id=themes'); - } else { - Request::redirect('index.php?id=themes&action=edit_template&filename='.Security::safeName(Request::post('name'), null, false)); - } - } - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - } - - // Save fields - if (Request::post('name')) $name = Request::post('name'); else $name = ''; - if (Request::post('content')) $content = Request::post('content'); else $content = ''; - - // Display view - View::factory('box/themes/views/backend/add') - ->assign('name', $name) - ->assign('content', $content) - ->assign('errors', $errors) - ->assign('action', 'template') - ->display(); - break; - - // Add styles - // ------------------------------------- - case "add_styles": - if (Request::post('add_file') || Request::post('add_file_and_exit')) { - - if (Security::check(Request::post('csrf'))) { - - if (trim(Request::post('name')) == '') $errors['file_empty_name'] = __('Required field', 'themes'); - if (file_exists($style_path.Security::safeName(Request::post('name'), null, false).'.css')) $errors['file_exists'] = __('This styles already exists', 'themes'); - - if (count($errors) == 0) { - - // Save chunk - File::setContent($style_path.Security::safeName(Request::post('name'), null, false).'.css', Request::post('content')); - - Notification::set('success', __('Your changes to the styles :name have been saved.', 'themes', array(':name' => Security::safeName(Request::post('name'), null, false)))); - - // Clean Monstra TMP folder. - Monstra::cleanTmp(); - - // Increment Styles version - Stylesheet::stylesVersionIncrement(); - - if (Request::post('add_file_and_exit')) { - Request::redirect('index.php?id=themes'); - } else { - Request::redirect('index.php?id=themes&action=edit_styles&filename='.Security::safeName(Request::post('name'), null, false)); - } - - } - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - } - - // Save fields - if (Request::post('name')) $name = Request::post('name'); else $name = ''; - if (Request::post('content')) $content = Request::post('content'); else $content = ''; - - // Display view - View::factory('box/themes/views/backend/add') - ->assign('name', $name) - ->assign('content', $content) - ->assign('errors', $errors) - ->assign('action', 'styles') - ->display(); - break; - - // Add script - // ------------------------------------- - case "add_script": - if (Request::post('add_file') || Request::post('add_file_and_exit')) { - - if (Security::check(Request::post('csrf'))) { - - if (trim(Request::post('name')) == '') $errors['file_empty_name'] = __('Required field', 'themes'); - if (file_exists($script_path.Security::safeName(Request::post('name'), null, false).'.js')) $errors['file_exists'] = __('This script already exists', 'themes'); - - if (count($errors) == 0) { - - // Save chunk - File::setContent($script_path.Security::safeName(Request::post('name'), null, false).'.js', Request::post('content')); - - Notification::set('success', __('Your changes to the script :name have been saved.', 'themes', array(':name' => Security::safeName(Request::post('name'), null, false)))); - - - // Clean Monstra TMP folder. - Monstra::cleanTmp(); - - // Increment Javascript version - Javascript::javascriptVersionIncrement(); - - - if (Request::post('add_file_and_exit')) { - Request::redirect('index.php?id=themes'); - } else { - Request::redirect('index.php?id=themes&action=edit_script&filename='.Security::safeName(Request::post('name'), null, false)); - } - - } - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - } - - // Save fields - if (Request::post('name')) $name = Request::post('name'); else $name = ''; - if (Request::post('content')) $content = Request::post('content'); else $content = ''; - - // Display view - View::factory('box/themes/views/backend/add') - ->assign('name', $name) - ->assign('content', $content) - ->assign('errors', $errors) - ->assign('action', 'script') - ->display(); - break; - - // Edit chunk - // ------------------------------------- - case "edit_chunk": - - // Save current chunk action - if (Request::post('edit_file') || Request::post('edit_file_and_exit') ) { - - if (Security::check(Request::post('csrf'))) { - - if (trim(Request::post('name')) == '') $errors['file_empty_name'] = __('Required field', 'themes'); - if ((file_exists($chunk_path.Security::safeName(Request::post('name'), null, false).'.chunk.php') and (Security::safeName(Request::post('chunk_old_name'), null, false)) !== Security::safeName(Request::post('name'), null, false))) $errors['file_exists'] = __('This chunk already exists', 'themes'); - - // Save fields - if (Request::post('content')) $content = Request::post('content'); else $content = ''; - if (count($errors) == 0) { - - $chunk_old_filename = $chunk_path.Request::post('chunk_old_name').'.chunk.php'; - $chunk_new_filename = $chunk_path.Security::safeName(Request::post('name'), null, false).'.chunk.php'; - if ( ! empty($chunk_old_filename)) { - if ($chunk_old_filename !== $chunk_new_filename) { - rename($chunk_old_filename, $chunk_new_filename); - $save_filename = $chunk_new_filename; - } else { - $save_filename = $chunk_new_filename; - } - } else { - $save_filename = $chunk_new_filename; - } - - // Save chunk - File::setContent($save_filename, Request::post('content')); - - Notification::set('success', __('Your changes to the chunk :name have been saved.', 'themes', array(':name' => basename($save_filename, '.chunk.php')))); - - if (Request::post('edit_file_and_exit')) { - Request::redirect('index.php?id=themes'); - } else { - Request::redirect('index.php?id=themes&action=edit_chunk&filename='.Security::safeName(Request::post('name'), null, false)); - } - } - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - } - if (Request::post('name')) $name = Request::post('name'); else $name = File::name(Request::get('filename')); - $content = File::getContent($chunk_path.Request::get('filename').'.chunk.php'); - - // Display view - View::factory('box/themes/views/backend/edit') - ->assign('content', $content) - ->assign('name', $name) - ->assign('errors', $errors) - ->assign('action', 'chunk') - ->display(); - - break; - - // Edit Template - // ------------------------------------- - case "edit_template": - - // Save current chunk action - if (Request::post('edit_file') || Request::post('edit_file_and_exit') ) { - - if (Security::check(Request::post('csrf'))) { - - if (trim(Request::post('name')) == '') $errors['file_empty_name'] = __('Required field', 'themes'); - if ((file_exists($template_path.Security::safeName(Request::post('name'), null, false).'.template.php') and (Security::safeName(Request::post('template_old_name'), null, false)) !== Security::safeName(Request::post('name'), null, false))) $errors['template_exists'] = __('This template already exists', 'themes'); - - // Save fields - if (Request::post('content')) $content = Request::post('content'); else $content = ''; - if (count($errors) == 0) { - - $template_old_filename = $template_path.Request::post('template_old_name').'.template.php'; - $template_new_filename = $template_path.Security::safeName(Request::post('name'), null, false).'.template.php'; - if ( ! empty($template_old_filename)) { - if ($template_old_filename !== $template_new_filename) { - rename($template_old_filename, $template_new_filename); - $save_filename = $template_new_filename; - } else { - $save_filename = $template_new_filename; - } - } else { - $save_filename = $template_new_filename; - } - - // Save chunk - File::setContent($save_filename, Request::post('content')); - - Notification::set('success', __('Your changes to the template :name have been saved.', 'themes', array(':name' => basename($save_filename, '.template.php')))); - - if (Request::post('edit_file_and_exit')) { - Request::redirect('index.php?id=themes'); - } else { - Request::redirect('index.php?id=themes&action=edit_template&filename='.Security::safeName(Request::post('name'), null, false)); - } - } - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - } - if (Request::post('name')) $name = Request::post('name'); else $name = File::name(Request::get('filename')); - $content = File::getContent($chunk_path.Request::get('filename').'.template.php'); - - // Display view - View::factory('box/themes/views/backend/edit') - ->assign('content', $content) - ->assign('name', $name) - ->assign('errors', $errors) - ->assign('action', 'template') - ->display(); - - break; - - // Edit Styles - // ------------------------------------- - case "edit_styles": - - // Save current chunk action - if (Request::post('edit_file') || Request::post('edit_file_and_exit') ) { - - if (Security::check(Request::post('csrf'))) { - - if (trim(Request::post('name')) == '') $errors['file_empty_name'] = __('Required field', 'themes'); - if ((file_exists($style_path.Security::safeName(Request::post('name'), null, false).'.css') and (Security::safeName(Request::post('styles_old_name'), null, false)) !== Security::safeName(Request::post('name'), null, false))) $errors['file_exists'] = __('This styles already exists', 'themes'); - - // Save fields - if (Request::post('content')) $content = Request::post('content'); else $content = ''; - if (count($errors) == 0) { - - $styles_old_filename = $style_path.Request::post('styles_old_name').'.css'; - $styles_new_filename = $style_path.Security::safeName(Request::post('name'), null, false).'.css'; - if ( ! empty($styles_old_filename)) { - if ($styles_old_filename !== $styles_new_filename) { - rename($styles_old_filename, $styles_new_filename); - $save_filename = $styles_new_filename; - } else { - $save_filename = $styles_new_filename; - } - } else { - $save_filename = $styles_new_filename; - } - - // Save chunk - File::setContent($save_filename, Request::post('content')); - - Notification::set('success', __('Your changes to the styles :name have been saved.', 'themes', array(':name' => basename($save_filename, '.css')))); - - // Clean Monstra TMP folder. - Monstra::cleanTmp(); - - // Increment Styles version - Stylesheet::stylesVersionIncrement(); - - if (Request::post('edit_file_and_exit')) { - Request::redirect('index.php?id=themes'); - } else { - Request::redirect('index.php?id=themes&action=edit_styles&filename='.Security::safeName(Request::post('name'), null, false)); - } - } - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - } - if (Request::post('name')) $name = Request::post('name'); else $name = File::name(Request::get('filename')); - $content = File::getContent($style_path.Request::get('filename').'.css'); - - // Display view - View::factory('box/themes/views/backend/edit') - ->assign('content', $content) - ->assign('name', $name) - ->assign('errors', $errors) - ->assign('action', 'styles') - ->display(); - - break; - - // Edit Script - // ------------------------------------- - case "edit_script": - - // Save current chunk action - if (Request::post('edit_file') || Request::post('edit_file_and_exit') ) { - - if (Security::check(Request::post('csrf'))) { - - if (trim(Request::post('name')) == '') $errors['file_empty_name'] = __('Required field', 'themes'); - if ((file_exists($script_path.Security::safeName(Request::post('name'), null, false).'.js')) and (Security::safeName(Request::post('script_old_name'), null, false)) !== Security::safeName(Request::post('name'), null, false)) $errors['file_exists'] = __('This script already exists', 'themes'); - - // Save fields - if (Request::post('content')) $content = Request::post('content'); else $content = ''; - if (count($errors) == 0) { - - $script_old_filename = $script_path.Request::post('script_old_name').'.js'; - $script_new_filename = $script_path.Security::safeName(Request::post('name'), null, false).'.js'; - if ( ! empty($script_old_filename)) { - if ($script_old_filename !== $script_new_filename) { - rename($script_old_filename, $script_new_filename); - $save_filename = $script_new_filename; - } else { - $save_filename = $script_new_filename; - } - } else { - $save_filename = $script_new_filename; - } - - // Save chunk - File::setContent($save_filename, Request::post('content')); - - Notification::set('success', __('Your changes to the script :name have been saved.', 'themes', array(':name' => basename($save_filename, '.js')))); - - // Clean Monstra TMP folder. - Monstra::cleanTmp(); - - // Increment Javascript version - Javascript::javascriptVersionIncrement(); - - if (Request::post('edit_file_and_exit')) { - Request::redirect('index.php?id=themes'); - } else { - Request::redirect('index.php?id=themes&action=edit_script&filename='.Security::safeName(Request::post('name'), null, false)); - } - } - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - } - if (Request::post('name')) $name = Request::post('name'); else $name = File::name(Request::get('filename')); - $content = File::getContent($script_path.Request::get('filename').'.js'); - - // Display view - View::factory('box/themes/views/backend/edit') - ->assign('content', $content) - ->assign('name', $name) - ->assign('errors', $errors) - ->assign('action', 'script') - ->display(); - - break; - - // Delete chunk - // ------------------------------------- - case "delete_chunk": - - if (Security::check(Request::get('token'))) { - - File::delete($chunk_path.Request::get('filename').'.chunk.php'); - Notification::set('success', __('Chunk :name deleted', 'themes', array(':name' => File::name(Request::get('filename'))))); - Request::redirect('index.php?id=themes'); - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - - break; - - // Delete styles - // ------------------------------------- - case "delete_styles": - - if (Security::check(Request::get('token'))) { - - File::delete($style_path.Request::get('filename').'.css'); - Notification::set('success', __('Styles :name deleted', 'themes', array(':name' => File::name(Request::get('filename'))))); - - // Clean Monstra TMP folder. - Monstra::cleanTmp(); - - // Increment Styles version - Stylesheet::stylesVersionIncrement(); - - Request::redirect('index.php?id=themes'); - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - - break; - - // Delete script - // ------------------------------------- - case "delete_script": - - if (Security::check(Request::get('token'))) { - - File::delete($script_path.Request::get('filename').'.js'); - Notification::set('success', __('Script :name deleted', 'themes', array(':name' => File::name(Request::get('filename'))))); - - // Clean Monstra TMP folder. - Monstra::cleanTmp(); - - // Increment Javascript version - Javascript::javascriptVersionIncrement(); - - Request::redirect('index.php?id=themes'); - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - - break; - - // Delete template - // ------------------------------------- - case "delete_template": - - if (Security::check(Request::get('token'))) { - - File::delete($template_path.Request::get('filename').'.template.php'); - Notification::set('success', __('Template :name deleted', 'themes', array(':name' => File::name(Request::get('filename'))))); - Request::redirect('index.php?id=themes'); - } - - break; - - // Clone styles - // ------------------------------------- - case "clone_styles": - - if (Security::check(Request::get('token'))) { - - File::setContent(THEMES_SITE . DS . $current_site_theme . DS . 'css' . DS . Request::get('filename') .'_clone_'.date("Ymd_His").'.css', - File::getContent(THEMES_SITE . DS . $current_site_theme . DS . 'css' . DS . Request::get('filename') . '.css')); - - // Clean Monstra TMP folder. - Monstra::cleanTmp(); - - // Increment Styles version - Stylesheet::stylesVersionIncrement(); - - Request::redirect('index.php?id=themes'); - } - - break; - - // Clone script - // ------------------------------------- - case "clone_script": - - if (Security::check(Request::get('token'))) { - - File::setContent(THEMES_SITE . DS . $current_site_theme . DS . 'js' . DS . Request::get('filename') .'_clone_'.date("Ymd_His").'.js', - File::getContent(THEMES_SITE . DS . $current_site_theme . DS . 'js' . DS . Request::get('filename') . '.js')); - - - // Clean Monstra TMP folder. - Monstra::cleanTmp(); - - // Increment Javascript version - Javascript::javascriptVersionIncrement(); - - Request::redirect('index.php?id=themes'); - } - - break; - - // Clone template - // ------------------------------------- - case "clone_template": - - if (Security::check(Request::get('token'))) { - - File::setContent(THEMES_SITE . DS . $current_site_theme . DS . Request::get('filename') .'_clone_'.date("Ymd_His").'.template.php', - File::getContent(THEMES_SITE . DS . $current_site_theme . DS . Request::get('filename') . '.template.php')); - - Request::redirect('index.php?id=themes'); - - } - - break; - - // Clone chunk - // ------------------------------------- - case "clone_chunk": - - if (Security::check(Request::get('token'))) { - File::setContent(THEMES_SITE . DS . $current_site_theme . DS . Request::get('filename') .'_clone_'.date("Ymd_His").'.chunk.php', - File::getContent(THEMES_SITE . DS . $current_site_theme . DS . Request::get('filename') . '.chunk.php')); - - Request::redirect('index.php?id=themes'); - } - - break; - - } - - } else { - - // Display view - View::factory('box/themes/views/backend/index') - ->assign('themes_site', $themes_site) - ->assign('themes_admin', $themes_admin) - ->assign('templates', $templates) - ->assign('chunks', $chunks) - ->assign('styles', $styles) - ->assign('scripts', $scripts) - ->assign('current_site_theme', $current_site_theme) - ->assign('current_admin_theme', $current_admin_theme) - ->display(); - - } - } -} diff --git a/plugins/box/themes/themes.plugin.php b/plugins/box/themes/themes.plugin.php deleted file mode 100644 index 76c116a..0000000 --- a/plugins/box/themes/themes.plugin.php +++ /dev/null @@ -1,191 +0,0 @@ - filemtime(MINIFY . DS . 'theme.' . $current_theme . '.minify.' . $name . '.chunk.php')) { - file_put_contents(MINIFY . DS . 'theme.' . $current_theme . '.minify.' . $name . '.chunk.php', - MinifyHTML::process(file_get_contents(THEMES_SITE. DS . $current_theme . DS . $name .'.chunk.php'))); - } - - // Include chunk - include MINIFY . DS . 'theme.' . $current_theme . '.minify.' . $name . '.chunk.php'; - } - - } - -} diff --git a/plugins/box/themes/views/backend/add.view.php b/plugins/box/themes/views/backend/add.view.php deleted file mode 100644 index 39d929e..0000000 --- a/plugins/box/themes/views/backend/add.view.php +++ /dev/null @@ -1,46 +0,0 @@ -

    -

    -

    -

    -
    - - - - 'form-horizontal'))); ?> - - - - - -
    - (isset($errors['file_empty_name']) || isset($errors['file_exists'])) ? 'form-control error-field' : 'form-control'))); ?> - .chunk.php - .template.php - .css - .js -
    - -'.$errors['file_empty_name'].''; - if (isset($errors['file_exists'])) echo ''.$errors['file_exists'].''; -?> - -
    - 'width:100%;height:400px;', 'class' => 'source-editor')); -?> -
    - - 'btn btn-primary')).Html::nbsp(2). - Form::submit('add_file', __('Save', 'themes'), array('class' => 'btn btn-default')).Html::nbsp(2). - Html::anchor(__('Cancel', 'themes'), 'index.php?id=themes', array('title' => __('Cancel', 'themes'), 'class' => 'btn btn-default')). - Form::close() - ); -?> \ No newline at end of file diff --git a/plugins/box/themes/views/backend/edit.view.php b/plugins/box/themes/views/backend/edit.view.php deleted file mode 100644 index 56d9025..0000000 --- a/plugins/box/themes/views/backend/edit.view.php +++ /dev/null @@ -1,62 +0,0 @@ -

    -

    -

    -

    - - 'form-horizontal'))); - echo (Form::hidden('csrf', Security::token())); - -?> - - - - - - - - -
    - (isset($errors['file_empty_name']) || isset($errors['file_exists'])) ? 'form-control error-field' : 'form-control'))); ?> - .chunk.php - .template.php - .css - .js -
    - -'.$errors['file_empty_name'].''; - if (isset($errors['file_exists'])) echo ''.$errors['file_exists'].''; -?> - -
    - 'width:100%;height:400px;', 'class' => 'source-editor')) - ); -?> -
    - - 'btn btn-primary')).Html::nbsp(2). - Form::submit('edit_file', __('Save', 'themes'), array('class' => 'btn btn-default')).Html::nbsp(2). - Html::anchor(__('Cancel', 'themes'), 'index.php?id=themes', array('title' => __('Cancel', 'themes'), 'class' => 'btn btn-default')). - Form::close() - ); - - } else { - if ($action == 'chunk') { echo '
    '.__('This chunk does not exist', 'themes').'
    '; } - if ($action == 'template') { echo '
    '.__('This template does not exist', 'themes').'
    '; } - if ($action == 'styles') { echo '
    '.__('This styles does not exist', 'themes').'
    '; } - if ($action == 'script') { echo '
    '.__('This script does not exist', 'themes').'
    '; } - } -?> \ No newline at end of file diff --git a/plugins/box/themes/views/backend/index.view.php b/plugins/box/themes/views/backend/index.view.php deleted file mode 100644 index ec913af..0000000 --- a/plugins/box/themes/views/backend/index.view.php +++ /dev/null @@ -1,217 +0,0 @@ -
    -
    - -

    - - - 'form-control')). Html::br(). - Form::submit('save_site_theme', __('Save', 'themes'), array('class' => 'btn btn-primary')). - Form::close() - ); - ?> - - -
    - -
    - -

    - - - 'form-control')). Html::br(). - Form::submit('save_admin_theme', __('Save', 'themes'), array('class' => 'btn btn-primary')). - Form::close() - ); - ?> - - -
    - -
    - -
    - -
    - -
    - - - - __('Create New Template'), 'class' => 'btn btn-default')).Html::br(2)); ?> - - - - - - - - - - - - - - - - - -
    -
    -
    - 'btn btn-primary')); ?> - - -
    - 'btn btn-actions btn-danger btn-actions-default', 'onclick' => "return confirmDelete('".__('Delete template: :name', 'themes', array(':name' => basename($template, '.template.php')))."')")); - ?> -
    -
    - - - __('Create New Chunk', 'themes'), 'class' => 'btn btn-default')).Html::br(2)); ?> - - - - - - - - - - - - - - - - - -
    -
    -
    - 'btn btn-primary')); ?> - - -
    - 'btn btn-actions btn-danger btn-actions-default', 'onclick' => "return confirmDelete('".__('Delete chunk: :name', 'themes', array(':name' => basename($chunk, '.chunk.php')))."')")); - ?> -
    -
    - - - __('Create New Style', 'themes'), 'class' => 'btn btn-default')).Html::br(2)); ?> - - - - - - - - - - - - - - - - -
    -
    -
    -
    - 'btn btn-primary')); ?> - - -
    - 'btn btn-actions btn-danger btn-actions-default', 'onclick' => "return confirmDelete('".__('Delete styles: :name', 'themes', array(':name' => basename($style, '.css')))."')")); - ?> -
    -
    - - - __('Create New Script', 'themes'), 'class' => 'btn btn-default')).Html::br(2)); ?> - - - - - - - - - - - - - - - - - -
    -
    -
    - 'btn btn-primary')); ?> - - -
    - 'btn btn-actions btn-danger btn-actions-default', 'onclick' => "return confirmDelete('".__('Delete script: :name', 'themes', array(':name' => basename($script, '.js')))."')")); - ?> -
    -
    - - - 3) { -?> -


    - - -
    -
    diff --git a/plugins/box/users/install/users.manifest.xml b/plugins/box/users/install/users.manifest.xml deleted file mode 100644 index 90808b9..0000000 --- a/plugins/box/users/install/users.manifest.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - plugins/box/users/users.plugin.php - active - 7 - Users - Users plugin - 1.0.0 - Awilum - http://monstra.org/ - diff --git a/plugins/box/users/js/.htaccess b/plugins/box/users/js/.htaccess deleted file mode 100644 index b9f48ac..0000000 --- a/plugins/box/users/js/.htaccess +++ /dev/null @@ -1,2 +0,0 @@ -Options -Indexes -Allow from all \ No newline at end of file diff --git a/plugins/box/users/js/users.js b/plugins/box/users/js/users.js deleted file mode 100644 index cc96c07..0000000 --- a/plugins/box/users/js/users.js +++ /dev/null @@ -1,20 +0,0 @@ -if (typeof $.monstra == 'undefined') $.monstra = {}; - -$.monstra.users = { - - init: function() { - this.usersFrontendRegistration(); - }, - - usersFrontendRegistration: function() { - $('#users_frontend_registration').on('ifChanged', function(event){ - $("form[name=users_frontend]").submit(); - }); - } - -}; - - -$(document).ready(function(){ - $.monstra.users.init(); -}); \ No newline at end of file diff --git a/plugins/box/users/languages/cs.lang.php b/plugins/box/users/languages/cs.lang.php deleted file mode 100644 index 39b229d..0000000 --- a/plugins/box/users/languages/cs.lang.php +++ /dev/null @@ -1,69 +0,0 @@ - array( - 'Users' => 'Uživatelé', - 'Login' => 'PÅ™ihlásit', - 'Username' => 'PÅ™ihlaÅ¡ovací jméno', - 'Password' => 'Heslo', - 'Registered' => 'Registrovaný', - 'Email' => 'Email', - 'Role' => 'Úloha', - 'Roles' => 'Úlohy', - 'Edit' => 'Editovat', - 'Actions' => 'Akce', - 'Delete' => 'Vymazat', - 'Log In' => 'PÅ™ihlásit', - 'Log Out' => 'Odhlásit', - 'Register New User' => 'Registrace Nového Uživatele', - 'New User Registration' => 'Registrace nového uživatele', - 'Delete user: :user' => 'Vymazat uživatele: :user', - 'User :user have been deleted.' => 'Uživatel :user byl vymazán.', - 'This user already exists' => 'Tento uživatel už existuje', - 'This email already exists' => 'Tento email už existuje', - 'Changes saved' => 'Uložit zmÄ›ny', - 'Wrong old password' => 'Nesprávné staré heslo', - 'Admin' => 'Administrátor', - 'User' => 'Uživatel', - 'Editor' => 'Editor', - 'Register' => 'Registrovat', - 'Edit profile' => 'Editovat profil', - 'Save' => 'Uložit', - 'Firstname' => 'KÅ™estní jméno', - 'Lastname' => 'Příjmení', - 'Old password' => 'Staré heslo', - 'New password' => 'Nové heslo', - 'Welcome' => 'Vítejte', - 'Wrong username or password' => 'Nesprávné uživatelské jméno nebo heslo', - 'Your changes have been saved.' => 'VaÅ¡e zmÄ›ny byly uloženy.', - 'New user have been registered.' => 'Nový uživatel byl zaregistrovaný.', - 'Captcha' => 'Captcha', - 'Registration' => 'Registrace', - 'Username' => 'Uživatelské heslo', - 'User email is invalid' => 'Uživatelský email není ve správném tvaru', - 'Reset Password' => 'Obnovit heslo', - 'Send New Password' => 'Poslat nové heslo', - 'This user doesnt alredy exist' => 'Tento uživatel neexistuje', - 'Users - Profile' => 'Uživatelé - Profil', - 'Users - Edit Profile' => 'Uživatelé - Editovat Profil', - 'Users - Log In' => 'Uživatelé - PÅ™ihlášení', - 'Users - Registration' => 'Uživatelé - Registrace', - 'Users - Password Recover' => 'Uživatelé - Obnova hesla', - 'New Password' => 'Nové heslo', - 'Forgot your password?' => 'ZapomnÄ›li jste heslo?', - 'New password has been sent' => 'Nové heslo bylo zaslané', - 'Monstra says: This is not your profile...' => 'Monstra říká: Toto není Váš profil...', - 'User registration is closed.' => 'Registrace uživatelů je uzavÅ™ená.', - 'Allow user registration' => 'Povolit registraci uživatelů', - 'Required field' => 'Povinné políÄko', - 'This user doesnt exist' => 'Tento uživatel neexistuje', - 'Captcha code is wrong' => 'Captcha kód není správný', - 'Your login details for :site_name has been sent' => 'Váše pÅ™ihlaÅ¡ovací údaje pro :site_name byly zaslané', - 'Your new password for :site_name' => 'VaÅ¡e nové heslo pro :site_name', - 'Your login details for :site_name' => 'VaÅ¡e pÅ™ihlaÅ¡ovací údaje pro :site_name', - 'About Me' => 'O mnÄ›', - 'Profile' => 'Profil', - 'You are banned for 10 minutes. Try again later' => 'Máte ban na 10 minut. Zkuste to znovu pozdÄ›ji', - 'Cancel' => 'ZruÅ¡it', - ) - ); diff --git a/plugins/box/users/languages/de.lang.php b/plugins/box/users/languages/de.lang.php deleted file mode 100644 index 54fcfbb..0000000 --- a/plugins/box/users/languages/de.lang.php +++ /dev/null @@ -1,69 +0,0 @@ - array( - 'Users' => 'Benutzer', - 'Login' => 'Login', - 'Username' => 'Benutzername', - 'Password' => 'Passwort', - 'Registered' => 'Registriert', - 'Email' => 'Email', - 'Role' => 'Funktion', - 'Roles' => 'Funktionen', - 'Edit' => 'Bearbeiten', - 'Actions' => 'Aktionen', - 'Delete' => 'Löschen', - 'Log In' => 'Einloggen', - 'Log Out' => 'Abmelden', - 'Register New User' => 'Registriere Neuen Benutzer', - 'New User Registration' => 'Neuen Benutzer registrieren', - 'Delete user: :user' => 'Lösche Benutzer: :user', - 'User :user have been deleted.' => 'Benutzer :user wurde gelöscht.', - 'This field should not be empty' => 'Dieses Feld darf nicht leer sein', - 'This user alredy exist' => 'Dieser Benutzer existiert bereits', - 'Changes saved' => 'Änderungen gespeichert', - 'Wrong old password' => 'Altes Passwort falsch', - 'Admin' => 'Admin', - 'User' => 'Benutzer', - 'Editor' => 'Redakteur', - 'Register' => 'Registrieren', - 'Edit profile' => 'Profil bearbeiten', - 'Save' => 'Speichern', - 'Firstname' => 'Vorname', - 'Lastname' => 'Nachname', - 'Old password' => 'Altes Passwort', - 'New password' => 'Neues Passwort', - 'Welcome' => 'Willkommen', - 'Wrong username or password' => 'Falscher Benutzername oder Passwort', - 'Your changes have been saved.' => 'Deine Änderungen wurden gespeichert.', - 'New user have been registered.' => 'Neuer Benutzer wurde registriert.', - 'Captcha' => 'Captcha', - 'Registration' => 'Registrierung', - 'Username' => 'Benutzername', - 'User email is invalid' => 'Benutzer-Email ist nicht gültig', - 'Reset Password' => 'Passwort zurücksetzen', - 'Send New Password' => 'Neues Passwort zusenden', - 'This user doesnt alredy exist' => 'Dieser Benutzer ist nocht nicht vorhanden', - 'Users - Profile' => 'Benutzer - Profil', - 'Users - Edit Profile' => 'Benutzer - Profil Bearbeiten', - 'Users - Log In' => 'Benutzer - Log In', - 'Users - Registration' => 'Benutzer - Registration', - 'Users - Password Recover' => 'Benutzer - Passwort wiederherstellen', - 'New Password' => 'Neues Passwort', - 'Forgot your password?' => 'Passwort vergessen?', - 'New password has been sent' => 'Neues Passwort wurde versendet', - 'Monstra says: This is not your profile...' => 'Monstra sagt: Das ist nicht dein Profil...', - 'User registration is closed.' => 'Benutzer Registration ist geschloßen.', - 'Allow user registration' => 'Erlaube Benutzer Registration', - 'Required field' => 'Pflichtfeld', - 'This user doesnt exist' => 'Dieser Benutzer existiert nicht', - 'Captcha code is wrong' => 'Captcha Code ist falsch', - 'Your login details for :site_name has been sent' => 'Deine Login-Daten für :site_name wurden versendet', - 'Your new password for :site_name' => 'Dein neues Passwort für :site_name', - 'Your login details for :site_name' => 'Deine Login-Daten für :site_name', - 'About Me' => 'Über Mich', - 'Profile' => 'Profil', - 'You are banned for 10 minutes. Try again later' => 'Du wurdest für 10 Minuten blockiert. Bitte probier es später nochmal', - 'Cancel' => 'Abbrechen', - ) - ); diff --git a/plugins/box/users/languages/en.lang.php b/plugins/box/users/languages/en.lang.php deleted file mode 100644 index 85e02ae..0000000 --- a/plugins/box/users/languages/en.lang.php +++ /dev/null @@ -1,69 +0,0 @@ - array( - 'Users' => 'Users', - 'Login' => 'Login', - 'Username' => 'Username', - 'Password' => 'Password', - 'Registered' => 'Registered', - 'Email' => 'Email', - 'Role' => 'Role', - 'Roles' => 'Roles', - 'Edit' => 'Edit', - 'Actions' => 'Actions', - 'Delete' => 'Delete', - 'Log In' => 'Log In', - 'Log Out' => 'Log Out', - 'Register New User' => 'Register New User', - 'New User Registration' => 'New User Registration', - 'Delete user: :user' => 'Delete user: :user', - 'User :user have been deleted.' => 'User :user have been deleted.', - 'This user already exists' => 'This user already exists', - 'This email already exists' => 'This email already exists', - 'Changes saved' => 'Changes saved', - 'Wrong old password' => 'Wrong old password', - 'Admin' => 'Admin', - 'User' => 'User', - 'Editor' => 'Editor', - 'Register' => 'Register', - 'Edit profile' => 'Edit profile', - 'Save' => 'Save', - 'Firstname' => 'Firstname', - 'Lastname' => 'Lastname', - 'Old password' => 'Old password', - 'New password' => 'New password', - 'Welcome' => 'Welcome', - 'Wrong username or password' => 'Wrong username or password', - 'Your changes have been saved.' => 'Your changes have been saved.', - 'New user have been registered.' => 'New user have been registered.', - 'Captcha' => 'Captcha', - 'Registration' => 'Registration', - 'Username' => 'Username', - 'User email is invalid' => 'User email is invalid', - 'Reset Password' => 'Reset Password', - 'Send New Password' => 'Send New Password', - 'This user doesnt alredy exist' => 'This user doesnt alredy exist', - 'Users - Profile' => 'Users - Profile', - 'Users - Edit Profile' => 'Users - Edit Profile', - 'Users - Log In' => 'Users - Log In', - 'Users - Registration' => 'Users - Registration', - 'Users - Password Recover' => 'Users - Password Recover', - 'New Password' => 'New Password', - 'Forgot your password?' => 'Forgot your password?', - 'New password has been sent' => 'New password has been sent', - 'Monstra says: This is not your profile...' => 'Monstra says: This is not your profile...', - 'User registration is closed.' => 'User registration is closed.', - 'Allow user registration' => 'Allow user registration', - 'Required field' => 'Required field', - 'This user doesnt exist' => 'This user doesnt exist', - 'Captcha code is wrong' => 'Captcha code is wrong', - 'Your login details for :site_name has been sent' => 'Your login details for :site_name has been sent', - 'Your new password for :site_name' => 'Your new password for :site_name', - 'Your login details for :site_name' => 'Your login details for :site_name', - 'About Me' => 'About Me', - 'Profile' => 'Profile', - 'You are banned for 10 minutes. Try again later' => 'You are banned for 10 minutes. Try again later', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/users/languages/es.lang.php b/plugins/box/users/languages/es.lang.php deleted file mode 100644 index d44bfe2..0000000 --- a/plugins/box/users/languages/es.lang.php +++ /dev/null @@ -1,69 +0,0 @@ - array( - 'Users' => 'Usuarios', - 'Login' => 'Iniciar sesión', - 'Username' => 'Nombre de usuario', - 'Password' => 'Contraseña', - 'Registered' => 'Fecha de registro', - 'Email' => 'Correo electrónico', - 'Role' => 'Nivel', - 'Roles' => 'Niveles', - 'Edit' => 'Editar', - 'Actions' => 'Acciones', - 'Delete' => 'Eliminar', - 'Log In' => 'Iniciar sesión', - 'Log Out' => 'Cerrar sesión', - 'Register New User' => 'Registrar nuevo usuario', - 'New User Registration' => 'Registro de nuevo usuario', - 'Delete user: :user' => 'Eliminar usuario: :user', - 'User :user have been deleted.' => 'El usuario :user ha sido eliminado.', - 'This user alredy exist' => 'Este usuario ya existe', - 'This email alredy exist' => 'Este correo ya existe', - 'Changes saved' => 'Cambios guardados', - 'Wrong old password' => 'Contraseña antigua incorrecta', - 'Admin' => 'Administrador', - 'User' => 'Usuario', - 'Editor' => 'Editor', - 'Register' => 'Registrar', - 'Edit profile' => 'Editar perfil', - 'Save' => 'Guardar', - 'Firstname' => 'Nombre', - 'Lastname' => 'Apellido', - 'Old password' => 'Contraseña antigua', - 'New password' => 'Nueva contraseña', - 'Welcome' => 'Bienvenido', - 'Wrong username or password' => 'Nombre de usuario o contraseña incorrectos', - 'Your changes have been saved.' => 'Tus cambios han sido guardados.', - 'New user have been registered.' => 'El nuevo usuario ha sido registrado.', - 'Captcha' => 'Captcha', - 'Registration' => 'Registro', - 'Username' => 'Nombre de usuario', - 'User email is invalid' => 'El correo del usuario es inválido', - 'Reset Password' => 'Restablecer contraseña', - 'Send New Password' => 'Enviar nueva contraseña', - 'This user doesnt alredy exist' => 'Este usuario no existe aún', - 'Users - Profile' => 'Usuarios - Perfil', - 'Users - Edit Profile' => 'Usuarios - Editar perfil', - 'Users - Log In' => 'Usuarios - Iniciar sesión', - 'Users - Registration' => 'Usuarios - Registro', - 'Users - Password Recover' => 'Usuarios - Recuperar contraseña', - 'New Password' => 'Nueva contraseña', - 'Forgot your password?' => '¿Olvidaste tu contraseña?', - 'New password has been sent' => 'Tu nueva contraseña ha sido enviada', - 'Monstra says: This is not your profile...' => 'Monstra dice: Este es tu perfil...', - 'User registration is closed.' => 'El registro de usuarios está cerrado.', - 'Allow user registration' => 'Permitir registro', - 'Required field' => 'Campo requerido', - 'This user doesnt exist' => 'Este usuario no existe', - 'Captcha code is wrong' => 'Código captcha incorrecto', - 'Your login details for :site_name has been sent' => 'Tus detalles para iniciar sesión en :site_name han sido enviados', - 'Your new password for :site_name' => 'Tu nueva contraseña para :site_name', - 'Your login details for :site_name' => 'Tus detalles para iniciar sesión en :site_name', - 'About Me' => 'Acerca de mí', - 'Profile' => 'Perfil', - 'You are banned for 10 minutes. Try again later' => 'Has sido baneado por 10 minutos. Inténtalo nuevamente más tarde', - 'Cancel' => 'Cancelar', - ) - ); diff --git a/plugins/box/users/languages/fa.lang.php b/plugins/box/users/languages/fa.lang.php deleted file mode 100644 index 82fbac7..0000000 --- a/plugins/box/users/languages/fa.lang.php +++ /dev/null @@ -1,69 +0,0 @@ - array( - 'Users' => 'کاربران', - 'Login' => 'ورود', - 'Username' => 'نام کاربری', - 'Password' => 'پسورد', - 'Registered' => 'عضو', - 'Email' => 'ایمیل', - 'Role' => 'سمت', - 'Roles' => 'سمت', - 'Edit' => 'ویرایش', - 'Actions' => 'عملیات', - 'Delete' => 'حذÙ', - 'Enter' => 'ورود', - 'Logout' => 'خروج', - 'Register New User' => 'ثبت نام کاربر جدید', - 'New User Registration' => 'ثبت نام کاربر جدید', - 'Delete user: :user' => 'حذ٠کاربر: :user', - 'User :user have been deleted.' => 'کاربر :user حذ٠شد.', - 'This user already exists' => 'این کاربر هم اکنون وجود دارد', - 'This email already exists' => 'این ایمیل هم اکنون وجود دارد', - 'Changes saved' => 'تغییرات ذخیره شد', - 'Wrong old password' => 'پسورد قدیمی اشتباه است', - 'Admin' => 'مدیر', - 'User' => 'کاربر', - 'Editor' => 'ویرایشگر', - 'Register' => 'عضو', - 'Edit profile' => 'ویرایش Ù¾Ø±ÙˆÙØ§ÛŒÙ„', - 'Save' => 'ذخیره', - 'Firstname' => 'نام Ú©ÙˆÚ†Ú©', - 'Lastname' => 'نام خانوادگی', - 'Old password' => 'پسورد قدیم', - 'New password' => 'پسورد جدید', - 'Welcome' => 'خوش آمدید', - 'Wrong username or password' => 'نام کاربری Ùˆ یا پسورد اشتباه است', - 'Your changes have been saved.' => 'تغییرات شما ذخیره شدند.', - 'New user have been registered.' => 'کاربر جدید ثبت نام شد.', - 'Captcha' => 'کدامنیتی', - 'Registration' => 'ثبت نام', - 'Username' => 'نام کاربری', - 'User email is invalid' => 'ایمیل کاربر معتبر نیست', - 'Reset Password' => 'تنظیم مجدد پسورد', - 'Send New Password' => 'ارسال پسورد جدید', - 'This user doesnt alredy exist' => 'این کاربر وجود ندارد', - 'Users - Profile' => 'کاربران - Ù¾Ø±ÙˆÙØ§ÛŒÙ„', - 'Users - Edit Profile' => 'کاربران - ویرایش Ù¾Ø±ÙˆÙØ§ÛŒÙ„', - 'Users - Login' => 'کاربران - ورود', - 'Users - Registration' => 'کاربران - ثبت نام', - 'Users - Password Recover' => 'کاربران - بازیابی پسورد', - 'New Password' => 'پسورد جدید', - 'Forgot your password?' => 'پسورد خود را ÙØ±Ø§Ù…وش کرده اید؟', - 'New password has been sent' => 'پسورد جدید ارسال شد', - 'Monstra says: This is not your profile...' => 'مونسترا میگوید: این Ù¾Ø±ÙˆÙØ§ÛŒÙ„ شما نیست ...', - 'User registration is closed.' => 'ثبت نام کاربر بسته شده است.', - 'Allow user registration' => 'اجازه ثبت نام کاربر', - 'Required field' => 'کادر الزامی', - 'This user doesnt exist' => 'این کاربر وجود ندارد', - 'Captcha code is wrong' => 'کدامنیتی اشتباه است', - 'Your login details for :site_name has been sent' => 'جزئیات ورود شما برای :site_name ارسال شد', - 'Your new password for :site_name' => 'پسورد جدید شما برای :site_name', - 'Your login details for :site_name' => 'جزئیات ورود شما برای :site_name', - 'About Me' => 'درباره من', - 'Profile' => 'Ù¾Ø±ÙˆÙØ§ÛŒÙ„', - 'You are banned for 10 minutes. Try again later' => 'You are banned for 10 minutes. Try again later', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/users/languages/fr.lang.php b/plugins/box/users/languages/fr.lang.php deleted file mode 100644 index 2246d80..0000000 --- a/plugins/box/users/languages/fr.lang.php +++ /dev/null @@ -1,69 +0,0 @@ - array( - 'Users' => 'Utilisateurs', - 'Login' => 'Identifiant', - 'Username' => 'Nom d\'utilisateur', - 'Password' => 'Mot de passe', - 'Registered' => 'Enregistrer', - 'Email' => 'Email', - 'Role' => 'Role', - 'Roles' => 'Roles', - 'Edit' => 'Editer', - 'Actions' => 'Actions', - 'Delete' => 'Supprimer', - 'Enter' => 'Entrer', - 'Logout' => 'Déconnexion', - 'Register new user' => 'Inscription d\'un nouvel utilisateur', - 'New User Registration' => 'Nouveau utilisateur enregistrer', - 'Delete user: :user' => 'Supprimer l\'utilisateur: :user', - 'User :user have been deleted.' => 'L\'utilisateur :user a été supprimer.', - 'This user already exists' => 'Cet utilisateur existe déjà', - 'This email already exists' => 'Cet email existe déjà', - 'Changes saved' => 'Changements enregistrer', - 'Wrong old password' => 'Ancien mot de passe erroné', - 'Admin' => 'Admin', - 'User' => 'Utilisateur', - 'Editor' => 'Editeur', - 'Register' => 'Enregistrer', - 'Edit profile' => 'Editer le profil', - 'Save' => 'Enregistrer', - 'Firstname' => 'Prénom', - 'Lastname' => 'Nom', - 'Old password' => 'Ancien mot de passe', - 'New password' => 'Nouveau mot de passe', - 'Welcome' => 'Bienvenue', - 'Wrong username or password' => 'Mauvais nom d\'utilisateur ou mot de passe', - 'Your changes have been saved.' => 'Vos changements ont été sauvegardés.', - 'New user have been registered.' => 'Le nouvel utilisateura été enregistrer.', - 'Captcha' => 'Captcha', - 'Registration' => 'Inscription', - 'Username' => 'Nom d\'utilisateur', - 'User email is invalid' => 'Le mot de passe utilisateur est invalide', - 'Reset Password' => 'Réinitialiser le mot de passe', - 'Send New Password' => 'Envoyer un nouveau mot de passe', - 'This user doesnt alredy exist' => 'Cet utilisateur n\'existe pas', - 'Users - Profile' => 'Utilisateurs - Profil', - 'Users - Edit Profile' => 'Utilisateurs - Editer le profile', - 'Users - Login' => 'Utilisateurs - Identifiant', - 'Users - Registration' => 'Utilisateurs - Inscription', - 'Users - Password Recover' => 'Utilisateurs - Récupération du mot de passe', - 'New Password' => 'Nouveau mot de passe', - 'Forgot your password?' => 'Mot de passe oublié ?', - 'New password has been sent' => 'Un nouveau mot de passe a été envoyé', - 'Monstra says: This is not your profile...' => 'Monstra dit: Ce n\'est pas votre profil ...', - 'User registration is closed.' => 'L\'enregistrement d\'utilisateur est fermé.', - 'Allow user registration' => 'Permettre l\'enregistrement des utilisateurs', - 'Required field' => 'Champ requis', - 'This user doesnt exist' => 'Cet utilisateur n\'existe pas', - 'Captcha code is wrong' => 'Le code Captcha est faux', - 'Your login details for :site_name has been sent' => 'Vos informations de connexion pour :site_name ont étés envoyé', - 'Your new password for :site_name' => 'Votre nouveau mot de passe pour :site_name', - 'Your login details for :site_name' => 'Vos identifiants de connexion pour :site_name', - 'About Me' => 'A propos de moi', - 'Profile' => 'Profil', - 'You are banned for 10 minutes. Try again later' => 'You are banned for 10 minutes. Try again later', - 'Cancel' => 'Cancel', - ) - ); \ No newline at end of file diff --git a/plugins/box/users/languages/hu.lang.php b/plugins/box/users/languages/hu.lang.php deleted file mode 100644 index 8a9c4c1..0000000 --- a/plugins/box/users/languages/hu.lang.php +++ /dev/null @@ -1,69 +0,0 @@ - array( - 'Users' => 'Felhasználók', - 'Log In' => 'Belépés', - 'Username' => 'Felhasználónév', - 'Password' => 'Jelszó', - 'Registered' => 'Regisztrált', - 'Email' => 'E-mail', - 'Role' => 'Státusz', - 'Roles' => 'Státuszok', - 'Edit' => 'Szerkeszt', - 'Actions' => 'Műveletek', - 'Delete' => 'Töröl', - 'Enter' => 'Belépés', - 'Log Out' => 'Kilépés', - 'Register New User' => 'Új felhasználó regisztrálása', - 'New User Registration' => 'Új felhasználó regisztráció', - 'Delete user: :user' => 'Felhasználó törlése: :user', - 'User :user have been deleted.' => 'A :user nevű felhasználó törölve.', - 'This user already exists' => 'Ez a felhasználónév már létezik', - 'This email already exists' => 'Az e-mail már létezik', - 'Changes saved' => 'Változtatások elmentve', - 'Wrong old password' => 'Rossz a régi jelszó', - 'Admin' => 'Admin', - 'User' => 'Felhasználó', - 'Editor' => 'SzerkesztÅ‘', - 'Register' => 'Mehet', - 'Edit profile' => 'Profil szerkesztése', - 'Save' => 'Mentés', - 'Firstname' => 'Keresztnév', - 'Lastname' => 'Vezetéknév', - 'Old password' => 'Régi jelszó', - 'New password' => 'Új jelszó', - 'Welcome' => 'Üdvözlünk', - 'Wrong username or password' => 'Hibás username vagy password', - 'Your changes have been saved.' => 'A módosítások mentése megtörtént.', - 'New user have been registered.' => 'Új felhasználó regisztrálva.', - 'Captcha' => 'Captcha', - 'Registration' => 'Regisztráció', - 'Username' => 'Felhasználónév', - 'User email is invalid' => 'A felhasználó e-mail cím érvénytelen', - 'Reset Password' => 'Jelszó törlése', - 'Send New Password' => 'Új jelszó küldése', - 'This user doesnt alredy exist' => 'Ez a felhasználó nem létezik', - 'Users - Profile' => 'Felhasználók - Profil', - 'Users - Edit Profile' => 'Felhasználók - Profil szerkesztése', - 'Users - Login' => 'Felhasználók - Belépés', - 'Users - Registration' => 'Felhasználók - Regisztráció', - 'Users - Password Recover' => 'Felhasználók - Elfelejtett jelszó', - 'New Password' => 'Új jelszó', - 'Forgot your password?' => 'Elfelejtette a jelszavát?', - 'New password has been sent' => 'Az új jelszót elküldtük', - 'Monstra says: This is not your profile...' => 'Monstra mondja: Ez nem a Ön profilja ...', - 'User registration is closed.' => 'Felhasználó regisztráció lezárult.', - 'Allow user registration' => 'Felhasználó regisztráció engedélyezve', - 'Required field' => 'KötelezÅ‘ mezÅ‘', - 'This user doesnt exist' => 'Ez a felhasználó nem létezik', - 'Captcha code is wrong' => 'Captcha kód hibás', - 'Your login details for :site_name has been sent' => 'Elküldve a belépési adatai a(z) :site_name weboldalhoz', - 'Your new password for :site_name' => 'Új jelszó a(z) :site_name weboldalhoz', - 'Your login details for :site_name' => 'Belépési adatok a(z) :site_name weboldalhoz', - 'About Me' => 'Rólam', - 'Profile' => 'Profil', - 'You are banned for 10 minutes. Try again later' => 'You are banned for 10 minutes. Try again later', - 'Cancel' => 'Cancel', - ) - ); \ No newline at end of file diff --git a/plugins/box/users/languages/id.lang.php b/plugins/box/users/languages/id.lang.php deleted file mode 100644 index 2428a0c..0000000 --- a/plugins/box/users/languages/id.lang.php +++ /dev/null @@ -1,68 +0,0 @@ - array( - 'Users' => 'Pengguna', - 'Login' => 'Masuk', - 'Username' => 'Pengguna', - 'Password' => 'Password', - 'Registered' => 'Terdaftar', - 'Email' => 'Email', - 'Role' => 'Peran', - 'Roles' => 'Peranan', - 'Edit' => 'Perbaiki', - 'Actions' => 'Tindakan', - 'Delete' => 'Hapus', - 'Enter' => 'Masukkan', - 'Logout' => 'Keluar', - 'Register New User' => 'Daftarkan Pengguna Baru', - 'New User Registration' => 'Pendaftaran Pengguna Baru', - 'Delete user: :user' => 'Hapus pengguna: :user', - 'User :user have been deleted.' => 'Pengguna :user telah dihapus.', - 'This user already exists' => 'Pengguna ini sudah terdaftar', - 'This email already exists' => 'Email', - 'Changes saved' => 'Perubahan disimpan', - 'Wrong old password' => 'Password lama salah', - 'Admin' => 'Admin', - 'User' => 'Pengguna', - 'Editor' => 'Editor', - 'Register' => 'Daftar', - 'Edit profile' => 'Perbaiki Profil', - 'Save' => 'Simpan', - 'Firstname' => 'Nama Pertama', - 'Lastname' => 'Nama Terakhir', - 'Old password' => 'Password Lama', - 'New password' => 'Password Baru', - 'Welcome' => 'Selamat Datang', - 'Wrong username or password' => 'Kesalahan nama pengguna atau password', - 'Your changes have been saved.' => 'Perubahan telah disimpan.', - 'New user have been registered.' => 'Pengguna baru telah terdaftar.', - 'Captcha' => 'Verifikasi', - 'Registration' => 'Pendaftaran', - 'Username' => 'Nama Pengguna', - 'User email is invalid' => 'Email tidak cocok', - 'Reset Password' => 'Mengganti Password', - 'Send New Password' => 'Mengirim password baru', - 'This user doesnt alredy exist' => 'Pengguna ini belum ada', - 'Users - Profile' => 'Pengguna - Profil', - 'Users - Edit Profile' => 'Pengguna - Perbaiki Profil', - 'Users - Login' => 'Pengguna - Masuk', - 'Users - Registration' => 'Pengguna - Pendaftaran', - 'Users - Password Recover' => 'Pengguna - Mendapatkan Kembali Password', - 'New Password' => 'Password Baru', - 'Forgot your password?' => 'Lupa Password Anda?', - 'New password has been sent' => 'Password baru telah dikirim', - 'Monstra says: This is not your profile...' => 'Katanya Monstra: Ini bukan profil Anda ...', - 'User registration is closed.' => 'Pendaftaran pengguna telah ditutup.', - 'Allow user registration' => 'Izinkan pendaftaran pengguna', - 'Required field' => 'Isian yang diperlukan', - 'This user doesnt exist' => 'Pengguna ini tidak terdaftar', - 'Captcha code is wrong' => 'Kode verifikasi salah', - 'Your login details for :site_name has been sent' => 'Rincian data :site_name telah dikirim', - 'Your new password for :site_name' => 'Password baru untuk :site_name', - 'Your login details for :site_name' => 'Rincian data untuk :site_name', - 'About Me' => 'Tentang Saya', - 'Profile' => 'Profil', - 'You are banned for 10 minutes. Try again later' => 'Anda dilarang masuk selama 10 menit. Silahkan dicoba lagi nanti', - ) - ); diff --git a/plugins/box/users/languages/it.lang.php b/plugins/box/users/languages/it.lang.php deleted file mode 100644 index 53ca147..0000000 --- a/plugins/box/users/languages/it.lang.php +++ /dev/null @@ -1,66 +0,0 @@ - array( - 'Users' => 'Utenti', - 'Login' => 'Login', - 'Password' => 'Password', - 'Email' => 'E-mail', - 'Registered' => 'Registrato', - 'Role' => 'Ruolo', - 'Roles' => 'Ruoli', - 'Actions' => 'Azioni', - 'Edit' => 'Modifica', - 'Delete' => 'Cancella', - 'Log In' => 'Log In', - 'Log Out' => 'Esci', - 'Register New User' => 'Crea Un Account', - 'Delete user: :user' => 'Elimina utente: :user', - 'User :user have been deleted.' => 'Utente :user è stato eliminato.', - 'This user already exists' => 'Tale utente è già esistente', - 'This email already exists' => 'Tale ta email è già esistente', - 'Changes saved' => 'Le modifiche sono state salvate', - 'Wrong old password' => 'Vecchia password errata', - 'Admin' => 'Amministratore', - 'User' => 'Utente', - 'Editor' => 'Editore', - 'Register' => 'Registrazione', - 'Edit profile' => 'Modifica profilo', - 'Save' => 'Salva', - 'Firstname' => 'Nome', - 'Lastname' => 'Cognome', - 'Old password' => 'Vecchia password', - 'New password' => 'Nuova password', - 'Welcome' => 'Benvenuto', - 'Wrong username or password' => 'username o password errata', - 'Your changes have been saved.' => 'Le modifiche sono state salvate.', - 'New user have been registered.' => 'Nuovo utente è stato registrato.', - 'Captcha' => 'Codice captcha', - 'Registration' => 'Registrazione', - 'Username' => 'Nome utente', - 'User email is invalid' => 'E-mail non valido', - 'Reset Password' => 'Resetta la password', - 'Send New Password' => 'Invia la password', - 'Users - Profile' => 'Utenti - Profilo', - 'Users - Edit Profile' => 'Utenti - Modifica profilo', - 'Users - Log In' => 'Utenti - Log In', - 'Users - Registration' => 'Utenti - Registrazione', - 'Users - Password Recover' => 'Utenti - Password Recovery', - 'New Password' => 'Nuova password', - 'Forgot your password?' => 'Password dimenticata?', - 'New password has been sent' => 'Nuova password è stata inviata', - 'Monstra says: This is not your profile...' => 'Monstra dice: Questo non è il tuo profilo.', - 'User registration is closed.' => 'Registrazione utenti è chiusa.', - 'Allow user registration' => 'Consenti registrazione utenti.', - 'Required field' => 'Campo obbligatorio', - 'This user doesnt exist' => 'Tale utente non esiste', - 'Captcha code is wrong' => 'Codice captcha errato', - 'Your login details for :site_name has been sent' => 'I tuoi dati di accesso :site_name sono stati inviati', - 'Your new password for :site_name' => 'La tua nuova password per :site_name', - 'Your login details for :site_name' => 'I tuoi dati di accesso per :site_name', - 'About Me' => 'Su di me', - 'Profile' => 'Profilo', - 'You are banned for 10 minutes. Try again later' => 'You are banned for 10 minutes. Try again later', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/users/languages/ja.lang.php b/plugins/box/users/languages/ja.lang.php deleted file mode 100644 index 8727061..0000000 --- a/plugins/box/users/languages/ja.lang.php +++ /dev/null @@ -1,68 +0,0 @@ - array( - 'Users' => 'ユーザー', - 'Login' => 'ログイン', - 'Username' => 'ユーザーå', - 'Password' => 'パスワード', - 'Registered' => '登録日', - 'Email' => 'メールアドレス', - 'Role' => 'ロール', - 'Roles' => 'ロール', - 'Edit' => '編集', - 'Actions' => 'æ“作', - 'Delete' => '削除', - 'Log In' => 'ログイン', - 'Log Out' => 'ログアウト', - 'Register New user' => 'æ–°è¦ãƒ¦ãƒ¼ã‚¶ãƒ¼ç™»éŒ²', - 'New User Registration' => 'æ–°è¦ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ç™»éŒ²', - 'Delete user: :user' => 'ユーザーã®å‰Šé™¤: :user', - 'User :user have been deleted.' => 'ユーザー :user ã¯å‰Šé™¤ã•れã¾ã—ãŸã€‚', - 'This user already exists' => 'ユーザーã¯ã™ã§ã«å­˜åœ¨ã—ã¦ã„ã¾ã™ã€‚', - 'This email already exists' => 'ã“ã®ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ã¯ã™ã§ã«å­˜åœ¨ã—ã¦ã„ã¾ã™ã€‚', - 'Changes saved' => '変更ã¯ä¿å­˜ã•れã¾ã—ãŸ', - 'Wrong old password' => 'å¤ã„パスワードãŒé–“é•ã£ã¦ã„ã¾ã™', - 'Admin' => '管ç†è€…', - 'User' => 'ユーザー', - 'Editor' => '編集者', - 'Register' => '登録', - 'Edit profile' => 'プロフィールã®ç·¨é›†', - 'Save' => 'ä¿å­˜', - 'Firstname' => 'å', - 'Lastname' => 'å§“', - 'Old password' => 'å¤ã„パスワード', - 'New password' => 'æ–°ã—ã„パスワード', - 'Welcome' => 'よã†ã“ã', - 'Wrong username or password' => 'ユーザーå ã¾ãŸã¯ パスワード ãŒä¸æ­£ã§ã™', - 'Your changes have been saved.' => '変更ã¯ä¿å­˜ã•れã¾ã—ãŸã€‚', - 'New user have been registered.' => 'æ–°è¦ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒç™»éŒ²ã•れã¾ã—ãŸã€‚', - 'Captcha' => 'Captcha', - 'Registration' => '登録', - 'Username' => 'ユーザーå', - 'User email is invalid' => 'ユーザーã®ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ãŒç„¡åйã§ã™', - 'Reset Password' => 'パスワードをリセット', - 'Send New Password' => 'æ–°ã—ã„パスワードをé€ä¿¡ã—ã¾ã—ãŸã€‚', - 'This user doesnt alredy exist' => 'ã“ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã™ã§ã«å­˜åœ¨ã—ã¦ã„ã¾ã™ã€‚', - 'Users - Profile' => 'ユーザー - プロフィール', - 'Users - Edit Profile' => 'ユーザー - プロフィールã®ç·¨é›†', - 'Users - Log In' => 'ユーザー - ログイン', - 'Users - Registration' => 'ユーザー - 登録', - 'Users - Password Recover' => 'ユーザー - パスワードã®å¾©å¸°', - 'New Password' => 'æ–°ã—ã„パスワード', - 'Forgot your password?' => 'パスワードを忘れã¾ã—ãŸã‹ï¼Ÿ', - 'New password has been sent' => 'æ–°ã—ã„パスワードをé€ä¿¡ã—ã¾ã—ãŸã€‚', - 'Monstra says: This is not your profile...' => 'Monstraより: ã“れã¯ã‚ãªãŸã®ãƒ—ロフィールã§ã¯ã‚りã¾ã›ã‚“...', - 'User registration is closed.' => 'ç¾åœ¨ãƒ¦ãƒ¼ã‚¶ãƒ¼ç™»éŒ²ã¯ã§ãã¾ã›ã‚“。', - 'Allow user registration' => 'ユーザー登録å¯èƒ½', - 'Required field' => '必須項目', - 'This user doesnt exist' => 'ユーザーã¯å­˜åœ¨ã—ã¾ã›ã‚“', - 'Captcha code is wrong' => 'CaptchaコードãŒé–“é•ã£ã¦ã„ã¾ã™', - 'Your login details for :site_name has been sent' => 'Your login details for :site_name has been sent', - 'Your new password for :site_name' => 'Your new password for :site_name', - 'Your login details for :site_name' => 'Your login details for :site_name', - 'About Me' => 'ã²ã¨ã“ã¨', - 'Profile' => 'プロフィール', - 'You are banned for 10 minutes. Try again later' => '10分間ログインãŒã§ãã¾ã›ã‚“。後ã»ã©ãŠè©¦ã—ãã ã•ã„。', - ) - ); diff --git a/plugins/box/users/languages/ka-ge.lang.php b/plugins/box/users/languages/ka-ge.lang.php deleted file mode 100644 index 3f0df55..0000000 --- a/plugins/box/users/languages/ka-ge.lang.php +++ /dev/null @@ -1,67 +0,0 @@ - array( - 'Users' => 'მáƒáƒ›áƒ®áƒ›áƒáƒ áƒ”ბლები', - 'Login' => 'შესვლáƒ', - 'Password' => 'პáƒáƒ áƒáƒšáƒ˜', - 'Email' => 'ელ-ფáƒáƒ¡áƒ¢áƒ', - 'Registered' => 'დáƒáƒ áƒ”გისტრირებული', - 'Role' => 'რáƒáƒšáƒ˜', - 'Roles' => 'რáƒáƒšáƒ”ბი', - 'Actions' => 'მáƒáƒ¥áƒ›áƒ”დებáƒ', - 'Edit' => 'რედáƒáƒ¥áƒ¢áƒ˜áƒ áƒ”ბáƒ', - 'Delete' => 'წáƒáƒ¨áƒšáƒ', - 'Log In' => 'შესვლáƒ', - 'Log Out' => 'გáƒáƒ›áƒáƒ¡áƒ•ლáƒ', - 'Register New User' => 'áƒáƒ®áƒáƒšáƒ˜ მáƒáƒ›áƒ®áƒ›áƒáƒ áƒ”ბლის რეგისტრáƒáƒªáƒ˜áƒ', - 'New User Registration' => 'áƒáƒ®áƒáƒšáƒ˜ მáƒáƒ›áƒ®áƒ›áƒáƒ áƒ”ბლის რეგისტრáƒáƒªáƒ˜áƒ', - 'Delete user: :user' => 'მáƒáƒ›áƒ®áƒ›áƒáƒ áƒ”ბლის წáƒáƒ¨áƒšáƒ: :user', - 'User :user have been deleted.' => 'მáƒáƒ›áƒ®áƒ›áƒáƒ áƒ”ბელი :user წáƒáƒ¨áƒšáƒ˜áƒšáƒ˜áƒ.', - 'This user already exists' => 'ეს მáƒáƒ›áƒ®áƒ›áƒáƒ áƒ”ბელი უკვე áƒáƒ áƒ¡áƒ”ბáƒáƒ‘ს', - 'This email already exists' => 'ეს ელ-ფáƒáƒ¡áƒ¢áƒ უკვე áƒáƒ áƒ¡áƒ”ბáƒáƒ‘ს', - 'Changes saved' => 'ცვლილებები შენáƒáƒ®áƒ£áƒšáƒ˜áƒ', - 'Wrong old password' => 'áƒáƒ áƒáƒ¡áƒ¬áƒáƒ áƒ˜ ძველი პáƒáƒ áƒáƒšáƒ˜', - 'Admin' => 'áƒáƒ“მინისტრáƒáƒ¢áƒáƒ áƒ˜', - 'User' => 'მáƒáƒ›áƒ®áƒ›áƒáƒ áƒ”ბელი', - 'Editor' => 'რედáƒáƒ¥áƒ¢áƒáƒ áƒ˜', - 'Register' => 'რეგისტრáƒáƒªáƒ˜áƒ', - 'Edit profile' => 'მáƒáƒ›áƒ®áƒ›áƒáƒ áƒ”ბლის პრáƒáƒ¤áƒ˜áƒšáƒ˜áƒ¡ რედáƒáƒ¥áƒ¢áƒ˜áƒ áƒ”ბáƒ', - 'Save' => 'შენáƒáƒ®áƒ•áƒ', - 'Firstname' => 'სáƒáƒ®áƒ”ლი', - 'Lastname' => 'გვáƒáƒ áƒ˜', - 'Old password' => 'ძველი პáƒáƒ áƒáƒšáƒ˜', - 'New password' => 'áƒáƒ®áƒáƒšáƒ˜ პáƒáƒ áƒáƒšáƒ˜', - 'Welcome' => 'მáƒáƒ’ესáƒáƒšáƒ›áƒ”ბით', - 'Wrong username or password' => 'áƒáƒ áƒáƒ¡áƒ¬áƒáƒ áƒ˜ ლáƒáƒ’ინი áƒáƒœ პáƒáƒ áƒáƒšáƒ˜', - 'Your changes have been saved.' => 'თქვენი ცვლილებები შენáƒáƒ®áƒ£áƒšáƒ˜áƒ.', - 'New user have been registered.' => 'áƒáƒ®áƒšáƒ˜ მáƒáƒ›áƒ®áƒ›áƒáƒ áƒ”ბელი დáƒáƒ áƒ”გისტრირდáƒ.', - 'Captcha' => 'Captcha', - 'Registration' => 'რეგისტრáƒáƒªáƒ˜áƒ', - 'Username' => 'მáƒáƒ›áƒ®áƒ›áƒáƒ áƒ”ბლის სáƒáƒ®áƒ”ლი', - 'User email is invalid' => 'ელ-ფáƒáƒ¡áƒ¢áƒ áƒáƒ áƒáƒ¡áƒ¬áƒáƒ áƒ˜áƒ', - 'Reset Password' => 'პáƒáƒ áƒáƒšáƒ˜áƒ¡ რესეტი', - 'Send New Password' => 'პáƒáƒ áƒáƒšáƒ˜áƒ¡ გáƒáƒ’ზáƒáƒ•ნáƒ', - 'Users - Profile' => 'მáƒáƒ›áƒ®áƒ›áƒáƒ áƒ”ბლები - პრáƒáƒ¤áƒ˜áƒšáƒ˜', - 'Users - Edit Profile' => 'მáƒáƒ›áƒ®áƒ›áƒáƒ áƒ”ბლები - პრáƒáƒ¤áƒ˜áƒšáƒ˜áƒ¡ რედáƒáƒ¥áƒ¢áƒ˜áƒ áƒ”ბáƒ', - 'Users - Log In' => 'მáƒáƒ›áƒ®áƒ›áƒáƒ áƒ”ბლები - შესვლáƒ', - 'Users - Registration' => 'მáƒáƒ›áƒ®áƒ›áƒáƒ áƒ”ბლები - რეგისტრáƒáƒªáƒ˜áƒ', - 'Users - Password Recover' => 'მáƒáƒ›áƒ®áƒ›áƒáƒ áƒ”ბლები - პáƒáƒ áƒáƒšáƒ˜áƒ¡ áƒáƒ¦áƒ“გენáƒ', - 'New Password' => 'áƒáƒ®áƒáƒšáƒ˜ პáƒáƒ áƒáƒšáƒ˜', - 'Forgot your password?' => 'პáƒáƒ áƒáƒšáƒ˜ დáƒáƒ’áƒáƒ•იწყდáƒáƒ—?', - 'New password has been sent' => 'áƒáƒ®áƒáƒšáƒ˜ პáƒáƒ áƒáƒšáƒ˜ გáƒáƒ’ზáƒáƒ•ნილიáƒ', - 'Monstra says: This is not your profile...' => 'Monstra áƒáƒ›áƒ‘áƒáƒ‘ს: ეს áƒáƒ  áƒáƒ áƒ˜áƒ¡ შენი პრáƒáƒ¤áƒ˜áƒšáƒ˜...', - 'User registration is closed.' => 'მáƒáƒ›áƒ®áƒ›áƒáƒ áƒ”ბლების რეგისტრáƒáƒªáƒ˜áƒ დáƒáƒ®áƒ£áƒ áƒ£áƒšáƒ˜áƒ.', - 'Allow user registration' => 'მáƒáƒ›áƒ®áƒ›áƒáƒ áƒ”ბლების რეგისტრáƒáƒªáƒ˜áƒáƒ¡ ნების მიცემáƒ.', - 'Required field' => 'áƒáƒ£áƒªáƒ˜áƒšáƒ”ბელი ველი', - 'This user doesnt exist' => 'áƒáƒ¡áƒ”თი მáƒáƒ›áƒ®áƒ›áƒáƒ áƒ”ბელი áƒáƒ  áƒáƒ áƒ¡áƒ”ბáƒáƒ‘ს', - 'Captcha code is wrong' => 'Captcha-ზე პáƒáƒ¡áƒ£áƒ®áƒ˜ áƒáƒ áƒáƒ¡áƒ¬áƒáƒ áƒ˜áƒ!', - 'Your login details for :site_name has been sent' => 'თქვენი მáƒáƒœáƒáƒªáƒ”მები :site_name -ის მისáƒáƒ¬áƒ•დáƒáƒ›áƒáƒ“ გáƒáƒ’ზáƒáƒ•ნილიáƒ', - 'Your new password for :site_name' => 'თქვენი áƒáƒ®áƒáƒšáƒ˜ პáƒáƒ áƒáƒšáƒ˜ :site_name -თვის', - 'Your login details for :site_name' => 'თქვენი მáƒáƒœáƒáƒªáƒ”მები :site_name -ის მისáƒáƒ¬áƒ•დáƒáƒ›áƒáƒ“', - 'About Me' => 'ჩემს შესáƒáƒ®áƒ”ბ', - 'Profile' => 'პრáƒáƒ¤áƒ˜áƒšáƒ˜', - 'You are banned for 10 minutes. Try again later' => 'თქვენ 10 წუთით ხáƒáƒ áƒ— დáƒáƒ‘ლáƒáƒ™áƒ˜áƒšáƒ˜. სცáƒáƒ“ეთ მáƒáƒ’ვიáƒáƒœáƒ”ბით', - 'Cancel' => 'გáƒáƒ£áƒ¥áƒ›áƒ”ბáƒ', - ) - ); diff --git a/plugins/box/users/languages/lt.lang.php b/plugins/box/users/languages/lt.lang.php deleted file mode 100644 index 3bad35f..0000000 --- a/plugins/box/users/languages/lt.lang.php +++ /dev/null @@ -1,68 +0,0 @@ - array( - 'Users' => 'Naudotojai', - 'Login' => 'Prisijungti', - 'Username' => 'Prisijungimo vardas', - 'Password' => 'Slaptažodis', - 'Registered' => 'Registruotis', - 'Email' => 'El. paÅ¡tas', - 'Role' => 'RolÄ—', - 'Roles' => 'RolÄ—s', - 'Edit' => 'Redaguoti', - 'Actions' => 'Veiksmai', - 'Delete' => 'IÅ¡trinti', - 'Log In' => 'Prisijungti', - 'Log Out' => 'Atsijungti', - 'Register New User' => 'Užregistruoti NaujÄ… NaudotojÄ…', - 'New User Registration' => 'Naujo naudotojo registracija', - 'Delete user: :user' => 'IÅ¡trinti naudotojÄ… :user', - 'User :user have been deleted.' => 'Naudotojas :user iÅ¡trintas.', - 'This field should not be empty' => 'Å is laukas negali bÅ«ti tuÅ¡Äias', - 'This user alredy exist' => 'Toks naudotojas jau yra', - 'Changes saved' => 'Pakeitimai iÅ¡saugoti', - 'Wrong old password' => 'Neteisingas senas slaptažodis', - 'Admin' => 'Administratorius', - 'User' => 'Naudotojas', - 'Editor' => 'Redaktorius', - 'Register' => 'Užregistruoti', - 'Edit profile' => 'Redaguoti profilį', - 'Save' => 'IÅ¡saugoti', - 'Firstname' => 'Vardas', - 'Lastname' => 'PavardÄ—', - 'Old password' => 'Senas slaptažodis', - 'New password' => 'Naujas slaptažodis', - 'Welcome' => 'Sveiki', - 'Wrong username or password' => 'Neteisingas prisijungimo vardas arba slaptažodis', - 'Your changes have been saved.' => 'Pakeitimai iÅ¡saugoti.', - 'New user have been registered.' => 'Nauja naudotojas užregistruotas.', - 'Captcha' => 'Saugos kodas', - 'Registration' => 'Registracija', - 'User email is invalid' => 'Neteisingas naudotojo el. paÅ¡to adresas', - 'Reset Password' => 'Atstatyti slaptažodį', - 'Send New Password' => 'IÅ¡siųsti naujÄ… slaptažodį', - 'This user doesnt alredy exist' => 'Tokio naudoto nebÄ—ra', - 'Users - Profile' => 'Naudotojai - Profilis', - 'Users - Edit Profile' => 'Naudotojai - Redaguoti profilį', - 'Users - Log In' => 'Naudotojai - Prisijungti', - 'Users - Registration' => 'Naudotojai - Registracija', - 'Users - Password Recover' => 'Naudotojai - Slaptažodžio priminimas', - 'New Password' => 'Naujas slaptažodis', - 'Forgot your password?' => 'PamirÅ¡ai slaptažodį?', - 'New password has been sent' => 'Naujas slaptažodis iÅ¡siųstas', - 'Monstra says: This is not your profile...' => 'Monstra sako: profilis ne tavo...', - 'User registration is closed.' => 'Registracija uždaryta.', - 'Allow user registration' => 'Leisti registruotis naudotojams', - 'Required field' => 'Privalomas laukas', - 'This user doesnt exist' => 'Tokio naudotojo nÄ—ra', - 'Captcha code is wrong' => 'Saugos kodas neteisingas', - 'Your login details for :site_name has been sent' => 'Prisijungimo duomenys prie :site_name iÅ¡siųsti', - 'Your new password for :site_name' => 'Naujas :site_name slaptažodis', - 'Your login details for :site_name' => 'Prisijungimo prie :site_name detalÄ—s', - 'About Me' => 'Apie mane', - 'Profile' => 'Profilis', - 'You are banned for 10 minutes. Try again later' => 'You are banned for 10 minutes. Try again later', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/users/languages/nl.lang.php b/plugins/box/users/languages/nl.lang.php deleted file mode 100644 index 9773454..0000000 --- a/plugins/box/users/languages/nl.lang.php +++ /dev/null @@ -1,69 +0,0 @@ - array( - 'Users' => 'Gebruikers', - 'Login' => 'Login', - 'Username' => 'Gebruikersnaam', - 'Password' => 'Wachtwoord', - 'Registered' => 'Geregistreerd', - 'Email' => 'Email', - 'Role' => 'Type', - 'Roles' => 'Types', - 'Edit' => 'Bewerken', - 'Actions' => 'Acties', - 'Delete' => 'Verwijderen', - 'Log In' => 'Log in', - 'Log Out' => 'Uitloggen', - 'Register New User' => 'Nieuwe gebruiker', - 'New User Registration' => 'Registratie nieuwe gebruiker', - 'Delete user: :user' => 'Verwijder gebruiker: :user', - 'User :user have been deleted.' => 'Gebruiker :user is verwijderd.', - 'This field should not be empty' => 'Dit veld mag niet leeg zijn', - 'This user alredy exist' => 'Deze gebruiker bestaat al', - 'Changes saved' => 'Wijzigingen opgeslagen', - 'Wrong old password' => 'Foutief oud wachtwoord', - 'Admin' => 'Admin', - 'User' => 'Gebruiker', - 'Editor' => 'Redacteur', - 'Register' => 'Registreer', - 'Edit profile' => 'Profiel bewerken', - 'Save' => 'Opslaan', - 'Firstname' => 'Voornaam', - 'Lastname' => 'Achternaam', - 'Old password' => 'Oude wachtwoord', - 'New password' => 'Nieuw wachtwoord', - 'Welcome' => 'Welkom', - 'Wrong username or password' => 'Foutieve gebruikersnaam of wachtwoord', - 'Your changes have been saved.' => 'De wijzigingen zijn opgeslagen.', - 'New user have been registered.' => 'Nieuwe gebruiker is geregistreerd.', - 'Captcha' => 'Captcha', - 'Registration' => 'Registratie', - 'Username' => 'Gebruikersnaam', - 'User email is invalid' => 'Gebruikers email is ongeldig', - 'Reset Password' => 'Wachtwoord Opnieuw Instellen', - 'Send New Password' => 'Verzend nieuw wachtwoord', - 'This user doesnt alredy exist' => 'Deze gebruiker bestaat nog niet', - 'Users - Profile' => 'Gebruikers - Profiel', - 'Users - Edit Profile' => 'Gebruikers - Bewerk profiel', - 'Users - Log In' => 'Gebruikers - Log In', - 'Users - Registration' => 'Gebruikers - Registratie', - 'Users - Password Recover' => 'Gebruikers - Wachtwoord opnieuw instellen', - 'New Password' => 'Nieuw wachtwoord', - 'Forgot your password?' => 'Wachtwoord vergeten?', - 'New password has been sent' => 'Nieuw wachtwoord is verzonden', - 'Monstra says: This is not your profile...' => 'Monstra zegt: dit is niet uw profiel...', - 'User registration is closed.' => 'Gebruikersregistratie is gesloten.', - 'Allow user registration' => 'Sta gebruikersregistratie toe', - 'Required field' => 'Vereist veld', - 'This user doesnt exist' => 'Deze gebruiker bestaat niet', - 'Captcha code is wrong' => 'Captcha Code is helaas foutief', - 'Your login details for :site_name has been sent' => 'Uw login details voor :site_name worden verzonden', - 'Your new password for :site_name' => 'Uw nieuwe wachtwoord voor :site_name', - 'Your login details for :site_name' => 'Uw login details voor :site_name', - 'About Me' => 'Over mij', - 'Profile' => 'Profiel', - 'You are banned for 10 minutes. Try again later' => 'You are banned for 10 minutes. Try again later', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/users/languages/pl.lang.php b/plugins/box/users/languages/pl.lang.php deleted file mode 100644 index ea012b8..0000000 --- a/plugins/box/users/languages/pl.lang.php +++ /dev/null @@ -1,69 +0,0 @@ - array( - 'Users' => 'Użytkownicy', - 'Login' => 'Login', - 'Username' => 'Nazwa użytkownika', - 'Password' => 'HasÅ‚o', - 'Registered' => 'Zarejestrowany', - 'Email' => 'Email', - 'Role' => 'Rola', - 'Roles' => 'Role', - 'Edit' => 'Edytuj', - 'Actions' => 'Akcje', - 'Delete' => 'UsuÅ„', - 'Log In' => 'Zaloguj', - 'Log Out' => 'Wyloguj', - 'Register New user' => 'Zarejestruj nowego użytkownika', - 'New User Registration' => 'Rejestracja nowego użytkownika', - 'Delete user: :user' => 'Czy napewno usunąć użytkownika: :user', - 'User :user have been deleted.' => 'Użytkownik :user zostaÅ‚ usuniÄ™ty.', - 'This user already exists' => 'Ten użytkownik już istnieje', - 'This email already exists' => 'Ten email już istnieje', - 'Changes saved' => 'Zmiany zostaÅ‚y zapisane', - 'Wrong old password' => 'Stare hasÅ‚o jest niewÅ‚aÅ›ciwe', - 'Admin' => 'Wydawca', - 'User' => 'Użytkownik', - 'Editor' => 'Redaktor', - 'Register' => 'Zarejestruj', - 'Edit profile' => 'Edytuj profil', - 'Save' => 'Zapisz', - 'Firstname' => 'ImiÄ™', - 'Lastname' => 'Nazwisko', - 'Old password' => 'Stare hasÅ‚o', - 'New password' => 'Nowe hasÅ‚o', - 'Welcome' => 'Witaj', - 'Wrong username or password' => 'NiewÅ‚aÅ›ciwa nazwa użytkownika lub hasÅ‚o', - 'Your changes have been saved.' => 'Twoje zmiany zostaÅ‚y zapisane.', - 'New user have been registered.' => 'Nowy użytkownik zostaÅ‚ zarejestrowany.', - 'Captcha' => 'Captcha', - 'Registration' => 'Rejestracja', - 'Username' => 'Nazwa użytkownika', - 'User email is invalid' => 'Email użytkownika jest nieprawidÅ‚owy', - 'Reset Password' => 'Resetuj hasÅ‚o', - 'Send New Password' => 'WyÅ›lij nowe hasÅ‚o', - 'This user doesnt alredy exist' => 'Ten użytkownik już nie istnieje', - 'Users - Profile' => 'Użytkownicy - Profil', - 'Users - Edit Profile' => 'Użytkownicy - Edytuj profil', - 'Users - Log In' => 'Użytkownicy - Zaloguj', - 'Users - Registration' => 'Użytkownicy - Rejestracja', - 'Users - Password Recover' => 'Użytkownicy - Odzyskaj hasÅ‚o', - 'New Password' => 'Nowe hasÅ‚o', - 'Forgot your password?' => 'Nie pamiÄ™tasz swojego hasÅ‚a?', - 'New password has been sent' => 'Nowe hasÅ‚o zostaÅ‚o wysÅ‚ane', - 'Monstra says: This is not your profile...' => 'Monstra mówi: To nie jest Twój profil...', - 'User registration is closed.' => 'Rejestracja użytkowników jest zamkniÄ™ta.', - 'Allow user registration' => 'Pozwól na rejestracjÄ™ użytkowników', - 'Required field' => 'Pole wymagane', - 'This user doesnt exist' => 'Ten użytkownik nie istnieje', - 'Captcha code is wrong' => 'Kod captcha jest niewÅ‚aÅ›ciwy', - 'Your login details for :site_name has been sent' => 'Twoje dane logowania dla :site_name zostaÅ‚y wysÅ‚ane', - 'Your new password for :site_name' => 'Twoje nowe hasÅ‚o dla :site_name', - 'Your login details for :site_name' => 'Twoje dane logowania dla :site_name', - 'About Me' => 'O mnie', - 'Profile' => 'Profil', - 'You are banned for 10 minutes. Try again later' => 'JesteÅ› zbanowany na 10 minut. Spróbuj ponownie później', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/users/languages/pt-br.lang.php b/plugins/box/users/languages/pt-br.lang.php deleted file mode 100644 index 6a0f771..0000000 --- a/plugins/box/users/languages/pt-br.lang.php +++ /dev/null @@ -1,69 +0,0 @@ - array( - 'Users' => 'Usuários', - 'Login' => 'Login', - 'Username' => 'Usuário', - 'Password' => 'Senha', - 'Registered' => 'Registrado', - 'Email' => 'Email', - 'Role' => 'Grupo', - 'Roles' => 'Grupos', - 'Edit' => 'Editar', - 'Actions' => 'Ações', - 'Delete' => 'Deletar', - 'Log In' => 'Log In', - 'Log Out' => 'Sair', - 'Register New User' => 'Registrar Novo Usuário', - 'New User Registration' => 'Novo usuário registrado', - 'Delete user: :user' => 'Deletar o usuário: :user', - 'User :user have been deleted.' => 'O usuário :user foi deletado.', - 'This field should not be empty' => 'Este campo não pode estar vazio', - 'This user alredy exist' => 'Este usuário já existe', - 'Changes saved' => 'Alterações salvas', - 'Wrong old password' => 'Senha antiga incorreta', - 'Admin' => 'Admin', - 'User' => 'Usuário', - 'Editor' => 'Editor', - 'Register' => 'Registrar', - 'Edit profile' => 'Editar perfil', - 'Save' => 'Salvar', - 'Firstname' => 'Nome', - 'Lastname' => 'Sobrenome', - 'Old password' => 'Senha antiga', - 'New password' => 'Senha nova', - 'Welcome' => 'Bem vindo', - 'Wrong username or password' => 'usuário ou senha incorretos', - 'Your changes have been saved.' => 'Suas alterações foram salvas.', - 'New user have been registered.' => 'Novo usuário registrado.', - 'Captcha' => 'Captcha', - 'Registration' => 'Registração', - 'Username' => 'Nome de usuário', - 'User email is invalid' => 'O email do usuário é inválido', - 'Reset Password' => 'Resetar sebga', - 'Send New Password' => 'Enviar nova senha', - 'This user doesnt alredy exist' => 'Este usuário não existe ainda', - 'Users - Profile' => 'Usuários - Perfil', - 'Users - Edit Profile' => 'Usuários - Editar Perfil', - 'Users - Log In' => 'Usuários - Log In', - 'Users - Registration' => 'Usuários - Registração', - 'Users - Password Recover' => 'Usuários - Lembrar Senha', - 'New Password' => 'Nova senha', - 'Forgot your password?' => 'Esqueceu sua senha?', - 'New password has been sent' => 'A nova senha foi enviada', - 'Monstra says: This is not your profile...' => 'Monstra diz: Este não é o seu perfil...', - 'User registration is closed.' => 'O registro de usuários está desativado.', - 'Allow user registration' => 'Permitir novos registros de usuários', - 'Required field' => 'Campo requerido', - 'This user doesnt exist' => 'Este usuário não existe', - 'Captcha code is wrong' => 'O captcha está errado', - 'Your login details for :site_name has been sent' => 'Seus dados de login para o site :site_name foram enviados', - 'Your new password for :site_name' => 'Sua nova senha para o site :site_name', - 'Your login details for :site_name' => 'Seu novo login para o site :site_name', - 'About Me' => 'Sobre mim', - 'Profile' => 'Perfil', - 'You are banned for 10 minutes. Try again later' => 'You are banned for 10 minutes. Try again later', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/users/languages/ru.lang.php b/plugins/box/users/languages/ru.lang.php deleted file mode 100644 index a3864e1..0000000 --- a/plugins/box/users/languages/ru.lang.php +++ /dev/null @@ -1,67 +0,0 @@ - array( - 'Users' => 'Пользователи', - 'Login' => 'Вход', - 'Password' => 'Пароль', - 'Email' => 'Эл. почта', - 'Registered' => 'ЗарегиÑтрирован', - 'Role' => 'Роль', - 'Roles' => 'Роли', - 'Actions' => 'ДейÑтвиÑ', - 'Edit' => 'Редактировать', - 'Delete' => 'Удалить', - 'Log In' => 'Вход', - 'Log Out' => 'Выход', - 'Register New User' => 'РегиÑÑ‚Ñ€Ð°Ñ†Ð¸Ñ Ð½Ð¾Ð²Ð¾Ð³Ð¾ пользователÑ', - 'New User Registration' => 'РегиÑÑ‚Ñ€Ð°Ñ†Ð¸Ñ Ð½Ð¾Ð²Ð¾Ð³Ð¾ пользователÑ', - 'Delete user: :user' => 'Удалить пользователÑ: :user', - 'User :user have been deleted.' => 'Пользователь :user удален.', - 'This user already exists' => 'Такой пользователь уже ÑущеÑтвует', - 'This email already exists' => 'Ð¢Ð°ÐºÐ°Ñ Ñл. почта уже ÑущеÑтвует', - 'Changes saved' => 'Ð˜Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ñохранены', - 'Wrong old password' => 'Ðеправильный Ñтарый пароль', - 'Admin' => 'ÐдминиÑтратор', - 'User' => 'Пользователь', - 'Editor' => 'Редактор', - 'Register' => 'РегиÑтрациÑ', - 'Edit profile' => 'Редактирование Ð¿Ñ€Ð¾Ñ„Ð¸Ð»Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ', - 'Save' => 'Сохранить', - 'Firstname' => 'ИмÑ', - 'Lastname' => 'ФамилиÑ', - 'Old password' => 'Старый пароль', - 'New password' => 'Ðовый пароль', - 'Welcome' => 'Добро пожаловать', - 'Wrong username or password' => 'Ðеправильный логин или пароль', - 'Your changes have been saved.' => 'Ваши Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð±Ñ‹Ð»Ð¸ Ñохранены.', - 'New user have been registered.' => 'Ðовый пользователь был зарегиÑтрирован.', - 'Captcha' => 'Каптча', - 'Registration' => 'РегиÑтрациÑ', - 'Username' => 'Ð˜Ð¼Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ', - 'User email is invalid' => 'Эл. почта ÑвлÑетÑÑ Ð½ÐµÐ´ÐµÐ¹Ñтвительной', - 'Reset Password' => 'СброÑить пароль', - 'Send New Password' => 'Отправить пароль', - 'Users - Profile' => 'Пользователи - Профиль', - 'Users - Edit Profile' => 'Пользователи - Редактирование профилÑ', - 'Users - Log In' => 'Пользователи - Вход', - 'Users - Registration' => 'Пользователи - РегиÑтрациÑ', - 'Users - Password Recover' => 'Пользователи - ВоÑÑтановление паролÑ', - 'New Password' => 'Ðовый пароль', - 'Forgot your password?' => 'Забыли пароль?', - 'New password has been sent' => 'Ðовый пароль был отправлен', - 'Monstra says: This is not your profile...' => 'МонÑтра говорит: Это не твой профиль...', - 'User registration is closed.' => 'РегиÑÑ‚Ñ€Ð°Ñ†Ð¸Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»ÐµÐ¹ закрыта.', - 'Allow user registration' => 'Разрешить региÑтрацию пользователей.', - 'Required field' => 'ОбÑзательное поле', - 'This user doesnt exist' => 'Такого Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð½Ðµ ÑущеÑтвует', - 'Captcha code is wrong' => 'Ðеверный код каптча', - 'Your login details for :site_name has been sent' => 'Ваши данные Ð´Ð»Ñ Ð´Ð¾Ñтупа к :site_name были отправлены', - 'Your new password for :site_name' => 'Ваш новый пароль Ð´Ð»Ñ :site_name', - 'Your login details for :site_name' => 'Ваши данные Ð´Ð»Ñ Ð´Ð¾Ñтупа к :site_name', - 'About Me' => 'Обо мне', - 'Profile' => 'Профиль', - 'You are banned for 10 minutes. Try again later' => 'Ð’Ñ‹ заблокированы на 10 минут. Попробуйте позже', - 'Cancel' => 'Отмена', - ) - ); diff --git a/plugins/box/users/languages/sk.lang.php b/plugins/box/users/languages/sk.lang.php deleted file mode 100644 index d525ddb..0000000 --- a/plugins/box/users/languages/sk.lang.php +++ /dev/null @@ -1,69 +0,0 @@ - array( - 'Users' => 'Používatelia', - 'Login' => 'PrihlásiÅ¥', - 'Username' => 'Prihlasovacie meno', - 'Password' => 'Heslo', - 'Registered' => 'Registrovaný', - 'Email' => 'Email', - 'Role' => 'Úloha', - 'Roles' => 'Úlohy', - 'Edit' => 'EditovaÅ¥', - 'Actions' => 'Akcie', - 'Delete' => 'VymazaÅ¥', - 'Log In' => 'Log In', - 'Log Out' => 'OdhlásiÅ¥', - 'Register New User' => 'Registrácia Nového Používateľa', - 'New User Registration' => 'Registrácia nového používateľa', - 'Delete user: :user' => 'VymazaÅ¥ používateľa: :user', - 'User :user have been deleted.' => 'Používateľ :user bol vymazaný.', - 'This user already exists' => 'Tento používateľ už existuje', - 'This email already exists' => 'Tento email už existuje', - 'Changes saved' => 'UložiÅ¥ zmeny', - 'Wrong old password' => 'Nesprávne staré heslo', - 'Admin' => 'Administrátor', - 'User' => 'Používateľ', - 'Editor' => 'Editor', - 'Register' => 'RegistrovaÅ¥', - 'Edit profile' => 'EditovaÅ¥ profil', - 'Save' => 'UložiÅ¥', - 'Firstname' => 'Krstné meno', - 'Lastname' => 'Priezvisko', - 'Old password' => 'Staré heslo', - 'New password' => 'Nové heslo', - 'Welcome' => 'Vitajte', - 'Wrong username or password' => 'Nesprávne username or password', - 'Your changes have been saved.' => 'VaÅ¡e zmeny boli uložené.', - 'New user have been registered.' => 'Nový používateľ bol zaregistrovaný.', - 'Captcha' => 'Captcha', - 'Registration' => 'Registrácia', - 'Username' => 'Používateľské heslo', - 'User email is invalid' => 'Používateľský email nie je v správnom tvare', - 'Reset Password' => 'ObnoviÅ¥ heslo', - 'Send New Password' => 'PoslaÅ¥ nové heslo', - 'This user doesnt alredy exist' => 'Tento používateľ neexistuje', - 'Users - Profile' => 'Používatelia - Profil', - 'Users - Edit Profile' => 'Používatelia - EditovaÅ¥ Profil', - 'Users - Log In' => 'Používatelia - Prihlásenie', - 'Users - Registration' => 'Používatelia - Registrácia', - 'Users - Password Recover' => 'Používatelia - Obnova hesla', - 'New Password' => 'Nové heslo', - 'Forgot your password?' => 'Zabudli ste heslo?', - 'New password has been sent' => 'Nové heslo bolo zaslané', - 'Monstra says: This is not your profile...' => 'Monstra hovorí: Toto nie je Váš profil...', - 'User registration is closed.' => 'Registrácia používateľov je uzavretá.', - 'Allow user registration' => 'PovoliÅ¥ registráciu používateľov', - 'Required field' => 'Povinné políÄko', - 'This user doesnt exist' => 'Tento používateľ neexistuje', - 'Captcha code is wrong' => 'Captcha kód nie je správny', - 'Your login details for :site_name has been sent' => 'Váše prihlasovacie detaily pre :site_name boli zaslané', - 'Your new password for :site_name' => 'VaÅ¡e nové heslo pre :site_name', - 'Your login details for :site_name' => 'VaÅ¡e prihlasovacie detaily pre :site_name', - 'About Me' => 'O mne', - 'Profile' => 'Profil', - 'You are banned for 10 minutes. Try again later' => 'You are banned for 10 minutes. Try again later', - 'Cancel' => 'Cancel', - ) - ); diff --git a/plugins/box/users/languages/sr.lang.php b/plugins/box/users/languages/sr.lang.php deleted file mode 100644 index 4bc8c42..0000000 --- a/plugins/box/users/languages/sr.lang.php +++ /dev/null @@ -1,69 +0,0 @@ - array( - 'Users' => 'Korisnici', - 'Login' => 'Uloguj se', - 'Username' => 'KorisniÄko ime', - 'Password' => 'Å ifra', - 'Registered' => 'Registrovan', - 'Email' => 'Email', - 'Role' => 'Uloga', - 'Roles' => 'Uloge', - 'Edit' => 'Izmeni', - 'Actions' => 'Akcije', - 'Delete' => 'ObriÅ¡i', - 'Enter' => 'Udji', - 'Logout' => 'Izloguj se', - 'Register new user' => 'registruj novog korisnika', - 'New User Registration' => 'registracija novog korisnika', - 'Delete user: :user' => 'ObriÅ¡i korisnika: :user', - 'User :user have been deleted.' => 'Korisnik :user je uklonjen.', - 'This user already exists' => 'Ovaj korisnik već postoji', - 'This email already exists' => 'Ovaj email već postoji', - 'Changes saved' => 'Promene su saÄuvane', - 'Wrong old password' => 'PogreÅ¡an unos stare Å¡ifre', - 'Admin' => 'Admin', - 'User' => 'Korisnik', - 'Editor' => 'Editor', - 'Register' => 'Registrovan', - 'Edit profile' => 'Izmeni profil', - 'Save' => 'SaÄuvaj', - 'Firstname' => 'Prvo ime', - 'Lastname' => 'Prezime', - 'Old password' => 'Stara Å¡ifra', - 'New password' => 'Nova Å¡ifra', - 'Welcome' => 'DobrodoÅ¡li', - 'Wrong username or password' => 'PogreÅ¡no KOrisniÄko ime ili Å¡ifra ', - 'Your changes have been saved.' => 'VaÅ¡a podeÅ¡avanja su saÄuvana.', - 'New user have been registered.' => 'novi korisnik je registrovan.', - 'Captcha' => 'Captcha', - 'Registration' => 'Registracija', - 'Username' => 'KorisniÄko ime', - 'User email is invalid' => 'KorisniÄki mail je netaÄan', - 'Reset Password' => 'Resetuj Å¡ifru', - 'Send New Password' => 'PoÅ¡alji novu Å¡ifru', - 'This user doesnt alredy exist' => 'Ovaj korisnik joÅ¡ uvek ne postoji', - 'Users - Profile' => 'Korisnici -- profil', - 'Users - Edit Profile' => 'Korisnici - Izmena profila', - 'Users - Login' => 'Korisnici - Uloguj se.', - 'Users - Registration' => 'Korisnici - registracija', - 'Users - Password Recover' => 'Korisnici - Potsetnik Å¡ifre', - 'New Password' => 'Nova Å¡ifra', - 'Forgot your password?' => 'Zaboravljena Å¡ifra?', - 'New password has been sent' => 'Nova Å¡ifra je poslata', - 'Monstra says: This is not your profile...' => 'Monstra kaže: Ovo nije vaÅ¡ profil...', - 'User registration is closed.' => 'registracija novih korisnika je zatvorena.', - 'Allow user registration' => 'Dozvoli registraciju korisnika', - 'Required field' => 'Potrebna polja.', - 'This user doesnt exist' => 'Ovaj korisnik ne postoji', - 'Captcha code is wrong' => 'Captcha kod je pogreÅ¡an', - 'Your login details for :site_name has been sent' => 'vaÅ¡i detalji logovanja na sajtu :site_name su poslati', - 'Your new password for :site_name' => 'VaÅ¡a Å¡ifra za :site_name', - 'Your login details for :site_name' => 'VaÅ¡i podaci za logovanje na :site_name', - 'About Me' => 'O meni', - 'Profile' => 'Profil', - 'You are banned for 10 minutes. Try again later' => 'Vi ste banovani na 10 minuta. PokuÅ¡ajte kasnije', - 'Cancel' => 'Otkaži', - ) - ); diff --git a/plugins/box/users/languages/tr.lang.php b/plugins/box/users/languages/tr.lang.php deleted file mode 100644 index 3a8f7b0..0000000 --- a/plugins/box/users/languages/tr.lang.php +++ /dev/null @@ -1,68 +0,0 @@ - array( - 'Users' => 'Kullanıcılar', - 'Login' => 'GiriÅŸ', - 'Username' => 'Kullanıcı Adı', - 'Password' => 'Parola', - 'Registered' => 'Kayıtlı', - 'Email' => 'E-Posta', - 'Role' => 'Rol', - 'Roles' => 'Roller', - 'Edit' => 'Düzenle', - 'Actions' => 'İşlemler', - 'Delete' => 'Sil', - 'Log In' => 'GiriÅŸ', - 'Log Out' => 'Çıkış', - 'Register New User' => 'Yeni Üye Kaydet', - 'New User Registration' => 'Yeni Üye Kaydı', - 'Delete user: :user' => ':user kullanıcısı silinsin mi', - 'User :user have been deleted.' => ':user kullanıcısı silindi.', - 'This user already exists' => 'Bu kullanıcı zaten var', - 'This email already exists' => 'Bu e-posta zaten kayıtlı', - 'Changes saved' => 'DeÄŸiÅŸiklikler kaydedildi', - 'Wrong old password' => 'Yanlış eski parola', - 'Admin' => 'Yönetici', - 'User' => 'Kullanıcı', - 'Editor' => 'Editör', - 'Register' => 'Kayıt', - 'Edit profile' => 'Profil Düzenle', - 'Save' => 'Kaydet', - 'Firstname' => 'Ad', - 'Lastname' => 'Soyad', - 'Old password' => 'Eski Parola', - 'New password' => 'Yeni Parola', - 'Welcome' => 'HoÅŸ geldin', - 'Wrong username or password' => 'Hatalı kullanıcı adı ya da parola', - 'Your changes have been saved.' => 'DeÄŸiÅŸiklikler kaydedildi.', - 'New user have been registered.' => 'Yeni kullanıcı kaydedildi.', - 'Captcha' => 'DoÄŸrulama Kodu', - 'Registration' => 'Kayıt', - 'Username' => 'Kullanıcı Adı', - 'User email is invalid' => 'E-posta geçersiz', - 'Reset Password' => 'Parola Sıfırla', - 'Send New Password' => 'Yeni Parola Gönder', - 'This user doesnt alredy exist' => 'Kullanıcı bulunamadı', - 'Users - Profile' => 'Kullanıcı - Profil', - 'Users - Edit Profile' => 'Kullanıcı - Profil Düzenle', - 'Users - Log In' => 'Kullanıcı - GiriÅŸ', - 'Users - Registration' => 'Kullanıcı - Kayıt', - 'Users - Password Recover' => 'Kullanıcı - Parola Sıfırlama', - 'New Password' => 'Yeni Parola', - 'Forgot your password?' => 'Parolanızı unuttunuz mu?', - 'New password has been sent' => 'Yeni parola gönderildi', - 'Monstra says: This is not your profile...' => 'Monstra: Bu profil size ait deÄŸil...', - 'User registration is closed.' => 'Kullanıcı kaydı kapalı', - 'Allow user registration' => 'Kullanıcı kaydını etkinleÅŸtir', - 'Required field' => 'Zorunlu alan', - 'This user doesnt exist' => 'Kullanıcı yok', - 'Captcha code is wrong' => 'DoÄŸrulama kodu hatalı', - 'Your login details for :site_name has been sent' => ':site_name için giriÅŸ bilgileriniz gönderildi', - 'Your new password for :site_name' => ':site_name için yeni parolanız', - 'Your login details for :site_name' => ':site_name için giriÅŸ bilgileriniz', - 'About Me' => 'Hakkımda', - 'Profile' => 'Profil', - 'Cancel' => 'Vazgeç', - ) - ); diff --git a/plugins/box/users/languages/uk.lang.php b/plugins/box/users/languages/uk.lang.php deleted file mode 100644 index d5e66da..0000000 --- a/plugins/box/users/languages/uk.lang.php +++ /dev/null @@ -1,67 +0,0 @@ - array( - 'Users' => 'КориÑтувачі', - 'Login' => 'Вхід', - 'Password' => 'Пароль', - 'Email' => 'Ел. пошта', - 'Registered' => 'ЗареєÑтрований', - 'Role' => 'Роль', - 'Roles' => 'Ролі', - 'Actions' => 'Дії', - 'Edit' => 'Редагувати', - 'Delete' => 'Видалити', - 'Log In' => 'Вхід', - 'Log Out' => 'Вихід', - 'Register New User' => 'РеєÑÑ‚Ñ€Ð°Ñ†Ñ–Ñ Ð½Ð¾Ð²Ð¾Ð³Ð¾ кориÑтувача', - 'New User Registration' => 'РеєÑÑ‚Ñ€Ð°Ñ†Ñ–Ñ Ð½Ð¾Ð²Ð¾Ð³Ð¾ кориÑтувача', - 'Delete user: :user' => 'Видалити кориÑтувача: :user', - 'User :user have been deleted.' => 'КориÑтувача :user вилучено.', - 'This user already exists' => 'Такий кориÑтувач вже Ñ–Ñнує', - 'This email already exists' => 'Така ел. пошта вже Ñ–Ñнує', - 'Changes saved' => 'Зміни збережені', - 'Wrong old password' => 'Ðевірний Ñтарий пароль', - 'Admin' => 'ÐдмініÑтратор', - 'User' => 'КориÑтувач', - 'Editor' => 'Редактор', - 'Register' => 'РеєÑтраціÑ', - 'Edit profile' => 'Ð ÐµÐ´Ð°Ð³ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ñ€Ð¾Ñ„Ñ–Ð»ÑŽ кориÑтувача', - 'Save' => 'Зберегти', - 'Firstname' => 'Ім’Ñ', - 'Lastname' => 'Прізвище', - 'Old password' => 'Старий пароль', - 'New password' => 'Ðовий пароль', - 'Welcome' => 'ЛаÑкаво проÑимо', - 'Wrong username or password' => 'Ðеправильний логін або пароль', - 'Your changes have been saved.' => 'Ваші зміни були збережені.', - 'New user have been registered.' => 'Ðовий кориÑтувач був зареєÑтрований.', - 'Captcha' => 'Каптча', - 'Registration' => 'РеєÑтраціÑ', - 'Username' => 'Ð†Ð¼â€™Ñ ÐºÐ¾Ñ€Ð¸Ñтувача', - 'User email is invalid' => 'Ел. пошта Ñ” недійÑною', - 'Reset Password' => 'Скинути пароль', - 'Send New Password' => 'Відправити пароль', - 'Users - Profile' => 'КориÑтувачі - Профіль', - 'Users - Edit Profile' => 'КориÑтувачі - Ð ÐµÐ´Ð°Ð³ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ñ€Ð¾Ñ„Ñ–Ð»ÑŽ', - 'Users - Log In' => 'КориÑтувачі - Вхід', - 'Users - Registration' => 'КориÑтувачі - РеєÑтраціÑ', - 'Users - Password Recover' => 'КориÑтувачі - Ð’Ñ–Ð´Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð¿Ð°Ñ€Ð¾Ð»Ñ', - 'New Password' => 'Ðовий пароль', - 'Forgot your password?' => 'Забули пароль?', - 'New password has been sent' => 'Ðовий пароль було відправлено', - 'Monstra says: This is not your profile...' => 'МонÑтра каже: Це не твій профіль...', - 'User registration is closed.' => 'РеєÑÑ‚Ñ€Ð°Ñ†Ñ–Ñ ÐºÐ¾Ñ€Ð¸Ñтувачів закрита.', - 'Allow user registration' => 'Дозволити реєÑтрацію кориÑтувачів.', - 'Required field' => 'Обов’Ñзкове поле', - 'This user doesnt exist' => 'Такого кориÑтувача не Ñ–Ñнує', - 'Captcha code is wrong' => 'Ðевірний захиÑний код', - 'Your login details for :site_name has been sent' => 'Ваші дані Ð´Ð»Ñ Ð´Ð¾Ñтупу до :site_name були відправлені', - 'Your new password for :site_name' => 'Ваш новий пароль до :site_name', - 'Your login details for :site_name' => 'Ваші дані Ð´Ð»Ñ Ð´Ð¾Ñтупу до :site_name', - 'About Me' => 'Про мене', - 'Profile' => 'Профіль', - 'You are banned for 10 minutes. Try again later' => 'Ви заблоковані на 10 хвилин. Спробуйте пізніше', - 'Cancel' => 'Відмінити', - ) - ); diff --git a/plugins/box/users/languages/zh-cn.lang.php b/plugins/box/users/languages/zh-cn.lang.php deleted file mode 100644 index e800cff..0000000 --- a/plugins/box/users/languages/zh-cn.lang.php +++ /dev/null @@ -1,68 +0,0 @@ - array( - 'Users' => '用户', - 'Login' => '登录', - 'Username' => '用户å', - 'Password' => '密ç ', - 'Registered' => '已注册', - 'Email' => '邮箱', - 'Role' => '角色', - 'Roles' => '角色', - 'Edit' => '编辑', - 'Actions' => 'æ“作', - 'Delete' => '删除', - 'Log In' => '登录', - 'Log Out' => '退出', - 'Register New user' => '注册新用户', - 'New User Registration' => '新用户注册', - 'Delete user: :user' => '删除用户: :user', - 'User :user have been deleted.' => '用户 :user 已被删除。', - 'This user already exists' => '此用户已存在', - 'This email already exists' => '此邮箱已存在', - 'Changes saved' => '更改已ä¿å­˜', - 'Wrong old password' => '旧密ç é”™è¯¯', - 'Admin' => '管ç†å‘˜', - 'User' => '用户', - 'Editor' => '编辑者', - 'Register' => '注册者', - 'Edit profile' => '编辑资料', - 'Save' => 'ä¿å­˜', - 'Firstname' => 'åå­—', - 'Lastname' => 'å§“æ°', - 'Old password' => '旧密ç ', - 'New password' => '新密ç ', - 'Welcome' => '欢迎', - 'Wrong username or password' => 'ç”¨æˆ·å æˆ– å¯†ç  é”™è¯¯', - 'Your changes have been saved.' => '您的更改已ä¿å­˜ã€‚', - 'New user have been registered.' => '新用户已注册。', - 'Captcha' => '验è¯ç ', - 'Registration' => '注册', - 'Username' => '用户å', - 'User email is invalid' => '用户邮箱无效', - 'Reset Password' => 'é‡ç½®å¯†ç ', - 'Send New Password' => 'å‘逿–°å¯†ç ', - 'This user doesnt alredy exist' => '此用户ä¸å­˜åœ¨', - 'Users - Profile' => '用户 - 资料', - 'Users - Edit Profile' => '用户 - 编辑资料', - 'Users - Log In' => '用户 - 登录', - 'Users - Registration' => '用户 - 注册', - 'Users - Password Recover' => '用户 - 找回密ç ', - 'New Password' => '新密ç ', - 'Forgot your password?' => '忘记密ç ï¼Ÿ', - 'New password has been sent' => '新密ç å·²å‘é€', - 'Monstra says: This is not your profile...' => 'Monstra æç¤º: è¿™ä¸æ˜¯æ‚¨çš„个人资料...', - 'User registration is closed.' => '用户注册已关闭。', - 'Allow user registration' => 'å…许用户注册', - 'Required field' => '必填字段', - 'This user doesnt exist' => '此用户ä¸å­˜åœ¨', - 'Captcha code is wrong' => '验è¯ç é”™è¯¯', - 'Your login details for :site_name has been sent' => '您在 :site_name 的登录信æ¯ä¸ºå·²å‘é€', - 'Your new password for :site_name' => '您在 :site_name 的新密ç ', - 'Your login details for :site_name' => '您在 :site_name 的登录信æ¯', - 'About Me' => '关于我', - 'Profile' => '个人资料', - 'You are banned for 10 minutes. Try again later' => 'ä½ è¢«ç¦æ­¢10分钟。请ç¨åŽå†è¯•', - ) - ); diff --git a/plugins/box/users/users.admin.php b/plugins/box/users/users.admin.php deleted file mode 100755 index c604209..0000000 --- a/plugins/box/users/users.admin.php +++ /dev/null @@ -1,234 +0,0 @@ - __('Admin', 'users'), - 'editor' => __('Editor', 'users'), - 'user' => __('User', 'users')); - - // Get uses table - $users = new Table('users'); - - if (Option::get('users_frontend_registration') === 'true') { - $users_frontend_registration = true; - } else { - $users_frontend_registration = false; - } - - if (Request::post('users_frontend_submit')) { - - if (Security::check(Request::post('csrf'))) { - - if (Request::post('users_frontend_registration')) $users_frontend_registration = 'true'; else $users_frontend_registration = 'false'; - - if (Option::update('users_frontend_registration', $users_frontend_registration)) { - Notification::set('success', __('Your changes have been saved.', 'users')); - } else { - Notification::set('error', __('Your changes was not saved.', 'users')); - } - - Request::redirect('index.php?id=users'); - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - } - - // Check for get actions - // --------------------------------------------- - if (Request::get('action')) { - - // Switch actions - // ----------------------------------------- - switch (Request::get('action')) { - - // Add - // ------------------------------------- - case "add": - - if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) { - - // Errors - $errors = array(); - - if (Request::post('register')) { - - if (Security::check(Request::post('csrf'))) { - - $user_login = trim(Request::post('login')); - $user_password = trim(Request::post('password')); - $user_email = trim(Request::post('email')); - - if ($user_login == '') $errors['users_empty_login'] = __('Required field', 'users'); - if ($user_password == '') $errors['users_empty_password'] = __('Required field', 'users'); - if ($user_email == '') $errors['users_empty_email'] = __('Required field', 'users'); - if ($users->select("[login='".$user_login."']")) $errors['users_this_user_already_exists'] = __('This user already exists', 'users'); - if ($users->select("[email='".$user_email."']")) $errors['users_this_email_already_exists'] = __('This email already exists', 'users'); - - if (count($errors) == 0) { - - if ($users->insert(array('login' => Security::safeName($user_login), - 'password' => Security::encryptPassword(Request::post('password')), - 'email' => Request::post('email'), - 'hash' => Text::random('alnum', 12), - 'date_registered' => time(), - 'role' => Request::post('role')))) { - Notification::set('success', __('New user have been registered.', 'users')); - } else { - Notification::set('error', __('New user was not registered.', 'users')); - } - - Request::redirect('index.php?id=users'); - } - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - } - - // Display view - View::factory('box/users/views/backend/add') - ->assign('roles', $roles) - ->assign('errors', $errors) - ->display(); - - } else { - Request::redirect('index.php?id=users&action=edit&user_id='.Session::get('user_id')); - } - - break; - - // Edit - // ------------------------------------- - case "edit": - - // Get current user record - $user = $users->select("[id='".(int) Request::get('user_id')."']", null); - - if (isset($user['firstname'])) $user_firstname = $user['firstname']; else $user_firstname = ''; - if (isset($user['lastname'])) $user_lastname = $user['lastname']; else $user_lastname = ''; - if (isset($user['email'])) $user_email = $user['email']; else $user_email = ''; - if (isset($user['twitter'])) $user_twitter = $user['twitter']; else $user_twitter = ''; - if (isset($user['skype'])) $user_skype = $user['skype']; else $user_skype = ''; - if (isset($user['about_me'])) $user_about_me = $user['about_me']; else $user_about_me = ''; - - if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor'))) { - - if ((Request::post('edit_profile')) and - (((int) Session::get('user_id') == (int) Request::get('user_id')) or - (in_array(Session::get('user_role'), array('admin'))))){ - - if (Security::check(Request::post('csrf'))) { - - if (Security::safeName(Request::post('login')) != '') { - - if ($users->update(Request::post('user_id'), array('login' => Security::safeName(Request::post('login')), - 'firstname' => Request::post('firstname'), - 'lastname' => Request::post('lastname'), - 'email' => Request::post('email'), - 'skype' => Request::post('skype'), - 'twitter' => Request::post('twitter'), - 'about_me' => Request::post('about_me'), - 'role' => Request::post('role')))) { - Notification::set('success', __('Your changes have been saved.', 'users')); - } else { - Notification::set('error', __('Your changes was not saved.', 'users')); - } - - Request::redirect('index.php?id=users&action=edit&user_id='.Request::post('user_id')); - - } - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - - } - - if (Request::post('edit_profile_password')) { - - if (Security::check(Request::post('csrf'))) { - - if (trim(Request::post('new_password')) != '') { - - if ($users->update(Request::post('user_id'), array('password' => Security::encryptPassword(trim(Request::post('new_password')))))) { - Notification::set('success', __('Your changes have been saved.', 'users')); - } else { - Notification::set('error', __('Your changes was not saved.', 'users')); - } - - Request::redirect('index.php?id=users&action=edit&user_id='.Request::post('user_id')); - } - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - } - - if ( ((int) Session::get('user_id') == (int) Request::get('user_id')) or (in_array(Session::get('user_role'), array('admin')) && count($user) != 0) ) { - - // Display view - View::factory('box/users/views/backend/edit') - ->assign('user', $user) - ->assign('user_firstname', $user_firstname) - ->assign('user_lastname', $user_lastname) - ->assign('user_email', $user_email) - ->assign('user_twitter', $user_twitter) - ->assign('user_skype', $user_skype) - ->assign('user_about_me', $user_about_me) - ->assign('roles', $roles) - ->display(); - - } else { - echo __('Monstra says: This is not your profile...', 'users'); - } - - } - - break; - - // Delete - // ------------------------------------- - case "delete": - - if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin')) && (int)$_SESSION['user_id'] != (int)Request::get('user_id')) { - - if (Security::check(Request::get('token'))) { - - $user = $users->select('[id="'.Request::get('user_id').'"]', null); - if ($users->delete(Request::get('user_id'))) { - Notification::set('success', __('User :user have been deleted.', 'users', array(':user' => $user['login']))); - } else { - Notification::set('error', __('User :user was not deleted.', 'users', array(':user' => $user['login']))); - } - - Request::redirect('index.php?id=users'); - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - - } - - break; - } - } else { - - if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) { - - // Dislay view - View::factory('box/users/views/backend/index') - ->assign('roles', $roles) - ->assign('users_list', $users->select()) - ->assign('users_frontend_registration', $users_frontend_registration) - ->display(); - - } else { - Request::redirect('index.php?id=users&action=edit&user_id='.Session::get('user_id')); - } - } - - } -} diff --git a/plugins/box/users/users.plugin.php b/plugins/box/users/users.plugin.php deleted file mode 100644 index b41520c..0000000 --- a/plugins/box/users/users.plugin.php +++ /dev/null @@ -1,512 +0,0 @@ -assign('users', Users::$users->select(null, 'all')) - ->display(); - } - - /** - * Get user profile - */ - public static function getProfile($id) - { - View::factory('box/users/views/frontend/profile') - ->assign('user', Users::$users->select("[id=".(int) $id."]", null)) - ->display(); - } - - /** - * Get New User Registration - */ - public static function getRegistration() - { - if (Option::get('users_frontend_registration') == 'true') { - - // Is User Loged in ? - if ( ! Session::get('user_id')) { - - $errors = array(); - - $user_email = Request::post('email'); - $user_login = Request::post('login'); - $user_password = Request::post('password'); - - // Register form submit - if (Request::post('register')) { - - // Check csrf - if (Security::check(Request::post('csrf'))) { - - $user_email = trim($user_email); - $user_login = trim($user_login); - $user_password = trim($user_password); - - if (Option::get('captcha_installed') == 'true' && ! CryptCaptcha::check(Request::post('answer'))) $errors['users_captcha_wrong'] = __('Captcha code is wrong', 'captcha'); - if ($user_login == '') $errors['users_empty_login'] = __('Required field', 'users'); - if ($user_password == '') $errors['users_empty_password'] = __('Required field', 'users'); - if ($user_email == '') $errors['users_empty_email'] = __('Required field', 'users'); - if ($user_email != '' && ! Valid::email($user_email)) $errors['users_invalid_email'] = __('User email is invalid', 'users'); - if (Users::$users->select("[login='".$user_login."']")) $errors['users_this_user_alredy_exists'] = __('This user alredy exist', 'users'); - if (Users::$users->select("[email='".$user_email."']")) $errors['users_this_email_alredy_exists'] = __('This email alredy exist', 'users'); - - if (count($errors) == 0) { - - Users::$users->insert(array('login' => Security::safeName($user_login), - 'password' => Security::encryptPassword(Request::post('password')), - 'email' => Request::post('email'), - 'hash' => Text::random('alnum', 12), - 'date_registered' => time(), - 'role' => 'user')); - - // Log in - $user = Users::$users->select("[id='".Users::$users->lastId()."']", null); - Session::set('user_id', (int) $user['id']); - Session::set('user_login', (string) $user['login']); - Session::set('user_role', (string) $user['role']); - Session::set('user_email', (string) $user['email']); - - $mail = new PHPMailer(); - $mail->CharSet = 'utf-8'; - $mail->ContentType = 'text/html'; - $mail->SetFrom(Option::get('system_email')); - $mail->AddReplyTo(Option::get('system_email')); - $mail->AddAddress($user['email'], $user['login']); - $mail->Subject = Option::get('sitename'); - $mail->MsgHTML(View::factory('box/emails/views/emails/email_layout') - ->assign('site_name', Option::get('sitename')) - ->assign('user_login', $user['login']) - ->assign('email_template', 'new-user') - ->render()); - $mail->Send(); - - // Redirect to user profile - Request::redirect(Option::get('siteurl').'/users/'.Users::$users->lastId()); - } - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - } - - // Display view - View::factory('box/users/views/frontend/registration') - ->assign('errors', $errors) - ->assign('user_email', $user_email) - ->assign('user_login', $user_login) - ->assign('user_password', $user_password) - ->display(); - - } else { - Request::redirect(Site::url().'/users/'.Session::get('user_id')); - } - - } else { - echo __('User registration is closed.', 'users'); - } - - } - - /** - * Get user panel - */ - public static function getPanel() - { - View::factory('box/users/views/frontend/userspanel')->display(); - } - - /** - * Is User Loged - */ - public static function isLoged() - { - if ((Session::get('user_id')) and (((int) Session::get('user_id') == Uri::segment(1)) or (in_array(Session::get('user_role'), array('admin'))))) { - return true; - } else { - return false; - } - } - - /** - * Logout - */ - public static function logout() - { - Session::destroy(); - Request::redirect($_SERVER["HTTP_REFERER"]); - } - - /** - * Edit user profile - */ - public static function getProfileEdit($id) - { - // Is Current User Loged in ? - if (Users::isLoged()) { - - $user = Users::$users->select("[id='".(int) $id."']", null); - - // Edit Profile Submit - if (Request::post('edit_profile')) { - - // Check csrf - if (Security::check(Request::post('csrf'))) { - - // Check for POST data manipulation - if( ((int) Session::get('user_id') == (int) Request::post('user_id')) or (in_array(Session::get('user_role'), array('admin'))) ) { - - if (Security::safeName(Request::post('login')) != '') { - if (Users::$users->update(Request::post('user_id'), - array('login' => Security::safeName(Request::post('login')), - 'firstname' => Request::post('firstname'), - 'lastname' => Request::post('lastname'), - 'email' => Request::post('email'), - 'skype' => Request::post('skype'), - 'about_me' => Request::post('about_me'), - 'twitter' => Request::post('twitter')))) { - - // Change password - if (trim(Request::post('new_password')) != '') { - Users::$users->update(Request::post('user_id'), array('password' => Security::encryptPassword(trim(Request::post('new_password'))))); - } - - Notification::set('success', __('Your changes have been saved.', 'users')); - Request::redirect(Site::url().'/users/'.$user['id']); - } - } else { } - - } else { die('Monstra says: This is not your profile...'); } - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - - } - - View::factory('box/users/views/frontend/edit') - ->assign('user', $user) - ->display(); - - } else { - Request::redirect(Site::url().'/users/login'); - } - } - - /** - * Get Password Reset - */ - public static function getPasswordReset() - { - // Is User Loged in ? - if ( ! Session::get('user_id')) { - - $errors = array(); - - $site_url = Option::get('siteurl'); - $site_name = Option::get('sitename'); - - // Reset Password from hash - if (Request::get('hash')) { - - // Get user with specific hash - $user = Users::$users->select("[hash='" . Request::get('hash') . "']", null); - - // If user exists - if ((count($user) > 0) && ($user['hash'] == Request::get('hash'))) { - - // Generate new password - $new_password = Text::random('alnum', 6); - - // Update user profile - // Set new hash and new password - Users::$users->updateWhere("[login='" . $user['login'] . "']", array('hash' => Text::random('alnum', 12), 'password' => Security::encryptPassword($new_password))); - - $mail = new PHPMailer(); - $mail->CharSet = 'utf-8'; - $mail->ContentType = 'text/html'; - $mail->SetFrom(Option::get('system_email')); - $mail->AddReplyTo(Option::get('system_email')); - $mail->AddAddress($user['email'], $user['login']); - $mail->Subject = __('Your new password for :site_name', 'users', array(':site_name' => $site_name)); - $mail->MsgHTML(View::factory('box/emails/views/emails/email_layout') - ->assign('site_url', $site_url) - ->assign('site_name', $site_name) - ->assign('user_id', $user['id']) - ->assign('user_login', $user['login']) - ->assign('new_password', $new_password) - ->assign('email_template', 'new-password') - ->render()); - $mail->Send(); - - // Set notification - Notification::set('success', __('New password has been sent', 'users')); - - // Redirect to password-reset page - Request::redirect(Site::url().'/users/login'); - - } - } - - // Reset Password Form Submit - if (Request::post('reset_password_submit')) { - - $user_login = trim(Request::post('login')); - - // Check csrf - if (Security::check(Request::post('csrf'))) { - - if (Option::get('captcha_installed') == 'true' && ! CryptCaptcha::check(Request::post('answer'))) $errors['users_captcha_wrong'] = __('Captcha code is wrong', 'users'); - if ($user_login == '') $errors['users_empty_field'] = __('Required field', 'users'); - if ($user_login != '' && ! Users::$users->select("[login='".$user_login."']")) $errors['users_user_doesnt_exists'] = __('This user doesnt exist', 'users'); - - if (count($errors) == 0) { - - // Get user - $user = Users::$users->select("[login='" . $user_login . "']", null); - - // Generate new hash - $new_hash = Text::random('alnum', 12); - - // Update user hash - Users::$users->updateWhere("[login='" . $user_login . "']", array('hash' => $new_hash)); - - $mail = new PHPMailer(); - $mail->CharSet = 'utf-8'; - $mail->ContentType = 'text/html'; - $mail->SetFrom(Option::get('system_email')); - $mail->AddReplyTo(Option::get('system_email')); - $mail->AddAddress($user['email'], $user['login']); - $mail->Subject = __('Your login details for :site_name', 'users', array(':site_name' => $site_name)); - $mail->MsgHTML(View::factory('box/emails/views/emails/email_layout') - ->assign('site_url', $site_url) - ->assign('site_name', $site_name) - ->assign('user_id', $user['id']) - ->assign('user_login', $user['login']) - ->assign('new_hash', $new_hash) - ->assign('email_template', 'reset-password') - ->render()); - $mail->Send(); - - // Set notification - Notification::set('success', __('Your login details for :site_name has been sent', 'users', array(':site_name' => $site_name))); - - // Redirect to password-reset page - Request::redirect(Site::url().'/users/password-reset'); - - } - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - - } - - View::factory('box/users/views/frontend/password_reset') - ->assign('errors', $errors) - ->assign('user_login', trim(Request::post('login'))) - ->display(); - - } - } - - /** - * Get User login - */ - public static function getLogin() - { - // Is User Loged in ? - if ( ! Session::get('user_id')) { - - // Login Form Submit - if (Request::post('login_submit')) { - - if (Cookie::get('login_attempts') && Cookie::get('login_attempts') >= 5) { - - Notification::setNow('error', __('You are banned for 10 minutes. Try again later', 'users')); - - } else { - - // Check csrf - if (Security::check(Request::post('csrf'))) { - - $user = Users::$users->select("[login='" . trim(Request::post('username')) . "']", null); - - if (count($user) !== 0) { - if ($user['login'] == Request::post('username')) { - if (trim($user['password']) == Security::encryptPassword(Request::post('password'))) { - if ($user['role'] == 'admin' || $user['role'] == 'editor') { - Session::set('admin', true); - } - Session::set('user_id', (int) $user['id']); - Session::set('user_login', (string) $user['login']); - Session::set('user_role', (string) $user['role']); - Session::set('user_email', (string) $user['email']); - Request::redirect(Site::url().'/users/'.Session::get('user_id')); - } else { - Notification::setNow('error', __('Wrong username or password', 'users')); - - if (Cookie::get('login_attempts')) { - if (Cookie::get('login_attempts') < 5) { - $attempts = Cookie::get('login_attempts') + 1; - Cookie::set('login_attempts', $attempts , 600); - } else { - Notification::setNow('error', __('You are banned for 10 minutes. Try again later', 'users')); - } - } else { - Cookie::set('login_attempts', 1, 600); - } - } - } - } else { - Notification::setNow('error', __('Wrong username or password', 'users')); - - if (Cookie::get('login_attempts')) { - if (Cookie::get('login_attempts') < 5) { - $attempts = Cookie::get('login_attempts') + 1; - Cookie::set('login_attempts', $attempts , 600); - } else { - Notification::setNow('error', __('You are banned for 10 minutes. Try again later', 'users')); - } - } else { - Cookie::set('login_attempts', 1, 600); - } - } - - } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } - } - } - - View::factory('box/users/views/frontend/login')->display(); - } else { - Request::redirect(Site::url().'/users/'.Session::get('user_id')); - } - } - - /** - * Set title - */ - public static function title() - { - switch (Users::route()) { - case 'list': return __('Users', 'users'); break; - case 'profile': return __('Users - Profile', 'users'); break; - case 'edit': return __('Users - Edit Profile', 'users'); break; - case 'login': return __('Users - Login', 'users'); break; - case 'registration': return __('Users - Registration', 'users'); break; - case 'password-reset': return __('Users - Password Recover', 'users'); break; - } - } - - /** - * Set content - */ - public static function content() - { - switch (Users::route()) { - case 'list': Users::getList(); break; - case 'profile': Users::getProfile(Uri::segment(1)); break; - case 'edit': Users::getProfileEdit(Uri::segment(1)); break; - case 'login': Users::getLogin(); break; - case 'registration': Users::getRegistration(); break; - case 'password-reset': Users::getPasswordReset(); break; - - } - } - - /** - * Set template - */ - public static function template() - { - return 'index'; - } - - /** - * Get Gravatar - * - * - * - * - * - * @param string $email Email - * @param integer $size Image Size - */ - public static function getGravatarURL($email, $size) - { - return 'http://www.gravatar.com/avatar/'.md5(strtolower(trim($email))).'?size='.$size; - } - -} diff --git a/plugins/box/users/views/backend/add.view.php b/plugins/box/users/views/backend/add.view.php deleted file mode 100644 index f7827c1..0000000 --- a/plugins/box/users/views/backend/add.view.php +++ /dev/null @@ -1,61 +0,0 @@ - -

    - -
    -
    -
    - (isset($errors['users_this_user_alredy_exists']) || isset($errors['users_empty_login'])) ? 'form-control error-field' : 'form-control')) - ); - - if (isset($errors['users_this_user_alredy_exists'])) echo ''.$errors['users_this_user_alredy_exists'].''; - if (isset($errors['users_empty_l-ogin'])) echo ''.$errors['users_empty_login'].''; - ?> -
    - -
    - (isset($errors['users_empty_password'])) ? 'form-control error-field' : 'form-control')) - ); - if (isset($errors['users_empty_password'])) echo ''.$errors['users_empty_password'].''; - ?> -
    - -
    - (isset($errors['users_this_email_alredy_exists']) || isset($errors['users_empty_email'])) ? 'form-control error-field' : 'form-control')) - ); - - if (isset($errors['users_this_email_alredy_exists'])) echo ''.$errors['users_this_email_alredy_exists'].''; - if (isset($errors['users_empty_email'])) echo ''.$errors['users_empty_email'].''; - ?> -
    -
    - __('Admin', 'users'), 'editor' => __('Editor', 'users'), 'user' => __('User', 'users')), null, array('class' => 'form-control')) - ); - ?> -
    - 'btn btn-phone btn-primary')).Html::nbsp(2). - Html::anchor(__('Cancel', 'users'), 'index.php?id=users', array('title' => __('Cancel', 'users'), 'class' => 'btn btn-phone btn-default')). - Form::close() - ); - ?> -
    -
    \ No newline at end of file diff --git a/plugins/box/users/views/backend/edit.view.php b/plugins/box/users/views/backend/edit.view.php deleted file mode 100644 index c88392e..0000000 --- a/plugins/box/users/views/backend/edit.view.php +++ /dev/null @@ -1,133 +0,0 @@ - -

    - -
    -
    - -
    - 'form-control')); - ?> -
    - -
    - 'form-control')) - ); - ?> -
    -
    - 'form-control')) - ); - ?> -
    -
    - 'form-control')) - ); - ?> -
    -
    - 'form-control')) - ); - ?> -
    -
    - 'form-control')) - ); - ?> -
    -
    - 'form-control')) - ); - ?> -
    - -
    - __('Admin', 'users'), 'editor' => __('Editor', 'users'), 'user' => __('User', 'users')), $user['role'], array('class' => 'form-control')) - ?> -
    - 'btn btn-phone btn-primary')).Html::nbsp(2). - Html::anchor(__('Cancel', 'users'), 'index.php?id=users', array('title' => __('Cancel', 'users'), 'class' => 'btn btn-phone btn-cancel btn-default')). - Form::close() - ); - - ?> -
    - -
    - -
    - 'form-control')) - ); - ?> -
    - 'btn btn-phone btn-primary')). - Form::close() - ); - ?> -
    - -
    - - -'.__('This user does not exist', 'users').'
    '; - } -?> diff --git a/plugins/box/users/views/backend/index.view.php b/plugins/box/users/views/backend/index.view.php deleted file mode 100755 index e1c6c5e..0000000 --- a/plugins/box/users/views/backend/index.view.php +++ /dev/null @@ -1,58 +0,0 @@ -

    - -
    -
    - __('Register New User', 'users'), 'class' => 'btn btn-phone btn-primary')); ?> -
    -
    - 'users_frontend')); ?> - - - 'display:none;')); ?> - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - -
    - - -
    - 'btn btn-primary')); ?> - 'btn btn-danger', 'onclick' => "return confirmDelete('".__('Delete user: :user', 'users', array(':user' => Html::toText($user['login'])))."')")); - } - ?> -
    -
    - diff --git a/plugins/box/users/views/frontend/edit.view.php b/plugins/box/users/views/frontend/edit.view.php deleted file mode 100644 index 386d7bc..0000000 --- a/plugins/box/users/views/frontend/edit.view.php +++ /dev/null @@ -1,52 +0,0 @@ -
    -
    - -
    - - - -
    - - -
    - -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - __('Cancel', 'pages'), 'class' => 'btn btn-default')); ?> -
    -
    -
    -
    \ No newline at end of file diff --git a/plugins/box/users/views/frontend/index.view.php b/plugins/box/users/views/frontend/index.view.php deleted file mode 100644 index fce726c..0000000 --- a/plugins/box/users/views/frontend/index.view.php +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - -
    - -
    \ No newline at end of file diff --git a/plugins/box/users/views/frontend/login.view.php b/plugins/box/users/views/frontend/login.view.php deleted file mode 100644 index f9ad19d..0000000 --- a/plugins/box/users/views/frontend/login.view.php +++ /dev/null @@ -1,27 +0,0 @@ -
    -
    - '.$error.'
    '); - ?> -
    - -
    -
    -
    - -
    - - -
    -
    - - -
    -
    - -
    -
    -
    -
    \ No newline at end of file diff --git a/plugins/box/users/views/frontend/password_reset.view.php b/plugins/box/users/views/frontend/password_reset.view.php deleted file mode 100644 index 8c15e69..0000000 --- a/plugins/box/users/views/frontend/password_reset.view.php +++ /dev/null @@ -1,39 +0,0 @@ -
    -
    - '.$success.'
    '); - ?> -
    - -
    -
    -
    - - - -
    - - - '.$errors['users_user_doesnt_exists'].''; - if (isset($errors['users_empty_field'])) echo Html::nbsp(3).''.$errors['users_empty_field'].''; - ?> -
    - - -
    - - '.$errors['users_captcha_wrong'].''; ?> -
    - -
    - - -
    - -
    -
    -
    -
    \ No newline at end of file diff --git a/plugins/box/users/views/frontend/profile.view.php b/plugins/box/users/views/frontend/profile.view.php deleted file mode 100644 index 200ba13..0000000 --- a/plugins/box/users/views/frontend/profile.view.php +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - -
    :
    :
    :
    :
    :
    :
    :
    :
    - -
    - / - / - - - diff --git a/plugins/box/users/views/frontend/registration.view.php b/plugins/box/users/views/frontend/registration.view.php deleted file mode 100644 index c9732e0..0000000 --- a/plugins/box/users/views/frontend/registration.view.php +++ /dev/null @@ -1,43 +0,0 @@ -
    -
    -
    - - -
    - - - '.$errors['users_this_user_alredy_exists'].''; - if (isset($errors['users_empty_login'])) echo Html::nbsp(3).''.$errors['users_empty_login'].''; - ?> -
    -
    - - - '.$errors['users_empty_password'].''; - ?> -
    -
    - - - '.$errors['users_this_email_alredy_exists'].''; - if (isset($errors['users_empty_email'])) echo Html::nbsp(3).''.$errors['users_empty_email'].''; - if (isset($errors['users_invalid_email'])) echo Html::nbsp(3).''.$errors['users_invalid_email'].''; - ?> -
    - -
    - - '.$errors['users_captcha_wrong'].''; ?> -
    - -
    - -
    - -
    -
    -
    -
    diff --git a/plugins/box/users/views/frontend/userspanel.view.php b/plugins/box/users/views/frontend/userspanel.view.php deleted file mode 100644 index 180f1af..0000000 --- a/plugins/box/users/views/frontend/userspanel.view.php +++ /dev/null @@ -1,15 +0,0 @@ - - - -
  • -
  • - \ No newline at end of file diff --git a/plugins/captcha/captcha.plugin.php b/plugins/captcha/captcha.plugin.php deleted file mode 100644 index f81cac7..0000000 --- a/plugins/captcha/captcha.plugin.php +++ /dev/null @@ -1,48 +0,0 @@ -"; - if ($reload) echo "  "; - echo ""; -} - -/** - * Verify Code - */ -function chk_crypt($code) -{ - include ($_SESSION['configfile']); - $code = addslashes ($code); - $code = str_replace(' ', '', $code); - $code = ($difuplow ? $code : strtoupper($code)); - switch (strtoupper($cryptsecure)) { - case "MD5" : $code = md5($code); break; - case "SHA1" : $code = sha1($code); break; - } - if ($_SESSION['cryptcode'] and ($_SESSION['cryptcode'] == $code)) { - unset($_SESSION['cryptreload']); - if ($cryptoneuse) unset($_SESSION['cryptcode']); - return true; - } else { - $_SESSION['cryptreload'] = true; - - return false; - } -} diff --git a/plugins/captcha/crypt/cryptographp.inc.php b/plugins/captcha/crypt/cryptographp.inc.php deleted file mode 100644 index a55c306..0000000 --- a/plugins/captcha/crypt/cryptographp.inc.php +++ /dev/null @@ -1,246 +0,0 @@ -= $cryptusemax) { - header("Content-type: image/png"); - readfile('images/erreur1.png'); - exit; -} - -$delai = time()-$_SESSION['crypttime']; -if ($delai < $cryptusetimer) { - switch ($cryptusertimererror) { - case 2 : header("Content-type: image/png"); - readfile('images/erreur2.png'); - exit; - case 3 : sleep ($cryptusetimer-$delai); - break; // Fait une pause - case 1 : - default : exit; // Quitte le script sans rien faire - } -} - -// Create temporary cryptogram -$imgtmp = imagecreatetruecolor($cryptwidth,$cryptheight); -$blank = imagecolorallocate($imgtmp,255,255,255); -$black = imagecolorallocate($imgtmp,0,0,0); -imagefill($imgtmp,0,0,$blank); - -$word =''; -$x = 10; -$pair = rand(0,1); -$charnb = rand($charnbmin,$charnbmax); -for ($i=1;$i<= $charnb;$i++) { - $tword[$i]['font'] = $tfont[array_rand($tfont,1)]; - $tword[$i]['angle'] = (rand(1,2)==1)?rand(0,$charanglemax):rand(360-$charanglemax,360); - - if ($crypteasy) $tword[$i]['element'] =(!$pair)?$charelc{rand(0,strlen($charelc)-1)}:$charelv{rand(0,strlen($charelv)-1)}; - else $tword[$i]['element'] = $charel{rand(0,strlen($charel)-1)}; - - $pair=!$pair; - $tword[$i]['size'] = rand($charsizemin,$charsizemax); - $tword[$i]['y'] = ($charup?($cryptheight/2)+rand(0,($cryptheight/5)):($cryptheight/1.5)); - $word .=$tword[$i]['element']; - - $lafont="fonts/".$tword[$i]['font']; - imagettftext($imgtmp,$tword[$i]['size'],$tword[$i]['angle'],$x,$tword[$i]['y'],$black,$lafont,$tword[$i]['element']); - - $x +=$charspace; -} - -// Calculation of horizontal framing cryptograms temporary -$xbegin=0; -$x=0; -while (($x<$cryptwidth)and(!$xbegin)) { - $y=0; - while (($y<$cryptheight)and(!$xbegin)) { - if (imagecolorat($imgtmp,$x,$y) != $blank) $xbegin = $x; - $y++; - } - $x++; -} - -$xend=0; -$x=$cryptwidth-1; -while (($x>0)and(!$xend)) { - $y=0; - while (($y<$cryptheight)and(!$xend)) { - if (imagecolorat($imgtmp,$x,$y) != $blank) $xend = $x; - $y++; - } - $x--; -} - -$xvariation = round(($cryptwidth/2)-(($xend-$xbegin)/2)); -imagedestroy ($imgtmp); - -// Creating the final cryptogram -$img = imagecreatetruecolor($cryptwidth, $cryptheight); - -if ($bgimg and is_dir($bgimg)) { - $dh = opendir($bgimg); - while (false !== ($filename = readdir($dh))) - if (eregi(".[gif|jpg|png]$", $filename)) { $files[] = $filename; } - closedir($dh); - $bgimg = $bgimg.'/'.$files[array_rand($files,1)]; -} - -if ($bgimg) { - list($getwidth, $getheight, $gettype, $getattr) = getimagesize($bgimg); - switch ($gettype) { - case "1": $imgread = imagecreatefromgif($bgimg); break; - case "2": $imgread = imagecreatefromjpeg($bgimg); break; - case "3": $imgread = imagecreatefrompng($bgimg); break; - } - imagecopyresized ($img, $imgread, 0,0,0,0,$cryptwidth,$cryptheight,$getwidth,$getheight); - imagedestroy ($imgread); -} else { - $bg = imagecolorallocate($img,$bgR,$bgG,$bgB); - imagefill($img,0,0,$bg); - if ($bgclear) imagecolortransparent($img,$bg); -} - -function ecriture() -{ - global $img, $ink, $charR, $charG, $charB, $charclear, $xvariation, $charnb, $charcolorrnd, $charcolorrndlevel, $tword, $charspace; - if (function_exists ('imagecolorallocatealpha')) $ink = imagecolorallocatealpha($img,$charR,$charG,$charB,$charclear); - else $ink = imagecolorallocate ($img,$charR,$charG,$charB); - - $x = $xvariation; - for ($i = 1; $i <= $charnb; $i++) { - - if ($charcolorrnd) { - $ok = false; - do { - $rndR = rand(0,255); $rndG = rand(0,255); $rndB = rand(0,255); - $rndcolor = $rndR+$rndG+$rndB; - switch ($charcolorrndlevel) { - case 1 : if ($rndcolor<200) $ok=true; break; // tres sombre - case 2 : if ($rndcolor<400) $ok=true; break; // sombre - case 3 : if ($rndcolor>500) $ok=true; break; // claires - case 4 : if ($rndcolor>650) $ok=true; break; // tr?s claires - default : $ok=true; - } - } while (!$ok); - - if (function_exists ('imagecolorallocatealpha')) $rndink = imagecolorallocatealpha($img,$rndR,$rndG,$rndB,$charclear); - else $rndink = imagecolorallocate ($img,$rndR,$rndG,$rndB); - } - - $lafont="fonts/".$tword[$i]['font']; - imagettftext($img,$tword[$i]['size'],$tword[$i]['angle'],$x,$tword[$i]['y'],$charcolorrnd?$rndink:$ink,$lafont,$tword[$i]['element']); - - $x +=$charspace; - } -} - -function noisecolor() -{ - global $img, $noisecolorchar, $ink, $bg, $brushsize; - switch ($noisecolorchar) { - case 1 : $noisecol = $ink; break; - case 2 : $noisecol = $bg; break; - case 3 : - default : $noisecol = imagecolorallocate ($img,rand(0,255),rand(0,255),rand(0,255)); break; - } - if ($brushsize and $brushsize > 1 and function_exists('imagesetbrush')) { - $brush = imagecreatetruecolor($brushsize,$brushsize); - imagefill($brush, 0, 0, $noisecol); - imagesetbrush($img, $brush); - $noisecol = IMG_COLOR_BRUSHED; - } - - return $noisecol; -} - -function bruit() -{ - global $noisepxmin, $noisepxmax, $noiselinemin, $noiselinemax, $nbcirclemin, $nbcirclemax,$img, $cryptwidth, $cryptheight; - $nbpx = rand($noisepxmin,$noisepxmax); - $nbline = rand($noiselinemin,$noiselinemax); - $nbcircle = rand($nbcirclemin,$nbcirclemax); - for ($i=1;$i<$nbpx;$i++) imagesetpixel ($img,rand(0,$cryptwidth-1),rand(0,$cryptheight-1),noisecolor()); - for ($i=1;$i<=$nbline;$i++) imageline($img,rand(0,$cryptwidth-1),rand(0,$cryptheight-1),rand(0,$cryptwidth-1),rand(0,$cryptheight-1),noisecolor()); - for ($i=1;$i<=$nbcircle;$i++) imagearc($img,rand(0,$cryptwidth-1),rand(0,$cryptheight-1),$rayon=rand(5,$cryptwidth/3),$rayon,0,360,noisecolor()); -} - -if ($noiseup) { - ecriture(); - bruit(); -} else { - bruit(); - ecriture(); -} - -// Creating frame -if ($bgframe) { - $framecol = imagecolorallocate($img,($bgR*3+$charR)/4,($bgG*3+$charG)/4,($bgB*3+$charB)/4); - imagerectangle($img, 0, 0, $cryptwidth-1, $cryptheight-1, $framecol); -} - -// Additional changes: grayscale and gaussian blur -if (function_exists('imagefilter')) { - if ($cryptgrayscal) imagefilter ( $img, IMG_FILTER_GRAYSCALE); - if ($cryptgaussianblur) imagefilter ( $img, IMG_FILTER_GAUSSIAN_BLUR); -} - -// Shift conversion cryptograms -$word = ($difuplow?$word:strtoupper($word)); - -// Write cryptcode to the Session -switch (strtoupper($cryptsecure)) { - case "MD5" : $_SESSION['cryptcode'] = md5($word); break; - case "SHA1" : $_SESSION['cryptcode'] = sha1($word); break; - default : $_SESSION['cryptcode'] = $word; break; -} - -$_SESSION['crypttime'] = time(); -$_SESSION['cryptcptuse']++; - -// Render image -switch (strtoupper($cryptformat)) { - case "JPG" : - case "JPEG" : if (imagetypes() & IMG_JPG) { - header("Content-type: image/jpeg"); - imagejpeg($img, "", 80); - } - break; - case "GIF" : if (imagetypes() & IMG_GIF) { - header("Content-type: image/gif"); - imagegif($img); - } - break; - case "PNG" : - default : if (imagetypes() & IMG_PNG) { - header("Content-type: image/png"); - imagepng($img); - } -} - -imagedestroy ($img); -unset ($word,$tword); -unset ($_SESSION['cryptreload']); diff --git a/plugins/captcha/crypt/cryptographp.php b/plugins/captcha/crypt/cryptographp.php deleted file mode 100644 index b54ad32..0000000 --- a/plugins/captcha/crypt/cryptographp.php +++ /dev/null @@ -1,5 +0,0 @@ -4I?JuMYhLAyNs;K6vQN;gd4cSJvVC%LoyFarngLL*i%O zJ_-B3gwX!}BL~+ve*c00x`>ecZhX8Wut0xN@jdvxVfY?6a`M8RPtCt`7eXig57@u| z_`!3he(}*?J_y^t3G4s26Q>WXBmIF6LiD4se)#12oo9%7q7D0pVZCr_{p3OM(m6O^ z)|u1iFDO&WZz81lF|7aEnR5rvaKHSF9KQb{p6e&70ll_Vucu$clDD^+R@((3dEqlsZTv$UZF@m8DN;dHq@g4gE{h`~@e5{<4$wFPqmdTD#EcQ_^b0{RL(Nkk!#D;5eouw3v%iBw39G%%+{I;01j z8IcJwhy{7~BqeQzEbzf2E3!eGIFJ*$kQ;g6x4g)Q{3w7#6ht8uMiCT6F%(A$ltd|% zMj4bvSep2eM+HEG=zrH2pUCWXdF$To^U47 z6zosK6Q89GlJrrRK5nR^OE-wF@z)k5 z;xTyLkVO;m-h|kH1Nl3z6QtM?28AQ*8#hQ1K7|`p*S{`oyxwj^>- z6*nk<$9hA9FBmS=I&kzxdtH#u`$nGw=JD)}LC1~ZrKKBke+Ldh_&Y~$$o!of+Nd=V z7Y2^>C*q$65X-l|)Pak7!z4%eQxIO4k&ku!H;DDlAPB5Iw|JwywuFB#5rQx{G* zgA(y%BL4M6ymf<%CM22xHqot>!ut&M|AuMw#*MKrVmR-7ZmBmrU_ds zFb!{IK;s-+Z^3o}bP~3UZe0e=7*q4tWr1{Sv$qj_`Ujl;$Hp%!G z2r(2wtRCpSijW!Xh~*bRG++yC9MJ!h2s!=+A=iF{-0vXd`3lh6V+i>eg#2oR#9@Sj zaAu(oA{71_LXrO+q1Yva;_!Qkmk~OpWwi+9V81+UTZH|}uz&RiLJj!c<|0C^ zKL!nkbLxZN>cVgJ!*vW65gPh4god9(Xauft^#4R?430PHL}=LTDYXbALa6w~aarVX0|#`5IBH*>ro+ z6Q3jN54mD7kgN>e@PJl@>;DapU9gORt$J*(0Pf!5>>gu-UAu*)eSnI8oSFY&PX0}7 zjCpt(?LsqX7R{k~w19S_MYM#L(H^vd_M(T-r_gI~hDP+CB+bDWz)EL~=LoPh?DldQ zSRm*2JPFt8-=3#no6`2Y9JXn1&(pAcXnP*pu4(KIP%4-U-kc}EZe7}5E(5tdx;;+< z;-A}|r(l~eZqLhMn?Kv0r(yYj-k!(D|J&*HizkGcgGV=#!qkBaLa0(oj$b@{_~5zD z#ltfP4_`d7es1vesS6XQPrtrjSwNB&-@&5Qvtk3}h^WVrj3*YYM@e0GGu3PDhUZ4tc3B{#^&jwtk58vTKS% zz(4ayY`f%CpObQcQ6>X z$|-rEG2e$*2rNk{0^~=;M5upocPM>G@5p-x*OGBg>{KF?ou{@*%8-(lPv9){!gQ)41bBDdY)e~Q z+M+vb&D%}f^l+sSnoUmGd7qNglLRRvEi#k-M}e5tWTH8Z!Q-;%cq{L*nO$~W*{rcr zN`+Fd^%MdJ_-vZj69mo4NuFMb`B_HH3Tm^SlG{`+Asmm6jK(Gx9F-8Gjk(lDlb+|R z3cD*6vGb-DV>EZfsn{H^*Q(TMBhijpZHy*h5F3oasI_?`ZrdUg@|#6#l*?7p+oY!rX>(N2ou+$7B!W3eI+)vz$J> z?hSZqOLcd^pJ2ke(7^bSJ?=z8Ow_!0*sAHt^8t^uGG4HY{)E+H6h{Y^`(4H;2h!j- z{~Y3+2Jo-DZE@LowM@?HR7whwT`vn7n3OcI6-~2n)&)=*xL%mUnkKc2@ODpQoV)MCxo>jZiQeIP>ODU5R?Luf|!KoHwPe?6yZ} zlcyPA<4w^o#NCdv9XMp`XT%TX-ylB?cHh;uV0u7uEh7@pSS|~Rhx2pS|Sq^Um6CR~yNql=D5^>yk?ZNT~WE^|P zP%@Pg^-ev-1(}&u54Yl(tAG)(gHs6}$JS4Xmx&GV%I$5&X3?n?a@MWtF!)ToJF+V6 zkgg?n)9Bnh5rFtg-0d+rRnty;OJ_8NeIC6{UEr-cTV2N~I}LwyDrArcEY$&ja?A@> zLfrNf<%3`q{18hA+m2k2Q&TDnVU4LuL`ks9gx&`t)gf@ybXhP0Tk#Hl8ym`b!KbRCK86S(Y-X2VB}dBQkUpB->9R=cNNbDRx04b>~j zf|yIW%~UpN8#tU=oH}msv@BvgX**HR&3t%nvNqq!US%VqXEe6HxOBE?vGSyvRZ_f4 z?!XfJ_SW;%r{$aAm5Xi9uF27%QZmRI!E>6=@FX)pj4Nb=O&_>Ui#=hPUE89Gh7F1~ zn`u5&$O$2*T&Y*Fq{~HVI+c|7uJCy$pDD3VzY$3#GSz!zGRmDCy!UwgE<+;smR{#L$VWq+tO>Qn$y(1rOUK_CL z+I`bjsyHyJSLzImMokdbfQd7B;tnHc>g3&eKeNv)Y_`;_eJp6nQ~Ba! zE(`Ih!|F)1(>9yGkE7_4Uko$Jyw?!&hb&PmaJ8XWF9koE7)dz1EA>5R2I}_=WGB** zNI$=3^?OT)Ps2Q8)(Qo;-V|V%{@wY)N-QM%rg5kl_}sC`?pl2K4s2=A)=#O2=tGeE ziM9Rv_byB~Yf&GsSF^)vnQFO|Pif`Mcvsdw;Q+ax#v0xNGu?Chv8M}&1$D&$+@^J` z-`n)2z&2bGJ*fGPuL4p8IN#*TZG(kT4}On@m*Oor9vls~0r|r_K9uS&EKFW2tQ^&^ z)PwgmtT84mx)(!Pd8Xb~GX@7|a$9P5>HXC}gtwVVPo`GqMx2ho`76`jN;${~zUj4G zUi)ZYZoe*3h;ZaY)sw26e6f{k2y%j$S<`ERp;mO{)n%_!F&EMq6qHAtnN3y*La7o3 zqc2-c@{RIfdf)|Pxo=!Y^ERWx8?~g)&hEKy&~Hq5Bf5F8PdbIX-Ywku$Sy5s_-|lK zw|QqM7+98*YDf*R4*5@Wp6rxH41CMdjcB|XBV6x3!e*R=A9P(xkw zCk1dP{Wj+3IkTxaG`z$=S~yp~5{ORbGY*|#vF{tqu+B(oqwFd52}Xe*jOV;b_Ks5Z{GP;y*&p)Sm7L8_ z3FPI=-zap#6RotEV=Wy!@r76Sd~|yE4}W)`%n;Ek+-Wv;VJ3HEq7${A(3bG$utJWyBP`W zRR91mG$dfarEbq*HrqA=U=DgAB!+@yOCU>up;Ij7Nen7*!z8by$7PfCIc8QGpR{k|pefVPxP-mq3AWf?fBX-vLV@i9<-{ z702eFGs z-EOT?n@w+i-;hX61q)i4RqTXnd{jddnbvA3n9{1J3m?1~^65=fGZ>TaJ@MIAG%3I1 z%$zug-#(ubDC-FssUfh%e z$N++3P$H}_z|z>A#ro2NodhNvQ2tE4w=t{nXVU>^aRWN5t_*Y{#$+HbhzoQ6+Pz%0 zJk zVoDJM#RyE|z`4a}Iqg(B(<_C_?vaq$ekcqusO=S&7f3HER#qyk;1 z_UgY^uN7ME`Mdhh;mj+)^-1}?^cwW1E<>I;-u55cKRFQ6(QHy3P@g?{XnptWXuF(` z2riwsX##0p*yd;KBuIWPj)ZPfanG3jx-$S0y{U=YI*GYULLA_)=aoqs2?WN%VrZ70 z!|<-I2IZY2|8?KQ#J=_Gli~Uz6OSf3q*^DJ$>ef9?T=JC{DLv)pF7ZSyH2iN4jC=t z$$QS+>(&4AG(RltR=Xh19(Fl(d^+qbniM3Znz!~xDpigO`5Plbz9i5+kX)1e{Arh&ml_rapUcLOGPOjU3)A>T ztUuGV*QNxO-9RcMT8AlD|K;mu9Ye&%TLa_%Gzr8|Zc9Gd%hbnc7i8rj>)kFzgHEsw zokp#ci3fdlRbqgJyu`4v7foO(OJ+gx#XvAp+|VOcY_x7 z)N(j~j^~t*U&)wx4W(0=li|$6yW01k{=@feJm37AtYM|~+@brM4#PA3B}!3iUA&`J z`SXi&nx$&Rowspp|FN-Cps(Kop5LI~3w`(4SMuy?L-GwsUR2NTni}u#RGf@XsY#W* zfUusYwCw=UlChVfr6wuqE{;5tFng26BtpBD>meI~(IeSKaFKdJfW-H~Ao=FZ()|?pJ{G>x4c*96oOVc zWVL0KOo$pw>w<&2EpzkK9B zj4zIb{;!9IA15=1DcZFB{_gm56RcpaY6?~D`=5BLa(V;2r0*b#`U3qUbT{M`!&lCo zKD4?pJJwezW>Y~sZ)7hVJF>n!)oSDwa+x*~WdJDmYy+jV!)_3p!wW~3lG}g@3Y&qQ z>;=H7r+Oe-NlrHv@a7i3x(4?CdwDRNqVxM+uA3+|tx#&rS`FRwd#eF$l?h~@duHtU zQD0=xXLP$7`vZMJV5LYon&hh5Zl~54a&Vp@zi2CDyat=4yD>7sFSy6Y`bQzXcslP( zw^NMM)+iLxHEPV`@Rtu%OOD4q-cW1Md@2>==a)})XU=u^)gN%ha%mr>4T+3kQdv?= zU}9j`$*7yss;PFlS_^XeIIE&ve#U#aJGVM)s+TJDjHRtp*<&{EVkdQUs83C6)drh( z21|Y`Mtz$8Aw)`$(LJb@nL)OU$}R<~D@)@EIeWBR%!S=1nKHUQ3^>Kn62$wxAXOr& zUQPpB4#~CvE%rJacsI5klH8?+k&F;-BdMjfv5c(@!~l{{j|ubUVX(^keKKWgBNj3q zF8CJ>0dKcj%NCsD&4M?dP1qA2g^I~=q0s}`$iiUUXHe2E(Q|f#PQt+j{V7jqjO6KBK1n04aQUEG^5hR6q=x!VlpEKQuSKN zJgH};-q)=!Kt+v+&Z0^?wQps9e5hTDD^%<$l~-+49X_zUYoJ{(WTJjAW5lUY8RG26 z>>%Ou+qMQrq``vZ-}GER2-qbz87Gi`#mfQl0eAub*b~O+#&JDxgB01rcga*qx`C}c zf!z{$sSVA47VF`m)*junElH#Qbkm*(2(T24kC}?%nNpwu*3nYk|eQL ziMvC0K5$UB9fI9-pGe6S!aZZyGW9x90r^@lcR!=^H8!ls!6!fg;Twv$t9w zToCmZoy?!;q)KxUyGA20N{(SQYKx!s@WthB)ISrqSXvI3)Ajo7dDH9m|Lc{ncGr-#OBt$vK0MA zsAqGwxhkI`SeZ=pddOj?(JUt#67ZpGmhX9|I}+XzA3z#gH7sK6KVcbS($V*1=od91 z3#E|D6(*z7s&Z6|zT{9M!a|0bA{9y{LFPTS>S8-&oA+^!#d6vv>>EhVuC2{}{cFpw z9c?|S&I-=i-Qz9hsn#T8t=BE=Ol{xv5qsltSGR4WLkM0g?A7>c>!QmQ>brR6v{1MS7mwuA?4l}P-0_oDDc^c)yWgJw?l+Vj6Z zx?eo!l4}F%qQw&ZQLT$ro5X!h*-5=3H^Qr=@_3`p-kjeV4BQUhT%0Z=DpevtgOdguutop%)jt`=V< z_$W8KhD~Ro68yu1BWbG!4(ZEL|NxLA|T10nd zJz@=)L@m$RO#!Pyr&Q^5M!jCCW^|Oc-OWYEquw}4+VZ(}DC9J=T3={Bo$Pm+Z2MT# zpi>oD_L&=YQ^w*Mg%oE>Fgh&Nl(pp*S%+w?JdhMFCn;a?sv(?o>~$3C1&cvxOIUn4 z(Vm?ci7g*GwQFjk+gI-X$HlP8yJ6~&rusUGgyVrqdf+ZrZ2e9~+*6P1g>pN`<4&iEa?)e(oz5G&N+nQ%M&C8|I+;KxvB;%hs{8r5u!r`Zz0fO3TV z9y3*U8iAuGF{GmDg2YhU5eLZeT^vcu0aD!QGX!I)h7l;;ehr9B{0Cd`1A8K3}uDWB@kU`j=O}I~I za>cuMue_MOWBKBh)+45j!#}<_RCYc+H28t|QYLf8lFG$KDN^qf6Vr*>bv3OqYBhw~ zrn85ks0?yrTTiHD^b_dIsMRih>G$4x;i+pUk4=|!8utC_b812L#!DZbAL%zU8tnEl zmxx9+m57D|iqpi%Rp2V(tCEsQnOn&V1fs><-Lro^YQV_qWtSvg-!`Y9jetu(W)Tn? z)=%1uofRC~fuy#BV~k*UNue>;T`8>CCLc*(!HP<$cYt}XQU>DUn@%GpC@Hxq;Tl_z z?KS{R(`WN(Jz-3mwXS-UAk1Z_z>&h_`{ufb`%F3-v|R01Iuivy^cB=a1NPU$<$?PT z#DQY@^q~=lFUr--Y|ayMJIt=)bWz)}7y{u_oYx+M%HWHU1Mvdv%$)k4~O(`R-; zHp=NpF_bQ&XEhd;UZXLoA)JODGwwvv?e$crL{ng`lDECTL)a!G%@;U_*3nI~K2N9i z$%TdT^}+o9ZnVY^j}$7yo@_ej6${t=9M93YjDD0KDz-j;CR8%`>_$Vd?TfTL*^1!t z51(DFjU3EAnT#H;PxZGR8ccMQl)RW2?K+Olw?^M&x?ycP+g>e=y?-=$vgnHF)P%~Z z3N_38y3@}seRAYzej`xcH(T*WGa@TQ6E2!&T~L-tZ2b|6$j?GHyz*=|qSPMuChftWeBnK7Jhu99|_P^QaKufqWdrH*{Be(t2 zo3 zd~?^Iw-;MSqm_6eFcEw{r8I^t&lVCN8E_VTeuI9{&;7 zAkO>0z4c@2dHOQc2i8F1u3XGTvT~I}A*-ZRB+(KpguE|hgkE%P#&It?xUX2VdZ}G- zOnVL}PIyRC-VWoj0^-mW8%pq*u+Iug3=;f#>_q=WBNw`Qb!PvnhcwX4OnY*6sWOvF zc%HidOg^cRJHnfHMJLL&G4PJ2GK0K>kr_{?3OYvZm@Qws^F7YvVj}gx=bk=rv@f35 zsb78nAO6QTtMU6E`S;}4PRJjA`3s-DbXpru=byRrrO!%P*{ucYEvV${LWO3a?cOz# zb15jAUG9@Hj8>NN%8GH>z(fR?XK#;-AytoS1aMDU&kjm#@~(>rmnwC2+{)5DQo!Ch z)YyS<4llej_7*YKfW-__r7ItgCQVM(R~18|MFj4Pi~}LiFA-Z zo@rfc+n2h|&XH$zjm_)6qHDn5ur_jLt2Ph`Sh98-NnW`#ttALwI+HM;uY?X*g87?5=d$|LN|@k1c=WYpcI?s&kJi8BbIcN|emq?R*dgMvkC8OJgD~~;M$2n*9%Wr(~=mR>}(DLY!HX;!MWf=g*uvw6@ZzSE4q?pl2Vr z_s%mXngO57!Ra(Iz5Cc8(9^@)^aNn~4W_yKu~bbA~n+MVvcBSn%5@#rTBEz!-SKuvqGLfi5aa!YxKF zO?`0p$M1UV*rU_O5`|8d+c-297|oDl(`(C#BysTQ+b8eUMPGmN9+7FDYd$xX8A+C0 z4Rb=A%DEDh}l`O!BLcExm&}G=+!lL++p}#Ki1R3n6(c9ktz=JA9~r^UovGoHHK@>8w_BY23*OK}+!9 zaBAR-yJN3ii_|94yeDLJByHk(ce1-uH~M4{A+qUm#%i4wQy`s9v`T%M{w~@NmQI+g z`6!BAUw|$FIpZ?OD#d(8P|>xp9lY|5o+XfA0?q|)c?=2AI_ybE(a+As0|tQdc1#7% z({2~RfM!FA;AWO!JIs~*3JVwpC>H9U``FC;97~NU_cNm_tjwX&s|-e;iL!cQ{rS{n zGb8E*Go{x<@T=kC2L@U`QK=F;ne@N>ZyxzLJ zxU%Q@1A-}hi4&40dtz+37PkaOT8WoFR&`ohZhoxTgrDkYPpPN_byJi>cw2fr&VY|!?@;R zr)o&53y^3HNDK#+Qo)^+=)UQG;kdBper-!u3VEc}SfrARkEb~2f`LU2M&r7@L6tjs zfVTx}F4i7T=l!jSDK%-gHI9#zuQnYtA2vI@Mx|QI=p7>#nOp${_nGO{VzF7Q+2u-F zPbgh9rKc4XX?-zaq3F6T+I_IRvU+^{iN#Q6z-x1c_YOG>)$7@Xcy-uUIUhDATh{Y_ zhcW!V{7Cg8nJLZ<#R3uAg<__&=NZM=YmMNjnDZDrq2rdU)F1K+{W-`F{w}Jwb02!o zU5Cmx5SEIaR%cX6)x~qCj&H0lEsVG7QPJx*Ft5EN`vCC?g>3ZYr@#UE42B(OW3Olh zQ#&>Xk_17BppMv3^t4QhY;KJ{FhBvBfK(9pj$4L_4R4QK5imoTuW+D_eX(AIc?*=G zL2#SEwAU=yvBOORIxb-s+bHQc`16TiQa9*u8B+(WR!7>ZHCtmoPNSza8Wk6Fg6UOa zBQsDe$tSE_*e*u=dM95t$gRA}Zc~A=8_0~6vjZz0E2U5y^c~i2ulk`%WC`zVb@paa-7#D6hE6UTxc)au&xr zt86TBA0gWE<8fn$D|F&%=Yk>H5n@cBOZjrAqt0p9wA%fUk1xe6^Oa2UyeaOERjTEz z?QkJiIA_jJCDv>ai~$%q@>8f&x{7;;?uOLM#8AId$u`t3)&8ZKiB2Vy*7^1hm3V;)J ztrDsRz^C*x=C;r2lNXmvQb9Pj!mlEEV)UC!36rtBsceAt3E#KBBXn|W& zUby9G+0z0+P%@*KO6Z3jtlbih*|m1orWYB73P#mX25^SVTAfX$5;8`+%VrWX$$Wpn z<}vAXTC-TrhqA>B$;Kp0hr5RZ*25X%`K1BI<0^M4YE#+}&8auTIIHyn2PS-1nG?eu}W%`7FSMIXq|nP8`|4Iz2krsh0C;sBz}aGOMtN%c`E=;R)=ff#7;RDzN;Hmx`SZ>51iv zgQ;HdDS2ktUkL?w_S@d|f3zd^VS4-B%!~Bgnwu>PjM58TKv87RMF*n0>Z86~vukEa zaP+F{PGO-GYZbgOsEXEX{*4e0X`xEfW)!R?6Rk9oUrF>wr|J`4Pc$^hZ~zd0b-&9! zUyO9p!JtA(Yd3%B4oC1lc4xArhh5(JzCJ>0F0EzjfqLBg!(5ed$!St`%G4cXT7mq` z$whCHe7etNq_hTpWNN&hppX`DV1sBn3z>%#=nv6}_WskfY-86HX_?<=q7M<4@#7c; zU;EPM-~8>Do__59%Z-AAXAMU7H7F(c+E>2x#T&o#i5FjZ_R04=`tXDI-*fjJ=g%Hm z+6DE+P_A7m6>^D?$HtosFg8q<2>*c^VDiVm3KIYdc3VMJaUKH4g%~?hRC#L%jv=F< zq1+BY)63Ps+I*1w)rQ|5snd()dzK0szBlp^d&j?4St~IE98Ve<(_@VtXQJm{fD6)t zlEee=CQR^YO67r^EK;A{(+IFj(RwK7+{+p{uP+$Wv)QJ2I-k|pPmT<`T=xxU3^1zF z?){K1mEb(ImJOzOi-P!yK0@t4MfeQV#%yDS$;RBSmfw2fGatjbyl@A^DD|=magg9;Py;o1l^rYTC)`h%csSb--;N+Go_u;!s&g5qeWR!n-KS ztBJX-#+uve8`apoA|WFwqmfSXP^r-8XO$MCSy{BhASRb@;GU=OP*sf1lk}>D&P&jz zdIN2=mq%&YtIs||T3-0LiT)&EdFnG5pVuz$gDSKhHnr?gz~(1E{OmK2Kl;$Mt5+`H zasK#$y?f?oCr5|zFoIvhWyE(D3V`V5I%(MJaB zGwa2uaUoF)6>TdlYw`tx2{o6l2hS8!YU`PiVTb$LV3L)SwA1mDK9MpzX)PzF%)Ekl z=h8n3yZ<7fZHDT>h!S9$Im@x6n)EUN)B1wThG7~=-!+V3S{Y|z8OPqfHt}JAsX6vf zh3V~@#@jWGw`&@2F|p7S1r}0@-nacS$sB`Qw&M-ou4&}K@I#n&yQXowwhqt&z8VJ2 zyWL1Tan-M_!L=tnUrO@tB%t9y^#8XtjmdWKH`g@wN*WdahD#cQP|_F=|8q(jrJUvM zn#S8TjkjwWZ`U+Jcz?U5QOcp?qOsdGjkjwWZ`U;5u4%ko(|Eh45qGcjI#+JjG~TXh z4E6d!q>c}%M&g!ik5qvSSh-!(i1h_(MWj?jFDr4ortx-7MJY8vmxHH}v;orl{7cA=)Ru6C-{7k7>KmE#KAX#qO>@7d|>-x*Ho zlL{IsTtWY@RnX{M{#UJMTuW5{-zsOkUC;P$t)4M3`>#^Z*thmit7n9}(89gEuE5=H zK8?EV`X^rgt@l6j;HC4&4lQ=ua32@Hone3H<&VDbz9+8Vf8W)+?mU0$*r5Y!%Zm%6 z1NBNV6$yIX=})03UmVXB3p@2=xFT)479Fb7 zVHS`1#alof4@|N8E2hB(~}D(;U0>XfdYO36-Ju{=VY%1z^ z!2JfbUZxB1Sl_l9c<6&vc!)t#47E+xiamCtKfvdle%2<*gTGovlrB zeCx;ZN49=Jy|ML|s$~#rAyIx7Y4Q7C>o=*_w%(Ed1nDXK-!WK(yU-uuKjMIg z4E`&Nmj1WvFQ5XKg0--oKD0Rl|HreorQZ5$)w};yB<%nb_;(rkB=Ivi0u6V8Ka0@j k>E0*Q$RCoy4Gv@)dS~0;^w~y2@HqU&A&|^j;%S8bA1hvK=>Px# diff --git a/plugins/captcha/crypt/fonts/luggerbu.txt b/plugins/captcha/crypt/fonts/luggerbu.txt deleted file mode 100644 index 86b8a44..0000000 --- a/plugins/captcha/crypt/fonts/luggerbu.txt +++ /dev/null @@ -1,24 +0,0 @@ -LuggerBug -Macintosh & Windows TrueType. - -LuggerBug - The lowdown: -This version of LuggerBug is 18 (days) old, It's come of age. Which means it can drink in pubs, vote and watch adult videos. These are, of course, three things which should not be attempted in one day. However, I did just that and following an afternoon shuffling between the pub and the video store, I ended up voting for . . . Alicia Silverstone - -LuggerBug - whats included -Uppercase & Lowercase are the same, numerals and some punctuation. The characters [ ] \ have the numbers 99, 95 and 00 on them for better displaying of prices like £24.99 etc. - -LuggerBug ?! -I was originaly going to call it BuggerLugs, but I though that might be a bit stupid. You may or may not know what 'Buggerlugs' means, well in Scotland it's a semi-effectionate term to describe someone you know quite well, but at the same time, slag them off without any guilt being attached. - -Legal frivolity -1. This lovely font is completely and utterly free, you can use it in any way you see fit. email me if you use it for something useful. -2. Please keep this archive intact along with this readme file. -3. And if you want to put these onto a magazine floppy, CD-Rom, go ahead, as long as you follow (2). - -Paul Reid. -October '97. - -email: whoami@btinternet.com -Site: http://www.btinternet.com/~whoami - -"That night they stayed outside the Asylum and watched TV from inside it." \ No newline at end of file diff --git a/plugins/captcha/crypt/images/.htaccess b/plugins/captcha/crypt/images/.htaccess deleted file mode 100644 index b9f48ac..0000000 --- a/plugins/captcha/crypt/images/.htaccess +++ /dev/null @@ -1,2 +0,0 @@ -Options -Indexes -Allow from all \ No newline at end of file diff --git a/plugins/captcha/crypt/images/Thumbs.db b/plugins/captcha/crypt/images/Thumbs.db deleted file mode 100644 index 7446ecc8060132d3fb08f8d808fd33e0c4f28dc0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19968 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 diff --git a/plugins/captcha/crypt/images/index.html b/plugins/captcha/crypt/images/index.html deleted file mode 100644 index e69de29..0000000 diff --git a/plugins/captcha/crypt/images/reload.png b/plugins/captcha/crypt/images/reload.png deleted file mode 100644 index d4d663d6141324294d64b4e4786e7d46132b6443..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 256 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM0wlfaz7_+i#Ar*{!Cwot1QRHzbY+zAQ zNK{?JqOyfWrH4hOpl` zjJPSR=4B!*(I= - - plugins/captcha/captcha.plugin.php - active - 15 - Captcha - Captcha plugin for Monstra - 1.0.0 - Awilum - http://monstra.org/ - diff --git a/plugins/captcha/install/captcha.uninstall.php b/plugins/captcha/install/captcha.uninstall.php deleted file mode 100644 index e00e10b..0000000 --- a/plugins/captcha/install/captcha.uninstall.php +++ /dev/null @@ -1,4 +0,0 @@ - array( - 'Captcha' => 'Captcha', - 'Captcha plugin for Monstra' => 'Captcha plugin pro Monstra', - 'Captcha code is wrong' => 'Captcha kód je nesprávný', - ) - ); diff --git a/plugins/captcha/languages/de.lang.php b/plugins/captcha/languages/de.lang.php deleted file mode 100644 index 9131bfb..0000000 --- a/plugins/captcha/languages/de.lang.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - 'Captcha' => 'Captcha', - 'Captcha plugin for Monstra' => 'Captcha Plugin für Monstra', - 'Captcha code is wrong' => 'Captcha Code ist falsch', - ) - ); diff --git a/plugins/captcha/languages/en.lang.php b/plugins/captcha/languages/en.lang.php deleted file mode 100644 index b06844e..0000000 --- a/plugins/captcha/languages/en.lang.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - 'Captcha' => 'Captcha', - 'Captcha plugin for Monstra' => 'Captcha plugin for Monstra', - 'Captcha code is wrong' => 'Captcha code is wrong', - ) - ); diff --git a/plugins/captcha/languages/es.lang.php b/plugins/captcha/languages/es.lang.php deleted file mode 100644 index da814ea..0000000 --- a/plugins/captcha/languages/es.lang.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - 'Captcha' => 'Captcha', - 'Captcha plugin for Monstra' => 'Captcha plugin for Monstra', - 'Captcha code is wrong' => 'El código captcha es incorrecto', - ) - ); diff --git a/plugins/captcha/languages/fa.lang.php b/plugins/captcha/languages/fa.lang.php deleted file mode 100644 index 746cf87..0000000 --- a/plugins/captcha/languages/fa.lang.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - 'Captcha' => 'کدامنيتي', - 'Captcha plugin for Monstra' => 'کدامنيتي براي مونسترا', - 'Captcha code is wrong' => 'کدامنيتي اشتباه است', - ) - ); \ No newline at end of file diff --git a/plugins/captcha/languages/fr.lang.php b/plugins/captcha/languages/fr.lang.php deleted file mode 100644 index 25d7157..0000000 --- a/plugins/captcha/languages/fr.lang.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - 'Captcha' => 'Captcha', - 'Captcha plugin for Monstra' => 'Plugin Captcha pour Monstra', - 'Captcha code is wrong' => 'Le code Captcha est erroné', - ) - ); \ No newline at end of file diff --git a/plugins/captcha/languages/id.lang.php b/plugins/captcha/languages/id.lang.php deleted file mode 100644 index 6670c2e..0000000 --- a/plugins/captcha/languages/id.lang.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - 'Captcha' => 'Verifikasi', - 'Captcha plugin for Monstra' => 'Verifikasi plugin untuk Monstra', - 'Captcha code is wrong' => 'Kode Verifikasi salah', - ) - ); diff --git a/plugins/captcha/languages/it.lang.php b/plugins/captcha/languages/it.lang.php deleted file mode 100644 index e43d160..0000000 --- a/plugins/captcha/languages/it.lang.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - 'Captcha' => 'Captcha', - 'Captcha plugin for Monstra' => 'Captcha plugin per Monstra', - 'Captcha code is wrong' => 'Codice captcha è errato', - ) - ); diff --git a/plugins/captcha/languages/ka-ge.lang.php b/plugins/captcha/languages/ka-ge.lang.php deleted file mode 100644 index a6945a9..0000000 --- a/plugins/captcha/languages/ka-ge.lang.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - 'Captcha' => 'Captcha', - 'Captcha plugin for Monstra' => 'Captcha პლáƒáƒ’ინი Monstra-თვის', - 'Captcha code is wrong' => 'Captcha-ზე პáƒáƒ¡áƒ£áƒ®áƒ˜ áƒáƒ áƒáƒ¡áƒ¬áƒáƒ áƒ˜áƒ!', - ) - ); diff --git a/plugins/captcha/languages/lt.lang.php b/plugins/captcha/languages/lt.lang.php deleted file mode 100644 index aa89284..0000000 --- a/plugins/captcha/languages/lt.lang.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - 'Captcha' => 'Saugos kodas', - 'Captcha plugin for Monstra' => 'Saugos kodo papildinys', - 'Captcha code is wrong' => 'Saugos kodas yra neteisingas', - ) - ); diff --git a/plugins/captcha/languages/nl.lang.php b/plugins/captcha/languages/nl.lang.php deleted file mode 100644 index b708ffa..0000000 --- a/plugins/captcha/languages/nl.lang.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - 'Captcha' => 'Captcha', - 'Captcha plugin for Monstra' => 'Captcha Plugin voor Monstra', - 'Captcha code is wrong' => 'Captcha Code is helaas foutief', - ) - ); diff --git a/plugins/captcha/languages/pl.lang.php b/plugins/captcha/languages/pl.lang.php deleted file mode 100644 index 8467172..0000000 --- a/plugins/captcha/languages/pl.lang.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - 'Captcha' => 'Captcha', - 'Captcha plugin for Monstra' => 'Wtyczka Captcha dla systemu Monstra', - 'Captcha code is wrong' => 'NiewÅ‚aÅ›ciwy kod Captcha', - ) - ); diff --git a/plugins/captcha/languages/pt-br.lang.php b/plugins/captcha/languages/pt-br.lang.php deleted file mode 100644 index 2b39253..0000000 --- a/plugins/captcha/languages/pt-br.lang.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - 'Captcha' => 'Captcha', - 'Captcha plugin for Monstra' => 'Plugin de captcha para o Monstra CMS', - 'Captcha code is wrong' => 'O Captcha está errado', - ) - ); diff --git a/plugins/captcha/languages/ru.lang.php b/plugins/captcha/languages/ru.lang.php deleted file mode 100644 index 9f22d48..0000000 --- a/plugins/captcha/languages/ru.lang.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - 'Captcha' => 'Captcha', - 'Captcha plugin for Monstra' => 'Captcha плагин Ð´Ð»Ñ Monstra', - 'Captcha code is wrong' => 'Captcha код неправильный', - ) - ); diff --git a/plugins/captcha/languages/sk.lang.php b/plugins/captcha/languages/sk.lang.php deleted file mode 100644 index 647191c..0000000 --- a/plugins/captcha/languages/sk.lang.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - 'Captcha' => 'Captcha', - 'Captcha plugin for Monstra' => 'Captcha plugin pre Monstra', - 'Captcha code is wrong' => 'Captcha kód je nesprávny', - ) - ); diff --git a/plugins/captcha/languages/sr.lang.php b/plugins/captcha/languages/sr.lang.php deleted file mode 100644 index 6bffc55..0000000 --- a/plugins/captcha/languages/sr.lang.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - 'Captcha' => 'Captcha', - 'Captcha plugin for Monstra' => 'Captcha dodatak za Monstra', - 'Captcha code is wrong' => 'Captcha Kod je pogreÅ¡an', - ) - ); diff --git a/plugins/captcha/languages/tr.lang.php b/plugins/captcha/languages/tr.lang.php deleted file mode 100644 index 35b4fe3..0000000 --- a/plugins/captcha/languages/tr.lang.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - 'Captcha' => 'Captcha/DoÄŸrulama', - 'Captcha plugin for Monstra' => 'Monstra için captcha/doÄŸrulama eklentisi', - 'Captcha code is wrong' => 'DoÄŸrulama kodu yanlış', - ) - ); diff --git a/plugins/captcha/languages/uk.lang.php b/plugins/captcha/languages/uk.lang.php deleted file mode 100644 index 5233c47..0000000 --- a/plugins/captcha/languages/uk.lang.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - 'Captcha' => 'Каптча', - 'Captcha plugin for Monstra' => 'Каптча плагін Ð´Ð»Ñ Monstra', - 'Captcha code is wrong' => 'Код каптчі невірний', - ) - ); diff --git a/plugins/captcha/languages/zh-cn.lang.php b/plugins/captcha/languages/zh-cn.lang.php deleted file mode 100644 index 9e84167..0000000 --- a/plugins/captcha/languages/zh-cn.lang.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - 'Captcha' => '验è¯ç ', - 'Captcha plugin for Monstra' => 'Monstra 验è¯ç æ’ä»¶', - 'Captcha code is wrong' => '验è¯ç é”™è¯¯', - ) - ); diff --git a/plugins/codemirror/LICENSE b/plugins/codemirror/LICENSE deleted file mode 100644 index ef7e7ef..0000000 --- a/plugins/codemirror/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ -GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - {one line to give the program's name and a brief idea of what it does.} - Copyright (C) {year} {name of author} - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - {project} Copyright (C) {year} {fullname} - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/plugins/codemirror/README.md b/plugins/codemirror/README.md deleted file mode 100644 index ef6c4f6..0000000 --- a/plugins/codemirror/README.md +++ /dev/null @@ -1,4 +0,0 @@ -CodeMirror -====================== - -CodeMirror is a versatile text editor implemented in JavaScript for the browser. \ No newline at end of file diff --git a/plugins/codemirror/codemirror.plugin.php b/plugins/codemirror/codemirror.plugin.php deleted file mode 100644 index 0d0f676..0000000 --- a/plugins/codemirror/codemirror.plugin.php +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - '); - - if (Request::get('id') == 'themes' || Request::get('id') == 'snippets' || Request::get('id') == 'emails') { - - if (Request::get('action') == 'edit_styles') { - $mode = 'text/css'; - } else { - $mode = 'application/x-httpd-php'; - } - - echo (''); - } - } -} diff --git a/plugins/codemirror/codemirror/.gitattributes b/plugins/codemirror/codemirror/.gitattributes deleted file mode 100644 index f8bdd60..0000000 --- a/plugins/codemirror/codemirror/.gitattributes +++ /dev/null @@ -1,8 +0,0 @@ -*.txt text -*.js text -*.html text -*.md text -*.json text -*.yml text -*.css text -*.svg text diff --git a/plugins/codemirror/codemirror/.gitignore b/plugins/codemirror/codemirror/.gitignore deleted file mode 100644 index b471fe6..0000000 --- a/plugins/codemirror/codemirror/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -/node_modules -/npm-debug.log -test.html -.tern-* -*~ -*.swp diff --git a/plugins/codemirror/codemirror/.htaccess b/plugins/codemirror/codemirror/.htaccess deleted file mode 100644 index b9f48ac..0000000 --- a/plugins/codemirror/codemirror/.htaccess +++ /dev/null @@ -1,2 +0,0 @@ -Options -Indexes -Allow from all \ No newline at end of file diff --git a/plugins/codemirror/codemirror/.travis.yml b/plugins/codemirror/codemirror/.travis.yml deleted file mode 100644 index baa0031..0000000 --- a/plugins/codemirror/codemirror/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - 0.8 diff --git a/plugins/codemirror/codemirror/AUTHORS b/plugins/codemirror/codemirror/AUTHORS deleted file mode 100644 index 260c13a..0000000 --- a/plugins/codemirror/codemirror/AUTHORS +++ /dev/null @@ -1,255 +0,0 @@ -List of CodeMirror contributors. Updated before every release. - -4r2r -Aaron Brooks -Adam King -adanlobato -Adán Lobato -aeroson -Ahmad Amireh -Ahmad M. Zawawi -ahoward -Akeksandr Motsjonov -Albert Xing -Alexander Pavlov -Alexander Schepanovski -alexey-k -Alex Piggott -Amy -Ananya Sen -AndersMad -Andre von Houck -Andrey Lushnikov -Andy Kimball -Andy Li -angelozerr -angelo.zerr@gmail.com -Ankit Ahuja -Ansel Santosa -Anthony Grimes -areos -Atul Bhouraskar -Aurelian Oancea -Bastian Müller -benbro -Benjamin DeCoste -Ben Keen -boomyjee -borawjm -Brandon Frohs -Brett Zamir -Brian Sletten -Bruce Mitchener -Chandra Sekhar Pydi -Charles Skelton -Chris Coyier -Chris Granger -Chris Morgan -Christopher Brown -ciaranj -CodeAnimal -ComFreek -dagsta -Dan Heberden -Daniel, Dao Quang Minh -Daniel Faust -Daniel Huigens -Daniel Neel -Daniel Parnell -Danny Yoo -David Mignot -David Pathakjee -deebugger -Deep Thought -Dominator008 -Domizio Demichelis -Drew Bratcher -Drew Hintz -Drew Khoury -Dror BG -duralog -edsharp -ekhaled -Eric Allam -eustas -Fauntleroy -fbuchinger -feizhang365 -Felipe Lalanne -Felix Raab -Filip Noetzel -flack -ForbesLindesay -Ford_Lawnmower -Gabriel Nahmias -galambalazs -Gautam Mehta -Glenn Jorde -Glenn Ruehle -Golevka -Gordon Smith -greengiant -Guillaume MasseÌ -Guillaume Massé -Hans Engel -Hardest -Hasan Karahan -Hocdoc -Ian Beck -Ian Wehrman -Ian Wetherbee -Ice White -ICHIKAWA, Yuji -Ingo Richter -Irakli Gozalishvili -Ivan Kurnosov -Jacob Lee -Jakub Vrana -James Campos -James Thorne -Jamie Hill -Jan Jongboom -jankeromnes -Jan Keromnes -Jan T. Sott -Jason -Jason Grout -Jason Johnston -Jason San Jose -Jason Siefken -Jean Boussier -jeffkenton -Jeff Pickhardt -jem (graphite) -Jochen Berger -John Connor -John Lees-Miller -John Snelson -jongalloway -Joost-Wim Boekesteijn -Joseph Pecoraro -Joshua Newman -jots -Juan Benavides Romero -Jucovschi Constantin -jwallers@gmail.com -kaniga -Ken Newman -Ken Rockot -Kevin Sawicki -Klaus Silveira -Koh Zi Han, Cliff -komakino -Konstantin Lopuhin -koops -ks-ifware -kubelsmieci -Lanny -leaf corcoran -Leonya Khachaturov -Liam Newman -LM -Lorenzo Stoakes -lynschinzer -Maksim Lin -Maksym Taran -Marat Dreizin -Marco Aurélio -Marijn Haverbeke -Mario Pietsch -Mark Lentczner -Martin Balek -Martín Gaitán -Mason Malone -Mateusz Paprocki -mats cronqvist -Matthew Beale -Matthias BUSSONNIER -Matt McDonald -Matt Pass -Matt Sacks -Maximilian Hils -Max Kirsch -mbarkhau -Metatheos -Micah Dubinko -Michael Lehenbauer -Michael Zhou -Mighty Guava -Miguel Castillo -Mike -Mike Brevoort -Mike Diaz -Mike Ivanov -Mike Kadin -MinRK -misfo -mps -Narciso Jaramillo -Nathan Williams -nerbert -nguillaumin -Niels van Groningen -Nikita Beloglazov -Nikita Vasilyev -nlwillia -pablo -Page -Patrick Strawderman -Paul Garvin -Paul Ivanov -Pavel Feldman -PaweÅ‚ Bartkiewicz -peteguhl -peterkroon -Peter Kroon -prasanthj -Prasanth J -Rahul -Randy Edmunds -Richard Z.H. Wang -robertop23 -Robert Plummer -Ruslan Osmanov -sabaca -Samuel Ainsworth -sandeepshetty -santec -Sascha Peilicke -satchmorun -sathyamoorthi -SCLINIC\jdecker -shaund -shaun gilchrist -Shmuel Englard -sonson -spastorelli -Stas Kobzar -Stefan Borsje -Steffen Beyer -Steve O'Hara -stoskov -Tarmil -tfjgeorge -Thaddee Tyl -think -Thomas Dvornik -Thomas Schmid -Tim Baumann -Timothy Farrell -Timothy Hatcher -TobiasBg -Tomas-A -Tomas Varaneckas -Tom Erik Støwer -Tom MacWright -Tony Jian -Vestimir Markov -vf -Volker Mische -William Jamieson -Wojtek Ptak -Xavier Mendez -Yunchi Luo -Yuvi Panda -Zachary Dremann diff --git a/plugins/codemirror/codemirror/CONTRIBUTING.md b/plugins/codemirror/codemirror/CONTRIBUTING.md deleted file mode 100644 index 8938f62..0000000 --- a/plugins/codemirror/codemirror/CONTRIBUTING.md +++ /dev/null @@ -1,72 +0,0 @@ -# How to contribute - -- [Getting help](#getting-help-) -- [Submitting bug reports](#submitting-bug-reports-) -- [Contributing code](#contributing-code-) - -## Getting help - -Community discussion, questions, and informal bug reporting is done on the -[CodeMirror Google group](http://groups.google.com/group/codemirror). - -## Submitting bug reports - -The preferred way to report bugs is to use the -[GitHub issue tracker](http://github.com/marijnh/CodeMirror/issues). Before -reporting a bug, read these pointers. - -**Note:** The issue tracker is for *bugs*, not requests for help. Questions -should be asked on the -[CodeMirror Google group](http://groups.google.com/group/codemirror) instead. - -### Reporting bugs effectively - -- CodeMirror is maintained by volunteers. They don't owe you anything, so be - polite. Reports with an indignant or belligerent tone tend to be moved to the - bottom of the pile. - -- Include information about **the browser in which the problem occurred**. Even - if you tested several browsers, and the problem occurred in all of them, - mention this fact in the bug report. Also include browser version numbers and - the operating system that you're on. - -- Mention which release of CodeMirror you're using. Preferably, try also with - the current development snapshot, to ensure the problem has not already been - fixed. - -- Mention very precisely what went wrong. "X is broken" is not a good bug - report. What did you expect to happen? What happened instead? Describe the - exact steps a maintainer has to take to make the problem occur. We can not - fix something that we can not observe. - -- If the problem can not be reproduced in any of the demos included in the - CodeMirror distribution, please provide an HTML document that demonstrates - the problem. The best way to do this is to go to - [jsbin.com](http://jsbin.com/ihunin/edit), enter it there, press save, and - include the resulting link in your bug report. - -## Contributing code - -- Make sure you have a [GitHub Account](https://github.com/signup/free) -- Fork [CodeMirror](https://github.com/marijnh/CodeMirror/) - ([how to fork a repo](https://help.github.com/articles/fork-a-repo)) -- Make your changes -- If your changes are easy to test or likely to regress, add tests. - Tests for the core go into `test/test.js`, some modes have their own - test suite under `mode/XXX/test.js`. Feel free to add new test - suites to modes that don't have one yet (be sure to link the new - tests into `test/index.html`). -- Follow the general code style of the rest of the project (see - below). Run `bin/lint` to verify that the linter is happy. -- Make sure all tests pass. Visit `test/index.html` in your browser to - run them. -- Submit a pull request -([how to create a pull request](https://help.github.com/articles/fork-a-repo)) - -### Coding standards - -- 2 spaces per indentation level, no tabs. -- Include semicolons after statements. -- Note that the linter (`bin/lint`) which is run after each commit - complains about unused variables and functions. Prefix their names - with an underscore to muffle it. diff --git a/plugins/codemirror/codemirror/LICENSE b/plugins/codemirror/codemirror/LICENSE deleted file mode 100644 index 442d11c..0000000 --- a/plugins/codemirror/codemirror/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2013 by Marijn Haverbeke and others - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/plugins/codemirror/codemirror/README.md b/plugins/codemirror/codemirror/README.md deleted file mode 100644 index 61f6b64..0000000 --- a/plugins/codemirror/codemirror/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# CodeMirror -[![Build Status](https://secure.travis-ci.org/marijnh/CodeMirror.png?branch=master)](http://travis-ci.org/marijnh/CodeMirror) -[![NPM version](https://badge.fury.io/js/codemirror.png)](http://badge.fury.io/js/codemirror) - -CodeMirror is a JavaScript component that provides a code editor in -the browser. When a mode is available for the language you are coding -in, it will color your code, and optionally help with indentation. - -The project page is http://codemirror.net -The manual is at http://codemirror.net/doc/manual.html -The contributing guidelines are in [CONTRIBUTING.md](https://github.com/marijnh/CodeMirror/blob/master/CONTRIBUTING.md) diff --git a/plugins/codemirror/codemirror/addon/comment/comment.js b/plugins/codemirror/codemirror/addon/comment/comment.js deleted file mode 100644 index cd2123e..0000000 --- a/plugins/codemirror/codemirror/addon/comment/comment.js +++ /dev/null @@ -1,145 +0,0 @@ -(function() { - "use strict"; - - var noOptions = {}; - var nonWS = /[^\s\u00a0]/; - var Pos = CodeMirror.Pos; - - function firstNonWS(str) { - var found = str.search(nonWS); - return found == -1 ? 0 : found; - } - - CodeMirror.commands.toggleComment = function(cm) { - var from = cm.getCursor("start"), to = cm.getCursor("end"); - cm.uncomment(from, to) || cm.lineComment(from, to); - }; - - CodeMirror.defineExtension("lineComment", function(from, to, options) { - if (!options) options = noOptions; - var self = this, mode = self.getModeAt(from); - var commentString = options.lineComment || mode.lineComment; - if (!commentString) { - if (options.blockCommentStart || mode.blockCommentStart) { - options.fullLines = true; - self.blockComment(from, to, options); - } - return; - } - var firstLine = self.getLine(from.line); - if (firstLine == null) return; - var end = Math.min(to.ch != 0 || to.line == from.line ? to.line + 1 : to.line, self.lastLine() + 1); - var pad = options.padding == null ? " " : options.padding; - var blankLines = options.commentBlankLines || from.line == to.line; - - self.operation(function() { - if (options.indent) { - var baseString = firstLine.slice(0, firstNonWS(firstLine)); - for (var i = from.line; i < end; ++i) { - var line = self.getLine(i), cut = baseString.length; - if (!blankLines && !nonWS.test(line)) continue; - if (line.slice(0, cut) != baseString) cut = firstNonWS(line); - self.replaceRange(baseString + commentString + pad, Pos(i, 0), Pos(i, cut)); - } - } else { - for (var i = from.line; i < end; ++i) { - if (blankLines || nonWS.test(self.getLine(i))) - self.replaceRange(commentString + pad, Pos(i, 0)); - } - } - }); - }); - - CodeMirror.defineExtension("blockComment", function(from, to, options) { - if (!options) options = noOptions; - var self = this, mode = self.getModeAt(from); - var startString = options.blockCommentStart || mode.blockCommentStart; - var endString = options.blockCommentEnd || mode.blockCommentEnd; - if (!startString || !endString) { - if ((options.lineComment || mode.lineComment) && options.fullLines != false) - self.lineComment(from, to, options); - return; - } - - var end = Math.min(to.line, self.lastLine()); - if (end != from.line && to.ch == 0 && nonWS.test(self.getLine(end))) --end; - - var pad = options.padding == null ? " " : options.padding; - if (from.line > end) return; - - self.operation(function() { - if (options.fullLines != false) { - var lastLineHasText = nonWS.test(self.getLine(end)); - self.replaceRange(pad + endString, Pos(end)); - self.replaceRange(startString + pad, Pos(from.line, 0)); - var lead = options.blockCommentLead || mode.blockCommentLead; - if (lead != null) for (var i = from.line + 1; i <= end; ++i) - if (i != end || lastLineHasText) - self.replaceRange(lead + pad, Pos(i, 0)); - } else { - self.replaceRange(endString, to); - self.replaceRange(startString, from); - } - }); - }); - - CodeMirror.defineExtension("uncomment", function(from, to, options) { - if (!options) options = noOptions; - var self = this, mode = self.getModeAt(from); - var end = Math.min(to.line, self.lastLine()), start = Math.min(from.line, end); - - // Try finding line comments - var lineString = options.lineComment || mode.lineComment, lines = []; - var pad = options.padding == null ? " " : options.padding, didSomething; - lineComment: { - if (!lineString) break lineComment; - for (var i = start; i <= end; ++i) { - var line = self.getLine(i); - var found = line.indexOf(lineString); - if (found == -1 && (i != end || i == start) && nonWS.test(line)) break lineComment; - if (i != start && found > -1 && nonWS.test(line.slice(0, found))) break lineComment; - lines.push(line); - } - self.operation(function() { - for (var i = start; i <= end; ++i) { - var line = lines[i - start]; - var pos = line.indexOf(lineString), endPos = pos + lineString.length; - if (pos < 0) continue; - if (line.slice(endPos, endPos + pad.length) == pad) endPos += pad.length; - didSomething = true; - self.replaceRange("", Pos(i, pos), Pos(i, endPos)); - } - }); - if (didSomething) return true; - } - - // Try block comments - var startString = options.blockCommentStart || mode.blockCommentStart; - var endString = options.blockCommentEnd || mode.blockCommentEnd; - if (!startString || !endString) return false; - var lead = options.blockCommentLead || mode.blockCommentLead; - var startLine = self.getLine(start), endLine = end == start ? startLine : self.getLine(end); - var open = startLine.indexOf(startString), close = endLine.lastIndexOf(endString); - if (close == -1 && start != end) { - endLine = self.getLine(--end); - close = endLine.lastIndexOf(endString); - } - if (open == -1 || close == -1) return false; - - self.operation(function() { - self.replaceRange("", Pos(end, close - (pad && endLine.slice(close - pad.length, close) == pad ? pad.length : 0)), - Pos(end, close + endString.length)); - var openEnd = open + startString.length; - if (pad && startLine.slice(openEnd, openEnd + pad.length) == pad) openEnd += pad.length; - self.replaceRange("", Pos(start, open), Pos(start, openEnd)); - if (lead) for (var i = start + 1; i <= end; ++i) { - var line = self.getLine(i), found = line.indexOf(lead); - if (found == -1 || nonWS.test(line.slice(0, found))) continue; - var foundEnd = found + lead.length; - if (pad && line.slice(foundEnd, foundEnd + pad.length) == pad) foundEnd += pad.length; - self.replaceRange("", Pos(i, found), Pos(i, foundEnd)); - } - }); - return true; - }); -})(); diff --git a/plugins/codemirror/codemirror/addon/comment/continuecomment.js b/plugins/codemirror/codemirror/addon/comment/continuecomment.js deleted file mode 100644 index 94e5a37..0000000 --- a/plugins/codemirror/codemirror/addon/comment/continuecomment.js +++ /dev/null @@ -1,54 +0,0 @@ -(function() { - var modes = ["clike", "css", "javascript"]; - for (var i = 0; i < modes.length; ++i) - CodeMirror.extendMode(modes[i], {blockCommentContinue: " * "}); - - function continueComment(cm) { - var pos = cm.getCursor(), token = cm.getTokenAt(pos); - if (token.type != "comment") return CodeMirror.Pass; - var mode = CodeMirror.innerMode(cm.getMode(), token.state).mode; - - var insert; - if (mode.blockCommentStart && mode.blockCommentContinue) { - var end = token.string.indexOf(mode.blockCommentEnd); - var full = cm.getRange(CodeMirror.Pos(pos.line, 0), CodeMirror.Pos(pos.line, token.end)), found; - if (end != -1 && end == token.string.length - mode.blockCommentEnd.length) { - // Comment ended, don't continue it - } else if (token.string.indexOf(mode.blockCommentStart) == 0) { - insert = full.slice(0, token.start); - if (!/^\s*$/.test(insert)) { - insert = ""; - for (var i = 0; i < token.start; ++i) insert += " "; - } - } else if ((found = full.indexOf(mode.blockCommentContinue)) != -1 && - found + mode.blockCommentContinue.length > token.start && - /^\s*$/.test(full.slice(0, found))) { - insert = full.slice(0, found); - } - if (insert != null) insert += mode.blockCommentContinue; - } - if (insert == null && mode.lineComment) { - var line = cm.getLine(pos.line), found = line.indexOf(mode.lineComment); - if (found > -1) { - insert = line.slice(0, found); - if (/\S/.test(insert)) insert = null; - else insert += mode.lineComment + line.slice(found + mode.lineComment.length).match(/^\s*/)[0]; - } - } - - if (insert != null) - cm.replaceSelection("\n" + insert, "end"); - else - return CodeMirror.Pass; - } - - CodeMirror.defineOption("continueComments", null, function(cm, val, prev) { - if (prev && prev != CodeMirror.Init) - cm.removeKeyMap("continueComment"); - if (val) { - var map = {name: "continueComment"}; - map[typeof val == "string" ? val : "Enter"] = continueComment; - cm.addKeyMap(map); - } - }); -})(); diff --git a/plugins/codemirror/codemirror/addon/dialog/dialog.css b/plugins/codemirror/codemirror/addon/dialog/dialog.css deleted file mode 100644 index 2e7c0fc..0000000 --- a/plugins/codemirror/codemirror/addon/dialog/dialog.css +++ /dev/null @@ -1,32 +0,0 @@ -.CodeMirror-dialog { - position: absolute; - left: 0; right: 0; - background: white; - z-index: 15; - padding: .1em .8em; - overflow: hidden; - color: #333; -} - -.CodeMirror-dialog-top { - border-bottom: 1px solid #eee; - top: 0; -} - -.CodeMirror-dialog-bottom { - border-top: 1px solid #eee; - bottom: 0; -} - -.CodeMirror-dialog input { - border: none; - outline: none; - background: transparent; - width: 20em; - color: inherit; - font-family: monospace; -} - -.CodeMirror-dialog button { - font-size: 70%; -} diff --git a/plugins/codemirror/codemirror/addon/dialog/dialog.js b/plugins/codemirror/codemirror/addon/dialog/dialog.js deleted file mode 100644 index 499964f..0000000 --- a/plugins/codemirror/codemirror/addon/dialog/dialog.js +++ /dev/null @@ -1,121 +0,0 @@ -// Open simple dialogs on top of an editor. Relies on dialog.css. - -(function() { - function dialogDiv(cm, template, bottom) { - var wrap = cm.getWrapperElement(); - var dialog; - dialog = wrap.appendChild(document.createElement("div")); - if (bottom) { - dialog.className = "CodeMirror-dialog CodeMirror-dialog-bottom"; - } else { - dialog.className = "CodeMirror-dialog CodeMirror-dialog-top"; - } - if (typeof template == "string") { - dialog.innerHTML = template; - } else { // Assuming it's a detached DOM element. - dialog.appendChild(template); - } - return dialog; - } - - function closeNotification(cm, newVal) { - if (cm.state.currentNotificationClose) - cm.state.currentNotificationClose(); - cm.state.currentNotificationClose = newVal; - } - - CodeMirror.defineExtension("openDialog", function(template, callback, options) { - closeNotification(this, null); - var dialog = dialogDiv(this, template, options && options.bottom); - var closed = false, me = this; - function close() { - if (closed) return; - closed = true; - dialog.parentNode.removeChild(dialog); - } - var inp = dialog.getElementsByTagName("input")[0], button; - if (inp) { - CodeMirror.on(inp, "keydown", function(e) { - if (options && options.onKeyDown && options.onKeyDown(e, inp.value, close)) { return; } - if (e.keyCode == 13 || e.keyCode == 27) { - CodeMirror.e_stop(e); - close(); - me.focus(); - if (e.keyCode == 13) callback(inp.value); - } - }); - if (options && options.onKeyUp) { - CodeMirror.on(inp, "keyup", function(e) {options.onKeyUp(e, inp.value, close);}); - } - if (options && options.value) inp.value = options.value; - inp.focus(); - CodeMirror.on(inp, "blur", close); - } else if (button = dialog.getElementsByTagName("button")[0]) { - CodeMirror.on(button, "click", function() { - close(); - me.focus(); - }); - button.focus(); - CodeMirror.on(button, "blur", close); - } - return close; - }); - - CodeMirror.defineExtension("openConfirm", function(template, callbacks, options) { - closeNotification(this, null); - var dialog = dialogDiv(this, template, options && options.bottom); - var buttons = dialog.getElementsByTagName("button"); - var closed = false, me = this, blurring = 1; - function close() { - if (closed) return; - closed = true; - dialog.parentNode.removeChild(dialog); - me.focus(); - } - buttons[0].focus(); - for (var i = 0; i < buttons.length; ++i) { - var b = buttons[i]; - (function(callback) { - CodeMirror.on(b, "click", function(e) { - CodeMirror.e_preventDefault(e); - close(); - if (callback) callback(me); - }); - })(callbacks[i]); - CodeMirror.on(b, "blur", function() { - --blurring; - setTimeout(function() { if (blurring <= 0) close(); }, 200); - }); - CodeMirror.on(b, "focus", function() { ++blurring; }); - } - }); - - /* - * openNotification - * Opens a notification, that can be closed with an optional timer - * (default 5000ms timer) and always closes on click. - * - * If a notification is opened while another is opened, it will close the - * currently opened one and open the new one immediately. - */ - CodeMirror.defineExtension("openNotification", function(template, options) { - closeNotification(this, close); - var dialog = dialogDiv(this, template, options && options.bottom); - var duration = options && (options.duration === undefined ? 5000 : options.duration); - var closed = false, doneTimer; - - function close() { - if (closed) return; - closed = true; - clearTimeout(doneTimer); - dialog.parentNode.removeChild(dialog); - } - - CodeMirror.on(dialog, 'click', function(e) { - CodeMirror.e_preventDefault(e); - close(); - }); - if (duration) - doneTimer = setTimeout(close, options.duration); - }); -})(); diff --git a/plugins/codemirror/codemirror/addon/display/fullscreen.css b/plugins/codemirror/codemirror/addon/display/fullscreen.css deleted file mode 100644 index 437acd8..0000000 --- a/plugins/codemirror/codemirror/addon/display/fullscreen.css +++ /dev/null @@ -1,6 +0,0 @@ -.CodeMirror-fullscreen { - position: fixed; - top: 0; left: 0; right: 0; bottom: 0; - height: auto; - z-index: 9; -} diff --git a/plugins/codemirror/codemirror/addon/display/fullscreen.js b/plugins/codemirror/codemirror/addon/display/fullscreen.js deleted file mode 100644 index a442f6a..0000000 --- a/plugins/codemirror/codemirror/addon/display/fullscreen.js +++ /dev/null @@ -1,31 +0,0 @@ -(function() { - "use strict"; - - CodeMirror.defineOption("fullScreen", false, function(cm, val, old) { - if (old == CodeMirror.Init) old = false; - if (!old == !val) return; - if (val) setFullscreen(cm); - else setNormal(cm); - }); - - function setFullscreen(cm) { - var wrap = cm.getWrapperElement(); - cm.state.fullScreenRestore = {scrollTop: window.pageYOffset, scrollLeft: window.pageXOffset, - width: wrap.style.width, height: wrap.style.height}; - wrap.style.width = ""; - wrap.style.height = "auto"; - wrap.className += " CodeMirror-fullscreen"; - document.documentElement.style.overflow = "hidden"; - cm.refresh(); - } - - function setNormal(cm) { - var wrap = cm.getWrapperElement(); - wrap.className = wrap.className.replace(/\s*CodeMirror-fullscreen\b/, ""); - document.documentElement.style.overflow = ""; - var info = cm.state.fullScreenRestore; - wrap.style.width = info.width; wrap.style.height = info.height; - window.scrollTo(info.scrollLeft, info.scrollTop); - cm.refresh(); - } -})(); diff --git a/plugins/codemirror/codemirror/addon/display/placeholder.js b/plugins/codemirror/codemirror/addon/display/placeholder.js deleted file mode 100644 index 748afe7..0000000 --- a/plugins/codemirror/codemirror/addon/display/placeholder.js +++ /dev/null @@ -1,48 +0,0 @@ -(function() { - CodeMirror.defineOption("placeholder", "", function(cm, val, old) { - var prev = old && old != CodeMirror.Init; - if (val && !prev) { - cm.on("blur", onBlur); - cm.on("change", onChange); - onChange(cm); - } else if (!val && prev) { - cm.off("blur", onBlur); - cm.off("change", onChange); - clearPlaceholder(cm); - var wrapper = cm.getWrapperElement(); - wrapper.className = wrapper.className.replace(" CodeMirror-empty", ""); - } - - if (val && !cm.hasFocus()) onBlur(cm); - }); - - function clearPlaceholder(cm) { - if (cm.state.placeholder) { - cm.state.placeholder.parentNode.removeChild(cm.state.placeholder); - cm.state.placeholder = null; - } - } - function setPlaceholder(cm) { - clearPlaceholder(cm); - var elt = cm.state.placeholder = document.createElement("pre"); - elt.style.cssText = "height: 0; overflow: visible"; - elt.className = "CodeMirror-placeholder"; - elt.appendChild(document.createTextNode(cm.getOption("placeholder"))); - cm.display.lineSpace.insertBefore(elt, cm.display.lineSpace.firstChild); - } - - function onBlur(cm) { - if (isEmpty(cm)) setPlaceholder(cm); - } - function onChange(cm) { - var wrapper = cm.getWrapperElement(), empty = isEmpty(cm); - wrapper.className = wrapper.className.replace(" CodeMirror-empty", "") + (empty ? " CodeMirror-empty" : ""); - - if (empty) setPlaceholder(cm); - else clearPlaceholder(cm); - } - - function isEmpty(cm) { - return (cm.lineCount() === 1) && (cm.getLine(0) === ""); - } -})(); diff --git a/plugins/codemirror/codemirror/addon/edit/closebrackets.js b/plugins/codemirror/codemirror/addon/edit/closebrackets.js deleted file mode 100644 index 88718b7..0000000 --- a/plugins/codemirror/codemirror/addon/edit/closebrackets.js +++ /dev/null @@ -1,82 +0,0 @@ -(function() { - var DEFAULT_BRACKETS = "()[]{}''\"\""; - var DEFAULT_EXPLODE_ON_ENTER = "[]{}"; - var SPACE_CHAR_REGEX = /\s/; - - CodeMirror.defineOption("autoCloseBrackets", false, function(cm, val, old) { - if (old != CodeMirror.Init && old) - cm.removeKeyMap("autoCloseBrackets"); - if (!val) return; - var pairs = DEFAULT_BRACKETS, explode = DEFAULT_EXPLODE_ON_ENTER; - if (typeof val == "string") pairs = val; - else if (typeof val == "object") { - if (val.pairs != null) pairs = val.pairs; - if (val.explode != null) explode = val.explode; - } - var map = buildKeymap(pairs); - if (explode) map.Enter = buildExplodeHandler(explode); - cm.addKeyMap(map); - }); - - function charsAround(cm, pos) { - var str = cm.getRange(CodeMirror.Pos(pos.line, pos.ch - 1), - CodeMirror.Pos(pos.line, pos.ch + 1)); - return str.length == 2 ? str : null; - } - - function buildKeymap(pairs) { - var map = { - name : "autoCloseBrackets", - Backspace: function(cm) { - if (cm.somethingSelected()) return CodeMirror.Pass; - var cur = cm.getCursor(), around = charsAround(cm, cur); - if (around && pairs.indexOf(around) % 2 == 0) - cm.replaceRange("", CodeMirror.Pos(cur.line, cur.ch - 1), CodeMirror.Pos(cur.line, cur.ch + 1)); - else - return CodeMirror.Pass; - } - }; - var closingBrackets = ""; - for (var i = 0; i < pairs.length; i += 2) (function(left, right) { - if (left != right) closingBrackets += right; - function surround(cm) { - var selection = cm.getSelection(); - cm.replaceSelection(left + selection + right); - } - function maybeOverwrite(cm) { - var cur = cm.getCursor(), ahead = cm.getRange(cur, CodeMirror.Pos(cur.line, cur.ch + 1)); - if (ahead != right || cm.somethingSelected()) return CodeMirror.Pass; - else cm.execCommand("goCharRight"); - } - map["'" + left + "'"] = function(cm) { - if (left == "'" && cm.getTokenAt(cm.getCursor()).type == "comment") - return CodeMirror.Pass; - if (cm.somethingSelected()) return surround(cm); - if (left == right && maybeOverwrite(cm) != CodeMirror.Pass) return; - var cur = cm.getCursor(), ahead = CodeMirror.Pos(cur.line, cur.ch + 1); - var line = cm.getLine(cur.line), nextChar = line.charAt(cur.ch), curChar = cur.ch > 0 ? line.charAt(cur.ch - 1) : ""; - if (left == right && CodeMirror.isWordChar(curChar)) - return CodeMirror.Pass; - if (line.length == cur.ch || closingBrackets.indexOf(nextChar) >= 0 || SPACE_CHAR_REGEX.test(nextChar)) - cm.replaceSelection(left + right, {head: ahead, anchor: ahead}); - else - return CodeMirror.Pass; - }; - if (left != right) map["'" + right + "'"] = maybeOverwrite; - })(pairs.charAt(i), pairs.charAt(i + 1)); - return map; - } - - function buildExplodeHandler(pairs) { - return function(cm) { - var cur = cm.getCursor(), around = charsAround(cm, cur); - if (!around || pairs.indexOf(around) % 2 != 0) return CodeMirror.Pass; - cm.operation(function() { - var newPos = CodeMirror.Pos(cur.line + 1, 0); - cm.replaceSelection("\n\n", {anchor: newPos, head: newPos}, "+input"); - cm.indentLine(cur.line + 1, null, true); - cm.indentLine(cur.line + 2, null, true); - }); - }; - } -})(); diff --git a/plugins/codemirror/codemirror/addon/edit/closetag.js b/plugins/codemirror/codemirror/addon/edit/closetag.js deleted file mode 100644 index 1da89ba..0000000 --- a/plugins/codemirror/codemirror/addon/edit/closetag.js +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Tag-closer extension for CodeMirror. - * - * This extension adds an "autoCloseTags" option that can be set to - * either true to get the default behavior, or an object to further - * configure its behavior. - * - * These are supported options: - * - * `whenClosing` (default true) - * Whether to autoclose when the '/' of a closing tag is typed. - * `whenOpening` (default true) - * Whether to autoclose the tag when the final '>' of an opening - * tag is typed. - * `dontCloseTags` (default is empty tags for HTML, none for XML) - * An array of tag names that should not be autoclosed. - * `indentTags` (default is block tags for HTML, none for XML) - * An array of tag names that should, when opened, cause a - * blank line to be added inside the tag, and the blank line and - * closing line to be indented. - * - * See demos/closetag.html for a usage example. - */ - -(function() { - CodeMirror.defineOption("autoCloseTags", false, function(cm, val, old) { - if (old != CodeMirror.Init && old) - cm.removeKeyMap("autoCloseTags"); - if (!val) return; - var map = {name: "autoCloseTags"}; - if (typeof val != "object" || val.whenClosing) - map["'/'"] = function(cm) { return autoCloseSlash(cm); }; - if (typeof val != "object" || val.whenOpening) - map["'>'"] = function(cm) { return autoCloseGT(cm); }; - cm.addKeyMap(map); - }); - - var htmlDontClose = ["area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", - "source", "track", "wbr"]; - var htmlIndent = ["applet", "blockquote", "body", "button", "div", "dl", "fieldset", "form", "frameset", "h1", "h2", "h3", "h4", - "h5", "h6", "head", "html", "iframe", "layer", "legend", "object", "ol", "p", "select", "table", "ul"]; - - function autoCloseGT(cm) { - var pos = cm.getCursor(), tok = cm.getTokenAt(pos); - var inner = CodeMirror.innerMode(cm.getMode(), tok.state), state = inner.state; - if (inner.mode.name != "xml" || !state.tagName) return CodeMirror.Pass; - - var opt = cm.getOption("autoCloseTags"), html = inner.mode.configuration == "html"; - var dontCloseTags = (typeof opt == "object" && opt.dontCloseTags) || (html && htmlDontClose); - var indentTags = (typeof opt == "object" && opt.indentTags) || (html && htmlIndent); - - var tagName = state.tagName; - if (tok.end > pos.ch) tagName = tagName.slice(0, tagName.length - tok.end + pos.ch); - var lowerTagName = tagName.toLowerCase(); - // Don't process the '>' at the end of an end-tag or self-closing tag - if (tok.type == "string" && (tok.end != pos.ch || !/[\"\']/.test(tok.string.charAt(tok.string.length - 1)) || tok.string.length == 1) || - tok.type == "tag" && state.type == "closeTag" || - tok.string.indexOf("/") == (tok.string.length - 1) || // match something like - dontCloseTags && indexOf(dontCloseTags, lowerTagName) > -1) - return CodeMirror.Pass; - - var doIndent = indentTags && indexOf(indentTags, lowerTagName) > -1; - var curPos = doIndent ? CodeMirror.Pos(pos.line + 1, 0) : CodeMirror.Pos(pos.line, pos.ch + 1); - cm.replaceSelection(">" + (doIndent ? "\n\n" : "") + "", - {head: curPos, anchor: curPos}); - if (doIndent) { - cm.indentLine(pos.line + 1); - cm.indentLine(pos.line + 2); - } - } - - function autoCloseSlash(cm) { - var pos = cm.getCursor(), tok = cm.getTokenAt(pos); - var inner = CodeMirror.innerMode(cm.getMode(), tok.state), state = inner.state; - if (tok.type == "string" || tok.string.charAt(0) != "<" || - tok.start != pos.ch - 1 || inner.mode.name != "xml") - return CodeMirror.Pass; - - var tagName = state.context && state.context.tagName; - if (tagName) cm.replaceSelection("/" + tagName + ">", "end"); - } - - function indexOf(collection, elt) { - if (collection.indexOf) return collection.indexOf(elt); - for (var i = 0, e = collection.length; i < e; ++i) - if (collection[i] == elt) return i; - return -1; - } -})(); diff --git a/plugins/codemirror/codemirror/addon/edit/continuelist.js b/plugins/codemirror/codemirror/addon/edit/continuelist.js deleted file mode 100644 index 826d17d..0000000 --- a/plugins/codemirror/codemirror/addon/edit/continuelist.js +++ /dev/null @@ -1,25 +0,0 @@ -(function() { - 'use strict'; - - var listRE = /^(\s*)([*+-]|(\d+)\.)(\s*)/, - unorderedBullets = '*+-'; - - CodeMirror.commands.newlineAndIndentContinueMarkdownList = function(cm) { - var pos = cm.getCursor(), - inList = cm.getStateAfter(pos.line).list !== false, - match; - - if (!inList || !(match = cm.getLine(pos.line).match(listRE))) { - cm.execCommand('newlineAndIndent'); - return; - } - - var indent = match[1], after = match[4]; - var bullet = unorderedBullets.indexOf(match[2]) >= 0 - ? match[2] - : (parseInt(match[3], 10) + 1) + '.'; - - cm.replaceSelection('\n' + indent + bullet + after, 'end'); - }; - -}()); diff --git a/plugins/codemirror/codemirror/addon/edit/matchbrackets.js b/plugins/codemirror/codemirror/addon/edit/matchbrackets.js deleted file mode 100644 index 9d9b388..0000000 --- a/plugins/codemirror/codemirror/addon/edit/matchbrackets.js +++ /dev/null @@ -1,87 +0,0 @@ -(function() { - var ie_lt8 = /MSIE \d/.test(navigator.userAgent) && - (document.documentMode == null || document.documentMode < 8); - - var Pos = CodeMirror.Pos; - - var matching = {"(": ")>", ")": "(<", "[": "]>", "]": "[<", "{": "}>", "}": "{<"}; - function findMatchingBracket(cm, where, strict) { - var state = cm.state.matchBrackets; - var maxScanLen = (state && state.maxScanLineLength) || 10000; - var maxScanLines = (state && state.maxScanLines) || 100; - - var cur = where || cm.getCursor(), line = cm.getLineHandle(cur.line), pos = cur.ch - 1; - var match = (pos >= 0 && matching[line.text.charAt(pos)]) || matching[line.text.charAt(++pos)]; - if (!match) return null; - var forward = match.charAt(1) == ">", d = forward ? 1 : -1; - if (strict && forward != (pos == cur.ch)) return null; - var style = cm.getTokenTypeAt(Pos(cur.line, pos + 1)); - - var stack = [line.text.charAt(pos)], re = /[(){}[\]]/; - function scan(line, lineNo, start) { - if (!line.text) return; - var pos = forward ? 0 : line.text.length - 1, end = forward ? line.text.length : -1; - if (line.text.length > maxScanLen) return null; - if (start != null) pos = start + d; - for (; pos != end; pos += d) { - var ch = line.text.charAt(pos); - if (re.test(ch) && cm.getTokenTypeAt(Pos(lineNo, pos + 1)) == style) { - var match = matching[ch]; - if (match.charAt(1) == ">" == forward) stack.push(ch); - else if (stack.pop() != match.charAt(0)) return {pos: pos, match: false}; - else if (!stack.length) return {pos: pos, match: true}; - } - } - } - for (var i = cur.line, found, e = forward ? Math.min(i + maxScanLines, cm.lineCount()) : Math.max(-1, i - maxScanLines); i != e; i+=d) { - if (i == cur.line) found = scan(line, i, pos); - else found = scan(cm.getLineHandle(i), i); - if (found) break; - } - return {from: Pos(cur.line, pos), to: found && Pos(i, found.pos), - match: found && found.match, forward: forward}; - } - - function matchBrackets(cm, autoclear) { - // Disable brace matching in long lines, since it'll cause hugely slow updates - var maxHighlightLen = cm.state.matchBrackets.maxHighlightLineLength || 1000; - var found = findMatchingBracket(cm); - if (!found || cm.getLine(found.from.line).length > maxHighlightLen || - found.to && cm.getLine(found.to.line).length > maxHighlightLen) - return; - - var style = found.match ? "CodeMirror-matchingbracket" : "CodeMirror-nonmatchingbracket"; - var one = cm.markText(found.from, Pos(found.from.line, found.from.ch + 1), {className: style}); - var two = found.to && cm.markText(found.to, Pos(found.to.line, found.to.ch + 1), {className: style}); - // Kludge to work around the IE bug from issue #1193, where text - // input stops going to the textare whever this fires. - if (ie_lt8 && cm.state.focused) cm.display.input.focus(); - var clear = function() { - cm.operation(function() { one.clear(); two && two.clear(); }); - }; - if (autoclear) setTimeout(clear, 800); - else return clear; - } - - var currentlyHighlighted = null; - function doMatchBrackets(cm) { - cm.operation(function() { - if (currentlyHighlighted) {currentlyHighlighted(); currentlyHighlighted = null;} - if (!cm.somethingSelected()) currentlyHighlighted = matchBrackets(cm, false); - }); - } - - CodeMirror.defineOption("matchBrackets", false, function(cm, val, old) { - if (old && old != CodeMirror.Init) - cm.off("cursorActivity", doMatchBrackets); - if (val) { - cm.state.matchBrackets = typeof val == "object" ? val : {}; - cm.on("cursorActivity", doMatchBrackets); - } - }); - - CodeMirror.defineExtension("matchBrackets", function() {matchBrackets(this, true);}); - CodeMirror.defineExtension("findMatchingBracket", function(pos, strict){ - return findMatchingBracket(this, pos, strict); - }); -})(); diff --git a/plugins/codemirror/codemirror/addon/edit/matchtags.js b/plugins/codemirror/codemirror/addon/edit/matchtags.js deleted file mode 100644 index f189c1f..0000000 --- a/plugins/codemirror/codemirror/addon/edit/matchtags.js +++ /dev/null @@ -1,56 +0,0 @@ -(function() { - "use strict"; - - CodeMirror.defineOption("matchTags", false, function(cm, val, old) { - if (old && old != CodeMirror.Init) { - cm.off("cursorActivity", doMatchTags); - cm.off("viewportChange", maybeUpdateMatch); - clear(cm); - } - if (val) { - cm.state.matchBothTags = typeof val == "object" && val.bothTags; - cm.on("cursorActivity", doMatchTags); - cm.on("viewportChange", maybeUpdateMatch); - doMatchTags(cm); - } - }); - - function clear(cm) { - if (cm.state.tagHit) cm.state.tagHit.clear(); - if (cm.state.tagOther) cm.state.tagOther.clear(); - cm.state.tagHit = cm.state.tagOther = null; - } - - function doMatchTags(cm) { - cm.state.failedTagMatch = false; - cm.operation(function() { - clear(cm); - if (cm.somethingSelected()) return; - var cur = cm.getCursor(), range = cm.getViewport(); - range.from = Math.min(range.from, cur.line); range.to = Math.max(cur.line + 1, range.to); - var match = CodeMirror.findMatchingTag(cm, cur, range); - if (!match) return; - if (cm.state.matchBothTags) { - var hit = match.at == "open" ? match.open : match.close; - if (hit) cm.state.tagHit = cm.markText(hit.from, hit.to, {className: "CodeMirror-matchingtag"}); - } - var other = match.at == "close" ? match.open : match.close; - if (other) - cm.state.tagOther = cm.markText(other.from, other.to, {className: "CodeMirror-matchingtag"}); - else - cm.state.failedTagMatch = true; - }); - } - - function maybeUpdateMatch(cm) { - if (cm.state.failedTagMatch) doMatchTags(cm); - } - - CodeMirror.commands.toMatchingTag = function(cm) { - var found = CodeMirror.findMatchingTag(cm, cm.getCursor()); - if (found) { - var other = found.at == "close" ? found.open : found.close; - if (other) cm.setSelection(other.to, other.from); - } - }; -})(); diff --git a/plugins/codemirror/codemirror/addon/edit/trailingspace.js b/plugins/codemirror/codemirror/addon/edit/trailingspace.js deleted file mode 100644 index f6bb026..0000000 --- a/plugins/codemirror/codemirror/addon/edit/trailingspace.js +++ /dev/null @@ -1,15 +0,0 @@ -CodeMirror.defineOption("showTrailingSpace", false, function(cm, val, prev) { - if (prev == CodeMirror.Init) prev = false; - if (prev && !val) - cm.removeOverlay("trailingspace"); - else if (!prev && val) - cm.addOverlay({ - token: function(stream) { - for (var l = stream.string.length, i = l; i && /\s/.test(stream.string.charAt(i - 1)); --i) {} - if (i > stream.pos) { stream.pos = i; return null; } - stream.pos = l; - return "trailingspace"; - }, - name: "trailingspace" - }); -}); diff --git a/plugins/codemirror/codemirror/addon/fold/brace-fold.js b/plugins/codemirror/codemirror/addon/fold/brace-fold.js deleted file mode 100644 index 2560b2b..0000000 --- a/plugins/codemirror/codemirror/addon/fold/brace-fold.js +++ /dev/null @@ -1,93 +0,0 @@ -CodeMirror.registerHelper("fold", "brace", function(cm, start) { - var line = start.line, lineText = cm.getLine(line); - var startCh, tokenType; - - function findOpening(openCh) { - for (var at = start.ch, pass = 0;;) { - var found = at <= 0 ? -1 : lineText.lastIndexOf(openCh, at - 1); - if (found == -1) { - if (pass == 1) break; - pass = 1; - at = lineText.length; - continue; - } - if (pass == 1 && found < start.ch) break; - tokenType = cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1)); - if (!/^(comment|string)/.test(tokenType)) return found + 1; - at = found - 1; - } - } - - var startToken = "{", endToken = "}", startCh = findOpening("{"); - if (startCh == null) { - startToken = "[", endToken = "]"; - startCh = findOpening("["); - } - - if (startCh == null) return; - var count = 1, lastLine = cm.lastLine(), end, endCh; - outer: for (var i = line; i <= lastLine; ++i) { - var text = cm.getLine(i), pos = i == line ? startCh : 0; - for (;;) { - var nextOpen = text.indexOf(startToken, pos), nextClose = text.indexOf(endToken, pos); - if (nextOpen < 0) nextOpen = text.length; - if (nextClose < 0) nextClose = text.length; - pos = Math.min(nextOpen, nextClose); - if (pos == text.length) break; - if (cm.getTokenTypeAt(CodeMirror.Pos(i, pos + 1)) == tokenType) { - if (pos == nextOpen) ++count; - else if (!--count) { end = i; endCh = pos; break outer; } - } - ++pos; - } - } - if (end == null || line == end && endCh == startCh) return; - return {from: CodeMirror.Pos(line, startCh), - to: CodeMirror.Pos(end, endCh)}; -}); -CodeMirror.braceRangeFinder = CodeMirror.fold.brace; // deprecated - -CodeMirror.registerHelper("fold", "import", function(cm, start) { - function hasImport(line) { - if (line < cm.firstLine() || line > cm.lastLine()) return null; - var start = cm.getTokenAt(CodeMirror.Pos(line, 1)); - if (!/\S/.test(start.string)) start = cm.getTokenAt(CodeMirror.Pos(line, start.end + 1)); - if (start.type != "keyword" || start.string != "import") return null; - // Now find closing semicolon, return its position - for (var i = line, e = Math.min(cm.lastLine(), line + 10); i <= e; ++i) { - var text = cm.getLine(i), semi = text.indexOf(";"); - if (semi != -1) return {startCh: start.end, end: CodeMirror.Pos(i, semi)}; - } - } - - var start = start.line, has = hasImport(start), prev; - if (!has || hasImport(start - 1) || ((prev = hasImport(start - 2)) && prev.end.line == start - 1)) - return null; - for (var end = has.end;;) { - var next = hasImport(end.line + 1); - if (next == null) break; - end = next.end; - } - return {from: cm.clipPos(CodeMirror.Pos(start, has.startCh + 1)), to: end}; -}); -CodeMirror.importRangeFinder = CodeMirror.fold["import"]; // deprecated - -CodeMirror.registerHelper("fold", "include", function(cm, start) { - function hasInclude(line) { - if (line < cm.firstLine() || line > cm.lastLine()) return null; - var start = cm.getTokenAt(CodeMirror.Pos(line, 1)); - if (!/\S/.test(start.string)) start = cm.getTokenAt(CodeMirror.Pos(line, start.end + 1)); - if (start.type == "meta" && start.string.slice(0, 8) == "#include") return start.start + 8; - } - - var start = start.line, has = hasInclude(start); - if (has == null || hasInclude(start - 1) != null) return null; - for (var end = start;;) { - var next = hasInclude(end + 1); - if (next == null) break; - ++end; - } - return {from: CodeMirror.Pos(start, has + 1), - to: cm.clipPos(CodeMirror.Pos(end))}; -}); -CodeMirror.includeRangeFinder = CodeMirror.fold.include; // deprecated diff --git a/plugins/codemirror/codemirror/addon/fold/comment-fold.js b/plugins/codemirror/codemirror/addon/fold/comment-fold.js deleted file mode 100644 index a064cf8..0000000 --- a/plugins/codemirror/codemirror/addon/fold/comment-fold.js +++ /dev/null @@ -1,40 +0,0 @@ -CodeMirror.registerHelper("fold", "comment", function(cm, start) { - var mode = cm.getModeAt(start), startToken = mode.blockCommentStart, endToken = mode.blockCommentEnd; - if (!startToken || !endToken) return; - var line = start.line, lineText = cm.getLine(line); - - var startCh; - for (var at = start.ch, pass = 0;;) { - var found = at <= 0 ? -1 : lineText.lastIndexOf(startToken, at - 1); - if (found == -1) { - if (pass == 1) return; - pass = 1; - at = lineText.length; - continue; - } - if (pass == 1 && found < start.ch) return; - if (/comment/.test(cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1)))) { - startCh = found + startToken.length; - break; - } - at = found - 1; - } - - var depth = 1, lastLine = cm.lastLine(), end, endCh; - outer: for (var i = line; i <= lastLine; ++i) { - var text = cm.getLine(i), pos = i == line ? startCh : 0; - for (;;) { - var nextOpen = text.indexOf(startToken, pos), nextClose = text.indexOf(endToken, pos); - if (nextOpen < 0) nextOpen = text.length; - if (nextClose < 0) nextClose = text.length; - pos = Math.min(nextOpen, nextClose); - if (pos == text.length) break; - if (pos == nextOpen) ++depth; - else if (!--depth) { end = i; endCh = pos; break outer; } - ++pos; - } - } - if (end == null || line == end && endCh == startCh) return; - return {from: CodeMirror.Pos(line, startCh), - to: CodeMirror.Pos(end, endCh)}; -}); diff --git a/plugins/codemirror/codemirror/addon/fold/foldcode.js b/plugins/codemirror/codemirror/addon/fold/foldcode.js deleted file mode 100644 index c497bc2..0000000 --- a/plugins/codemirror/codemirror/addon/fold/foldcode.js +++ /dev/null @@ -1,75 +0,0 @@ -(function() { - "use strict"; - - function doFold(cm, pos, options, force) { - var finder = options && (options.call ? options : options.rangeFinder); - if (!finder) finder = cm.getHelper(pos, "fold"); - if (!finder) return; - if (typeof pos == "number") pos = CodeMirror.Pos(pos, 0); - var minSize = options && options.minFoldSize || 0; - - function getRange(allowFolded) { - var range = finder(cm, pos); - if (!range || range.to.line - range.from.line < minSize) return null; - var marks = cm.findMarksAt(range.from); - for (var i = 0; i < marks.length; ++i) { - if (marks[i].__isFold && force !== "fold") { - if (!allowFolded) return null; - range.cleared = true; - marks[i].clear(); - } - } - return range; - } - - var range = getRange(true); - if (options && options.scanUp) while (!range && pos.line > cm.firstLine()) { - pos = CodeMirror.Pos(pos.line - 1, 0); - range = getRange(false); - } - if (!range || range.cleared || force === "unfold") return; - - var myWidget = makeWidget(options); - CodeMirror.on(myWidget, "mousedown", function() { myRange.clear(); }); - var myRange = cm.markText(range.from, range.to, { - replacedWith: myWidget, - clearOnEnter: true, - __isFold: true - }); - myRange.on("clear", function(from, to) { - CodeMirror.signal(cm, "unfold", cm, from, to); - }); - CodeMirror.signal(cm, "fold", cm, range.from, range.to); - } - - function makeWidget(options) { - var widget = (options && options.widget) || "\u2194"; - if (typeof widget == "string") { - var text = document.createTextNode(widget); - widget = document.createElement("span"); - widget.appendChild(text); - widget.className = "CodeMirror-foldmarker"; - } - return widget; - } - - // Clumsy backwards-compatible interface - CodeMirror.newFoldFunction = function(rangeFinder, widget) { - return function(cm, pos) { doFold(cm, pos, {rangeFinder: rangeFinder, widget: widget}); }; - }; - - // New-style interface - CodeMirror.defineExtension("foldCode", function(pos, options, force) { - doFold(this, pos, options, force); - }); - - CodeMirror.registerHelper("fold", "combine", function() { - var funcs = Array.prototype.slice.call(arguments, 0); - return function(cm, start) { - for (var i = 0; i < funcs.length; ++i) { - var found = funcs[i](cm, start); - if (found) return found; - } - }; - }); -})(); diff --git a/plugins/codemirror/codemirror/addon/fold/foldgutter.css b/plugins/codemirror/codemirror/addon/fold/foldgutter.css deleted file mode 100644 index 4980539..0000000 --- a/plugins/codemirror/codemirror/addon/fold/foldgutter.css +++ /dev/null @@ -1,21 +0,0 @@ -.CodeMirror-foldmarker { - color: blue; - text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px; - font-family: arial; - line-height: .3; - cursor: pointer; -} -.CodeMirror-foldgutter { - width: .7em; -} -.CodeMirror-foldgutter-open, -.CodeMirror-foldgutter-folded { - color: #555; - cursor: pointer; -} -.CodeMirror-foldgutter-open:after { - content: "\25BE"; -} -.CodeMirror-foldgutter-folded:after { - content: "\25B8"; -} diff --git a/plugins/codemirror/codemirror/addon/fold/foldgutter.js b/plugins/codemirror/codemirror/addon/fold/foldgutter.js deleted file mode 100644 index 57336fb..0000000 --- a/plugins/codemirror/codemirror/addon/fold/foldgutter.js +++ /dev/null @@ -1,124 +0,0 @@ -(function() { - "use strict"; - - CodeMirror.defineOption("foldGutter", false, function(cm, val, old) { - if (old && old != CodeMirror.Init) { - cm.clearGutter(cm.state.foldGutter.options.gutter); - cm.state.foldGutter = null; - cm.off("gutterClick", onGutterClick); - cm.off("change", onChange); - cm.off("viewportChange", onViewportChange); - cm.off("fold", onFold); - cm.off("unfold", onFold); - cm.off("swapDoc", updateInViewport); - } - if (val) { - cm.state.foldGutter = new State(parseOptions(val)); - updateInViewport(cm); - cm.on("gutterClick", onGutterClick); - cm.on("change", onChange); - cm.on("viewportChange", onViewportChange); - cm.on("fold", onFold); - cm.on("unfold", onFold); - cm.on("swapDoc", updateInViewport); - } - }); - - var Pos = CodeMirror.Pos; - - function State(options) { - this.options = options; - this.from = this.to = 0; - } - - function parseOptions(opts) { - if (opts === true) opts = {}; - if (opts.gutter == null) opts.gutter = "CodeMirror-foldgutter"; - if (opts.indicatorOpen == null) opts.indicatorOpen = "CodeMirror-foldgutter-open"; - if (opts.indicatorFolded == null) opts.indicatorFolded = "CodeMirror-foldgutter-folded"; - return opts; - } - - function isFolded(cm, line) { - var marks = cm.findMarksAt(Pos(line)); - for (var i = 0; i < marks.length; ++i) - if (marks[i].__isFold && marks[i].find().from.line == line) return true; - } - - function marker(spec) { - if (typeof spec == "string") { - var elt = document.createElement("div"); - elt.className = spec; - return elt; - } else { - return spec.cloneNode(true); - } - } - - function updateFoldInfo(cm, from, to) { - var opts = cm.state.foldGutter.options, cur = from; - cm.eachLine(from, to, function(line) { - var mark = null; - if (isFolded(cm, cur)) { - mark = marker(opts.indicatorFolded); - } else { - var pos = Pos(cur, 0), func = opts.rangeFinder || cm.getHelper(pos, "fold"); - var range = func && func(cm, pos); - if (range && range.from.line + 1 < range.to.line) - mark = marker(opts.indicatorOpen); - } - cm.setGutterMarker(line, opts.gutter, mark); - ++cur; - }); - } - - function updateInViewport(cm) { - var vp = cm.getViewport(), state = cm.state.foldGutter; - if (!state) return; - cm.operation(function() { - updateFoldInfo(cm, vp.from, vp.to); - }); - state.from = vp.from; state.to = vp.to; - } - - function onGutterClick(cm, line, gutter) { - var opts = cm.state.foldGutter.options; - if (gutter != opts.gutter) return; - cm.foldCode(Pos(line, 0), opts.rangeFinder); - } - - function onChange(cm) { - var state = cm.state.foldGutter, opts = cm.state.foldGutter.options; - state.from = state.to = 0; - clearTimeout(state.changeUpdate); - state.changeUpdate = setTimeout(function() { updateInViewport(cm); }, opts.foldOnChangeTimeSpan || 600); - } - - function onViewportChange(cm) { - var state = cm.state.foldGutter, opts = cm.state.foldGutter.options; - clearTimeout(state.changeUpdate); - state.changeUpdate = setTimeout(function() { - var vp = cm.getViewport(); - if (state.from == state.to || vp.from - state.to > 20 || state.from - vp.to > 20) { - updateInViewport(cm); - } else { - cm.operation(function() { - if (vp.from < state.from) { - updateFoldInfo(cm, vp.from, state.from); - state.from = vp.from; - } - if (vp.to > state.to) { - updateFoldInfo(cm, state.to, vp.to); - state.to = vp.to; - } - }); - } - }, opts.updateViewportTimeSpan || 400); - } - - function onFold(cm, from) { - var state = cm.state.foldGutter, line = from.line; - if (line >= state.from && line < state.to) - updateFoldInfo(cm, line, line + 1); - } -})(); diff --git a/plugins/codemirror/codemirror/addon/fold/indent-fold.js b/plugins/codemirror/codemirror/addon/fold/indent-fold.js deleted file mode 100644 index 1bd600b..0000000 --- a/plugins/codemirror/codemirror/addon/fold/indent-fold.js +++ /dev/null @@ -1,30 +0,0 @@ -CodeMirror.registerHelper("fold", "indent", function(cm, start) { - var tabSize = cm.getOption("tabSize"), firstLine = cm.getLine(start.line); - if (!/\S/.test(firstLine)) return; - var getIndent = function(lineNum) { - return CodeMirror.countColumn(lineNum, null, tabSize); - }; - var myIndent = getIndent(firstLine); - var lastLineInFold = null; - // Go through lines until we find a line that definitely doesn't belong in - // the block we're folding, or to the end. - for (var i = start.line + 1, end = cm.lastLine(); i <= end; ++i) { - var curLine = cm.getLine(i); - var curIndent = getIndent(curLine); - if (curIndent > myIndent) { - // Lines with a greater indent are considered part of the block. - lastLineInFold = i; - } else if (!/\S/.test(curLine)) { - // Empty lines might be breaks within the block we're trying to fold. - } else { - // A non-empty line at an indent equal to or less than ours marks the - // start of another block. - break; - } - } - if (lastLineInFold) return { - from: CodeMirror.Pos(start.line, firstLine.length), - to: CodeMirror.Pos(lastLineInFold, cm.getLine(lastLineInFold).length) - }; -}); -CodeMirror.indentRangeFinder = CodeMirror.fold.indent; // deprecated diff --git a/plugins/codemirror/codemirror/addon/fold/xml-fold.js b/plugins/codemirror/codemirror/addon/fold/xml-fold.js deleted file mode 100644 index 88a107c..0000000 --- a/plugins/codemirror/codemirror/addon/fold/xml-fold.js +++ /dev/null @@ -1,167 +0,0 @@ -(function() { - "use strict"; - - var Pos = CodeMirror.Pos; - function cmp(a, b) { return a.line - b.line || a.ch - b.ch; } - - var nameStartChar = "A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"; - var nameChar = nameStartChar + "\-\:\.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; - var xmlTagStart = new RegExp("<(/?)([" + nameStartChar + "][" + nameChar + "]*)", "g"); - - function Iter(cm, line, ch, range) { - this.line = line; this.ch = ch; - this.cm = cm; this.text = cm.getLine(line); - this.min = range ? range.from : cm.firstLine(); - this.max = range ? range.to - 1 : cm.lastLine(); - } - - function tagAt(iter, ch) { - var type = iter.cm.getTokenTypeAt(Pos(iter.line, ch)); - return type && /\btag\b/.test(type); - } - - function nextLine(iter) { - if (iter.line >= iter.max) return; - iter.ch = 0; - iter.text = iter.cm.getLine(++iter.line); - return true; - } - function prevLine(iter) { - if (iter.line <= iter.min) return; - iter.text = iter.cm.getLine(--iter.line); - iter.ch = iter.text.length; - return true; - } - - function toTagEnd(iter) { - for (;;) { - var gt = iter.text.indexOf(">", iter.ch); - if (gt == -1) { if (nextLine(iter)) continue; else return; } - if (!tagAt(iter, gt + 1)) { iter.ch = gt + 1; continue; } - var lastSlash = iter.text.lastIndexOf("/", gt); - var selfClose = lastSlash > -1 && !/\S/.test(iter.text.slice(lastSlash + 1, gt)); - iter.ch = gt + 1; - return selfClose ? "selfClose" : "regular"; - } - } - function toTagStart(iter) { - for (;;) { - var lt = iter.ch ? iter.text.lastIndexOf("<", iter.ch - 1) : -1; - if (lt == -1) { if (prevLine(iter)) continue; else return; } - if (!tagAt(iter, lt + 1)) { iter.ch = lt; continue; } - xmlTagStart.lastIndex = lt; - iter.ch = lt; - var match = xmlTagStart.exec(iter.text); - if (match && match.index == lt) return match; - } - } - - function toNextTag(iter) { - for (;;) { - xmlTagStart.lastIndex = iter.ch; - var found = xmlTagStart.exec(iter.text); - if (!found) { if (nextLine(iter)) continue; else return; } - if (!tagAt(iter, found.index + 1)) { iter.ch = found.index + 1; continue; } - iter.ch = found.index + found[0].length; - return found; - } - } - function toPrevTag(iter) { - for (;;) { - var gt = iter.ch ? iter.text.lastIndexOf(">", iter.ch - 1) : -1; - if (gt == -1) { if (prevLine(iter)) continue; else return; } - if (!tagAt(iter, gt + 1)) { iter.ch = gt; continue; } - var lastSlash = iter.text.lastIndexOf("/", gt); - var selfClose = lastSlash > -1 && !/\S/.test(iter.text.slice(lastSlash + 1, gt)); - iter.ch = gt + 1; - return selfClose ? "selfClose" : "regular"; - } - } - - function findMatchingClose(iter, tag) { - var stack = []; - for (;;) { - var next = toNextTag(iter), end, startLine = iter.line, startCh = iter.ch - (next ? next[0].length : 0); - if (!next || !(end = toTagEnd(iter))) return; - if (end == "selfClose") continue; - if (next[1]) { // closing tag - for (var i = stack.length - 1; i >= 0; --i) if (stack[i] == next[2]) { - stack.length = i; - break; - } - if (i < 0 && (!tag || tag == next[2])) return { - tag: next[2], - from: Pos(startLine, startCh), - to: Pos(iter.line, iter.ch) - }; - } else { // opening tag - stack.push(next[2]); - } - } - } - function findMatchingOpen(iter, tag) { - var stack = []; - for (;;) { - var prev = toPrevTag(iter); - if (!prev) return; - if (prev == "selfClose") { toTagStart(iter); continue; } - var endLine = iter.line, endCh = iter.ch; - var start = toTagStart(iter); - if (!start) return; - if (start[1]) { // closing tag - stack.push(start[2]); - } else { // opening tag - for (var i = stack.length - 1; i >= 0; --i) if (stack[i] == start[2]) { - stack.length = i; - break; - } - if (i < 0 && (!tag || tag == start[2])) return { - tag: start[2], - from: Pos(iter.line, iter.ch), - to: Pos(endLine, endCh) - }; - } - } - } - - CodeMirror.registerHelper("fold", "xml", function(cm, start) { - var iter = new Iter(cm, start.line, 0); - for (;;) { - var openTag = toNextTag(iter), end; - if (!openTag || iter.line != start.line || !(end = toTagEnd(iter))) return; - if (!openTag[1] && end != "selfClose") { - var start = Pos(iter.line, iter.ch); - var close = findMatchingClose(iter, openTag[2]); - return close && {from: start, to: close.from}; - } - } - }); - CodeMirror.tagRangeFinder = CodeMirror.fold.xml; // deprecated - - CodeMirror.findMatchingTag = function(cm, pos, range) { - var iter = new Iter(cm, pos.line, pos.ch, range); - if (iter.text.indexOf(">") == -1 && iter.text.indexOf("<") == -1) return; - var end = toTagEnd(iter), to = end && Pos(iter.line, iter.ch); - var start = end && toTagStart(iter); - if (!end || end == "selfClose" || !start || cmp(iter, pos) > 0) return; - var here = {from: Pos(iter.line, iter.ch), to: to, tag: start[2]}; - - if (start[1]) { // closing tag - return {open: findMatchingOpen(iter, start[2]), close: here, at: "close"}; - } else { // opening tag - iter = new Iter(cm, to.line, to.ch, range); - return {open: here, close: findMatchingClose(iter, start[2]), at: "open"}; - } - }; - - CodeMirror.findEnclosingTag = function(cm, pos, range) { - var iter = new Iter(cm, pos.line, pos.ch, range); - for (;;) { - var open = findMatchingOpen(iter); - if (!open) break; - var forward = new Iter(cm, pos.line, pos.ch, range); - var close = findMatchingClose(forward, open.tag); - if (close) return {open: open, close: close}; - } - }; -})(); diff --git a/plugins/codemirror/codemirror/addon/hint/anyword-hint.js b/plugins/codemirror/codemirror/addon/hint/anyword-hint.js deleted file mode 100644 index 36ff618..0000000 --- a/plugins/codemirror/codemirror/addon/hint/anyword-hint.js +++ /dev/null @@ -1,34 +0,0 @@ -(function() { - "use strict"; - - var WORD = /[\w$]+/, RANGE = 500; - - CodeMirror.registerHelper("hint", "anyword", function(editor, options) { - var word = options && options.word || WORD; - var range = options && options.range || RANGE; - var cur = editor.getCursor(), curLine = editor.getLine(cur.line); - var start = cur.ch, end = start; - while (end < curLine.length && word.test(curLine.charAt(end))) ++end; - while (start && word.test(curLine.charAt(start - 1))) --start; - var curWord = start != end && curLine.slice(start, end); - - var list = [], seen = {}; - function scan(dir) { - var line = cur.line, end = Math.min(Math.max(line + dir * range, editor.firstLine()), editor.lastLine()) + dir; - for (; line != end; line += dir) { - var text = editor.getLine(line), m; - var re = new RegExp(word.source, "g"); - while (m = re.exec(text)) { - if (line == cur.line && m[0] === curWord) continue; - if ((!curWord || m[0].indexOf(curWord) == 0) && !seen.hasOwnProperty(m[0])) { - seen[m[0]] = true; - list.push(m[0]); - } - } - } - } - scan(-1); - scan(1); - return {list: list, from: CodeMirror.Pos(cur.line, start), to: CodeMirror.Pos(cur.line, end)}; - }); -})(); diff --git a/plugins/codemirror/codemirror/addon/hint/css-hint.js b/plugins/codemirror/codemirror/addon/hint/css-hint.js deleted file mode 100644 index 2b15300..0000000 --- a/plugins/codemirror/codemirror/addon/hint/css-hint.js +++ /dev/null @@ -1,50 +0,0 @@ -(function () { - "use strict"; - - function getHints(cm) { - var cur = cm.getCursor(), token = cm.getTokenAt(cur); - var inner = CodeMirror.innerMode(cm.getMode(), token.state); - if (inner.mode.name != "css") return; - - // If it's not a 'word-style' token, ignore the token. - if (!/^[\w$_-]*$/.test(token.string)) { - token = { - start: cur.ch, end: cur.ch, string: "", state: token.state, - type: null - }; - var stack = token.state.stack; - var lastToken = stack && stack.length > 0 ? stack[stack.length - 1] : ""; - if (token.string == ":" || lastToken.indexOf("property") == 0) - token.type = "variable"; - else if (token.string == "{" || lastToken.indexOf("rule") == 0) - token.type = "property"; - } - - if (!token.type) - return; - - var spec = CodeMirror.resolveMode("text/css"); - var keywords = null; - if (token.type.indexOf("property") == 0) - keywords = spec.propertyKeywords; - else if (token.type.indexOf("variable") == 0) - keywords = spec.valueKeywords; - - if (!keywords) - return; - - var result = []; - for (var name in keywords) { - if (name.indexOf(token.string) == 0 /* > -1 */) - result.push(name); - } - - return { - list: result, - from: CodeMirror.Pos(cur.line, token.start), - to: CodeMirror.Pos(cur.line, token.end) - }; - } - - CodeMirror.registerHelper("hint", "css", getHints); -})(); diff --git a/plugins/codemirror/codemirror/addon/hint/html-hint.js b/plugins/codemirror/codemirror/addon/hint/html-hint.js deleted file mode 100644 index cf25685..0000000 --- a/plugins/codemirror/codemirror/addon/hint/html-hint.js +++ /dev/null @@ -1,337 +0,0 @@ -(function () { - var langs = "ab aa af ak sq am ar an hy as av ae ay az bm ba eu be bn bh bi bs br bg my ca ch ce ny zh cv kw co cr hr cs da dv nl dz en eo et ee fo fj fi fr ff gl ka de el gn gu ht ha he hz hi ho hu ia id ie ga ig ik io is it iu ja jv kl kn kr ks kk km ki rw ky kv kg ko ku kj la lb lg li ln lo lt lu lv gv mk mg ms ml mt mi mr mh mn na nv nb nd ne ng nn no ii nr oc oj cu om or os pa pi fa pl ps pt qu rm rn ro ru sa sc sd se sm sg sr gd sn si sk sl so st es su sw ss sv ta te tg th ti bo tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa cy wo fy xh yi yo za zu".split(" "); - var targets = ["_blank", "_self", "_top", "_parent"]; - var charsets = ["ascii", "utf-8", "utf-16", "latin1", "latin1"]; - var methods = ["get", "post", "put", "delete"]; - var encs = ["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"]; - var media = ["all", "screen", "print", "embossed", "braille", "handheld", "print", "projection", "screen", "tty", "tv", "speech", - "3d-glasses", "resolution [>][<][=] [X]", "device-aspect-ratio: X/Y", "orientation:portrait", - "orientation:landscape", "device-height: [X]", "device-width: [X]"]; - var s = { attrs: {} }; // Simple tag, reused for a whole lot of tags - - var data = { - a: { - attrs: { - href: null, ping: null, type: null, - media: media, - target: targets, - hreflang: langs - } - }, - abbr: s, - acronym: s, - address: s, - applet: s, - area: { - attrs: { - alt: null, coords: null, href: null, target: null, ping: null, - media: media, hreflang: langs, type: null, - shape: ["default", "rect", "circle", "poly"] - } - }, - article: s, - aside: s, - audio: { - attrs: { - src: null, mediagroup: null, - crossorigin: ["anonymous", "use-credentials"], - preload: ["none", "metadata", "auto"], - autoplay: ["", "autoplay"], - loop: ["", "loop"], - controls: ["", "controls"] - } - }, - b: s, - base: { attrs: { href: null, target: targets } }, - basefont: s, - bdi: s, - bdo: s, - big: s, - blockquote: { attrs: { cite: null } }, - body: s, - br: s, - button: { - attrs: { - form: null, formaction: null, name: null, value: null, - autofocus: ["", "autofocus"], - disabled: ["", "autofocus"], - formenctype: encs, - formmethod: methods, - formnovalidate: ["", "novalidate"], - formtarget: targets, - type: ["submit", "reset", "button"] - } - }, - canvas: { attrs: { width: null, height: null } }, - caption: s, - center: s, - cite: s, - code: s, - col: { attrs: { span: null } }, - colgroup: { attrs: { span: null } }, - command: { - attrs: { - type: ["command", "checkbox", "radio"], - label: null, icon: null, radiogroup: null, command: null, title: null, - disabled: ["", "disabled"], - checked: ["", "checked"] - } - }, - data: { attrs: { value: null } }, - datagrid: { attrs: { disabled: ["", "disabled"], multiple: ["", "multiple"] } }, - datalist: { attrs: { data: null } }, - dd: s, - del: { attrs: { cite: null, datetime: null } }, - details: { attrs: { open: ["", "open"] } }, - dfn: s, - dir: s, - div: s, - dl: s, - dt: s, - em: s, - embed: { attrs: { src: null, type: null, width: null, height: null } }, - eventsource: { attrs: { src: null } }, - fieldset: { attrs: { disabled: ["", "disabled"], form: null, name: null } }, - figcaption: s, - figure: s, - font: s, - footer: s, - form: { - attrs: { - action: null, name: null, - "accept-charset": charsets, - autocomplete: ["on", "off"], - enctype: encs, - method: methods, - novalidate: ["", "novalidate"], - target: targets - } - }, - frame: s, - frameset: s, - h1: s, h2: s, h3: s, h4: s, h5: s, h6: s, - head: { - attrs: {}, - children: ["title", "base", "link", "style", "meta", "script", "noscript", "command"] - }, - header: s, - hgroup: s, - hr: s, - html: { - attrs: { manifest: null }, - children: ["head", "body"] - }, - i: s, - iframe: { - attrs: { - src: null, srcdoc: null, name: null, width: null, height: null, - sandbox: ["allow-top-navigation", "allow-same-origin", "allow-forms", "allow-scripts"], - seamless: ["", "seamless"] - } - }, - img: { - attrs: { - alt: null, src: null, ismap: null, usemap: null, width: null, height: null, - crossorigin: ["anonymous", "use-credentials"] - } - }, - input: { - attrs: { - alt: null, dirname: null, form: null, formaction: null, - height: null, list: null, max: null, maxlength: null, min: null, - name: null, pattern: null, placeholder: null, size: null, src: null, - step: null, value: null, width: null, - accept: ["audio/*", "video/*", "image/*"], - autocomplete: ["on", "off"], - autofocus: ["", "autofocus"], - checked: ["", "checked"], - disabled: ["", "disabled"], - formenctype: encs, - formmethod: methods, - formnovalidate: ["", "novalidate"], - formtarget: targets, - multiple: ["", "multiple"], - readonly: ["", "readonly"], - required: ["", "required"], - type: ["hidden", "text", "search", "tel", "url", "email", "password", "datetime", "date", "month", - "week", "time", "datetime-local", "number", "range", "color", "checkbox", "radio", - "file", "submit", "image", "reset", "button"] - } - }, - ins: { attrs: { cite: null, datetime: null } }, - kbd: s, - keygen: { - attrs: { - challenge: null, form: null, name: null, - autofocus: ["", "autofocus"], - disabled: ["", "disabled"], - keytype: ["RSA"] - } - }, - label: { attrs: { "for": null, form: null } }, - legend: s, - li: { attrs: { value: null } }, - link: { - attrs: { - href: null, type: null, - hreflang: langs, - media: media, - sizes: ["all", "16x16", "16x16 32x32", "16x16 32x32 64x64"] - } - }, - map: { attrs: { name: null } }, - mark: s, - menu: { attrs: { label: null, type: ["list", "context", "toolbar"] } }, - meta: { - attrs: { - content: null, - charset: charsets, - name: ["viewport", "application-name", "author", "description", "generator", "keywords"], - "http-equiv": ["content-language", "content-type", "default-style", "refresh"] - } - }, - meter: { attrs: { value: null, min: null, low: null, high: null, max: null, optimum: null } }, - nav: s, - noframes: s, - noscript: s, - object: { - attrs: { - data: null, type: null, name: null, usemap: null, form: null, width: null, height: null, - typemustmatch: ["", "typemustmatch"] - } - }, - ol: { attrs: { reversed: ["", "reversed"], start: null, type: ["1", "a", "A", "i", "I"] } }, - optgroup: { attrs: { disabled: ["", "disabled"], label: null } }, - option: { attrs: { disabled: ["", "disabled"], label: null, selected: ["", "selected"], value: null } }, - output: { attrs: { "for": null, form: null, name: null } }, - p: s, - param: { attrs: { name: null, value: null } }, - pre: s, - progress: { attrs: { value: null, max: null } }, - q: { attrs: { cite: null } }, - rp: s, - rt: s, - ruby: s, - s: s, - samp: s, - script: { - attrs: { - type: ["text/javascript"], - src: null, - async: ["", "async"], - defer: ["", "defer"], - charset: charsets - } - }, - section: s, - select: { - attrs: { - form: null, name: null, size: null, - autofocus: ["", "autofocus"], - disabled: ["", "disabled"], - multiple: ["", "multiple"] - } - }, - small: s, - source: { attrs: { src: null, type: null, media: null } }, - span: s, - strike: s, - strong: s, - style: { - attrs: { - type: ["text/css"], - media: media, - scoped: null - } - }, - sub: s, - summary: s, - sup: s, - table: s, - tbody: s, - td: { attrs: { colspan: null, rowspan: null, headers: null } }, - textarea: { - attrs: { - dirname: null, form: null, maxlength: null, name: null, placeholder: null, - rows: null, cols: null, - autofocus: ["", "autofocus"], - disabled: ["", "disabled"], - readonly: ["", "readonly"], - required: ["", "required"], - wrap: ["soft", "hard"] - } - }, - tfoot: s, - th: { attrs: { colspan: null, rowspan: null, headers: null, scope: ["row", "col", "rowgroup", "colgroup"] } }, - thead: s, - time: { attrs: { datetime: null } }, - title: s, - tr: s, - track: { - attrs: { - src: null, label: null, "default": null, - kind: ["subtitles", "captions", "descriptions", "chapters", "metadata"], - srclang: langs - } - }, - tt: s, - u: s, - ul: s, - "var": s, - video: { - attrs: { - src: null, poster: null, width: null, height: null, - crossorigin: ["anonymous", "use-credentials"], - preload: ["auto", "metadata", "none"], - autoplay: ["", "autoplay"], - mediagroup: ["movie"], - muted: ["", "muted"], - controls: ["", "controls"] - } - }, - wbr: s - }; - - var globalAttrs = { - accesskey: ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], - "class": null, - contenteditable: ["true", "false"], - contextmenu: null, - dir: ["ltr", "rtl", "auto"], - draggable: ["true", "false", "auto"], - dropzone: ["copy", "move", "link", "string:", "file:"], - hidden: ["hidden"], - id: null, - inert: ["inert"], - itemid: null, - itemprop: null, - itemref: null, - itemscope: ["itemscope"], - itemtype: null, - lang: ["en", "es"], - spellcheck: ["true", "false"], - style: null, - tabindex: ["1", "2", "3", "4", "5", "6", "7", "8", "9"], - title: null, - translate: ["yes", "no"], - onclick: null, - rel: ["stylesheet", "alternate", "author", "bookmark", "help", "license", "next", "nofollow", "noreferrer", "prefetch", "prev", "search", "tag"] - }; - function populate(obj) { - for (var attr in globalAttrs) if (globalAttrs.hasOwnProperty(attr)) - obj.attrs[attr] = globalAttrs[attr]; - } - - populate(s); - for (var tag in data) if (data.hasOwnProperty(tag) && data[tag] != s) - populate(data[tag]); - - CodeMirror.htmlSchema = data; - function htmlHint(cm, options) { - var local = {schemaInfo: data}; - if (options) for (var opt in options) local[opt] = options[opt]; - return CodeMirror.hint.xml(cm, local); - } - CodeMirror.htmlHint = htmlHint; // deprecated - CodeMirror.registerHelper("hint", "html", htmlHint); -})(); diff --git a/plugins/codemirror/codemirror/addon/hint/javascript-hint.js b/plugins/codemirror/codemirror/addon/hint/javascript-hint.js deleted file mode 100644 index c66b0a7..0000000 --- a/plugins/codemirror/codemirror/addon/hint/javascript-hint.js +++ /dev/null @@ -1,131 +0,0 @@ -(function () { - var Pos = CodeMirror.Pos; - - function forEach(arr, f) { - for (var i = 0, e = arr.length; i < e; ++i) f(arr[i]); - } - - function arrayContains(arr, item) { - if (!Array.prototype.indexOf) { - var i = arr.length; - while (i--) { - if (arr[i] === item) { - return true; - } - } - return false; - } - return arr.indexOf(item) != -1; - } - - function scriptHint(editor, keywords, getToken, options) { - // Find the token at the cursor - var cur = editor.getCursor(), token = getToken(editor, cur), tprop = token; - if (/\b(?:string|comment)\b/.test(token.type)) return; - token.state = CodeMirror.innerMode(editor.getMode(), token.state).state; - - // If it's not a 'word-style' token, ignore the token. - if (!/^[\w$_]*$/.test(token.string)) { - token = tprop = {start: cur.ch, end: cur.ch, string: "", state: token.state, - type: token.string == "." ? "property" : null}; - } - // If it is a property, find out what it is a property of. - while (tprop.type == "property") { - tprop = getToken(editor, Pos(cur.line, tprop.start)); - if (tprop.string != ".") return; - tprop = getToken(editor, Pos(cur.line, tprop.start)); - if (!context) var context = []; - context.push(tprop); - } - return {list: getCompletions(token, context, keywords, options), - from: Pos(cur.line, token.start), - to: Pos(cur.line, token.end)}; - } - - function javascriptHint(editor, options) { - return scriptHint(editor, javascriptKeywords, - function (e, cur) {return e.getTokenAt(cur);}, - options); - }; - CodeMirror.javascriptHint = javascriptHint; // deprecated - CodeMirror.registerHelper("hint", "javascript", javascriptHint); - - function getCoffeeScriptToken(editor, cur) { - // This getToken, it is for coffeescript, imitates the behavior of - // getTokenAt method in javascript.js, that is, returning "property" - // type and treat "." as indepenent token. - var token = editor.getTokenAt(cur); - if (cur.ch == token.start + 1 && token.string.charAt(0) == '.') { - token.end = token.start; - token.string = '.'; - token.type = "property"; - } - else if (/^\.[\w$_]*$/.test(token.string)) { - token.type = "property"; - token.start++; - token.string = token.string.replace(/\./, ''); - } - return token; - } - - function coffeescriptHint(editor, options) { - return scriptHint(editor, coffeescriptKeywords, getCoffeeScriptToken, options); - } - CodeMirror.coffeescriptHint = coffeescriptHint; // deprecated - CodeMirror.registerHelper("hint", "coffeescript", coffeescriptHint); - - var stringProps = ("charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight " + - "toUpperCase toLowerCase split concat match replace search").split(" "); - var arrayProps = ("length concat join splice push pop shift unshift slice reverse sort indexOf " + - "lastIndexOf every some filter forEach map reduce reduceRight ").split(" "); - var funcProps = "prototype apply call bind".split(" "); - var javascriptKeywords = ("break case catch continue debugger default delete do else false finally for function " + - "if in instanceof new null return switch throw true try typeof var void while with").split(" "); - var coffeescriptKeywords = ("and break catch class continue delete do else extends false finally for " + - "if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes").split(" "); - - function getCompletions(token, context, keywords, options) { - var found = [], start = token.string; - function maybeAdd(str) { - if (str.indexOf(start) == 0 && !arrayContains(found, str)) found.push(str); - } - function gatherCompletions(obj) { - if (typeof obj == "string") forEach(stringProps, maybeAdd); - else if (obj instanceof Array) forEach(arrayProps, maybeAdd); - else if (obj instanceof Function) forEach(funcProps, maybeAdd); - for (var name in obj) maybeAdd(name); - } - - if (context && context.length) { - // If this is a property, see if it belongs to some object we can - // find in the current environment. - var obj = context.pop(), base; - if (obj.type && obj.type.indexOf("variable") === 0) { - if (options && options.additionalContext) - base = options.additionalContext[obj.string]; - base = base || window[obj.string]; - } else if (obj.type == "string") { - base = ""; - } else if (obj.type == "atom") { - base = 1; - } else if (obj.type == "function") { - if (window.jQuery != null && (obj.string == '$' || obj.string == 'jQuery') && - (typeof window.jQuery == 'function')) - base = window.jQuery(); - else if (window._ != null && (obj.string == '_') && (typeof window._ == 'function')) - base = window._(); - } - while (base != null && context.length) - base = base[context.pop().string]; - if (base != null) gatherCompletions(base); - } else { - // If not, just look in the window object and any local scope - // (reading into JS mode internals to get at the local and global variables) - for (var v = token.state.localVars; v; v = v.next) maybeAdd(v.name); - for (var v = token.state.globalVars; v; v = v.next) maybeAdd(v.name); - gatherCompletions(window); - forEach(keywords, maybeAdd); - } - return found; - } -})(); diff --git a/plugins/codemirror/codemirror/addon/hint/pig-hint.js b/plugins/codemirror/codemirror/addon/hint/pig-hint.js deleted file mode 100644 index 7ef336c..0000000 --- a/plugins/codemirror/codemirror/addon/hint/pig-hint.js +++ /dev/null @@ -1,121 +0,0 @@ -(function () { - "use strict"; - - function forEach(arr, f) { - for (var i = 0, e = arr.length; i < e; ++i) f(arr[i]); - } - - function arrayContains(arr, item) { - if (!Array.prototype.indexOf) { - var i = arr.length; - while (i--) { - if (arr[i] === item) { - return true; - } - } - return false; - } - return arr.indexOf(item) != -1; - } - - function scriptHint(editor, _keywords, getToken) { - // Find the token at the cursor - var cur = editor.getCursor(), token = getToken(editor, cur), tprop = token; - // If it's not a 'word-style' token, ignore the token. - - if (!/^[\w$_]*$/.test(token.string)) { - token = tprop = {start: cur.ch, end: cur.ch, string: "", state: token.state, - className: token.string == ":" ? "pig-type" : null}; - } - - if (!context) var context = []; - context.push(tprop); - - var completionList = getCompletions(token, context); - completionList = completionList.sort(); - //prevent autocomplete for last word, instead show dropdown with one word - if(completionList.length == 1) { - completionList.push(" "); - } - - return {list: completionList, - from: CodeMirror.Pos(cur.line, token.start), - to: CodeMirror.Pos(cur.line, token.end)}; - } - - function pigHint(editor) { - return scriptHint(editor, pigKeywordsU, function (e, cur) {return e.getTokenAt(cur);}); - } - CodeMirror.pigHint = pigHint; // deprecated - CodeMirror.registerHelper("hint", "pig", pigHint); - - var pigKeywords = "VOID IMPORT RETURNS DEFINE LOAD FILTER FOREACH ORDER CUBE DISTINCT COGROUP " - + "JOIN CROSS UNION SPLIT INTO IF OTHERWISE ALL AS BY USING INNER OUTER ONSCHEMA PARALLEL " - + "PARTITION GROUP AND OR NOT GENERATE FLATTEN ASC DESC IS STREAM THROUGH STORE MAPREDUCE " - + "SHIP CACHE INPUT OUTPUT STDERROR STDIN STDOUT LIMIT SAMPLE LEFT RIGHT FULL EQ GT LT GTE LTE " - + "NEQ MATCHES TRUE FALSE"; - var pigKeywordsU = pigKeywords.split(" "); - var pigKeywordsL = pigKeywords.toLowerCase().split(" "); - - var pigTypes = "BOOLEAN INT LONG FLOAT DOUBLE CHARARRAY BYTEARRAY BAG TUPLE MAP"; - var pigTypesU = pigTypes.split(" "); - var pigTypesL = pigTypes.toLowerCase().split(" "); - - var pigBuiltins = "ABS ACOS ARITY ASIN ATAN AVG BAGSIZE BINSTORAGE BLOOM BUILDBLOOM CBRT CEIL " - + "CONCAT COR COS COSH COUNT COUNT_STAR COV CONSTANTSIZE CUBEDIMENSIONS DIFF DISTINCT DOUBLEABS " - + "DOUBLEAVG DOUBLEBASE DOUBLEMAX DOUBLEMIN DOUBLEROUND DOUBLESUM EXP FLOOR FLOATABS FLOATAVG " - + "FLOATMAX FLOATMIN FLOATROUND FLOATSUM GENERICINVOKER INDEXOF INTABS INTAVG INTMAX INTMIN " - + "INTSUM INVOKEFORDOUBLE INVOKEFORFLOAT INVOKEFORINT INVOKEFORLONG INVOKEFORSTRING INVOKER " - + "ISEMPTY JSONLOADER JSONMETADATA JSONSTORAGE LAST_INDEX_OF LCFIRST LOG LOG10 LOWER LONGABS " - + "LONGAVG LONGMAX LONGMIN LONGSUM MAX MIN MAPSIZE MONITOREDUDF NONDETERMINISTIC OUTPUTSCHEMA " - + "PIGSTORAGE PIGSTREAMING RANDOM REGEX_EXTRACT REGEX_EXTRACT_ALL REPLACE ROUND SIN SINH SIZE " - + "SQRT STRSPLIT SUBSTRING SUM STRINGCONCAT STRINGMAX STRINGMIN STRINGSIZE TAN TANH TOBAG " - + "TOKENIZE TOMAP TOP TOTUPLE TRIM TEXTLOADER TUPLESIZE UCFIRST UPPER UTF8STORAGECONVERTER"; - var pigBuiltinsU = pigBuiltins.split(" ").join("() ").split(" "); - var pigBuiltinsL = pigBuiltins.toLowerCase().split(" ").join("() ").split(" "); - var pigBuiltinsC = ("BagSize BinStorage Bloom BuildBloom ConstantSize CubeDimensions DoubleAbs " - + "DoubleAvg DoubleBase DoubleMax DoubleMin DoubleRound DoubleSum FloatAbs FloatAvg FloatMax " - + "FloatMin FloatRound FloatSum GenericInvoker IntAbs IntAvg IntMax IntMin IntSum " - + "InvokeForDouble InvokeForFloat InvokeForInt InvokeForLong InvokeForString Invoker " - + "IsEmpty JsonLoader JsonMetadata JsonStorage LongAbs LongAvg LongMax LongMin LongSum MapSize " - + "MonitoredUDF Nondeterministic OutputSchema PigStorage PigStreaming StringConcat StringMax " - + "StringMin StringSize TextLoader TupleSize Utf8StorageConverter").split(" ").join("() ").split(" "); - - function getCompletions(token, context) { - var found = [], start = token.string; - function maybeAdd(str) { - if (str.indexOf(start) == 0 && !arrayContains(found, str)) found.push(str); - } - - function gatherCompletions(obj) { - if(obj == ":") { - forEach(pigTypesL, maybeAdd); - } - else { - forEach(pigBuiltinsU, maybeAdd); - forEach(pigBuiltinsL, maybeAdd); - forEach(pigBuiltinsC, maybeAdd); - forEach(pigTypesU, maybeAdd); - forEach(pigTypesL, maybeAdd); - forEach(pigKeywordsU, maybeAdd); - forEach(pigKeywordsL, maybeAdd); - } - } - - if (context) { - // If this is a property, see if it belongs to some object we can - // find in the current environment. - var obj = context.pop(), base; - - if (obj.type == "variable") - base = obj.string; - else if(obj.type == "variable-3") - base = ":" + obj.string; - - while (base != null && context.length) - base = base[context.pop().string]; - if (base != null) gatherCompletions(base); - } - return found; - } -})(); diff --git a/plugins/codemirror/codemirror/addon/hint/python-hint.js b/plugins/codemirror/codemirror/addon/hint/python-hint.js deleted file mode 100644 index 98d2a58..0000000 --- a/plugins/codemirror/codemirror/addon/hint/python-hint.js +++ /dev/null @@ -1,95 +0,0 @@ -(function () { - function forEach(arr, f) { - for (var i = 0, e = arr.length; i < e; ++i) f(arr[i]); - } - - function arrayContains(arr, item) { - if (!Array.prototype.indexOf) { - var i = arr.length; - while (i--) { - if (arr[i] === item) { - return true; - } - } - return false; - } - return arr.indexOf(item) != -1; - } - - function scriptHint(editor, _keywords, getToken) { - // Find the token at the cursor - var cur = editor.getCursor(), token = getToken(editor, cur), tprop = token; - // If it's not a 'word-style' token, ignore the token. - - if (!/^[\w$_]*$/.test(token.string)) { - token = tprop = {start: cur.ch, end: cur.ch, string: "", state: token.state, - className: token.string == ":" ? "python-type" : null}; - } - - if (!context) var context = []; - context.push(tprop); - - var completionList = getCompletions(token, context); - completionList = completionList.sort(); - //prevent autocomplete for last word, instead show dropdown with one word - if(completionList.length == 1) { - completionList.push(" "); - } - - return {list: completionList, - from: CodeMirror.Pos(cur.line, token.start), - to: CodeMirror.Pos(cur.line, token.end)}; - } - - function pythonHint(editor) { - return scriptHint(editor, pythonKeywordsU, function (e, cur) {return e.getTokenAt(cur);}); - } - CodeMirror.pythonHint = pythonHint; // deprecated - CodeMirror.registerHelper("hint", "python", pythonHint); - - var pythonKeywords = "and del from not while as elif global or with assert else if pass yield" -+ "break except import print class exec in raise continue finally is return def for lambda try"; - var pythonKeywordsL = pythonKeywords.split(" "); - var pythonKeywordsU = pythonKeywords.toUpperCase().split(" "); - - var pythonBuiltins = "abs divmod input open staticmethod all enumerate int ord str " -+ "any eval isinstance pow sum basestring execfile issubclass print super" -+ "bin file iter property tuple bool filter len range type" -+ "bytearray float list raw_input unichr callable format locals reduce unicode" -+ "chr frozenset long reload vars classmethod getattr map repr xrange" -+ "cmp globals max reversed zip compile hasattr memoryview round __import__" -+ "complex hash min set apply delattr help next setattr buffer" -+ "dict hex object slice coerce dir id oct sorted intern "; - var pythonBuiltinsL = pythonBuiltins.split(" ").join("() ").split(" "); - var pythonBuiltinsU = pythonBuiltins.toUpperCase().split(" ").join("() ").split(" "); - - function getCompletions(token, context) { - var found = [], start = token.string; - function maybeAdd(str) { - if (str.indexOf(start) == 0 && !arrayContains(found, str)) found.push(str); - } - - function gatherCompletions(_obj) { - forEach(pythonBuiltinsL, maybeAdd); - forEach(pythonBuiltinsU, maybeAdd); - forEach(pythonKeywordsL, maybeAdd); - forEach(pythonKeywordsU, maybeAdd); - } - - if (context) { - // If this is a property, see if it belongs to some object we can - // find in the current environment. - var obj = context.pop(), base; - - if (obj.type == "variable") - base = obj.string; - else if(obj.type == "variable-3") - base = ":" + obj.string; - - while (base != null && context.length) - base = base[context.pop().string]; - if (base != null) gatherCompletions(base); - } - return found; - } -})(); diff --git a/plugins/codemirror/codemirror/addon/hint/show-hint.css b/plugins/codemirror/codemirror/addon/hint/show-hint.css deleted file mode 100644 index 8a4ff05..0000000 --- a/plugins/codemirror/codemirror/addon/hint/show-hint.css +++ /dev/null @@ -1,38 +0,0 @@ -.CodeMirror-hints { - position: absolute; - z-index: 10; - overflow: hidden; - list-style: none; - - margin: 0; - padding: 2px; - - -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2); - -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2); - box-shadow: 2px 3px 5px rgba(0,0,0,.2); - border-radius: 3px; - border: 1px solid silver; - - background: white; - font-size: 90%; - font-family: monospace; - - max-height: 20em; - overflow-y: auto; -} - -.CodeMirror-hint { - margin: 0; - padding: 0 4px; - border-radius: 2px; - max-width: 19em; - overflow: hidden; - white-space: pre; - color: black; - cursor: pointer; -} - -.CodeMirror-hint-active { - background: #08f; - color: white; -} diff --git a/plugins/codemirror/codemirror/addon/hint/show-hint.js b/plugins/codemirror/codemirror/addon/hint/show-hint.js deleted file mode 100644 index 46103b7..0000000 --- a/plugins/codemirror/codemirror/addon/hint/show-hint.js +++ /dev/null @@ -1,286 +0,0 @@ -(function() { - "use strict"; - - var HINT_ELEMENT_CLASS = "CodeMirror-hint"; - var ACTIVE_HINT_ELEMENT_CLASS = "CodeMirror-hint-active"; - - CodeMirror.showHint = function(cm, getHints, options) { - // We want a single cursor position. - if (cm.somethingSelected()) return; - if (getHints == null) getHints = cm.getHelper(cm.getCursor(), "hint"); - if (getHints == null) return; - - if (cm.state.completionActive) cm.state.completionActive.close(); - - var completion = cm.state.completionActive = new Completion(cm, getHints, options || {}); - CodeMirror.signal(cm, "startCompletion", cm); - if (completion.options.async) - getHints(cm, function(hints) { completion.showHints(hints); }, completion.options); - else - return completion.showHints(getHints(cm, completion.options)); - }; - - function Completion(cm, getHints, options) { - this.cm = cm; - this.getHints = getHints; - this.options = options; - this.widget = this.onClose = null; - } - - Completion.prototype = { - close: function() { - if (!this.active()) return; - this.cm.state.completionActive = null; - - if (this.widget) this.widget.close(); - if (this.onClose) this.onClose(); - CodeMirror.signal(this.cm, "endCompletion", this.cm); - }, - - active: function() { - return this.cm.state.completionActive == this; - }, - - pick: function(data, i) { - var completion = data.list[i]; - if (completion.hint) completion.hint(this.cm, data, completion); - else this.cm.replaceRange(getText(completion), data.from, data.to); - this.close(); - }, - - showHints: function(data) { - if (!data || !data.list.length || !this.active()) return this.close(); - - if (this.options.completeSingle != false && data.list.length == 1) - this.pick(data, 0); - else - this.showWidget(data); - }, - - showWidget: function(data) { - this.widget = new Widget(this, data); - CodeMirror.signal(data, "shown"); - - var debounce = null, completion = this, finished; - var closeOn = this.options.closeCharacters || /[\s()\[\]{};:>,]/; - var startPos = this.cm.getCursor(), startLen = this.cm.getLine(startPos.line).length; - - function done() { - if (finished) return; - finished = true; - completion.close(); - completion.cm.off("cursorActivity", activity); - if (data) CodeMirror.signal(data, "close"); - } - - function update() { - if (finished) return; - CodeMirror.signal(data, "update"); - if (completion.options.async) - completion.getHints(completion.cm, finishUpdate, completion.options); - else - finishUpdate(completion.getHints(completion.cm, completion.options)); - } - function finishUpdate(data_) { - data = data_; - if (finished) return; - if (!data || !data.list.length) return done(); - completion.widget = new Widget(completion, data); - } - - function activity() { - clearTimeout(debounce); - var pos = completion.cm.getCursor(), line = completion.cm.getLine(pos.line); - if (pos.line != startPos.line || line.length - pos.ch != startLen - startPos.ch || - pos.ch < startPos.ch || completion.cm.somethingSelected() || - (pos.ch && closeOn.test(line.charAt(pos.ch - 1)))) { - completion.close(); - } else { - debounce = setTimeout(update, 170); - if (completion.widget) completion.widget.close(); - } - } - this.cm.on("cursorActivity", activity); - this.onClose = done; - } - }; - - function getText(completion) { - if (typeof completion == "string") return completion; - else return completion.text; - } - - function buildKeyMap(options, handle) { - var baseMap = { - Up: function() {handle.moveFocus(-1);}, - Down: function() {handle.moveFocus(1);}, - PageUp: function() {handle.moveFocus(-handle.menuSize() + 1, true);}, - PageDown: function() {handle.moveFocus(handle.menuSize() - 1, true);}, - Home: function() {handle.setFocus(0);}, - End: function() {handle.setFocus(handle.length - 1);}, - Enter: handle.pick, - Tab: handle.pick, - Esc: handle.close - }; - var ourMap = options.customKeys ? {} : baseMap; - function addBinding(key, val) { - var bound; - if (typeof val != "string") - bound = function(cm) { return val(cm, handle); }; - // This mechanism is deprecated - else if (baseMap.hasOwnProperty(val)) - bound = baseMap[val]; - else - bound = val; - ourMap[key] = bound; - } - if (options.customKeys) - for (var key in options.customKeys) if (options.customKeys.hasOwnProperty(key)) - addBinding(key, options.customKeys[key]); - if (options.extraKeys) - for (var key in options.extraKeys) if (options.extraKeys.hasOwnProperty(key)) - addBinding(key, options.extraKeys[key]); - return ourMap; - } - - function getHintElement(stopAt, el) { - while (el && el != stopAt) { - if (el.nodeName.toUpperCase() === "LI") return el; - el = el.parentNode; - } - } - - function Widget(completion, data) { - this.completion = completion; - this.data = data; - var widget = this, cm = completion.cm, options = completion.options; - - var hints = this.hints = document.createElement("ul"); - hints.className = "CodeMirror-hints"; - this.selectedHint = options.getDefaultSelection ? options.getDefaultSelection(cm,options,data) : 0; - - var completions = data.list; - for (var i = 0; i < completions.length; ++i) { - var elt = hints.appendChild(document.createElement("li")), cur = completions[i]; - var className = HINT_ELEMENT_CLASS + (i != this.selectedHint ? "" : " " + ACTIVE_HINT_ELEMENT_CLASS); - if (cur.className != null) className = cur.className + " " + className; - elt.className = className; - if (cur.render) cur.render(elt, data, cur); - else elt.appendChild(document.createTextNode(cur.displayText || getText(cur))); - elt.hintId = i; - } - - var pos = cm.cursorCoords(options.alignWithWord !== false ? data.from : null); - var left = pos.left, top = pos.bottom, below = true; - hints.style.left = left + "px"; - hints.style.top = top + "px"; - // If we're at the edge of the screen, then we want the menu to appear on the left of the cursor. - var winW = window.innerWidth || Math.max(document.body.offsetWidth, document.documentElement.offsetWidth); - var winH = window.innerHeight || Math.max(document.body.offsetHeight, document.documentElement.offsetHeight); - (options.container || document.body).appendChild(hints); - var box = hints.getBoundingClientRect(); - var overlapX = box.right - winW, overlapY = box.bottom - winH; - if (overlapX > 0) { - if (box.right - box.left > winW) { - hints.style.width = (winW - 5) + "px"; - overlapX -= (box.right - box.left) - winW; - } - hints.style.left = (left = pos.left - overlapX) + "px"; - } - if (overlapY > 0) { - var height = box.bottom - box.top; - if (box.top - (pos.bottom - pos.top) - height > 0) { - overlapY = height + (pos.bottom - pos.top); - below = false; - } else if (height > winH) { - hints.style.height = (winH - 5) + "px"; - overlapY -= height - winH; - } - hints.style.top = (top = pos.bottom - overlapY) + "px"; - } - - cm.addKeyMap(this.keyMap = buildKeyMap(options, { - moveFocus: function(n, avoidWrap) { widget.changeActive(widget.selectedHint + n, avoidWrap); }, - setFocus: function(n) { widget.changeActive(n); }, - menuSize: function() { return widget.screenAmount(); }, - length: completions.length, - close: function() { completion.close(); }, - pick: function() { widget.pick(); } - })); - - if (options.closeOnUnfocus !== false) { - var closingOnBlur; - cm.on("blur", this.onBlur = function() { closingOnBlur = setTimeout(function() { completion.close(); }, 100); }); - cm.on("focus", this.onFocus = function() { clearTimeout(closingOnBlur); }); - } - - var startScroll = cm.getScrollInfo(); - cm.on("scroll", this.onScroll = function() { - var curScroll = cm.getScrollInfo(), editor = cm.getWrapperElement().getBoundingClientRect(); - var newTop = top + startScroll.top - curScroll.top; - var point = newTop - (window.pageYOffset || (document.documentElement || document.body).scrollTop); - if (!below) point += hints.offsetHeight; - if (point <= editor.top || point >= editor.bottom) return completion.close(); - hints.style.top = newTop + "px"; - hints.style.left = (left + startScroll.left - curScroll.left) + "px"; - }); - - CodeMirror.on(hints, "dblclick", function(e) { - var t = getHintElement(hints, e.target || e.srcElement); - if (t && t.hintId != null) {widget.changeActive(t.hintId); widget.pick();} - }); - - CodeMirror.on(hints, "click", function(e) { - var t = getHintElement(hints, e.target || e.srcElement); - if (t && t.hintId != null) widget.changeActive(t.hintId); - }); - - CodeMirror.on(hints, "mousedown", function() { - setTimeout(function(){cm.focus();}, 20); - }); - - CodeMirror.signal(data, "select", completions[0], hints.firstChild); - return true; - } - - Widget.prototype = { - close: function() { - if (this.completion.widget != this) return; - this.completion.widget = null; - this.hints.parentNode.removeChild(this.hints); - this.completion.cm.removeKeyMap(this.keyMap); - - var cm = this.completion.cm; - if (this.completion.options.closeOnUnfocus !== false) { - cm.off("blur", this.onBlur); - cm.off("focus", this.onFocus); - } - cm.off("scroll", this.onScroll); - }, - - pick: function() { - this.completion.pick(this.data, this.selectedHint); - }, - - changeActive: function(i, avoidWrap) { - if (i >= this.data.list.length) - i = avoidWrap ? this.data.list.length - 1 : 0; - else if (i < 0) - i = avoidWrap ? 0 : this.data.list.length - 1; - if (this.selectedHint == i) return; - var node = this.hints.childNodes[this.selectedHint]; - node.className = node.className.replace(" " + ACTIVE_HINT_ELEMENT_CLASS, ""); - node = this.hints.childNodes[this.selectedHint = i]; - node.className += " " + ACTIVE_HINT_ELEMENT_CLASS; - if (node.offsetTop < this.hints.scrollTop) - this.hints.scrollTop = node.offsetTop - 3; - else if (node.offsetTop + node.offsetHeight > this.hints.scrollTop + this.hints.clientHeight) - this.hints.scrollTop = node.offsetTop + node.offsetHeight - this.hints.clientHeight + 3; - CodeMirror.signal(this.data, "select", this.data.list[this.selectedHint], node); - }, - - screenAmount: function() { - return Math.floor(this.hints.clientHeight / this.hints.firstChild.offsetHeight) || 1; - } - }; -})(); diff --git a/plugins/codemirror/codemirror/addon/hint/sql-hint.js b/plugins/codemirror/codemirror/addon/hint/sql-hint.js deleted file mode 100644 index 95f6b50..0000000 --- a/plugins/codemirror/codemirror/addon/hint/sql-hint.js +++ /dev/null @@ -1,105 +0,0 @@ -(function () { - "use strict"; - - var tables; - var keywords; - - function getKeywords(editor) { - var mode = editor.doc.modeOption; - if(mode === "sql") mode = "text/x-sql"; - return CodeMirror.resolveMode(mode).keywords; - } - - function match(string, word) { - var len = string.length; - var sub = word.substr(0, len); - return string.toUpperCase() === sub.toUpperCase(); - } - - function addMatches(result, search, wordlist, formatter) { - for(var word in wordlist) { - if(!wordlist.hasOwnProperty(word)) continue; - if(Array.isArray(wordlist)) { - word = wordlist[word]; - } - if(match(search, word)) { - result.push(formatter(word)); - } - } - } - - function columnCompletion(result, editor) { - var cur = editor.getCursor(); - var token = editor.getTokenAt(cur); - var string = token.string.substr(1); - var prevCur = CodeMirror.Pos(cur.line, token.start); - var table = editor.getTokenAt(prevCur).string; - var columns = tables[table]; - if(!columns) { - table = findTableByAlias(table, editor); - } - columns = tables[table]; - if(!columns) { - return; - } - addMatches(result, string, columns, - function(w) {return "." + w;}); - } - - function eachWord(line, f) { - var words = line.text.split(" "); - for(var i = 0; i < words.length; i++) { - f(words[i]); - } - } - - // Tries to find possible table name from alias. - function findTableByAlias(alias, editor) { - var aliasUpperCase = alias.toUpperCase(); - var previousWord = ""; - var table = ""; - - editor.eachLine(function(line) { - eachWord(line, function(word) { - var wordUpperCase = word.toUpperCase(); - if(wordUpperCase === aliasUpperCase) { - if(tables.hasOwnProperty(previousWord)) { - table = previousWord; - } - } - if(wordUpperCase !== "AS") { - previousWord = word; - } - }); - }); - return table; - } - - function sqlHint(editor, options) { - tables = (options && options.tables) || {}; - keywords = keywords || getKeywords(editor); - var cur = editor.getCursor(); - var token = editor.getTokenAt(cur); - - var result = []; - - var search = token.string.trim(); - - addMatches(result, search, keywords, - function(w) {return w.toUpperCase();}); - - addMatches(result, search, tables, - function(w) {return w;}); - - if(search.lastIndexOf('.') === 0) { - columnCompletion(result, editor); - } - - return { - list: result, - from: CodeMirror.Pos(cur.line, token.start), - to: CodeMirror.Pos(cur.line, token.end) - }; - } - CodeMirror.registerHelper("hint", "sql", sqlHint); -})(); diff --git a/plugins/codemirror/codemirror/addon/hint/xml-hint.js b/plugins/codemirror/codemirror/addon/hint/xml-hint.js deleted file mode 100644 index a721743..0000000 --- a/plugins/codemirror/codemirror/addon/hint/xml-hint.js +++ /dev/null @@ -1,69 +0,0 @@ -(function() { - "use strict"; - - var Pos = CodeMirror.Pos; - - function getHints(cm, options) { - var tags = options && options.schemaInfo; - var quote = (options && options.quoteChar) || '"'; - if (!tags) return; - var cur = cm.getCursor(), token = cm.getTokenAt(cur); - var inner = CodeMirror.innerMode(cm.getMode(), token.state); - if (inner.mode.name != "xml") return; - var result = [], replaceToken = false, prefix; - var isTag = token.string.charAt(0) == "<"; - if (!inner.state.tagName || isTag) { // Tag completion - if (isTag) { - prefix = token.string.slice(1); - replaceToken = true; - } - var cx = inner.state.context, curTag = cx && tags[cx.tagName]; - var childList = cx ? curTag && curTag.children : tags["!top"]; - if (childList) { - for (var i = 0; i < childList.length; ++i) if (!prefix || childList[i].indexOf(prefix) == 0) - result.push("<" + childList[i]); - } else { - for (var name in tags) if (tags.hasOwnProperty(name) && name != "!top" && (!prefix || name.indexOf(prefix) == 0)) - result.push("<" + name); - } - if (cx && (!prefix || ("/" + cx.tagName).indexOf(prefix) == 0)) - result.push(""); - } else { - // Attribute completion - var curTag = tags[inner.state.tagName], attrs = curTag && curTag.attrs; - if (!attrs) return; - if (token.type == "string" || token.string == "=") { // A value - var before = cm.getRange(Pos(cur.line, Math.max(0, cur.ch - 60)), - Pos(cur.line, token.type == "string" ? token.start : token.end)); - var atName = before.match(/([^\s\u00a0=<>\"\']+)=$/), atValues; - if (!atName || !attrs.hasOwnProperty(atName[1]) || !(atValues = attrs[atName[1]])) return; - if (typeof atValues == 'function') atValues = atValues.call(this, cm); // Functions can be used to supply values for autocomplete widget - if (token.type == "string") { - prefix = token.string; - if (/['"]/.test(token.string.charAt(0))) { - quote = token.string.charAt(0); - prefix = token.string.slice(1); - } - replaceToken = true; - } - for (var i = 0; i < atValues.length; ++i) if (!prefix || atValues[i].indexOf(prefix) == 0) - result.push(quote + atValues[i] + quote); - } else { // An attribute name - if (token.type == "attribute") { - prefix = token.string; - replaceToken = true; - } - for (var attr in attrs) if (attrs.hasOwnProperty(attr) && (!prefix || attr.indexOf(prefix) == 0)) - result.push(attr); - } - } - return { - list: result, - from: replaceToken ? Pos(cur.line, token.start) : cur, - to: replaceToken ? Pos(cur.line, token.end) : cur - }; - } - - CodeMirror.xmlHint = getHints; // deprecated - CodeMirror.registerHelper("hint", "xml", getHints); -})(); diff --git a/plugins/codemirror/codemirror/addon/lint/coffeescript-lint.js b/plugins/codemirror/codemirror/addon/lint/coffeescript-lint.js deleted file mode 100644 index 7f55a29..0000000 --- a/plugins/codemirror/codemirror/addon/lint/coffeescript-lint.js +++ /dev/null @@ -1,27 +0,0 @@ -// Depends on coffeelint.js from http://www.coffeelint.org/js/coffeelint.js - -// declare global: coffeelint - -CodeMirror.registerHelper("lint", "coffeescript", function(text) { - var found = []; - var parseError = function(err) { - var loc = err.lineNumber; - found.push({from: CodeMirror.Pos(loc-1, 0), - to: CodeMirror.Pos(loc, 0), - severity: err.level, - message: err.message}); - }; - try { - var res = coffeelint.lint(text); - for(var i = 0; i < res.length; i++) { - parseError(res[i]); - } - } catch(e) { - found.push({from: CodeMirror.Pos(e.location.first_line, 0), - to: CodeMirror.Pos(e.location.last_line, e.location.last_column), - severity: 'error', - message: e.message}); - } - return found; -}); -CodeMirror.coffeeValidator = CodeMirror.lint.coffeescript; // deprecated diff --git a/plugins/codemirror/codemirror/addon/lint/css-lint.js b/plugins/codemirror/codemirror/addon/lint/css-lint.js deleted file mode 100644 index 1de71fb..0000000 --- a/plugins/codemirror/codemirror/addon/lint/css-lint.js +++ /dev/null @@ -1,19 +0,0 @@ -// Depends on csslint.js from https://github.com/stubbornella/csslint - -// declare global: CSSLint - -CodeMirror.registerHelper("lint", "css", function(text) { - var found = []; - var results = CSSLint.verify(text), messages = results.messages, message = null; - for ( var i = 0; i < messages.length; i++) { - message = messages[i]; - var startLine = message.line -1, endLine = message.line -1, startCol = message.col -1, endCol = message.col; - found.push({ - from: CodeMirror.Pos(startLine, startCol), - to: CodeMirror.Pos(endLine, endCol), - message: message.message, - severity : message.type - }); - } - return found; -}); diff --git a/plugins/codemirror/codemirror/addon/lint/javascript-lint.js b/plugins/codemirror/codemirror/addon/lint/javascript-lint.js deleted file mode 100644 index 7123ab7..0000000 --- a/plugins/codemirror/codemirror/addon/lint/javascript-lint.js +++ /dev/null @@ -1,126 +0,0 @@ -(function() { - "use strict"; - // declare global: JSHINT - - var bogus = [ "Dangerous comment" ]; - - var warnings = [ [ "Expected '{'", - "Statement body should be inside '{ }' braces." ] ]; - - var errors = [ "Missing semicolon", "Extra comma", "Missing property name", - "Unmatched ", " and instead saw", " is not defined", - "Unclosed string", "Stopping, unable to continue" ]; - - function validator(text, options) { - JSHINT(text, options); - var errors = JSHINT.data().errors, result = []; - if (errors) parseErrors(errors, result); - return result; - } - - CodeMirror.registerHelper("lint", "javascript", validator); - CodeMirror.javascriptValidator = CodeMirror.lint.javascript; // deprecated - - function cleanup(error) { - // All problems are warnings by default - fixWith(error, warnings, "warning", true); - fixWith(error, errors, "error"); - - return isBogus(error) ? null : error; - } - - function fixWith(error, fixes, severity, force) { - var description, fix, find, replace, found; - - description = error.description; - - for ( var i = 0; i < fixes.length; i++) { - fix = fixes[i]; - find = (typeof fix === "string" ? fix : fix[0]); - replace = (typeof fix === "string" ? null : fix[1]); - found = description.indexOf(find) !== -1; - - if (force || found) { - error.severity = severity; - } - if (found && replace) { - error.description = replace; - } - } - } - - function isBogus(error) { - var description = error.description; - for ( var i = 0; i < bogus.length; i++) { - if (description.indexOf(bogus[i]) !== -1) { - return true; - } - } - return false; - } - - function parseErrors(errors, output) { - for ( var i = 0; i < errors.length; i++) { - var error = errors[i]; - if (error) { - var linetabpositions, index; - - linetabpositions = []; - - // This next block is to fix a problem in jshint. Jshint - // replaces - // all tabs with spaces then performs some checks. The error - // positions (character/space) are then reported incorrectly, - // not taking the replacement step into account. Here we look - // at the evidence line and try to adjust the character position - // to the correct value. - if (error.evidence) { - // Tab positions are computed once per line and cached - var tabpositions = linetabpositions[error.line]; - if (!tabpositions) { - var evidence = error.evidence; - tabpositions = []; - // ugggh phantomjs does not like this - // forEachChar(evidence, function(item, index) { - Array.prototype.forEach.call(evidence, function(item, - index) { - if (item === '\t') { - // First col is 1 (not 0) to match error - // positions - tabpositions.push(index + 1); - } - }); - linetabpositions[error.line] = tabpositions; - } - if (tabpositions.length > 0) { - var pos = error.character; - tabpositions.forEach(function(tabposition) { - if (pos > tabposition) pos -= 1; - }); - error.character = pos; - } - } - - var start = error.character - 1, end = start + 1; - if (error.evidence) { - index = error.evidence.substring(start).search(/.\b/); - if (index > -1) { - end += index; - } - } - - // Convert to format expected by validation service - error.description = error.reason;// + "(jshint)"; - error.start = error.character; - error.end = end; - error = cleanup(error); - - if (error) - output.push({message: error.description, - severity: error.severity, - from: CodeMirror.Pos(error.line - 1, start), - to: CodeMirror.Pos(error.line - 1, end)}); - } - } - } -})(); diff --git a/plugins/codemirror/codemirror/addon/lint/json-lint.js b/plugins/codemirror/codemirror/addon/lint/json-lint.js deleted file mode 100644 index e10e11b..0000000 --- a/plugins/codemirror/codemirror/addon/lint/json-lint.js +++ /dev/null @@ -1,17 +0,0 @@ -// Depends on jsonlint.js from https://github.com/zaach/jsonlint - -// declare global: jsonlint - -CodeMirror.registerHelper("lint", "json", function(text) { - var found = []; - jsonlint.parseError = function(str, hash) { - var loc = hash.loc; - found.push({from: CodeMirror.Pos(loc.first_line - 1, loc.first_column), - to: CodeMirror.Pos(loc.last_line - 1, loc.last_column), - message: str}); - }; - try { jsonlint.parse(text); } - catch(e) {} - return found; -}); -CodeMirror.jsonValidator = CodeMirror.lint.json; // deprecated diff --git a/plugins/codemirror/codemirror/addon/lint/lint.css b/plugins/codemirror/codemirror/addon/lint/lint.css deleted file mode 100644 index 414a9a0..0000000 --- a/plugins/codemirror/codemirror/addon/lint/lint.css +++ /dev/null @@ -1,73 +0,0 @@ -/* The lint marker gutter */ -.CodeMirror-lint-markers { - width: 16px; -} - -.CodeMirror-lint-tooltip { - background-color: infobackground; - border: 1px solid black; - border-radius: 4px 4px 4px 4px; - color: infotext; - font-family: monospace; - font-size: 10pt; - overflow: hidden; - padding: 2px 5px; - position: fixed; - white-space: pre; - white-space: pre-wrap; - z-index: 100; - max-width: 600px; - opacity: 0; - transition: opacity .4s; - -moz-transition: opacity .4s; - -webkit-transition: opacity .4s; - -o-transition: opacity .4s; - -ms-transition: opacity .4s; -} - -.CodeMirror-lint-mark-error, .CodeMirror-lint-mark-warning { - background-position: left bottom; - background-repeat: repeat-x; -} - -.CodeMirror-lint-mark-error { - background-image: - url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==") - ; -} - -.CodeMirror-lint-mark-warning { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII="); -} - -.CodeMirror-lint-marker-error, .CodeMirror-lint-marker-warning { - background-position: center center; - background-repeat: no-repeat; - cursor: pointer; - display: inline-block; - height: 16px; - width: 16px; - vertical-align: middle; - position: relative; -} - -.CodeMirror-lint-message-error, .CodeMirror-lint-message-warning { - padding-left: 18px; - background-position: top left; - background-repeat: no-repeat; -} - -.CodeMirror-lint-marker-error, .CodeMirror-lint-message-error { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII="); -} - -.CodeMirror-lint-marker-warning, .CodeMirror-lint-message-warning { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII="); -} - -.CodeMirror-lint-marker-multiple { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC"); - background-repeat: no-repeat; - background-position: right bottom; - width: 100%; height: 100%; -} diff --git a/plugins/codemirror/codemirror/addon/lint/lint.js b/plugins/codemirror/codemirror/addon/lint/lint.js deleted file mode 100644 index b502ee4..0000000 --- a/plugins/codemirror/codemirror/addon/lint/lint.js +++ /dev/null @@ -1,203 +0,0 @@ -(function() { - "use strict"; - var GUTTER_ID = "CodeMirror-lint-markers"; - var SEVERITIES = /^(?:error|warning)$/; - - function showTooltip(e, content) { - var tt = document.createElement("div"); - tt.className = "CodeMirror-lint-tooltip"; - tt.appendChild(content.cloneNode(true)); - document.body.appendChild(tt); - - function position(e) { - if (!tt.parentNode) return CodeMirror.off(document, "mousemove", position); - tt.style.top = Math.max(0, e.clientY - tt.offsetHeight - 5) + "px"; - tt.style.left = (e.clientX + 5) + "px"; - } - CodeMirror.on(document, "mousemove", position); - position(e); - if (tt.style.opacity != null) tt.style.opacity = 1; - return tt; - } - function rm(elt) { - if (elt.parentNode) elt.parentNode.removeChild(elt); - } - function hideTooltip(tt) { - if (!tt.parentNode) return; - if (tt.style.opacity == null) rm(tt); - tt.style.opacity = 0; - setTimeout(function() { rm(tt); }, 600); - } - - function showTooltipFor(e, content, node) { - var tooltip = showTooltip(e, content); - function hide() { - CodeMirror.off(node, "mouseout", hide); - if (tooltip) { hideTooltip(tooltip); tooltip = null; } - } - var poll = setInterval(function() { - if (tooltip) for (var n = node;; n = n.parentNode) { - if (n == document.body) return; - if (!n) { hide(); break; } - } - if (!tooltip) return clearInterval(poll); - }, 400); - CodeMirror.on(node, "mouseout", hide); - } - - function LintState(cm, options, hasGutter) { - this.marked = []; - this.options = options; - this.timeout = null; - this.hasGutter = hasGutter; - this.onMouseOver = function(e) { onMouseOver(cm, e); }; - } - - function parseOptions(cm, options) { - if (options instanceof Function) return {getAnnotations: options}; - if (!options || options === true) options = {}; - if (!options.getAnnotations) options.getAnnotations = cm.getHelper(CodeMirror.Pos(0, 0), "lint"); - if (!options.getAnnotations) throw new Error("Required option 'getAnnotations' missing (lint addon)"); - return options; - } - - function clearMarks(cm) { - var state = cm.state.lint; - if (state.hasGutter) cm.clearGutter(GUTTER_ID); - for (var i = 0; i < state.marked.length; ++i) - state.marked[i].clear(); - state.marked.length = 0; - } - - function makeMarker(labels, severity, multiple, tooltips) { - var marker = document.createElement("div"), inner = marker; - marker.className = "CodeMirror-lint-marker-" + severity; - if (multiple) { - inner = marker.appendChild(document.createElement("div")); - inner.className = "CodeMirror-lint-marker-multiple"; - } - - if (tooltips != false) CodeMirror.on(inner, "mouseover", function(e) { - showTooltipFor(e, labels, inner); - }); - - return marker; - } - - function getMaxSeverity(a, b) { - if (a == "error") return a; - else return b; - } - - function groupByLine(annotations) { - var lines = []; - for (var i = 0; i < annotations.length; ++i) { - var ann = annotations[i], line = ann.from.line; - (lines[line] || (lines[line] = [])).push(ann); - } - return lines; - } - - function annotationTooltip(ann) { - var severity = ann.severity; - if (!SEVERITIES.test(severity)) severity = "error"; - var tip = document.createElement("div"); - tip.className = "CodeMirror-lint-message-" + severity; - tip.appendChild(document.createTextNode(ann.message)); - return tip; - } - - function startLinting(cm) { - var state = cm.state.lint, options = state.options; - if (options.async) - options.getAnnotations(cm, updateLinting, options); - else - updateLinting(cm, options.getAnnotations(cm.getValue(), options)); - } - - function updateLinting(cm, annotationsNotSorted) { - clearMarks(cm); - var state = cm.state.lint, options = state.options; - - var annotations = groupByLine(annotationsNotSorted); - - for (var line = 0; line < annotations.length; ++line) { - var anns = annotations[line]; - if (!anns) continue; - - var maxSeverity = null; - var tipLabel = state.hasGutter && document.createDocumentFragment(); - - for (var i = 0; i < anns.length; ++i) { - var ann = anns[i]; - var severity = ann.severity; - if (!SEVERITIES.test(severity)) severity = "error"; - maxSeverity = getMaxSeverity(maxSeverity, severity); - - if (options.formatAnnotation) ann = options.formatAnnotation(ann); - if (state.hasGutter) tipLabel.appendChild(annotationTooltip(ann)); - - if (ann.to) state.marked.push(cm.markText(ann.from, ann.to, { - className: "CodeMirror-lint-mark-" + severity, - __annotation: ann - })); - } - - if (state.hasGutter) - cm.setGutterMarker(line, GUTTER_ID, makeMarker(tipLabel, maxSeverity, anns.length > 1, - state.options.tooltips)); - } - if (options.onUpdateLinting) options.onUpdateLinting(annotationsNotSorted, annotations, cm); - } - - function onChange(cm) { - var state = cm.state.lint; - clearTimeout(state.timeout); - state.timeout = setTimeout(function(){startLinting(cm);}, state.options.delay || 500); - } - - function popupSpanTooltip(ann, e) { - var target = e.target || e.srcElement; - showTooltipFor(e, annotationTooltip(ann), target); - } - - // When the mouseover fires, the cursor might not actually be over - // the character itself yet. These pairs of x,y offsets are used to - // probe a few nearby points when no suitable marked range is found. - var nearby = [0, 0, 0, 5, 0, -5, 5, 0, -5, 0]; - - function onMouseOver(cm, e) { - if (!/\bCodeMirror-lint-mark-/.test((e.target || e.srcElement).className)) return; - for (var i = 0; i < nearby.length; i += 2) { - var spans = cm.findMarksAt(cm.coordsChar({left: e.clientX + nearby[i], - top: e.clientY + nearby[i + 1]})); - for (var j = 0; j < spans.length; ++j) { - var span = spans[j], ann = span.__annotation; - if (ann) return popupSpanTooltip(ann, e); - } - } - } - - function optionHandler(cm, val, old) { - if (old && old != CodeMirror.Init) { - clearMarks(cm); - cm.off("change", onChange); - CodeMirror.off(cm.getWrapperElement(), "mouseover", cm.state.lint.onMouseOver); - delete cm.state.lint; - } - - if (val) { - var gutters = cm.getOption("gutters"), hasLintGutter = false; - for (var i = 0; i < gutters.length; ++i) if (gutters[i] == GUTTER_ID) hasLintGutter = true; - var state = cm.state.lint = new LintState(cm, parseOptions(cm, val), hasLintGutter); - cm.on("change", onChange); - if (state.options.tooltips != false) - CodeMirror.on(cm.getWrapperElement(), "mouseover", state.onMouseOver); - - startLinting(cm); - } - } - - CodeMirror.defineOption("lintWith", false, optionHandler); // deprecated - CodeMirror.defineOption("lint", false, optionHandler); // deprecated -})(); diff --git a/plugins/codemirror/codemirror/addon/merge/dep/diff_match_patch.js b/plugins/codemirror/codemirror/addon/merge/dep/diff_match_patch.js deleted file mode 100644 index ac34105..0000000 --- a/plugins/codemirror/codemirror/addon/merge/dep/diff_match_patch.js +++ /dev/null @@ -1,50 +0,0 @@ -// From https://code.google.com/p/google-diff-match-patch/ , licensed under the Apache License 2.0 -(function(){function diff_match_patch(){this.Diff_Timeout=1;this.Diff_EditCost=4;this.Match_Threshold=0.5;this.Match_Distance=1E3;this.Patch_DeleteThreshold=0.5;this.Patch_Margin=4;this.Match_MaxBits=32} -diff_match_patch.prototype.diff_main=function(a,b,c,d){"undefined"==typeof d&&(d=0>=this.Diff_Timeout?Number.MAX_VALUE:(new Date).getTime()+1E3*this.Diff_Timeout);if(null==a||null==b)throw Error("Null input. (diff_main)");if(a==b)return a?[[0,a]]:[];"undefined"==typeof c&&(c=!0);var e=c,f=this.diff_commonPrefix(a,b);c=a.substring(0,f);a=a.substring(f);b=b.substring(f);var f=this.diff_commonSuffix(a,b),g=a.substring(a.length-f);a=a.substring(0,a.length-f);b=b.substring(0,b.length-f);a=this.diff_compute_(a, -b,e,d);c&&a.unshift([0,c]);g&&a.push([0,g]);this.diff_cleanupMerge(a);return a}; -diff_match_patch.prototype.diff_compute_=function(a,b,c,d){if(!a)return[[1,b]];if(!b)return[[-1,a]];var e=a.length>b.length?a:b,f=a.length>b.length?b:a,g=e.indexOf(f);return-1!=g?(c=[[1,e.substring(0,g)],[0,f],[1,e.substring(g+f.length)]],a.length>b.length&&(c[0][0]=c[2][0]=-1),c):1==f.length?[[-1,a],[1,b]]:(e=this.diff_halfMatch_(a,b))?(f=e[0],a=e[1],g=e[2],b=e[3],e=e[4],f=this.diff_main(f,g,c,d),c=this.diff_main(a,b,c,d),f.concat([[0,e]],c)):c&&100c);v++){for(var n=-v+r;n<=v-t;n+=2){var l=g+n,m;m=n==-v||n!=v&&j[l-1]d)t+=2;else if(s>e)r+=2;else if(q&&(l=g+k-n,0<=l&&l= -u)return this.diff_bisectSplit_(a,b,m,s,c)}}for(n=-v+p;n<=v-w;n+=2){l=g+n;u=n==-v||n!=v&&i[l-1]d)w+=2;else if(m>e)p+=2;else if(!q&&(l=g+k-n,0<=l&&(l=u)))return this.diff_bisectSplit_(a,b,m,s,c)}}return[[-1,a],[1,b]]}; -diff_match_patch.prototype.diff_bisectSplit_=function(a,b,c,d,e){var f=a.substring(0,c),g=b.substring(0,d);a=a.substring(c);b=b.substring(d);f=this.diff_main(f,g,!1,e);e=this.diff_main(a,b,!1,e);return f.concat(e)}; -diff_match_patch.prototype.diff_linesToChars_=function(a,b){function c(a){for(var b="",c=0,f=-1,g=d.length;fd?a=a.substring(c-d):c=a.length?[h,j,n,l,g]:null}if(0>=this.Diff_Timeout)return null; -var d=a.length>b.length?a:b,e=a.length>b.length?b:a;if(4>d.length||2*e.lengthd[4].length?g:d:d:g;var j;a.length>b.length?(g=h[0],d=h[1],e=h[2],j=h[3]):(e=h[0],j=h[1],g=h[2],d=h[3]);h=h[4];return[g,d,e,j,h]}; -diff_match_patch.prototype.diff_cleanupSemantic=function(a){for(var b=!1,c=[],d=0,e=null,f=0,g=0,h=0,j=0,i=0;f=e){if(d>=b.length/2||d>=c.length/2)a.splice(f,0,[0,c.substring(0,d)]),a[f-1][1]=b.substring(0,b.length-d),a[f+1][1]=c.substring(d),f++}else if(e>=b.length/2||e>=c.length/2)a.splice(f,0,[0,b.substring(0,e)]),a[f-1][0]=1,a[f-1][1]=c.substring(0,c.length-e),a[f+1][0]=-1,a[f+1][1]=b.substring(e),f++;f++}f++}}; -diff_match_patch.prototype.diff_cleanupSemanticLossless=function(a){function b(a,b){if(!a||!b)return 6;var c=a.charAt(a.length-1),d=b.charAt(0),e=c.match(diff_match_patch.nonAlphaNumericRegex_),f=d.match(diff_match_patch.nonAlphaNumericRegex_),g=e&&c.match(diff_match_patch.whitespaceRegex_),h=f&&d.match(diff_match_patch.whitespaceRegex_),c=g&&c.match(diff_match_patch.linebreakRegex_),d=h&&d.match(diff_match_patch.linebreakRegex_),i=c&&a.match(diff_match_patch.blanklineEndRegex_),j=d&&b.match(diff_match_patch.blanklineStartRegex_); -return i||j?5:c||d?4:e&&!g&&h?3:g||h?2:e||f?1:0}for(var c=1;c=i&&(i=k,g=d,h=e,j=f)}a[c-1][1]!=g&&(g?a[c-1][1]=g:(a.splice(c-1,1),c--),a[c][1]= -h,j?a[c+1][1]=j:(a.splice(c+1,1),c--))}c++}};diff_match_patch.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/;diff_match_patch.whitespaceRegex_=/\s/;diff_match_patch.linebreakRegex_=/[\r\n]/;diff_match_patch.blanklineEndRegex_=/\n\r?\n$/;diff_match_patch.blanklineStartRegex_=/^\r?\n\r?\n/; -diff_match_patch.prototype.diff_cleanupEfficiency=function(a){for(var b=!1,c=[],d=0,e=null,f=0,g=!1,h=!1,j=!1,i=!1;fb)break;e=c;f=d}return a.length!=g&&-1===a[g][0]?f:f+(b-e)}; -diff_match_patch.prototype.diff_prettyHtml=function(a){for(var b=[],c=/&/g,d=//g,f=/\n/g,g=0;g");switch(h){case 1:b[g]=''+j+"";break;case -1:b[g]=''+j+"";break;case 0:b[g]=""+j+""}}return b.join("")}; -diff_match_patch.prototype.diff_text1=function(a){for(var b=[],c=0;cthis.Match_MaxBits)throw Error("Pattern too long for this browser.");var e=this.match_alphabet_(b),f=this,g=this.Match_Threshold,h=a.indexOf(b,c);-1!=h&&(g=Math.min(d(0,h),g),h=a.lastIndexOf(b,c+b.length),-1!=h&&(g=Math.min(d(0,h),g)));for(var j=1<=i;p--){var w=e[a.charAt(p-1)];k[p]=0===t?(k[p+1]<<1|1)&w:(k[p+1]<<1|1)&w|((r[p+1]|r[p])<<1|1)|r[p+1];if(k[p]&j&&(w=d(t,p-1),w<=g))if(g=w,h=p-1,h>c)i=Math.max(1,2*c-h);else break}if(d(t+1,c)>g)break;r=k}return h}; -diff_match_patch.prototype.match_alphabet_=function(a){for(var b={},c=0;c=2*this.Patch_Margin&& -e&&(this.patch_addContext_(a,h),c.push(a),a=new diff_match_patch.patch_obj,e=0,h=d,f=g)}1!==i&&(f+=k.length);-1!==i&&(g+=k.length)}e&&(this.patch_addContext_(a,h),c.push(a));return c};diff_match_patch.prototype.patch_deepCopy=function(a){for(var b=[],c=0;cthis.Match_MaxBits){if(j=this.match_main(b,h.substring(0,this.Match_MaxBits),g),-1!=j&&(i=this.match_main(b,h.substring(h.length-this.Match_MaxBits),g+h.length-this.Match_MaxBits),-1==i||j>=i))j=-1}else j=this.match_main(b,h,g); -if(-1==j)e[f]=!1,d-=a[f].length2-a[f].length1;else if(e[f]=!0,d=j-g,g=-1==i?b.substring(j,j+h.length):b.substring(j,i+this.Match_MaxBits),h==g)b=b.substring(0,j)+this.diff_text2(a[f].diffs)+b.substring(j+h.length);else if(g=this.diff_main(h,g,!1),h.length>this.Match_MaxBits&&this.diff_levenshtein(g)/h.length>this.Patch_DeleteThreshold)e[f]=!1;else{this.diff_cleanupSemanticLossless(g);for(var h=0,k,i=0;ie[0][1].length){var f=b-e[0][1].length;e[0][1]=c.substring(e[0][1].length)+e[0][1];d.start1-=f;d.start2-=f;d.length1+=f;d.length2+=f}d=a[a.length-1];e=d.diffs;0==e.length||0!=e[e.length-1][0]?(e.push([0, -c]),d.length1+=b,d.length2+=b):b>e[e.length-1][1].length&&(f=b-e[e.length-1][1].length,e[e.length-1][1]+=c.substring(0,f),d.length1+=f,d.length2+=f);return c}; -diff_match_patch.prototype.patch_splitMax=function(a){for(var b=this.Match_MaxBits,c=0;c2*b?(h.length1+=i.length,e+=i.length,j=!1,h.diffs.push([g,i]),d.diffs.shift()):(i=i.substring(0,b-h.length1-this.Patch_Margin),h.length1+=i.length,e+=i.length,0===g?(h.length2+=i.length,f+=i.length):j=!1,h.diffs.push([g,i]),i==d.diffs[0][1]?d.diffs.shift():d.diffs[0][1]=d.diffs[0][1].substring(i.length))}g=this.diff_text2(h.diffs);g=g.substring(g.length-this.Patch_Margin);i=this.diff_text1(d.diffs).substring(0,this.Patch_Margin);""!==i&& -(h.length1+=i.length,h.length2+=i.length,0!==h.diffs.length&&0===h.diffs[h.diffs.length-1][0]?h.diffs[h.diffs.length-1][1]+=i:h.diffs.push([0,i]));j||a.splice(++c,0,h)}}};diff_match_patch.prototype.patch_toText=function(a){for(var b=[],c=0;c now) return false; - - var sInfo = editor.getScrollInfo(), halfScreen = .5 * sInfo.clientHeight, midY = sInfo.top + halfScreen; - var mid = editor.lineAtHeight(midY, "local"); - var around = chunkBoundariesAround(dv.diff, mid, type == DIFF_INSERT); - var off = getOffsets(editor, type == DIFF_INSERT ? around.edit : around.orig); - var offOther = getOffsets(other, type == DIFF_INSERT ? around.orig : around.edit); - var ratio = (midY - off.top) / (off.bot - off.top); - var targetPos = (offOther.top - halfScreen) + ratio * (offOther.bot - offOther.top); - - var botDist, mix; - // Some careful tweaking to make sure no space is left out of view - // when scrolling to top or bottom. - if (targetPos > sInfo.top && (mix = sInfo.top / halfScreen) < 1) { - targetPos = targetPos * mix + sInfo.top * (1 - mix); - } else if ((botDist = sInfo.height - sInfo.clientHeight - sInfo.top) < halfScreen) { - var otherInfo = other.getScrollInfo(); - var botDistOther = otherInfo.height - otherInfo.clientHeight - targetPos; - if (botDistOther > botDist && (mix = botDist / halfScreen) < 1) - targetPos = targetPos * mix + (otherInfo.height - otherInfo.clientHeight - botDist) * (1 - mix); - } - - other.scrollTo(sInfo.left, targetPos); - other.state.scrollSetAt = now; - other.state.scrollSetBy = dv; - return true; - } - - function getOffsets(editor, around) { - var bot = around.after; - if (bot == null) bot = editor.lastLine() + 1; - return {top: editor.heightAtLine(around.before || 0, "local"), - bot: editor.heightAtLine(bot, "local")}; - } - - function setScrollLock(dv, val, action) { - dv.lockScroll = val; - if (val && action != false) syncScroll(dv, DIFF_INSERT) && drawConnectors(dv); - dv.lockButton.innerHTML = val ? "\u21db\u21da" : "\u21db  \u21da"; - } - - // Updating the marks for editor content - - function clearMarks(editor, arr, classes) { - for (var i = 0; i < arr.length; ++i) { - var mark = arr[i]; - if (mark instanceof CodeMirror.TextMarker) { - mark.clear(); - } else { - editor.removeLineClass(mark, "background", classes.chunk); - editor.removeLineClass(mark, "background", classes.start); - editor.removeLineClass(mark, "background", classes.end); - } - } - arr.length = 0; - } - - // FIXME maybe add a margin around viewport to prevent too many updates - function updateMarks(editor, diff, state, type, classes) { - var vp = editor.getViewport(); - editor.operation(function() { - if (state.from == state.to || vp.from - state.to > 20 || state.from - vp.to > 20) { - clearMarks(editor, state.marked, classes); - markChanges(editor, diff, type, state.marked, vp.from, vp.to, classes); - state.from = vp.from; state.to = vp.to; - } else { - if (vp.from < state.from) { - markChanges(editor, diff, type, state.marked, vp.from, state.from, classes); - state.from = vp.from; - } - if (vp.to > state.to) { - markChanges(editor, diff, type, state.marked, state.to, vp.to, classes); - state.to = vp.to; - } - } - }); - } - - function markChanges(editor, diff, type, marks, from, to, classes) { - var pos = Pos(0, 0); - var top = Pos(from, 0), bot = editor.clipPos(Pos(to - 1)); - var cls = type == DIFF_DELETE ? classes.del : classes.insert; - function markChunk(start, end) { - var bfrom = Math.max(from, start), bto = Math.min(to, end); - for (var i = bfrom; i < bto; ++i) { - var line = editor.addLineClass(i, "background", classes.chunk); - if (i == start) editor.addLineClass(line, "background", classes.start); - if (i == end - 1) editor.addLineClass(line, "background", classes.end); - marks.push(line); - } - // When the chunk is empty, make sure a horizontal line shows up - if (start == end && bfrom == end && bto == end) { - if (bfrom) - marks.push(editor.addLineClass(bfrom - 1, "background", classes.end)); - else - marks.push(editor.addLineClass(bfrom, "background", classes.start)); - } - } - - var chunkStart = 0; - for (var i = 0; i < diff.length; ++i) { - var part = diff[i], tp = part[0], str = part[1]; - if (tp == DIFF_EQUAL) { - var cleanFrom = pos.line + (startOfLineClean(diff, i) ? 0 : 1); - moveOver(pos, str); - var cleanTo = pos.line + (endOfLineClean(diff, i) ? 1 : 0); - if (cleanTo > cleanFrom) { - if (i) markChunk(chunkStart, cleanFrom); - chunkStart = cleanTo; - } - } else { - if (tp == type) { - var end = moveOver(pos, str, true); - var a = posMax(top, pos), b = posMin(bot, end); - if (!posEq(a, b)) - marks.push(editor.markText(a, b, {className: cls})); - pos = end; - } - } - } - if (chunkStart <= pos.line) markChunk(chunkStart, pos.line + 1); - } - - // Updating the gap between editor and original - - function drawConnectors(dv) { - if (!dv.showDifferences) return; - - if (dv.svg) { - clear(dv.svg); - var w = dv.gap.offsetWidth; - attrs(dv.svg, "width", w, "height", dv.gap.offsetHeight); - } - clear(dv.copyButtons); - - var flip = dv.type == "left"; - var vpEdit = dv.edit.getViewport(), vpOrig = dv.orig.getViewport(); - var sTopEdit = dv.edit.getScrollInfo().top, sTopOrig = dv.orig.getScrollInfo().top; - iterateChunks(dv.diff, function(topOrig, botOrig, topEdit, botEdit) { - if (topEdit > vpEdit.to || botEdit < vpEdit.from || - topOrig > vpOrig.to || botOrig < vpOrig.from) - return; - var topLpx = dv.orig.heightAtLine(topOrig, "local") - sTopOrig, top = topLpx; - if (dv.svg) { - var topRpx = dv.edit.heightAtLine(topEdit, "local") - sTopEdit; - if (flip) { var tmp = topLpx; topLpx = topRpx; topRpx = tmp; } - var botLpx = dv.orig.heightAtLine(botOrig, "local") - sTopOrig; - var botRpx = dv.edit.heightAtLine(botEdit, "local") - sTopEdit; - if (flip) { var tmp = botLpx; botLpx = botRpx; botRpx = tmp; } - var curveTop = " C " + w/2 + " " + topRpx + " " + w/2 + " " + topLpx + " " + (w + 2) + " " + topLpx; - var curveBot = " C " + w/2 + " " + botLpx + " " + w/2 + " " + botRpx + " -1 " + botRpx; - attrs(dv.svg.appendChild(document.createElementNS(svgNS, "path")), - "d", "M -1 " + topRpx + curveTop + " L " + (w + 2) + " " + botLpx + curveBot + " z", - "class", dv.classes.connect); - } - var copy = dv.copyButtons.appendChild(elt("div", dv.type == "left" ? "\u21dd" : "\u21dc", - "CodeMirror-merge-copy")); - copy.title = "Revert chunk"; - copy.chunk = {topEdit: topEdit, botEdit: botEdit, topOrig: topOrig, botOrig: botOrig}; - copy.style.top = top + "px"; - }); - } - - function copyChunk(dv, chunk) { - if (dv.diffOutOfDate) return; - dv.edit.replaceRange(dv.orig.getRange(Pos(chunk.topOrig, 0), Pos(chunk.botOrig, 0)), - Pos(chunk.topEdit, 0), Pos(chunk.botEdit, 0)); - } - - // Merge view, containing 0, 1, or 2 diff views. - - var MergeView = CodeMirror.MergeView = function(node, options) { - if (!(this instanceof MergeView)) return new MergeView(node, options); - - var origLeft = options.origLeft, origRight = options.origRight == null ? options.orig : options.origRight; - var hasLeft = origLeft != null, hasRight = origRight != null; - var panes = 1 + (hasLeft ? 1 : 0) + (hasRight ? 1 : 0); - var wrap = [], left = this.left = null, right = this.right = null; - - if (hasLeft) { - left = this.left = new DiffView(this, "left"); - var leftPane = elt("div", null, "CodeMirror-merge-pane"); - wrap.push(leftPane); - wrap.push(buildGap(left)); - } - - var editPane = elt("div", null, "CodeMirror-merge-pane"); - wrap.push(editPane); - - if (hasRight) { - right = this.right = new DiffView(this, "right"); - wrap.push(buildGap(right)); - var rightPane = elt("div", null, "CodeMirror-merge-pane"); - wrap.push(rightPane); - } - - (hasRight ? rightPane : editPane).className += " CodeMirror-merge-pane-rightmost"; - - wrap.push(elt("div", null, null, "height: 0; clear: both;")); - var wrapElt = this.wrap = node.appendChild(elt("div", wrap, "CodeMirror-merge CodeMirror-merge-" + panes + "pane")); - this.edit = CodeMirror(editPane, copyObj(options)); - - if (left) left.init(leftPane, origLeft, options); - if (right) right.init(rightPane, origRight, options); - - var onResize = function() { - if (left) drawConnectors(left); - if (right) drawConnectors(right); - }; - CodeMirror.on(window, "resize", onResize); - var resizeInterval = setInterval(function() { - for (var p = wrapElt.parentNode; p && p != document.body; p = p.parentNode) {} - if (!p) { clearInterval(resizeInterval); CodeMirror.off(window, "resize", onResize); } - }, 5000); - }; - - function buildGap(dv) { - var lock = dv.lockButton = elt("div", null, "CodeMirror-merge-scrolllock"); - lock.title = "Toggle locked scrolling"; - var lockWrap = elt("div", [lock], "CodeMirror-merge-scrolllock-wrap"); - CodeMirror.on(lock, "click", function() { setScrollLock(dv, !dv.lockScroll); }); - dv.copyButtons = elt("div", null, "CodeMirror-merge-copybuttons-" + dv.type); - CodeMirror.on(dv.copyButtons, "click", function(e) { - var node = e.target || e.srcElement; - if (node.chunk) copyChunk(dv, node.chunk); - }); - var gapElts = [dv.copyButtons, lockWrap]; - var svg = document.createElementNS && document.createElementNS(svgNS, "svg"); - if (svg && !svg.createSVGRect) svg = null; - dv.svg = svg; - if (svg) gapElts.push(svg); - - return dv.gap = elt("div", gapElts, "CodeMirror-merge-gap"); - } - - MergeView.prototype = { - constuctor: MergeView, - editor: function() { return this.edit; }, - rightOriginal: function() { return this.right && this.right.orig; }, - leftOriginal: function() { return this.left && this.left.orig; }, - setShowDifferences: function(val) { - if (this.right) this.right.setShowDifferences(val); - if (this.left) this.left.setShowDifferences(val); - } - }; - - // Operations on diffs - - var dmp = new diff_match_patch(); - function getDiff(a, b) { - var diff = dmp.diff_main(a, b); - dmp.diff_cleanupSemantic(diff); - // The library sometimes leaves in empty parts, which confuse the algorithm - for (var i = 0; i < diff.length; ++i) { - var part = diff[i]; - if (!part[1]) { - diff.splice(i--, 1); - } else if (i && diff[i - 1][0] == part[0]) { - diff.splice(i--, 1); - diff[i][1] += part[1]; - } - } - return diff; - } - - function iterateChunks(diff, f) { - var startEdit = 0, startOrig = 0; - var edit = Pos(0, 0), orig = Pos(0, 0); - for (var i = 0; i < diff.length; ++i) { - var part = diff[i], tp = part[0]; - if (tp == DIFF_EQUAL) { - var startOff = startOfLineClean(diff, i) ? 0 : 1; - var cleanFromEdit = edit.line + startOff, cleanFromOrig = orig.line + startOff; - moveOver(edit, part[1], null, orig); - var endOff = endOfLineClean(diff, i) ? 1 : 0; - var cleanToEdit = edit.line + endOff, cleanToOrig = orig.line + endOff; - if (cleanToEdit > cleanFromEdit) { - if (i) f(startOrig, cleanFromOrig, startEdit, cleanFromEdit); - startEdit = cleanToEdit; startOrig = cleanToOrig; - } - } else { - moveOver(tp == DIFF_INSERT ? edit : orig, part[1]); - } - } - if (startEdit <= edit.line || startOrig <= orig.line) - f(startOrig, orig.line + 1, startEdit, edit.line + 1); - } - - function endOfLineClean(diff, i) { - if (i == diff.length - 1) return true; - var next = diff[i + 1][1]; - if (next.length == 1 || next.charCodeAt(0) != 10) return false; - if (i == diff.length - 2) return true; - next = diff[i + 2][1]; - return next.length > 1 && next.charCodeAt(0) == 10; - } - - function startOfLineClean(diff, i) { - if (i == 0) return true; - var last = diff[i - 1][1]; - if (last.charCodeAt(last.length - 1) != 10) return false; - if (i == 1) return true; - last = diff[i - 2][1]; - return last.charCodeAt(last.length - 1) == 10; - } - - function chunkBoundariesAround(diff, n, nInEdit) { - var beforeE, afterE, beforeO, afterO; - iterateChunks(diff, function(fromOrig, toOrig, fromEdit, toEdit) { - var fromLocal = nInEdit ? fromEdit : fromOrig; - var toLocal = nInEdit ? toEdit : toOrig; - if (afterE == null) { - if (fromLocal > n) { afterE = fromEdit; afterO = fromOrig; } - else if (toLocal > n) { afterE = toEdit; afterO = toOrig; } - } - if (toLocal <= n) { beforeE = toEdit; beforeO = toOrig; } - else if (fromLocal <= n) { beforeE = fromEdit; beforeO = fromOrig; } - }); - return {edit: {before: beforeE, after: afterE}, orig: {before: beforeO, after: afterO}}; - } - - // General utilities - - function elt(tag, content, className, style) { - var e = document.createElement(tag); - if (className) e.className = className; - if (style) e.style.cssText = style; - if (typeof content == "string") e.appendChild(document.createTextNode(content)); - else if (content) for (var i = 0; i < content.length; ++i) e.appendChild(content[i]); - return e; - } - - function clear(node) { - for (var count = node.childNodes.length; count > 0; --count) - node.removeChild(node.firstChild); - } - - function attrs(elt) { - for (var i = 1; i < arguments.length; i += 2) - elt.setAttribute(arguments[i], arguments[i+1]); - } - - function copyObj(obj, target) { - if (!target) target = {}; - for (var prop in obj) if (obj.hasOwnProperty(prop)) target[prop] = obj[prop]; - return target; - } - - function moveOver(pos, str, copy, other) { - var out = copy ? Pos(pos.line, pos.ch) : pos, at = 0; - for (;;) { - var nl = str.indexOf("\n", at); - if (nl == -1) break; - ++out.line; - if (other) ++other.line; - at = nl + 1; - } - out.ch = (at ? 0 : out.ch) + (str.length - at); - if (other) other.ch = (at ? 0 : other.ch) + (str.length - at); - return out; - } - - function posMin(a, b) { return (a.line - b.line || a.ch - b.ch) < 0 ? a : b; } - function posMax(a, b) { return (a.line - b.line || a.ch - b.ch) > 0 ? a : b; } - function posEq(a, b) { return a.line == b.line && a.ch == b.ch; } -})(); diff --git a/plugins/codemirror/codemirror/addon/mode/loadmode.js b/plugins/codemirror/codemirror/addon/mode/loadmode.js deleted file mode 100644 index 60fafbb..0000000 --- a/plugins/codemirror/codemirror/addon/mode/loadmode.js +++ /dev/null @@ -1,51 +0,0 @@ -(function() { - if (!CodeMirror.modeURL) CodeMirror.modeURL = "../mode/%N/%N.js"; - - var loading = {}; - function splitCallback(cont, n) { - var countDown = n; - return function() { if (--countDown == 0) cont(); }; - } - function ensureDeps(mode, cont) { - var deps = CodeMirror.modes[mode].dependencies; - if (!deps) return cont(); - var missing = []; - for (var i = 0; i < deps.length; ++i) { - if (!CodeMirror.modes.hasOwnProperty(deps[i])) - missing.push(deps[i]); - } - if (!missing.length) return cont(); - var split = splitCallback(cont, missing.length); - for (var i = 0; i < missing.length; ++i) - CodeMirror.requireMode(missing[i], split); - } - - CodeMirror.requireMode = function(mode, cont) { - if (typeof mode != "string") mode = mode.name; - if (CodeMirror.modes.hasOwnProperty(mode)) return ensureDeps(mode, cont); - if (loading.hasOwnProperty(mode)) return loading[mode].push(cont); - - var script = document.createElement("script"); - script.src = CodeMirror.modeURL.replace(/%N/g, mode); - var others = document.getElementsByTagName("script")[0]; - others.parentNode.insertBefore(script, others); - var list = loading[mode] = [cont]; - var count = 0, poll = setInterval(function() { - if (++count > 100) return clearInterval(poll); - if (CodeMirror.modes.hasOwnProperty(mode)) { - clearInterval(poll); - loading[mode] = null; - ensureDeps(mode, function() { - for (var i = 0; i < list.length; ++i) list[i](); - }); - } - }, 200); - }; - - CodeMirror.autoLoadMode = function(instance, mode) { - if (!CodeMirror.modes.hasOwnProperty(mode)) - CodeMirror.requireMode(mode, function() { - instance.setOption("mode", instance.getOption("mode")); - }); - }; -}()); diff --git a/plugins/codemirror/codemirror/addon/mode/multiplex.js b/plugins/codemirror/codemirror/addon/mode/multiplex.js deleted file mode 100644 index 32cc579..0000000 --- a/plugins/codemirror/codemirror/addon/mode/multiplex.js +++ /dev/null @@ -1,101 +0,0 @@ -CodeMirror.multiplexingMode = function(outer /*, others */) { - // Others should be {open, close, mode [, delimStyle] [, innerStyle]} objects - var others = Array.prototype.slice.call(arguments, 1); - var n_others = others.length; - - function indexOf(string, pattern, from) { - if (typeof pattern == "string") return string.indexOf(pattern, from); - var m = pattern.exec(from ? string.slice(from) : string); - return m ? m.index + from : -1; - } - - return { - startState: function() { - return { - outer: CodeMirror.startState(outer), - innerActive: null, - inner: null - }; - }, - - copyState: function(state) { - return { - outer: CodeMirror.copyState(outer, state.outer), - innerActive: state.innerActive, - inner: state.innerActive && CodeMirror.copyState(state.innerActive.mode, state.inner) - }; - }, - - token: function(stream, state) { - if (!state.innerActive) { - var cutOff = Infinity, oldContent = stream.string; - for (var i = 0; i < n_others; ++i) { - var other = others[i]; - var found = indexOf(oldContent, other.open, stream.pos); - if (found == stream.pos) { - stream.match(other.open); - state.innerActive = other; - state.inner = CodeMirror.startState(other.mode, outer.indent ? outer.indent(state.outer, "") : 0); - return other.delimStyle; - } else if (found != -1 && found < cutOff) { - cutOff = found; - } - } - if (cutOff != Infinity) stream.string = oldContent.slice(0, cutOff); - var outerToken = outer.token(stream, state.outer); - if (cutOff != Infinity) stream.string = oldContent; - return outerToken; - } else { - var curInner = state.innerActive, oldContent = stream.string; - var found = indexOf(oldContent, curInner.close, stream.pos); - if (found == stream.pos) { - stream.match(curInner.close); - state.innerActive = state.inner = null; - return curInner.delimStyle; - } - if (found > -1) stream.string = oldContent.slice(0, found); - var innerToken = curInner.mode.token(stream, state.inner); - if (found > -1) stream.string = oldContent; - var cur = stream.current(), found = cur.indexOf(curInner.close); - if (found > -1) stream.backUp(cur.length - found); - - if (curInner.innerStyle) { - if (innerToken) innerToken = innerToken + ' ' + curInner.innerStyle; - else innerToken = curInner.innerStyle; - } - - return innerToken; - } - }, - - indent: function(state, textAfter) { - var mode = state.innerActive ? state.innerActive.mode : outer; - if (!mode.indent) return CodeMirror.Pass; - return mode.indent(state.innerActive ? state.inner : state.outer, textAfter); - }, - - blankLine: function(state) { - var mode = state.innerActive ? state.innerActive.mode : outer; - if (mode.blankLine) { - mode.blankLine(state.innerActive ? state.inner : state.outer); - } - if (!state.innerActive) { - for (var i = 0; i < n_others; ++i) { - var other = others[i]; - if (other.open === "\n") { - state.innerActive = other; - state.inner = CodeMirror.startState(other.mode, mode.indent ? mode.indent(state.outer, "") : 0); - } - } - } else if (state.innerActive.close === "\n") { - state.innerActive = state.inner = null; - } - }, - - electricChars: outer.electricChars, - - innerMode: function(state) { - return state.inner ? {state: state.inner, mode: state.innerActive.mode} : {state: state.outer, mode: outer}; - } - }; -}; diff --git a/plugins/codemirror/codemirror/addon/mode/multiplex_test.js b/plugins/codemirror/codemirror/addon/mode/multiplex_test.js deleted file mode 100644 index c065635..0000000 --- a/plugins/codemirror/codemirror/addon/mode/multiplex_test.js +++ /dev/null @@ -1,30 +0,0 @@ -(function() { - CodeMirror.defineMode("markdown_with_stex", function(){ - var inner = CodeMirror.getMode({}, "stex"); - var outer = CodeMirror.getMode({}, "markdown"); - - var innerOptions = { - open: '$', - close: '$', - mode: inner, - delimStyle: 'delim', - innerStyle: 'inner' - }; - - return CodeMirror.multiplexingMode(outer, innerOptions); - }); - - var mode = CodeMirror.getMode({}, "markdown_with_stex"); - - function MT(name) { - test.mode( - name, - mode, - Array.prototype.slice.call(arguments, 1), - 'multiplexing'); - } - - MT( - "stexInsideMarkdown", - "[strong **Equation:**] [delim $][inner&tag \\pi][delim $]"); -})(); diff --git a/plugins/codemirror/codemirror/addon/mode/overlay.js b/plugins/codemirror/codemirror/addon/mode/overlay.js deleted file mode 100644 index b7928a7..0000000 --- a/plugins/codemirror/codemirror/addon/mode/overlay.js +++ /dev/null @@ -1,59 +0,0 @@ -// Utility function that allows modes to be combined. The mode given -// as the base argument takes care of most of the normal mode -// functionality, but a second (typically simple) mode is used, which -// can override the style of text. Both modes get to parse all of the -// text, but when both assign a non-null style to a piece of code, the -// overlay wins, unless the combine argument was true, in which case -// the styles are combined. - -// overlayParser is the old, deprecated name -CodeMirror.overlayMode = CodeMirror.overlayParser = function(base, overlay, combine) { - return { - startState: function() { - return { - base: CodeMirror.startState(base), - overlay: CodeMirror.startState(overlay), - basePos: 0, baseCur: null, - overlayPos: 0, overlayCur: null - }; - }, - copyState: function(state) { - return { - base: CodeMirror.copyState(base, state.base), - overlay: CodeMirror.copyState(overlay, state.overlay), - basePos: state.basePos, baseCur: null, - overlayPos: state.overlayPos, overlayCur: null - }; - }, - - token: function(stream, state) { - if (stream.start == state.basePos) { - state.baseCur = base.token(stream, state.base); - state.basePos = stream.pos; - } - if (stream.start == state.overlayPos) { - stream.pos = stream.start; - state.overlayCur = overlay.token(stream, state.overlay); - state.overlayPos = stream.pos; - } - stream.pos = Math.min(state.basePos, state.overlayPos); - if (stream.eol()) state.basePos = state.overlayPos = 0; - - if (state.overlayCur == null) return state.baseCur; - if (state.baseCur != null && combine) return state.baseCur + " " + state.overlayCur; - else return state.overlayCur; - }, - - indent: base.indent && function(state, textAfter) { - return base.indent(state.base, textAfter); - }, - electricChars: base.electricChars, - - innerMode: function(state) { return {state: state.base, mode: base}; }, - - blankLine: function(state) { - if (base.blankLine) base.blankLine(state.base); - if (overlay.blankLine) overlay.blankLine(state.overlay); - } - }; -}; diff --git a/plugins/codemirror/codemirror/addon/runmode/colorize.js b/plugins/codemirror/codemirror/addon/runmode/colorize.js deleted file mode 100644 index 62286d2..0000000 --- a/plugins/codemirror/codemirror/addon/runmode/colorize.js +++ /dev/null @@ -1,29 +0,0 @@ -CodeMirror.colorize = (function() { - - var isBlock = /^(p|li|div|h\\d|pre|blockquote|td)$/; - - function textContent(node, out) { - if (node.nodeType == 3) return out.push(node.nodeValue); - for (var ch = node.firstChild; ch; ch = ch.nextSibling) { - textContent(ch, out); - if (isBlock.test(node.nodeType)) out.push("\n"); - } - } - - return function(collection, defaultMode) { - if (!collection) collection = document.body.getElementsByTagName("pre"); - - for (var i = 0; i < collection.length; ++i) { - var node = collection[i]; - var mode = node.getAttribute("data-lang") || defaultMode; - if (!mode) continue; - - var text = []; - textContent(node, text); - node.innerHTML = ""; - CodeMirror.runMode(text.join(""), mode, node); - - node.className += " cm-s-default"; - } - }; -})(); diff --git a/plugins/codemirror/codemirror/addon/runmode/runmode-standalone.js b/plugins/codemirror/codemirror/addon/runmode/runmode-standalone.js deleted file mode 100644 index d117166..0000000 --- a/plugins/codemirror/codemirror/addon/runmode/runmode-standalone.js +++ /dev/null @@ -1,136 +0,0 @@ -/* Just enough of CodeMirror to run runMode under node.js */ - -window.CodeMirror = {}; - -(function() { -"use strict"; - -function splitLines(string){ return string.split(/\r?\n|\r/); }; - -function StringStream(string) { - this.pos = this.start = 0; - this.string = string; -} -StringStream.prototype = { - eol: function() {return this.pos >= this.string.length;}, - sol: function() {return this.pos == 0;}, - peek: function() {return this.string.charAt(this.pos) || null;}, - next: function() { - if (this.pos < this.string.length) - return this.string.charAt(this.pos++); - }, - eat: function(match) { - var ch = this.string.charAt(this.pos); - if (typeof match == "string") var ok = ch == match; - else var ok = ch && (match.test ? match.test(ch) : match(ch)); - if (ok) {++this.pos; return ch;} - }, - eatWhile: function(match) { - var start = this.pos; - while (this.eat(match)){} - return this.pos > start; - }, - eatSpace: function() { - var start = this.pos; - while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos; - return this.pos > start; - }, - skipToEnd: function() {this.pos = this.string.length;}, - skipTo: function(ch) { - var found = this.string.indexOf(ch, this.pos); - if (found > -1) {this.pos = found; return true;} - }, - backUp: function(n) {this.pos -= n;}, - column: function() {return this.start;}, - indentation: function() {return 0;}, - match: function(pattern, consume, caseInsensitive) { - if (typeof pattern == "string") { - var cased = function(str) {return caseInsensitive ? str.toLowerCase() : str;}; - var substr = this.string.substr(this.pos, pattern.length); - if (cased(substr) == cased(pattern)) { - if (consume !== false) this.pos += pattern.length; - return true; - } - } else { - var match = this.string.slice(this.pos).match(pattern); - if (match && match.index > 0) return null; - if (match && consume !== false) this.pos += match[0].length; - return match; - } - }, - current: function(){return this.string.slice(this.start, this.pos);} -}; -CodeMirror.StringStream = StringStream; - -CodeMirror.startState = function (mode, a1, a2) { - return mode.startState ? mode.startState(a1, a2) : true; -}; - -var modes = CodeMirror.modes = {}, mimeModes = CodeMirror.mimeModes = {}; -CodeMirror.defineMode = function (name, mode) { modes[name] = mode; }; -CodeMirror.defineMIME = function (mime, spec) { mimeModes[mime] = spec; }; -CodeMirror.getMode = function (options, spec) { - if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) - spec = mimeModes[spec]; - if (typeof spec == "string") - var mname = spec, config = {}; - else if (spec != null) - var mname = spec.name, config = spec; - var mfactory = modes[mname]; - if (!mfactory) throw new Error("Unknown mode: " + spec); - return mfactory(options, config || {}); -}; - -CodeMirror.runMode = function (string, modespec, callback, options) { - var mode = CodeMirror.getMode({ indentUnit: 2 }, modespec); - - if (callback.nodeType == 1) { - var tabSize = (options && options.tabSize) || 4; - var node = callback, col = 0; - node.innerHTML = ""; - callback = function (text, style) { - if (text == "\n") { - node.appendChild(document.createElement("br")); - col = 0; - return; - } - var content = ""; - // replace tabs - for (var pos = 0; ;) { - var idx = text.indexOf("\t", pos); - if (idx == -1) { - content += text.slice(pos); - col += text.length - pos; - break; - } else { - col += idx - pos; - content += text.slice(pos, idx); - var size = tabSize - col % tabSize; - col += size; - for (var i = 0; i < size; ++i) content += " "; - pos = idx + 1; - } - } - - if (style) { - var sp = node.appendChild(document.createElement("span")); - sp.className = "cm-" + style.replace(/ +/g, " cm-"); - sp.appendChild(document.createTextNode(content)); - } else { - node.appendChild(document.createTextNode(content)); - } - }; - } - - var lines = splitLines(string), state = CodeMirror.startState(mode); - for (var i = 0, e = lines.length; i < e; ++i) { - if (i) callback("\n"); - var stream = new CodeMirror.StringStream(lines[i]); - while (!stream.eol()) { - var style = mode.token(stream, state); - callback(stream.current(), style, i, stream.start, state); - stream.start = stream.pos; - } - } -}; -})(); diff --git a/plugins/codemirror/codemirror/addon/runmode/runmode.js b/plugins/codemirror/codemirror/addon/runmode/runmode.js deleted file mode 100644 index 7aafa2a..0000000 --- a/plugins/codemirror/codemirror/addon/runmode/runmode.js +++ /dev/null @@ -1,56 +0,0 @@ -CodeMirror.runMode = function(string, modespec, callback, options) { - var mode = CodeMirror.getMode(CodeMirror.defaults, modespec); - var ie = /MSIE \d/.test(navigator.userAgent); - var ie_lt9 = ie && (document.documentMode == null || document.documentMode < 9); - - if (callback.nodeType == 1) { - var tabSize = (options && options.tabSize) || CodeMirror.defaults.tabSize; - var node = callback, col = 0; - node.innerHTML = ""; - callback = function(text, style) { - if (text == "\n") { - // Emitting LF or CRLF on IE8 or earlier results in an incorrect display. - // Emitting a carriage return makes everything ok. - node.appendChild(document.createTextNode(ie_lt9 ? '\r' : text)); - col = 0; - return; - } - var content = ""; - // replace tabs - for (var pos = 0;;) { - var idx = text.indexOf("\t", pos); - if (idx == -1) { - content += text.slice(pos); - col += text.length - pos; - break; - } else { - col += idx - pos; - content += text.slice(pos, idx); - var size = tabSize - col % tabSize; - col += size; - for (var i = 0; i < size; ++i) content += " "; - pos = idx + 1; - } - } - - if (style) { - var sp = node.appendChild(document.createElement("span")); - sp.className = "cm-" + style.replace(/ +/g, " cm-"); - sp.appendChild(document.createTextNode(content)); - } else { - node.appendChild(document.createTextNode(content)); - } - }; - } - - var lines = CodeMirror.splitLines(string), state = CodeMirror.startState(mode); - for (var i = 0, e = lines.length; i < e; ++i) { - if (i) callback("\n"); - var stream = new CodeMirror.StringStream(lines[i]); - while (!stream.eol()) { - var style = mode.token(stream, state); - callback(stream.current(), style, i, stream.start, state); - stream.start = stream.pos; - } - } -}; diff --git a/plugins/codemirror/codemirror/addon/runmode/runmode.node.js b/plugins/codemirror/codemirror/addon/runmode/runmode.node.js deleted file mode 100644 index 0f1088f..0000000 --- a/plugins/codemirror/codemirror/addon/runmode/runmode.node.js +++ /dev/null @@ -1,103 +0,0 @@ -/* Just enough of CodeMirror to run runMode under node.js */ - -function splitLines(string){ return string.split(/\r?\n|\r/); }; - -function StringStream(string) { - this.pos = this.start = 0; - this.string = string; -} -StringStream.prototype = { - eol: function() {return this.pos >= this.string.length;}, - sol: function() {return this.pos == 0;}, - peek: function() {return this.string.charAt(this.pos) || null;}, - next: function() { - if (this.pos < this.string.length) - return this.string.charAt(this.pos++); - }, - eat: function(match) { - var ch = this.string.charAt(this.pos); - if (typeof match == "string") var ok = ch == match; - else var ok = ch && (match.test ? match.test(ch) : match(ch)); - if (ok) {++this.pos; return ch;} - }, - eatWhile: function(match) { - var start = this.pos; - while (this.eat(match)){} - return this.pos > start; - }, - eatSpace: function() { - var start = this.pos; - while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos; - return this.pos > start; - }, - skipToEnd: function() {this.pos = this.string.length;}, - skipTo: function(ch) { - var found = this.string.indexOf(ch, this.pos); - if (found > -1) {this.pos = found; return true;} - }, - backUp: function(n) {this.pos -= n;}, - column: function() {return this.start;}, - indentation: function() {return 0;}, - match: function(pattern, consume, caseInsensitive) { - if (typeof pattern == "string") { - var cased = function(str) {return caseInsensitive ? str.toLowerCase() : str;}; - var substr = this.string.substr(this.pos, pattern.length); - if (cased(substr) == cased(pattern)) { - if (consume !== false) this.pos += pattern.length; - return true; - } - } else { - var match = this.string.slice(this.pos).match(pattern); - if (match && match.index > 0) return null; - if (match && consume !== false) this.pos += match[0].length; - return match; - } - }, - current: function(){return this.string.slice(this.start, this.pos);} -}; -exports.StringStream = StringStream; - -exports.startState = function(mode, a1, a2) { - return mode.startState ? mode.startState(a1, a2) : true; -}; - -var modes = exports.modes = {}, mimeModes = exports.mimeModes = {}; -exports.defineMode = function(name, mode) { - if (arguments.length > 2) { - mode.dependencies = []; - for (var i = 2; i < arguments.length; ++i) mode.dependencies.push(arguments[i]); - } - modes[name] = mode; -}; -exports.defineMIME = function(mime, spec) { mimeModes[mime] = spec; }; - -exports.defineMode("null", function() { - return {token: function(stream) {stream.skipToEnd();}}; -}); -exports.defineMIME("text/plain", "null"); - -exports.getMode = function(options, spec) { - if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) - spec = mimeModes[spec]; - if (typeof spec == "string") - var mname = spec, config = {}; - else if (spec != null) - var mname = spec.name, config = spec; - var mfactory = modes[mname]; - if (!mfactory) throw new Error("Unknown mode: " + spec); - return mfactory(options, config || {}); -}; - -exports.runMode = function(string, modespec, callback) { - var mode = exports.getMode({indentUnit: 2}, modespec); - var lines = splitLines(string), state = exports.startState(mode); - for (var i = 0, e = lines.length; i < e; ++i) { - if (i) callback("\n"); - var stream = new exports.StringStream(lines[i]); - while (!stream.eol()) { - var style = mode.token(stream, state); - callback(stream.current(), style, i, stream.start, state); - stream.start = stream.pos; - } - } -}; diff --git a/plugins/codemirror/codemirror/addon/scroll/scrollpastend.js b/plugins/codemirror/codemirror/addon/scroll/scrollpastend.js deleted file mode 100644 index 14d7d5a..0000000 --- a/plugins/codemirror/codemirror/addon/scroll/scrollpastend.js +++ /dev/null @@ -1,34 +0,0 @@ -(function() { - "use strict"; - - CodeMirror.defineOption("scrollPastEnd", false, function(cm, val, old) { - if (old && old != CodeMirror.Init) { - cm.off("change", onChange); - cm.display.lineSpace.parentNode.style.paddingBottom = ""; - cm.state.scrollPastEndPadding = null; - } - if (val) { - cm.on("change", onChange); - updateBottomMargin(cm); - } - }); - - function onChange(cm, change) { - if (CodeMirror.changeEnd(change).line == cm.lastLine()) - updateBottomMargin(cm); - } - - function updateBottomMargin(cm) { - var padding = ""; - if (cm.lineCount() > 1) { - var totalH = cm.display.scroller.clientHeight - 30, - lastLineH = cm.getLineHandle(cm.lastLine()).height; - padding = (totalH - lastLineH) + "px"; - } - if (cm.state.scrollPastEndPadding != padding) { - cm.state.scrollPastEndPadding = padding; - cm.display.lineSpace.parentNode.style.paddingBottom = padding; - cm.setSize(); - } - } -})(); diff --git a/plugins/codemirror/codemirror/addon/search/match-highlighter.js b/plugins/codemirror/codemirror/addon/search/match-highlighter.js deleted file mode 100644 index e5cbeac..0000000 --- a/plugins/codemirror/codemirror/addon/search/match-highlighter.js +++ /dev/null @@ -1,91 +0,0 @@ -// Highlighting text that matches the selection -// -// Defines an option highlightSelectionMatches, which, when enabled, -// will style strings that match the selection throughout the -// document. -// -// The option can be set to true to simply enable it, or to a -// {minChars, style, showToken} object to explicitly configure it. -// minChars is the minimum amount of characters that should be -// selected for the behavior to occur, and style is the token style to -// apply to the matches. This will be prefixed by "cm-" to create an -// actual CSS class name. showToken, when enabled, will cause the -// current token to be highlighted when nothing is selected. - -(function() { - var DEFAULT_MIN_CHARS = 2; - var DEFAULT_TOKEN_STYLE = "matchhighlight"; - var DEFAULT_DELAY = 100; - - function State(options) { - if (typeof options == "object") { - this.minChars = options.minChars; - this.style = options.style; - this.showToken = options.showToken; - this.delay = options.delay; - } - if (this.style == null) this.style = DEFAULT_TOKEN_STYLE; - if (this.minChars == null) this.minChars = DEFAULT_MIN_CHARS; - if (this.delay == null) this.delay = DEFAULT_DELAY; - this.overlay = this.timeout = null; - } - - CodeMirror.defineOption("highlightSelectionMatches", false, function(cm, val, old) { - if (old && old != CodeMirror.Init) { - var over = cm.state.matchHighlighter.overlay; - if (over) cm.removeOverlay(over); - clearTimeout(cm.state.matchHighlighter.timeout); - cm.state.matchHighlighter = null; - cm.off("cursorActivity", cursorActivity); - } - if (val) { - cm.state.matchHighlighter = new State(val); - highlightMatches(cm); - cm.on("cursorActivity", cursorActivity); - } - }); - - function cursorActivity(cm) { - var state = cm.state.matchHighlighter; - clearTimeout(state.timeout); - state.timeout = setTimeout(function() {highlightMatches(cm);}, state.delay); - } - - function highlightMatches(cm) { - cm.operation(function() { - var state = cm.state.matchHighlighter; - if (state.overlay) { - cm.removeOverlay(state.overlay); - state.overlay = null; - } - if (!cm.somethingSelected() && state.showToken) { - var re = state.showToken === true ? /[\w$]/ : state.showToken; - var cur = cm.getCursor(), line = cm.getLine(cur.line), start = cur.ch, end = start; - while (start && re.test(line.charAt(start - 1))) --start; - while (end < line.length && re.test(line.charAt(end))) ++end; - if (start < end) - cm.addOverlay(state.overlay = makeOverlay(line.slice(start, end), re, state.style)); - return; - } - if (cm.getCursor("head").line != cm.getCursor("anchor").line) return; - var selection = cm.getSelection().replace(/^\s+|\s+$/g, ""); - if (selection.length >= state.minChars) - cm.addOverlay(state.overlay = makeOverlay(selection, false, state.style)); - }); - } - - function boundariesAround(stream, re) { - return (!stream.start || !re.test(stream.string.charAt(stream.start - 1))) && - (stream.pos == stream.string.length || !re.test(stream.string.charAt(stream.pos))); - } - - function makeOverlay(query, hasBoundary, style) { - return {token: function(stream) { - if (stream.match(query) && - (!hasBoundary || boundariesAround(stream, hasBoundary))) - return style; - stream.next(); - stream.skipTo(query.charAt(0)) || stream.skipToEnd(); - }}; - } -})(); diff --git a/plugins/codemirror/codemirror/addon/search/search.js b/plugins/codemirror/codemirror/addon/search/search.js deleted file mode 100644 index 71ed75b..0000000 --- a/plugins/codemirror/codemirror/addon/search/search.js +++ /dev/null @@ -1,133 +0,0 @@ -// Define search commands. Depends on dialog.js or another -// implementation of the openDialog method. - -// Replace works a little oddly -- it will do the replace on the next -// Ctrl-G (or whatever is bound to findNext) press. You prevent a -// replace by making sure the match is no longer selected when hitting -// Ctrl-G. - -(function() { - function searchOverlay(query) { - if (typeof query == "string") return {token: function(stream) { - if (stream.match(query)) return "searching"; - stream.next(); - stream.skipTo(query.charAt(0)) || stream.skipToEnd(); - }}; - return {token: function(stream) { - if (stream.match(query)) return "searching"; - while (!stream.eol()) { - stream.next(); - if (stream.match(query, false)) break; - } - }}; - } - - function SearchState() { - this.posFrom = this.posTo = this.query = null; - this.overlay = null; - } - function getSearchState(cm) { - return cm.state.search || (cm.state.search = new SearchState()); - } - function getSearchCursor(cm, query, pos) { - // Heuristic: if the query string is all lowercase, do a case insensitive search. - return cm.getSearchCursor(query, pos, typeof query == "string" && query == query.toLowerCase()); - } - function dialog(cm, text, shortText, f) { - if (cm.openDialog) cm.openDialog(text, f); - else f(prompt(shortText, "")); - } - function confirmDialog(cm, text, shortText, fs) { - if (cm.openConfirm) cm.openConfirm(text, fs); - else if (confirm(shortText)) fs[0](); - } - function parseQuery(query) { - var isRE = query.match(/^\/(.*)\/([a-z]*)$/); - return isRE ? new RegExp(isRE[1], isRE[2].indexOf("i") == -1 ? "" : "i") : query; - } - var queryDialog = - 'Search: (Use /re/ syntax for regexp search)'; - function doSearch(cm, rev) { - var state = getSearchState(cm); - if (state.query) return findNext(cm, rev); - dialog(cm, queryDialog, "Search for:", function(query) { - cm.operation(function() { - if (!query || state.query) return; - state.query = parseQuery(query); - cm.removeOverlay(state.overlay); - state.overlay = searchOverlay(state.query); - cm.addOverlay(state.overlay); - state.posFrom = state.posTo = cm.getCursor(); - findNext(cm, rev); - }); - }); - } - function findNext(cm, rev) {cm.operation(function() { - var state = getSearchState(cm); - var cursor = getSearchCursor(cm, state.query, rev ? state.posFrom : state.posTo); - if (!cursor.find(rev)) { - cursor = getSearchCursor(cm, state.query, rev ? CodeMirror.Pos(cm.lastLine()) : CodeMirror.Pos(cm.firstLine(), 0)); - if (!cursor.find(rev)) return; - } - cm.setSelection(cursor.from(), cursor.to()); - cm.scrollIntoView({from: cursor.from(), to: cursor.to()}); - state.posFrom = cursor.from(); state.posTo = cursor.to(); - });} - function clearSearch(cm) {cm.operation(function() { - var state = getSearchState(cm); - if (!state.query) return; - state.query = null; - cm.removeOverlay(state.overlay); - });} - - var replaceQueryDialog = - 'Replace: (Use /re/ syntax for regexp search)'; - var replacementQueryDialog = 'With: '; - var doReplaceConfirm = "Replace? "; - function replace(cm, all) { - dialog(cm, replaceQueryDialog, "Replace:", function(query) { - if (!query) return; - query = parseQuery(query); - dialog(cm, replacementQueryDialog, "Replace with:", function(text) { - if (all) { - cm.operation(function() { - for (var cursor = getSearchCursor(cm, query); cursor.findNext();) { - if (typeof query != "string") { - var match = cm.getRange(cursor.from(), cursor.to()).match(query); - cursor.replace(text.replace(/\$(\d)/, function(_, i) {return match[i];})); - } else cursor.replace(text); - } - }); - } else { - clearSearch(cm); - var cursor = getSearchCursor(cm, query, cm.getCursor()); - var advance = function() { - var start = cursor.from(), match; - if (!(match = cursor.findNext())) { - cursor = getSearchCursor(cm, query); - if (!(match = cursor.findNext()) || - (start && cursor.from().line == start.line && cursor.from().ch == start.ch)) return; - } - cm.setSelection(cursor.from(), cursor.to()); - cm.scrollIntoView({from: cursor.from(), to: cursor.to()}); - confirmDialog(cm, doReplaceConfirm, "Replace?", - [function() {doReplace(match);}, advance]); - }; - var doReplace = function(match) { - cursor.replace(typeof query == "string" ? text : - text.replace(/\$(\d)/, function(_, i) {return match[i];})); - advance(); - }; - advance(); - } - }); - }); - } - - CodeMirror.commands.find = function(cm) {clearSearch(cm); doSearch(cm);}; - CodeMirror.commands.findNext = doSearch; - CodeMirror.commands.findPrev = function(cm) {doSearch(cm, true);}; - CodeMirror.commands.clearSearch = clearSearch; - CodeMirror.commands.replace = replace; - CodeMirror.commands.replaceAll = function(cm) {replace(cm, true);}; -})(); diff --git a/plugins/codemirror/codemirror/addon/search/searchcursor.js b/plugins/codemirror/codemirror/addon/search/searchcursor.js deleted file mode 100644 index c034d58..0000000 --- a/plugins/codemirror/codemirror/addon/search/searchcursor.js +++ /dev/null @@ -1,143 +0,0 @@ -(function(){ - var Pos = CodeMirror.Pos; - - function SearchCursor(doc, query, pos, caseFold) { - this.atOccurrence = false; this.doc = doc; - if (caseFold == null && typeof query == "string") caseFold = false; - - pos = pos ? doc.clipPos(pos) : Pos(0, 0); - this.pos = {from: pos, to: pos}; - - // The matches method is filled in based on the type of query. - // It takes a position and a direction, and returns an object - // describing the next occurrence of the query, or null if no - // more matches were found. - if (typeof query != "string") { // Regexp match - if (!query.global) query = new RegExp(query.source, query.ignoreCase ? "ig" : "g"); - this.matches = function(reverse, pos) { - if (reverse) { - query.lastIndex = 0; - var line = doc.getLine(pos.line).slice(0, pos.ch), cutOff = 0, match, start; - for (;;) { - query.lastIndex = cutOff; - var newMatch = query.exec(line); - if (!newMatch) break; - match = newMatch; - start = match.index; - cutOff = match.index + (match[0].length || 1); - if (cutOff == line.length) break; - } - var matchLen = (match && match[0].length) || 0; - if (!matchLen) { - if (start == 0 && line.length == 0) {match = undefined;} - else if (start != doc.getLine(pos.line).length) { - matchLen++; - } - } - } else { - query.lastIndex = pos.ch; - var line = doc.getLine(pos.line), match = query.exec(line); - var matchLen = (match && match[0].length) || 0; - var start = match && match.index; - if (start + matchLen != line.length && !matchLen) matchLen = 1; - } - if (match && matchLen) - return {from: Pos(pos.line, start), - to: Pos(pos.line, start + matchLen), - match: match}; - }; - } else { // String query - if (caseFold) query = query.toLowerCase(); - var fold = caseFold ? function(str){return str.toLowerCase();} : function(str){return str;}; - var target = query.split("\n"); - // Different methods for single-line and multi-line queries - if (target.length == 1) { - if (!query.length) { - // Empty string would match anything and never progress, so - // we define it to match nothing instead. - this.matches = function() {}; - } else { - this.matches = function(reverse, pos) { - var line = fold(doc.getLine(pos.line)), len = query.length, match; - if (reverse ? (pos.ch >= len && (match = line.lastIndexOf(query, pos.ch - len)) != -1) - : (match = line.indexOf(query, pos.ch)) != -1) - return {from: Pos(pos.line, match), - to: Pos(pos.line, match + len)}; - }; - } - } else { - this.matches = function(reverse, pos) { - var ln = pos.line, idx = (reverse ? target.length - 1 : 0), match = target[idx], line = fold(doc.getLine(ln)); - var offsetA = (reverse ? line.indexOf(match) + match.length : line.lastIndexOf(match)); - if (reverse ? offsetA > pos.ch || offsetA != match.length - : offsetA < pos.ch || offsetA != line.length - match.length) - return; - for (;;) { - if (reverse ? !ln : ln == doc.lineCount() - 1) return; - line = fold(doc.getLine(ln += reverse ? -1 : 1)); - match = target[reverse ? --idx : ++idx]; - if (idx > 0 && idx < target.length - 1) { - if (line != match) return; - else continue; - } - var offsetB = (reverse ? line.lastIndexOf(match) : line.indexOf(match) + match.length); - if (reverse ? offsetB != line.length - match.length : offsetB != match.length) - return; - var start = Pos(pos.line, offsetA), end = Pos(ln, offsetB); - return {from: reverse ? end : start, to: reverse ? start : end}; - } - }; - } - } - } - - SearchCursor.prototype = { - findNext: function() {return this.find(false);}, - findPrevious: function() {return this.find(true);}, - - find: function(reverse) { - var self = this, pos = this.doc.clipPos(reverse ? this.pos.from : this.pos.to); - function savePosAndFail(line) { - var pos = Pos(line, 0); - self.pos = {from: pos, to: pos}; - self.atOccurrence = false; - return false; - } - - for (;;) { - if (this.pos = this.matches(reverse, pos)) { - if (!this.pos.from || !this.pos.to) { console.log(this.matches, this.pos); } - this.atOccurrence = true; - return this.pos.match || true; - } - if (reverse) { - if (!pos.line) return savePosAndFail(0); - pos = Pos(pos.line-1, this.doc.getLine(pos.line-1).length); - } - else { - var maxLine = this.doc.lineCount(); - if (pos.line == maxLine - 1) return savePosAndFail(maxLine); - pos = Pos(pos.line + 1, 0); - } - } - }, - - from: function() {if (this.atOccurrence) return this.pos.from;}, - to: function() {if (this.atOccurrence) return this.pos.to;}, - - replace: function(newText) { - if (!this.atOccurrence) return; - var lines = CodeMirror.splitLines(newText); - this.doc.replaceRange(lines, this.pos.from, this.pos.to); - this.pos.to = Pos(this.pos.from.line + lines.length - 1, - lines[lines.length - 1].length + (lines.length == 1 ? this.pos.from.ch : 0)); - } - }; - - CodeMirror.defineExtension("getSearchCursor", function(query, pos, caseFold) { - return new SearchCursor(this.doc, query, pos, caseFold); - }); - CodeMirror.defineDocExtension("getSearchCursor", function(query, pos, caseFold) { - return new SearchCursor(this, query, pos, caseFold); - }); -})(); diff --git a/plugins/codemirror/codemirror/addon/selection/active-line.js b/plugins/codemirror/codemirror/addon/selection/active-line.js deleted file mode 100644 index e505086..0000000 --- a/plugins/codemirror/codemirror/addon/selection/active-line.js +++ /dev/null @@ -1,39 +0,0 @@ -// Because sometimes you need to style the cursor's line. -// -// Adds an option 'styleActiveLine' which, when enabled, gives the -// active line's wrapping
    the CSS class "CodeMirror-activeline", -// and gives its background
    the class "CodeMirror-activeline-background". - -(function() { - "use strict"; - var WRAP_CLASS = "CodeMirror-activeline"; - var BACK_CLASS = "CodeMirror-activeline-background"; - - CodeMirror.defineOption("styleActiveLine", false, function(cm, val, old) { - var prev = old && old != CodeMirror.Init; - if (val && !prev) { - updateActiveLine(cm); - cm.on("cursorActivity", updateActiveLine); - } else if (!val && prev) { - cm.off("cursorActivity", updateActiveLine); - clearActiveLine(cm); - delete cm.state.activeLine; - } - }); - - function clearActiveLine(cm) { - if ("activeLine" in cm.state) { - cm.removeLineClass(cm.state.activeLine, "wrap", WRAP_CLASS); - cm.removeLineClass(cm.state.activeLine, "background", BACK_CLASS); - } - } - - function updateActiveLine(cm) { - var line = cm.getLineHandleVisualStart(cm.getCursor().line); - if (cm.state.activeLine == line) return; - clearActiveLine(cm); - cm.addLineClass(line, "wrap", WRAP_CLASS); - cm.addLineClass(line, "background", BACK_CLASS); - cm.state.activeLine = line; - } -})(); diff --git a/plugins/codemirror/codemirror/addon/selection/mark-selection.js b/plugins/codemirror/codemirror/addon/selection/mark-selection.js deleted file mode 100644 index c97776e..0000000 --- a/plugins/codemirror/codemirror/addon/selection/mark-selection.js +++ /dev/null @@ -1,108 +0,0 @@ -// Because sometimes you need to mark the selected *text*. -// -// Adds an option 'styleSelectedText' which, when enabled, gives -// selected text the CSS class given as option value, or -// "CodeMirror-selectedtext" when the value is not a string. - -(function() { - "use strict"; - - CodeMirror.defineOption("styleSelectedText", false, function(cm, val, old) { - var prev = old && old != CodeMirror.Init; - if (val && !prev) { - cm.state.markedSelection = []; - cm.state.markedSelectionStyle = typeof val == "string" ? val : "CodeMirror-selectedtext"; - reset(cm); - cm.on("cursorActivity", onCursorActivity); - cm.on("change", onChange); - } else if (!val && prev) { - cm.off("cursorActivity", onCursorActivity); - cm.off("change", onChange); - clear(cm); - cm.state.markedSelection = cm.state.markedSelectionStyle = null; - } - }); - - function onCursorActivity(cm) { - cm.operation(function() { update(cm); }); - } - - function onChange(cm) { - if (cm.state.markedSelection.length) - cm.operation(function() { clear(cm); }); - } - - var CHUNK_SIZE = 8; - var Pos = CodeMirror.Pos; - - function cmp(pos1, pos2) { - return pos1.line - pos2.line || pos1.ch - pos2.ch; - } - - function coverRange(cm, from, to, addAt) { - if (cmp(from, to) == 0) return; - var array = cm.state.markedSelection; - var cls = cm.state.markedSelectionStyle; - for (var line = from.line;;) { - var start = line == from.line ? from : Pos(line, 0); - var endLine = line + CHUNK_SIZE, atEnd = endLine >= to.line; - var end = atEnd ? to : Pos(endLine, 0); - var mark = cm.markText(start, end, {className: cls}); - if (addAt == null) array.push(mark); - else array.splice(addAt++, 0, mark); - if (atEnd) break; - line = endLine; - } - } - - function clear(cm) { - var array = cm.state.markedSelection; - for (var i = 0; i < array.length; ++i) array[i].clear(); - array.length = 0; - } - - function reset(cm) { - clear(cm); - var from = cm.getCursor("start"), to = cm.getCursor("end"); - coverRange(cm, from, to); - } - - function update(cm) { - var from = cm.getCursor("start"), to = cm.getCursor("end"); - if (cmp(from, to) == 0) return clear(cm); - - var array = cm.state.markedSelection; - if (!array.length) return coverRange(cm, from, to); - - var coverStart = array[0].find(), coverEnd = array[array.length - 1].find(); - if (!coverStart || !coverEnd || to.line - from.line < CHUNK_SIZE || - cmp(from, coverEnd.to) >= 0 || cmp(to, coverStart.from) <= 0) - return reset(cm); - - while (cmp(from, coverStart.from) > 0) { - array.shift().clear(); - coverStart = array[0].find(); - } - if (cmp(from, coverStart.from) < 0) { - if (coverStart.to.line - from.line < CHUNK_SIZE) { - array.shift().clear(); - coverRange(cm, from, coverStart.to, 0); - } else { - coverRange(cm, from, coverStart.from, 0); - } - } - - while (cmp(to, coverEnd.to) < 0) { - array.pop().clear(); - coverEnd = array[array.length - 1].find(); - } - if (cmp(to, coverEnd.to) > 0) { - if (to.line - coverEnd.from.line < CHUNK_SIZE) { - array.pop().clear(); - coverRange(cm, coverEnd.from, to); - } else { - coverRange(cm, coverEnd.to, to); - } - } - } -})(); diff --git a/plugins/codemirror/codemirror/addon/tern/tern.css b/plugins/codemirror/codemirror/addon/tern/tern.css deleted file mode 100644 index eacc2f0..0000000 --- a/plugins/codemirror/codemirror/addon/tern/tern.css +++ /dev/null @@ -1,85 +0,0 @@ -.CodeMirror-Tern-completion { - padding-left: 22px; - position: relative; -} -.CodeMirror-Tern-completion:before { - position: absolute; - left: 2px; - bottom: 2px; - border-radius: 50%; - font-size: 12px; - font-weight: bold; - height: 15px; - width: 15px; - line-height: 16px; - text-align: center; - color: white; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -.CodeMirror-Tern-completion-unknown:before { - content: "?"; - background: #4bb; -} -.CodeMirror-Tern-completion-object:before { - content: "O"; - background: #77c; -} -.CodeMirror-Tern-completion-fn:before { - content: "F"; - background: #7c7; -} -.CodeMirror-Tern-completion-array:before { - content: "A"; - background: #c66; -} -.CodeMirror-Tern-completion-number:before { - content: "1"; - background: #999; -} -.CodeMirror-Tern-completion-string:before { - content: "S"; - background: #999; -} -.CodeMirror-Tern-completion-bool:before { - content: "B"; - background: #999; -} - -.CodeMirror-Tern-completion-guess { - color: #999; -} - -.CodeMirror-Tern-tooltip { - border: 1px solid silver; - border-radius: 3px; - color: #444; - padding: 2px 5px; - font-size: 90%; - font-family: monospace; - background-color: white; - white-space: pre-wrap; - - max-width: 40em; - position: absolute; - z-index: 10; - -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2); - -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2); - box-shadow: 2px 3px 5px rgba(0,0,0,.2); - - transition: opacity 1s; - -moz-transition: opacity 1s; - -webkit-transition: opacity 1s; - -o-transition: opacity 1s; - -ms-transition: opacity 1s; -} - -.CodeMirror-Tern-hint-doc { - max-width: 25em; -} - -.CodeMirror-Tern-fname { color: black; } -.CodeMirror-Tern-farg { color: #70a; } -.CodeMirror-Tern-farg-current { text-decoration: underline; } -.CodeMirror-Tern-type { color: #07c; } -.CodeMirror-Tern-fhint-guess { opacity: .7; } diff --git a/plugins/codemirror/codemirror/addon/tern/tern.js b/plugins/codemirror/codemirror/addon/tern/tern.js deleted file mode 100644 index 1f18a65..0000000 --- a/plugins/codemirror/codemirror/addon/tern/tern.js +++ /dev/null @@ -1,632 +0,0 @@ -// Glue code between CodeMirror and Tern. -// -// Create a CodeMirror.TernServer to wrap an actual Tern server, -// register open documents (CodeMirror.Doc instances) with it, and -// call its methods to activate the assisting functions that Tern -// provides. -// -// Options supported (all optional): -// * defs: An array of JSON definition data structures. -// * plugins: An object mapping plugin names to configuration -// options. -// * getFile: A function(name, c) that can be used to access files in -// the project that haven't been loaded yet. Simply do c(null) to -// indicate that a file is not available. -// * fileFilter: A function(value, docName, doc) that will be applied -// to documents before passing them on to Tern. -// * switchToDoc: A function(name) that should, when providing a -// multi-file view, switch the view or focus to the named file. -// * showError: A function(editor, message) that can be used to -// override the way errors are displayed. -// * completionTip: Customize the content in tooltips for completions. -// Is passed a single argument—the completion's data as returned by -// Tern—and may return a string, DOM node, or null to indicate that -// no tip should be shown. By default the docstring is shown. -// * typeTip: Like completionTip, but for the tooltips shown for type -// queries. -// * responseFilter: A function(doc, query, request, error, data) that -// will be applied to the Tern responses before treating them -// -// -// It is possible to run the Tern server in a web worker by specifying -// these additional options: -// * useWorker: Set to true to enable web worker mode. You'll probably -// want to feature detect the actual value you use here, for example -// !!window.Worker. -// * workerScript: The main script of the worker. Point this to -// wherever you are hosting worker.js from this directory. -// * workerDeps: An array of paths pointing (relative to workerScript) -// to the Acorn and Tern libraries and any Tern plugins you want to -// load. Or, if you minified those into a single script and included -// them in the workerScript, simply leave this undefined. - -(function() { - "use strict"; - // declare global: tern - - CodeMirror.TernServer = function(options) { - var self = this; - this.options = options || {}; - var plugins = this.options.plugins || (this.options.plugins = {}); - if (!plugins.doc_comment) plugins.doc_comment = true; - if (this.options.useWorker) { - this.server = new WorkerServer(this); - } else { - this.server = new tern.Server({ - getFile: function(name, c) { return getFile(self, name, c); }, - async: true, - defs: this.options.defs || [], - plugins: plugins - }); - } - this.docs = Object.create(null); - this.trackChange = function(doc, change) { trackChange(self, doc, change); }; - - this.cachedArgHints = null; - this.activeArgHints = null; - this.jumpStack = []; - }; - - CodeMirror.TernServer.prototype = { - addDoc: function(name, doc) { - var data = {doc: doc, name: name, changed: null}; - this.server.addFile(name, docValue(this, data)); - CodeMirror.on(doc, "change", this.trackChange); - return this.docs[name] = data; - }, - - delDoc: function(name) { - var found = this.docs[name]; - if (!found) return; - CodeMirror.off(found.doc, "change", this.trackChange); - delete this.docs[name]; - this.server.delFile(name); - }, - - hideDoc: function(name) { - closeArgHints(this); - var found = this.docs[name]; - if (found && found.changed) sendDoc(this, found); - }, - - complete: function(cm) { - var self = this; - CodeMirror.showHint(cm, function(cm, c) { return hint(self, cm, c); }, {async: true}); - }, - - getHint: function(cm, c) { return hint(this, cm, c); }, - - showType: function(cm, pos) { showType(this, cm, pos); }, - - updateArgHints: function(cm) { updateArgHints(this, cm); }, - - jumpToDef: function(cm) { jumpToDef(this, cm); }, - - jumpBack: function(cm) { jumpBack(this, cm); }, - - rename: function(cm) { rename(this, cm); }, - - request: function (cm, query, c, pos) { - var self = this; - var doc = findDoc(this, cm.getDoc()); - var request = buildRequest(this, doc, query, pos); - - this.server.request(request, function (error, data) { - if (!error && self.options.responseFilter) - data = self.options.responseFilter(doc, query, request, error, data); - c(error, data); - }); - } - }; - - var Pos = CodeMirror.Pos; - var cls = "CodeMirror-Tern-"; - var bigDoc = 250; - - function getFile(ts, name, c) { - var buf = ts.docs[name]; - if (buf) - c(docValue(ts, buf)); - else if (ts.options.getFile) - ts.options.getFile(name, c); - else - c(null); - } - - function findDoc(ts, doc, name) { - for (var n in ts.docs) { - var cur = ts.docs[n]; - if (cur.doc == doc) return cur; - } - if (!name) for (var i = 0;; ++i) { - n = "[doc" + (i || "") + "]"; - if (!ts.docs[n]) { name = n; break; } - } - return ts.addDoc(name, doc); - } - - function trackChange(ts, doc, change) { - var data = findDoc(ts, doc); - - var argHints = ts.cachedArgHints; - if (argHints && argHints.doc == doc && cmpPos(argHints.start, change.to) <= 0) - ts.cachedArgHints = null; - - var changed = data.changed; - if (changed == null) - data.changed = changed = {from: change.from.line, to: change.from.line}; - var end = change.from.line + (change.text.length - 1); - if (change.from.line < changed.to) changed.to = changed.to - (change.to.line - end); - if (end >= changed.to) changed.to = end + 1; - if (changed.from > change.from.line) changed.from = change.from.line; - - if (doc.lineCount() > bigDoc && change.to - changed.from > 100) setTimeout(function() { - if (data.changed && data.changed.to - data.changed.from > 100) sendDoc(ts, data); - }, 200); - } - - function sendDoc(ts, doc) { - ts.server.request({files: [{type: "full", name: doc.name, text: docValue(ts, doc)}]}, function(error) { - if (error) console.error(error); - else doc.changed = null; - }); - } - - // Completion - - function hint(ts, cm, c) { - ts.request(cm, {type: "completions", types: true, docs: true, urls: true}, function(error, data) { - if (error) return showError(ts, cm, error); - var completions = [], after = ""; - var from = data.start, to = data.end; - if (cm.getRange(Pos(from.line, from.ch - 2), from) == "[\"" && - cm.getRange(to, Pos(to.line, to.ch + 2)) != "\"]") - after = "\"]"; - - for (var i = 0; i < data.completions.length; ++i) { - var completion = data.completions[i], className = typeToIcon(completion.type); - if (data.guess) className += " " + cls + "guess"; - completions.push({text: completion.name + after, - displayText: completion.name, - className: className, - data: completion}); - } - - var obj = {from: from, to: to, list: completions}; - var tooltip = null; - CodeMirror.on(obj, "close", function() { remove(tooltip); }); - CodeMirror.on(obj, "update", function() { remove(tooltip); }); - CodeMirror.on(obj, "select", function(cur, node) { - remove(tooltip); - var content = ts.options.completionTip ? ts.options.completionTip(cur.data) : cur.data.doc; - if (content) { - tooltip = makeTooltip(node.parentNode.getBoundingClientRect().right + window.pageXOffset, - node.getBoundingClientRect().top + window.pageYOffset, content); - tooltip.className += " " + cls + "hint-doc"; - } - }); - c(obj); - }); - } - - function typeToIcon(type) { - var suffix; - if (type == "?") suffix = "unknown"; - else if (type == "number" || type == "string" || type == "bool") suffix = type; - else if (/^fn\(/.test(type)) suffix = "fn"; - else if (/^\[/.test(type)) suffix = "array"; - else suffix = "object"; - return cls + "completion " + cls + "completion-" + suffix; - } - - // Type queries - - function showType(ts, cm, pos) { - ts.request(cm, "type", function(error, data) { - if (error) return showError(ts, cm, error); - if (ts.options.typeTip) { - var tip = ts.options.typeTip(data); - } else { - var tip = elt("span", null, elt("strong", null, data.type || "not found")); - if (data.doc) - tip.appendChild(document.createTextNode(" — " + data.doc)); - if (data.url) { - tip.appendChild(document.createTextNode(" ")); - tip.appendChild(elt("a", null, "[docs]")).href = data.url; - } - } - tempTooltip(cm, tip); - }, pos); - } - - // Maintaining argument hints - - function updateArgHints(ts, cm) { - closeArgHints(ts); - - if (cm.somethingSelected()) return; - var state = cm.getTokenAt(cm.getCursor()).state; - var inner = CodeMirror.innerMode(cm.getMode(), state); - if (inner.mode.name != "javascript") return; - var lex = inner.state.lexical; - if (lex.info != "call") return; - - var ch, pos = lex.pos || 0, tabSize = cm.getOption("tabSize"); - for (var line = cm.getCursor().line, e = Math.max(0, line - 9), found = false; line >= e; --line) { - var str = cm.getLine(line), extra = 0; - for (var pos = 0;;) { - var tab = str.indexOf("\t", pos); - if (tab == -1) break; - extra += tabSize - (tab + extra) % tabSize - 1; - pos = tab + 1; - } - ch = lex.column - extra; - if (str.charAt(ch) == "(") {found = true; break;} - } - if (!found) return; - - var start = Pos(line, ch); - var cache = ts.cachedArgHints; - if (cache && cache.doc == cm.getDoc() && cmpPos(start, cache.start) == 0) - return showArgHints(ts, cm, pos); - - ts.request(cm, {type: "type", preferFunction: true, end: start}, function(error, data) { - if (error || !data.type || !(/^fn\(/).test(data.type)) return; - ts.cachedArgHints = { - start: pos, - type: parseFnType(data.type), - name: data.exprName || data.name || "fn", - guess: data.guess, - doc: cm.getDoc() - }; - showArgHints(ts, cm, pos); - }); - } - - function showArgHints(ts, cm, pos) { - closeArgHints(ts); - - var cache = ts.cachedArgHints, tp = cache.type; - var tip = elt("span", cache.guess ? cls + "fhint-guess" : null, - elt("span", cls + "fname", cache.name), "("); - for (var i = 0; i < tp.args.length; ++i) { - if (i) tip.appendChild(document.createTextNode(", ")); - var arg = tp.args[i]; - tip.appendChild(elt("span", cls + "farg" + (i == pos ? " " + cls + "farg-current" : ""), arg.name || "?")); - if (arg.type != "?") { - tip.appendChild(document.createTextNode(":\u00a0")); - tip.appendChild(elt("span", cls + "type", arg.type)); - } - } - tip.appendChild(document.createTextNode(tp.rettype ? ") ->\u00a0" : ")")); - if (tp.rettype) tip.appendChild(elt("span", cls + "type", tp.rettype)); - var place = cm.cursorCoords(null, "page"); - ts.activeArgHints = makeTooltip(place.right + 1, place.bottom, tip); - } - - function parseFnType(text) { - var args = [], pos = 3; - - function skipMatching(upto) { - var depth = 0, start = pos; - for (;;) { - var next = text.charAt(pos); - if (upto.test(next) && !depth) return text.slice(start, pos); - if (/[{\[\(]/.test(next)) ++depth; - else if (/[}\]\)]/.test(next)) --depth; - ++pos; - } - } - - // Parse arguments - if (text.charAt(pos) != ")") for (;;) { - var name = text.slice(pos).match(/^([^, \(\[\{]+): /); - if (name) { - pos += name[0].length; - name = name[1]; - } - args.push({name: name, type: skipMatching(/[\),]/)}); - if (text.charAt(pos) == ")") break; - pos += 2; - } - - var rettype = text.slice(pos).match(/^\) -> (.*)$/); - - return {args: args, rettype: rettype && rettype[1]}; - } - - // Moving to the definition of something - - function jumpToDef(ts, cm) { - function inner(varName) { - var req = {type: "definition", variable: varName || null}; - var doc = findDoc(ts, cm.getDoc()); - ts.server.request(buildRequest(ts, doc, req), function(error, data) { - if (error) return showError(ts, cm, error); - if (!data.file && data.url) { window.open(data.url); return; } - - if (data.file) { - var localDoc = ts.docs[data.file], found; - if (localDoc && (found = findContext(localDoc.doc, data))) { - ts.jumpStack.push({file: doc.name, - start: cm.getCursor("from"), - end: cm.getCursor("to")}); - moveTo(ts, doc, localDoc, found.start, found.end); - return; - } - } - showError(ts, cm, "Could not find a definition."); - }); - } - - if (!atInterestingExpression(cm)) - dialog(cm, "Jump to variable", function(name) { if (name) inner(name); }); - else - inner(); - } - - function jumpBack(ts, cm) { - var pos = ts.jumpStack.pop(), doc = pos && ts.docs[pos.file]; - if (!doc) return; - moveTo(ts, findDoc(ts, cm.getDoc()), doc, pos.start, pos.end); - } - - function moveTo(ts, curDoc, doc, start, end) { - doc.doc.setSelection(end, start); - if (curDoc != doc && ts.options.switchToDoc) { - closeArgHints(ts); - ts.options.switchToDoc(doc.name); - } - } - - // The {line,ch} representation of positions makes this rather awkward. - function findContext(doc, data) { - var before = data.context.slice(0, data.contextOffset).split("\n"); - var startLine = data.start.line - (before.length - 1); - var start = Pos(startLine, (before.length == 1 ? data.start.ch : doc.getLine(startLine).length) - before[0].length); - - var text = doc.getLine(startLine).slice(start.ch); - for (var cur = startLine + 1; cur < doc.lineCount() && text.length < data.context.length; ++cur) - text += "\n" + doc.getLine(cur); - if (text.slice(0, data.context.length) == data.context) return data; - - var cursor = doc.getSearchCursor(data.context, 0, false); - var nearest, nearestDist = Infinity; - while (cursor.findNext()) { - var from = cursor.from(), dist = Math.abs(from.line - start.line) * 10000; - if (!dist) dist = Math.abs(from.ch - start.ch); - if (dist < nearestDist) { nearest = from; nearestDist = dist; } - } - if (!nearest) return null; - - if (before.length == 1) - nearest.ch += before[0].length; - else - nearest = Pos(nearest.line + (before.length - 1), before[before.length - 1].length); - if (data.start.line == data.end.line) - var end = Pos(nearest.line, nearest.ch + (data.end.ch - data.start.ch)); - else - var end = Pos(nearest.line + (data.end.line - data.start.line), data.end.ch); - return {start: nearest, end: end}; - } - - function atInterestingExpression(cm) { - var pos = cm.getCursor("end"), tok = cm.getTokenAt(pos); - if (tok.start < pos.ch && (tok.type == "comment" || tok.type == "string")) return false; - return /\w/.test(cm.getLine(pos.line).slice(Math.max(pos.ch - 1, 0), pos.ch + 1)); - } - - // Variable renaming - - function rename(ts, cm) { - var token = cm.getTokenAt(cm.getCursor()); - if (!/\w/.test(token.string)) showError(ts, cm, "Not at a variable"); - dialog(cm, "New name for " + token.string, function(newName) { - ts.request(cm, {type: "rename", newName: newName, fullDocs: true}, function(error, data) { - if (error) return showError(ts, cm, error); - applyChanges(ts, data.changes); - }); - }); - } - - var nextChangeOrig = 0; - function applyChanges(ts, changes) { - var perFile = Object.create(null); - for (var i = 0; i < changes.length; ++i) { - var ch = changes[i]; - (perFile[ch.file] || (perFile[ch.file] = [])).push(ch); - } - for (var file in perFile) { - var known = ts.docs[file], chs = perFile[file];; - if (!known) continue; - chs.sort(function(a, b) { return cmpPos(b.start, a.start); }); - var origin = "*rename" + (++nextChangeOrig); - for (var i = 0; i < chs.length; ++i) { - var ch = chs[i]; - known.doc.replaceRange(ch.text, ch.start, ch.end, origin); - } - } - } - - // Generic request-building helper - - function buildRequest(ts, doc, query, pos) { - var files = [], offsetLines = 0, allowFragments = !query.fullDocs; - if (!allowFragments) delete query.fullDocs; - if (typeof query == "string") query = {type: query}; - query.lineCharPositions = true; - if (query.end == null) { - query.end = pos || doc.doc.getCursor("end"); - if (doc.doc.somethingSelected()) - query.start = doc.doc.getCursor("start"); - } - var startPos = query.start || query.end; - - if (doc.changed) { - if (doc.doc.lineCount() > bigDoc && allowFragments !== false && - doc.changed.to - doc.changed.from < 100 && - doc.changed.from <= startPos.line && doc.changed.to > query.end.line) { - files.push(getFragmentAround(doc, startPos, query.end)); - query.file = "#0"; - var offsetLines = files[0].offsetLines; - if (query.start != null) query.start = Pos(query.start.line - -offsetLines, query.start.ch); - query.end = Pos(query.end.line - offsetLines, query.end.ch); - } else { - files.push({type: "full", - name: doc.name, - text: docValue(ts, doc)}); - query.file = doc.name; - doc.changed = null; - } - } else { - query.file = doc.name; - } - for (var name in ts.docs) { - var cur = ts.docs[name]; - if (cur.changed && cur != doc) { - files.push({type: "full", name: cur.name, text: docValue(ts, cur)}); - cur.changed = null; - } - } - - return {query: query, files: files}; - } - - function getFragmentAround(data, start, end) { - var doc = data.doc; - var minIndent = null, minLine = null, endLine, tabSize = 4; - for (var p = start.line - 1, min = Math.max(0, p - 50); p >= min; --p) { - var line = doc.getLine(p), fn = line.search(/\bfunction\b/); - if (fn < 0) continue; - var indent = CodeMirror.countColumn(line, null, tabSize); - if (minIndent != null && minIndent <= indent) continue; - minIndent = indent; - minLine = p; - } - if (minLine == null) minLine = min; - var max = Math.min(doc.lastLine(), end.line + 20); - if (minIndent == null || minIndent == CodeMirror.countColumn(doc.getLine(start.line), null, tabSize)) - endLine = max; - else for (endLine = end.line + 1; endLine < max; ++endLine) { - var indent = CodeMirror.countColumn(doc.getLine(endLine), null, tabSize); - if (indent <= minIndent) break; - } - var from = Pos(minLine, 0); - - return {type: "part", - name: data.name, - offsetLines: from.line, - text: doc.getRange(from, Pos(endLine, 0))}; - } - - // Generic utilities - - function cmpPos(a, b) { return a.line - b.line || a.ch - b.ch; } - - function elt(tagname, cls /*, ... elts*/) { - var e = document.createElement(tagname); - if (cls) e.className = cls; - for (var i = 2; i < arguments.length; ++i) { - var elt = arguments[i]; - if (typeof elt == "string") elt = document.createTextNode(elt); - e.appendChild(elt); - } - return e; - } - - function dialog(cm, text, f) { - if (cm.openDialog) - cm.openDialog(text + ": ", f); - else - f(prompt(text, "")); - } - - // Tooltips - - function tempTooltip(cm, content) { - var where = cm.cursorCoords(); - var tip = makeTooltip(where.right + 1, where.bottom, content); - function clear() { - if (!tip.parentNode) return; - cm.off("cursorActivity", clear); - fadeOut(tip); - } - setTimeout(clear, 1700); - cm.on("cursorActivity", clear); - } - - function makeTooltip(x, y, content) { - var node = elt("div", cls + "tooltip", content); - node.style.left = x + "px"; - node.style.top = y + "px"; - document.body.appendChild(node); - return node; - } - - function remove(node) { - var p = node && node.parentNode; - if (p) p.removeChild(node); - } - - function fadeOut(tooltip) { - tooltip.style.opacity = "0"; - setTimeout(function() { remove(tooltip); }, 1100); - } - - function showError(ts, cm, msg) { - if (ts.options.showError) - ts.options.showError(cm, msg); - else - tempTooltip(cm, String(msg)); - } - - function closeArgHints(ts) { - if (ts.activeArgHints) { remove(ts.activeArgHints); ts.activeArgHints = null; } - } - - function docValue(ts, doc) { - var val = doc.doc.getValue(); - if (ts.options.fileFilter) val = ts.options.fileFilter(val, doc.name, doc.doc); - return val; - } - - // Worker wrapper - - function WorkerServer(ts) { - var worker = new Worker(ts.options.workerScript); - worker.postMessage({type: "init", - defs: ts.options.defs, - plugins: ts.options.plugins, - scripts: ts.options.workerDeps}); - var msgId = 0, pending = {}; - - function send(data, c) { - if (c) { - data.id = ++msgId; - pending[msgId] = c; - } - worker.postMessage(data); - } - worker.onmessage = function(e) { - var data = e.data; - if (data.type == "getFile") { - getFile(ts, data.name, function(err, text) { - send({type: "getFile", err: String(err), text: text, id: data.id}); - }); - } else if (data.type == "debug") { - console.log(data.message); - } else if (data.id && pending[data.id]) { - pending[data.id](data.err, data.body); - delete pending[data.id]; - } - }; - worker.onerror = function(e) { - for (var id in pending) pending[id](e); - pending = {}; - }; - - this.addFile = function(name, text) { send({type: "add", name: name, text: text}); }; - this.delFile = function(name) { send({type: "del", name: name}); }; - this.request = function(body, c) { send({type: "req", body: body}, c); }; - } -})(); diff --git a/plugins/codemirror/codemirror/addon/tern/worker.js b/plugins/codemirror/codemirror/addon/tern/worker.js deleted file mode 100644 index 1ff63de..0000000 --- a/plugins/codemirror/codemirror/addon/tern/worker.js +++ /dev/null @@ -1,41 +0,0 @@ -// declare global: tern, server - -var server; - -this.onmessage = function(e) { - var data = e.data; - switch (data.type) { - case "init": return startServer(data.defs, data.plugins, data.scripts); - case "add": return server.addFile(data.name, data.text); - case "del": return server.delFile(data.name); - case "req": return server.request(data.body, function(err, reqData) { - postMessage({id: data.id, body: reqData, err: err && String(err)}); - }); - case "getFile": - var c = pending[data.id]; - delete pending[data.id]; - return c(data.err, data.text); - default: throw new Error("Unknown message type: " + data.type); - } -}; - -var nextId = 0, pending = {}; -function getFile(file, c) { - postMessage({type: "getFile", name: file, id: ++nextId}); - pending[nextId] = c; -} - -function startServer(defs, plugins, scripts) { - if (scripts) importScripts.apply(null, scripts); - - server = new tern.Server({ - getFile: getFile, - async: true, - defs: defs, - plugins: plugins - }); -} - -var console = { - log: function(v) { postMessage({type: "debug", message: v}); } -}; diff --git a/plugins/codemirror/codemirror/addon/wrap/hardwrap.js b/plugins/codemirror/codemirror/addon/wrap/hardwrap.js deleted file mode 100644 index f252ffc..0000000 --- a/plugins/codemirror/codemirror/addon/wrap/hardwrap.js +++ /dev/null @@ -1,99 +0,0 @@ -(function() { - "use strict"; - - var Pos = CodeMirror.Pos; - - function findParagraph(cm, pos, options) { - var startRE = options.paragraphStart || cm.getHelper(pos, "paragraphStart"); - for (var start = pos.line, first = cm.firstLine(); start > first; --start) { - var line = cm.getLine(start); - if (startRE && startRE.test(line)) break; - if (!/\S/.test(line)) { ++start; break; } - } - var endRE = options.paragraphEnd || cm.getHelper(pos, "paragraphEnd"); - for (var end = pos.line + 1, last = cm.lastLine(); end <= last; ++end) { - var line = cm.getLine(end); - if (endRE && endRE.test(line)) { ++end; break; } - if (!/\S/.test(line)) break; - } - return {from: start, to: end}; - } - - function findBreakPoint(text, column, wrapOn, killTrailingSpace) { - for (var at = column; at > 0; --at) - if (wrapOn.test(text.slice(at - 1, at + 1))) break; - if (at == 0) at = column; - var endOfText = at; - if (killTrailingSpace) - while (text.charAt(endOfText - 1) == " ") --endOfText; - return {from: endOfText, to: at}; - } - - function wrapRange(cm, from, to, options) { - from = cm.clipPos(from); to = cm.clipPos(to); - var column = options.column || 80; - var wrapOn = options.wrapOn || /\s\S|-[^\.\d]/; - var killTrailing = options.killTrailingSpace !== false; - var changes = [], curLine = "", curNo = from.line; - var lines = cm.getRange(from, to, false); - for (var i = 0; i < lines.length; ++i) { - var text = lines[i], oldLen = curLine.length, spaceInserted = 0; - if (curLine && text && !wrapOn.test(curLine.charAt(curLine.length - 1) + text.charAt(0))) { - curLine += " "; - spaceInserted = 1; - } - curLine += text; - if (i) { - var firstBreak = curLine.length > column && findBreakPoint(curLine, column, wrapOn, killTrailing); - // If this isn't broken, or is broken at a different point, remove old break - if (!firstBreak || firstBreak.from != oldLen || firstBreak.to != oldLen + spaceInserted) { - changes.push({text: spaceInserted ? " " : "", - from: Pos(curNo, oldLen), - to: Pos(curNo + 1, 0)}); - } else { - curLine = text; - ++curNo; - } - } - while (curLine.length > column) { - var bp = findBreakPoint(curLine, column, wrapOn, killTrailing); - changes.push({text: "\n", - from: Pos(curNo, bp.from), - to: Pos(curNo, bp.to)}); - curLine = curLine.slice(bp.to); - ++curNo; - } - } - if (changes.length) cm.operation(function() { - for (var i = 0; i < changes.length; ++i) { - var change = changes[i]; - cm.replaceRange(change.text, change.from, change.to); - } - }); - } - - CodeMirror.defineExtension("wrapParagraph", function(pos, options) { - options = options || {}; - if (!pos) pos = this.getCursor(); - var para = findParagraph(this, pos, options); - wrapRange(this, Pos(para.from, 0), Pos(para.to - 1), options); - }); - - CodeMirror.defineExtension("wrapRange", function(from, to, options) { - wrapRange(this, from, to, options || {}); - }); - - CodeMirror.defineExtension("wrapParagraphsInRange", function(from, to, options) { - options = options || {}; - var cm = this, paras = []; - for (var line = from.line; line <= to.line;) { - var para = findParagraph(cm, Pos(line, 0), options); - paras.push(para); - line = para.to; - } - if (paras.length) cm.operation(function() { - for (var i = paras.length - 1; i >= 0; --i) - wrapRange(cm, Pos(paras[i].from, 0), Pos(paras[i].to - 1), options); - }); - }); -})(); diff --git a/plugins/codemirror/codemirror/bower.json b/plugins/codemirror/codemirror/bower.json deleted file mode 100644 index 66e049d..0000000 --- a/plugins/codemirror/codemirror/bower.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "CodeMirror", - "main": ["lib/codemirror.js", "lib/codemirror.css"], - "ignore": [ - "**/.*", - "node_modules", - "components", - "bin", - "demo", - "doc", - "test", - "index.html", - "package.json" - ] -} diff --git a/plugins/codemirror/codemirror/index.html b/plugins/codemirror/codemirror/index.html deleted file mode 100644 index f9a9389..0000000 --- a/plugins/codemirror/codemirror/index.html +++ /dev/null @@ -1,192 +0,0 @@ - - -CodeMirror - - - - - - - - - - - - - - - - - -
    - -
    -

    CodeMirror is a versatile text editor - implemented in JavaScript for the browser. It is specialized for - editing code, and comes with a number of language modes and addons - that implement more advanced editing functionaly.

    - -

    A rich programming API and a - CSS theming system are - available for customizing CodeMirror to fit your application, and - extending it with new functionality.

    -
    - -
    -

    This is CodeMirror

    -
    -
    - -
    - DOWNLOAD LATEST RELEASE -
    version 3.20 (Release notes)
    - -
    - DONATE WITH PAYPAL -
    - or Bank, - Gittip, - Flattr
    -
    - × - Bank: Rabobank
    - Country: Netherlands
    - SWIFT: RABONL2U
    - Account: 147850770
    - Name: Marijn Haverbeke
    - IBAN: NL26 RABO 0147 8507 70 -
    -
    - - -
    -
    -
    - Purchase commercial support -
    -
    -
    -
    - -
    -

    Features

    - -
    - -
    -

    Community

    - -

    CodeMirror is an open-source project shared under - an MIT license. It is the editor used in - Light - Table, Adobe - Brackets, Google Apps - Script, Bitbucket, - and many other projects.

    - -

    Development and bug tracking happens - on github - (alternate git - repository). - Please read these - pointers before submitting a bug. Use pull requests to submit - patches. All contributions must be released under the same MIT - license that CodeMirror uses.

    - -

    Discussion around the project is done on - a mailing list. - There is also - the codemirror-announce - list, which is only used for major announcements (such as new - versions). If needed, you can - contact the maintainer - directly.

    - -

    A list of CodeMirror-related software that is not part of the - main distribution is maintained - on our - wiki. Feel free to add your project.

    -
    - -
    -

    Browser support

    -

    The desktop versions of the following browsers, - in standards mode (HTML5 <!doctype html> - recommended) are supported:

    - - - - - - -
    Firefoxversion 3 and up
    Chromeany version
    Safariversion 5.2 and up
    Internet Explorerversion 8 and up
    Operaversion 9 and up
    -

    Modern mobile browsers tend to partly work. Bug reports and - patches for mobile support are welcome, but the maintainer does not - have the time or budget to actually work on it himself.

    -
    - -
    diff --git a/plugins/codemirror/codemirror/keymap/emacs.js b/plugins/codemirror/codemirror/keymap/emacs.js deleted file mode 100644 index 7a3dfb1..0000000 --- a/plugins/codemirror/codemirror/keymap/emacs.js +++ /dev/null @@ -1,387 +0,0 @@ -(function() { - "use strict"; - - var Pos = CodeMirror.Pos; - function posEq(a, b) { return a.line == b.line && a.ch == b.ch; } - - // Kill 'ring' - - var killRing = []; - function addToRing(str) { - killRing.push(str); - if (killRing.length > 50) killRing.shift(); - } - function growRingTop(str) { - if (!killRing.length) return addToRing(str); - killRing[killRing.length - 1] += str; - } - function getFromRing(n) { return killRing[killRing.length - (n ? Math.min(n, 1) : 1)] || ""; } - function popFromRing() { if (killRing.length > 1) killRing.pop(); return getFromRing(); } - - var lastKill = null; - - function kill(cm, from, to, mayGrow, text) { - if (text == null) text = cm.getRange(from, to); - - if (mayGrow && lastKill && lastKill.cm == cm && posEq(from, lastKill.pos) && cm.isClean(lastKill.gen)) - growRingTop(text); - else - addToRing(text); - cm.replaceRange("", from, to, "+delete"); - - if (mayGrow) lastKill = {cm: cm, pos: from, gen: cm.changeGeneration()}; - else lastKill = null; - } - - // Boundaries of various units - - function byChar(cm, pos, dir) { - return cm.findPosH(pos, dir, "char", true); - } - - function byWord(cm, pos, dir) { - return cm.findPosH(pos, dir, "word", true); - } - - function byLine(cm, pos, dir) { - return cm.findPosV(pos, dir, "line", cm.doc.sel.goalColumn); - } - - function byPage(cm, pos, dir) { - return cm.findPosV(pos, dir, "page", cm.doc.sel.goalColumn); - } - - function byParagraph(cm, pos, dir) { - var no = pos.line, line = cm.getLine(no); - var sawText = /\S/.test(dir < 0 ? line.slice(0, pos.ch) : line.slice(pos.ch)); - var fst = cm.firstLine(), lst = cm.lastLine(); - for (;;) { - no += dir; - if (no < fst || no > lst) - return cm.clipPos(Pos(no - dir, dir < 0 ? 0 : null)); - line = cm.getLine(no); - var hasText = /\S/.test(line); - if (hasText) sawText = true; - else if (sawText) return Pos(no, 0); - } - } - - function bySentence(cm, pos, dir) { - var line = pos.line, ch = pos.ch; - var text = cm.getLine(pos.line), sawWord = false; - for (;;) { - var next = text.charAt(ch + (dir < 0 ? -1 : 0)); - if (!next) { // End/beginning of line reached - if (line == (dir < 0 ? cm.firstLine() : cm.lastLine())) return Pos(line, ch); - text = cm.getLine(line + dir); - if (!/\S/.test(text)) return Pos(line, ch); - line += dir; - ch = dir < 0 ? text.length : 0; - continue; - } - if (sawWord && /[!?.]/.test(next)) return Pos(line, ch + (dir > 0 ? 1 : 0)); - if (!sawWord) sawWord = /\w/.test(next); - ch += dir; - } - } - - function byExpr(cm, pos, dir) { - var wrap; - if (cm.findMatchingBracket && (wrap = cm.findMatchingBracket(pos, true)) - && wrap.match && (wrap.forward ? 1 : -1) == dir) - return dir > 0 ? Pos(wrap.to.line, wrap.to.ch + 1) : wrap.to; - - for (var first = true;; first = false) { - var token = cm.getTokenAt(pos); - var after = Pos(pos.line, dir < 0 ? token.start : token.end); - if (first && dir > 0 && token.end == pos.ch || !/\w/.test(token.string)) { - var newPos = cm.findPosH(after, dir, "char"); - if (posEq(after, newPos)) return pos; - else pos = newPos; - } else { - return after; - } - } - } - - // Prefixes (only crudely supported) - - function getPrefix(cm, precise) { - var digits = cm.state.emacsPrefix; - if (!digits) return precise ? null : 1; - clearPrefix(cm); - return digits == "-" ? -1 : Number(digits); - } - - function repeated(cmd) { - var f = typeof cmd == "string" ? function(cm) { cm.execCommand(cmd); } : cmd; - return function(cm) { - var prefix = getPrefix(cm); - f(cm); - for (var i = 1; i < prefix; ++i) f(cm); - }; - } - - function findEnd(cm, by, dir) { - var pos = cm.getCursor(), prefix = getPrefix(cm); - if (prefix < 0) { dir = -dir; prefix = -prefix; } - for (var i = 0; i < prefix; ++i) { - var newPos = by(cm, pos, dir); - if (posEq(newPos, pos)) break; - pos = newPos; - } - return pos; - } - - function move(by, dir) { - var f = function(cm) { - cm.extendSelection(findEnd(cm, by, dir)); - }; - f.motion = true; - return f; - } - - function killTo(cm, by, dir) { - kill(cm, cm.getCursor(), findEnd(cm, by, dir), true); - } - - function addPrefix(cm, digit) { - if (cm.state.emacsPrefix) { - if (digit != "-") cm.state.emacsPrefix += digit; - return; - } - // Not active yet - cm.state.emacsPrefix = digit; - cm.on("keyHandled", maybeClearPrefix); - cm.on("inputRead", maybeDuplicateInput); - } - - var prefixPreservingKeys = {"Alt-G": true, "Ctrl-X": true, "Ctrl-Q": true, "Ctrl-U": true}; - - function maybeClearPrefix(cm, arg) { - if (!cm.state.emacsPrefixMap && !prefixPreservingKeys.hasOwnProperty(arg)) - clearPrefix(cm); - } - - function clearPrefix(cm) { - cm.state.emacsPrefix = null; - cm.off("keyHandled", maybeClearPrefix); - cm.off("inputRead", maybeDuplicateInput); - } - - function maybeDuplicateInput(cm, event) { - var dup = getPrefix(cm); - if (dup > 1 && event.origin == "+input") { - var one = event.text.join("\n"), txt = ""; - for (var i = 1; i < dup; ++i) txt += one; - cm.replaceSelection(txt, "end", "+input"); - } - } - - function addPrefixMap(cm) { - cm.state.emacsPrefixMap = true; - cm.addKeyMap(prefixMap); - cm.on("keyHandled", maybeRemovePrefixMap); - cm.on("inputRead", maybeRemovePrefixMap); - } - - function maybeRemovePrefixMap(cm, arg) { - if (typeof arg == "string" && (/^\d$/.test(arg) || arg == "Ctrl-U")) return; - cm.removeKeyMap(prefixMap); - cm.state.emacsPrefixMap = false; - cm.off("keyHandled", maybeRemovePrefixMap); - cm.off("inputRead", maybeRemovePrefixMap); - } - - // Utilities - - function setMark(cm) { - cm.setCursor(cm.getCursor()); - cm.setExtending(true); - cm.on("change", function() { cm.setExtending(false); }); - } - - function getInput(cm, msg, f) { - if (cm.openDialog) - cm.openDialog(msg + ": ", f, {bottom: true}); - else - f(prompt(msg, "")); - } - - function operateOnWord(cm, op) { - var start = cm.getCursor(), end = cm.findPosH(start, 1, "word"); - cm.replaceRange(op(cm.getRange(start, end)), start, end); - cm.setCursor(end); - } - - function toEnclosingExpr(cm) { - var pos = cm.getCursor(), line = pos.line, ch = pos.ch; - var stack = []; - while (line >= cm.firstLine()) { - var text = cm.getLine(line); - for (var i = ch == null ? text.length : ch; i > 0;) { - var ch = text.charAt(--i); - if (ch == ")") - stack.push("("); - else if (ch == "]") - stack.push("["); - else if (ch == "}") - stack.push("{"); - else if (/[\(\{\[]/.test(ch) && (!stack.length || stack.pop() != ch)) - return cm.extendSelection(Pos(line, i)); - } - --line; ch = null; - } - } - - // Actual keymap - - var keyMap = CodeMirror.keyMap.emacs = { - "Ctrl-W": function(cm) {kill(cm, cm.getCursor("start"), cm.getCursor("end"));}, - "Ctrl-K": repeated(function(cm) { - var start = cm.getCursor(), end = cm.clipPos(Pos(start.line)); - var text = cm.getRange(start, end); - if (!/\S/.test(text)) { - text += "\n"; - end = Pos(start.line + 1, 0); - } - kill(cm, start, end, true, text); - }), - "Alt-W": function(cm) { - addToRing(cm.getSelection()); - }, - "Ctrl-Y": function(cm) { - var start = cm.getCursor(); - cm.replaceRange(getFromRing(getPrefix(cm)), start, start, "paste"); - cm.setSelection(start, cm.getCursor()); - }, - "Alt-Y": function(cm) {cm.replaceSelection(popFromRing());}, - - "Ctrl-Space": setMark, "Ctrl-Shift-2": setMark, - - "Ctrl-F": move(byChar, 1), "Ctrl-B": move(byChar, -1), - "Right": move(byChar, 1), "Left": move(byChar, -1), - "Ctrl-D": function(cm) { killTo(cm, byChar, 1); }, - "Delete": function(cm) { killTo(cm, byChar, 1); }, - "Ctrl-H": function(cm) { killTo(cm, byChar, -1); }, - "Backspace": function(cm) { killTo(cm, byChar, -1); }, - - "Alt-F": move(byWord, 1), "Alt-B": move(byWord, -1), - "Alt-D": function(cm) { killTo(cm, byWord, 1); }, - "Alt-Backspace": function(cm) { killTo(cm, byWord, -1); }, - - "Ctrl-N": move(byLine, 1), "Ctrl-P": move(byLine, -1), - "Down": move(byLine, 1), "Up": move(byLine, -1), - "Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd", - "End": "goLineEnd", "Home": "goLineStart", - - "Alt-V": move(byPage, -1), "Ctrl-V": move(byPage, 1), - "PageUp": move(byPage, -1), "PageDown": move(byPage, 1), - - "Ctrl-Up": move(byParagraph, -1), "Ctrl-Down": move(byParagraph, 1), - - "Alt-A": move(bySentence, -1), "Alt-E": move(bySentence, 1), - "Alt-K": function(cm) { killTo(cm, bySentence, 1); }, - - "Ctrl-Alt-K": function(cm) { killTo(cm, byExpr, 1); }, - "Ctrl-Alt-Backspace": function(cm) { killTo(cm, byExpr, -1); }, - "Ctrl-Alt-F": move(byExpr, 1), "Ctrl-Alt-B": move(byExpr, -1), - - "Shift-Ctrl-Alt-2": function(cm) { - cm.setSelection(findEnd(cm, byExpr, 1), cm.getCursor()); - }, - "Ctrl-Alt-T": function(cm) { - var leftStart = byExpr(cm, cm.getCursor(), -1), leftEnd = byExpr(cm, leftStart, 1); - var rightEnd = byExpr(cm, leftEnd, 1), rightStart = byExpr(cm, rightEnd, -1); - cm.replaceRange(cm.getRange(rightStart, rightEnd) + cm.getRange(leftEnd, rightStart) + - cm.getRange(leftStart, leftEnd), leftStart, rightEnd); - }, - "Ctrl-Alt-U": repeated(toEnclosingExpr), - - "Alt-Space": function(cm) { - var pos = cm.getCursor(), from = pos.ch, to = pos.ch, text = cm.getLine(pos.line); - while (from && /\s/.test(text.charAt(from - 1))) --from; - while (to < text.length && /\s/.test(text.charAt(to))) ++to; - cm.replaceRange(" ", Pos(pos.line, from), Pos(pos.line, to)); - }, - "Ctrl-O": repeated(function(cm) { cm.replaceSelection("\n", "start"); }), - "Ctrl-T": repeated(function(cm) { - var pos = cm.getCursor(); - if (pos.ch < cm.getLine(pos.line).length) pos = Pos(pos.line, pos.ch + 1); - var from = cm.findPosH(pos, -2, "char"); - var range = cm.getRange(from, pos); - if (range.length != 2) return; - cm.setSelection(from, pos); - cm.replaceSelection(range.charAt(1) + range.charAt(0), "end"); - }), - - "Alt-C": repeated(function(cm) { - operateOnWord(cm, function(w) { - var letter = w.search(/\w/); - if (letter == -1) return w; - return w.slice(0, letter) + w.charAt(letter).toUpperCase() + w.slice(letter + 1).toLowerCase(); - }); - }), - "Alt-U": repeated(function(cm) { - operateOnWord(cm, function(w) { return w.toUpperCase(); }); - }), - "Alt-L": repeated(function(cm) { - operateOnWord(cm, function(w) { return w.toLowerCase(); }); - }), - - "Alt-;": "toggleComment", - - "Ctrl-/": repeated("undo"), "Shift-Ctrl--": repeated("undo"), - "Ctrl-Z": repeated("undo"), "Cmd-Z": repeated("undo"), - "Shift-Alt-,": "goDocStart", "Shift-Alt-.": "goDocEnd", - "Ctrl-S": "findNext", "Ctrl-R": "findPrev", "Ctrl-G": "clearSearch", "Shift-Alt-5": "replace", - "Alt-/": "autocomplete", - "Ctrl-J": "newlineAndIndent", "Enter": false, "Tab": "indentAuto", - - "Alt-G": function(cm) {cm.setOption("keyMap", "emacs-Alt-G");}, - "Ctrl-X": function(cm) {cm.setOption("keyMap", "emacs-Ctrl-X");}, - "Ctrl-Q": function(cm) {cm.setOption("keyMap", "emacs-Ctrl-Q");}, - "Ctrl-U": addPrefixMap - }; - - CodeMirror.keyMap["emacs-Ctrl-X"] = { - "Tab": function(cm) { - cm.indentSelection(getPrefix(cm, true) || cm.getOption("indentUnit")); - }, - "Ctrl-X": function(cm) { - cm.setSelection(cm.getCursor("head"), cm.getCursor("anchor")); - }, - - "Ctrl-S": "save", "Ctrl-W": "save", "S": "saveAll", "F": "open", "U": repeated("undo"), "K": "close", - "Delete": function(cm) { kill(cm, cm.getCursor(), bySentence(cm, cm.getCursor(), 1), true); }, - auto: "emacs", nofallthrough: true, disableInput: true - }; - - CodeMirror.keyMap["emacs-Alt-G"] = { - "G": function(cm) { - var prefix = getPrefix(cm, true); - if (prefix != null && prefix > 0) return cm.setCursor(prefix - 1); - - getInput(cm, "Goto line", function(str) { - var num; - if (str && !isNaN(num = Number(str)) && num == num|0 && num > 0) - cm.setCursor(num - 1); - }); - }, - auto: "emacs", nofallthrough: true, disableInput: true - }; - - CodeMirror.keyMap["emacs-Ctrl-Q"] = { - "Tab": repeated("insertTab"), - auto: "emacs", nofallthrough: true - }; - - var prefixMap = {"Ctrl-G": clearPrefix}; - function regPrefix(d) { - prefixMap[d] = function(cm) { addPrefix(cm, d); }; - keyMap["Ctrl-" + d] = function(cm) { addPrefix(cm, d); }; - prefixPreservingKeys["Ctrl-" + d] = true; - } - for (var i = 0; i < 10; ++i) regPrefix(String(i)); - regPrefix("-"); -})(); diff --git a/plugins/codemirror/codemirror/keymap/extra.js b/plugins/codemirror/codemirror/keymap/extra.js deleted file mode 100644 index 18dd5a9..0000000 --- a/plugins/codemirror/codemirror/keymap/extra.js +++ /dev/null @@ -1,43 +0,0 @@ -// A number of additional default bindings that are too obscure to -// include in the core codemirror.js file. - -(function() { - "use strict"; - - var Pos = CodeMirror.Pos; - - function moveLines(cm, start, end, dist) { - if (!dist || start > end) return 0; - - var from = cm.clipPos(Pos(start, 0)), to = cm.clipPos(Pos(end)); - var text = cm.getRange(from, to); - - if (start <= cm.firstLine()) - cm.replaceRange("", from, Pos(to.line + 1, 0)); - else - cm.replaceRange("", Pos(from.line - 1), to); - var target = from.line + dist; - if (target <= cm.firstLine()) { - cm.replaceRange(text + "\n", Pos(target, 0)); - return cm.firstLine() - from.line; - } else { - var targetPos = cm.clipPos(Pos(target - 1)); - cm.replaceRange("\n" + text, targetPos); - return targetPos.line + 1 - from.line; - } - } - - function moveSelectedLines(cm, dist) { - var head = cm.getCursor("head"), anchor = cm.getCursor("anchor"); - cm.operation(function() { - var moved = moveLines(cm, Math.min(head.line, anchor.line), Math.max(head.line, anchor.line), dist); - cm.setSelection(Pos(anchor.line + moved, anchor.ch), Pos(head.line + moved, head.ch)); - }); - } - - CodeMirror.commands.moveLinesUp = function(cm) { moveSelectedLines(cm, -1); }; - CodeMirror.commands.moveLinesDown = function(cm) { moveSelectedLines(cm, 1); }; - - CodeMirror.keyMap["default"]["Alt-Up"] = "moveLinesUp"; - CodeMirror.keyMap["default"]["Alt-Down"] = "moveLinesDown"; -})(); diff --git a/plugins/codemirror/codemirror/keymap/vim.js b/plugins/codemirror/codemirror/keymap/vim.js deleted file mode 100644 index dab10e2..0000000 --- a/plugins/codemirror/codemirror/keymap/vim.js +++ /dev/null @@ -1,3703 +0,0 @@ -/** - * Supported keybindings: - * - * Motion: - * h, j, k, l - * gj, gk - * e, E, w, W, b, B, ge, gE - * f, F, t, T - * $, ^, 0, -, +, _ - * gg, G - * % - * ', ` - * - * Operator: - * d, y, c - * dd, yy, cc - * g~, g~g~ - * >, <, >>, << - * - * Operator-Motion: - * x, X, D, Y, C, ~ - * - * Action: - * a, i, s, A, I, S, o, O - * zz, z., z, zt, zb, z- - * J - * u, Ctrl-r - * m - * r - * - * Modes: - * ESC - leave insert mode, visual mode, and clear input state. - * Ctrl-[, Ctrl-c - same as ESC. - * - * Registers: unamed, -, a-z, A-Z, 0-9 - * (Does not respect the special case for number registers when delete - * operator is made with these commands: %, (, ), , /, ?, n, N, {, } ) - * TODO: Implement the remaining registers. - * Marks: a-z, A-Z, and 0-9 - * TODO: Implement the remaining special marks. They have more complex - * behavior. - * - * Events: - * 'vim-mode-change' - raised on the editor anytime the current mode changes, - * Event object: {mode: "visual", subMode: "linewise"} - * - * Code structure: - * 1. Default keymap - * 2. Variable declarations and short basic helpers - * 3. Instance (External API) implementation - * 4. Internal state tracking objects (input state, counter) implementation - * and instanstiation - * 5. Key handler (the main command dispatcher) implementation - * 6. Motion, operator, and action implementations - * 7. Helper functions for the key handler, motions, operators, and actions - * 8. Set up Vim to work as a keymap for CodeMirror. - */ - -(function() { - 'use strict'; - - var defaultKeymap = [ - // Key to key mapping. This goes first to make it possible to override - // existing mappings. - { keys: [''], type: 'keyToKey', toKeys: ['h'] }, - { keys: [''], type: 'keyToKey', toKeys: ['l'] }, - { keys: [''], type: 'keyToKey', toKeys: ['k'] }, - { keys: [''], type: 'keyToKey', toKeys: ['j'] }, - { keys: [''], type: 'keyToKey', toKeys: ['l'] }, - { keys: [''], type: 'keyToKey', toKeys: ['h'] }, - { keys: [''], type: 'keyToKey', toKeys: ['W'] }, - { keys: [''], type: 'keyToKey', toKeys: ['B'] }, - { keys: [''], type: 'keyToKey', toKeys: ['w'] }, - { keys: [''], type: 'keyToKey', toKeys: ['b'] }, - { keys: [''], type: 'keyToKey', toKeys: ['j'] }, - { keys: [''], type: 'keyToKey', toKeys: ['k'] }, - { keys: ['C-['], type: 'keyToKey', toKeys: [''] }, - { keys: [''], type: 'keyToKey', toKeys: [''] }, - { keys: ['s'], type: 'keyToKey', toKeys: ['c', 'l'], context: 'normal' }, - { keys: ['s'], type: 'keyToKey', toKeys: ['x', 'i'], context: 'visual'}, - { keys: ['S'], type: 'keyToKey', toKeys: ['c', 'c'], context: 'normal' }, - { keys: ['S'], type: 'keyToKey', toKeys: ['d', 'c', 'c'], context: 'visual' }, - { keys: [''], type: 'keyToKey', toKeys: ['0'] }, - { keys: [''], type: 'keyToKey', toKeys: ['$'] }, - { keys: [''], type: 'keyToKey', toKeys: [''] }, - { keys: [''], type: 'keyToKey', toKeys: [''] }, - // Motions - { keys: ['H'], type: 'motion', - motion: 'moveToTopLine', - motionArgs: { linewise: true, toJumplist: true }}, - { keys: ['M'], type: 'motion', - motion: 'moveToMiddleLine', - motionArgs: { linewise: true, toJumplist: true }}, - { keys: ['L'], type: 'motion', - motion: 'moveToBottomLine', - motionArgs: { linewise: true, toJumplist: true }}, - { keys: ['h'], type: 'motion', - motion: 'moveByCharacters', - motionArgs: { forward: false }}, - { keys: ['l'], type: 'motion', - motion: 'moveByCharacters', - motionArgs: { forward: true }}, - { keys: ['j'], type: 'motion', - motion: 'moveByLines', - motionArgs: { forward: true, linewise: true }}, - { keys: ['k'], type: 'motion', - motion: 'moveByLines', - motionArgs: { forward: false, linewise: true }}, - { keys: ['g','j'], type: 'motion', - motion: 'moveByDisplayLines', - motionArgs: { forward: true }}, - { keys: ['g','k'], type: 'motion', - motion: 'moveByDisplayLines', - motionArgs: { forward: false }}, - { keys: ['w'], type: 'motion', - motion: 'moveByWords', - motionArgs: { forward: true, wordEnd: false }}, - { keys: ['W'], type: 'motion', - motion: 'moveByWords', - motionArgs: { forward: true, wordEnd: false, bigWord: true }}, - { keys: ['e'], type: 'motion', - motion: 'moveByWords', - motionArgs: { forward: true, wordEnd: true, inclusive: true }}, - { keys: ['E'], type: 'motion', - motion: 'moveByWords', - motionArgs: { forward: true, wordEnd: true, bigWord: true, - inclusive: true }}, - { keys: ['b'], type: 'motion', - motion: 'moveByWords', - motionArgs: { forward: false, wordEnd: false }}, - { keys: ['B'], type: 'motion', - motion: 'moveByWords', - motionArgs: { forward: false, wordEnd: false, bigWord: true }}, - { keys: ['g', 'e'], type: 'motion', - motion: 'moveByWords', - motionArgs: { forward: false, wordEnd: true, inclusive: true }}, - { keys: ['g', 'E'], type: 'motion', - motion: 'moveByWords', - motionArgs: { forward: false, wordEnd: true, bigWord: true, - inclusive: true }}, - { keys: ['{'], type: 'motion', motion: 'moveByParagraph', - motionArgs: { forward: false, toJumplist: true }}, - { keys: ['}'], type: 'motion', motion: 'moveByParagraph', - motionArgs: { forward: true, toJumplist: true }}, - { keys: [''], type: 'motion', - motion: 'moveByPage', motionArgs: { forward: true }}, - { keys: [''], type: 'motion', - motion: 'moveByPage', motionArgs: { forward: false }}, - { keys: [''], type: 'motion', - motion: 'moveByScroll', - motionArgs: { forward: true, explicitRepeat: true }}, - { keys: [''], type: 'motion', - motion: 'moveByScroll', - motionArgs: { forward: false, explicitRepeat: true }}, - { keys: ['g', 'g'], type: 'motion', - motion: 'moveToLineOrEdgeOfDocument', - motionArgs: { forward: false, explicitRepeat: true, linewise: true, toJumplist: true }}, - { keys: ['G'], type: 'motion', - motion: 'moveToLineOrEdgeOfDocument', - motionArgs: { forward: true, explicitRepeat: true, linewise: true, toJumplist: true }}, - { keys: ['0'], type: 'motion', motion: 'moveToStartOfLine' }, - { keys: ['^'], type: 'motion', - motion: 'moveToFirstNonWhiteSpaceCharacter' }, - { keys: ['+'], type: 'motion', - motion: 'moveByLines', - motionArgs: { forward: true, toFirstChar:true }}, - { keys: ['-'], type: 'motion', - motion: 'moveByLines', - motionArgs: { forward: false, toFirstChar:true }}, - { keys: ['_'], type: 'motion', - motion: 'moveByLines', - motionArgs: { forward: true, toFirstChar:true, repeatOffset:-1 }}, - { keys: ['$'], type: 'motion', - motion: 'moveToEol', - motionArgs: { inclusive: true }}, - { keys: ['%'], type: 'motion', - motion: 'moveToMatchedSymbol', - motionArgs: { inclusive: true, toJumplist: true }}, - { keys: ['f', 'character'], type: 'motion', - motion: 'moveToCharacter', - motionArgs: { forward: true , inclusive: true }}, - { keys: ['F', 'character'], type: 'motion', - motion: 'moveToCharacter', - motionArgs: { forward: false }}, - { keys: ['t', 'character'], type: 'motion', - motion: 'moveTillCharacter', - motionArgs: { forward: true, inclusive: true }}, - { keys: ['T', 'character'], type: 'motion', - motion: 'moveTillCharacter', - motionArgs: { forward: false }}, - { keys: [';'], type: 'motion', motion: 'repeatLastCharacterSearch', - motionArgs: { forward: true }}, - { keys: [','], type: 'motion', motion: 'repeatLastCharacterSearch', - motionArgs: { forward: false }}, - { keys: ['\'', 'character'], type: 'motion', motion: 'goToMark', - motionArgs: {toJumplist: true}}, - { keys: ['`', 'character'], type: 'motion', motion: 'goToMark', - motionArgs: {toJumplist: true}}, - { keys: [']', '`'], type: 'motion', motion: 'jumpToMark', motionArgs: { forward: true } }, - { keys: ['[', '`'], type: 'motion', motion: 'jumpToMark', motionArgs: { forward: false } }, - { keys: [']', '\''], type: 'motion', motion: 'jumpToMark', motionArgs: { forward: true, linewise: true } }, - { keys: ['[', '\''], type: 'motion', motion: 'jumpToMark', motionArgs: { forward: false, linewise: true } }, - { keys: [']', 'character'], type: 'motion', - motion: 'moveToSymbol', - motionArgs: { forward: true, toJumplist: true}}, - { keys: ['[', 'character'], type: 'motion', - motion: 'moveToSymbol', - motionArgs: { forward: false, toJumplist: true}}, - { keys: ['|'], type: 'motion', - motion: 'moveToColumn', - motionArgs: { }}, - // Operators - { keys: ['d'], type: 'operator', operator: 'delete' }, - { keys: ['y'], type: 'operator', operator: 'yank' }, - { keys: ['c'], type: 'operator', operator: 'change' }, - { keys: ['>'], type: 'operator', operator: 'indent', - operatorArgs: { indentRight: true }}, - { keys: ['<'], type: 'operator', operator: 'indent', - operatorArgs: { indentRight: false }}, - { keys: ['g', '~'], type: 'operator', operator: 'swapcase' }, - { keys: ['n'], type: 'motion', motion: 'findNext', - motionArgs: { forward: true, toJumplist: true }}, - { keys: ['N'], type: 'motion', motion: 'findNext', - motionArgs: { forward: false, toJumplist: true }}, - // Operator-Motion dual commands - { keys: ['x'], type: 'operatorMotion', operator: 'delete', - motion: 'moveByCharacters', motionArgs: { forward: true }, - operatorMotionArgs: { visualLine: false }}, - { keys: ['X'], type: 'operatorMotion', operator: 'delete', - motion: 'moveByCharacters', motionArgs: { forward: false }, - operatorMotionArgs: { visualLine: true }}, - { keys: ['D'], type: 'operatorMotion', operator: 'delete', - motion: 'moveToEol', motionArgs: { inclusive: true }, - operatorMotionArgs: { visualLine: true }}, - { keys: ['Y'], type: 'operatorMotion', operator: 'yank', - motion: 'moveToEol', motionArgs: { inclusive: true }, - operatorMotionArgs: { visualLine: true }}, - { keys: ['C'], type: 'operatorMotion', - operator: 'change', - motion: 'moveToEol', motionArgs: { inclusive: true }, - operatorMotionArgs: { visualLine: true }}, - { keys: ['~'], type: 'operatorMotion', - operator: 'swapcase', operatorArgs: { shouldMoveCursor: true }, - motion: 'moveByCharacters', motionArgs: { forward: true }}, - // Actions - { keys: [''], type: 'action', action: 'jumpListWalk', - actionArgs: { forward: true }}, - { keys: [''], type: 'action', action: 'jumpListWalk', - actionArgs: { forward: false }}, - { keys: ['a'], type: 'action', action: 'enterInsertMode', isEdit: true, - actionArgs: { insertAt: 'charAfter' }}, - { keys: ['A'], type: 'action', action: 'enterInsertMode', isEdit: true, - actionArgs: { insertAt: 'eol' }}, - { keys: ['i'], type: 'action', action: 'enterInsertMode', isEdit: true, - actionArgs: { insertAt: 'inplace' }}, - { keys: ['I'], type: 'action', action: 'enterInsertMode', isEdit: true, - actionArgs: { insertAt: 'firstNonBlank' }}, - { keys: ['o'], type: 'action', action: 'newLineAndEnterInsertMode', - isEdit: true, interlaceInsertRepeat: true, - actionArgs: { after: true }}, - { keys: ['O'], type: 'action', action: 'newLineAndEnterInsertMode', - isEdit: true, interlaceInsertRepeat: true, - actionArgs: { after: false }}, - { keys: ['v'], type: 'action', action: 'toggleVisualMode' }, - { keys: ['V'], type: 'action', action: 'toggleVisualMode', - actionArgs: { linewise: true }}, - { keys: ['J'], type: 'action', action: 'joinLines', isEdit: true }, - { keys: ['p'], type: 'action', action: 'paste', isEdit: true, - actionArgs: { after: true, isEdit: true }}, - { keys: ['P'], type: 'action', action: 'paste', isEdit: true, - actionArgs: { after: false, isEdit: true }}, - { keys: ['r', 'character'], type: 'action', action: 'replace', isEdit: true }, - { keys: ['@', 'character'], type: 'action', action: 'replayMacro' }, - { keys: ['q', 'character'], type: 'action', action: 'enterMacroRecordMode' }, - // Handle Replace-mode as a special case of insert mode. - { keys: ['R'], type: 'action', action: 'enterInsertMode', isEdit: true, - actionArgs: { replace: true }}, - { keys: ['u'], type: 'action', action: 'undo' }, - { keys: [''], type: 'action', action: 'redo' }, - { keys: ['m', 'character'], type: 'action', action: 'setMark' }, - { keys: ['"', 'character'], type: 'action', action: 'setRegister' }, - { keys: ['z', 'z'], type: 'action', action: 'scrollToCursor', - actionArgs: { position: 'center' }}, - { keys: ['z', '.'], type: 'action', action: 'scrollToCursor', - actionArgs: { position: 'center' }, - motion: 'moveToFirstNonWhiteSpaceCharacter' }, - { keys: ['z', 't'], type: 'action', action: 'scrollToCursor', - actionArgs: { position: 'top' }}, - { keys: ['z', ''], type: 'action', action: 'scrollToCursor', - actionArgs: { position: 'top' }, - motion: 'moveToFirstNonWhiteSpaceCharacter' }, - { keys: ['z', '-'], type: 'action', action: 'scrollToCursor', - actionArgs: { position: 'bottom' }}, - { keys: ['z', 'b'], type: 'action', action: 'scrollToCursor', - actionArgs: { position: 'bottom' }, - motion: 'moveToFirstNonWhiteSpaceCharacter' }, - { keys: ['.'], type: 'action', action: 'repeatLastEdit' }, - { keys: [''], type: 'action', action: 'incrementNumberToken', - isEdit: true, - actionArgs: {increase: true, backtrack: false}}, - { keys: [''], type: 'action', action: 'incrementNumberToken', - isEdit: true, - actionArgs: {increase: false, backtrack: false}}, - // Text object motions - { keys: ['a', 'character'], type: 'motion', - motion: 'textObjectManipulation' }, - { keys: ['i', 'character'], type: 'motion', - motion: 'textObjectManipulation', - motionArgs: { textObjectInner: true }}, - // Search - { keys: ['/'], type: 'search', - searchArgs: { forward: true, querySrc: 'prompt', toJumplist: true }}, - { keys: ['?'], type: 'search', - searchArgs: { forward: false, querySrc: 'prompt', toJumplist: true }}, - { keys: ['*'], type: 'search', - searchArgs: { forward: true, querySrc: 'wordUnderCursor', toJumplist: true }}, - { keys: ['#'], type: 'search', - searchArgs: { forward: false, querySrc: 'wordUnderCursor', toJumplist: true }}, - // Ex command - { keys: [':'], type: 'ex' } - ]; - - var Vim = function() { - CodeMirror.defineOption('vimMode', false, function(cm, val) { - if (val) { - cm.setOption('keyMap', 'vim'); - CodeMirror.signal(cm, "vim-mode-change", {mode: "normal"}); - cm.on('beforeSelectionChange', beforeSelectionChange); - maybeInitVimState(cm); - } else if (cm.state.vim) { - cm.setOption('keyMap', 'default'); - cm.off('beforeSelectionChange', beforeSelectionChange); - cm.state.vim = null; - } - }); - function beforeSelectionChange(cm, cur) { - var vim = cm.state.vim; - if (vim.insertMode || vim.exMode) return; - - var head = cur.head; - if (head.ch && head.ch == cm.doc.getLine(head.line).length) { - head.ch--; - } - } - - var numberRegex = /[\d]/; - var wordRegexp = [(/\w/), (/[^\w\s]/)], bigWordRegexp = [(/\S/)]; - function makeKeyRange(start, size) { - var keys = []; - for (var i = start; i < start + size; i++) { - keys.push(String.fromCharCode(i)); - } - return keys; - } - var upperCaseAlphabet = makeKeyRange(65, 26); - var lowerCaseAlphabet = makeKeyRange(97, 26); - var numbers = makeKeyRange(48, 10); - var specialSymbols = '~`!@#$%^&*()_-+=[{}]\\|/?.,<>:;"\''.split(''); - var specialKeys = ['Left', 'Right', 'Up', 'Down', 'Space', 'Backspace', - 'Esc', 'Home', 'End', 'PageUp', 'PageDown', 'Enter']; - var validMarks = [].concat(upperCaseAlphabet, lowerCaseAlphabet, numbers, ['<', '>']); - var validRegisters = [].concat(upperCaseAlphabet, lowerCaseAlphabet, numbers, ['-', '"']); - - function isLine(cm, line) { - return line >= cm.firstLine() && line <= cm.lastLine(); - } - function isLowerCase(k) { - return (/^[a-z]$/).test(k); - } - function isMatchableSymbol(k) { - return '()[]{}'.indexOf(k) != -1; - } - function isNumber(k) { - return numberRegex.test(k); - } - function isUpperCase(k) { - return (/^[A-Z]$/).test(k); - } - function isWhiteSpaceString(k) { - return (/^\s*$/).test(k); - } - function inArray(val, arr) { - for (var i = 0; i < arr.length; i++) { - if (arr[i] == val) { - return true; - } - } - return false; - } - - var createCircularJumpList = function() { - var size = 100; - var pointer = -1; - var head = 0; - var tail = 0; - var buffer = new Array(size); - function add(cm, oldCur, newCur) { - var current = pointer % size; - var curMark = buffer[current]; - function useNextSlot(cursor) { - var next = ++pointer % size; - var trashMark = buffer[next]; - if (trashMark) { - trashMark.clear(); - } - buffer[next] = cm.setBookmark(cursor); - } - if (curMark) { - var markPos = curMark.find(); - // avoid recording redundant cursor position - if (markPos && !cursorEqual(markPos, oldCur)) { - useNextSlot(oldCur); - } - } else { - useNextSlot(oldCur); - } - useNextSlot(newCur); - head = pointer; - tail = pointer - size + 1; - if (tail < 0) { - tail = 0; - } - } - function move(cm, offset) { - pointer += offset; - if (pointer > head) { - pointer = head; - } else if (pointer < tail) { - pointer = tail; - } - var mark = buffer[(size + pointer) % size]; - // skip marks that are temporarily removed from text buffer - if (mark && !mark.find()) { - var inc = offset > 0 ? 1 : -1; - var newCur; - var oldCur = cm.getCursor(); - do { - pointer += inc; - mark = buffer[(size + pointer) % size]; - // skip marks that are the same as current position - if (mark && - (newCur = mark.find()) && - !cursorEqual(oldCur, newCur)) { - break; - } - } while (pointer < head && pointer > tail); - } - return mark; - } - return { - cachedCursor: undefined, //used for # and * jumps - add: add, - move: move - }; - }; - - var createMacroState = function() { - return { - macroKeyBuffer: [], - latestRegister: undefined, - inReplay: false, - lastInsertModeChanges: { - changes: [], // Change list - expectCursorActivityForChange: false // Set to true on change, false on cursorActivity. - }, - enteredMacroMode: undefined, - isMacroPlaying: false, - toggle: function(cm, registerName) { - if (this.enteredMacroMode) { //onExit - this.enteredMacroMode(); // close dialog - this.enteredMacroMode = undefined; - } else { //onEnter - this.latestRegister = registerName; - this.enteredMacroMode = cm.openDialog( - '(recording)['+registerName+']', null, {bottom:true}); - } - } - }; - }; - - - function maybeInitVimState(cm) { - if (!cm.state.vim) { - // Store instance state in the CodeMirror object. - cm.state.vim = { - inputState: new InputState(), - // Vim's input state that triggered the last edit, used to repeat - // motions and operators with '.'. - lastEditInputState: undefined, - // Vim's action command before the last edit, used to repeat actions - // with '.' and insert mode repeat. - lastEditActionCommand: undefined, - // When using jk for navigation, if you move from a longer line to a - // shorter line, the cursor may clip to the end of the shorter line. - // If j is pressed again and cursor goes to the next line, the - // cursor should go back to its horizontal position on the longer - // line if it can. This is to keep track of the horizontal position. - lastHPos: -1, - // Doing the same with screen-position for gj/gk - lastHSPos: -1, - // The last motion command run. Cleared if a non-motion command gets - // executed in between. - lastMotion: null, - marks: {}, - insertMode: false, - // Repeat count for changes made in insert mode, triggered by key - // sequences like 3,i. Only exists when insertMode is true. - insertModeRepeat: undefined, - visualMode: false, - // If we are in visual line mode. No effect if visualMode is false. - visualLine: false - }; - } - return cm.state.vim; - } - var vimGlobalState; - function resetVimGlobalState() { - vimGlobalState = { - // The current search query. - searchQuery: null, - // Whether we are searching backwards. - searchIsReversed: false, - jumpList: createCircularJumpList(), - macroModeState: createMacroState(), - // Recording latest f, t, F or T motion command. - lastChararacterSearch: {increment:0, forward:true, selectedCharacter:''}, - registerController: new RegisterController({}) - }; - } - - var vimApi= { - buildKeyMap: function() { - // TODO: Convert keymap into dictionary format for fast lookup. - }, - // Testing hook, though it might be useful to expose the register - // controller anyways. - getRegisterController: function() { - return vimGlobalState.registerController; - }, - // Testing hook. - resetVimGlobalState_: resetVimGlobalState, - - // Testing hook. - getVimGlobalState_: function() { - return vimGlobalState; - }, - - // Testing hook. - maybeInitVimState_: maybeInitVimState, - - InsertModeKey: InsertModeKey, - map: function(lhs, rhs) { - // Add user defined key bindings. - exCommandDispatcher.map(lhs, rhs); - }, - defineEx: function(name, prefix, func){ - if (name.indexOf(prefix) !== 0) { - throw new Error('(Vim.defineEx) "'+prefix+'" is not a prefix of "'+name+'", command not registered'); - } - exCommands[name]=func; - exCommandDispatcher.commandMap_[prefix]={name:name, shortName:prefix, type:'api'}; - }, - // This is the outermost function called by CodeMirror, after keys have - // been mapped to their Vim equivalents. - handleKey: function(cm, key) { - var command; - var vim = maybeInitVimState(cm); - var macroModeState = vimGlobalState.macroModeState; - if (macroModeState.enteredMacroMode) { - if (key == 'q') { - actions.exitMacroRecordMode(); - vim.inputState = new InputState(); - return; - } - } - if (key == '') { - // Clear input state and get back to normal mode. - vim.inputState = new InputState(); - if (vim.visualMode) { - exitVisualMode(cm); - } - return; - } - // Enter visual mode when the mouse selects text. - if (!vim.visualMode && - !cursorEqual(cm.getCursor('head'), cm.getCursor('anchor'))) { - vim.visualMode = true; - vim.visualLine = false; - CodeMirror.signal(cm, "vim-mode-change", {mode: "visual"}); - cm.on('mousedown', exitVisualMode); - } - if (key != '0' || (key == '0' && vim.inputState.getRepeat() === 0)) { - // Have to special case 0 since it's both a motion and a number. - command = commandDispatcher.matchCommand(key, defaultKeymap, vim); - } - if (!command) { - if (isNumber(key)) { - // Increment count unless count is 0 and key is 0. - vim.inputState.pushRepeatDigit(key); - } - return; - } - if (command.type == 'keyToKey') { - // TODO: prevent infinite recursion. - for (var i = 0; i < command.toKeys.length; i++) { - this.handleKey(cm, command.toKeys[i]); - } - } else { - if (macroModeState.enteredMacroMode) { - logKey(macroModeState, key); - } - commandDispatcher.processCommand(cm, vim, command); - } - }, - handleEx: function(cm, input) { - exCommandDispatcher.processCommand(cm, input); - } - }; - - // Represents the current input state. - function InputState() { - this.prefixRepeat = []; - this.motionRepeat = []; - - this.operator = null; - this.operatorArgs = null; - this.motion = null; - this.motionArgs = null; - this.keyBuffer = []; // For matching multi-key commands. - this.registerName = null; // Defaults to the unamed register. - } - InputState.prototype.pushRepeatDigit = function(n) { - if (!this.operator) { - this.prefixRepeat = this.prefixRepeat.concat(n); - } else { - this.motionRepeat = this.motionRepeat.concat(n); - } - }; - InputState.prototype.getRepeat = function() { - var repeat = 0; - if (this.prefixRepeat.length > 0 || this.motionRepeat.length > 0) { - repeat = 1; - if (this.prefixRepeat.length > 0) { - repeat *= parseInt(this.prefixRepeat.join(''), 10); - } - if (this.motionRepeat.length > 0) { - repeat *= parseInt(this.motionRepeat.join(''), 10); - } - } - return repeat; - }; - - /* - * Register stores information about copy and paste registers. Besides - * text, a register must store whether it is linewise (i.e., when it is - * pasted, should it insert itself into a new line, or should the text be - * inserted at the cursor position.) - */ - function Register(text, linewise) { - this.clear(); - if (text) { - this.set(text, linewise); - } - } - Register.prototype = { - set: function(text, linewise) { - this.text = text; - this.linewise = !!linewise; - }, - append: function(text, linewise) { - // if this register has ever been set to linewise, use linewise. - if (linewise || this.linewise) { - this.text += '\n' + text; - this.linewise = true; - } else { - this.text += text; - } - }, - clear: function() { - this.text = ''; - this.linewise = false; - }, - toString: function() { return this.text; } - }; - - /* - * vim registers allow you to keep many independent copy and paste buffers. - * See http://usevim.com/2012/04/13/registers/ for an introduction. - * - * RegisterController keeps the state of all the registers. An initial - * state may be passed in. The unnamed register '"' will always be - * overridden. - */ - function RegisterController(registers) { - this.registers = registers; - this.unamedRegister = registers['"'] = new Register(); - } - RegisterController.prototype = { - pushText: function(registerName, operator, text, linewise) { - if (linewise && text.charAt(0) == '\n') { - text = text.slice(1) + '\n'; - } - if(linewise && text.charAt(text.length - 1) !== '\n'){ - text += '\n'; - } - // Lowercase and uppercase registers refer to the same register. - // Uppercase just means append. - var register = this.isValidRegister(registerName) ? - this.getRegister(registerName) : null; - // if no register/an invalid register was specified, things go to the - // default registers - if (!register) { - switch (operator) { - case 'yank': - // The 0 register contains the text from the most recent yank. - this.registers['0'] = new Register(text, linewise); - break; - case 'delete': - case 'change': - if (text.indexOf('\n') == -1) { - // Delete less than 1 line. Update the small delete register. - this.registers['-'] = new Register(text, linewise); - } else { - // Shift down the contents of the numbered registers and put the - // deleted text into register 1. - this.shiftNumericRegisters_(); - this.registers['1'] = new Register(text, linewise); - } - break; - } - // Make sure the unnamed register is set to what just happened - this.unamedRegister.set(text, linewise); - return; - } - - // If we've gotten to this point, we've actually specified a register - var append = isUpperCase(registerName); - if (append) { - register.append(text, linewise); - // The unamed register always has the same value as the last used - // register. - this.unamedRegister.append(text, linewise); - } else { - register.set(text, linewise); - this.unamedRegister.set(text, linewise); - } - }, - setRegisterText: function(name, text, linewise) { - this.getRegister(name).set(text, linewise); - }, - // Gets the register named @name. If one of @name doesn't already exist, - // create it. If @name is invalid, return the unamedRegister. - getRegister: function(name) { - if (!this.isValidRegister(name)) { - return this.unamedRegister; - } - name = name.toLowerCase(); - if (!this.registers[name]) { - this.registers[name] = new Register(); - } - return this.registers[name]; - }, - isValidRegister: function(name) { - return name && inArray(name, validRegisters); - }, - shiftNumericRegisters_: function() { - for (var i = 9; i >= 2; i--) { - this.registers[i] = this.getRegister('' + (i - 1)); - } - } - }; - - var commandDispatcher = { - matchCommand: function(key, keyMap, vim) { - var inputState = vim.inputState; - var keys = inputState.keyBuffer.concat(key); - var matchedCommands = []; - var selectedCharacter; - for (var i = 0; i < keyMap.length; i++) { - var command = keyMap[i]; - if (matchKeysPartial(keys, command.keys)) { - if (inputState.operator && command.type == 'action') { - // Ignore matched action commands after an operator. Operators - // only operate on motions. This check is really for text - // objects since aW, a[ etcs conflicts with a. - continue; - } - // Match commands that take as an argument. - if (command.keys[keys.length - 1] == 'character') { - selectedCharacter = keys[keys.length - 1]; - if(selectedCharacter.length>1){ - switch(selectedCharacter){ - case '': - selectedCharacter='\n'; - break; - case '': - selectedCharacter=' '; - break; - default: - continue; - } - } - } - // Add the command to the list of matched commands. Choose the best - // command later. - matchedCommands.push(command); - } - } - - // Returns the command if it is a full match, or null if not. - function getFullyMatchedCommandOrNull(command) { - if (keys.length < command.keys.length) { - // Matches part of a multi-key command. Buffer and wait for next - // stroke. - inputState.keyBuffer.push(key); - return null; - } else { - if (command.keys[keys.length - 1] == 'character') { - inputState.selectedCharacter = selectedCharacter; - } - // Clear the buffer since a full match was found. - inputState.keyBuffer = []; - return command; - } - } - - if (!matchedCommands.length) { - // Clear the buffer since there were no matches. - inputState.keyBuffer = []; - return null; - } else if (matchedCommands.length == 1) { - return getFullyMatchedCommandOrNull(matchedCommands[0]); - } else { - // Find the best match in the list of matchedCommands. - var context = vim.visualMode ? 'visual' : 'normal'; - var bestMatch = matchedCommands[0]; // Default to first in the list. - for (var i = 0; i < matchedCommands.length; i++) { - if (matchedCommands[i].context == context) { - bestMatch = matchedCommands[i]; - break; - } - } - return getFullyMatchedCommandOrNull(bestMatch); - } - }, - processCommand: function(cm, vim, command) { - vim.inputState.repeatOverride = command.repeatOverride; - switch (command.type) { - case 'motion': - this.processMotion(cm, vim, command); - break; - case 'operator': - this.processOperator(cm, vim, command); - break; - case 'operatorMotion': - this.processOperatorMotion(cm, vim, command); - break; - case 'action': - this.processAction(cm, vim, command); - break; - case 'search': - this.processSearch(cm, vim, command); - break; - case 'ex': - case 'keyToEx': - this.processEx(cm, vim, command); - break; - default: - break; - } - }, - processMotion: function(cm, vim, command) { - vim.inputState.motion = command.motion; - vim.inputState.motionArgs = copyArgs(command.motionArgs); - this.evalInput(cm, vim); - }, - processOperator: function(cm, vim, command) { - var inputState = vim.inputState; - if (inputState.operator) { - if (inputState.operator == command.operator) { - // Typing an operator twice like 'dd' makes the operator operate - // linewise - inputState.motion = 'expandToLine'; - inputState.motionArgs = { linewise: true }; - this.evalInput(cm, vim); - return; - } else { - // 2 different operators in a row doesn't make sense. - vim.inputState = new InputState(); - } - } - inputState.operator = command.operator; - inputState.operatorArgs = copyArgs(command.operatorArgs); - if (vim.visualMode) { - // Operating on a selection in visual mode. We don't need a motion. - this.evalInput(cm, vim); - } - }, - processOperatorMotion: function(cm, vim, command) { - var visualMode = vim.visualMode; - var operatorMotionArgs = copyArgs(command.operatorMotionArgs); - if (operatorMotionArgs) { - // Operator motions may have special behavior in visual mode. - if (visualMode && operatorMotionArgs.visualLine) { - vim.visualLine = true; - } - } - this.processOperator(cm, vim, command); - if (!visualMode) { - this.processMotion(cm, vim, command); - } - }, - processAction: function(cm, vim, command) { - var inputState = vim.inputState; - var repeat = inputState.getRepeat(); - var repeatIsExplicit = !!repeat; - var actionArgs = copyArgs(command.actionArgs) || {}; - if (inputState.selectedCharacter) { - actionArgs.selectedCharacter = inputState.selectedCharacter; - } - // Actions may or may not have motions and operators. Do these first. - if (command.operator) { - this.processOperator(cm, vim, command); - } - if (command.motion) { - this.processMotion(cm, vim, command); - } - if (command.motion || command.operator) { - this.evalInput(cm, vim); - } - actionArgs.repeat = repeat || 1; - actionArgs.repeatIsExplicit = repeatIsExplicit; - actionArgs.registerName = inputState.registerName; - vim.inputState = new InputState(); - vim.lastMotion = null; - if (command.isEdit) { - this.recordLastEdit(vim, inputState, command); - } - actions[command.action](cm, actionArgs, vim); - }, - processSearch: function(cm, vim, command) { - if (!cm.getSearchCursor) { - // Search depends on SearchCursor. - return; - } - var forward = command.searchArgs.forward; - getSearchState(cm).setReversed(!forward); - var promptPrefix = (forward) ? '/' : '?'; - var originalQuery = getSearchState(cm).getQuery(); - var originalScrollPos = cm.getScrollInfo(); - function handleQuery(query, ignoreCase, smartCase) { - try { - updateSearchQuery(cm, query, ignoreCase, smartCase); - } catch (e) { - showConfirm(cm, 'Invalid regex: ' + query); - return; - } - commandDispatcher.processMotion(cm, vim, { - type: 'motion', - motion: 'findNext', - motionArgs: { forward: true, toJumplist: command.searchArgs.toJumplist } - }); - } - function onPromptClose(query) { - cm.scrollTo(originalScrollPos.left, originalScrollPos.top); - handleQuery(query, true /** ignoreCase */, true /** smartCase */); - } - function onPromptKeyUp(_e, query) { - var parsedQuery; - try { - parsedQuery = updateSearchQuery(cm, query, - true /** ignoreCase */, true /** smartCase */); - } catch (e) { - // Swallow bad regexes for incremental search. - } - if (parsedQuery) { - cm.scrollIntoView(findNext(cm, !forward, parsedQuery), 30); - } else { - clearSearchHighlight(cm); - cm.scrollTo(originalScrollPos.left, originalScrollPos.top); - } - } - function onPromptKeyDown(e, _query, close) { - var keyName = CodeMirror.keyName(e); - if (keyName == 'Esc' || keyName == 'Ctrl-C' || keyName == 'Ctrl-[') { - updateSearchQuery(cm, originalQuery); - clearSearchHighlight(cm); - cm.scrollTo(originalScrollPos.left, originalScrollPos.top); - - CodeMirror.e_stop(e); - close(); - cm.focus(); - } - } - switch (command.searchArgs.querySrc) { - case 'prompt': - showPrompt(cm, { - onClose: onPromptClose, - prefix: promptPrefix, - desc: searchPromptDesc, - onKeyUp: onPromptKeyUp, - onKeyDown: onPromptKeyDown - }); - break; - case 'wordUnderCursor': - var word = expandWordUnderCursor(cm, false /** inclusive */, - true /** forward */, false /** bigWord */, - true /** noSymbol */); - var isKeyword = true; - if (!word) { - word = expandWordUnderCursor(cm, false /** inclusive */, - true /** forward */, false /** bigWord */, - false /** noSymbol */); - isKeyword = false; - } - if (!word) { - return; - } - var query = cm.getLine(word.start.line).substring(word.start.ch, - word.end.ch); - if (isKeyword) { - query = '\\b' + query + '\\b'; - } else { - query = escapeRegex(query); - } - - // cachedCursor is used to save the old position of the cursor - // when * or # causes vim to seek for the nearest word and shift - // the cursor before entering the motion. - vimGlobalState.jumpList.cachedCursor = cm.getCursor(); - cm.setCursor(word.start); - - handleQuery(query, true /** ignoreCase */, false /** smartCase */); - break; - } - }, - processEx: function(cm, vim, command) { - function onPromptClose(input) { - // Give the prompt some time to close so that if processCommand shows - // an error, the elements don't overlap. - exCommandDispatcher.processCommand(cm, input); - } - function onPromptKeyDown(e, _input, close) { - var keyName = CodeMirror.keyName(e); - if (keyName == 'Esc' || keyName == 'Ctrl-C' || keyName == 'Ctrl-[') { - CodeMirror.e_stop(e); - close(); - cm.focus(); - } - } - if (command.type == 'keyToEx') { - // Handle user defined Ex to Ex mappings - exCommandDispatcher.processCommand(cm, command.exArgs.input); - } else { - if (vim.visualMode) { - showPrompt(cm, { onClose: onPromptClose, prefix: ':', value: '\'<,\'>', - onKeyDown: onPromptKeyDown}); - } else { - showPrompt(cm, { onClose: onPromptClose, prefix: ':', - onKeyDown: onPromptKeyDown}); - } - } - }, - evalInput: function(cm, vim) { - // If the motion comand is set, execute both the operator and motion. - // Otherwise return. - var inputState = vim.inputState; - var motion = inputState.motion; - var motionArgs = inputState.motionArgs || {}; - var operator = inputState.operator; - var operatorArgs = inputState.operatorArgs || {}; - var registerName = inputState.registerName; - var selectionEnd = cm.getCursor('head'); - var selectionStart = cm.getCursor('anchor'); - // The difference between cur and selection cursors are that cur is - // being operated on and ignores that there is a selection. - var curStart = copyCursor(selectionEnd); - var curOriginal = copyCursor(curStart); - var curEnd; - var repeat; - if (operator) { - this.recordLastEdit(vim, inputState); - } - if (inputState.repeatOverride !== undefined) { - // If repeatOverride is specified, that takes precedence over the - // input state's repeat. Used by Ex mode and can be user defined. - repeat = inputState.repeatOverride; - } else { - repeat = inputState.getRepeat(); - } - if (repeat > 0 && motionArgs.explicitRepeat) { - motionArgs.repeatIsExplicit = true; - } else if (motionArgs.noRepeat || - (!motionArgs.explicitRepeat && repeat === 0)) { - repeat = 1; - motionArgs.repeatIsExplicit = false; - } - if (inputState.selectedCharacter) { - // If there is a character input, stick it in all of the arg arrays. - motionArgs.selectedCharacter = operatorArgs.selectedCharacter = - inputState.selectedCharacter; - } - motionArgs.repeat = repeat; - vim.inputState = new InputState(); - if (motion) { - var motionResult = motions[motion](cm, motionArgs, vim); - vim.lastMotion = motions[motion]; - if (!motionResult) { - return; - } - if (motionArgs.toJumplist) { - var jumpList = vimGlobalState.jumpList; - // if the current motion is # or *, use cachedCursor - var cachedCursor = jumpList.cachedCursor; - if (cachedCursor) { - recordJumpPosition(cm, cachedCursor, motionResult); - delete jumpList.cachedCursor; - } else { - recordJumpPosition(cm, curOriginal, motionResult); - } - } - if (motionResult instanceof Array) { - curStart = motionResult[0]; - curEnd = motionResult[1]; - } else { - curEnd = motionResult; - } - // TODO: Handle null returns from motion commands better. - if (!curEnd) { - curEnd = { ch: curStart.ch, line: curStart.line }; - } - if (vim.visualMode) { - // Check if the selection crossed over itself. Will need to shift - // the start point if that happened. - if (cursorIsBefore(selectionStart, selectionEnd) && - (cursorEqual(selectionStart, curEnd) || - cursorIsBefore(curEnd, selectionStart))) { - // The end of the selection has moved from after the start to - // before the start. We will shift the start right by 1. - selectionStart.ch += 1; - } else if (cursorIsBefore(selectionEnd, selectionStart) && - (cursorEqual(selectionStart, curEnd) || - cursorIsBefore(selectionStart, curEnd))) { - // The opposite happened. We will shift the start left by 1. - selectionStart.ch -= 1; - } - selectionEnd = curEnd; - if (vim.visualLine) { - if (cursorIsBefore(selectionStart, selectionEnd)) { - selectionStart.ch = 0; - - var lastLine = cm.lastLine(); - if (selectionEnd.line > lastLine) { - selectionEnd.line = lastLine; - } - selectionEnd.ch = lineLength(cm, selectionEnd.line); - } else { - selectionEnd.ch = 0; - selectionStart.ch = lineLength(cm, selectionStart.line); - } - } - cm.setSelection(selectionStart, selectionEnd); - updateMark(cm, vim, '<', - cursorIsBefore(selectionStart, selectionEnd) ? selectionStart - : selectionEnd); - updateMark(cm, vim, '>', - cursorIsBefore(selectionStart, selectionEnd) ? selectionEnd - : selectionStart); - } else if (!operator) { - curEnd = clipCursorToContent(cm, curEnd); - cm.setCursor(curEnd.line, curEnd.ch); - } - } - - if (operator) { - var inverted = false; - vim.lastMotion = null; - operatorArgs.repeat = repeat; // Indent in visual mode needs this. - if (vim.visualMode) { - curStart = selectionStart; - curEnd = selectionEnd; - motionArgs.inclusive = true; - } - // Swap start and end if motion was backward. - if (cursorIsBefore(curEnd, curStart)) { - var tmp = curStart; - curStart = curEnd; - curEnd = tmp; - inverted = true; - } - if (motionArgs.inclusive && !(vim.visualMode && inverted)) { - // Move the selection end one to the right to include the last - // character. - curEnd.ch++; - } - var linewise = motionArgs.linewise || - (vim.visualMode && vim.visualLine); - if (linewise) { - // Expand selection to entire line. - expandSelectionToLine(cm, curStart, curEnd); - } else if (motionArgs.forward) { - // Clip to trailing newlines only if the motion goes forward. - clipToLine(cm, curStart, curEnd); - } - operatorArgs.registerName = registerName; - // Keep track of linewise as it affects how paste and change behave. - operatorArgs.linewise = linewise; - operators[operator](cm, operatorArgs, vim, curStart, - curEnd, curOriginal); - if (vim.visualMode) { - exitVisualMode(cm); - } - } - }, - recordLastEdit: function(vim, inputState, actionCommand) { - var macroModeState = vimGlobalState.macroModeState; - if (macroModeState.inReplay) { return; } - vim.lastEditInputState = inputState; - vim.lastEditActionCommand = actionCommand; - macroModeState.lastInsertModeChanges.changes = []; - macroModeState.lastInsertModeChanges.expectCursorActivityForChange = false; - } - }; - - /** - * typedef {Object{line:number,ch:number}} Cursor An object containing the - * position of the cursor. - */ - // All of the functions below return Cursor objects. - var motions = { - moveToTopLine: function(cm, motionArgs) { - var line = getUserVisibleLines(cm).top + motionArgs.repeat -1; - return { line: line, ch: findFirstNonWhiteSpaceCharacter(cm.getLine(line)) }; - }, - moveToMiddleLine: function(cm) { - var range = getUserVisibleLines(cm); - var line = Math.floor((range.top + range.bottom) * 0.5); - return { line: line, ch: findFirstNonWhiteSpaceCharacter(cm.getLine(line)) }; - }, - moveToBottomLine: function(cm, motionArgs) { - var line = getUserVisibleLines(cm).bottom - motionArgs.repeat +1; - return { line: line, ch: findFirstNonWhiteSpaceCharacter(cm.getLine(line)) }; - }, - expandToLine: function(cm, motionArgs) { - // Expands forward to end of line, and then to next line if repeat is - // >1. Does not handle backward motion! - var cur = cm.getCursor(); - return { line: cur.line + motionArgs.repeat - 1, ch: Infinity }; - }, - findNext: function(cm, motionArgs) { - var state = getSearchState(cm); - var query = state.getQuery(); - if (!query) { - return; - } - var prev = !motionArgs.forward; - // If search is initiated with ? instead of /, negate direction. - prev = (state.isReversed()) ? !prev : prev; - highlightSearchMatches(cm, query); - return findNext(cm, prev/** prev */, query, motionArgs.repeat); - }, - goToMark: function(_cm, motionArgs, vim) { - var mark = vim.marks[motionArgs.selectedCharacter]; - if (mark) { - return mark.find(); - } - return null; - }, - jumpToMark: function(cm, motionArgs, vim) { - var best = cm.getCursor(); - for (var i = 0; i < motionArgs.repeat; i++) { - var cursor = best; - for (var key in vim.marks) { - if (!isLowerCase(key)) { - continue; - } - var mark = vim.marks[key].find(); - var isWrongDirection = (motionArgs.forward) ? - cursorIsBefore(mark, cursor) : cursorIsBefore(cursor, mark); - - if (isWrongDirection) { - continue; - } - if (motionArgs.linewise && (mark.line == cursor.line)) { - continue; - } - - var equal = cursorEqual(cursor, best); - var between = (motionArgs.forward) ? - cusrorIsBetween(cursor, mark, best) : - cusrorIsBetween(best, mark, cursor); - - if (equal || between) { - best = mark; - } - } - } - - if (motionArgs.linewise) { - // Vim places the cursor on the first non-whitespace character of - // the line if there is one, else it places the cursor at the end - // of the line, regardless of whether a mark was found. - best.ch = findFirstNonWhiteSpaceCharacter(cm.getLine(best.line)); - } - return best; - }, - moveByCharacters: function(cm, motionArgs) { - var cur = cm.getCursor(); - var repeat = motionArgs.repeat; - var ch = motionArgs.forward ? cur.ch + repeat : cur.ch - repeat; - return { line: cur.line, ch: ch }; - }, - moveByLines: function(cm, motionArgs, vim) { - var cur = cm.getCursor(); - var endCh = cur.ch; - // Depending what our last motion was, we may want to do different - // things. If our last motion was moving vertically, we want to - // preserve the HPos from our last horizontal move. If our last motion - // was going to the end of a line, moving vertically we should go to - // the end of the line, etc. - switch (vim.lastMotion) { - case this.moveByLines: - case this.moveByDisplayLines: - case this.moveByScroll: - case this.moveToColumn: - case this.moveToEol: - endCh = vim.lastHPos; - break; - default: - vim.lastHPos = endCh; - } - var repeat = motionArgs.repeat+(motionArgs.repeatOffset||0); - var line = motionArgs.forward ? cur.line + repeat : cur.line - repeat; - var first = cm.firstLine(); - var last = cm.lastLine(); - // Vim cancels linewise motions that start on an edge and move beyond - // that edge. It does not cancel motions that do not start on an edge. - if ((line < first && cur.line == first) || - (line > last && cur.line == last)) { - return; - } - if(motionArgs.toFirstChar){ - endCh=findFirstNonWhiteSpaceCharacter(cm.getLine(line)); - vim.lastHPos = endCh; - } - vim.lastHSPos = cm.charCoords({line:line, ch:endCh},'div').left; - return { line: line, ch: endCh }; - }, - moveByDisplayLines: function(cm, motionArgs, vim) { - var cur = cm.getCursor(); - switch (vim.lastMotion) { - case this.moveByDisplayLines: - case this.moveByScroll: - case this.moveByLines: - case this.moveToColumn: - case this.moveToEol: - break; - default: - vim.lastHSPos = cm.charCoords(cur,'div').left; - } - var repeat = motionArgs.repeat; - var res=cm.findPosV(cur,(motionArgs.forward ? repeat : -repeat),'line',vim.lastHSPos); - if (res.hitSide) { - if (motionArgs.forward) { - var lastCharCoords = cm.charCoords(res, 'div'); - var goalCoords = { top: lastCharCoords.top + 8, left: vim.lastHSPos }; - var res = cm.coordsChar(goalCoords, 'div'); - } else { - var resCoords = cm.charCoords({ line: cm.firstLine(), ch: 0}, 'div'); - resCoords.left = vim.lastHSPos; - res = cm.coordsChar(resCoords, 'div'); - } - } - vim.lastHPos = res.ch; - return res; - }, - moveByPage: function(cm, motionArgs) { - // CodeMirror only exposes functions that move the cursor page down, so - // doing this bad hack to move the cursor and move it back. evalInput - // will move the cursor to where it should be in the end. - var curStart = cm.getCursor(); - var repeat = motionArgs.repeat; - cm.moveV((motionArgs.forward ? repeat : -repeat), 'page'); - var curEnd = cm.getCursor(); - cm.setCursor(curStart); - return curEnd; - }, - moveByParagraph: function(cm, motionArgs) { - var line = cm.getCursor().line; - var repeat = motionArgs.repeat; - var inc = motionArgs.forward ? 1 : -1; - for (var i = 0; i < repeat; i++) { - if ((!motionArgs.forward && line === cm.firstLine() ) || - (motionArgs.forward && line == cm.lastLine())) { - break; - } - line += inc; - while (line !== cm.firstLine() && line != cm.lastLine() && cm.getLine(line)) { - line += inc; - } - } - return { line: line, ch: 0 }; - }, - moveByScroll: function(cm, motionArgs, vim) { - var scrollbox = cm.getScrollInfo(); - var curEnd = null; - var repeat = motionArgs.repeat; - if (!repeat) { - repeat = scrollbox.clientHeight / (2 * cm.defaultTextHeight()); - } - var orig = cm.charCoords(cm.getCursor(), 'local'); - motionArgs.repeat = repeat; - var curEnd = motions.moveByDisplayLines(cm, motionArgs, vim); - if (!curEnd) { - return null; - } - var dest = cm.charCoords(curEnd, 'local'); - cm.scrollTo(null, scrollbox.top + dest.top - orig.top); - return curEnd; - }, - moveByWords: function(cm, motionArgs) { - return moveToWord(cm, motionArgs.repeat, !!motionArgs.forward, - !!motionArgs.wordEnd, !!motionArgs.bigWord); - }, - moveTillCharacter: function(cm, motionArgs) { - var repeat = motionArgs.repeat; - var curEnd = moveToCharacter(cm, repeat, motionArgs.forward, - motionArgs.selectedCharacter); - var increment = motionArgs.forward ? -1 : 1; - recordLastCharacterSearch(increment, motionArgs); - if(!curEnd)return cm.getCursor(); - curEnd.ch += increment; - return curEnd; - }, - moveToCharacter: function(cm, motionArgs) { - var repeat = motionArgs.repeat; - recordLastCharacterSearch(0, motionArgs); - return moveToCharacter(cm, repeat, motionArgs.forward, - motionArgs.selectedCharacter) || cm.getCursor(); - }, - moveToSymbol: function(cm, motionArgs) { - var repeat = motionArgs.repeat; - return findSymbol(cm, repeat, motionArgs.forward, - motionArgs.selectedCharacter) || cm.getCursor(); - }, - moveToColumn: function(cm, motionArgs, vim) { - var repeat = motionArgs.repeat; - // repeat is equivalent to which column we want to move to! - vim.lastHPos = repeat - 1; - vim.lastHSPos = cm.charCoords(cm.getCursor(),'div').left; - return moveToColumn(cm, repeat); - }, - moveToEol: function(cm, motionArgs, vim) { - var cur = cm.getCursor(); - vim.lastHPos = Infinity; - var retval={ line: cur.line + motionArgs.repeat - 1, ch: Infinity }; - var end=cm.clipPos(retval); - end.ch--; - vim.lastHSPos = cm.charCoords(end,'div').left; - return retval; - }, - moveToFirstNonWhiteSpaceCharacter: function(cm) { - // Go to the start of the line where the text begins, or the end for - // whitespace-only lines - var cursor = cm.getCursor(); - return { line: cursor.line, - ch: findFirstNonWhiteSpaceCharacter(cm.getLine(cursor.line)) }; - }, - moveToMatchedSymbol: function(cm) { - var cursor = cm.getCursor(); - var line = cursor.line; - var ch = cursor.ch; - var lineText = cm.getLine(line); - var symbol; - var startContext = cm.getTokenAt(cursor).type; - var startCtxLevel = getContextLevel(startContext); - do { - symbol = lineText.charAt(ch++); - if (symbol && isMatchableSymbol(symbol)) { - var endContext = cm.getTokenAt({line:line, ch:ch}).type; - var endCtxLevel = getContextLevel(endContext); - if (startCtxLevel >= endCtxLevel) { - break; - } - } - } while (symbol); - if (symbol) { - return findMatchedSymbol(cm, {line:line, ch:ch-1}, symbol); - } else { - return cursor; - } - }, - moveToStartOfLine: function(cm) { - var cursor = cm.getCursor(); - return { line: cursor.line, ch: 0 }; - }, - moveToLineOrEdgeOfDocument: function(cm, motionArgs) { - var lineNum = motionArgs.forward ? cm.lastLine() : cm.firstLine(); - if (motionArgs.repeatIsExplicit) { - lineNum = motionArgs.repeat - cm.getOption('firstLineNumber'); - } - return { line: lineNum, - ch: findFirstNonWhiteSpaceCharacter(cm.getLine(lineNum)) }; - }, - textObjectManipulation: function(cm, motionArgs) { - var character = motionArgs.selectedCharacter; - // Inclusive is the difference between a and i - // TODO: Instead of using the additional text object map to perform text - // object operations, merge the map into the defaultKeyMap and use - // motionArgs to define behavior. Define separate entries for 'aw', - // 'iw', 'a[', 'i[', etc. - var inclusive = !motionArgs.textObjectInner; - if (!textObjects[character]) { - // No text object defined for this, don't move. - return null; - } - var tmp = textObjects[character](cm, inclusive); - var start = tmp.start; - var end = tmp.end; - return [start, end]; - }, - repeatLastCharacterSearch: function(cm, motionArgs) { - var lastSearch = vimGlobalState.lastChararacterSearch; - var repeat = motionArgs.repeat; - var forward = motionArgs.forward === lastSearch.forward; - var increment = (lastSearch.increment ? 1 : 0) * (forward ? -1 : 1); - cm.moveH(-increment, 'char'); - motionArgs.inclusive = forward ? true : false; - var curEnd = moveToCharacter(cm, repeat, forward, lastSearch.selectedCharacter); - if (!curEnd) { - cm.moveH(increment, 'char'); - return cm.getCursor(); - } - curEnd.ch += increment; - return curEnd; - } - }; - - var operators = { - change: function(cm, operatorArgs, _vim, curStart, curEnd) { - vimGlobalState.registerController.pushText( - operatorArgs.registerName, 'change', cm.getRange(curStart, curEnd), - operatorArgs.linewise); - if (operatorArgs.linewise) { - // Push the next line back down, if there is a next line. - var replacement = curEnd.line > cm.lastLine() ? '' : '\n'; - cm.replaceRange(replacement, curStart, curEnd); - cm.indentLine(curStart.line, 'smart'); - // null ch so setCursor moves to end of line. - curStart.ch = null; - } else { - // Exclude trailing whitespace if the range is not all whitespace. - var text = cm.getRange(curStart, curEnd); - if (!isWhiteSpaceString(text)) { - var match = (/\s+$/).exec(text); - if (match) { - curEnd = offsetCursor(curEnd, 0, - match[0].length); - } - } - cm.replaceRange('', curStart, curEnd); - } - actions.enterInsertMode(cm, {}, cm.state.vim); - cm.setCursor(curStart); - }, - // delete is a javascript keyword. - 'delete': function(cm, operatorArgs, _vim, curStart, curEnd) { - // If the ending line is past the last line, inclusive, instead of - // including the trailing \n, include the \n before the starting line - if (operatorArgs.linewise && - curEnd.line > cm.lastLine() && curStart.line > cm.firstLine()) { - curStart.line--; - curStart.ch = lineLength(cm, curStart.line); - } - vimGlobalState.registerController.pushText( - operatorArgs.registerName, 'delete', cm.getRange(curStart, curEnd), - operatorArgs.linewise); - cm.replaceRange('', curStart, curEnd); - if (operatorArgs.linewise) { - cm.setCursor(motions.moveToFirstNonWhiteSpaceCharacter(cm)); - } else { - cm.setCursor(curStart); - } - }, - indent: function(cm, operatorArgs, vim, curStart, curEnd) { - var startLine = curStart.line; - var endLine = curEnd.line; - // In visual mode, n> shifts the selection right n times, instead of - // shifting n lines right once. - var repeat = (vim.visualMode) ? operatorArgs.repeat : 1; - if (operatorArgs.linewise) { - // The only way to delete a newline is to delete until the start of - // the next line, so in linewise mode evalInput will include the next - // line. We don't want this in indent, so we go back a line. - endLine--; - } - for (var i = startLine; i <= endLine; i++) { - for (var j = 0; j < repeat; j++) { - cm.indentLine(i, operatorArgs.indentRight); - } - } - cm.setCursor(curStart); - cm.setCursor(motions.moveToFirstNonWhiteSpaceCharacter(cm)); - }, - swapcase: function(cm, operatorArgs, _vim, curStart, curEnd, curOriginal) { - var toSwap = cm.getRange(curStart, curEnd); - var swapped = ''; - for (var i = 0; i < toSwap.length; i++) { - var character = toSwap.charAt(i); - swapped += isUpperCase(character) ? character.toLowerCase() : - character.toUpperCase(); - } - cm.replaceRange(swapped, curStart, curEnd); - if (!operatorArgs.shouldMoveCursor) { - cm.setCursor(curOriginal); - } - }, - yank: function(cm, operatorArgs, _vim, curStart, curEnd, curOriginal) { - vimGlobalState.registerController.pushText( - operatorArgs.registerName, 'yank', - cm.getRange(curStart, curEnd), operatorArgs.linewise); - cm.setCursor(curOriginal); - } - }; - - var actions = { - jumpListWalk: function(cm, actionArgs, vim) { - if (vim.visualMode) { - return; - } - var repeat = actionArgs.repeat; - var forward = actionArgs.forward; - var jumpList = vimGlobalState.jumpList; - - var mark = jumpList.move(cm, forward ? repeat : -repeat); - var markPos = mark ? mark.find() : undefined; - markPos = markPos ? markPos : cm.getCursor(); - cm.setCursor(markPos); - }, - scrollToCursor: function(cm, actionArgs) { - var lineNum = cm.getCursor().line; - var charCoords = cm.charCoords({line: lineNum, ch: 0}, 'local'); - var height = cm.getScrollInfo().clientHeight; - var y = charCoords.top; - var lineHeight = charCoords.bottom - y; - switch (actionArgs.position) { - case 'center': y = y - (height / 2) + lineHeight; - break; - case 'bottom': y = y - height + lineHeight*1.4; - break; - case 'top': y = y + lineHeight*0.4; - break; - } - cm.scrollTo(null, y); - }, - replayMacro: function(cm, actionArgs) { - var registerName = actionArgs.selectedCharacter; - var repeat = actionArgs.repeat; - var macroModeState = vimGlobalState.macroModeState; - if (registerName == '@') { - registerName = macroModeState.latestRegister; - } - var keyBuffer = parseRegisterToKeyBuffer(macroModeState, registerName); - while(repeat--){ - executeMacroKeyBuffer(cm, macroModeState, keyBuffer); - } - }, - exitMacroRecordMode: function() { - var macroModeState = vimGlobalState.macroModeState; - macroModeState.toggle(); - parseKeyBufferToRegister(macroModeState.latestRegister, - macroModeState.macroKeyBuffer); - }, - enterMacroRecordMode: function(cm, actionArgs) { - var macroModeState = vimGlobalState.macroModeState; - var registerName = actionArgs.selectedCharacter; - macroModeState.toggle(cm, registerName); - emptyMacroKeyBuffer(macroModeState); - }, - enterInsertMode: function(cm, actionArgs, vim) { - if (cm.getOption('readOnly')) { return; } - vim.insertMode = true; - vim.insertModeRepeat = actionArgs && actionArgs.repeat || 1; - var insertAt = (actionArgs) ? actionArgs.insertAt : null; - if (insertAt == 'eol') { - var cursor = cm.getCursor(); - cursor = { line: cursor.line, ch: lineLength(cm, cursor.line) }; - cm.setCursor(cursor); - } else if (insertAt == 'charAfter') { - cm.setCursor(offsetCursor(cm.getCursor(), 0, 1)); - } else if (insertAt == 'firstNonBlank') { - cm.setCursor(motions.moveToFirstNonWhiteSpaceCharacter(cm)); - } - cm.setOption('keyMap', 'vim-insert'); - if (actionArgs && actionArgs.replace) { - // Handle Replace-mode as a special case of insert mode. - cm.toggleOverwrite(true); - cm.setOption('keyMap', 'vim-replace'); - CodeMirror.signal(cm, "vim-mode-change", {mode: "replace"}); - } else { - cm.setOption('keyMap', 'vim-insert'); - CodeMirror.signal(cm, "vim-mode-change", {mode: "insert"}); - } - if (!vimGlobalState.macroModeState.inReplay) { - // Only record if not replaying. - cm.on('change', onChange); - cm.on('cursorActivity', onCursorActivity); - CodeMirror.on(cm.getInputField(), 'keydown', onKeyEventTargetKeyDown); - } - }, - toggleVisualMode: function(cm, actionArgs, vim) { - var repeat = actionArgs.repeat; - var curStart = cm.getCursor(); - var curEnd; - // TODO: The repeat should actually select number of characters/lines - // equal to the repeat times the size of the previous visual - // operation. - if (!vim.visualMode) { - cm.on('mousedown', exitVisualMode); - vim.visualMode = true; - vim.visualLine = !!actionArgs.linewise; - if (vim.visualLine) { - curStart.ch = 0; - curEnd = clipCursorToContent(cm, { - line: curStart.line + repeat - 1, - ch: lineLength(cm, curStart.line) - }, true /** includeLineBreak */); - } else { - curEnd = clipCursorToContent(cm, { - line: curStart.line, - ch: curStart.ch + repeat - }, true /** includeLineBreak */); - } - // Make the initial selection. - if (!actionArgs.repeatIsExplicit && !vim.visualLine) { - // This is a strange case. Here the implicit repeat is 1. The - // following commands lets the cursor hover over the 1 character - // selection. - cm.setCursor(curEnd); - cm.setSelection(curEnd, curStart); - } else { - cm.setSelection(curStart, curEnd); - } - CodeMirror.signal(cm, "vim-mode-change", {mode: "visual", subMode: vim.visualLine ? "linewise" : ""}); - } else { - curStart = cm.getCursor('anchor'); - curEnd = cm.getCursor('head'); - if (!vim.visualLine && actionArgs.linewise) { - // Shift-V pressed in characterwise visual mode. Switch to linewise - // visual mode instead of exiting visual mode. - vim.visualLine = true; - curStart.ch = cursorIsBefore(curStart, curEnd) ? 0 : - lineLength(cm, curStart.line); - curEnd.ch = cursorIsBefore(curStart, curEnd) ? - lineLength(cm, curEnd.line) : 0; - cm.setSelection(curStart, curEnd); - CodeMirror.signal(cm, "vim-mode-change", {mode: "visual", subMode: "linewise"}); - } else if (vim.visualLine && !actionArgs.linewise) { - // v pressed in linewise visual mode. Switch to characterwise visual - // mode instead of exiting visual mode. - vim.visualLine = false; - CodeMirror.signal(cm, "vim-mode-change", {mode: "visual"}); - } else { - exitVisualMode(cm); - } - } - updateMark(cm, vim, '<', cursorIsBefore(curStart, curEnd) ? curStart - : curEnd); - updateMark(cm, vim, '>', cursorIsBefore(curStart, curEnd) ? curEnd - : curStart); - }, - joinLines: function(cm, actionArgs, vim) { - var curStart, curEnd; - if (vim.visualMode) { - curStart = cm.getCursor('anchor'); - curEnd = cm.getCursor('head'); - curEnd.ch = lineLength(cm, curEnd.line) - 1; - } else { - // Repeat is the number of lines to join. Minimum 2 lines. - var repeat = Math.max(actionArgs.repeat, 2); - curStart = cm.getCursor(); - curEnd = clipCursorToContent(cm, { line: curStart.line + repeat - 1, - ch: Infinity }); - } - var finalCh = 0; - cm.operation(function() { - for (var i = curStart.line; i < curEnd.line; i++) { - finalCh = lineLength(cm, curStart.line); - var tmp = { line: curStart.line + 1, - ch: lineLength(cm, curStart.line + 1) }; - var text = cm.getRange(curStart, tmp); - text = text.replace(/\n\s*/g, ' '); - cm.replaceRange(text, curStart, tmp); - } - var curFinalPos = { line: curStart.line, ch: finalCh }; - cm.setCursor(curFinalPos); - }); - }, - newLineAndEnterInsertMode: function(cm, actionArgs, vim) { - vim.insertMode = true; - var insertAt = cm.getCursor(); - if (insertAt.line === cm.firstLine() && !actionArgs.after) { - // Special case for inserting newline before start of document. - cm.replaceRange('\n', { line: cm.firstLine(), ch: 0 }); - cm.setCursor(cm.firstLine(), 0); - } else { - insertAt.line = (actionArgs.after) ? insertAt.line : - insertAt.line - 1; - insertAt.ch = lineLength(cm, insertAt.line); - cm.setCursor(insertAt); - var newlineFn = CodeMirror.commands.newlineAndIndentContinueComment || - CodeMirror.commands.newlineAndIndent; - newlineFn(cm); - } - this.enterInsertMode(cm, { repeat: actionArgs.repeat }, vim); - }, - paste: function(cm, actionArgs) { - var cur = cm.getCursor(); - var register = vimGlobalState.registerController.getRegister( - actionArgs.registerName); - if (!register.text) { - return; - } - for (var text = '', i = 0; i < actionArgs.repeat; i++) { - text += register.text; - } - var linewise = register.linewise; - if (linewise) { - if (actionArgs.after) { - // Move the newline at the end to the start instead, and paste just - // before the newline character of the line we are on right now. - text = '\n' + text.slice(0, text.length - 1); - cur.ch = lineLength(cm, cur.line); - } else { - cur.ch = 0; - } - } else { - cur.ch += actionArgs.after ? 1 : 0; - } - cm.replaceRange(text, cur); - // Now fine tune the cursor to where we want it. - var curPosFinal; - var idx; - if (linewise && actionArgs.after) { - curPosFinal = { line: cur.line + 1, - ch: findFirstNonWhiteSpaceCharacter(cm.getLine(cur.line + 1)) }; - } else if (linewise && !actionArgs.after) { - curPosFinal = { line: cur.line, - ch: findFirstNonWhiteSpaceCharacter(cm.getLine(cur.line)) }; - } else if (!linewise && actionArgs.after) { - idx = cm.indexFromPos(cur); - curPosFinal = cm.posFromIndex(idx + text.length - 1); - } else { - idx = cm.indexFromPos(cur); - curPosFinal = cm.posFromIndex(idx + text.length); - } - cm.setCursor(curPosFinal); - }, - undo: function(cm, actionArgs) { - cm.operation(function() { - repeatFn(cm, CodeMirror.commands.undo, actionArgs.repeat)(); - cm.setCursor(cm.getCursor('anchor')); - }); - }, - redo: function(cm, actionArgs) { - repeatFn(cm, CodeMirror.commands.redo, actionArgs.repeat)(); - }, - setRegister: function(_cm, actionArgs, vim) { - vim.inputState.registerName = actionArgs.selectedCharacter; - }, - setMark: function(cm, actionArgs, vim) { - var markName = actionArgs.selectedCharacter; - updateMark(cm, vim, markName, cm.getCursor()); - }, - replace: function(cm, actionArgs, vim) { - var replaceWith = actionArgs.selectedCharacter; - var curStart = cm.getCursor(); - var replaceTo; - var curEnd; - if(vim.visualMode){ - curStart=cm.getCursor('start'); - curEnd=cm.getCursor('end'); - // workaround to catch the character under the cursor - // existing workaround doesn't cover actions - curEnd=cm.clipPos({line: curEnd.line, ch: curEnd.ch+1}); - }else{ - var line = cm.getLine(curStart.line); - replaceTo = curStart.ch + actionArgs.repeat; - if (replaceTo > line.length) { - replaceTo=line.length; - } - curEnd = { line: curStart.line, ch: replaceTo }; - } - if(replaceWith=='\n'){ - if(!vim.visualMode) cm.replaceRange('', curStart, curEnd); - // special case, where vim help says to replace by just one line-break - (CodeMirror.commands.newlineAndIndentContinueComment || CodeMirror.commands.newlineAndIndent)(cm); - }else { - var replaceWithStr=cm.getRange(curStart, curEnd); - //replace all characters in range by selected, but keep linebreaks - replaceWithStr=replaceWithStr.replace(/[^\n]/g,replaceWith); - cm.replaceRange(replaceWithStr, curStart, curEnd); - if(vim.visualMode){ - cm.setCursor(curStart); - exitVisualMode(cm); - }else{ - cm.setCursor(offsetCursor(curEnd, 0, -1)); - } - } - }, - incrementNumberToken: function(cm, actionArgs) { - var cur = cm.getCursor(); - var lineStr = cm.getLine(cur.line); - var re = /-?\d+/g; - var match; - var start; - var end; - var numberStr; - var token; - while ((match = re.exec(lineStr)) !== null) { - token = match[0]; - start = match.index; - end = start + token.length; - if(cur.ch < end)break; - } - if(!actionArgs.backtrack && (end <= cur.ch))return; - if (token) { - var increment = actionArgs.increase ? 1 : -1; - var number = parseInt(token) + (increment * actionArgs.repeat); - var from = {ch:start, line:cur.line}; - var to = {ch:end, line:cur.line}; - numberStr = number.toString(); - cm.replaceRange(numberStr, from, to); - } else { - return; - } - cm.setCursor({line: cur.line, ch: start + numberStr.length - 1}); - }, - repeatLastEdit: function(cm, actionArgs, vim) { - var lastEditInputState = vim.lastEditInputState; - if (!lastEditInputState) { return; } - var repeat = actionArgs.repeat; - if (repeat && actionArgs.repeatIsExplicit) { - vim.lastEditInputState.repeatOverride = repeat; - } else { - repeat = vim.lastEditInputState.repeatOverride || repeat; - } - repeatLastEdit(cm, vim, repeat, false /** repeatForInsert */); - } - }; - - var textObjects = { - // TODO: lots of possible exceptions that can be thrown here. Try da( - // outside of a () block. - // TODO: implement text objects for the reverse like }. Should just be - // an additional mapping after moving to the defaultKeyMap. - 'w': function(cm, inclusive) { - return expandWordUnderCursor(cm, inclusive, true /** forward */, - false /** bigWord */); - }, - 'W': function(cm, inclusive) { - return expandWordUnderCursor(cm, inclusive, - true /** forward */, true /** bigWord */); - }, - '{': function(cm, inclusive) { - return selectCompanionObject(cm, '}', inclusive); - }, - '(': function(cm, inclusive) { - return selectCompanionObject(cm, ')', inclusive); - }, - '[': function(cm, inclusive) { - return selectCompanionObject(cm, ']', inclusive); - }, - '\'': function(cm, inclusive) { - return findBeginningAndEnd(cm, "'", inclusive); - }, - '"': function(cm, inclusive) { - return findBeginningAndEnd(cm, '"', inclusive); - } - }; - - /* - * Below are miscellaneous utility functions used by vim.js - */ - - /** - * Clips cursor to ensure that line is within the buffer's range - * If includeLineBreak is true, then allow cur.ch == lineLength. - */ - function clipCursorToContent(cm, cur, includeLineBreak) { - var line = Math.min(Math.max(cm.firstLine(), cur.line), cm.lastLine() ); - var maxCh = lineLength(cm, line) - 1; - maxCh = (includeLineBreak) ? maxCh + 1 : maxCh; - var ch = Math.min(Math.max(0, cur.ch), maxCh); - return { line: line, ch: ch }; - } - function copyArgs(args) { - var ret = {}; - for (var prop in args) { - if (args.hasOwnProperty(prop)) { - ret[prop] = args[prop]; - } - } - return ret; - } - function offsetCursor(cur, offsetLine, offsetCh) { - return { line: cur.line + offsetLine, ch: cur.ch + offsetCh }; - } - function matchKeysPartial(pressed, mapped) { - for (var i = 0; i < pressed.length; i++) { - // 'character' means any character. For mark, register commads, etc. - if (pressed[i] != mapped[i] && mapped[i] != 'character') { - return false; - } - } - return true; - } - function repeatFn(cm, fn, repeat) { - return function() { - for (var i = 0; i < repeat; i++) { - fn(cm); - } - }; - } - function copyCursor(cur) { - return { line: cur.line, ch: cur.ch }; - } - function cursorEqual(cur1, cur2) { - return cur1.ch == cur2.ch && cur1.line == cur2.line; - } - function cursorIsBefore(cur1, cur2) { - if (cur1.line < cur2.line) { - return true; - } - if (cur1.line == cur2.line && cur1.ch < cur2.ch) { - return true; - } - return false; - } - function cusrorIsBetween(cur1, cur2, cur3) { - // returns true if cur2 is between cur1 and cur3. - var cur1before2 = cursorIsBefore(cur1, cur2); - var cur2before3 = cursorIsBefore(cur2, cur3); - return cur1before2 && cur2before3; - } - function lineLength(cm, lineNum) { - return cm.getLine(lineNum).length; - } - function reverse(s){ - return s.split('').reverse().join(''); - } - function trim(s) { - if (s.trim) { - return s.trim(); - } - return s.replace(/^\s+|\s+$/g, ''); - } - function escapeRegex(s) { - return s.replace(/([.?*+$\[\]\/\\(){}|\-])/g, '\\$1'); - } - - function exitVisualMode(cm) { - cm.off('mousedown', exitVisualMode); - var vim = cm.state.vim; - vim.visualMode = false; - vim.visualLine = false; - var selectionStart = cm.getCursor('anchor'); - var selectionEnd = cm.getCursor('head'); - if (!cursorEqual(selectionStart, selectionEnd)) { - // Clear the selection and set the cursor only if the selection has not - // already been cleared. Otherwise we risk moving the cursor somewhere - // it's not supposed to be. - cm.setCursor(clipCursorToContent(cm, selectionEnd)); - } - CodeMirror.signal(cm, "vim-mode-change", {mode: "normal"}); - } - - // Remove any trailing newlines from the selection. For - // example, with the caret at the start of the last word on the line, - // 'dw' should word, but not the newline, while 'w' should advance the - // caret to the first character of the next line. - function clipToLine(cm, curStart, curEnd) { - var selection = cm.getRange(curStart, curEnd); - // Only clip if the selection ends with trailing newline + whitespace - if (/\n\s*$/.test(selection)) { - var lines = selection.split('\n'); - // We know this is all whitepsace. - lines.pop(); - - // Cases: - // 1. Last word is an empty line - do not clip the trailing '\n' - // 2. Last word is not an empty line - clip the trailing '\n' - var line; - // Find the line containing the last word, and clip all whitespace up - // to it. - for (var line = lines.pop(); lines.length > 0 && line && isWhiteSpaceString(line); line = lines.pop()) { - curEnd.line--; - curEnd.ch = 0; - } - // If the last word is not an empty line, clip an additional newline - if (line) { - curEnd.line--; - curEnd.ch = lineLength(cm, curEnd.line); - } else { - curEnd.ch = 0; - } - } - } - - // Expand the selection to line ends. - function expandSelectionToLine(_cm, curStart, curEnd) { - curStart.ch = 0; - curEnd.ch = 0; - curEnd.line++; - } - - function findFirstNonWhiteSpaceCharacter(text) { - if (!text) { - return 0; - } - var firstNonWS = text.search(/\S/); - return firstNonWS == -1 ? text.length : firstNonWS; - } - - function expandWordUnderCursor(cm, inclusive, _forward, bigWord, noSymbol) { - var cur = cm.getCursor(); - var line = cm.getLine(cur.line); - var idx = cur.ch; - - // Seek to first word or non-whitespace character, depending on if - // noSymbol is true. - var textAfterIdx = line.substring(idx); - var firstMatchedChar; - if (noSymbol) { - firstMatchedChar = textAfterIdx.search(/\w/); - } else { - firstMatchedChar = textAfterIdx.search(/\S/); - } - if (firstMatchedChar == -1) { - return null; - } - idx += firstMatchedChar; - textAfterIdx = line.substring(idx); - var textBeforeIdx = line.substring(0, idx); - - var matchRegex; - // Greedy matchers for the "word" we are trying to expand. - if (bigWord) { - matchRegex = /^\S+/; - } else { - if ((/\w/).test(line.charAt(idx))) { - matchRegex = /^\w+/; - } else { - matchRegex = /^[^\w\s]+/; - } - } - - var wordAfterRegex = matchRegex.exec(textAfterIdx); - var wordStart = idx; - var wordEnd = idx + wordAfterRegex[0].length; - // TODO: Find a better way to do this. It will be slow on very long lines. - var revTextBeforeIdx = reverse(textBeforeIdx); - var wordBeforeRegex = matchRegex.exec(revTextBeforeIdx); - if (wordBeforeRegex) { - wordStart -= wordBeforeRegex[0].length; - } - - if (inclusive) { - // If present, trim all whitespace after word. - // Otherwise, trim all whitespace before word. - var textAfterWordEnd = line.substring(wordEnd); - var whitespacesAfterWord = textAfterWordEnd.match(/^\s*/)[0].length; - if (whitespacesAfterWord > 0) { - wordEnd += whitespacesAfterWord; - } else { - var revTrim = revTextBeforeIdx.length - wordStart; - var textBeforeWordStart = revTextBeforeIdx.substring(revTrim); - var whitespacesBeforeWord = textBeforeWordStart.match(/^\s*/)[0].length; - wordStart -= whitespacesBeforeWord; - } - } - - return { start: { line: cur.line, ch: wordStart }, - end: { line: cur.line, ch: wordEnd }}; - } - - function recordJumpPosition(cm, oldCur, newCur) { - if(!cursorEqual(oldCur, newCur)) { - vimGlobalState.jumpList.add(cm, oldCur, newCur); - } - } - - function recordLastCharacterSearch(increment, args) { - vimGlobalState.lastChararacterSearch.increment = increment; - vimGlobalState.lastChararacterSearch.forward = args.forward; - vimGlobalState.lastChararacterSearch.selectedCharacter = args.selectedCharacter; - } - - var symbolToMode = { - '(': 'bracket', ')': 'bracket', '{': 'bracket', '}': 'bracket', - '[': 'section', ']': 'section', - '*': 'comment', '/': 'comment', - 'm': 'method', 'M': 'method', - '#': 'preprocess' - }; - var findSymbolModes = { - bracket: { - isComplete: function(state) { - if (state.nextCh === state.symb) { - state.depth++; - if(state.depth >= 1)return true; - } else if (state.nextCh === state.reverseSymb) { - state.depth--; - } - return false; - } - }, - section: { - init: function(state) { - state.curMoveThrough = true; - state.symb = (state.forward ? ']' : '[') === state.symb ? '{' : '}'; - }, - isComplete: function(state) { - return state.index === 0 && state.nextCh === state.symb; - } - }, - comment: { - isComplete: function(state) { - var found = state.lastCh === '*' && state.nextCh === '/'; - state.lastCh = state.nextCh; - return found; - } - }, - // TODO: The original Vim implementation only operates on level 1 and 2. - // The current implementation doesn't check for code block level and - // therefore it operates on any levels. - method: { - init: function(state) { - state.symb = (state.symb === 'm' ? '{' : '}'); - state.reverseSymb = state.symb === '{' ? '}' : '{'; - }, - isComplete: function(state) { - if(state.nextCh === state.symb)return true; - return false; - } - }, - preprocess: { - init: function(state) { - state.index = 0; - }, - isComplete: function(state) { - if (state.nextCh === '#') { - var token = state.lineText.match(/#(\w+)/)[1]; - if (token === 'endif') { - if (state.forward && state.depth === 0) { - return true; - } - state.depth++; - } else if (token === 'if') { - if (!state.forward && state.depth === 0) { - return true; - } - state.depth--; - } - if(token === 'else' && state.depth === 0)return true; - } - return false; - } - } - }; - function findSymbol(cm, repeat, forward, symb) { - var cur = cm.getCursor(); - var increment = forward ? 1 : -1; - var endLine = forward ? cm.lineCount() : -1; - var curCh = cur.ch; - var line = cur.line; - var lineText = cm.getLine(line); - var state = { - lineText: lineText, - nextCh: lineText.charAt(curCh), - lastCh: null, - index: curCh, - symb: symb, - reverseSymb: (forward ? { ')': '(', '}': '{' } : { '(': ')', '{': '}' })[symb], - forward: forward, - depth: 0, - curMoveThrough: false - }; - var mode = symbolToMode[symb]; - if(!mode)return cur; - var init = findSymbolModes[mode].init; - var isComplete = findSymbolModes[mode].isComplete; - if(init)init(state); - while (line !== endLine && repeat) { - state.index += increment; - state.nextCh = state.lineText.charAt(state.index); - if (!state.nextCh) { - line += increment; - state.lineText = cm.getLine(line) || ''; - if (increment > 0) { - state.index = 0; - } else { - var lineLen = state.lineText.length; - state.index = (lineLen > 0) ? (lineLen-1) : 0; - } - state.nextCh = state.lineText.charAt(state.index); - } - if (isComplete(state)) { - cur.line = line; - cur.ch = state.index; - repeat--; - } - } - if (state.nextCh || state.curMoveThrough) { - return { line: line, ch: state.index }; - } - return cur; - } - - /* - * Returns the boundaries of the next word. If the cursor in the middle of - * the word, then returns the boundaries of the current word, starting at - * the cursor. If the cursor is at the start/end of a word, and we are going - * forward/backward, respectively, find the boundaries of the next word. - * - * @param {CodeMirror} cm CodeMirror object. - * @param {Cursor} cur The cursor position. - * @param {boolean} forward True to search forward. False to search - * backward. - * @param {boolean} bigWord True if punctuation count as part of the word. - * False if only [a-zA-Z0-9] characters count as part of the word. - * @param {boolean} emptyLineIsWord True if empty lines should be treated - * as words. - * @return {Object{from:number, to:number, line: number}} The boundaries of - * the word, or null if there are no more words. - */ - function findWord(cm, cur, forward, bigWord, emptyLineIsWord) { - var lineNum = cur.line; - var pos = cur.ch; - var line = cm.getLine(lineNum); - var dir = forward ? 1 : -1; - var regexps = bigWord ? bigWordRegexp : wordRegexp; - - if (emptyLineIsWord && line == '') { - lineNum += dir; - line = cm.getLine(lineNum); - if (!isLine(cm, lineNum)) { - return null; - } - pos = (forward) ? 0 : line.length; - } - - while (true) { - if (emptyLineIsWord && line == '') { - return { from: 0, to: 0, line: lineNum }; - } - var stop = (dir > 0) ? line.length : -1; - var wordStart = stop, wordEnd = stop; - // Find bounds of next word. - while (pos != stop) { - var foundWord = false; - for (var i = 0; i < regexps.length && !foundWord; ++i) { - if (regexps[i].test(line.charAt(pos))) { - wordStart = pos; - // Advance to end of word. - while (pos != stop && regexps[i].test(line.charAt(pos))) { - pos += dir; - } - wordEnd = pos; - foundWord = wordStart != wordEnd; - if (wordStart == cur.ch && lineNum == cur.line && - wordEnd == wordStart + dir) { - // We started at the end of a word. Find the next one. - continue; - } else { - return { - from: Math.min(wordStart, wordEnd + 1), - to: Math.max(wordStart, wordEnd), - line: lineNum }; - } - } - } - if (!foundWord) { - pos += dir; - } - } - // Advance to next/prev line. - lineNum += dir; - if (!isLine(cm, lineNum)) { - return null; - } - line = cm.getLine(lineNum); - pos = (dir > 0) ? 0 : line.length; - } - // Should never get here. - throw new Error('The impossible happened.'); - } - - /** - * @param {CodeMirror} cm CodeMirror object. - * @param {int} repeat Number of words to move past. - * @param {boolean} forward True to search forward. False to search - * backward. - * @param {boolean} wordEnd True to move to end of word. False to move to - * beginning of word. - * @param {boolean} bigWord True if punctuation count as part of the word. - * False if only alphabet characters count as part of the word. - * @return {Cursor} The position the cursor should move to. - */ - function moveToWord(cm, repeat, forward, wordEnd, bigWord) { - var cur = cm.getCursor(); - var curStart = copyCursor(cur); - var words = []; - if (forward && !wordEnd || !forward && wordEnd) { - repeat++; - } - // For 'e', empty lines are not considered words, go figure. - var emptyLineIsWord = !(forward && wordEnd); - for (var i = 0; i < repeat; i++) { - var word = findWord(cm, cur, forward, bigWord, emptyLineIsWord); - if (!word) { - var eodCh = lineLength(cm, cm.lastLine()); - words.push(forward - ? {line: cm.lastLine(), from: eodCh, to: eodCh} - : {line: 0, from: 0, to: 0}); - break; - } - words.push(word); - cur = {line: word.line, ch: forward ? (word.to - 1) : word.from}; - } - var shortCircuit = words.length != repeat; - var firstWord = words[0]; - var lastWord = words.pop(); - if (forward && !wordEnd) { - // w - if (!shortCircuit && (firstWord.from != curStart.ch || firstWord.line != curStart.line)) { - // We did not start in the middle of a word. Discard the extra word at the end. - lastWord = words.pop(); - } - return {line: lastWord.line, ch: lastWord.from}; - } else if (forward && wordEnd) { - return {line: lastWord.line, ch: lastWord.to - 1}; - } else if (!forward && wordEnd) { - // ge - if (!shortCircuit && (firstWord.to != curStart.ch || firstWord.line != curStart.line)) { - // We did not start in the middle of a word. Discard the extra word at the end. - lastWord = words.pop(); - } - return {line: lastWord.line, ch: lastWord.to}; - } else { - // b - return {line: lastWord.line, ch: lastWord.from}; - } - } - - function moveToCharacter(cm, repeat, forward, character) { - var cur = cm.getCursor(); - var start = cur.ch; - var idx; - for (var i = 0; i < repeat; i ++) { - var line = cm.getLine(cur.line); - idx = charIdxInLine(start, line, character, forward, true); - if (idx == -1) { - return null; - } - start = idx; - } - return { line: cm.getCursor().line, ch: idx }; - } - - function moveToColumn(cm, repeat) { - // repeat is always >= 1, so repeat - 1 always corresponds - // to the column we want to go to. - var line = cm.getCursor().line; - return clipCursorToContent(cm, { line: line, ch: repeat - 1 }); - } - - function updateMark(cm, vim, markName, pos) { - if (!inArray(markName, validMarks)) { - return; - } - if (vim.marks[markName]) { - vim.marks[markName].clear(); - } - vim.marks[markName] = cm.setBookmark(pos); - } - - function charIdxInLine(start, line, character, forward, includeChar) { - // Search for char in line. - // motion_options: {forward, includeChar} - // If includeChar = true, include it too. - // If forward = true, search forward, else search backwards. - // If char is not found on this line, do nothing - var idx; - if (forward) { - idx = line.indexOf(character, start + 1); - if (idx != -1 && !includeChar) { - idx -= 1; - } - } else { - idx = line.lastIndexOf(character, start - 1); - if (idx != -1 && !includeChar) { - idx += 1; - } - } - return idx; - } - - function getContextLevel(ctx) { - return (ctx === 'string' || ctx === 'comment') ? 1 : 0; - } - - function findMatchedSymbol(cm, cur, symb) { - var line = cur.line; - var ch = cur.ch; - symb = symb ? symb : cm.getLine(line).charAt(ch); - - var symbContext = cm.getTokenAt({line:line, ch:ch+1}).type; - var symbCtxLevel = getContextLevel(symbContext); - - var reverseSymb = ({ - '(': ')', ')': '(', - '[': ']', ']': '[', - '{': '}', '}': '{'})[symb]; - - // Couldn't find a matching symbol, abort - if (!reverseSymb) { - return cur; - } - - // set our increment to move forward (+1) or backwards (-1) - // depending on which bracket we're matching - var increment = ({'(': 1, '{': 1, '[': 1})[symb] || -1; - var endLine = increment === 1 ? cm.lineCount() : -1; - var depth = 1, nextCh = symb, index = ch, lineText = cm.getLine(line); - // Simple search for closing paren--just count openings and closings till - // we find our match - // TODO: use info from CodeMirror to ignore closing brackets in comments - // and quotes, etc. - while (line !== endLine && depth > 0) { - index += increment; - nextCh = lineText.charAt(index); - if (!nextCh) { - line += increment; - lineText = cm.getLine(line) || ''; - if (increment > 0) { - index = 0; - } else { - var lineLen = lineText.length; - index = (lineLen > 0) ? (lineLen-1) : 0; - } - nextCh = lineText.charAt(index); - } - var revSymbContext = cm.getTokenAt({line:line, ch:index+1}).type; - var revSymbCtxLevel = getContextLevel(revSymbContext); - if (symbCtxLevel >= revSymbCtxLevel) { - if (nextCh === symb) { - depth++; - } else if (nextCh === reverseSymb) { - depth--; - } - } - } - - if (nextCh) { - return { line: line, ch: index }; - } - return cur; - } - - function selectCompanionObject(cm, revSymb, inclusive) { - var cur = cm.getCursor(); - - var end = findMatchedSymbol(cm, cur, revSymb); - var start = findMatchedSymbol(cm, end); - start.ch += inclusive ? 1 : 0; - end.ch += inclusive ? 0 : 1; - - return { start: start, end: end }; - } - - // Takes in a symbol and a cursor and tries to simulate text objects that - // have identical opening and closing symbols - // TODO support across multiple lines - function findBeginningAndEnd(cm, symb, inclusive) { - var cur = cm.getCursor(); - var line = cm.getLine(cur.line); - var chars = line.split(''); - var start, end, i, len; - var firstIndex = chars.indexOf(symb); - - // the decision tree is to always look backwards for the beginning first, - // but if the cursor is in front of the first instance of the symb, - // then move the cursor forward - if (cur.ch < firstIndex) { - cur.ch = firstIndex; - // Why is this line even here??? - // cm.setCursor(cur.line, firstIndex+1); - } - // otherwise if the cursor is currently on the closing symbol - else if (firstIndex < cur.ch && chars[cur.ch] == symb) { - end = cur.ch; // assign end to the current cursor - --cur.ch; // make sure to look backwards - } - - // if we're currently on the symbol, we've got a start - if (chars[cur.ch] == symb && !end) { - start = cur.ch + 1; // assign start to ahead of the cursor - } else { - // go backwards to find the start - for (i = cur.ch; i > -1 && !start; i--) { - if (chars[i] == symb) { - start = i + 1; - } - } - } - - // look forwards for the end symbol - if (start && !end) { - for (i = start, len = chars.length; i < len && !end; i++) { - if (chars[i] == symb) { - end = i; - } - } - } - - // nothing found - if (!start || !end) { - return { start: cur, end: cur }; - } - - // include the symbols - if (inclusive) { - --start; ++end; - } - - return { - start: { line: cur.line, ch: start }, - end: { line: cur.line, ch: end } - }; - } - - // Search functions - function SearchState() {} - SearchState.prototype = { - getQuery: function() { - return vimGlobalState.query; - }, - setQuery: function(query) { - vimGlobalState.query = query; - }, - getOverlay: function() { - return this.searchOverlay; - }, - setOverlay: function(overlay) { - this.searchOverlay = overlay; - }, - isReversed: function() { - return vimGlobalState.isReversed; - }, - setReversed: function(reversed) { - vimGlobalState.isReversed = reversed; - } - }; - function getSearchState(cm) { - var vim = cm.state.vim; - return vim.searchState_ || (vim.searchState_ = new SearchState()); - } - function dialog(cm, template, shortText, onClose, options) { - if (cm.openDialog) { - cm.openDialog(template, onClose, { bottom: true, value: options.value, - onKeyDown: options.onKeyDown, onKeyUp: options.onKeyUp }); - } - else { - onClose(prompt(shortText, '')); - } - } - - function findUnescapedSlashes(str) { - var escapeNextChar = false; - var slashes = []; - for (var i = 0; i < str.length; i++) { - var c = str.charAt(i); - if (!escapeNextChar && c == '/') { - slashes.push(i); - } - escapeNextChar = (c == '\\'); - } - return slashes; - } - /** - * Extract the regular expression from the query and return a Regexp object. - * Returns null if the query is blank. - * If ignoreCase is passed in, the Regexp object will have the 'i' flag set. - * If smartCase is passed in, and the query contains upper case letters, - * then ignoreCase is overridden, and the 'i' flag will not be set. - * If the query contains the /i in the flag part of the regular expression, - * then both ignoreCase and smartCase are ignored, and 'i' will be passed - * through to the Regex object. - */ - function parseQuery(query, ignoreCase, smartCase) { - // Check if the query is already a regex. - if (query instanceof RegExp) { return query; } - // First try to extract regex + flags from the input. If no flags found, - // extract just the regex. IE does not accept flags directly defined in - // the regex string in the form /regex/flags - var slashes = findUnescapedSlashes(query); - var regexPart; - var forceIgnoreCase; - if (!slashes.length) { - // Query looks like 'regexp' - regexPart = query; - } else { - // Query looks like 'regexp/...' - regexPart = query.substring(0, slashes[0]); - var flagsPart = query.substring(slashes[0]); - forceIgnoreCase = (flagsPart.indexOf('i') != -1); - } - if (!regexPart) { - return null; - } - if (smartCase) { - ignoreCase = (/^[^A-Z]*$/).test(regexPart); - } - var regexp = new RegExp(regexPart, - (ignoreCase || forceIgnoreCase) ? 'i' : undefined); - return regexp; - } - function showConfirm(cm, text) { - if (cm.openNotification) { - cm.openNotification('' + text + '', - {bottom: true, duration: 5000}); - } else { - alert(text); - } - } - function makePrompt(prefix, desc) { - var raw = ''; - if (prefix) { - raw += '' + prefix + ''; - } - raw += ' ' + - ''; - if (desc) { - raw += ''; - raw += desc; - raw += ''; - } - return raw; - } - var searchPromptDesc = '(Javascript regexp)'; - function showPrompt(cm, options) { - var shortText = (options.prefix || '') + ' ' + (options.desc || ''); - var prompt = makePrompt(options.prefix, options.desc); - dialog(cm, prompt, shortText, options.onClose, options); - } - function regexEqual(r1, r2) { - if (r1 instanceof RegExp && r2 instanceof RegExp) { - var props = ['global', 'multiline', 'ignoreCase', 'source']; - for (var i = 0; i < props.length; i++) { - var prop = props[i]; - if (r1[prop] !== r2[prop]) { - return false; - } - } - return true; - } - return false; - } - // Returns true if the query is valid. - function updateSearchQuery(cm, rawQuery, ignoreCase, smartCase) { - if (!rawQuery) { - return; - } - var state = getSearchState(cm); - var query = parseQuery(rawQuery, !!ignoreCase, !!smartCase); - if (!query) { - return; - } - highlightSearchMatches(cm, query); - if (regexEqual(query, state.getQuery())) { - return query; - } - state.setQuery(query); - return query; - } - function searchOverlay(query) { - if (query.source.charAt(0) == '^') { - var matchSol = true; - } - return { - token: function(stream) { - if (matchSol && !stream.sol()) { - stream.skipToEnd(); - return; - } - var match = stream.match(query, false); - if (match) { - if (match[0].length == 0) { - // Matched empty string, skip to next. - stream.next(); - return 'searching'; - } - if (!stream.sol()) { - // Backtrack 1 to match \b - stream.backUp(1); - if (!query.exec(stream.next() + match[0])) { - stream.next(); - return null; - } - } - stream.match(query); - return 'searching'; - } - while (!stream.eol()) { - stream.next(); - if (stream.match(query, false)) break; - } - }, - query: query - }; - } - function highlightSearchMatches(cm, query) { - var overlay = getSearchState(cm).getOverlay(); - if (!overlay || query != overlay.query) { - if (overlay) { - cm.removeOverlay(overlay); - } - overlay = searchOverlay(query); - cm.addOverlay(overlay); - getSearchState(cm).setOverlay(overlay); - } - } - function findNext(cm, prev, query, repeat) { - if (repeat === undefined) { repeat = 1; } - return cm.operation(function() { - var pos = cm.getCursor(); - var cursor = cm.getSearchCursor(query, pos); - for (var i = 0; i < repeat; i++) { - var found = cursor.find(prev); - if (i == 0 && found && cursorEqual(cursor.from(), pos)) { found = cursor.find(prev); } - if (!found) { - // SearchCursor may have returned null because it hit EOF, wrap - // around and try again. - cursor = cm.getSearchCursor(query, - (prev) ? { line: cm.lastLine() } : {line: cm.firstLine(), ch: 0} ); - if (!cursor.find(prev)) { - return; - } - } - } - return cursor.from(); - }); - } - function clearSearchHighlight(cm) { - cm.removeOverlay(getSearchState(cm).getOverlay()); - getSearchState(cm).setOverlay(null); - } - /** - * Check if pos is in the specified range, INCLUSIVE. - * Range can be specified with 1 or 2 arguments. - * If the first range argument is an array, treat it as an array of line - * numbers. Match pos against any of the lines. - * If the first range argument is a number, - * if there is only 1 range argument, check if pos has the same line - * number - * if there are 2 range arguments, then check if pos is in between the two - * range arguments. - */ - function isInRange(pos, start, end) { - if (typeof pos != 'number') { - // Assume it is a cursor position. Get the line number. - pos = pos.line; - } - if (start instanceof Array) { - return inArray(pos, start); - } else { - if (end) { - return (pos >= start && pos <= end); - } else { - return pos == start; - } - } - } - function getUserVisibleLines(cm) { - var scrollInfo = cm.getScrollInfo(); - var occludeToleranceTop = 6; - var occludeToleranceBottom = 10; - var from = cm.coordsChar({left:0, top: occludeToleranceTop + scrollInfo.top}, 'local'); - var bottomY = scrollInfo.clientHeight - occludeToleranceBottom + scrollInfo.top; - var to = cm.coordsChar({left:0, top: bottomY}, 'local'); - return {top: from.line, bottom: to.line}; - } - - // Ex command handling - // Care must be taken when adding to the default Ex command map. For any - // pair of commands that have a shared prefix, at least one of their - // shortNames must not match the prefix of the other command. - var defaultExCommandMap = [ - { name: 'map', type: 'builtIn' }, - { name: 'write', shortName: 'w', type: 'builtIn' }, - { name: 'undo', shortName: 'u', type: 'builtIn' }, - { name: 'redo', shortName: 'red', type: 'builtIn' }, - { name: 'sort', shortName: 'sor', type: 'builtIn'}, - { name: 'substitute', shortName: 's', type: 'builtIn'}, - { name: 'nohlsearch', shortName: 'noh', type: 'builtIn'}, - { name: 'delmarks', shortName: 'delm', type: 'builtin'} - ]; - Vim.ExCommandDispatcher = function() { - this.buildCommandMap_(); - }; - Vim.ExCommandDispatcher.prototype = { - processCommand: function(cm, input) { - var vim = cm.state.vim; - if (vim.visualMode) { - exitVisualMode(cm); - } - var inputStream = new CodeMirror.StringStream(input); - var params = {}; - params.input = input; - try { - this.parseInput_(cm, inputStream, params); - } catch(e) { - showConfirm(cm, e); - return; - } - var commandName; - if (!params.commandName) { - // If only a line range is defined, move to the line. - if (params.line !== undefined) { - commandName = 'move'; - } - } else { - var command = this.matchCommand_(params.commandName); - if (command) { - commandName = command.name; - this.parseCommandArgs_(inputStream, params, command); - if (command.type == 'exToKey') { - // Handle Ex to Key mapping. - for (var i = 0; i < command.toKeys.length; i++) { - CodeMirror.Vim.handleKey(cm, command.toKeys[i]); - } - return; - } else if (command.type == 'exToEx') { - // Handle Ex to Ex mapping. - this.processCommand(cm, command.toInput); - return; - } - } - } - if (!commandName) { - showConfirm(cm, 'Not an editor command ":' + input + '"'); - return; - } - try { - exCommands[commandName](cm, params); - } catch(e) { - showConfirm(cm, e); - } - }, - parseInput_: function(cm, inputStream, result) { - inputStream.eatWhile(':'); - // Parse range. - if (inputStream.eat('%')) { - result.line = cm.firstLine(); - result.lineEnd = cm.lastLine(); - } else { - result.line = this.parseLineSpec_(cm, inputStream); - if (result.line !== undefined && inputStream.eat(',')) { - result.lineEnd = this.parseLineSpec_(cm, inputStream); - } - } - - // Parse command name. - var commandMatch = inputStream.match(/^(\w+)/); - if (commandMatch) { - result.commandName = commandMatch[1]; - } else { - result.commandName = inputStream.match(/.*/)[0]; - } - - return result; - }, - parseLineSpec_: function(cm, inputStream) { - var numberMatch = inputStream.match(/^(\d+)/); - if (numberMatch) { - return parseInt(numberMatch[1], 10) - 1; - } - switch (inputStream.next()) { - case '.': - return cm.getCursor().line; - case '$': - return cm.lastLine(); - case '\'': - var mark = cm.state.vim.marks[inputStream.next()]; - if (mark && mark.find()) { - return mark.find().line; - } - throw new Error('Mark not set'); - default: - inputStream.backUp(1); - return undefined; - } - }, - parseCommandArgs_: function(inputStream, params, command) { - if (inputStream.eol()) { - return; - } - params.argString = inputStream.match(/.*/)[0]; - // Parse command-line arguments - var delim = command.argDelimiter || /\s+/; - var args = trim(params.argString).split(delim); - if (args.length && args[0]) { - params.args = args; - } - }, - matchCommand_: function(commandName) { - // Return the command in the command map that matches the shortest - // prefix of the passed in command name. The match is guaranteed to be - // unambiguous if the defaultExCommandMap's shortNames are set up - // correctly. (see @code{defaultExCommandMap}). - for (var i = commandName.length; i > 0; i--) { - var prefix = commandName.substring(0, i); - if (this.commandMap_[prefix]) { - var command = this.commandMap_[prefix]; - if (command.name.indexOf(commandName) === 0) { - return command; - } - } - } - return null; - }, - buildCommandMap_: function() { - this.commandMap_ = {}; - for (var i = 0; i < defaultExCommandMap.length; i++) { - var command = defaultExCommandMap[i]; - var key = command.shortName || command.name; - this.commandMap_[key] = command; - } - }, - map: function(lhs, rhs) { - if (lhs != ':' && lhs.charAt(0) == ':') { - var commandName = lhs.substring(1); - if (rhs != ':' && rhs.charAt(0) == ':') { - // Ex to Ex mapping - this.commandMap_[commandName] = { - name: commandName, - type: 'exToEx', - toInput: rhs.substring(1) - }; - } else { - // Ex to key mapping - this.commandMap_[commandName] = { - name: commandName, - type: 'exToKey', - toKeys: parseKeyString(rhs) - }; - } - } else { - if (rhs != ':' && rhs.charAt(0) == ':') { - // Key to Ex mapping. - defaultKeymap.unshift({ - keys: parseKeyString(lhs), - type: 'keyToEx', - exArgs: { input: rhs.substring(1) }}); - } else { - // Key to key mapping - defaultKeymap.unshift({ - keys: parseKeyString(lhs), - type: 'keyToKey', - toKeys: parseKeyString(rhs) - }); - } - } - } - }; - - // Converts a key string sequence of the form abd into Vim's - // keymap representation. - function parseKeyString(str) { - var key, match; - var keys = []; - while (str) { - match = (/<\w+-.+?>|<\w+>|./).exec(str); - if(match === null)break; - key = match[0]; - str = str.substring(match.index + key.length); - keys.push(key); - } - return keys; - } - - var exCommands = { - map: function(cm, params) { - var mapArgs = params.args; - if (!mapArgs || mapArgs.length < 2) { - if (cm) { - showConfirm(cm, 'Invalid mapping: ' + params.input); - } - return; - } - exCommandDispatcher.map(mapArgs[0], mapArgs[1], cm); - }, - move: function(cm, params) { - commandDispatcher.processCommand(cm, cm.state.vim, { - type: 'motion', - motion: 'moveToLineOrEdgeOfDocument', - motionArgs: { forward: false, explicitRepeat: true, - linewise: true }, - repeatOverride: params.line+1}); - }, - sort: function(cm, params) { - var reverse, ignoreCase, unique, number; - function parseArgs() { - if (params.argString) { - var args = new CodeMirror.StringStream(params.argString); - if (args.eat('!')) { reverse = true; } - if (args.eol()) { return; } - if (!args.eatSpace()) { throw new Error('invalid arguments ' + args.match(/.*/)[0]); } - var opts = args.match(/[a-z]+/); - if (opts) { - opts = opts[0]; - ignoreCase = opts.indexOf('i') != -1; - unique = opts.indexOf('u') != -1; - var decimal = opts.indexOf('d') != -1 && 1; - var hex = opts.indexOf('x') != -1 && 1; - var octal = opts.indexOf('o') != -1 && 1; - if (decimal + hex + octal > 1) { throw new Error('invalid arguments'); } - number = decimal && 'decimal' || hex && 'hex' || octal && 'octal'; - } - if (args.eatSpace() && args.match(/\/.*\//)) { throw new Error('patterns not supported'); } - } - } - parseArgs(); - var lineStart = params.line || cm.firstLine(); - var lineEnd = params.lineEnd || params.line || cm.lastLine(); - if (lineStart == lineEnd) { return; } - var curStart = { line: lineStart, ch: 0 }; - var curEnd = { line: lineEnd, ch: lineLength(cm, lineEnd) }; - var text = cm.getRange(curStart, curEnd).split('\n'); - var numberRegex = (number == 'decimal') ? /(-?)([\d]+)/ : - (number == 'hex') ? /(-?)(?:0x)?([0-9a-f]+)/i : - (number == 'octal') ? /([0-7]+)/ : null; - var radix = (number == 'decimal') ? 10 : (number == 'hex') ? 16 : (number == 'octal') ? 8 : null; - var numPart = [], textPart = []; - if (number) { - for (var i = 0; i < text.length; i++) { - if (numberRegex.exec(text[i])) { - numPart.push(text[i]); - } else { - textPart.push(text[i]); - } - } - } else { - textPart = text; - } - function compareFn(a, b) { - if (reverse) { var tmp; tmp = a; a = b; b = tmp; } - if (ignoreCase) { a = a.toLowerCase(); b = b.toLowerCase(); } - var anum = number && numberRegex.exec(a); - var bnum = number && numberRegex.exec(b); - if (!anum) { return a < b ? -1 : 1; } - anum = parseInt((anum[1] + anum[2]).toLowerCase(), radix); - bnum = parseInt((bnum[1] + bnum[2]).toLowerCase(), radix); - return anum - bnum; - } - numPart.sort(compareFn); - textPart.sort(compareFn); - text = (!reverse) ? textPart.concat(numPart) : numPart.concat(textPart); - if (unique) { // Remove duplicate lines - var textOld = text; - var lastLine; - text = []; - for (var i = 0; i < textOld.length; i++) { - if (textOld[i] != lastLine) { - text.push(textOld[i]); - } - lastLine = textOld[i]; - } - } - cm.replaceRange(text.join('\n'), curStart, curEnd); - }, - substitute: function(cm, params) { - if (!cm.getSearchCursor) { - throw new Error('Search feature not available. Requires searchcursor.js or ' + - 'any other getSearchCursor implementation.'); - } - var argString = params.argString; - var slashes = findUnescapedSlashes(argString); - if (slashes[0] !== 0) { - showConfirm(cm, 'Substitutions should be of the form ' + - ':s/pattern/replace/'); - return; - } - var regexPart = argString.substring(slashes[0] + 1, slashes[1]); - var replacePart = ''; - var flagsPart; - var count; - var confirm = false; // Whether to confirm each replace. - if (slashes[1]) { - replacePart = argString.substring(slashes[1] + 1, slashes[2]); - } - if (slashes[2]) { - // After the 3rd slash, we can have flags followed by a space followed - // by count. - var trailing = argString.substring(slashes[2] + 1).split(' '); - flagsPart = trailing[0]; - count = parseInt(trailing[1]); - } - if (flagsPart) { - if (flagsPart.indexOf('c') != -1) { - confirm = true; - flagsPart.replace('c', ''); - } - regexPart = regexPart + '/' + flagsPart; - } - if (regexPart) { - // If regex part is empty, then use the previous query. Otherwise use - // the regex part as the new query. - try { - updateSearchQuery(cm, regexPart, true /** ignoreCase */, - true /** smartCase */); - } catch (e) { - showConfirm(cm, 'Invalid regex: ' + regexPart); - return; - } - } - var state = getSearchState(cm); - var query = state.getQuery(); - var lineStart = (params.line !== undefined) ? params.line : cm.getCursor().line; - var lineEnd = params.lineEnd || lineStart; - if (count) { - lineStart = lineEnd; - lineEnd = lineStart + count - 1; - } - var startPos = clipCursorToContent(cm, { line: lineStart, ch: 0 }); - var cursor = cm.getSearchCursor(query, startPos); - doReplace(cm, confirm, lineStart, lineEnd, cursor, query, replacePart); - }, - redo: CodeMirror.commands.redo, - undo: CodeMirror.commands.undo, - write: function(cm) { - if (CodeMirror.commands.save) { - // If a save command is defined, call it. - CodeMirror.commands.save(cm); - } else { - // Saves to text area if no save command is defined. - cm.save(); - } - }, - nohlsearch: function(cm) { - clearSearchHighlight(cm); - }, - delmarks: function(cm, params) { - if (!params.argString || !params.argString.trim()) { - showConfirm(cm, 'Argument required'); - return; - } - - var state = cm.state.vim; - var stream = new CodeMirror.StringStream(params.argString.trim()); - while (!stream.eol()) { - stream.eatSpace(); - - // Record the streams position at the beginning of the loop for use - // in error messages. - var count = stream.pos; - - if (!stream.match(/[a-zA-Z]/, false)) { - showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count)); - return; - } - - var sym = stream.next(); - // Check if this symbol is part of a range - if (stream.match('-', true)) { - // This symbol is part of a range. - - // The range must terminate at an alphabetic character. - if (!stream.match(/[a-zA-Z]/, false)) { - showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count)); - return; - } - - var startMark = sym; - var finishMark = stream.next(); - // The range must terminate at an alphabetic character which - // shares the same case as the start of the range. - if (isLowerCase(startMark) && isLowerCase(finishMark) || - isUpperCase(startMark) && isUpperCase(finishMark)) { - var start = startMark.charCodeAt(0); - var finish = finishMark.charCodeAt(0); - if (start >= finish) { - showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count)); - return; - } - - // Because marks are always ASCII values, and we have - // determined that they are the same case, we can use - // their char codes to iterate through the defined range. - for (var j = 0; j <= finish - start; j++) { - var mark = String.fromCharCode(start + j); - delete state.marks[mark]; - } - } else { - showConfirm(cm, 'Invalid argument: ' + startMark + '-'); - return; - } - } else { - // This symbol is a valid mark, and is not part of a range. - delete state.marks[sym]; - } - } - } - }; - - var exCommandDispatcher = new Vim.ExCommandDispatcher(); - - /** - * @param {CodeMirror} cm CodeMirror instance we are in. - * @param {boolean} confirm Whether to confirm each replace. - * @param {Cursor} lineStart Line to start replacing from. - * @param {Cursor} lineEnd Line to stop replacing at. - * @param {RegExp} query Query for performing matches with. - * @param {string} replaceWith Text to replace matches with. May contain $1, - * $2, etc for replacing captured groups using Javascript replace. - */ - function doReplace(cm, confirm, lineStart, lineEnd, searchCursor, query, - replaceWith) { - // Set up all the functions. - cm.state.vim.exMode = true; - var done = false; - var lastPos = searchCursor.from(); - function replaceAll() { - cm.operation(function() { - while (!done) { - replace(); - next(); - } - stop(); - }); - } - function replace() { - var text = cm.getRange(searchCursor.from(), searchCursor.to()); - var newText = text.replace(query, replaceWith); - searchCursor.replace(newText); - } - function next() { - var found = searchCursor.findNext(); - if (!found) { - done = true; - } else if (isInRange(searchCursor.from(), lineStart, lineEnd)) { - cm.scrollIntoView(searchCursor.from(), 30); - cm.setSelection(searchCursor.from(), searchCursor.to()); - lastPos = searchCursor.from(); - done = false; - } else { - done = true; - } - } - function stop(close) { - if (close) { close(); } - cm.focus(); - if (lastPos) { - cm.setCursor(lastPos); - var vim = cm.state.vim; - vim.exMode = false; - vim.lastHPos = vim.lastHSPos = lastPos.ch; - } - } - function onPromptKeyDown(e, _value, close) { - // Swallow all keys. - CodeMirror.e_stop(e); - var keyName = CodeMirror.keyName(e); - switch (keyName) { - case 'Y': - replace(); next(); break; - case 'N': - next(); break; - case 'A': - cm.operation(replaceAll); break; - case 'L': - replace(); - // fall through and exit. - case 'Q': - case 'Esc': - case 'Ctrl-C': - case 'Ctrl-[': - stop(close); - break; - } - if (done) { stop(close); } - } - - // Actually do replace. - next(); - if (done) { - throw new Error('No matches for ' + query.source); - } - if (!confirm) { - replaceAll(); - return; - } - showPrompt(cm, { - prefix: 'replace with ' + replaceWith + ' (y/n/a/q/l)', - onKeyDown: onPromptKeyDown - }); - } - - // Register Vim with CodeMirror - function buildVimKeyMap() { - /** - * Handle the raw key event from CodeMirror. Translate the - * Shift + key modifier to the resulting letter, while preserving other - * modifers. - */ - // TODO: Figure out a way to catch capslock. - function cmKeyToVimKey(key, modifier) { - var vimKey = key; - if (isUpperCase(vimKey)) { - // Convert to lower case if shift is not the modifier since the key - // we get from CodeMirror is always upper case. - if (modifier == 'Shift') { - modifier = null; - } - else { - vimKey = vimKey.toLowerCase(); - } - } - if (modifier) { - // Vim will parse modifier+key combination as a single key. - vimKey = modifier.charAt(0) + '-' + vimKey; - } - var specialKey = ({Enter:'CR',Backspace:'BS',Delete:'Del'})[vimKey]; - vimKey = specialKey ? specialKey : vimKey; - vimKey = vimKey.length > 1 ? '<'+ vimKey + '>' : vimKey; - return vimKey; - } - - // Closure to bind CodeMirror, key, modifier. - function keyMapper(vimKey) { - return function(cm) { - CodeMirror.Vim.handleKey(cm, vimKey); - }; - } - - var cmToVimKeymap = { - 'nofallthrough': true, - 'disableInput': true, - 'style': 'fat-cursor' - }; - function bindKeys(keys, modifier) { - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - if (!modifier && inArray(key, specialSymbols)) { - // Wrap special symbols with '' because that's how CodeMirror binds - // them. - key = "'" + key + "'"; - } - var vimKey = cmKeyToVimKey(keys[i], modifier); - var cmKey = modifier ? modifier + '-' + key : key; - cmToVimKeymap[cmKey] = keyMapper(vimKey); - } - } - bindKeys(upperCaseAlphabet); - bindKeys(upperCaseAlphabet, 'Shift'); - bindKeys(upperCaseAlphabet, 'Ctrl'); - bindKeys(specialSymbols); - bindKeys(specialSymbols, 'Ctrl'); - bindKeys(numbers); - bindKeys(numbers, 'Ctrl'); - bindKeys(specialKeys); - bindKeys(specialKeys, 'Ctrl'); - return cmToVimKeymap; - } - CodeMirror.keyMap.vim = buildVimKeyMap(); - - function exitInsertMode(cm) { - var vim = cm.state.vim; - var inReplay = vimGlobalState.macroModeState.inReplay; - if (!inReplay) { - cm.off('change', onChange); - cm.off('cursorActivity', onCursorActivity); - CodeMirror.off(cm.getInputField(), 'keydown', onKeyEventTargetKeyDown); - } - if (!inReplay && vim.insertModeRepeat > 1) { - // Perform insert mode repeat for commands like 3,a and 3,o. - repeatLastEdit(cm, vim, vim.insertModeRepeat - 1, - true /** repeatForInsert */); - vim.lastEditInputState.repeatOverride = vim.insertModeRepeat; - } - delete vim.insertModeRepeat; - cm.setCursor(cm.getCursor().line, cm.getCursor().ch-1, true); - vim.insertMode = false; - cm.setOption('keyMap', 'vim'); - cm.toggleOverwrite(false); // exit replace mode if we were in it. - CodeMirror.signal(cm, "vim-mode-change", {mode: "normal"}); - } - - CodeMirror.keyMap['vim-insert'] = { - // TODO: override navigation keys so that Esc will cancel automatic - // indentation from o, O, i_ - 'Esc': exitInsertMode, - 'Ctrl-[': exitInsertMode, - 'Ctrl-C': exitInsertMode, - 'Ctrl-N': 'autocomplete', - 'Ctrl-P': 'autocomplete', - 'Enter': function(cm) { - var fn = CodeMirror.commands.newlineAndIndentContinueComment || - CodeMirror.commands.newlineAndIndent; - fn(cm); - }, - fallthrough: ['default'] - }; - - CodeMirror.keyMap['vim-replace'] = { - 'Backspace': 'goCharLeft', - fallthrough: ['vim-insert'] - }; - - function parseRegisterToKeyBuffer(macroModeState, registerName) { - var match, key; - var register = vimGlobalState.registerController.getRegister(registerName); - var text = register.toString(); - var macroKeyBuffer = macroModeState.macroKeyBuffer; - emptyMacroKeyBuffer(macroModeState); - do { - match = (/<\w+-.+?>|<\w+>|./).exec(text); - if(match === null)break; - key = match[0]; - text = text.substring(match.index + key.length); - macroKeyBuffer.push(key); - } while (text); - return macroKeyBuffer; - } - - function parseKeyBufferToRegister(registerName, keyBuffer) { - var text = keyBuffer.join(''); - vimGlobalState.registerController.setRegisterText(registerName, text); - } - - function emptyMacroKeyBuffer(macroModeState) { - if(macroModeState.isMacroPlaying)return; - var macroKeyBuffer = macroModeState.macroKeyBuffer; - macroKeyBuffer.length = 0; - } - - function executeMacroKeyBuffer(cm, macroModeState, keyBuffer) { - macroModeState.isMacroPlaying = true; - for (var i = 0, len = keyBuffer.length; i < len; i++) { - CodeMirror.Vim.handleKey(cm, keyBuffer[i]); - }; - macroModeState.isMacroPlaying = false; - } - - function logKey(macroModeState, key) { - if(macroModeState.isMacroPlaying)return; - var macroKeyBuffer = macroModeState.macroKeyBuffer; - macroKeyBuffer.push(key); - } - - /** - * Listens for changes made in insert mode. - * Should only be active in insert mode. - */ - function onChange(_cm, changeObj) { - var macroModeState = vimGlobalState.macroModeState; - var lastChange = macroModeState.lastInsertModeChanges; - while (changeObj) { - lastChange.expectCursorActivityForChange = true; - if (changeObj.origin == '+input' || changeObj.origin == 'paste' - || changeObj.origin === undefined /* only in testing */) { - var text = changeObj.text.join('\n'); - lastChange.changes.push(text); - } - // Change objects may be chained with next. - changeObj = changeObj.next; - } - } - - /** - * Listens for any kind of cursor activity on CodeMirror. - * - For tracking cursor activity in insert mode. - * - Should only be active in insert mode. - */ - function onCursorActivity() { - var macroModeState = vimGlobalState.macroModeState; - var lastChange = macroModeState.lastInsertModeChanges; - if (lastChange.expectCursorActivityForChange) { - lastChange.expectCursorActivityForChange = false; - } else { - // Cursor moved outside the context of an edit. Reset the change. - lastChange.changes = []; - } - } - - /** Wrapper for special keys pressed in insert mode */ - function InsertModeKey(keyName) { - this.keyName = keyName; - } - - /** - * Handles raw key down events from the text area. - * - Should only be active in insert mode. - * - For recording deletes in insert mode. - */ - function onKeyEventTargetKeyDown(e) { - var macroModeState = vimGlobalState.macroModeState; - var lastChange = macroModeState.lastInsertModeChanges; - var keyName = CodeMirror.keyName(e); - function onKeyFound() { - lastChange.changes.push(new InsertModeKey(keyName)); - return true; - } - if (keyName.indexOf('Delete') != -1 || keyName.indexOf('Backspace') != -1) { - CodeMirror.lookupKey(keyName, ['vim-insert'], onKeyFound); - } - } - - /** - * Repeats the last edit, which includes exactly 1 command and at most 1 - * insert. Operator and motion commands are read from lastEditInputState, - * while action commands are read from lastEditActionCommand. - * - * If repeatForInsert is true, then the function was called by - * exitInsertMode to repeat the insert mode changes the user just made. The - * corresponding enterInsertMode call was made with a count. - */ - function repeatLastEdit(cm, vim, repeat, repeatForInsert) { - var macroModeState = vimGlobalState.macroModeState; - macroModeState.inReplay = true; - var isAction = !!vim.lastEditActionCommand; - var cachedInputState = vim.inputState; - function repeatCommand() { - if (isAction) { - commandDispatcher.processAction(cm, vim, vim.lastEditActionCommand); - } else { - commandDispatcher.evalInput(cm, vim); - } - } - function repeatInsert(repeat) { - if (macroModeState.lastInsertModeChanges.changes.length > 0) { - // For some reason, repeat cw in desktop VIM will does not repeat - // insert mode changes. Will conform to that behavior. - repeat = !vim.lastEditActionCommand ? 1 : repeat; - repeatLastInsertModeChanges(cm, repeat, macroModeState); - } - } - vim.inputState = vim.lastEditInputState; - if (isAction && vim.lastEditActionCommand.interlaceInsertRepeat) { - // o and O repeat have to be interlaced with insert repeats so that the - // insertions appear on separate lines instead of the last line. - for (var i = 0; i < repeat; i++) { - repeatCommand(); - repeatInsert(1); - } - } else { - if (!repeatForInsert) { - // Hack to get the cursor to end up at the right place. If I is - // repeated in insert mode repeat, cursor will be 1 insert - // change set left of where it should be. - repeatCommand(); - } - repeatInsert(repeat); - } - vim.inputState = cachedInputState; - if (vim.insertMode && !repeatForInsert) { - // Don't exit insert mode twice. If repeatForInsert is set, then we - // were called by an exitInsertMode call lower on the stack. - exitInsertMode(cm); - } - macroModeState.inReplay = false; - }; - - function repeatLastInsertModeChanges(cm, repeat, macroModeState) { - var lastChange = macroModeState.lastInsertModeChanges; - function keyHandler(binding) { - if (typeof binding == 'string') { - CodeMirror.commands[binding](cm); - } else { - binding(cm); - } - return true; - } - for (var i = 0; i < repeat; i++) { - for (var j = 0; j < lastChange.changes.length; j++) { - var change = lastChange.changes[j]; - if (change instanceof InsertModeKey) { - CodeMirror.lookupKey(change.keyName, ['vim-insert'], keyHandler); - } else { - var cur = cm.getCursor(); - cm.replaceRange(change, cur, cur); - } - } - } - } - - resetVimGlobalState(); - return vimApi; - }; - // Initialize Vim and make it available as an API. - CodeMirror.Vim = Vim(); -} -)(); diff --git a/plugins/codemirror/codemirror/lib/codemirror.css b/plugins/codemirror/codemirror/lib/codemirror.css deleted file mode 100644 index 23eaf74..0000000 --- a/plugins/codemirror/codemirror/lib/codemirror.css +++ /dev/null @@ -1,263 +0,0 @@ -/* BASICS */ - -.CodeMirror { - /* Set height, width, borders, and global font properties here */ - font-family: monospace; - height: 300px; -} -.CodeMirror-scroll { - /* Set scrolling behaviour here */ - overflow: auto; -} - -/* PADDING */ - -.CodeMirror-lines { - padding: 4px 0; /* Vertical padding around content */ -} -.CodeMirror pre { - padding: 0 4px; /* Horizontal padding of content */ -} - -.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { - background-color: white; /* The little square between H and V scrollbars */ -} - -/* GUTTER */ - -.CodeMirror-gutters { - border-right: 1px solid #ddd; - background-color: #f7f7f7; - white-space: nowrap; -} -.CodeMirror-linenumbers {} -.CodeMirror-linenumber { - padding: 0 3px 0 5px; - min-width: 20px; - text-align: right; - color: #999; -} - -/* CURSOR */ - -.CodeMirror div.CodeMirror-cursor { - border-left: 1px solid black; - z-index: 3; -} -/* Shown when moving in bi-directional text */ -.CodeMirror div.CodeMirror-secondarycursor { - border-left: 1px solid silver; -} -.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor { - width: auto; - border: 0; - background: #7e7; - z-index: 1; -} -/* Can style cursor different in overwrite (non-insert) mode */ -.CodeMirror div.CodeMirror-cursor.CodeMirror-overwrite {} - -.cm-tab { display: inline-block; } - -/* DEFAULT THEME */ - -.cm-s-default .cm-keyword {color: #708;} -.cm-s-default .cm-atom {color: #219;} -.cm-s-default .cm-number {color: #164;} -.cm-s-default .cm-def {color: #00f;} -.cm-s-default .cm-variable {color: black;} -.cm-s-default .cm-variable-2 {color: #05a;} -.cm-s-default .cm-variable-3 {color: #085;} -.cm-s-default .cm-property {color: black;} -.cm-s-default .cm-operator {color: black;} -.cm-s-default .cm-comment {color: #a50;} -.cm-s-default .cm-string {color: #a11;} -.cm-s-default .cm-string-2 {color: #f50;} -.cm-s-default .cm-meta {color: #555;} -.cm-s-default .cm-qualifier {color: #555;} -.cm-s-default .cm-builtin {color: #30a;} -.cm-s-default .cm-bracket {color: #997;} -.cm-s-default .cm-tag {color: #170;} -.cm-s-default .cm-attribute {color: #00c;} -.cm-s-default .cm-header {color: blue;} -.cm-s-default .cm-quote {color: #090;} -.cm-s-default .cm-hr {color: #999;} -.cm-s-default .cm-link {color: #00c;} - -.cm-negative {color: #d44;} -.cm-positive {color: #292;} -.cm-header, .cm-strong {font-weight: bold;} -.cm-em {font-style: italic;} -.cm-link {text-decoration: underline;} - -.cm-s-default .cm-error {color: #f00;} -.cm-invalidchar {color: #f00;} - -div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;} -div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} -.CodeMirror-activeline-background {background: #e8f2ff;} - -/* STOP */ - -/* The rest of this file contains styles related to the mechanics of - the editor. You probably shouldn't touch them. */ - -.CodeMirror { - line-height: 1; - position: relative; - overflow: hidden; - background: white; - color: black; -} - -.CodeMirror-scroll { - /* 30px is the magic margin used to hide the element's real scrollbars */ - /* See overflow: hidden in .CodeMirror */ - margin-bottom: -30px; margin-right: -30px; - padding-bottom: 30px; padding-right: 30px; - height: 100%; - outline: none; /* Prevent dragging from highlighting the element */ - position: relative; - -moz-box-sizing: content-box; - box-sizing: content-box; -} -.CodeMirror-sizer { - position: relative; -} - -/* The fake, visible scrollbars. Used to force redraw during scrolling - before actuall scrolling happens, thus preventing shaking and - flickering artifacts. */ -.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { - position: absolute; - z-index: 6; - display: none; -} -.CodeMirror-vscrollbar { - right: 0; top: 0; - overflow-x: hidden; - overflow-y: scroll; -} -.CodeMirror-hscrollbar { - bottom: 0; left: 0; - overflow-y: hidden; - overflow-x: scroll; -} -.CodeMirror-scrollbar-filler { - right: 0; bottom: 0; -} -.CodeMirror-gutter-filler { - left: 0; bottom: 0; -} - -.CodeMirror-gutters { - position: absolute; left: 0; top: 0; - padding-bottom: 30px; - z-index: 3; -} -.CodeMirror-gutter { - white-space: normal; - height: 100%; - -moz-box-sizing: content-box; - box-sizing: content-box; - padding-bottom: 30px; - margin-bottom: -32px; - display: inline-block; - /* Hack to make IE7 behave */ - *zoom:1; - *display:inline; -} -.CodeMirror-gutter-elt { - position: absolute; - cursor: default; - z-index: 4; -} - -.CodeMirror-lines { - cursor: text; -} -.CodeMirror pre { - /* Reset some styles that the rest of the page might have set */ - -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; - border-width: 0; - background: transparent; - font-family: inherit; - font-size: inherit; - margin: 0; - white-space: pre; - word-wrap: normal; - line-height: inherit; - color: inherit; - z-index: 2; - position: relative; - overflow: visible; -} -.CodeMirror-wrap pre { - word-wrap: break-word; - white-space: pre-wrap; - word-break: normal; -} -.CodeMirror-code pre { - border-right: 30px solid transparent; - width: -webkit-fit-content; - width: -moz-fit-content; - width: fit-content; -} -.CodeMirror-wrap .CodeMirror-code pre { - border-right: none; - width: auto; -} -.CodeMirror-linebackground { - position: absolute; - left: 0; right: 0; top: 0; bottom: 0; - z-index: 0; -} - -.CodeMirror-linewidget { - position: relative; - z-index: 2; - overflow: auto; -} - -.CodeMirror-widget {} - -.CodeMirror-wrap .CodeMirror-scroll { - overflow-x: hidden; -} - -.CodeMirror-measure { - position: absolute; - width: 100%; - height: 0; - overflow: hidden; - visibility: hidden; -} -.CodeMirror-measure pre { position: static; } - -.CodeMirror div.CodeMirror-cursor { - position: absolute; - visibility: hidden; - border-right: none; - width: 0; -} -.CodeMirror-focused div.CodeMirror-cursor { - visibility: visible; -} - -.CodeMirror-selected { background: #d9d9d9; } -.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; } - -.cm-searching { - background: #ffa; - background: rgba(255, 255, 0, .4); -} - -/* IE7 hack to prevent it from returning funny offsetTops on the spans */ -.CodeMirror span { *vertical-align: text-bottom; } - -@media print { - /* Hide the cursor when printing */ - .CodeMirror div.CodeMirror-cursor { - visibility: hidden; - } -} diff --git a/plugins/codemirror/codemirror/lib/codemirror.js b/plugins/codemirror/codemirror/lib/codemirror.js deleted file mode 100644 index f8b2af5..0000000 --- a/plugins/codemirror/codemirror/lib/codemirror.js +++ /dev/null @@ -1,5944 +0,0 @@ -// CodeMirror version 3.20 -// -// CodeMirror is the only global var we claim -window.CodeMirror = (function() { - "use strict"; - - // BROWSER SNIFFING - - // Crude, but necessary to handle a number of hard-to-feature-detect - // bugs and behavior differences. - var gecko = /gecko\/\d/i.test(navigator.userAgent); - // IE11 currently doesn't count as 'ie', since it has almost none of - // the same bugs as earlier versions. Use ie_gt10 to handle - // incompatibilities in that version. - var ie = /MSIE \d/.test(navigator.userAgent); - var ie_lt8 = ie && (document.documentMode == null || document.documentMode < 8); - var ie_lt9 = ie && (document.documentMode == null || document.documentMode < 9); - var ie_gt10 = /Trident\/([7-9]|\d{2,})\./.test(navigator.userAgent); - var webkit = /WebKit\//.test(navigator.userAgent); - var qtwebkit = webkit && /Qt\/\d+\.\d+/.test(navigator.userAgent); - var chrome = /Chrome\//.test(navigator.userAgent); - var opera = /Opera\//.test(navigator.userAgent); - var safari = /Apple Computer/.test(navigator.vendor); - var khtml = /KHTML\//.test(navigator.userAgent); - var mac_geLion = /Mac OS X 1\d\D([7-9]|\d\d)\D/.test(navigator.userAgent); - var mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent); - var phantom = /PhantomJS/.test(navigator.userAgent); - - var ios = /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent); - // This is woefully incomplete. Suggestions for alternative methods welcome. - var mobile = ios || /Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent); - var mac = ios || /Mac/.test(navigator.platform); - var windows = /win/i.test(navigator.platform); - - var opera_version = opera && navigator.userAgent.match(/Version\/(\d*\.\d*)/); - if (opera_version) opera_version = Number(opera_version[1]); - if (opera_version && opera_version >= 15) { opera = false; webkit = true; } - // Some browsers use the wrong event properties to signal cmd/ctrl on OS X - var flipCtrlCmd = mac && (qtwebkit || opera && (opera_version == null || opera_version < 12.11)); - var captureMiddleClick = gecko || (ie && !ie_lt9); - - // Optimize some code when these features are not used - var sawReadOnlySpans = false, sawCollapsedSpans = false; - - // CONSTRUCTOR - - function CodeMirror(place, options) { - if (!(this instanceof CodeMirror)) return new CodeMirror(place, options); - - this.options = options = options || {}; - // Determine effective options based on given values and defaults. - for (var opt in defaults) if (!options.hasOwnProperty(opt) && defaults.hasOwnProperty(opt)) - options[opt] = defaults[opt]; - setGuttersForLineNumbers(options); - - var docStart = typeof options.value == "string" ? 0 : options.value.first; - var display = this.display = makeDisplay(place, docStart); - display.wrapper.CodeMirror = this; - updateGutters(this); - if (options.autofocus && !mobile) focusInput(this); - - this.state = {keyMaps: [], - overlays: [], - modeGen: 0, - overwrite: false, focused: false, - suppressEdits: false, pasteIncoming: false, - draggingText: false, - highlight: new Delayed()}; - - themeChanged(this); - if (options.lineWrapping) - this.display.wrapper.className += " CodeMirror-wrap"; - - var doc = options.value; - if (typeof doc == "string") doc = new Doc(options.value, options.mode); - operation(this, attachDoc)(this, doc); - - // Override magic textarea content restore that IE sometimes does - // on our hidden textarea on reload - if (ie) setTimeout(bind(resetInput, this, true), 20); - - registerEventHandlers(this); - // IE throws unspecified error in certain cases, when - // trying to access activeElement before onload - var hasFocus; try { hasFocus = (document.activeElement == display.input); } catch(e) { } - if (hasFocus || (options.autofocus && !mobile)) setTimeout(bind(onFocus, this), 20); - else onBlur(this); - - operation(this, function() { - for (var opt in optionHandlers) - if (optionHandlers.propertyIsEnumerable(opt)) - optionHandlers[opt](this, options[opt], Init); - for (var i = 0; i < initHooks.length; ++i) initHooks[i](this); - })(); - } - - // DISPLAY CONSTRUCTOR - - function makeDisplay(place, docStart) { - var d = {}; - - var input = d.input = elt("textarea", null, null, "position: absolute; padding: 0; width: 1px; height: 1em; outline: none; font-size: 4px;"); - if (webkit) input.style.width = "1000px"; - else input.setAttribute("wrap", "off"); - // if border: 0; -- iOS fails to open keyboard (issue #1287) - if (ios) input.style.border = "1px solid black"; - input.setAttribute("autocorrect", "off"); input.setAttribute("autocapitalize", "off"); input.setAttribute("spellcheck", "false"); - - // Wraps and hides input textarea - d.inputDiv = elt("div", [input], null, "overflow: hidden; position: relative; width: 3px; height: 0px;"); - // The actual fake scrollbars. - d.scrollbarH = elt("div", [elt("div", null, null, "height: 1px")], "CodeMirror-hscrollbar"); - d.scrollbarV = elt("div", [elt("div", null, null, "width: 1px")], "CodeMirror-vscrollbar"); - d.scrollbarFiller = elt("div", null, "CodeMirror-scrollbar-filler"); - d.gutterFiller = elt("div", null, "CodeMirror-gutter-filler"); - // DIVs containing the selection and the actual code - d.lineDiv = elt("div", null, "CodeMirror-code"); - d.selectionDiv = elt("div", null, null, "position: relative; z-index: 1"); - // Blinky cursor, and element used to ensure cursor fits at the end of a line - d.cursor = elt("div", "\u00a0", "CodeMirror-cursor"); - // Secondary cursor, shown when on a 'jump' in bi-directional text - d.otherCursor = elt("div", "\u00a0", "CodeMirror-cursor CodeMirror-secondarycursor"); - // Used to measure text size - d.measure = elt("div", null, "CodeMirror-measure"); - // Wraps everything that needs to exist inside the vertically-padded coordinate system - d.lineSpace = elt("div", [d.measure, d.selectionDiv, d.lineDiv, d.cursor, d.otherCursor], - null, "position: relative; outline: none"); - // Moved around its parent to cover visible view - d.mover = elt("div", [elt("div", [d.lineSpace], "CodeMirror-lines")], null, "position: relative"); - // Set to the height of the text, causes scrolling - d.sizer = elt("div", [d.mover], "CodeMirror-sizer"); - // D is needed because behavior of elts with overflow: auto and padding is inconsistent across browsers - d.heightForcer = elt("div", null, null, "position: absolute; height: " + scrollerCutOff + "px; width: 1px;"); - // Will contain the gutters, if any - d.gutters = elt("div", null, "CodeMirror-gutters"); - d.lineGutter = null; - // Provides scrolling - d.scroller = elt("div", [d.sizer, d.heightForcer, d.gutters], "CodeMirror-scroll"); - d.scroller.setAttribute("tabIndex", "-1"); - // The element in which the editor lives. - d.wrapper = elt("div", [d.inputDiv, d.scrollbarH, d.scrollbarV, - d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror"); - // Work around IE7 z-index bug - if (ie_lt8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; } - if (place.appendChild) place.appendChild(d.wrapper); else place(d.wrapper); - - // Needed to hide big blue blinking cursor on Mobile Safari - if (ios) input.style.width = "0px"; - if (!webkit) d.scroller.draggable = true; - // Needed to handle Tab key in KHTML - if (khtml) { d.inputDiv.style.height = "1px"; d.inputDiv.style.position = "absolute"; } - // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8). - else if (ie_lt8) d.scrollbarH.style.minWidth = d.scrollbarV.style.minWidth = "18px"; - - // Current visible range (may be bigger than the view window). - d.viewOffset = d.lastSizeC = 0; - d.showingFrom = d.showingTo = docStart; - - // Used to only resize the line number gutter when necessary (when - // the amount of lines crosses a boundary that makes its width change) - d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null; - // See readInput and resetInput - d.prevInput = ""; - // Set to true when a non-horizontal-scrolling widget is added. As - // an optimization, widget aligning is skipped when d is false. - d.alignWidgets = false; - // Flag that indicates whether we currently expect input to appear - // (after some event like 'keypress' or 'input') and are polling - // intensively. - d.pollingFast = false; - // Self-resetting timeout for the poller - d.poll = new Delayed(); - - d.cachedCharWidth = d.cachedTextHeight = null; - d.measureLineCache = []; - d.measureLineCachePos = 0; - - // Tracks when resetInput has punted to just putting a short - // string instead of the (large) selection. - d.inaccurateSelection = false; - - // Tracks the maximum line length so that the horizontal scrollbar - // can be kept static when scrolling. - d.maxLine = null; - d.maxLineLength = 0; - d.maxLineChanged = false; - - // Used for measuring wheel scrolling granularity - d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null; - - return d; - } - - // STATE UPDATES - - // Used to get the editor into a consistent state again when options change. - - function loadMode(cm) { - cm.doc.mode = CodeMirror.getMode(cm.options, cm.doc.modeOption); - cm.doc.iter(function(line) { - if (line.stateAfter) line.stateAfter = null; - if (line.styles) line.styles = null; - }); - cm.doc.frontier = cm.doc.first; - startWorker(cm, 100); - cm.state.modeGen++; - if (cm.curOp) regChange(cm); - } - - function wrappingChanged(cm) { - if (cm.options.lineWrapping) { - cm.display.wrapper.className += " CodeMirror-wrap"; - cm.display.sizer.style.minWidth = ""; - } else { - cm.display.wrapper.className = cm.display.wrapper.className.replace(" CodeMirror-wrap", ""); - computeMaxLength(cm); - } - estimateLineHeights(cm); - regChange(cm); - clearCaches(cm); - setTimeout(function(){updateScrollbars(cm);}, 100); - } - - function estimateHeight(cm) { - var th = textHeight(cm.display), wrapping = cm.options.lineWrapping; - var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3); - return function(line) { - if (lineIsHidden(cm.doc, line)) - return 0; - else if (wrapping) - return (Math.ceil(line.text.length / perLine) || 1) * th; - else - return th; - }; - } - - function estimateLineHeights(cm) { - var doc = cm.doc, est = estimateHeight(cm); - doc.iter(function(line) { - var estHeight = est(line); - if (estHeight != line.height) updateLineHeight(line, estHeight); - }); - } - - function keyMapChanged(cm) { - var map = keyMap[cm.options.keyMap], style = map.style; - cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-keymap-\S+/g, "") + - (style ? " cm-keymap-" + style : ""); - cm.state.disableInput = map.disableInput; - } - - function themeChanged(cm) { - cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") + - cm.options.theme.replace(/(^|\s)\s*/g, " cm-s-"); - clearCaches(cm); - } - - function guttersChanged(cm) { - updateGutters(cm); - regChange(cm); - setTimeout(function(){alignHorizontally(cm);}, 20); - } - - function updateGutters(cm) { - var gutters = cm.display.gutters, specs = cm.options.gutters; - removeChildren(gutters); - for (var i = 0; i < specs.length; ++i) { - var gutterClass = specs[i]; - var gElt = gutters.appendChild(elt("div", null, "CodeMirror-gutter " + gutterClass)); - if (gutterClass == "CodeMirror-linenumbers") { - cm.display.lineGutter = gElt; - gElt.style.width = (cm.display.lineNumWidth || 1) + "px"; - } - } - gutters.style.display = i ? "" : "none"; - } - - function lineLength(doc, line) { - if (line.height == 0) return 0; - var len = line.text.length, merged, cur = line; - while (merged = collapsedSpanAtStart(cur)) { - var found = merged.find(); - cur = getLine(doc, found.from.line); - len += found.from.ch - found.to.ch; - } - cur = line; - while (merged = collapsedSpanAtEnd(cur)) { - var found = merged.find(); - len -= cur.text.length - found.from.ch; - cur = getLine(doc, found.to.line); - len += cur.text.length - found.to.ch; - } - return len; - } - - function computeMaxLength(cm) { - var d = cm.display, doc = cm.doc; - d.maxLine = getLine(doc, doc.first); - d.maxLineLength = lineLength(doc, d.maxLine); - d.maxLineChanged = true; - doc.iter(function(line) { - var len = lineLength(doc, line); - if (len > d.maxLineLength) { - d.maxLineLength = len; - d.maxLine = line; - } - }); - } - - // Make sure the gutters options contains the element - // "CodeMirror-linenumbers" when the lineNumbers option is true. - function setGuttersForLineNumbers(options) { - var found = indexOf(options.gutters, "CodeMirror-linenumbers"); - if (found == -1 && options.lineNumbers) { - options.gutters = options.gutters.concat(["CodeMirror-linenumbers"]); - } else if (found > -1 && !options.lineNumbers) { - options.gutters = options.gutters.slice(0); - options.gutters.splice(found, 1); - } - } - - // SCROLLBARS - - // Re-synchronize the fake scrollbars with the actual size of the - // content. Optionally force a scrollTop. - function updateScrollbars(cm) { - var d = cm.display, docHeight = cm.doc.height; - var totalHeight = docHeight + paddingVert(d); - d.sizer.style.minHeight = d.heightForcer.style.top = totalHeight + "px"; - d.gutters.style.height = Math.max(totalHeight, d.scroller.clientHeight - scrollerCutOff) + "px"; - var scrollHeight = Math.max(totalHeight, d.scroller.scrollHeight); - var needsH = d.scroller.scrollWidth > (d.scroller.clientWidth + 1); - var needsV = scrollHeight > (d.scroller.clientHeight + 1); - if (needsV) { - d.scrollbarV.style.display = "block"; - d.scrollbarV.style.bottom = needsH ? scrollbarWidth(d.measure) + "px" : "0"; - d.scrollbarV.firstChild.style.height = - (scrollHeight - d.scroller.clientHeight + d.scrollbarV.clientHeight) + "px"; - } else { - d.scrollbarV.style.display = ""; - d.scrollbarV.firstChild.style.height = "0"; - } - if (needsH) { - d.scrollbarH.style.display = "block"; - d.scrollbarH.style.right = needsV ? scrollbarWidth(d.measure) + "px" : "0"; - d.scrollbarH.firstChild.style.width = - (d.scroller.scrollWidth - d.scroller.clientWidth + d.scrollbarH.clientWidth) + "px"; - } else { - d.scrollbarH.style.display = ""; - d.scrollbarH.firstChild.style.width = "0"; - } - if (needsH && needsV) { - d.scrollbarFiller.style.display = "block"; - d.scrollbarFiller.style.height = d.scrollbarFiller.style.width = scrollbarWidth(d.measure) + "px"; - } else d.scrollbarFiller.style.display = ""; - if (needsH && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) { - d.gutterFiller.style.display = "block"; - d.gutterFiller.style.height = scrollbarWidth(d.measure) + "px"; - d.gutterFiller.style.width = d.gutters.offsetWidth + "px"; - } else d.gutterFiller.style.display = ""; - - if (mac_geLion && scrollbarWidth(d.measure) === 0) { - d.scrollbarV.style.minWidth = d.scrollbarH.style.minHeight = mac_geMountainLion ? "18px" : "12px"; - d.scrollbarV.style.pointerEvents = d.scrollbarH.style.pointerEvents = "none"; - } - } - - function visibleLines(display, doc, viewPort) { - var top = display.scroller.scrollTop, height = display.wrapper.clientHeight; - if (typeof viewPort == "number") top = viewPort; - else if (viewPort) {top = viewPort.top; height = viewPort.bottom - viewPort.top;} - top = Math.floor(top - paddingTop(display)); - var bottom = Math.ceil(top + height); - return {from: lineAtHeight(doc, top), to: lineAtHeight(doc, bottom)}; - } - - // LINE NUMBERS - - function alignHorizontally(cm) { - var display = cm.display; - if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) return; - var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft; - var gutterW = display.gutters.offsetWidth, l = comp + "px"; - for (var n = display.lineDiv.firstChild; n; n = n.nextSibling) if (n.alignable) { - for (var i = 0, a = n.alignable; i < a.length; ++i) a[i].style.left = l; - } - if (cm.options.fixedGutter) - display.gutters.style.left = (comp + gutterW) + "px"; - } - - function maybeUpdateLineNumberWidth(cm) { - if (!cm.options.lineNumbers) return false; - var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display; - if (last.length != display.lineNumChars) { - var test = display.measure.appendChild(elt("div", [elt("div", last)], - "CodeMirror-linenumber CodeMirror-gutter-elt")); - var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW; - display.lineGutter.style.width = ""; - display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding); - display.lineNumWidth = display.lineNumInnerWidth + padding; - display.lineNumChars = display.lineNumInnerWidth ? last.length : -1; - display.lineGutter.style.width = display.lineNumWidth + "px"; - return true; - } - return false; - } - - function lineNumberFor(options, i) { - return String(options.lineNumberFormatter(i + options.firstLineNumber)); - } - function compensateForHScroll(display) { - return getRect(display.scroller).left - getRect(display.sizer).left; - } - - // DISPLAY DRAWING - - function updateDisplay(cm, changes, viewPort, forced) { - var oldFrom = cm.display.showingFrom, oldTo = cm.display.showingTo, updated; - var visible = visibleLines(cm.display, cm.doc, viewPort); - for (var first = true;; first = false) { - var oldWidth = cm.display.scroller.clientWidth; - if (!updateDisplayInner(cm, changes, visible, forced)) break; - updated = true; - changes = []; - updateSelection(cm); - updateScrollbars(cm); - if (first && cm.options.lineWrapping && oldWidth != cm.display.scroller.clientWidth) { - forced = true; - continue; - } - forced = false; - - // Clip forced viewport to actual scrollable area - if (viewPort) - viewPort = Math.min(cm.display.scroller.scrollHeight - cm.display.scroller.clientHeight, - typeof viewPort == "number" ? viewPort : viewPort.top); - visible = visibleLines(cm.display, cm.doc, viewPort); - if (visible.from >= cm.display.showingFrom && visible.to <= cm.display.showingTo) - break; - } - - if (updated) { - signalLater(cm, "update", cm); - if (cm.display.showingFrom != oldFrom || cm.display.showingTo != oldTo) - signalLater(cm, "viewportChange", cm, cm.display.showingFrom, cm.display.showingTo); - } - return updated; - } - - // Uses a set of changes plus the current scroll position to - // determine which DOM updates have to be made, and makes the - // updates. - function updateDisplayInner(cm, changes, visible, forced) { - var display = cm.display, doc = cm.doc; - if (!display.wrapper.clientWidth) { - display.showingFrom = display.showingTo = doc.first; - display.viewOffset = 0; - return; - } - - // Bail out if the visible area is already rendered and nothing changed. - if (!forced && changes.length == 0 && - visible.from > display.showingFrom && visible.to < display.showingTo) - return; - - if (maybeUpdateLineNumberWidth(cm)) - changes = [{from: doc.first, to: doc.first + doc.size}]; - var gutterW = display.sizer.style.marginLeft = display.gutters.offsetWidth + "px"; - display.scrollbarH.style.left = cm.options.fixedGutter ? gutterW : "0"; - - // Used to determine which lines need their line numbers updated - var positionsChangedFrom = Infinity; - if (cm.options.lineNumbers) - for (var i = 0; i < changes.length; ++i) - if (changes[i].diff && changes[i].from < positionsChangedFrom) { positionsChangedFrom = changes[i].from; } - - var end = doc.first + doc.size; - var from = Math.max(visible.from - cm.options.viewportMargin, doc.first); - var to = Math.min(end, visible.to + cm.options.viewportMargin); - if (display.showingFrom < from && from - display.showingFrom < 20) from = Math.max(doc.first, display.showingFrom); - if (display.showingTo > to && display.showingTo - to < 20) to = Math.min(end, display.showingTo); - if (sawCollapsedSpans) { - from = lineNo(visualLine(doc, getLine(doc, from))); - while (to < end && lineIsHidden(doc, getLine(doc, to))) ++to; - } - - // Create a range of theoretically intact lines, and punch holes - // in that using the change info. - var intact = [{from: Math.max(display.showingFrom, doc.first), - to: Math.min(display.showingTo, end)}]; - if (intact[0].from >= intact[0].to) intact = []; - else intact = computeIntact(intact, changes); - // When merged lines are present, we might have to reduce the - // intact ranges because changes in continued fragments of the - // intact lines do require the lines to be redrawn. - if (sawCollapsedSpans) - for (var i = 0; i < intact.length; ++i) { - var range = intact[i], merged; - while (merged = collapsedSpanAtEnd(getLine(doc, range.to - 1))) { - var newTo = merged.find().from.line; - if (newTo > range.from) range.to = newTo; - else { intact.splice(i--, 1); break; } - } - } - - // Clip off the parts that won't be visible - var intactLines = 0; - for (var i = 0; i < intact.length; ++i) { - var range = intact[i]; - if (range.from < from) range.from = from; - if (range.to > to) range.to = to; - if (range.from >= range.to) intact.splice(i--, 1); - else intactLines += range.to - range.from; - } - if (!forced && intactLines == to - from && from == display.showingFrom && to == display.showingTo) { - updateViewOffset(cm); - return; - } - intact.sort(function(a, b) {return a.from - b.from;}); - - // Avoid crashing on IE's "unspecified error" when in iframes - try { - var focused = document.activeElement; - } catch(e) {} - if (intactLines < (to - from) * .7) display.lineDiv.style.display = "none"; - patchDisplay(cm, from, to, intact, positionsChangedFrom); - display.lineDiv.style.display = ""; - if (focused && document.activeElement != focused && focused.offsetHeight) focused.focus(); - - var different = from != display.showingFrom || to != display.showingTo || - display.lastSizeC != display.wrapper.clientHeight; - // This is just a bogus formula that detects when the editor is - // resized or the font size changes. - if (different) { - display.lastSizeC = display.wrapper.clientHeight; - startWorker(cm, 400); - } - display.showingFrom = from; display.showingTo = to; - - updateHeightsInViewport(cm); - updateViewOffset(cm); - - return true; - } - - function updateHeightsInViewport(cm) { - var display = cm.display; - var prevBottom = display.lineDiv.offsetTop; - for (var node = display.lineDiv.firstChild, height; node; node = node.nextSibling) if (node.lineObj) { - if (ie_lt8) { - var bot = node.offsetTop + node.offsetHeight; - height = bot - prevBottom; - prevBottom = bot; - } else { - var box = getRect(node); - height = box.bottom - box.top; - } - var diff = node.lineObj.height - height; - if (height < 2) height = textHeight(display); - if (diff > .001 || diff < -.001) { - updateLineHeight(node.lineObj, height); - var widgets = node.lineObj.widgets; - if (widgets) for (var i = 0; i < widgets.length; ++i) - widgets[i].height = widgets[i].node.offsetHeight; - } - } - } - - function updateViewOffset(cm) { - var off = cm.display.viewOffset = heightAtLine(cm, getLine(cm.doc, cm.display.showingFrom)); - // Position the mover div to align with the current virtual scroll position - cm.display.mover.style.top = off + "px"; - } - - function computeIntact(intact, changes) { - for (var i = 0, l = changes.length || 0; i < l; ++i) { - var change = changes[i], intact2 = [], diff = change.diff || 0; - for (var j = 0, l2 = intact.length; j < l2; ++j) { - var range = intact[j]; - if (change.to <= range.from && change.diff) { - intact2.push({from: range.from + diff, to: range.to + diff}); - } else if (change.to <= range.from || change.from >= range.to) { - intact2.push(range); - } else { - if (change.from > range.from) - intact2.push({from: range.from, to: change.from}); - if (change.to < range.to) - intact2.push({from: change.to + diff, to: range.to + diff}); - } - } - intact = intact2; - } - return intact; - } - - function getDimensions(cm) { - var d = cm.display, left = {}, width = {}; - for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) { - left[cm.options.gutters[i]] = n.offsetLeft; - width[cm.options.gutters[i]] = n.offsetWidth; - } - return {fixedPos: compensateForHScroll(d), - gutterTotalWidth: d.gutters.offsetWidth, - gutterLeft: left, - gutterWidth: width, - wrapperWidth: d.wrapper.clientWidth}; - } - - function patchDisplay(cm, from, to, intact, updateNumbersFrom) { - var dims = getDimensions(cm); - var display = cm.display, lineNumbers = cm.options.lineNumbers; - if (!intact.length && (!webkit || !cm.display.currentWheelTarget)) - removeChildren(display.lineDiv); - var container = display.lineDiv, cur = container.firstChild; - - function rm(node) { - var next = node.nextSibling; - if (webkit && mac && cm.display.currentWheelTarget == node) { - node.style.display = "none"; - node.lineObj = null; - } else { - node.parentNode.removeChild(node); - } - return next; - } - - var nextIntact = intact.shift(), lineN = from; - cm.doc.iter(from, to, function(line) { - if (nextIntact && nextIntact.to == lineN) nextIntact = intact.shift(); - if (lineIsHidden(cm.doc, line)) { - if (line.height != 0) updateLineHeight(line, 0); - if (line.widgets && cur && cur.previousSibling) for (var i = 0; i < line.widgets.length; ++i) { - var w = line.widgets[i]; - if (w.showIfHidden) { - var prev = cur.previousSibling; - if (/pre/i.test(prev.nodeName)) { - var wrap = elt("div", null, null, "position: relative"); - prev.parentNode.replaceChild(wrap, prev); - wrap.appendChild(prev); - prev = wrap; - } - var wnode = prev.appendChild(elt("div", [w.node], "CodeMirror-linewidget")); - if (!w.handleMouseEvents) wnode.ignoreEvents = true; - positionLineWidget(w, wnode, prev, dims); - } - } - } else if (nextIntact && nextIntact.from <= lineN && nextIntact.to > lineN) { - // This line is intact. Skip to the actual node. Update its - // line number if needed. - while (cur.lineObj != line) cur = rm(cur); - if (lineNumbers && updateNumbersFrom <= lineN && cur.lineNumber) - setTextContent(cur.lineNumber, lineNumberFor(cm.options, lineN)); - cur = cur.nextSibling; - } else { - // For lines with widgets, make an attempt to find and reuse - // the existing element, so that widgets aren't needlessly - // removed and re-inserted into the dom - if (line.widgets) for (var j = 0, search = cur, reuse; search && j < 20; ++j, search = search.nextSibling) - if (search.lineObj == line && /div/i.test(search.nodeName)) { reuse = search; break; } - // This line needs to be generated. - var lineNode = buildLineElement(cm, line, lineN, dims, reuse); - if (lineNode != reuse) { - container.insertBefore(lineNode, cur); - } else { - while (cur != reuse) cur = rm(cur); - cur = cur.nextSibling; - } - - lineNode.lineObj = line; - } - ++lineN; - }); - while (cur) cur = rm(cur); - } - - function buildLineElement(cm, line, lineNo, dims, reuse) { - var built = buildLineContent(cm, line), lineElement = built.pre; - var markers = line.gutterMarkers, display = cm.display, wrap; - - var bgClass = built.bgClass ? built.bgClass + " " + (line.bgClass || "") : line.bgClass; - if (!cm.options.lineNumbers && !markers && !bgClass && !line.wrapClass && !line.widgets) - return lineElement; - - // Lines with gutter elements, widgets or a background class need - // to be wrapped again, and have the extra elements added to the - // wrapper div - - if (reuse) { - reuse.alignable = null; - var isOk = true, widgetsSeen = 0, insertBefore = null; - for (var n = reuse.firstChild, next; n; n = next) { - next = n.nextSibling; - if (!/\bCodeMirror-linewidget\b/.test(n.className)) { - reuse.removeChild(n); - } else { - for (var i = 0; i < line.widgets.length; ++i) { - var widget = line.widgets[i]; - if (widget.node == n.firstChild) { - if (!widget.above && !insertBefore) insertBefore = n; - positionLineWidget(widget, n, reuse, dims); - ++widgetsSeen; - break; - } - } - if (i == line.widgets.length) { isOk = false; break; } - } - } - reuse.insertBefore(lineElement, insertBefore); - if (isOk && widgetsSeen == line.widgets.length) { - wrap = reuse; - reuse.className = line.wrapClass || ""; - } - } - if (!wrap) { - wrap = elt("div", null, line.wrapClass, "position: relative"); - wrap.appendChild(lineElement); - } - // Kludge to make sure the styled element lies behind the selection (by z-index) - if (bgClass) - wrap.insertBefore(elt("div", null, bgClass + " CodeMirror-linebackground"), wrap.firstChild); - if (cm.options.lineNumbers || markers) { - var gutterWrap = wrap.insertBefore(elt("div", null, null, "position: absolute; left: " + - (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px"), - wrap.firstChild); - if (cm.options.fixedGutter) (wrap.alignable || (wrap.alignable = [])).push(gutterWrap); - if (cm.options.lineNumbers && (!markers || !markers["CodeMirror-linenumbers"])) - wrap.lineNumber = gutterWrap.appendChild( - elt("div", lineNumberFor(cm.options, lineNo), - "CodeMirror-linenumber CodeMirror-gutter-elt", - "left: " + dims.gutterLeft["CodeMirror-linenumbers"] + "px; width: " - + display.lineNumInnerWidth + "px")); - if (markers) - for (var k = 0; k < cm.options.gutters.length; ++k) { - var id = cm.options.gutters[k], found = markers.hasOwnProperty(id) && markers[id]; - if (found) - gutterWrap.appendChild(elt("div", [found], "CodeMirror-gutter-elt", "left: " + - dims.gutterLeft[id] + "px; width: " + dims.gutterWidth[id] + "px")); - } - } - if (ie_lt8) wrap.style.zIndex = 2; - if (line.widgets && wrap != reuse) for (var i = 0, ws = line.widgets; i < ws.length; ++i) { - var widget = ws[i], node = elt("div", [widget.node], "CodeMirror-linewidget"); - if (!widget.handleMouseEvents) node.ignoreEvents = true; - positionLineWidget(widget, node, wrap, dims); - if (widget.above) - wrap.insertBefore(node, cm.options.lineNumbers && line.height != 0 ? gutterWrap : lineElement); - else - wrap.appendChild(node); - signalLater(widget, "redraw"); - } - return wrap; - } - - function positionLineWidget(widget, node, wrap, dims) { - if (widget.noHScroll) { - (wrap.alignable || (wrap.alignable = [])).push(node); - var width = dims.wrapperWidth; - node.style.left = dims.fixedPos + "px"; - if (!widget.coverGutter) { - width -= dims.gutterTotalWidth; - node.style.paddingLeft = dims.gutterTotalWidth + "px"; - } - node.style.width = width + "px"; - } - if (widget.coverGutter) { - node.style.zIndex = 5; - node.style.position = "relative"; - if (!widget.noHScroll) node.style.marginLeft = -dims.gutterTotalWidth + "px"; - } - } - - // SELECTION / CURSOR - - function updateSelection(cm) { - var display = cm.display; - var collapsed = posEq(cm.doc.sel.from, cm.doc.sel.to); - if (collapsed || cm.options.showCursorWhenSelecting) - updateSelectionCursor(cm); - else - display.cursor.style.display = display.otherCursor.style.display = "none"; - if (!collapsed) - updateSelectionRange(cm); - else - display.selectionDiv.style.display = "none"; - - // Move the hidden textarea near the cursor to prevent scrolling artifacts - if (cm.options.moveInputWithCursor) { - var headPos = cursorCoords(cm, cm.doc.sel.head, "div"); - var wrapOff = getRect(display.wrapper), lineOff = getRect(display.lineDiv); - display.inputDiv.style.top = Math.max(0, Math.min(display.wrapper.clientHeight - 10, - headPos.top + lineOff.top - wrapOff.top)) + "px"; - display.inputDiv.style.left = Math.max(0, Math.min(display.wrapper.clientWidth - 10, - headPos.left + lineOff.left - wrapOff.left)) + "px"; - } - } - - // No selection, plain cursor - function updateSelectionCursor(cm) { - var display = cm.display, pos = cursorCoords(cm, cm.doc.sel.head, "div"); - display.cursor.style.left = pos.left + "px"; - display.cursor.style.top = pos.top + "px"; - display.cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + "px"; - display.cursor.style.display = ""; - - if (pos.other) { - display.otherCursor.style.display = ""; - display.otherCursor.style.left = pos.other.left + "px"; - display.otherCursor.style.top = pos.other.top + "px"; - display.otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + "px"; - } else { display.otherCursor.style.display = "none"; } - } - - // Highlight selection - function updateSelectionRange(cm) { - var display = cm.display, doc = cm.doc, sel = cm.doc.sel; - var fragment = document.createDocumentFragment(); - var clientWidth = display.lineSpace.offsetWidth, pl = paddingLeft(cm.display); - - function add(left, top, width, bottom) { - if (top < 0) top = 0; - fragment.appendChild(elt("div", null, "CodeMirror-selected", "position: absolute; left: " + left + - "px; top: " + top + "px; width: " + (width == null ? clientWidth - left : width) + - "px; height: " + (bottom - top) + "px")); - } - - function drawForLine(line, fromArg, toArg) { - var lineObj = getLine(doc, line); - var lineLen = lineObj.text.length; - var start, end; - function coords(ch, bias) { - return charCoords(cm, Pos(line, ch), "div", lineObj, bias); - } - - iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function(from, to, dir) { - var leftPos = coords(from, "left"), rightPos, left, right; - if (from == to) { - rightPos = leftPos; - left = right = leftPos.left; - } else { - rightPos = coords(to - 1, "right"); - if (dir == "rtl") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; } - left = leftPos.left; - right = rightPos.right; - } - if (fromArg == null && from == 0) left = pl; - if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part - add(left, leftPos.top, null, leftPos.bottom); - left = pl; - if (leftPos.bottom < rightPos.top) add(left, leftPos.bottom, null, rightPos.top); - } - if (toArg == null && to == lineLen) right = clientWidth; - if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left) - start = leftPos; - if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right) - end = rightPos; - if (left < pl + 1) left = pl; - add(left, rightPos.top, right - left, rightPos.bottom); - }); - return {start: start, end: end}; - } - - if (sel.from.line == sel.to.line) { - drawForLine(sel.from.line, sel.from.ch, sel.to.ch); - } else { - var fromLine = getLine(doc, sel.from.line), toLine = getLine(doc, sel.to.line); - var singleVLine = visualLine(doc, fromLine) == visualLine(doc, toLine); - var leftEnd = drawForLine(sel.from.line, sel.from.ch, singleVLine ? fromLine.text.length : null).end; - var rightStart = drawForLine(sel.to.line, singleVLine ? 0 : null, sel.to.ch).start; - if (singleVLine) { - if (leftEnd.top < rightStart.top - 2) { - add(leftEnd.right, leftEnd.top, null, leftEnd.bottom); - add(pl, rightStart.top, rightStart.left, rightStart.bottom); - } else { - add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom); - } - } - if (leftEnd.bottom < rightStart.top) - add(pl, leftEnd.bottom, null, rightStart.top); - } - - removeChildrenAndAdd(display.selectionDiv, fragment); - display.selectionDiv.style.display = ""; - } - - // Cursor-blinking - function restartBlink(cm) { - if (!cm.state.focused) return; - var display = cm.display; - clearInterval(display.blinker); - var on = true; - display.cursor.style.visibility = display.otherCursor.style.visibility = ""; - if (cm.options.cursorBlinkRate > 0) - display.blinker = setInterval(function() { - display.cursor.style.visibility = display.otherCursor.style.visibility = (on = !on) ? "" : "hidden"; - }, cm.options.cursorBlinkRate); - } - - // HIGHLIGHT WORKER - - function startWorker(cm, time) { - if (cm.doc.mode.startState && cm.doc.frontier < cm.display.showingTo) - cm.state.highlight.set(time, bind(highlightWorker, cm)); - } - - function highlightWorker(cm) { - var doc = cm.doc; - if (doc.frontier < doc.first) doc.frontier = doc.first; - if (doc.frontier >= cm.display.showingTo) return; - var end = +new Date + cm.options.workTime; - var state = copyState(doc.mode, getStateBefore(cm, doc.frontier)); - var changed = [], prevChange; - doc.iter(doc.frontier, Math.min(doc.first + doc.size, cm.display.showingTo + 500), function(line) { - if (doc.frontier >= cm.display.showingFrom) { // Visible - var oldStyles = line.styles; - line.styles = highlightLine(cm, line, state, true); - var ischange = !oldStyles || oldStyles.length != line.styles.length; - for (var i = 0; !ischange && i < oldStyles.length; ++i) ischange = oldStyles[i] != line.styles[i]; - if (ischange) { - if (prevChange && prevChange.end == doc.frontier) prevChange.end++; - else changed.push(prevChange = {start: doc.frontier, end: doc.frontier + 1}); - } - line.stateAfter = copyState(doc.mode, state); - } else { - processLine(cm, line.text, state); - line.stateAfter = doc.frontier % 5 == 0 ? copyState(doc.mode, state) : null; - } - ++doc.frontier; - if (+new Date > end) { - startWorker(cm, cm.options.workDelay); - return true; - } - }); - if (changed.length) - operation(cm, function() { - for (var i = 0; i < changed.length; ++i) - regChange(this, changed[i].start, changed[i].end); - })(); - } - - // Finds the line to start with when starting a parse. Tries to - // find a line with a stateAfter, so that it can start with a - // valid state. If that fails, it returns the line with the - // smallest indentation, which tends to need the least context to - // parse correctly. - function findStartLine(cm, n, precise) { - var minindent, minline, doc = cm.doc; - var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100); - for (var search = n; search > lim; --search) { - if (search <= doc.first) return doc.first; - var line = getLine(doc, search - 1); - if (line.stateAfter && (!precise || search <= doc.frontier)) return search; - var indented = countColumn(line.text, null, cm.options.tabSize); - if (minline == null || minindent > indented) { - minline = search - 1; - minindent = indented; - } - } - return minline; - } - - function getStateBefore(cm, n, precise) { - var doc = cm.doc, display = cm.display; - if (!doc.mode.startState) return true; - var pos = findStartLine(cm, n, precise), state = pos > doc.first && getLine(doc, pos-1).stateAfter; - if (!state) state = startState(doc.mode); - else state = copyState(doc.mode, state); - doc.iter(pos, n, function(line) { - processLine(cm, line.text, state); - var save = pos == n - 1 || pos % 5 == 0 || pos >= display.showingFrom && pos < display.showingTo; - line.stateAfter = save ? copyState(doc.mode, state) : null; - ++pos; - }); - if (precise) doc.frontier = pos; - return state; - } - - // POSITION MEASUREMENT - - function paddingTop(display) {return display.lineSpace.offsetTop;} - function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight;} - function paddingLeft(display) { - var e = removeChildrenAndAdd(display.measure, elt("pre", null, null, "text-align: left")).appendChild(elt("span", "x")); - return e.offsetLeft; - } - - function measureChar(cm, line, ch, data, bias) { - var dir = -1; - data = data || measureLine(cm, line); - if (data.crude) { - var left = data.left + ch * data.width; - return {left: left, right: left + data.width, top: data.top, bottom: data.bottom}; - } - - for (var pos = ch;; pos += dir) { - var r = data[pos]; - if (r) break; - if (dir < 0 && pos == 0) dir = 1; - } - bias = pos > ch ? "left" : pos < ch ? "right" : bias; - if (bias == "left" && r.leftSide) r = r.leftSide; - else if (bias == "right" && r.rightSide) r = r.rightSide; - return {left: pos < ch ? r.right : r.left, - right: pos > ch ? r.left : r.right, - top: r.top, - bottom: r.bottom}; - } - - function findCachedMeasurement(cm, line) { - var cache = cm.display.measureLineCache; - for (var i = 0; i < cache.length; ++i) { - var memo = cache[i]; - if (memo.text == line.text && memo.markedSpans == line.markedSpans && - cm.display.scroller.clientWidth == memo.width && - memo.classes == line.textClass + "|" + line.wrapClass) - return memo; - } - } - - function clearCachedMeasurement(cm, line) { - var exists = findCachedMeasurement(cm, line); - if (exists) exists.text = exists.measure = exists.markedSpans = null; - } - - function measureLine(cm, line) { - // First look in the cache - var cached = findCachedMeasurement(cm, line); - if (cached) return cached.measure; - - // Failing that, recompute and store result in cache - var measure = measureLineInner(cm, line); - var cache = cm.display.measureLineCache; - var memo = {text: line.text, width: cm.display.scroller.clientWidth, - markedSpans: line.markedSpans, measure: measure, - classes: line.textClass + "|" + line.wrapClass}; - if (cache.length == 16) cache[++cm.display.measureLineCachePos % 16] = memo; - else cache.push(memo); - return measure; - } - - function measureLineInner(cm, line) { - if (!cm.options.lineWrapping && line.text.length >= cm.options.crudeMeasuringFrom) - return crudelyMeasureLine(cm, line); - - var display = cm.display, measure = emptyArray(line.text.length); - var pre = buildLineContent(cm, line, measure, true).pre; - - // IE does not cache element positions of inline elements between - // calls to getBoundingClientRect. This makes the loop below, - // which gathers the positions of all the characters on the line, - // do an amount of layout work quadratic to the number of - // characters. When line wrapping is off, we try to improve things - // by first subdividing the line into a bunch of inline blocks, so - // that IE can reuse most of the layout information from caches - // for those blocks. This does interfere with line wrapping, so it - // doesn't work when wrapping is on, but in that case the - // situation is slightly better, since IE does cache line-wrapping - // information and only recomputes per-line. - if (ie && !ie_lt8 && !cm.options.lineWrapping && pre.childNodes.length > 100) { - var fragment = document.createDocumentFragment(); - var chunk = 10, n = pre.childNodes.length; - for (var i = 0, chunks = Math.ceil(n / chunk); i < chunks; ++i) { - var wrap = elt("div", null, null, "display: inline-block"); - for (var j = 0; j < chunk && n; ++j) { - wrap.appendChild(pre.firstChild); - --n; - } - fragment.appendChild(wrap); - } - pre.appendChild(fragment); - } - - removeChildrenAndAdd(display.measure, pre); - - var outer = getRect(display.lineDiv); - var vranges = [], data = emptyArray(line.text.length), maxBot = pre.offsetHeight; - // Work around an IE7/8 bug where it will sometimes have randomly - // replaced our pre with a clone at this point. - if (ie_lt9 && display.measure.first != pre) - removeChildrenAndAdd(display.measure, pre); - - function measureRect(rect) { - var top = rect.top - outer.top, bot = rect.bottom - outer.top; - if (bot > maxBot) bot = maxBot; - if (top < 0) top = 0; - for (var i = vranges.length - 2; i >= 0; i -= 2) { - var rtop = vranges[i], rbot = vranges[i+1]; - if (rtop > bot || rbot < top) continue; - if (rtop <= top && rbot >= bot || - top <= rtop && bot >= rbot || - Math.min(bot, rbot) - Math.max(top, rtop) >= (bot - top) >> 1) { - vranges[i] = Math.min(top, rtop); - vranges[i+1] = Math.max(bot, rbot); - break; - } - } - if (i < 0) { i = vranges.length; vranges.push(top, bot); } - return {left: rect.left - outer.left, - right: rect.right - outer.left, - top: i, bottom: null}; - } - function finishRect(rect) { - rect.bottom = vranges[rect.top+1]; - rect.top = vranges[rect.top]; - } - - for (var i = 0, cur; i < measure.length; ++i) if (cur = measure[i]) { - var node = cur, rect = null; - // A widget might wrap, needs special care - if (/\bCodeMirror-widget\b/.test(cur.className) && cur.getClientRects) { - if (cur.firstChild.nodeType == 1) node = cur.firstChild; - var rects = node.getClientRects(); - if (rects.length > 1) { - rect = data[i] = measureRect(rects[0]); - rect.rightSide = measureRect(rects[rects.length - 1]); - } - } - if (!rect) rect = data[i] = measureRect(getRect(node)); - if (cur.measureRight) rect.right = getRect(cur.measureRight).left; - if (cur.leftSide) rect.leftSide = measureRect(getRect(cur.leftSide)); - } - removeChildren(cm.display.measure); - for (var i = 0, cur; i < data.length; ++i) if (cur = data[i]) { - finishRect(cur); - if (cur.leftSide) finishRect(cur.leftSide); - if (cur.rightSide) finishRect(cur.rightSide); - } - return data; - } - - function crudelyMeasureLine(cm, line) { - var copy = new Line(line.text.slice(0, 100), null); - if (line.textClass) copy.textClass = line.textClass; - var measure = measureLineInner(cm, copy); - var left = measureChar(cm, copy, 0, measure, "left"); - var right = measureChar(cm, copy, 99, measure, "right"); - return {crude: true, top: left.top, left: left.left, bottom: left.bottom, width: (right.right - left.left) / 100}; - } - - function measureLineWidth(cm, line) { - var hasBadSpan = false; - if (line.markedSpans) for (var i = 0; i < line.markedSpans; ++i) { - var sp = line.markedSpans[i]; - if (sp.collapsed && (sp.to == null || sp.to == line.text.length)) hasBadSpan = true; - } - var cached = !hasBadSpan && findCachedMeasurement(cm, line); - if (cached || line.text.length >= cm.options.crudeMeasuringFrom) - return measureChar(cm, line, line.text.length, cached && cached.measure, "right").right; - - var pre = buildLineContent(cm, line, null, true).pre; - var end = pre.appendChild(zeroWidthElement(cm.display.measure)); - removeChildrenAndAdd(cm.display.measure, pre); - return getRect(end).right - getRect(cm.display.lineDiv).left; - } - - function clearCaches(cm) { - cm.display.measureLineCache.length = cm.display.measureLineCachePos = 0; - cm.display.cachedCharWidth = cm.display.cachedTextHeight = null; - if (!cm.options.lineWrapping) cm.display.maxLineChanged = true; - cm.display.lineNumChars = null; - } - - function pageScrollX() { return window.pageXOffset || (document.documentElement || document.body).scrollLeft; } - function pageScrollY() { return window.pageYOffset || (document.documentElement || document.body).scrollTop; } - - // Context is one of "line", "div" (display.lineDiv), "local"/null (editor), or "page" - function intoCoordSystem(cm, lineObj, rect, context) { - if (lineObj.widgets) for (var i = 0; i < lineObj.widgets.length; ++i) if (lineObj.widgets[i].above) { - var size = widgetHeight(lineObj.widgets[i]); - rect.top += size; rect.bottom += size; - } - if (context == "line") return rect; - if (!context) context = "local"; - var yOff = heightAtLine(cm, lineObj); - if (context == "local") yOff += paddingTop(cm.display); - else yOff -= cm.display.viewOffset; - if (context == "page" || context == "window") { - var lOff = getRect(cm.display.lineSpace); - yOff += lOff.top + (context == "window" ? 0 : pageScrollY()); - var xOff = lOff.left + (context == "window" ? 0 : pageScrollX()); - rect.left += xOff; rect.right += xOff; - } - rect.top += yOff; rect.bottom += yOff; - return rect; - } - - // Context may be "window", "page", "div", or "local"/null - // Result is in "div" coords - function fromCoordSystem(cm, coords, context) { - if (context == "div") return coords; - var left = coords.left, top = coords.top; - // First move into "page" coordinate system - if (context == "page") { - left -= pageScrollX(); - top -= pageScrollY(); - } else if (context == "local" || !context) { - var localBox = getRect(cm.display.sizer); - left += localBox.left; - top += localBox.top; - } - - var lineSpaceBox = getRect(cm.display.lineSpace); - return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}; - } - - function charCoords(cm, pos, context, lineObj, bias) { - if (!lineObj) lineObj = getLine(cm.doc, pos.line); - return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, null, bias), context); - } - - function cursorCoords(cm, pos, context, lineObj, measurement) { - lineObj = lineObj || getLine(cm.doc, pos.line); - if (!measurement) measurement = measureLine(cm, lineObj); - function get(ch, right) { - var m = measureChar(cm, lineObj, ch, measurement, right ? "right" : "left"); - if (right) m.left = m.right; else m.right = m.left; - return intoCoordSystem(cm, lineObj, m, context); - } - function getBidi(ch, partPos) { - var part = order[partPos], right = part.level % 2; - if (ch == bidiLeft(part) && partPos && part.level < order[partPos - 1].level) { - part = order[--partPos]; - ch = bidiRight(part) - (part.level % 2 ? 0 : 1); - right = true; - } else if (ch == bidiRight(part) && partPos < order.length - 1 && part.level < order[partPos + 1].level) { - part = order[++partPos]; - ch = bidiLeft(part) - part.level % 2; - right = false; - } - if (right && ch == part.to && ch > part.from) return get(ch - 1); - return get(ch, right); - } - var order = getOrder(lineObj), ch = pos.ch; - if (!order) return get(ch); - var partPos = getBidiPartAt(order, ch); - var val = getBidi(ch, partPos); - if (bidiOther != null) val.other = getBidi(ch, bidiOther); - return val; - } - - function PosWithInfo(line, ch, outside, xRel) { - var pos = new Pos(line, ch); - pos.xRel = xRel; - if (outside) pos.outside = true; - return pos; - } - - // Coords must be lineSpace-local - function coordsChar(cm, x, y) { - var doc = cm.doc; - y += cm.display.viewOffset; - if (y < 0) return PosWithInfo(doc.first, 0, true, -1); - var lineNo = lineAtHeight(doc, y), last = doc.first + doc.size - 1; - if (lineNo > last) - return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, true, 1); - if (x < 0) x = 0; - - for (;;) { - var lineObj = getLine(doc, lineNo); - var found = coordsCharInner(cm, lineObj, lineNo, x, y); - var merged = collapsedSpanAtEnd(lineObj); - var mergedPos = merged && merged.find(); - if (merged && (found.ch > mergedPos.from.ch || found.ch == mergedPos.from.ch && found.xRel > 0)) - lineNo = mergedPos.to.line; - else - return found; - } - } - - function coordsCharInner(cm, lineObj, lineNo, x, y) { - var innerOff = y - heightAtLine(cm, lineObj); - var wrongLine = false, adjust = 2 * cm.display.wrapper.clientWidth; - var measurement = measureLine(cm, lineObj); - - function getX(ch) { - var sp = cursorCoords(cm, Pos(lineNo, ch), "line", - lineObj, measurement); - wrongLine = true; - if (innerOff > sp.bottom) return sp.left - adjust; - else if (innerOff < sp.top) return sp.left + adjust; - else wrongLine = false; - return sp.left; - } - - var bidi = getOrder(lineObj), dist = lineObj.text.length; - var from = lineLeft(lineObj), to = lineRight(lineObj); - var fromX = getX(from), fromOutside = wrongLine, toX = getX(to), toOutside = wrongLine; - - if (x > toX) return PosWithInfo(lineNo, to, toOutside, 1); - // Do a binary search between these bounds. - for (;;) { - if (bidi ? to == from || to == moveVisually(lineObj, from, 1) : to - from <= 1) { - var ch = x < fromX || x - fromX <= toX - x ? from : to; - var xDiff = x - (ch == from ? fromX : toX); - while (isExtendingChar.test(lineObj.text.charAt(ch))) ++ch; - var pos = PosWithInfo(lineNo, ch, ch == from ? fromOutside : toOutside, - xDiff < 0 ? -1 : xDiff ? 1 : 0); - return pos; - } - var step = Math.ceil(dist / 2), middle = from + step; - if (bidi) { - middle = from; - for (var i = 0; i < step; ++i) middle = moveVisually(lineObj, middle, 1); - } - var middleX = getX(middle); - if (middleX > x) {to = middle; toX = middleX; if (toOutside = wrongLine) toX += 1000; dist = step;} - else {from = middle; fromX = middleX; fromOutside = wrongLine; dist -= step;} - } - } - - var measureText; - function textHeight(display) { - if (display.cachedTextHeight != null) return display.cachedTextHeight; - if (measureText == null) { - measureText = elt("pre"); - // Measure a bunch of lines, for browsers that compute - // fractional heights. - for (var i = 0; i < 49; ++i) { - measureText.appendChild(document.createTextNode("x")); - measureText.appendChild(elt("br")); - } - measureText.appendChild(document.createTextNode("x")); - } - removeChildrenAndAdd(display.measure, measureText); - var height = measureText.offsetHeight / 50; - if (height > 3) display.cachedTextHeight = height; - removeChildren(display.measure); - return height || 1; - } - - function charWidth(display) { - if (display.cachedCharWidth != null) return display.cachedCharWidth; - var anchor = elt("span", "x"); - var pre = elt("pre", [anchor]); - removeChildrenAndAdd(display.measure, pre); - var width = anchor.offsetWidth; - if (width > 2) display.cachedCharWidth = width; - return width || 10; - } - - // OPERATIONS - - // Operations are used to wrap changes in such a way that each - // change won't have to update the cursor and display (which would - // be awkward, slow, and error-prone), but instead updates are - // batched and then all combined and executed at once. - - var nextOpId = 0; - function startOperation(cm) { - cm.curOp = { - // An array of ranges of lines that have to be updated. See - // updateDisplay. - changes: [], - forceUpdate: false, - updateInput: null, - userSelChange: null, - textChanged: null, - selectionChanged: false, - cursorActivity: false, - updateMaxLine: false, - updateScrollPos: false, - id: ++nextOpId - }; - if (!delayedCallbackDepth++) delayedCallbacks = []; - } - - function endOperation(cm) { - var op = cm.curOp, doc = cm.doc, display = cm.display; - cm.curOp = null; - - if (op.updateMaxLine) computeMaxLength(cm); - if (display.maxLineChanged && !cm.options.lineWrapping && display.maxLine) { - var width = measureLineWidth(cm, display.maxLine); - display.sizer.style.minWidth = Math.max(0, width + 3 + scrollerCutOff) + "px"; - display.maxLineChanged = false; - var maxScrollLeft = Math.max(0, display.sizer.offsetLeft + display.sizer.offsetWidth - display.scroller.clientWidth); - if (maxScrollLeft < doc.scrollLeft && !op.updateScrollPos) - setScrollLeft(cm, Math.min(display.scroller.scrollLeft, maxScrollLeft), true); - } - var newScrollPos, updated; - if (op.updateScrollPos) { - newScrollPos = op.updateScrollPos; - } else if (op.selectionChanged && display.scroller.clientHeight) { // don't rescroll if not visible - var coords = cursorCoords(cm, doc.sel.head); - newScrollPos = calculateScrollPos(cm, coords.left, coords.top, coords.left, coords.bottom); - } - if (op.changes.length || op.forceUpdate || newScrollPos && newScrollPos.scrollTop != null) { - updated = updateDisplay(cm, op.changes, newScrollPos && newScrollPos.scrollTop, op.forceUpdate); - if (cm.display.scroller.offsetHeight) cm.doc.scrollTop = cm.display.scroller.scrollTop; - } - if (!updated && op.selectionChanged) updateSelection(cm); - if (op.updateScrollPos) { - var top = Math.max(0, Math.min(display.scroller.scrollHeight - display.scroller.clientHeight, newScrollPos.scrollTop)); - var left = Math.max(0, Math.min(display.scroller.scrollWidth - display.scroller.clientWidth, newScrollPos.scrollLeft)); - display.scroller.scrollTop = display.scrollbarV.scrollTop = doc.scrollTop = top; - display.scroller.scrollLeft = display.scrollbarH.scrollLeft = doc.scrollLeft = left; - alignHorizontally(cm); - if (op.scrollToPos) - scrollPosIntoView(cm, clipPos(cm.doc, op.scrollToPos.from), - clipPos(cm.doc, op.scrollToPos.to), op.scrollToPos.margin); - } else if (newScrollPos) { - scrollCursorIntoView(cm); - } - if (op.selectionChanged) restartBlink(cm); - - if (cm.state.focused && op.updateInput) - resetInput(cm, op.userSelChange); - - var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers; - if (hidden) for (var i = 0; i < hidden.length; ++i) - if (!hidden[i].lines.length) signal(hidden[i], "hide"); - if (unhidden) for (var i = 0; i < unhidden.length; ++i) - if (unhidden[i].lines.length) signal(unhidden[i], "unhide"); - - var delayed; - if (!--delayedCallbackDepth) { - delayed = delayedCallbacks; - delayedCallbacks = null; - } - if (op.textChanged) - signal(cm, "change", cm, op.textChanged); - if (op.cursorActivity) signal(cm, "cursorActivity", cm); - if (delayed) for (var i = 0; i < delayed.length; ++i) delayed[i](); - } - - // Wraps a function in an operation. Returns the wrapped function. - function operation(cm1, f) { - return function() { - var cm = cm1 || this, withOp = !cm.curOp; - if (withOp) startOperation(cm); - try { var result = f.apply(cm, arguments); } - finally { if (withOp) endOperation(cm); } - return result; - }; - } - function docOperation(f) { - return function() { - var withOp = this.cm && !this.cm.curOp, result; - if (withOp) startOperation(this.cm); - try { result = f.apply(this, arguments); } - finally { if (withOp) endOperation(this.cm); } - return result; - }; - } - function runInOp(cm, f) { - var withOp = !cm.curOp, result; - if (withOp) startOperation(cm); - try { result = f(); } - finally { if (withOp) endOperation(cm); } - return result; - } - - function regChange(cm, from, to, lendiff) { - if (from == null) from = cm.doc.first; - if (to == null) to = cm.doc.first + cm.doc.size; - cm.curOp.changes.push({from: from, to: to, diff: lendiff}); - } - - // INPUT HANDLING - - function slowPoll(cm) { - if (cm.display.pollingFast) return; - cm.display.poll.set(cm.options.pollInterval, function() { - readInput(cm); - if (cm.state.focused) slowPoll(cm); - }); - } - - function fastPoll(cm) { - var missed = false; - cm.display.pollingFast = true; - function p() { - var changed = readInput(cm); - if (!changed && !missed) {missed = true; cm.display.poll.set(60, p);} - else {cm.display.pollingFast = false; slowPoll(cm);} - } - cm.display.poll.set(20, p); - } - - // prevInput is a hack to work with IME. If we reset the textarea - // on every change, that breaks IME. So we look for changes - // compared to the previous content instead. (Modern browsers have - // events that indicate IME taking place, but these are not widely - // supported or compatible enough yet to rely on.) - function readInput(cm) { - var input = cm.display.input, prevInput = cm.display.prevInput, doc = cm.doc, sel = doc.sel; - if (!cm.state.focused || hasSelection(input) || isReadOnly(cm) || cm.state.disableInput) return false; - if (cm.state.pasteIncoming && cm.state.fakedLastChar) { - input.value = input.value.substring(0, input.value.length - 1); - cm.state.fakedLastChar = false; - } - var text = input.value; - if (text == prevInput && posEq(sel.from, sel.to)) return false; - if (ie && !ie_lt9 && cm.display.inputHasSelection === text) { - resetInput(cm, true); - return false; - } - - var withOp = !cm.curOp; - if (withOp) startOperation(cm); - sel.shift = false; - var same = 0, l = Math.min(prevInput.length, text.length); - while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) ++same; - var from = sel.from, to = sel.to; - if (same < prevInput.length) - from = Pos(from.line, from.ch - (prevInput.length - same)); - else if (cm.state.overwrite && posEq(from, to) && !cm.state.pasteIncoming) - to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + (text.length - same))); - - var updateInput = cm.curOp.updateInput; - var changeEvent = {from: from, to: to, text: splitLines(text.slice(same)), - origin: cm.state.pasteIncoming ? "paste" : "+input"}; - makeChange(cm.doc, changeEvent, "end"); - cm.curOp.updateInput = updateInput; - signalLater(cm, "inputRead", cm, changeEvent); - - if (text.length > 1000 || text.indexOf("\n") > -1) input.value = cm.display.prevInput = ""; - else cm.display.prevInput = text; - if (withOp) endOperation(cm); - cm.state.pasteIncoming = false; - return true; - } - - function resetInput(cm, user) { - var minimal, selected, doc = cm.doc; - if (!posEq(doc.sel.from, doc.sel.to)) { - cm.display.prevInput = ""; - minimal = hasCopyEvent && - (doc.sel.to.line - doc.sel.from.line > 100 || (selected = cm.getSelection()).length > 1000); - var content = minimal ? "-" : selected || cm.getSelection(); - cm.display.input.value = content; - if (cm.state.focused) selectInput(cm.display.input); - if (ie && !ie_lt9) cm.display.inputHasSelection = content; - } else if (user) { - cm.display.prevInput = cm.display.input.value = ""; - if (ie && !ie_lt9) cm.display.inputHasSelection = null; - } - cm.display.inaccurateSelection = minimal; - } - - function focusInput(cm) { - if (cm.options.readOnly != "nocursor" && (!mobile || document.activeElement != cm.display.input)) - cm.display.input.focus(); - } - - function isReadOnly(cm) { - return cm.options.readOnly || cm.doc.cantEdit; - } - - // EVENT HANDLERS - - function registerEventHandlers(cm) { - var d = cm.display; - on(d.scroller, "mousedown", operation(cm, onMouseDown)); - if (ie) - on(d.scroller, "dblclick", operation(cm, function(e) { - if (signalDOMEvent(cm, e)) return; - var pos = posFromMouse(cm, e); - if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) return; - e_preventDefault(e); - var word = findWordAt(getLine(cm.doc, pos.line).text, pos); - extendSelection(cm.doc, word.from, word.to); - })); - else - on(d.scroller, "dblclick", function(e) { signalDOMEvent(cm, e) || e_preventDefault(e); }); - on(d.lineSpace, "selectstart", function(e) { - if (!eventInWidget(d, e)) e_preventDefault(e); - }); - // Gecko browsers fire contextmenu *after* opening the menu, at - // which point we can't mess with it anymore. Context menu is - // handled in onMouseDown for Gecko. - if (!captureMiddleClick) on(d.scroller, "contextmenu", function(e) {onContextMenu(cm, e);}); - - on(d.scroller, "scroll", function() { - if (d.scroller.clientHeight) { - setScrollTop(cm, d.scroller.scrollTop); - setScrollLeft(cm, d.scroller.scrollLeft, true); - signal(cm, "scroll", cm); - } - }); - on(d.scrollbarV, "scroll", function() { - if (d.scroller.clientHeight) setScrollTop(cm, d.scrollbarV.scrollTop); - }); - on(d.scrollbarH, "scroll", function() { - if (d.scroller.clientHeight) setScrollLeft(cm, d.scrollbarH.scrollLeft); - }); - - on(d.scroller, "mousewheel", function(e){onScrollWheel(cm, e);}); - on(d.scroller, "DOMMouseScroll", function(e){onScrollWheel(cm, e);}); - - function reFocus() { if (cm.state.focused) setTimeout(bind(focusInput, cm), 0); } - on(d.scrollbarH, "mousedown", reFocus); - on(d.scrollbarV, "mousedown", reFocus); - // Prevent wrapper from ever scrolling - on(d.wrapper, "scroll", function() { d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; }); - - var resizeTimer; - function onResize() { - if (resizeTimer == null) resizeTimer = setTimeout(function() { - resizeTimer = null; - // Might be a text scaling operation, clear size caches. - d.cachedCharWidth = d.cachedTextHeight = knownScrollbarWidth = null; - clearCaches(cm); - runInOp(cm, bind(regChange, cm)); - }, 100); - } - on(window, "resize", onResize); - // Above handler holds on to the editor and its data structures. - // Here we poll to unregister it when the editor is no longer in - // the document, so that it can be garbage-collected. - function unregister() { - for (var p = d.wrapper.parentNode; p && p != document.body; p = p.parentNode) {} - if (p) setTimeout(unregister, 5000); - else off(window, "resize", onResize); - } - setTimeout(unregister, 5000); - - on(d.input, "keyup", operation(cm, function(e) { - if (signalDOMEvent(cm, e) || cm.options.onKeyEvent && cm.options.onKeyEvent(cm, addStop(e))) return; - if (e.keyCode == 16) cm.doc.sel.shift = false; - })); - on(d.input, "input", function() { - if (ie && !ie_lt9 && cm.display.inputHasSelection) cm.display.inputHasSelection = null; - fastPoll(cm); - }); - on(d.input, "keydown", operation(cm, onKeyDown)); - on(d.input, "keypress", operation(cm, onKeyPress)); - on(d.input, "focus", bind(onFocus, cm)); - on(d.input, "blur", bind(onBlur, cm)); - - function drag_(e) { - if (signalDOMEvent(cm, e) || cm.options.onDragEvent && cm.options.onDragEvent(cm, addStop(e))) return; - e_stop(e); - } - if (cm.options.dragDrop) { - on(d.scroller, "dragstart", function(e){onDragStart(cm, e);}); - on(d.scroller, "dragenter", drag_); - on(d.scroller, "dragover", drag_); - on(d.scroller, "drop", operation(cm, onDrop)); - } - on(d.scroller, "paste", function(e) { - if (eventInWidget(d, e)) return; - focusInput(cm); - fastPoll(cm); - }); - on(d.input, "paste", function() { - // Workaround for webkit bug https://bugs.webkit.org/show_bug.cgi?id=90206 - // Add a char to the end of textarea before paste occur so that - // selection doesn't span to the end of textarea. - if (webkit && !cm.state.fakedLastChar && !(new Date - cm.state.lastMiddleDown < 200)) { - var start = d.input.selectionStart, end = d.input.selectionEnd; - d.input.value += "$"; - d.input.selectionStart = start; - d.input.selectionEnd = end; - cm.state.fakedLastChar = true; - } - cm.state.pasteIncoming = true; - fastPoll(cm); - }); - - function prepareCopy() { - if (d.inaccurateSelection) { - d.prevInput = ""; - d.inaccurateSelection = false; - d.input.value = cm.getSelection(); - selectInput(d.input); - } - } - on(d.input, "cut", prepareCopy); - on(d.input, "copy", prepareCopy); - - // Needed to handle Tab key in KHTML - if (khtml) on(d.sizer, "mouseup", function() { - if (document.activeElement == d.input) d.input.blur(); - focusInput(cm); - }); - } - - function eventInWidget(display, e) { - for (var n = e_target(e); n != display.wrapper; n = n.parentNode) { - if (!n || n.ignoreEvents || n.parentNode == display.sizer && n != display.mover) return true; - } - } - - function posFromMouse(cm, e, liberal) { - var display = cm.display; - if (!liberal) { - var target = e_target(e); - if (target == display.scrollbarH || target == display.scrollbarH.firstChild || - target == display.scrollbarV || target == display.scrollbarV.firstChild || - target == display.scrollbarFiller || target == display.gutterFiller) return null; - } - var x, y, space = getRect(display.lineSpace); - // Fails unpredictably on IE[67] when mouse is dragged around quickly. - try { x = e.clientX; y = e.clientY; } catch (e) { return null; } - return coordsChar(cm, x - space.left, y - space.top); - } - - var lastClick, lastDoubleClick; - function onMouseDown(e) { - if (signalDOMEvent(this, e)) return; - var cm = this, display = cm.display, doc = cm.doc, sel = doc.sel; - sel.shift = e.shiftKey; - - if (eventInWidget(display, e)) { - if (!webkit) { - display.scroller.draggable = false; - setTimeout(function(){display.scroller.draggable = true;}, 100); - } - return; - } - if (clickInGutter(cm, e)) return; - var start = posFromMouse(cm, e); - - switch (e_button(e)) { - case 3: - if (captureMiddleClick) onContextMenu.call(cm, cm, e); - return; - case 2: - if (webkit) cm.state.lastMiddleDown = +new Date; - if (start) extendSelection(cm.doc, start); - setTimeout(bind(focusInput, cm), 20); - e_preventDefault(e); - return; - } - // For button 1, if it was clicked inside the editor - // (posFromMouse returning non-null), we have to adjust the - // selection. - if (!start) {if (e_target(e) == display.scroller) e_preventDefault(e); return;} - - if (!cm.state.focused) onFocus(cm); - - var now = +new Date, type = "single"; - if (lastDoubleClick && lastDoubleClick.time > now - 400 && posEq(lastDoubleClick.pos, start)) { - type = "triple"; - e_preventDefault(e); - setTimeout(bind(focusInput, cm), 20); - selectLine(cm, start.line); - } else if (lastClick && lastClick.time > now - 400 && posEq(lastClick.pos, start)) { - type = "double"; - lastDoubleClick = {time: now, pos: start}; - e_preventDefault(e); - var word = findWordAt(getLine(doc, start.line).text, start); - extendSelection(cm.doc, word.from, word.to); - } else { lastClick = {time: now, pos: start}; } - - var last = start; - if (cm.options.dragDrop && dragAndDrop && !isReadOnly(cm) && !posEq(sel.from, sel.to) && - !posLess(start, sel.from) && !posLess(sel.to, start) && type == "single") { - var dragEnd = operation(cm, function(e2) { - if (webkit) display.scroller.draggable = false; - cm.state.draggingText = false; - off(document, "mouseup", dragEnd); - off(display.scroller, "drop", dragEnd); - if (Math.abs(e.clientX - e2.clientX) + Math.abs(e.clientY - e2.clientY) < 10) { - e_preventDefault(e2); - extendSelection(cm.doc, start); - focusInput(cm); - } - }); - // Let the drag handler handle this. - if (webkit) display.scroller.draggable = true; - cm.state.draggingText = dragEnd; - // IE's approach to draggable - if (display.scroller.dragDrop) display.scroller.dragDrop(); - on(document, "mouseup", dragEnd); - on(display.scroller, "drop", dragEnd); - return; - } - e_preventDefault(e); - if (type == "single") extendSelection(cm.doc, clipPos(doc, start)); - - var startstart = sel.from, startend = sel.to, lastPos = start; - - function doSelect(cur) { - if (posEq(lastPos, cur)) return; - lastPos = cur; - - if (type == "single") { - extendSelection(cm.doc, clipPos(doc, start), cur); - return; - } - - startstart = clipPos(doc, startstart); - startend = clipPos(doc, startend); - if (type == "double") { - var word = findWordAt(getLine(doc, cur.line).text, cur); - if (posLess(cur, startstart)) extendSelection(cm.doc, word.from, startend); - else extendSelection(cm.doc, startstart, word.to); - } else if (type == "triple") { - if (posLess(cur, startstart)) extendSelection(cm.doc, startend, clipPos(doc, Pos(cur.line, 0))); - else extendSelection(cm.doc, startstart, clipPos(doc, Pos(cur.line + 1, 0))); - } - } - - var editorSize = getRect(display.wrapper); - // Used to ensure timeout re-tries don't fire when another extend - // happened in the meantime (clearTimeout isn't reliable -- at - // least on Chrome, the timeouts still happen even when cleared, - // if the clear happens after their scheduled firing time). - var counter = 0; - - function extend(e) { - var curCount = ++counter; - var cur = posFromMouse(cm, e, true); - if (!cur) return; - if (!posEq(cur, last)) { - if (!cm.state.focused) onFocus(cm); - last = cur; - doSelect(cur); - var visible = visibleLines(display, doc); - if (cur.line >= visible.to || cur.line < visible.from) - setTimeout(operation(cm, function(){if (counter == curCount) extend(e);}), 150); - } else { - var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0; - if (outside) setTimeout(operation(cm, function() { - if (counter != curCount) return; - display.scroller.scrollTop += outside; - extend(e); - }), 50); - } - } - - function done(e) { - counter = Infinity; - e_preventDefault(e); - focusInput(cm); - off(document, "mousemove", move); - off(document, "mouseup", up); - } - - var move = operation(cm, function(e) { - if (!ie && !e_button(e)) done(e); - else extend(e); - }); - var up = operation(cm, done); - on(document, "mousemove", move); - on(document, "mouseup", up); - } - - function gutterEvent(cm, e, type, prevent, signalfn) { - try { var mX = e.clientX, mY = e.clientY; } - catch(e) { return false; } - if (mX >= Math.floor(getRect(cm.display.gutters).right)) return false; - if (prevent) e_preventDefault(e); - - var display = cm.display; - var lineBox = getRect(display.lineDiv); - - if (mY > lineBox.bottom || !hasHandler(cm, type)) return e_defaultPrevented(e); - mY -= lineBox.top - display.viewOffset; - - for (var i = 0; i < cm.options.gutters.length; ++i) { - var g = display.gutters.childNodes[i]; - if (g && getRect(g).right >= mX) { - var line = lineAtHeight(cm.doc, mY); - var gutter = cm.options.gutters[i]; - signalfn(cm, type, cm, line, gutter, e); - return e_defaultPrevented(e); - } - } - } - - function contextMenuInGutter(cm, e) { - if (!hasHandler(cm, "gutterContextMenu")) return false; - return gutterEvent(cm, e, "gutterContextMenu", false, signal); - } - - function clickInGutter(cm, e) { - return gutterEvent(cm, e, "gutterClick", true, signalLater); - } - - // Kludge to work around strange IE behavior where it'll sometimes - // re-fire a series of drag-related events right after the drop (#1551) - var lastDrop = 0; - - function onDrop(e) { - var cm = this; - if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e) || (cm.options.onDragEvent && cm.options.onDragEvent(cm, addStop(e)))) - return; - e_preventDefault(e); - if (ie) lastDrop = +new Date; - var pos = posFromMouse(cm, e, true), files = e.dataTransfer.files; - if (!pos || isReadOnly(cm)) return; - if (files && files.length && window.FileReader && window.File) { - var n = files.length, text = Array(n), read = 0; - var loadFile = function(file, i) { - var reader = new FileReader; - reader.onload = function() { - text[i] = reader.result; - if (++read == n) { - pos = clipPos(cm.doc, pos); - makeChange(cm.doc, {from: pos, to: pos, text: splitLines(text.join("\n")), origin: "paste"}, "around"); - } - }; - reader.readAsText(file); - }; - for (var i = 0; i < n; ++i) loadFile(files[i], i); - } else { - // Don't do a replace if the drop happened inside of the selected text. - if (cm.state.draggingText && !(posLess(pos, cm.doc.sel.from) || posLess(cm.doc.sel.to, pos))) { - cm.state.draggingText(e); - // Ensure the editor is re-focused - setTimeout(bind(focusInput, cm), 20); - return; - } - try { - var text = e.dataTransfer.getData("Text"); - if (text) { - var curFrom = cm.doc.sel.from, curTo = cm.doc.sel.to; - setSelection(cm.doc, pos, pos); - if (cm.state.draggingText) replaceRange(cm.doc, "", curFrom, curTo, "paste"); - cm.replaceSelection(text, null, "paste"); - focusInput(cm); - } - } - catch(e){} - } - } - - function onDragStart(cm, e) { - if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return; } - if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) return; - - var txt = cm.getSelection(); - e.dataTransfer.setData("Text", txt); - - // Use dummy image instead of default browsers image. - // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there. - if (e.dataTransfer.setDragImage && !safari) { - var img = elt("img", null, null, "position: fixed; left: 0; top: 0;"); - img.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="; - if (opera) { - img.width = img.height = 1; - cm.display.wrapper.appendChild(img); - // Force a relayout, or Opera won't use our image for some obscure reason - img._top = img.offsetTop; - } - e.dataTransfer.setDragImage(img, 0, 0); - if (opera) img.parentNode.removeChild(img); - } - } - - function setScrollTop(cm, val) { - if (Math.abs(cm.doc.scrollTop - val) < 2) return; - cm.doc.scrollTop = val; - if (!gecko) updateDisplay(cm, [], val); - if (cm.display.scroller.scrollTop != val) cm.display.scroller.scrollTop = val; - if (cm.display.scrollbarV.scrollTop != val) cm.display.scrollbarV.scrollTop = val; - if (gecko) updateDisplay(cm, []); - startWorker(cm, 100); - } - function setScrollLeft(cm, val, isScroller) { - if (isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) return; - val = Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth); - cm.doc.scrollLeft = val; - alignHorizontally(cm); - if (cm.display.scroller.scrollLeft != val) cm.display.scroller.scrollLeft = val; - if (cm.display.scrollbarH.scrollLeft != val) cm.display.scrollbarH.scrollLeft = val; - } - - // Since the delta values reported on mouse wheel events are - // unstandardized between browsers and even browser versions, and - // generally horribly unpredictable, this code starts by measuring - // the scroll effect that the first few mouse wheel events have, - // and, from that, detects the way it can convert deltas to pixel - // offsets afterwards. - // - // The reason we want to know the amount a wheel event will scroll - // is that it gives us a chance to update the display before the - // actual scrolling happens, reducing flickering. - - var wheelSamples = 0, wheelPixelsPerUnit = null; - // Fill in a browser-detected starting value on browsers where we - // know one. These don't have to be accurate -- the result of them - // being wrong would just be a slight flicker on the first wheel - // scroll (if it is large enough). - if (ie) wheelPixelsPerUnit = -.53; - else if (gecko) wheelPixelsPerUnit = 15; - else if (chrome) wheelPixelsPerUnit = -.7; - else if (safari) wheelPixelsPerUnit = -1/3; - - function onScrollWheel(cm, e) { - var dx = e.wheelDeltaX, dy = e.wheelDeltaY; - if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) dx = e.detail; - if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) dy = e.detail; - else if (dy == null) dy = e.wheelDelta; - - var display = cm.display, scroll = display.scroller; - // Quit if there's nothing to scroll here - if (!(dx && scroll.scrollWidth > scroll.clientWidth || - dy && scroll.scrollHeight > scroll.clientHeight)) return; - - // Webkit browsers on OS X abort momentum scrolls when the target - // of the scroll event is removed from the scrollable element. - // This hack (see related code in patchDisplay) makes sure the - // element is kept around. - if (dy && mac && webkit) { - for (var cur = e.target; cur != scroll; cur = cur.parentNode) { - if (cur.lineObj) { - cm.display.currentWheelTarget = cur; - break; - } - } - } - - // On some browsers, horizontal scrolling will cause redraws to - // happen before the gutter has been realigned, causing it to - // wriggle around in a most unseemly way. When we have an - // estimated pixels/delta value, we just handle horizontal - // scrolling entirely here. It'll be slightly off from native, but - // better than glitching out. - if (dx && !gecko && !opera && wheelPixelsPerUnit != null) { - if (dy) - setScrollTop(cm, Math.max(0, Math.min(scroll.scrollTop + dy * wheelPixelsPerUnit, scroll.scrollHeight - scroll.clientHeight))); - setScrollLeft(cm, Math.max(0, Math.min(scroll.scrollLeft + dx * wheelPixelsPerUnit, scroll.scrollWidth - scroll.clientWidth))); - e_preventDefault(e); - display.wheelStartX = null; // Abort measurement, if in progress - return; - } - - if (dy && wheelPixelsPerUnit != null) { - var pixels = dy * wheelPixelsPerUnit; - var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight; - if (pixels < 0) top = Math.max(0, top + pixels - 50); - else bot = Math.min(cm.doc.height, bot + pixels + 50); - updateDisplay(cm, [], {top: top, bottom: bot}); - } - - if (wheelSamples < 20) { - if (display.wheelStartX == null) { - display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop; - display.wheelDX = dx; display.wheelDY = dy; - setTimeout(function() { - if (display.wheelStartX == null) return; - var movedX = scroll.scrollLeft - display.wheelStartX; - var movedY = scroll.scrollTop - display.wheelStartY; - var sample = (movedY && display.wheelDY && movedY / display.wheelDY) || - (movedX && display.wheelDX && movedX / display.wheelDX); - display.wheelStartX = display.wheelStartY = null; - if (!sample) return; - wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1); - ++wheelSamples; - }, 200); - } else { - display.wheelDX += dx; display.wheelDY += dy; - } - } - } - - function doHandleBinding(cm, bound, dropShift) { - if (typeof bound == "string") { - bound = commands[bound]; - if (!bound) return false; - } - // Ensure previous input has been read, so that the handler sees a - // consistent view of the document - if (cm.display.pollingFast && readInput(cm)) cm.display.pollingFast = false; - var doc = cm.doc, prevShift = doc.sel.shift, done = false; - try { - if (isReadOnly(cm)) cm.state.suppressEdits = true; - if (dropShift) doc.sel.shift = false; - done = bound(cm) != Pass; - } finally { - doc.sel.shift = prevShift; - cm.state.suppressEdits = false; - } - return done; - } - - function allKeyMaps(cm) { - var maps = cm.state.keyMaps.slice(0); - if (cm.options.extraKeys) maps.push(cm.options.extraKeys); - maps.push(cm.options.keyMap); - return maps; - } - - var maybeTransition; - function handleKeyBinding(cm, e) { - // Handle auto keymap transitions - var startMap = getKeyMap(cm.options.keyMap), next = startMap.auto; - clearTimeout(maybeTransition); - if (next && !isModifierKey(e)) maybeTransition = setTimeout(function() { - if (getKeyMap(cm.options.keyMap) == startMap) { - cm.options.keyMap = (next.call ? next.call(null, cm) : next); - keyMapChanged(cm); - } - }, 50); - - var name = keyName(e, true), handled = false; - if (!name) return false; - var keymaps = allKeyMaps(cm); - - if (e.shiftKey) { - // First try to resolve full name (including 'Shift-'). Failing - // that, see if there is a cursor-motion command (starting with - // 'go') bound to the keyname without 'Shift-'. - handled = lookupKey("Shift-" + name, keymaps, function(b) {return doHandleBinding(cm, b, true);}) - || lookupKey(name, keymaps, function(b) { - if (typeof b == "string" ? /^go[A-Z]/.test(b) : b.motion) - return doHandleBinding(cm, b); - }); - } else { - handled = lookupKey(name, keymaps, function(b) { return doHandleBinding(cm, b); }); - } - - if (handled) { - e_preventDefault(e); - restartBlink(cm); - if (ie_lt9) { e.oldKeyCode = e.keyCode; e.keyCode = 0; } - signalLater(cm, "keyHandled", cm, name, e); - } - return handled; - } - - function handleCharBinding(cm, e, ch) { - var handled = lookupKey("'" + ch + "'", allKeyMaps(cm), - function(b) { return doHandleBinding(cm, b, true); }); - if (handled) { - e_preventDefault(e); - restartBlink(cm); - signalLater(cm, "keyHandled", cm, "'" + ch + "'", e); - } - return handled; - } - - var lastStoppedKey = null; - function onKeyDown(e) { - var cm = this; - if (!cm.state.focused) onFocus(cm); - if (signalDOMEvent(cm, e) || cm.options.onKeyEvent && cm.options.onKeyEvent(cm, addStop(e))) return; - if (ie && e.keyCode == 27) e.returnValue = false; - var code = e.keyCode; - // IE does strange things with escape. - cm.doc.sel.shift = code == 16 || e.shiftKey; - // First give onKeyEvent option a chance to handle this. - var handled = handleKeyBinding(cm, e); - if (opera) { - lastStoppedKey = handled ? code : null; - // Opera has no cut event... we try to at least catch the key combo - if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey)) - cm.replaceSelection(""); - } - } - - function onKeyPress(e) { - var cm = this; - if (signalDOMEvent(cm, e) || cm.options.onKeyEvent && cm.options.onKeyEvent(cm, addStop(e))) return; - var keyCode = e.keyCode, charCode = e.charCode; - if (opera && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return;} - if (((opera && (!e.which || e.which < 10)) || khtml) && handleKeyBinding(cm, e)) return; - var ch = String.fromCharCode(charCode == null ? keyCode : charCode); - if (this.options.electricChars && this.doc.mode.electricChars && - this.options.smartIndent && !isReadOnly(this) && - this.doc.mode.electricChars.indexOf(ch) > -1) - setTimeout(operation(cm, function() {indentLine(cm, cm.doc.sel.to.line, "smart");}), 75); - if (handleCharBinding(cm, e, ch)) return; - if (ie && !ie_lt9) cm.display.inputHasSelection = null; - fastPoll(cm); - } - - function onFocus(cm) { - if (cm.options.readOnly == "nocursor") return; - if (!cm.state.focused) { - signal(cm, "focus", cm); - cm.state.focused = true; - if (cm.display.wrapper.className.search(/\bCodeMirror-focused\b/) == -1) - cm.display.wrapper.className += " CodeMirror-focused"; - if (!cm.curOp) { - resetInput(cm, true); - if (webkit) setTimeout(bind(resetInput, cm, true), 0); // Issue #1730 - } - } - slowPoll(cm); - restartBlink(cm); - } - function onBlur(cm) { - if (cm.state.focused) { - signal(cm, "blur", cm); - cm.state.focused = false; - cm.display.wrapper.className = cm.display.wrapper.className.replace(" CodeMirror-focused", ""); - } - clearInterval(cm.display.blinker); - setTimeout(function() {if (!cm.state.focused) cm.doc.sel.shift = false;}, 150); - } - - var detectingSelectAll; - function onContextMenu(cm, e) { - if (signalDOMEvent(cm, e, "contextmenu")) return; - var display = cm.display, sel = cm.doc.sel; - if (eventInWidget(display, e) || contextMenuInGutter(cm, e)) return; - - var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop; - if (!pos || opera) return; // Opera is difficult. - - // Reset the current text selection only if the click is done outside of the selection - // and 'resetSelectionOnContextMenu' option is true. - var reset = cm.options.resetSelectionOnContextMenu; - if (reset && (posEq(sel.from, sel.to) || posLess(pos, sel.from) || !posLess(pos, sel.to))) - operation(cm, setSelection)(cm.doc, pos, pos); - - var oldCSS = display.input.style.cssText; - display.inputDiv.style.position = "absolute"; - display.input.style.cssText = "position: fixed; width: 30px; height: 30px; top: " + (e.clientY - 5) + - "px; left: " + (e.clientX - 5) + "px; z-index: 1000; background: white; outline: none;" + - "border-width: 0; outline: none; overflow: hidden; opacity: .05; -ms-opacity: .05; filter: alpha(opacity=5);"; - focusInput(cm); - resetInput(cm, true); - // Adds "Select all" to context menu in FF - if (posEq(sel.from, sel.to)) display.input.value = display.prevInput = " "; - - function prepareSelectAllHack() { - if (display.input.selectionStart != null) { - var extval = display.input.value = "\u200b" + (posEq(sel.from, sel.to) ? "" : display.input.value); - display.prevInput = "\u200b"; - display.input.selectionStart = 1; display.input.selectionEnd = extval.length; - } - } - function rehide() { - display.inputDiv.style.position = "relative"; - display.input.style.cssText = oldCSS; - if (ie_lt9) display.scrollbarV.scrollTop = display.scroller.scrollTop = scrollPos; - slowPoll(cm); - - // Try to detect the user choosing select-all - if (display.input.selectionStart != null) { - if (!ie || ie_lt9) prepareSelectAllHack(); - clearTimeout(detectingSelectAll); - var i = 0, poll = function(){ - if (display.prevInput == " " && display.input.selectionStart == 0) - operation(cm, commands.selectAll)(cm); - else if (i++ < 10) detectingSelectAll = setTimeout(poll, 500); - else resetInput(cm); - }; - detectingSelectAll = setTimeout(poll, 200); - } - } - - if (ie && !ie_lt9) prepareSelectAllHack(); - if (captureMiddleClick) { - e_stop(e); - var mouseup = function() { - off(window, "mouseup", mouseup); - setTimeout(rehide, 20); - }; - on(window, "mouseup", mouseup); - } else { - setTimeout(rehide, 50); - } - } - - // UPDATING - - var changeEnd = CodeMirror.changeEnd = function(change) { - if (!change.text) return change.to; - return Pos(change.from.line + change.text.length - 1, - lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0)); - }; - - // Make sure a position will be valid after the given change. - function clipPostChange(doc, change, pos) { - if (!posLess(change.from, pos)) return clipPos(doc, pos); - var diff = (change.text.length - 1) - (change.to.line - change.from.line); - if (pos.line > change.to.line + diff) { - var preLine = pos.line - diff, lastLine = doc.first + doc.size - 1; - if (preLine > lastLine) return Pos(lastLine, getLine(doc, lastLine).text.length); - return clipToLen(pos, getLine(doc, preLine).text.length); - } - if (pos.line == change.to.line + diff) - return clipToLen(pos, lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0) + - getLine(doc, change.to.line).text.length - change.to.ch); - var inside = pos.line - change.from.line; - return clipToLen(pos, change.text[inside].length + (inside ? 0 : change.from.ch)); - } - - // Hint can be null|"end"|"start"|"around"|{anchor,head} - function computeSelAfterChange(doc, change, hint) { - if (hint && typeof hint == "object") // Assumed to be {anchor, head} object - return {anchor: clipPostChange(doc, change, hint.anchor), - head: clipPostChange(doc, change, hint.head)}; - - if (hint == "start") return {anchor: change.from, head: change.from}; - - var end = changeEnd(change); - if (hint == "around") return {anchor: change.from, head: end}; - if (hint == "end") return {anchor: end, head: end}; - - // hint is null, leave the selection alone as much as possible - var adjustPos = function(pos) { - if (posLess(pos, change.from)) return pos; - if (!posLess(change.to, pos)) return end; - - var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch; - if (pos.line == change.to.line) ch += end.ch - change.to.ch; - return Pos(line, ch); - }; - return {anchor: adjustPos(doc.sel.anchor), head: adjustPos(doc.sel.head)}; - } - - function filterChange(doc, change, update) { - var obj = { - canceled: false, - from: change.from, - to: change.to, - text: change.text, - origin: change.origin, - cancel: function() { this.canceled = true; } - }; - if (update) obj.update = function(from, to, text, origin) { - if (from) this.from = clipPos(doc, from); - if (to) this.to = clipPos(doc, to); - if (text) this.text = text; - if (origin !== undefined) this.origin = origin; - }; - signal(doc, "beforeChange", doc, obj); - if (doc.cm) signal(doc.cm, "beforeChange", doc.cm, obj); - - if (obj.canceled) return null; - return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin}; - } - - // Replace the range from from to to by the strings in replacement. - // change is a {from, to, text [, origin]} object - function makeChange(doc, change, selUpdate, ignoreReadOnly) { - if (doc.cm) { - if (!doc.cm.curOp) return operation(doc.cm, makeChange)(doc, change, selUpdate, ignoreReadOnly); - if (doc.cm.state.suppressEdits) return; - } - - if (hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange")) { - change = filterChange(doc, change, true); - if (!change) return; - } - - // Possibly split or suppress the update based on the presence - // of read-only spans in its range. - var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to); - if (split) { - for (var i = split.length - 1; i >= 1; --i) - makeChangeNoReadonly(doc, {from: split[i].from, to: split[i].to, text: [""]}); - if (split.length) - makeChangeNoReadonly(doc, {from: split[0].from, to: split[0].to, text: change.text}, selUpdate); - } else { - makeChangeNoReadonly(doc, change, selUpdate); - } - } - - function makeChangeNoReadonly(doc, change, selUpdate) { - if (change.text.length == 1 && change.text[0] == "" && posEq(change.from, change.to)) return; - var selAfter = computeSelAfterChange(doc, change, selUpdate); - addToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN); - - makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change)); - var rebased = []; - - linkedDocs(doc, function(doc, sharedHist) { - if (!sharedHist && indexOf(rebased, doc.history) == -1) { - rebaseHist(doc.history, change); - rebased.push(doc.history); - } - makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change)); - }); - } - - function makeChangeFromHistory(doc, type) { - if (doc.cm && doc.cm.state.suppressEdits) return; - - var hist = doc.history; - var event = (type == "undo" ? hist.done : hist.undone).pop(); - if (!event) return; - - var anti = {changes: [], anchorBefore: event.anchorAfter, headBefore: event.headAfter, - anchorAfter: event.anchorBefore, headAfter: event.headBefore, - generation: hist.generation}; - (type == "undo" ? hist.undone : hist.done).push(anti); - hist.generation = event.generation || ++hist.maxGeneration; - - var filter = hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange"); - - for (var i = event.changes.length - 1; i >= 0; --i) { - var change = event.changes[i]; - change.origin = type; - if (filter && !filterChange(doc, change, false)) { - (type == "undo" ? hist.done : hist.undone).length = 0; - return; - } - - anti.changes.push(historyChangeFromChange(doc, change)); - - var after = i ? computeSelAfterChange(doc, change, null) - : {anchor: event.anchorBefore, head: event.headBefore}; - makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change)); - var rebased = []; - - linkedDocs(doc, function(doc, sharedHist) { - if (!sharedHist && indexOf(rebased, doc.history) == -1) { - rebaseHist(doc.history, change); - rebased.push(doc.history); - } - makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change)); - }); - } - } - - function shiftDoc(doc, distance) { - function shiftPos(pos) {return Pos(pos.line + distance, pos.ch);} - doc.first += distance; - if (doc.cm) regChange(doc.cm, doc.first, doc.first, distance); - doc.sel.head = shiftPos(doc.sel.head); doc.sel.anchor = shiftPos(doc.sel.anchor); - doc.sel.from = shiftPos(doc.sel.from); doc.sel.to = shiftPos(doc.sel.to); - } - - function makeChangeSingleDoc(doc, change, selAfter, spans) { - if (doc.cm && !doc.cm.curOp) - return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans); - - if (change.to.line < doc.first) { - shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line)); - return; - } - if (change.from.line > doc.lastLine()) return; - - // Clip the change to the size of this doc - if (change.from.line < doc.first) { - var shift = change.text.length - 1 - (doc.first - change.from.line); - shiftDoc(doc, shift); - change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch), - text: [lst(change.text)], origin: change.origin}; - } - var last = doc.lastLine(); - if (change.to.line > last) { - change = {from: change.from, to: Pos(last, getLine(doc, last).text.length), - text: [change.text[0]], origin: change.origin}; - } - - change.removed = getBetween(doc, change.from, change.to); - - if (!selAfter) selAfter = computeSelAfterChange(doc, change, null); - if (doc.cm) makeChangeSingleDocInEditor(doc.cm, change, spans, selAfter); - else updateDoc(doc, change, spans, selAfter); - } - - function makeChangeSingleDocInEditor(cm, change, spans, selAfter) { - var doc = cm.doc, display = cm.display, from = change.from, to = change.to; - - var recomputeMaxLength = false, checkWidthStart = from.line; - if (!cm.options.lineWrapping) { - checkWidthStart = lineNo(visualLine(doc, getLine(doc, from.line))); - doc.iter(checkWidthStart, to.line + 1, function(line) { - if (line == display.maxLine) { - recomputeMaxLength = true; - return true; - } - }); - } - - if (!posLess(doc.sel.head, change.from) && !posLess(change.to, doc.sel.head)) - cm.curOp.cursorActivity = true; - - updateDoc(doc, change, spans, selAfter, estimateHeight(cm)); - - if (!cm.options.lineWrapping) { - doc.iter(checkWidthStart, from.line + change.text.length, function(line) { - var len = lineLength(doc, line); - if (len > display.maxLineLength) { - display.maxLine = line; - display.maxLineLength = len; - display.maxLineChanged = true; - recomputeMaxLength = false; - } - }); - if (recomputeMaxLength) cm.curOp.updateMaxLine = true; - } - - // Adjust frontier, schedule worker - doc.frontier = Math.min(doc.frontier, from.line); - startWorker(cm, 400); - - var lendiff = change.text.length - (to.line - from.line) - 1; - // Remember that these lines changed, for updating the display - regChange(cm, from.line, to.line + 1, lendiff); - - if (hasHandler(cm, "change")) { - var changeObj = {from: from, to: to, - text: change.text, - removed: change.removed, - origin: change.origin}; - if (cm.curOp.textChanged) { - for (var cur = cm.curOp.textChanged; cur.next; cur = cur.next) {} - cur.next = changeObj; - } else cm.curOp.textChanged = changeObj; - } - } - - function replaceRange(doc, code, from, to, origin) { - if (!to) to = from; - if (posLess(to, from)) { var tmp = to; to = from; from = tmp; } - if (typeof code == "string") code = splitLines(code); - makeChange(doc, {from: from, to: to, text: code, origin: origin}, null); - } - - // POSITION OBJECT - - function Pos(line, ch) { - if (!(this instanceof Pos)) return new Pos(line, ch); - this.line = line; this.ch = ch; - } - CodeMirror.Pos = Pos; - - function posEq(a, b) {return a.line == b.line && a.ch == b.ch;} - function posLess(a, b) {return a.line < b.line || (a.line == b.line && a.ch < b.ch);} - function copyPos(x) {return Pos(x.line, x.ch);} - - // SELECTION - - function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1));} - function clipPos(doc, pos) { - if (pos.line < doc.first) return Pos(doc.first, 0); - var last = doc.first + doc.size - 1; - if (pos.line > last) return Pos(last, getLine(doc, last).text.length); - return clipToLen(pos, getLine(doc, pos.line).text.length); - } - function clipToLen(pos, linelen) { - var ch = pos.ch; - if (ch == null || ch > linelen) return Pos(pos.line, linelen); - else if (ch < 0) return Pos(pos.line, 0); - else return pos; - } - function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size;} - - // If shift is held, this will move the selection anchor. Otherwise, - // it'll set the whole selection. - function extendSelection(doc, pos, other, bias) { - if (doc.sel.shift || doc.sel.extend) { - var anchor = doc.sel.anchor; - if (other) { - var posBefore = posLess(pos, anchor); - if (posBefore != posLess(other, anchor)) { - anchor = pos; - pos = other; - } else if (posBefore != posLess(pos, other)) { - pos = other; - } - } - setSelection(doc, anchor, pos, bias); - } else { - setSelection(doc, pos, other || pos, bias); - } - if (doc.cm) doc.cm.curOp.userSelChange = true; - } - - function filterSelectionChange(doc, anchor, head) { - var obj = {anchor: anchor, head: head}; - signal(doc, "beforeSelectionChange", doc, obj); - if (doc.cm) signal(doc.cm, "beforeSelectionChange", doc.cm, obj); - obj.anchor = clipPos(doc, obj.anchor); obj.head = clipPos(doc, obj.head); - return obj; - } - - // Update the selection. Last two args are only used by - // updateDoc, since they have to be expressed in the line - // numbers before the update. - function setSelection(doc, anchor, head, bias, checkAtomic) { - if (!checkAtomic && hasHandler(doc, "beforeSelectionChange") || doc.cm && hasHandler(doc.cm, "beforeSelectionChange")) { - var filtered = filterSelectionChange(doc, anchor, head); - head = filtered.head; - anchor = filtered.anchor; - } - - var sel = doc.sel; - sel.goalColumn = null; - if (bias == null) bias = posLess(head, sel.head) ? -1 : 1; - // Skip over atomic spans. - if (checkAtomic || !posEq(anchor, sel.anchor)) - anchor = skipAtomic(doc, anchor, bias, checkAtomic != "push"); - if (checkAtomic || !posEq(head, sel.head)) - head = skipAtomic(doc, head, bias, checkAtomic != "push"); - - if (posEq(sel.anchor, anchor) && posEq(sel.head, head)) return; - - sel.anchor = anchor; sel.head = head; - var inv = posLess(head, anchor); - sel.from = inv ? head : anchor; - sel.to = inv ? anchor : head; - - if (doc.cm) - doc.cm.curOp.updateInput = doc.cm.curOp.selectionChanged = - doc.cm.curOp.cursorActivity = true; - - signalLater(doc, "cursorActivity", doc); - } - - function reCheckSelection(cm) { - setSelection(cm.doc, cm.doc.sel.from, cm.doc.sel.to, null, "push"); - } - - function skipAtomic(doc, pos, bias, mayClear) { - var flipped = false, curPos = pos; - var dir = bias || 1; - doc.cantEdit = false; - search: for (;;) { - var line = getLine(doc, curPos.line); - if (line.markedSpans) { - for (var i = 0; i < line.markedSpans.length; ++i) { - var sp = line.markedSpans[i], m = sp.marker; - if ((sp.from == null || (m.inclusiveLeft ? sp.from <= curPos.ch : sp.from < curPos.ch)) && - (sp.to == null || (m.inclusiveRight ? sp.to >= curPos.ch : sp.to > curPos.ch))) { - if (mayClear) { - signal(m, "beforeCursorEnter"); - if (m.explicitlyCleared) { - if (!line.markedSpans) break; - else {--i; continue;} - } - } - if (!m.atomic) continue; - var newPos = m.find()[dir < 0 ? "from" : "to"]; - if (posEq(newPos, curPos)) { - newPos.ch += dir; - if (newPos.ch < 0) { - if (newPos.line > doc.first) newPos = clipPos(doc, Pos(newPos.line - 1)); - else newPos = null; - } else if (newPos.ch > line.text.length) { - if (newPos.line < doc.first + doc.size - 1) newPos = Pos(newPos.line + 1, 0); - else newPos = null; - } - if (!newPos) { - if (flipped) { - // Driven in a corner -- no valid cursor position found at all - // -- try again *with* clearing, if we didn't already - if (!mayClear) return skipAtomic(doc, pos, bias, true); - // Otherwise, turn off editing until further notice, and return the start of the doc - doc.cantEdit = true; - return Pos(doc.first, 0); - } - flipped = true; newPos = pos; dir = -dir; - } - } - curPos = newPos; - continue search; - } - } - } - return curPos; - } - } - - // SCROLLING - - function scrollCursorIntoView(cm) { - var coords = scrollPosIntoView(cm, cm.doc.sel.head, null, cm.options.cursorScrollMargin); - if (!cm.state.focused) return; - var display = cm.display, box = getRect(display.sizer), doScroll = null; - if (coords.top + box.top < 0) doScroll = true; - else if (coords.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) doScroll = false; - if (doScroll != null && !phantom) { - var hidden = display.cursor.style.display == "none"; - if (hidden) { - display.cursor.style.display = ""; - display.cursor.style.left = coords.left + "px"; - display.cursor.style.top = (coords.top - display.viewOffset) + "px"; - } - display.cursor.scrollIntoView(doScroll); - if (hidden) display.cursor.style.display = "none"; - } - } - - function scrollPosIntoView(cm, pos, end, margin) { - if (margin == null) margin = 0; - for (;;) { - var changed = false, coords = cursorCoords(cm, pos); - var endCoords = !end || end == pos ? coords : cursorCoords(cm, end); - var scrollPos = calculateScrollPos(cm, Math.min(coords.left, endCoords.left), - Math.min(coords.top, endCoords.top) - margin, - Math.max(coords.left, endCoords.left), - Math.max(coords.bottom, endCoords.bottom) + margin); - var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft; - if (scrollPos.scrollTop != null) { - setScrollTop(cm, scrollPos.scrollTop); - if (Math.abs(cm.doc.scrollTop - startTop) > 1) changed = true; - } - if (scrollPos.scrollLeft != null) { - setScrollLeft(cm, scrollPos.scrollLeft); - if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) changed = true; - } - if (!changed) return coords; - } - } - - function scrollIntoView(cm, x1, y1, x2, y2) { - var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2); - if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop); - if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft); - } - - function calculateScrollPos(cm, x1, y1, x2, y2) { - var display = cm.display, snapMargin = textHeight(cm.display); - if (y1 < 0) y1 = 0; - var screen = display.scroller.clientHeight - scrollerCutOff, screentop = display.scroller.scrollTop, result = {}; - var docBottom = cm.doc.height + paddingVert(display); - var atTop = y1 < snapMargin, atBottom = y2 > docBottom - snapMargin; - if (y1 < screentop) { - result.scrollTop = atTop ? 0 : y1; - } else if (y2 > screentop + screen) { - var newTop = Math.min(y1, (atBottom ? docBottom : y2) - screen); - if (newTop != screentop) result.scrollTop = newTop; - } - - var screenw = display.scroller.clientWidth - scrollerCutOff, screenleft = display.scroller.scrollLeft; - x1 += display.gutters.offsetWidth; x2 += display.gutters.offsetWidth; - var gutterw = display.gutters.offsetWidth; - var atLeft = x1 < gutterw + 10; - if (x1 < screenleft + gutterw || atLeft) { - if (atLeft) x1 = 0; - result.scrollLeft = Math.max(0, x1 - 10 - gutterw); - } else if (x2 > screenw + screenleft - 3) { - result.scrollLeft = x2 + 10 - screenw; - } - return result; - } - - function updateScrollPos(cm, left, top) { - cm.curOp.updateScrollPos = {scrollLeft: left == null ? cm.doc.scrollLeft : left, - scrollTop: top == null ? cm.doc.scrollTop : top}; - } - - function addToScrollPos(cm, left, top) { - var pos = cm.curOp.updateScrollPos || (cm.curOp.updateScrollPos = {scrollLeft: cm.doc.scrollLeft, scrollTop: cm.doc.scrollTop}); - var scroll = cm.display.scroller; - pos.scrollTop = Math.max(0, Math.min(scroll.scrollHeight - scroll.clientHeight, pos.scrollTop + top)); - pos.scrollLeft = Math.max(0, Math.min(scroll.scrollWidth - scroll.clientWidth, pos.scrollLeft + left)); - } - - // API UTILITIES - - function indentLine(cm, n, how, aggressive) { - var doc = cm.doc; - if (how == null) how = "add"; - if (how == "smart") { - if (!cm.doc.mode.indent) how = "prev"; - else var state = getStateBefore(cm, n); - } - - var tabSize = cm.options.tabSize; - var line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize); - var curSpaceString = line.text.match(/^\s*/)[0], indentation; - if (how == "smart") { - indentation = cm.doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text); - if (indentation == Pass) { - if (!aggressive) return; - how = "prev"; - } - } - if (how == "prev") { - if (n > doc.first) indentation = countColumn(getLine(doc, n-1).text, null, tabSize); - else indentation = 0; - } else if (how == "add") { - indentation = curSpace + cm.options.indentUnit; - } else if (how == "subtract") { - indentation = curSpace - cm.options.indentUnit; - } else if (typeof how == "number") { - indentation = curSpace + how; - } - indentation = Math.max(0, indentation); - - var indentString = "", pos = 0; - if (cm.options.indentWithTabs) - for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += "\t";} - if (pos < indentation) indentString += spaceStr(indentation - pos); - - if (indentString != curSpaceString) - replaceRange(cm.doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), "+input"); - else if (doc.sel.head.line == n && doc.sel.head.ch < curSpaceString.length) - setSelection(doc, Pos(n, curSpaceString.length), Pos(n, curSpaceString.length), 1); - line.stateAfter = null; - } - - function changeLine(cm, handle, op) { - var no = handle, line = handle, doc = cm.doc; - if (typeof handle == "number") line = getLine(doc, clipLine(doc, handle)); - else no = lineNo(handle); - if (no == null) return null; - if (op(line, no)) regChange(cm, no, no + 1); - else return null; - return line; - } - - function findPosH(doc, pos, dir, unit, visually) { - var line = pos.line, ch = pos.ch, origDir = dir; - var lineObj = getLine(doc, line); - var possible = true; - function findNextLine() { - var l = line + dir; - if (l < doc.first || l >= doc.first + doc.size) return (possible = false); - line = l; - return lineObj = getLine(doc, l); - } - function moveOnce(boundToLine) { - var next = (visually ? moveVisually : moveLogically)(lineObj, ch, dir, true); - if (next == null) { - if (!boundToLine && findNextLine()) { - if (visually) ch = (dir < 0 ? lineRight : lineLeft)(lineObj); - else ch = dir < 0 ? lineObj.text.length : 0; - } else return (possible = false); - } else ch = next; - return true; - } - - if (unit == "char") moveOnce(); - else if (unit == "column") moveOnce(true); - else if (unit == "word" || unit == "group") { - var sawType = null, group = unit == "group"; - for (var first = true;; first = false) { - if (dir < 0 && !moveOnce(!first)) break; - var cur = lineObj.text.charAt(ch) || "\n"; - var type = isWordChar(cur) ? "w" - : !group ? null - : /\s/.test(cur) ? null - : "p"; - if (sawType && sawType != type) { - if (dir < 0) {dir = 1; moveOnce();} - break; - } - if (type) sawType = type; - if (dir > 0 && !moveOnce(!first)) break; - } - } - var result = skipAtomic(doc, Pos(line, ch), origDir, true); - if (!possible) result.hitSide = true; - return result; - } - - function findPosV(cm, pos, dir, unit) { - var doc = cm.doc, x = pos.left, y; - if (unit == "page") { - var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight); - y = pos.top + dir * (pageSize - (dir < 0 ? 1.5 : .5) * textHeight(cm.display)); - } else if (unit == "line") { - y = dir > 0 ? pos.bottom + 3 : pos.top - 3; - } - for (;;) { - var target = coordsChar(cm, x, y); - if (!target.outside) break; - if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break; } - y += dir * 5; - } - return target; - } - - function findWordAt(line, pos) { - var start = pos.ch, end = pos.ch; - if (line) { - if ((pos.xRel < 0 || end == line.length) && start) --start; else ++end; - var startChar = line.charAt(start); - var check = isWordChar(startChar) ? isWordChar - : /\s/.test(startChar) ? function(ch) {return /\s/.test(ch);} - : function(ch) {return !/\s/.test(ch) && !isWordChar(ch);}; - while (start > 0 && check(line.charAt(start - 1))) --start; - while (end < line.length && check(line.charAt(end))) ++end; - } - return {from: Pos(pos.line, start), to: Pos(pos.line, end)}; - } - - function selectLine(cm, line) { - extendSelection(cm.doc, Pos(line, 0), clipPos(cm.doc, Pos(line + 1, 0))); - } - - // PROTOTYPE - - // The publicly visible API. Note that operation(null, f) means - // 'wrap f in an operation, performed on its `this` parameter' - - CodeMirror.prototype = { - constructor: CodeMirror, - focus: function(){window.focus(); focusInput(this); fastPoll(this);}, - - setOption: function(option, value) { - var options = this.options, old = options[option]; - if (options[option] == value && option != "mode") return; - options[option] = value; - if (optionHandlers.hasOwnProperty(option)) - operation(this, optionHandlers[option])(this, value, old); - }, - - getOption: function(option) {return this.options[option];}, - getDoc: function() {return this.doc;}, - - addKeyMap: function(map, bottom) { - this.state.keyMaps[bottom ? "push" : "unshift"](map); - }, - removeKeyMap: function(map) { - var maps = this.state.keyMaps; - for (var i = 0; i < maps.length; ++i) - if (maps[i] == map || (typeof maps[i] != "string" && maps[i].name == map)) { - maps.splice(i, 1); - return true; - } - }, - - addOverlay: operation(null, function(spec, options) { - var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec); - if (mode.startState) throw new Error("Overlays may not be stateful."); - this.state.overlays.push({mode: mode, modeSpec: spec, opaque: options && options.opaque}); - this.state.modeGen++; - regChange(this); - }), - removeOverlay: operation(null, function(spec) { - var overlays = this.state.overlays; - for (var i = 0; i < overlays.length; ++i) { - var cur = overlays[i].modeSpec; - if (cur == spec || typeof spec == "string" && cur.name == spec) { - overlays.splice(i, 1); - this.state.modeGen++; - regChange(this); - return; - } - } - }), - - indentLine: operation(null, function(n, dir, aggressive) { - if (typeof dir != "string" && typeof dir != "number") { - if (dir == null) dir = this.options.smartIndent ? "smart" : "prev"; - else dir = dir ? "add" : "subtract"; - } - if (isLine(this.doc, n)) indentLine(this, n, dir, aggressive); - }), - indentSelection: operation(null, function(how) { - var sel = this.doc.sel; - if (posEq(sel.from, sel.to)) return indentLine(this, sel.from.line, how); - var e = sel.to.line - (sel.to.ch ? 0 : 1); - for (var i = sel.from.line; i <= e; ++i) indentLine(this, i, how); - }), - - // Fetch the parser token for a given character. Useful for hacks - // that want to inspect the mode state (say, for completion). - getTokenAt: function(pos, precise) { - var doc = this.doc; - pos = clipPos(doc, pos); - var state = getStateBefore(this, pos.line, precise), mode = this.doc.mode; - var line = getLine(doc, pos.line); - var stream = new StringStream(line.text, this.options.tabSize); - while (stream.pos < pos.ch && !stream.eol()) { - stream.start = stream.pos; - var style = mode.token(stream, state); - } - return {start: stream.start, - end: stream.pos, - string: stream.current(), - className: style || null, // Deprecated, use 'type' instead - type: style || null, - state: state}; - }, - - getTokenTypeAt: function(pos) { - pos = clipPos(this.doc, pos); - var styles = getLineStyles(this, getLine(this.doc, pos.line)); - var before = 0, after = (styles.length - 1) / 2, ch = pos.ch; - if (ch == 0) return styles[2]; - for (;;) { - var mid = (before + after) >> 1; - if ((mid ? styles[mid * 2 - 1] : 0) >= ch) after = mid; - else if (styles[mid * 2 + 1] < ch) before = mid + 1; - else return styles[mid * 2 + 2]; - } - }, - - getModeAt: function(pos) { - var mode = this.doc.mode; - if (!mode.innerMode) return mode; - return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode; - }, - - getHelper: function(pos, type) { - if (!helpers.hasOwnProperty(type)) return; - var help = helpers[type], mode = this.getModeAt(pos); - return mode[type] && help[mode[type]] || - mode.helperType && help[mode.helperType] || - help[mode.name]; - }, - - getStateAfter: function(line, precise) { - var doc = this.doc; - line = clipLine(doc, line == null ? doc.first + doc.size - 1: line); - return getStateBefore(this, line + 1, precise); - }, - - cursorCoords: function(start, mode) { - var pos, sel = this.doc.sel; - if (start == null) pos = sel.head; - else if (typeof start == "object") pos = clipPos(this.doc, start); - else pos = start ? sel.from : sel.to; - return cursorCoords(this, pos, mode || "page"); - }, - - charCoords: function(pos, mode) { - return charCoords(this, clipPos(this.doc, pos), mode || "page"); - }, - - coordsChar: function(coords, mode) { - coords = fromCoordSystem(this, coords, mode || "page"); - return coordsChar(this, coords.left, coords.top); - }, - - lineAtHeight: function(height, mode) { - height = fromCoordSystem(this, {top: height, left: 0}, mode || "page").top; - return lineAtHeight(this.doc, height + this.display.viewOffset); - }, - heightAtLine: function(line, mode) { - var end = false, last = this.doc.first + this.doc.size - 1; - if (line < this.doc.first) line = this.doc.first; - else if (line > last) { line = last; end = true; } - var lineObj = getLine(this.doc, line); - return intoCoordSystem(this, getLine(this.doc, line), {top: 0, left: 0}, mode || "page").top + - (end ? lineObj.height : 0); - }, - - defaultTextHeight: function() { return textHeight(this.display); }, - defaultCharWidth: function() { return charWidth(this.display); }, - - setGutterMarker: operation(null, function(line, gutterID, value) { - return changeLine(this, line, function(line) { - var markers = line.gutterMarkers || (line.gutterMarkers = {}); - markers[gutterID] = value; - if (!value && isEmpty(markers)) line.gutterMarkers = null; - return true; - }); - }), - - clearGutter: operation(null, function(gutterID) { - var cm = this, doc = cm.doc, i = doc.first; - doc.iter(function(line) { - if (line.gutterMarkers && line.gutterMarkers[gutterID]) { - line.gutterMarkers[gutterID] = null; - regChange(cm, i, i + 1); - if (isEmpty(line.gutterMarkers)) line.gutterMarkers = null; - } - ++i; - }); - }), - - addLineClass: operation(null, function(handle, where, cls) { - return changeLine(this, handle, function(line) { - var prop = where == "text" ? "textClass" : where == "background" ? "bgClass" : "wrapClass"; - if (!line[prop]) line[prop] = cls; - else if (new RegExp("(?:^|\\s)" + cls + "(?:$|\\s)").test(line[prop])) return false; - else line[prop] += " " + cls; - return true; - }); - }), - - removeLineClass: operation(null, function(handle, where, cls) { - return changeLine(this, handle, function(line) { - var prop = where == "text" ? "textClass" : where == "background" ? "bgClass" : "wrapClass"; - var cur = line[prop]; - if (!cur) return false; - else if (cls == null) line[prop] = null; - else { - var found = cur.match(new RegExp("(?:^|\\s+)" + cls + "(?:$|\\s+)")); - if (!found) return false; - var end = found.index + found[0].length; - line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? "" : " ") + cur.slice(end) || null; - } - return true; - }); - }), - - addLineWidget: operation(null, function(handle, node, options) { - return addLineWidget(this, handle, node, options); - }), - - removeLineWidget: function(widget) { widget.clear(); }, - - lineInfo: function(line) { - if (typeof line == "number") { - if (!isLine(this.doc, line)) return null; - var n = line; - line = getLine(this.doc, line); - if (!line) return null; - } else { - var n = lineNo(line); - if (n == null) return null; - } - return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers, - textClass: line.textClass, bgClass: line.bgClass, wrapClass: line.wrapClass, - widgets: line.widgets}; - }, - - getViewport: function() { return {from: this.display.showingFrom, to: this.display.showingTo};}, - - addWidget: function(pos, node, scroll, vert, horiz) { - var display = this.display; - pos = cursorCoords(this, clipPos(this.doc, pos)); - var top = pos.bottom, left = pos.left; - node.style.position = "absolute"; - display.sizer.appendChild(node); - if (vert == "over") { - top = pos.top; - } else if (vert == "above" || vert == "near") { - var vspace = Math.max(display.wrapper.clientHeight, this.doc.height), - hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth); - // Default to positioning above (if specified and possible); otherwise default to positioning below - if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight) - top = pos.top - node.offsetHeight; - else if (pos.bottom + node.offsetHeight <= vspace) - top = pos.bottom; - if (left + node.offsetWidth > hspace) - left = hspace - node.offsetWidth; - } - node.style.top = top + "px"; - node.style.left = node.style.right = ""; - if (horiz == "right") { - left = display.sizer.clientWidth - node.offsetWidth; - node.style.right = "0px"; - } else { - if (horiz == "left") left = 0; - else if (horiz == "middle") left = (display.sizer.clientWidth - node.offsetWidth) / 2; - node.style.left = left + "px"; - } - if (scroll) - scrollIntoView(this, left, top, left + node.offsetWidth, top + node.offsetHeight); - }, - - triggerOnKeyDown: operation(null, onKeyDown), - - execCommand: function(cmd) {return commands[cmd](this);}, - - findPosH: function(from, amount, unit, visually) { - var dir = 1; - if (amount < 0) { dir = -1; amount = -amount; } - for (var i = 0, cur = clipPos(this.doc, from); i < amount; ++i) { - cur = findPosH(this.doc, cur, dir, unit, visually); - if (cur.hitSide) break; - } - return cur; - }, - - moveH: operation(null, function(dir, unit) { - var sel = this.doc.sel, pos; - if (sel.shift || sel.extend || posEq(sel.from, sel.to)) - pos = findPosH(this.doc, sel.head, dir, unit, this.options.rtlMoveVisually); - else - pos = dir < 0 ? sel.from : sel.to; - extendSelection(this.doc, pos, pos, dir); - }), - - deleteH: operation(null, function(dir, unit) { - var sel = this.doc.sel; - if (!posEq(sel.from, sel.to)) replaceRange(this.doc, "", sel.from, sel.to, "+delete"); - else replaceRange(this.doc, "", sel.from, findPosH(this.doc, sel.head, dir, unit, false), "+delete"); - this.curOp.userSelChange = true; - }), - - findPosV: function(from, amount, unit, goalColumn) { - var dir = 1, x = goalColumn; - if (amount < 0) { dir = -1; amount = -amount; } - for (var i = 0, cur = clipPos(this.doc, from); i < amount; ++i) { - var coords = cursorCoords(this, cur, "div"); - if (x == null) x = coords.left; - else coords.left = x; - cur = findPosV(this, coords, dir, unit); - if (cur.hitSide) break; - } - return cur; - }, - - moveV: operation(null, function(dir, unit) { - var sel = this.doc.sel; - var pos = cursorCoords(this, sel.head, "div"); - if (sel.goalColumn != null) pos.left = sel.goalColumn; - var target = findPosV(this, pos, dir, unit); - - if (unit == "page") addToScrollPos(this, 0, charCoords(this, target, "div").top - pos.top); - extendSelection(this.doc, target, target, dir); - sel.goalColumn = pos.left; - }), - - toggleOverwrite: function(value) { - if (value != null && value == this.state.overwrite) return; - if (this.state.overwrite = !this.state.overwrite) - this.display.cursor.className += " CodeMirror-overwrite"; - else - this.display.cursor.className = this.display.cursor.className.replace(" CodeMirror-overwrite", ""); - }, - hasFocus: function() { return this.state.focused; }, - - scrollTo: operation(null, function(x, y) { - updateScrollPos(this, x, y); - }), - getScrollInfo: function() { - var scroller = this.display.scroller, co = scrollerCutOff; - return {left: scroller.scrollLeft, top: scroller.scrollTop, - height: scroller.scrollHeight - co, width: scroller.scrollWidth - co, - clientHeight: scroller.clientHeight - co, clientWidth: scroller.clientWidth - co}; - }, - - scrollIntoView: operation(null, function(range, margin) { - if (range == null) range = {from: this.doc.sel.head, to: null}; - else if (typeof range == "number") range = {from: Pos(range, 0), to: null}; - else if (range.from == null) range = {from: range, to: null}; - if (!range.to) range.to = range.from; - if (!margin) margin = 0; - - var coords = range; - if (range.from.line != null) { - this.curOp.scrollToPos = {from: range.from, to: range.to, margin: margin}; - coords = {from: cursorCoords(this, range.from), - to: cursorCoords(this, range.to)}; - } - var sPos = calculateScrollPos(this, Math.min(coords.from.left, coords.to.left), - Math.min(coords.from.top, coords.to.top) - margin, - Math.max(coords.from.right, coords.to.right), - Math.max(coords.from.bottom, coords.to.bottom) + margin); - updateScrollPos(this, sPos.scrollLeft, sPos.scrollTop); - }), - - setSize: operation(null, function(width, height) { - function interpret(val) { - return typeof val == "number" || /^\d+$/.test(String(val)) ? val + "px" : val; - } - if (width != null) this.display.wrapper.style.width = interpret(width); - if (height != null) this.display.wrapper.style.height = interpret(height); - if (this.options.lineWrapping) - this.display.measureLineCache.length = this.display.measureLineCachePos = 0; - this.curOp.forceUpdate = true; - }), - - operation: function(f){return runInOp(this, f);}, - - refresh: operation(null, function() { - var badHeight = this.display.cachedTextHeight == null; - clearCaches(this); - updateScrollPos(this, this.doc.scrollLeft, this.doc.scrollTop); - regChange(this); - if (badHeight) estimateLineHeights(this); - }), - - swapDoc: operation(null, function(doc) { - var old = this.doc; - old.cm = null; - attachDoc(this, doc); - clearCaches(this); - resetInput(this, true); - updateScrollPos(this, doc.scrollLeft, doc.scrollTop); - signalLater(this, "swapDoc", this, old); - return old; - }), - - getInputField: function(){return this.display.input;}, - getWrapperElement: function(){return this.display.wrapper;}, - getScrollerElement: function(){return this.display.scroller;}, - getGutterElement: function(){return this.display.gutters;} - }; - eventMixin(CodeMirror); - - // OPTION DEFAULTS - - var optionHandlers = CodeMirror.optionHandlers = {}; - - // The default configuration options. - var defaults = CodeMirror.defaults = {}; - - function option(name, deflt, handle, notOnInit) { - CodeMirror.defaults[name] = deflt; - if (handle) optionHandlers[name] = - notOnInit ? function(cm, val, old) {if (old != Init) handle(cm, val, old);} : handle; - } - - var Init = CodeMirror.Init = {toString: function(){return "CodeMirror.Init";}}; - - // These two are, on init, called from the constructor because they - // have to be initialized before the editor can start at all. - option("value", "", function(cm, val) { - cm.setValue(val); - }, true); - option("mode", null, function(cm, val) { - cm.doc.modeOption = val; - loadMode(cm); - }, true); - - option("indentUnit", 2, loadMode, true); - option("indentWithTabs", false); - option("smartIndent", true); - option("tabSize", 4, function(cm) { - loadMode(cm); - clearCaches(cm); - regChange(cm); - }, true); - option("specialChars", /[\t\u0000-\u0019\u00ad\u200b\u2028\u2029\ufeff]/g, function(cm, val) { - cm.options.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g"); - cm.refresh(); - }, true); - option("specialCharPlaceholder", defaultSpecialCharPlaceholder, function(cm) {cm.refresh();}, true); - option("electricChars", true); - option("rtlMoveVisually", !windows); - option("wholeLineUpdateBefore", true); - - option("theme", "default", function(cm) { - themeChanged(cm); - guttersChanged(cm); - }, true); - option("keyMap", "default", keyMapChanged); - option("extraKeys", null); - - option("onKeyEvent", null); - option("onDragEvent", null); - - option("lineWrapping", false, wrappingChanged, true); - option("gutters", [], function(cm) { - setGuttersForLineNumbers(cm.options); - guttersChanged(cm); - }, true); - option("fixedGutter", true, function(cm, val) { - cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + "px" : "0"; - cm.refresh(); - }, true); - option("coverGutterNextToScrollbar", false, updateScrollbars, true); - option("lineNumbers", false, function(cm) { - setGuttersForLineNumbers(cm.options); - guttersChanged(cm); - }, true); - option("firstLineNumber", 1, guttersChanged, true); - option("lineNumberFormatter", function(integer) {return integer;}, guttersChanged, true); - option("showCursorWhenSelecting", false, updateSelection, true); - - option("resetSelectionOnContextMenu", true); - - option("readOnly", false, function(cm, val) { - if (val == "nocursor") { - onBlur(cm); - cm.display.input.blur(); - cm.display.disabled = true; - } else { - cm.display.disabled = false; - if (!val) resetInput(cm, true); - } - }); - option("dragDrop", true); - - option("cursorBlinkRate", 530); - option("cursorScrollMargin", 0); - option("cursorHeight", 1); - option("workTime", 100); - option("workDelay", 100); - option("flattenSpans", true); - option("pollInterval", 100); - option("undoDepth", 40, function(cm, val){cm.doc.history.undoDepth = val;}); - option("historyEventDelay", 500); - option("viewportMargin", 10, function(cm){cm.refresh();}, true); - option("maxHighlightLength", 10000, function(cm){loadMode(cm); cm.refresh();}, true); - option("crudeMeasuringFrom", 10000); - option("moveInputWithCursor", true, function(cm, val) { - if (!val) cm.display.inputDiv.style.top = cm.display.inputDiv.style.left = 0; - }); - - option("tabindex", null, function(cm, val) { - cm.display.input.tabIndex = val || ""; - }); - option("autofocus", null); - - // MODE DEFINITION AND QUERYING - - // Known modes, by name and by MIME - var modes = CodeMirror.modes = {}, mimeModes = CodeMirror.mimeModes = {}; - - CodeMirror.defineMode = function(name, mode) { - if (!CodeMirror.defaults.mode && name != "null") CodeMirror.defaults.mode = name; - if (arguments.length > 2) { - mode.dependencies = []; - for (var i = 2; i < arguments.length; ++i) mode.dependencies.push(arguments[i]); - } - modes[name] = mode; - }; - - CodeMirror.defineMIME = function(mime, spec) { - mimeModes[mime] = spec; - }; - - CodeMirror.resolveMode = function(spec) { - if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) { - spec = mimeModes[spec]; - } else if (spec && typeof spec.name == "string" && mimeModes.hasOwnProperty(spec.name)) { - var found = mimeModes[spec.name]; - spec = createObj(found, spec); - spec.name = found.name; - } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec)) { - return CodeMirror.resolveMode("application/xml"); - } - if (typeof spec == "string") return {name: spec}; - else return spec || {name: "null"}; - }; - - CodeMirror.getMode = function(options, spec) { - var spec = CodeMirror.resolveMode(spec); - var mfactory = modes[spec.name]; - if (!mfactory) return CodeMirror.getMode(options, "text/plain"); - var modeObj = mfactory(options, spec); - if (modeExtensions.hasOwnProperty(spec.name)) { - var exts = modeExtensions[spec.name]; - for (var prop in exts) { - if (!exts.hasOwnProperty(prop)) continue; - if (modeObj.hasOwnProperty(prop)) modeObj["_" + prop] = modeObj[prop]; - modeObj[prop] = exts[prop]; - } - } - modeObj.name = spec.name; - - return modeObj; - }; - - CodeMirror.defineMode("null", function() { - return {token: function(stream) {stream.skipToEnd();}}; - }); - CodeMirror.defineMIME("text/plain", "null"); - - var modeExtensions = CodeMirror.modeExtensions = {}; - CodeMirror.extendMode = function(mode, properties) { - var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {}); - copyObj(properties, exts); - }; - - // EXTENSIONS - - CodeMirror.defineExtension = function(name, func) { - CodeMirror.prototype[name] = func; - }; - CodeMirror.defineDocExtension = function(name, func) { - Doc.prototype[name] = func; - }; - CodeMirror.defineOption = option; - - var initHooks = []; - CodeMirror.defineInitHook = function(f) {initHooks.push(f);}; - - var helpers = CodeMirror.helpers = {}; - CodeMirror.registerHelper = function(type, name, value) { - if (!helpers.hasOwnProperty(type)) helpers[type] = CodeMirror[type] = {}; - helpers[type][name] = value; - }; - - // UTILITIES - - CodeMirror.isWordChar = isWordChar; - - // MODE STATE HANDLING - - // Utility functions for working with state. Exported because modes - // sometimes need to do this. - function copyState(mode, state) { - if (state === true) return state; - if (mode.copyState) return mode.copyState(state); - var nstate = {}; - for (var n in state) { - var val = state[n]; - if (val instanceof Array) val = val.concat([]); - nstate[n] = val; - } - return nstate; - } - CodeMirror.copyState = copyState; - - function startState(mode, a1, a2) { - return mode.startState ? mode.startState(a1, a2) : true; - } - CodeMirror.startState = startState; - - CodeMirror.innerMode = function(mode, state) { - while (mode.innerMode) { - var info = mode.innerMode(state); - if (!info || info.mode == mode) break; - state = info.state; - mode = info.mode; - } - return info || {mode: mode, state: state}; - }; - - // STANDARD COMMANDS - - var commands = CodeMirror.commands = { - selectAll: function(cm) {cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()));}, - killLine: function(cm) { - var from = cm.getCursor(true), to = cm.getCursor(false), sel = !posEq(from, to); - if (!sel && cm.getLine(from.line).length == from.ch) - cm.replaceRange("", from, Pos(from.line + 1, 0), "+delete"); - else cm.replaceRange("", from, sel ? to : Pos(from.line), "+delete"); - }, - deleteLine: function(cm) { - var l = cm.getCursor().line; - cm.replaceRange("", Pos(l, 0), Pos(l), "+delete"); - }, - delLineLeft: function(cm) { - var cur = cm.getCursor(); - cm.replaceRange("", Pos(cur.line, 0), cur, "+delete"); - }, - undo: function(cm) {cm.undo();}, - redo: function(cm) {cm.redo();}, - goDocStart: function(cm) {cm.extendSelection(Pos(cm.firstLine(), 0));}, - goDocEnd: function(cm) {cm.extendSelection(Pos(cm.lastLine()));}, - goLineStart: function(cm) { - cm.extendSelection(lineStart(cm, cm.getCursor().line)); - }, - goLineStartSmart: function(cm) { - var cur = cm.getCursor(), start = lineStart(cm, cur.line); - var line = cm.getLineHandle(start.line); - var order = getOrder(line); - if (!order || order[0].level == 0) { - var firstNonWS = Math.max(0, line.text.search(/\S/)); - var inWS = cur.line == start.line && cur.ch <= firstNonWS && cur.ch; - cm.extendSelection(Pos(start.line, inWS ? 0 : firstNonWS)); - } else cm.extendSelection(start); - }, - goLineEnd: function(cm) { - cm.extendSelection(lineEnd(cm, cm.getCursor().line)); - }, - goLineRight: function(cm) { - var top = cm.charCoords(cm.getCursor(), "div").top + 5; - cm.extendSelection(cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div")); - }, - goLineLeft: function(cm) { - var top = cm.charCoords(cm.getCursor(), "div").top + 5; - cm.extendSelection(cm.coordsChar({left: 0, top: top}, "div")); - }, - goLineUp: function(cm) {cm.moveV(-1, "line");}, - goLineDown: function(cm) {cm.moveV(1, "line");}, - goPageUp: function(cm) {cm.moveV(-1, "page");}, - goPageDown: function(cm) {cm.moveV(1, "page");}, - goCharLeft: function(cm) {cm.moveH(-1, "char");}, - goCharRight: function(cm) {cm.moveH(1, "char");}, - goColumnLeft: function(cm) {cm.moveH(-1, "column");}, - goColumnRight: function(cm) {cm.moveH(1, "column");}, - goWordLeft: function(cm) {cm.moveH(-1, "word");}, - goGroupRight: function(cm) {cm.moveH(1, "group");}, - goGroupLeft: function(cm) {cm.moveH(-1, "group");}, - goWordRight: function(cm) {cm.moveH(1, "word");}, - delCharBefore: function(cm) {cm.deleteH(-1, "char");}, - delCharAfter: function(cm) {cm.deleteH(1, "char");}, - delWordBefore: function(cm) {cm.deleteH(-1, "word");}, - delWordAfter: function(cm) {cm.deleteH(1, "word");}, - delGroupBefore: function(cm) {cm.deleteH(-1, "group");}, - delGroupAfter: function(cm) {cm.deleteH(1, "group");}, - indentAuto: function(cm) {cm.indentSelection("smart");}, - indentMore: function(cm) {cm.indentSelection("add");}, - indentLess: function(cm) {cm.indentSelection("subtract");}, - insertTab: function(cm) {cm.replaceSelection("\t", "end", "+input");}, - defaultTab: function(cm) { - if (cm.somethingSelected()) cm.indentSelection("add"); - else cm.replaceSelection("\t", "end", "+input"); - }, - transposeChars: function(cm) { - var cur = cm.getCursor(), line = cm.getLine(cur.line); - if (cur.ch > 0 && cur.ch < line.length - 1) - cm.replaceRange(line.charAt(cur.ch) + line.charAt(cur.ch - 1), - Pos(cur.line, cur.ch - 1), Pos(cur.line, cur.ch + 1)); - }, - newlineAndIndent: function(cm) { - operation(cm, function() { - cm.replaceSelection("\n", "end", "+input"); - cm.indentLine(cm.getCursor().line, null, true); - })(); - }, - toggleOverwrite: function(cm) {cm.toggleOverwrite();} - }; - - // STANDARD KEYMAPS - - var keyMap = CodeMirror.keyMap = {}; - keyMap.basic = { - "Left": "goCharLeft", "Right": "goCharRight", "Up": "goLineUp", "Down": "goLineDown", - "End": "goLineEnd", "Home": "goLineStartSmart", "PageUp": "goPageUp", "PageDown": "goPageDown", - "Delete": "delCharAfter", "Backspace": "delCharBefore", "Shift-Backspace": "delCharBefore", - "Tab": "defaultTab", "Shift-Tab": "indentAuto", - "Enter": "newlineAndIndent", "Insert": "toggleOverwrite" - }; - // Note that the save and find-related commands aren't defined by - // default. Unknown commands are simply ignored. - keyMap.pcDefault = { - "Ctrl-A": "selectAll", "Ctrl-D": "deleteLine", "Ctrl-Z": "undo", "Shift-Ctrl-Z": "redo", "Ctrl-Y": "redo", - "Ctrl-Home": "goDocStart", "Alt-Up": "goDocStart", "Ctrl-End": "goDocEnd", "Ctrl-Down": "goDocEnd", - "Ctrl-Left": "goGroupLeft", "Ctrl-Right": "goGroupRight", "Alt-Left": "goLineStart", "Alt-Right": "goLineEnd", - "Ctrl-Backspace": "delGroupBefore", "Ctrl-Delete": "delGroupAfter", "Ctrl-S": "save", "Ctrl-F": "find", - "Ctrl-G": "findNext", "Shift-Ctrl-G": "findPrev", "Shift-Ctrl-F": "replace", "Shift-Ctrl-R": "replaceAll", - "Ctrl-[": "indentLess", "Ctrl-]": "indentMore", - fallthrough: "basic" - }; - keyMap.macDefault = { - "Cmd-A": "selectAll", "Cmd-D": "deleteLine", "Cmd-Z": "undo", "Shift-Cmd-Z": "redo", "Cmd-Y": "redo", - "Cmd-Up": "goDocStart", "Cmd-End": "goDocEnd", "Cmd-Down": "goDocEnd", "Alt-Left": "goGroupLeft", - "Alt-Right": "goGroupRight", "Cmd-Left": "goLineStart", "Cmd-Right": "goLineEnd", "Alt-Backspace": "delGroupBefore", - "Ctrl-Alt-Backspace": "delGroupAfter", "Alt-Delete": "delGroupAfter", "Cmd-S": "save", "Cmd-F": "find", - "Cmd-G": "findNext", "Shift-Cmd-G": "findPrev", "Cmd-Alt-F": "replace", "Shift-Cmd-Alt-F": "replaceAll", - "Cmd-[": "indentLess", "Cmd-]": "indentMore", "Cmd-Backspace": "delLineLeft", - fallthrough: ["basic", "emacsy"] - }; - keyMap["default"] = mac ? keyMap.macDefault : keyMap.pcDefault; - keyMap.emacsy = { - "Ctrl-F": "goCharRight", "Ctrl-B": "goCharLeft", "Ctrl-P": "goLineUp", "Ctrl-N": "goLineDown", - "Alt-F": "goWordRight", "Alt-B": "goWordLeft", "Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd", - "Ctrl-V": "goPageDown", "Shift-Ctrl-V": "goPageUp", "Ctrl-D": "delCharAfter", "Ctrl-H": "delCharBefore", - "Alt-D": "delWordAfter", "Alt-Backspace": "delWordBefore", "Ctrl-K": "killLine", "Ctrl-T": "transposeChars" - }; - - // KEYMAP DISPATCH - - function getKeyMap(val) { - if (typeof val == "string") return keyMap[val]; - else return val; - } - - function lookupKey(name, maps, handle) { - function lookup(map) { - map = getKeyMap(map); - var found = map[name]; - if (found === false) return "stop"; - if (found != null && handle(found)) return true; - if (map.nofallthrough) return "stop"; - - var fallthrough = map.fallthrough; - if (fallthrough == null) return false; - if (Object.prototype.toString.call(fallthrough) != "[object Array]") - return lookup(fallthrough); - for (var i = 0, e = fallthrough.length; i < e; ++i) { - var done = lookup(fallthrough[i]); - if (done) return done; - } - return false; - } - - for (var i = 0; i < maps.length; ++i) { - var done = lookup(maps[i]); - if (done) return done != "stop"; - } - } - function isModifierKey(event) { - var name = keyNames[event.keyCode]; - return name == "Ctrl" || name == "Alt" || name == "Shift" || name == "Mod"; - } - function keyName(event, noShift) { - if (opera && event.keyCode == 34 && event["char"]) return false; - var name = keyNames[event.keyCode]; - if (name == null || event.altGraphKey) return false; - if (event.altKey) name = "Alt-" + name; - if (flipCtrlCmd ? event.metaKey : event.ctrlKey) name = "Ctrl-" + name; - if (flipCtrlCmd ? event.ctrlKey : event.metaKey) name = "Cmd-" + name; - if (!noShift && event.shiftKey) name = "Shift-" + name; - return name; - } - CodeMirror.lookupKey = lookupKey; - CodeMirror.isModifierKey = isModifierKey; - CodeMirror.keyName = keyName; - - // FROMTEXTAREA - - CodeMirror.fromTextArea = function(textarea, options) { - if (!options) options = {}; - options.value = textarea.value; - if (!options.tabindex && textarea.tabindex) - options.tabindex = textarea.tabindex; - if (!options.placeholder && textarea.placeholder) - options.placeholder = textarea.placeholder; - // Set autofocus to true if this textarea is focused, or if it has - // autofocus and no other element is focused. - if (options.autofocus == null) { - var hasFocus = document.body; - // doc.activeElement occasionally throws on IE - try { hasFocus = document.activeElement; } catch(e) {} - options.autofocus = hasFocus == textarea || - textarea.getAttribute("autofocus") != null && hasFocus == document.body; - } - - function save() {textarea.value = cm.getValue();} - if (textarea.form) { - on(textarea.form, "submit", save); - // Deplorable hack to make the submit method do the right thing. - if (!options.leaveSubmitMethodAlone) { - var form = textarea.form, realSubmit = form.submit; - try { - var wrappedSubmit = form.submit = function() { - save(); - form.submit = realSubmit; - form.submit(); - form.submit = wrappedSubmit; - }; - } catch(e) {} - } - } - - textarea.style.display = "none"; - var cm = CodeMirror(function(node) { - textarea.parentNode.insertBefore(node, textarea.nextSibling); - }, options); - cm.save = save; - cm.getTextArea = function() { return textarea; }; - cm.toTextArea = function() { - save(); - textarea.parentNode.removeChild(cm.getWrapperElement()); - textarea.style.display = ""; - if (textarea.form) { - off(textarea.form, "submit", save); - if (typeof textarea.form.submit == "function") - textarea.form.submit = realSubmit; - } - }; - return cm; - }; - - // STRING STREAM - - // Fed to the mode parsers, provides helper functions to make - // parsers more succinct. - - // The character stream used by a mode's parser. - function StringStream(string, tabSize) { - this.pos = this.start = 0; - this.string = string; - this.tabSize = tabSize || 8; - this.lastColumnPos = this.lastColumnValue = 0; - } - - StringStream.prototype = { - eol: function() {return this.pos >= this.string.length;}, - sol: function() {return this.pos == 0;}, - peek: function() {return this.string.charAt(this.pos) || undefined;}, - next: function() { - if (this.pos < this.string.length) - return this.string.charAt(this.pos++); - }, - eat: function(match) { - var ch = this.string.charAt(this.pos); - if (typeof match == "string") var ok = ch == match; - else var ok = ch && (match.test ? match.test(ch) : match(ch)); - if (ok) {++this.pos; return ch;} - }, - eatWhile: function(match) { - var start = this.pos; - while (this.eat(match)){} - return this.pos > start; - }, - eatSpace: function() { - var start = this.pos; - while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos; - return this.pos > start; - }, - skipToEnd: function() {this.pos = this.string.length;}, - skipTo: function(ch) { - var found = this.string.indexOf(ch, this.pos); - if (found > -1) {this.pos = found; return true;} - }, - backUp: function(n) {this.pos -= n;}, - column: function() { - if (this.lastColumnPos < this.start) { - this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue); - this.lastColumnPos = this.start; - } - return this.lastColumnValue; - }, - indentation: function() {return countColumn(this.string, null, this.tabSize);}, - match: function(pattern, consume, caseInsensitive) { - if (typeof pattern == "string") { - var cased = function(str) {return caseInsensitive ? str.toLowerCase() : str;}; - var substr = this.string.substr(this.pos, pattern.length); - if (cased(substr) == cased(pattern)) { - if (consume !== false) this.pos += pattern.length; - return true; - } - } else { - var match = this.string.slice(this.pos).match(pattern); - if (match && match.index > 0) return null; - if (match && consume !== false) this.pos += match[0].length; - return match; - } - }, - current: function(){return this.string.slice(this.start, this.pos);} - }; - CodeMirror.StringStream = StringStream; - - // TEXTMARKERS - - function TextMarker(doc, type) { - this.lines = []; - this.type = type; - this.doc = doc; - } - CodeMirror.TextMarker = TextMarker; - eventMixin(TextMarker); - - TextMarker.prototype.clear = function() { - if (this.explicitlyCleared) return; - var cm = this.doc.cm, withOp = cm && !cm.curOp; - if (withOp) startOperation(cm); - if (hasHandler(this, "clear")) { - var found = this.find(); - if (found) signalLater(this, "clear", found.from, found.to); - } - var min = null, max = null; - for (var i = 0; i < this.lines.length; ++i) { - var line = this.lines[i]; - var span = getMarkedSpanFor(line.markedSpans, this); - if (span.to != null) max = lineNo(line); - line.markedSpans = removeMarkedSpan(line.markedSpans, span); - if (span.from != null) - min = lineNo(line); - else if (this.collapsed && !lineIsHidden(this.doc, line) && cm) - updateLineHeight(line, textHeight(cm.display)); - } - if (cm && this.collapsed && !cm.options.lineWrapping) for (var i = 0; i < this.lines.length; ++i) { - var visual = visualLine(cm.doc, this.lines[i]), len = lineLength(cm.doc, visual); - if (len > cm.display.maxLineLength) { - cm.display.maxLine = visual; - cm.display.maxLineLength = len; - cm.display.maxLineChanged = true; - } - } - - if (min != null && cm) regChange(cm, min, max + 1); - this.lines.length = 0; - this.explicitlyCleared = true; - if (this.atomic && this.doc.cantEdit) { - this.doc.cantEdit = false; - if (cm) reCheckSelection(cm); - } - if (withOp) endOperation(cm); - }; - - TextMarker.prototype.find = function() { - var from, to; - for (var i = 0; i < this.lines.length; ++i) { - var line = this.lines[i]; - var span = getMarkedSpanFor(line.markedSpans, this); - if (span.from != null || span.to != null) { - var found = lineNo(line); - if (span.from != null) from = Pos(found, span.from); - if (span.to != null) to = Pos(found, span.to); - } - } - if (this.type == "bookmark") return from; - return from && {from: from, to: to}; - }; - - TextMarker.prototype.changed = function() { - var pos = this.find(), cm = this.doc.cm; - if (!pos || !cm) return; - if (this.type != "bookmark") pos = pos.from; - var line = getLine(this.doc, pos.line); - clearCachedMeasurement(cm, line); - if (pos.line >= cm.display.showingFrom && pos.line < cm.display.showingTo) { - for (var node = cm.display.lineDiv.firstChild; node; node = node.nextSibling) if (node.lineObj == line) { - if (node.offsetHeight != line.height) updateLineHeight(line, node.offsetHeight); - break; - } - runInOp(cm, function() { - cm.curOp.selectionChanged = cm.curOp.forceUpdate = cm.curOp.updateMaxLine = true; - }); - } - }; - - TextMarker.prototype.attachLine = function(line) { - if (!this.lines.length && this.doc.cm) { - var op = this.doc.cm.curOp; - if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1) - (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this); - } - this.lines.push(line); - }; - TextMarker.prototype.detachLine = function(line) { - this.lines.splice(indexOf(this.lines, line), 1); - if (!this.lines.length && this.doc.cm) { - var op = this.doc.cm.curOp; - (op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this); - } - }; - - function markText(doc, from, to, options, type) { - if (options && options.shared) return markTextShared(doc, from, to, options, type); - if (doc.cm && !doc.cm.curOp) return operation(doc.cm, markText)(doc, from, to, options, type); - - var marker = new TextMarker(doc, type); - if (posLess(to, from) || posEq(from, to) && type == "range" && - !(options.inclusiveLeft && options.inclusiveRight)) - return marker; - if (options) copyObj(options, marker); - if (marker.replacedWith) { - marker.collapsed = true; - marker.replacedWith = elt("span", [marker.replacedWith], "CodeMirror-widget"); - if (!options.handleMouseEvents) marker.replacedWith.ignoreEvents = true; - } - if (marker.collapsed) sawCollapsedSpans = true; - - if (marker.addToHistory) - addToHistory(doc, {from: from, to: to, origin: "markText"}, - {head: doc.sel.head, anchor: doc.sel.anchor}, NaN); - - var curLine = from.line, size = 0, collapsedAtStart, collapsedAtEnd, cm = doc.cm, updateMaxLine; - doc.iter(curLine, to.line + 1, function(line) { - if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(doc, line) == cm.display.maxLine) - updateMaxLine = true; - var span = {from: null, to: null, marker: marker}; - size += line.text.length; - if (curLine == from.line) {span.from = from.ch; size -= from.ch;} - if (curLine == to.line) {span.to = to.ch; size -= line.text.length - to.ch;} - if (marker.collapsed) { - if (curLine == to.line) collapsedAtEnd = collapsedSpanAt(line, to.ch); - if (curLine == from.line) collapsedAtStart = collapsedSpanAt(line, from.ch); - else updateLineHeight(line, 0); - } - addMarkedSpan(line, span); - ++curLine; - }); - if (marker.collapsed) doc.iter(from.line, to.line + 1, function(line) { - if (lineIsHidden(doc, line)) updateLineHeight(line, 0); - }); - - if (marker.clearOnEnter) on(marker, "beforeCursorEnter", function() { marker.clear(); }); - - if (marker.readOnly) { - sawReadOnlySpans = true; - if (doc.history.done.length || doc.history.undone.length) - doc.clearHistory(); - } - if (marker.collapsed) { - if (collapsedAtStart != collapsedAtEnd) - throw new Error("Inserting collapsed marker overlapping an existing one"); - marker.size = size; - marker.atomic = true; - } - if (cm) { - if (updateMaxLine) cm.curOp.updateMaxLine = true; - if (marker.className || marker.title || marker.startStyle || marker.endStyle || marker.collapsed) - regChange(cm, from.line, to.line + 1); - if (marker.atomic) reCheckSelection(cm); - } - return marker; - } - - // SHARED TEXTMARKERS - - function SharedTextMarker(markers, primary) { - this.markers = markers; - this.primary = primary; - for (var i = 0, me = this; i < markers.length; ++i) { - markers[i].parent = this; - on(markers[i], "clear", function(){me.clear();}); - } - } - CodeMirror.SharedTextMarker = SharedTextMarker; - eventMixin(SharedTextMarker); - - SharedTextMarker.prototype.clear = function() { - if (this.explicitlyCleared) return; - this.explicitlyCleared = true; - for (var i = 0; i < this.markers.length; ++i) - this.markers[i].clear(); - signalLater(this, "clear"); - }; - SharedTextMarker.prototype.find = function() { - return this.primary.find(); - }; - - function markTextShared(doc, from, to, options, type) { - options = copyObj(options); - options.shared = false; - var markers = [markText(doc, from, to, options, type)], primary = markers[0]; - var widget = options.replacedWith; - linkedDocs(doc, function(doc) { - if (widget) options.replacedWith = widget.cloneNode(true); - markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type)); - for (var i = 0; i < doc.linked.length; ++i) - if (doc.linked[i].isParent) return; - primary = lst(markers); - }); - return new SharedTextMarker(markers, primary); - } - - // TEXTMARKER SPANS - - function getMarkedSpanFor(spans, marker) { - if (spans) for (var i = 0; i < spans.length; ++i) { - var span = spans[i]; - if (span.marker == marker) return span; - } - } - function removeMarkedSpan(spans, span) { - for (var r, i = 0; i < spans.length; ++i) - if (spans[i] != span) (r || (r = [])).push(spans[i]); - return r; - } - function addMarkedSpan(line, span) { - line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span]; - span.marker.attachLine(line); - } - - function markedSpansBefore(old, startCh, isInsert) { - if (old) for (var i = 0, nw; i < old.length; ++i) { - var span = old[i], marker = span.marker; - var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh); - if (startsBefore || - (marker.inclusiveLeft && marker.inclusiveRight || marker.type == "bookmark") && - span.from == startCh && (!isInsert || !span.marker.insertLeft)) { - var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh); - (nw || (nw = [])).push({from: span.from, - to: endsAfter ? null : span.to, - marker: marker}); - } - } - return nw; - } - - function markedSpansAfter(old, endCh, isInsert) { - if (old) for (var i = 0, nw; i < old.length; ++i) { - var span = old[i], marker = span.marker; - var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh); - if (endsAfter || marker.type == "bookmark" && span.from == endCh && (!isInsert || span.marker.insertLeft)) { - var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh); - (nw || (nw = [])).push({from: startsBefore ? null : span.from - endCh, - to: span.to == null ? null : span.to - endCh, - marker: marker}); - } - } - return nw; - } - - function stretchSpansOverChange(doc, change) { - var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans; - var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans; - if (!oldFirst && !oldLast) return null; - - var startCh = change.from.ch, endCh = change.to.ch, isInsert = posEq(change.from, change.to); - // Get the spans that 'stick out' on both sides - var first = markedSpansBefore(oldFirst, startCh, isInsert); - var last = markedSpansAfter(oldLast, endCh, isInsert); - - // Next, merge those two ends - var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0); - if (first) { - // Fix up .to properties of first - for (var i = 0; i < first.length; ++i) { - var span = first[i]; - if (span.to == null) { - var found = getMarkedSpanFor(last, span.marker); - if (!found) span.to = startCh; - else if (sameLine) span.to = found.to == null ? null : found.to + offset; - } - } - } - if (last) { - // Fix up .from in last (or move them into first in case of sameLine) - for (var i = 0; i < last.length; ++i) { - var span = last[i]; - if (span.to != null) span.to += offset; - if (span.from == null) { - var found = getMarkedSpanFor(first, span.marker); - if (!found) { - span.from = offset; - if (sameLine) (first || (first = [])).push(span); - } - } else { - span.from += offset; - if (sameLine) (first || (first = [])).push(span); - } - } - } - if (sameLine && first) { - // Make sure we didn't create any zero-length spans - for (var i = 0; i < first.length; ++i) - if (first[i].from != null && first[i].from == first[i].to && first[i].marker.type != "bookmark") - first.splice(i--, 1); - if (!first.length) first = null; - } - - var newMarkers = [first]; - if (!sameLine) { - // Fill gap with whole-line-spans - var gap = change.text.length - 2, gapMarkers; - if (gap > 0 && first) - for (var i = 0; i < first.length; ++i) - if (first[i].to == null) - (gapMarkers || (gapMarkers = [])).push({from: null, to: null, marker: first[i].marker}); - for (var i = 0; i < gap; ++i) - newMarkers.push(gapMarkers); - newMarkers.push(last); - } - return newMarkers; - } - - function mergeOldSpans(doc, change) { - var old = getOldSpans(doc, change); - var stretched = stretchSpansOverChange(doc, change); - if (!old) return stretched; - if (!stretched) return old; - - for (var i = 0; i < old.length; ++i) { - var oldCur = old[i], stretchCur = stretched[i]; - if (oldCur && stretchCur) { - spans: for (var j = 0; j < stretchCur.length; ++j) { - var span = stretchCur[j]; - for (var k = 0; k < oldCur.length; ++k) - if (oldCur[k].marker == span.marker) continue spans; - oldCur.push(span); - } - } else if (stretchCur) { - old[i] = stretchCur; - } - } - return old; - } - - function removeReadOnlyRanges(doc, from, to) { - var markers = null; - doc.iter(from.line, to.line + 1, function(line) { - if (line.markedSpans) for (var i = 0; i < line.markedSpans.length; ++i) { - var mark = line.markedSpans[i].marker; - if (mark.readOnly && (!markers || indexOf(markers, mark) == -1)) - (markers || (markers = [])).push(mark); - } - }); - if (!markers) return null; - var parts = [{from: from, to: to}]; - for (var i = 0; i < markers.length; ++i) { - var mk = markers[i], m = mk.find(); - for (var j = 0; j < parts.length; ++j) { - var p = parts[j]; - if (posLess(p.to, m.from) || posLess(m.to, p.from)) continue; - var newParts = [j, 1]; - if (posLess(p.from, m.from) || !mk.inclusiveLeft && posEq(p.from, m.from)) - newParts.push({from: p.from, to: m.from}); - if (posLess(m.to, p.to) || !mk.inclusiveRight && posEq(p.to, m.to)) - newParts.push({from: m.to, to: p.to}); - parts.splice.apply(parts, newParts); - j += newParts.length - 1; - } - } - return parts; - } - - function collapsedSpanAt(line, ch) { - var sps = sawCollapsedSpans && line.markedSpans, found; - if (sps) for (var sp, i = 0; i < sps.length; ++i) { - sp = sps[i]; - if (!sp.marker.collapsed) continue; - if ((sp.from == null || sp.from < ch) && - (sp.to == null || sp.to > ch) && - (!found || found.width < sp.marker.width)) - found = sp.marker; - } - return found; - } - function collapsedSpanAtStart(line) { return collapsedSpanAt(line, -1); } - function collapsedSpanAtEnd(line) { return collapsedSpanAt(line, line.text.length + 1); } - - function visualLine(doc, line) { - var merged; - while (merged = collapsedSpanAtStart(line)) - line = getLine(doc, merged.find().from.line); - return line; - } - - function lineIsHidden(doc, line) { - var sps = sawCollapsedSpans && line.markedSpans; - if (sps) for (var sp, i = 0; i < sps.length; ++i) { - sp = sps[i]; - if (!sp.marker.collapsed) continue; - if (sp.from == null) return true; - if (sp.marker.replacedWith) continue; - if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp)) - return true; - } - } - function lineIsHiddenInner(doc, line, span) { - if (span.to == null) { - var end = span.marker.find().to, endLine = getLine(doc, end.line); - return lineIsHiddenInner(doc, endLine, getMarkedSpanFor(endLine.markedSpans, span.marker)); - } - if (span.marker.inclusiveRight && span.to == line.text.length) - return true; - for (var sp, i = 0; i < line.markedSpans.length; ++i) { - sp = line.markedSpans[i]; - if (sp.marker.collapsed && !sp.marker.replacedWith && sp.from == span.to && - (sp.marker.inclusiveLeft || span.marker.inclusiveRight) && - lineIsHiddenInner(doc, line, sp)) return true; - } - } - - function detachMarkedSpans(line) { - var spans = line.markedSpans; - if (!spans) return; - for (var i = 0; i < spans.length; ++i) - spans[i].marker.detachLine(line); - line.markedSpans = null; - } - - function attachMarkedSpans(line, spans) { - if (!spans) return; - for (var i = 0; i < spans.length; ++i) - spans[i].marker.attachLine(line); - line.markedSpans = spans; - } - - // LINE WIDGETS - - var LineWidget = CodeMirror.LineWidget = function(cm, node, options) { - if (options) for (var opt in options) if (options.hasOwnProperty(opt)) - this[opt] = options[opt]; - this.cm = cm; - this.node = node; - }; - eventMixin(LineWidget); - function widgetOperation(f) { - return function() { - var withOp = !this.cm.curOp; - if (withOp) startOperation(this.cm); - try {var result = f.apply(this, arguments);} - finally {if (withOp) endOperation(this.cm);} - return result; - }; - } - LineWidget.prototype.clear = widgetOperation(function() { - var ws = this.line.widgets, no = lineNo(this.line); - if (no == null || !ws) return; - for (var i = 0; i < ws.length; ++i) if (ws[i] == this) ws.splice(i--, 1); - if (!ws.length) this.line.widgets = null; - var aboveVisible = heightAtLine(this.cm, this.line) < this.cm.doc.scrollTop; - updateLineHeight(this.line, Math.max(0, this.line.height - widgetHeight(this))); - if (aboveVisible) addToScrollPos(this.cm, 0, -this.height); - regChange(this.cm, no, no + 1); - }); - LineWidget.prototype.changed = widgetOperation(function() { - var oldH = this.height; - this.height = null; - var diff = widgetHeight(this) - oldH; - if (!diff) return; - updateLineHeight(this.line, this.line.height + diff); - var no = lineNo(this.line); - regChange(this.cm, no, no + 1); - }); - - function widgetHeight(widget) { - if (widget.height != null) return widget.height; - if (!widget.node.parentNode || widget.node.parentNode.nodeType != 1) - removeChildrenAndAdd(widget.cm.display.measure, elt("div", [widget.node], null, "position: relative")); - return widget.height = widget.node.offsetHeight; - } - - function addLineWidget(cm, handle, node, options) { - var widget = new LineWidget(cm, node, options); - if (widget.noHScroll) cm.display.alignWidgets = true; - changeLine(cm, handle, function(line) { - var widgets = line.widgets || (line.widgets = []); - if (widget.insertAt == null) widgets.push(widget); - else widgets.splice(Math.min(widgets.length - 1, Math.max(0, widget.insertAt)), 0, widget); - widget.line = line; - if (!lineIsHidden(cm.doc, line) || widget.showIfHidden) { - var aboveVisible = heightAtLine(cm, line) < cm.doc.scrollTop; - updateLineHeight(line, line.height + widgetHeight(widget)); - if (aboveVisible) addToScrollPos(cm, 0, widget.height); - } - return true; - }); - return widget; - } - - // LINE DATA STRUCTURE - - // Line objects. These hold state related to a line, including - // highlighting info (the styles array). - var Line = CodeMirror.Line = function(text, markedSpans, estimateHeight) { - this.text = text; - attachMarkedSpans(this, markedSpans); - this.height = estimateHeight ? estimateHeight(this) : 1; - }; - eventMixin(Line); - Line.prototype.lineNo = function() { return lineNo(this); }; - - function updateLine(line, text, markedSpans, estimateHeight) { - line.text = text; - if (line.stateAfter) line.stateAfter = null; - if (line.styles) line.styles = null; - if (line.order != null) line.order = null; - detachMarkedSpans(line); - attachMarkedSpans(line, markedSpans); - var estHeight = estimateHeight ? estimateHeight(line) : 1; - if (estHeight != line.height) updateLineHeight(line, estHeight); - } - - function cleanUpLine(line) { - line.parent = null; - detachMarkedSpans(line); - } - - // Run the given mode's parser over a line, update the styles - // array, which contains alternating fragments of text and CSS - // classes. - function runMode(cm, text, mode, state, f, forceToEnd) { - var flattenSpans = mode.flattenSpans; - if (flattenSpans == null) flattenSpans = cm.options.flattenSpans; - var curStart = 0, curStyle = null; - var stream = new StringStream(text, cm.options.tabSize), style; - if (text == "" && mode.blankLine) mode.blankLine(state); - while (!stream.eol()) { - if (stream.pos > cm.options.maxHighlightLength) { - flattenSpans = false; - if (forceToEnd) processLine(cm, text, state, stream.pos); - stream.pos = text.length; - style = null; - } else { - style = mode.token(stream, state); - } - if (!flattenSpans || curStyle != style) { - if (curStart < stream.start) f(stream.start, curStyle); - curStart = stream.start; curStyle = style; - } - stream.start = stream.pos; - } - while (curStart < stream.pos) { - // Webkit seems to refuse to render text nodes longer than 57444 characters - var pos = Math.min(stream.pos, curStart + 50000); - f(pos, curStyle); - curStart = pos; - } - } - - function highlightLine(cm, line, state, forceToEnd) { - // A styles array always starts with a number identifying the - // mode/overlays that it is based on (for easy invalidation). - var st = [cm.state.modeGen]; - // Compute the base array of styles - runMode(cm, line.text, cm.doc.mode, state, function(end, style) { - st.push(end, style); - }, forceToEnd); - - // Run overlays, adjust style array. - for (var o = 0; o < cm.state.overlays.length; ++o) { - var overlay = cm.state.overlays[o], i = 1, at = 0; - runMode(cm, line.text, overlay.mode, true, function(end, style) { - var start = i; - // Ensure there's a token end at the current position, and that i points at it - while (at < end) { - var i_end = st[i]; - if (i_end > end) - st.splice(i, 1, end, st[i+1], i_end); - i += 2; - at = Math.min(end, i_end); - } - if (!style) return; - if (overlay.opaque) { - st.splice(start, i - start, end, style); - i = start + 2; - } else { - for (; start < i; start += 2) { - var cur = st[start+1]; - st[start+1] = cur ? cur + " " + style : style; - } - } - }); - } - - return st; - } - - function getLineStyles(cm, line) { - if (!line.styles || line.styles[0] != cm.state.modeGen) - line.styles = highlightLine(cm, line, line.stateAfter = getStateBefore(cm, lineNo(line))); - return line.styles; - } - - // Lightweight form of highlight -- proceed over this line and - // update state, but don't save a style array. - function processLine(cm, text, state, startAt) { - var mode = cm.doc.mode; - var stream = new StringStream(text, cm.options.tabSize); - stream.start = stream.pos = startAt || 0; - if (text == "" && mode.blankLine) mode.blankLine(state); - while (!stream.eol() && stream.pos <= cm.options.maxHighlightLength) { - mode.token(stream, state); - stream.start = stream.pos; - } - } - - var styleToClassCache = {}; - function interpretTokenStyle(style, builder) { - if (!style) return null; - for (;;) { - var lineClass = style.match(/(?:^|\s)line-(background-)?(\S+)/); - if (!lineClass) break; - style = style.slice(0, lineClass.index) + style.slice(lineClass.index + lineClass[0].length); - var prop = lineClass[1] ? "bgClass" : "textClass"; - if (builder[prop] == null) - builder[prop] = lineClass[2]; - else if (!(new RegExp("(?:^|\s)" + lineClass[2] + "(?:$|\s)")).test(builder[prop])) - builder[prop] += " " + lineClass[2]; - } - return styleToClassCache[style] || - (styleToClassCache[style] = "cm-" + style.replace(/ +/g, " cm-")); - } - - function buildLineContent(cm, realLine, measure, copyWidgets) { - var merged, line = realLine, empty = true; - while (merged = collapsedSpanAtStart(line)) - line = getLine(cm.doc, merged.find().from.line); - - var builder = {pre: elt("pre"), col: 0, pos: 0, - measure: null, measuredSomething: false, cm: cm, - copyWidgets: copyWidgets}; - - do { - if (line.text) empty = false; - builder.measure = line == realLine && measure; - builder.pos = 0; - builder.addToken = builder.measure ? buildTokenMeasure : buildToken; - if ((ie || webkit) && cm.getOption("lineWrapping")) - builder.addToken = buildTokenSplitSpaces(builder.addToken); - var next = insertLineContent(line, builder, getLineStyles(cm, line)); - if (measure && line == realLine && !builder.measuredSomething) { - measure[0] = builder.pre.appendChild(zeroWidthElement(cm.display.measure)); - builder.measuredSomething = true; - } - if (next) line = getLine(cm.doc, next.to.line); - } while (next); - - if (measure && !builder.measuredSomething && !measure[0]) - measure[0] = builder.pre.appendChild(empty ? elt("span", "\u00a0") : zeroWidthElement(cm.display.measure)); - if (!builder.pre.firstChild && !lineIsHidden(cm.doc, realLine)) - builder.pre.appendChild(document.createTextNode("\u00a0")); - - var order; - // Work around problem with the reported dimensions of single-char - // direction spans on IE (issue #1129). See also the comment in - // cursorCoords. - if (measure && (ie || ie_gt10) && (order = getOrder(line))) { - var l = order.length - 1; - if (order[l].from == order[l].to) --l; - var last = order[l], prev = order[l - 1]; - if (last.from + 1 == last.to && prev && last.level < prev.level) { - var span = measure[builder.pos - 1]; - if (span) span.parentNode.insertBefore(span.measureRight = zeroWidthElement(cm.display.measure), - span.nextSibling); - } - } - - var textClass = builder.textClass ? builder.textClass + " " + (realLine.textClass || "") : realLine.textClass; - if (textClass) builder.pre.className = textClass; - - signal(cm, "renderLine", cm, realLine, builder.pre); - return builder; - } - - function defaultSpecialCharPlaceholder(ch) { - var token = elt("span", "\u2022", "cm-invalidchar"); - token.title = "\\u" + ch.charCodeAt(0).toString(16); - return token; - } - - function buildToken(builder, text, style, startStyle, endStyle, title) { - if (!text) return; - var special = builder.cm.options.specialChars; - if (!special.test(text)) { - builder.col += text.length; - var content = document.createTextNode(text); - } else { - var content = document.createDocumentFragment(), pos = 0; - while (true) { - special.lastIndex = pos; - var m = special.exec(text); - var skipped = m ? m.index - pos : text.length - pos; - if (skipped) { - content.appendChild(document.createTextNode(text.slice(pos, pos + skipped))); - builder.col += skipped; - } - if (!m) break; - pos += skipped + 1; - if (m[0] == "\t") { - var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize; - content.appendChild(elt("span", spaceStr(tabWidth), "cm-tab")); - builder.col += tabWidth; - } else { - var token = builder.cm.options.specialCharPlaceholder(m[0]); - content.appendChild(token); - builder.col += 1; - } - } - } - if (style || startStyle || endStyle || builder.measure) { - var fullStyle = style || ""; - if (startStyle) fullStyle += startStyle; - if (endStyle) fullStyle += endStyle; - var token = elt("span", [content], fullStyle); - if (title) token.title = title; - return builder.pre.appendChild(token); - } - builder.pre.appendChild(content); - } - - function buildTokenMeasure(builder, text, style, startStyle, endStyle) { - var wrapping = builder.cm.options.lineWrapping; - for (var i = 0; i < text.length; ++i) { - var ch = text.charAt(i), start = i == 0; - if (ch >= "\ud800" && ch < "\udbff" && i < text.length - 1) { - ch = text.slice(i, i + 2); - ++i; - } else if (i && wrapping && spanAffectsWrapping(text, i)) { - builder.pre.appendChild(elt("wbr")); - } - var old = builder.measure[builder.pos]; - var span = builder.measure[builder.pos] = - buildToken(builder, ch, style, - start && startStyle, i == text.length - 1 && endStyle); - if (old) span.leftSide = old.leftSide || old; - // In IE single-space nodes wrap differently than spaces - // embedded in larger text nodes, except when set to - // white-space: normal (issue #1268). - if (ie && wrapping && ch == " " && i && !/\s/.test(text.charAt(i - 1)) && - i < text.length - 1 && !/\s/.test(text.charAt(i + 1))) - span.style.whiteSpace = "normal"; - builder.pos += ch.length; - } - if (text.length) builder.measuredSomething = true; - } - - function buildTokenSplitSpaces(inner) { - function split(old) { - var out = " "; - for (var i = 0; i < old.length - 2; ++i) out += i % 2 ? " " : "\u00a0"; - out += " "; - return out; - } - return function(builder, text, style, startStyle, endStyle, title) { - return inner(builder, text.replace(/ {3,}/g, split), style, startStyle, endStyle, title); - }; - } - - function buildCollapsedSpan(builder, size, marker, ignoreWidget) { - var widget = !ignoreWidget && marker.replacedWith; - if (widget) { - if (builder.copyWidgets) widget = widget.cloneNode(true); - builder.pre.appendChild(widget); - if (builder.measure) { - if (size) { - builder.measure[builder.pos] = widget; - } else { - var elt = zeroWidthElement(builder.cm.display.measure); - if (marker.type == "bookmark" && !marker.insertLeft) - builder.measure[builder.pos] = builder.pre.appendChild(elt); - else if (builder.measure[builder.pos]) - return; - else - builder.measure[builder.pos] = builder.pre.insertBefore(elt, widget); - } - builder.measuredSomething = true; - } - } - builder.pos += size; - } - - // Outputs a number of spans to make up a line, taking highlighting - // and marked text into account. - function insertLineContent(line, builder, styles) { - var spans = line.markedSpans, allText = line.text, at = 0; - if (!spans) { - for (var i = 1; i < styles.length; i+=2) - builder.addToken(builder, allText.slice(at, at = styles[i]), interpretTokenStyle(styles[i+1], builder)); - return; - } - - var len = allText.length, pos = 0, i = 1, text = "", style; - var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed; - for (;;) { - if (nextChange == pos) { // Update current marker set - spanStyle = spanEndStyle = spanStartStyle = title = ""; - collapsed = null; nextChange = Infinity; - var foundBookmarks = []; - for (var j = 0; j < spans.length; ++j) { - var sp = spans[j], m = sp.marker; - if (sp.from <= pos && (sp.to == null || sp.to > pos)) { - if (sp.to != null && nextChange > sp.to) { nextChange = sp.to; spanEndStyle = ""; } - if (m.className) spanStyle += " " + m.className; - if (m.startStyle && sp.from == pos) spanStartStyle += " " + m.startStyle; - if (m.endStyle && sp.to == nextChange) spanEndStyle += " " + m.endStyle; - if (m.title && !title) title = m.title; - if (m.collapsed && (!collapsed || collapsed.marker.size < m.size)) - collapsed = sp; - } else if (sp.from > pos && nextChange > sp.from) { - nextChange = sp.from; - } - if (m.type == "bookmark" && sp.from == pos && m.replacedWith) foundBookmarks.push(m); - } - if (collapsed && (collapsed.from || 0) == pos) { - buildCollapsedSpan(builder, (collapsed.to == null ? len : collapsed.to) - pos, - collapsed.marker, collapsed.from == null); - if (collapsed.to == null) return collapsed.marker.find(); - } - if (!collapsed && foundBookmarks.length) for (var j = 0; j < foundBookmarks.length; ++j) - buildCollapsedSpan(builder, 0, foundBookmarks[j]); - } - if (pos >= len) break; - - var upto = Math.min(len, nextChange); - while (true) { - if (text) { - var end = pos + text.length; - if (!collapsed) { - var tokenText = end > upto ? text.slice(0, upto - pos) : text; - builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle, - spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : "", title); - } - if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;} - pos = end; - spanStartStyle = ""; - } - text = allText.slice(at, at = styles[i++]); - style = interpretTokenStyle(styles[i++], builder); - } - } - } - - // DOCUMENT DATA STRUCTURE - - function updateDoc(doc, change, markedSpans, selAfter, estimateHeight) { - function spansFor(n) {return markedSpans ? markedSpans[n] : null;} - function update(line, text, spans) { - updateLine(line, text, spans, estimateHeight); - signalLater(line, "change", line, change); - } - - var from = change.from, to = change.to, text = change.text; - var firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line); - var lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line; - - // First adjust the line structure - if (from.ch == 0 && to.ch == 0 && lastText == "" && - (!doc.cm || doc.cm.options.wholeLineUpdateBefore)) { - // This is a whole-line replace. Treated specially to make - // sure line objects move the way they are supposed to. - for (var i = 0, e = text.length - 1, added = []; i < e; ++i) - added.push(new Line(text[i], spansFor(i), estimateHeight)); - update(lastLine, lastLine.text, lastSpans); - if (nlines) doc.remove(from.line, nlines); - if (added.length) doc.insert(from.line, added); - } else if (firstLine == lastLine) { - if (text.length == 1) { - update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans); - } else { - for (var added = [], i = 1, e = text.length - 1; i < e; ++i) - added.push(new Line(text[i], spansFor(i), estimateHeight)); - added.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight)); - update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0)); - doc.insert(from.line + 1, added); - } - } else if (text.length == 1) { - update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0)); - doc.remove(from.line + 1, nlines); - } else { - update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0)); - update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans); - for (var i = 1, e = text.length - 1, added = []; i < e; ++i) - added.push(new Line(text[i], spansFor(i), estimateHeight)); - if (nlines > 1) doc.remove(from.line + 1, nlines - 1); - doc.insert(from.line + 1, added); - } - - signalLater(doc, "change", doc, change); - setSelection(doc, selAfter.anchor, selAfter.head, null, true); - } - - function LeafChunk(lines) { - this.lines = lines; - this.parent = null; - for (var i = 0, e = lines.length, height = 0; i < e; ++i) { - lines[i].parent = this; - height += lines[i].height; - } - this.height = height; - } - - LeafChunk.prototype = { - chunkSize: function() { return this.lines.length; }, - removeInner: function(at, n) { - for (var i = at, e = at + n; i < e; ++i) { - var line = this.lines[i]; - this.height -= line.height; - cleanUpLine(line); - signalLater(line, "delete"); - } - this.lines.splice(at, n); - }, - collapse: function(lines) { - lines.splice.apply(lines, [lines.length, 0].concat(this.lines)); - }, - insertInner: function(at, lines, height) { - this.height += height; - this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at)); - for (var i = 0, e = lines.length; i < e; ++i) lines[i].parent = this; - }, - iterN: function(at, n, op) { - for (var e = at + n; at < e; ++at) - if (op(this.lines[at])) return true; - } - }; - - function BranchChunk(children) { - this.children = children; - var size = 0, height = 0; - for (var i = 0, e = children.length; i < e; ++i) { - var ch = children[i]; - size += ch.chunkSize(); height += ch.height; - ch.parent = this; - } - this.size = size; - this.height = height; - this.parent = null; - } - - BranchChunk.prototype = { - chunkSize: function() { return this.size; }, - removeInner: function(at, n) { - this.size -= n; - for (var i = 0; i < this.children.length; ++i) { - var child = this.children[i], sz = child.chunkSize(); - if (at < sz) { - var rm = Math.min(n, sz - at), oldHeight = child.height; - child.removeInner(at, rm); - this.height -= oldHeight - child.height; - if (sz == rm) { this.children.splice(i--, 1); child.parent = null; } - if ((n -= rm) == 0) break; - at = 0; - } else at -= sz; - } - if (this.size - n < 25) { - var lines = []; - this.collapse(lines); - this.children = [new LeafChunk(lines)]; - this.children[0].parent = this; - } - }, - collapse: function(lines) { - for (var i = 0, e = this.children.length; i < e; ++i) this.children[i].collapse(lines); - }, - insertInner: function(at, lines, height) { - this.size += lines.length; - this.height += height; - for (var i = 0, e = this.children.length; i < e; ++i) { - var child = this.children[i], sz = child.chunkSize(); - if (at <= sz) { - child.insertInner(at, lines, height); - if (child.lines && child.lines.length > 50) { - while (child.lines.length > 50) { - var spilled = child.lines.splice(child.lines.length - 25, 25); - var newleaf = new LeafChunk(spilled); - child.height -= newleaf.height; - this.children.splice(i + 1, 0, newleaf); - newleaf.parent = this; - } - this.maybeSpill(); - } - break; - } - at -= sz; - } - }, - maybeSpill: function() { - if (this.children.length <= 10) return; - var me = this; - do { - var spilled = me.children.splice(me.children.length - 5, 5); - var sibling = new BranchChunk(spilled); - if (!me.parent) { // Become the parent node - var copy = new BranchChunk(me.children); - copy.parent = me; - me.children = [copy, sibling]; - me = copy; - } else { - me.size -= sibling.size; - me.height -= sibling.height; - var myIndex = indexOf(me.parent.children, me); - me.parent.children.splice(myIndex + 1, 0, sibling); - } - sibling.parent = me.parent; - } while (me.children.length > 10); - me.parent.maybeSpill(); - }, - iterN: function(at, n, op) { - for (var i = 0, e = this.children.length; i < e; ++i) { - var child = this.children[i], sz = child.chunkSize(); - if (at < sz) { - var used = Math.min(n, sz - at); - if (child.iterN(at, used, op)) return true; - if ((n -= used) == 0) break; - at = 0; - } else at -= sz; - } - } - }; - - var nextDocId = 0; - var Doc = CodeMirror.Doc = function(text, mode, firstLine) { - if (!(this instanceof Doc)) return new Doc(text, mode, firstLine); - if (firstLine == null) firstLine = 0; - - BranchChunk.call(this, [new LeafChunk([new Line("", null)])]); - this.first = firstLine; - this.scrollTop = this.scrollLeft = 0; - this.cantEdit = false; - this.history = makeHistory(); - this.cleanGeneration = 1; - this.frontier = firstLine; - var start = Pos(firstLine, 0); - this.sel = {from: start, to: start, head: start, anchor: start, shift: false, extend: false, goalColumn: null}; - this.id = ++nextDocId; - this.modeOption = mode; - - if (typeof text == "string") text = splitLines(text); - updateDoc(this, {from: start, to: start, text: text}, null, {head: start, anchor: start}); - }; - - Doc.prototype = createObj(BranchChunk.prototype, { - constructor: Doc, - iter: function(from, to, op) { - if (op) this.iterN(from - this.first, to - from, op); - else this.iterN(this.first, this.first + this.size, from); - }, - - insert: function(at, lines) { - var height = 0; - for (var i = 0, e = lines.length; i < e; ++i) height += lines[i].height; - this.insertInner(at - this.first, lines, height); - }, - remove: function(at, n) { this.removeInner(at - this.first, n); }, - - getValue: function(lineSep) { - var lines = getLines(this, this.first, this.first + this.size); - if (lineSep === false) return lines; - return lines.join(lineSep || "\n"); - }, - setValue: function(code) { - var top = Pos(this.first, 0), last = this.first + this.size - 1; - makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length), - text: splitLines(code), origin: "setValue"}, - {head: top, anchor: top}, true); - }, - replaceRange: function(code, from, to, origin) { - from = clipPos(this, from); - to = to ? clipPos(this, to) : from; - replaceRange(this, code, from, to, origin); - }, - getRange: function(from, to, lineSep) { - var lines = getBetween(this, clipPos(this, from), clipPos(this, to)); - if (lineSep === false) return lines; - return lines.join(lineSep || "\n"); - }, - - getLine: function(line) {var l = this.getLineHandle(line); return l && l.text;}, - setLine: function(line, text) { - if (isLine(this, line)) - replaceRange(this, text, Pos(line, 0), clipPos(this, Pos(line))); - }, - removeLine: function(line) { - if (line) replaceRange(this, "", clipPos(this, Pos(line - 1)), clipPos(this, Pos(line))); - else replaceRange(this, "", Pos(0, 0), clipPos(this, Pos(1, 0))); - }, - - getLineHandle: function(line) {if (isLine(this, line)) return getLine(this, line);}, - getLineNumber: function(line) {return lineNo(line);}, - - getLineHandleVisualStart: function(line) { - if (typeof line == "number") line = getLine(this, line); - return visualLine(this, line); - }, - - lineCount: function() {return this.size;}, - firstLine: function() {return this.first;}, - lastLine: function() {return this.first + this.size - 1;}, - - clipPos: function(pos) {return clipPos(this, pos);}, - - getCursor: function(start) { - var sel = this.sel, pos; - if (start == null || start == "head") pos = sel.head; - else if (start == "anchor") pos = sel.anchor; - else if (start == "end" || start === false) pos = sel.to; - else pos = sel.from; - return copyPos(pos); - }, - somethingSelected: function() {return !posEq(this.sel.head, this.sel.anchor);}, - - setCursor: docOperation(function(line, ch, extend) { - var pos = clipPos(this, typeof line == "number" ? Pos(line, ch || 0) : line); - if (extend) extendSelection(this, pos); - else setSelection(this, pos, pos); - }), - setSelection: docOperation(function(anchor, head, bias) { - setSelection(this, clipPos(this, anchor), clipPos(this, head || anchor), bias); - }), - extendSelection: docOperation(function(from, to, bias) { - extendSelection(this, clipPos(this, from), to && clipPos(this, to), bias); - }), - - getSelection: function(lineSep) {return this.getRange(this.sel.from, this.sel.to, lineSep);}, - replaceSelection: function(code, collapse, origin) { - makeChange(this, {from: this.sel.from, to: this.sel.to, text: splitLines(code), origin: origin}, collapse || "around"); - }, - undo: docOperation(function() {makeChangeFromHistory(this, "undo");}), - redo: docOperation(function() {makeChangeFromHistory(this, "redo");}), - - setExtending: function(val) {this.sel.extend = val;}, - - historySize: function() { - var hist = this.history; - return {undo: hist.done.length, redo: hist.undone.length}; - }, - clearHistory: function() {this.history = makeHistory(this.history.maxGeneration);}, - - markClean: function() { - this.cleanGeneration = this.changeGeneration(); - }, - changeGeneration: function() { - this.history.lastOp = this.history.lastOrigin = null; - return this.history.generation; - }, - isClean: function (gen) { - return this.history.generation == (gen || this.cleanGeneration); - }, - - getHistory: function() { - return {done: copyHistoryArray(this.history.done), - undone: copyHistoryArray(this.history.undone)}; - }, - setHistory: function(histData) { - var hist = this.history = makeHistory(this.history.maxGeneration); - hist.done = histData.done.slice(0); - hist.undone = histData.undone.slice(0); - }, - - markText: function(from, to, options) { - return markText(this, clipPos(this, from), clipPos(this, to), options, "range"); - }, - setBookmark: function(pos, options) { - var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options), - insertLeft: options && options.insertLeft}; - pos = clipPos(this, pos); - return markText(this, pos, pos, realOpts, "bookmark"); - }, - findMarksAt: function(pos) { - pos = clipPos(this, pos); - var markers = [], spans = getLine(this, pos.line).markedSpans; - if (spans) for (var i = 0; i < spans.length; ++i) { - var span = spans[i]; - if ((span.from == null || span.from <= pos.ch) && - (span.to == null || span.to >= pos.ch)) - markers.push(span.marker.parent || span.marker); - } - return markers; - }, - getAllMarks: function() { - var markers = []; - this.iter(function(line) { - var sps = line.markedSpans; - if (sps) for (var i = 0; i < sps.length; ++i) - if (sps[i].from != null) markers.push(sps[i].marker); - }); - return markers; - }, - - posFromIndex: function(off) { - var ch, lineNo = this.first; - this.iter(function(line) { - var sz = line.text.length + 1; - if (sz > off) { ch = off; return true; } - off -= sz; - ++lineNo; - }); - return clipPos(this, Pos(lineNo, ch)); - }, - indexFromPos: function (coords) { - coords = clipPos(this, coords); - var index = coords.ch; - if (coords.line < this.first || coords.ch < 0) return 0; - this.iter(this.first, coords.line, function (line) { - index += line.text.length + 1; - }); - return index; - }, - - copy: function(copyHistory) { - var doc = new Doc(getLines(this, this.first, this.first + this.size), this.modeOption, this.first); - doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft; - doc.sel = {from: this.sel.from, to: this.sel.to, head: this.sel.head, anchor: this.sel.anchor, - shift: this.sel.shift, extend: false, goalColumn: this.sel.goalColumn}; - if (copyHistory) { - doc.history.undoDepth = this.history.undoDepth; - doc.setHistory(this.getHistory()); - } - return doc; - }, - - linkedDoc: function(options) { - if (!options) options = {}; - var from = this.first, to = this.first + this.size; - if (options.from != null && options.from > from) from = options.from; - if (options.to != null && options.to < to) to = options.to; - var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from); - if (options.sharedHist) copy.history = this.history; - (this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist}); - copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}]; - return copy; - }, - unlinkDoc: function(other) { - if (other instanceof CodeMirror) other = other.doc; - if (this.linked) for (var i = 0; i < this.linked.length; ++i) { - var link = this.linked[i]; - if (link.doc != other) continue; - this.linked.splice(i, 1); - other.unlinkDoc(this); - break; - } - // If the histories were shared, split them again - if (other.history == this.history) { - var splitIds = [other.id]; - linkedDocs(other, function(doc) {splitIds.push(doc.id);}, true); - other.history = makeHistory(); - other.history.done = copyHistoryArray(this.history.done, splitIds); - other.history.undone = copyHistoryArray(this.history.undone, splitIds); - } - }, - iterLinkedDocs: function(f) {linkedDocs(this, f);}, - - getMode: function() {return this.mode;}, - getEditor: function() {return this.cm;} - }); - - Doc.prototype.eachLine = Doc.prototype.iter; - - // The Doc methods that should be available on CodeMirror instances - var dontDelegate = "iter insert remove copy getEditor".split(" "); - for (var prop in Doc.prototype) if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0) - CodeMirror.prototype[prop] = (function(method) { - return function() {return method.apply(this.doc, arguments);}; - })(Doc.prototype[prop]); - - eventMixin(Doc); - - function linkedDocs(doc, f, sharedHistOnly) { - function propagate(doc, skip, sharedHist) { - if (doc.linked) for (var i = 0; i < doc.linked.length; ++i) { - var rel = doc.linked[i]; - if (rel.doc == skip) continue; - var shared = sharedHist && rel.sharedHist; - if (sharedHistOnly && !shared) continue; - f(rel.doc, shared); - propagate(rel.doc, doc, shared); - } - } - propagate(doc, null, true); - } - - function attachDoc(cm, doc) { - if (doc.cm) throw new Error("This document is already in use."); - cm.doc = doc; - doc.cm = cm; - estimateLineHeights(cm); - loadMode(cm); - if (!cm.options.lineWrapping) computeMaxLength(cm); - cm.options.mode = doc.modeOption; - regChange(cm); - } - - // LINE UTILITIES - - function getLine(chunk, n) { - n -= chunk.first; - while (!chunk.lines) { - for (var i = 0;; ++i) { - var child = chunk.children[i], sz = child.chunkSize(); - if (n < sz) { chunk = child; break; } - n -= sz; - } - } - return chunk.lines[n]; - } - - function getBetween(doc, start, end) { - var out = [], n = start.line; - doc.iter(start.line, end.line + 1, function(line) { - var text = line.text; - if (n == end.line) text = text.slice(0, end.ch); - if (n == start.line) text = text.slice(start.ch); - out.push(text); - ++n; - }); - return out; - } - function getLines(doc, from, to) { - var out = []; - doc.iter(from, to, function(line) { out.push(line.text); }); - return out; - } - - function updateLineHeight(line, height) { - var diff = height - line.height; - for (var n = line; n; n = n.parent) n.height += diff; - } - - function lineNo(line) { - if (line.parent == null) return null; - var cur = line.parent, no = indexOf(cur.lines, line); - for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) { - for (var i = 0;; ++i) { - if (chunk.children[i] == cur) break; - no += chunk.children[i].chunkSize(); - } - } - return no + cur.first; - } - - function lineAtHeight(chunk, h) { - var n = chunk.first; - outer: do { - for (var i = 0, e = chunk.children.length; i < e; ++i) { - var child = chunk.children[i], ch = child.height; - if (h < ch) { chunk = child; continue outer; } - h -= ch; - n += child.chunkSize(); - } - return n; - } while (!chunk.lines); - for (var i = 0, e = chunk.lines.length; i < e; ++i) { - var line = chunk.lines[i], lh = line.height; - if (h < lh) break; - h -= lh; - } - return n + i; - } - - function heightAtLine(cm, lineObj) { - lineObj = visualLine(cm.doc, lineObj); - - var h = 0, chunk = lineObj.parent; - for (var i = 0; i < chunk.lines.length; ++i) { - var line = chunk.lines[i]; - if (line == lineObj) break; - else h += line.height; - } - for (var p = chunk.parent; p; chunk = p, p = chunk.parent) { - for (var i = 0; i < p.children.length; ++i) { - var cur = p.children[i]; - if (cur == chunk) break; - else h += cur.height; - } - } - return h; - } - - function getOrder(line) { - var order = line.order; - if (order == null) order = line.order = bidiOrdering(line.text); - return order; - } - - // HISTORY - - function makeHistory(startGen) { - return { - // Arrays of history events. Doing something adds an event to - // done and clears undo. Undoing moves events from done to - // undone, redoing moves them in the other direction. - done: [], undone: [], undoDepth: Infinity, - // Used to track when changes can be merged into a single undo - // event - lastTime: 0, lastOp: null, lastOrigin: null, - // Used by the isClean() method - generation: startGen || 1, maxGeneration: startGen || 1 - }; - } - - function attachLocalSpans(doc, change, from, to) { - var existing = change["spans_" + doc.id], n = 0; - doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function(line) { - if (line.markedSpans) - (existing || (existing = change["spans_" + doc.id] = {}))[n] = line.markedSpans; - ++n; - }); - } - - function historyChangeFromChange(doc, change) { - var from = { line: change.from.line, ch: change.from.ch }; - var histChange = {from: from, to: changeEnd(change), text: getBetween(doc, change.from, change.to)}; - attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1); - linkedDocs(doc, function(doc) {attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);}, true); - return histChange; - } - - function addToHistory(doc, change, selAfter, opId) { - var hist = doc.history; - hist.undone.length = 0; - var time = +new Date, cur = lst(hist.done); - - if (cur && - (hist.lastOp == opId || - hist.lastOrigin == change.origin && change.origin && - ((change.origin.charAt(0) == "+" && doc.cm && hist.lastTime > time - doc.cm.options.historyEventDelay) || - change.origin.charAt(0) == "*"))) { - // Merge this change into the last event - var last = lst(cur.changes); - if (posEq(change.from, change.to) && posEq(change.from, last.to)) { - // Optimized case for simple insertion -- don't want to add - // new changesets for every character typed - last.to = changeEnd(change); - } else { - // Add new sub-event - cur.changes.push(historyChangeFromChange(doc, change)); - } - cur.anchorAfter = selAfter.anchor; cur.headAfter = selAfter.head; - } else { - // Can not be merged, start a new event. - cur = {changes: [historyChangeFromChange(doc, change)], - generation: hist.generation, - anchorBefore: doc.sel.anchor, headBefore: doc.sel.head, - anchorAfter: selAfter.anchor, headAfter: selAfter.head}; - hist.done.push(cur); - hist.generation = ++hist.maxGeneration; - while (hist.done.length > hist.undoDepth) - hist.done.shift(); - } - hist.lastTime = time; - hist.lastOp = opId; - hist.lastOrigin = change.origin; - } - - function removeClearedSpans(spans) { - if (!spans) return null; - for (var i = 0, out; i < spans.length; ++i) { - if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); } - else if (out) out.push(spans[i]); - } - return !out ? spans : out.length ? out : null; - } - - function getOldSpans(doc, change) { - var found = change["spans_" + doc.id]; - if (!found) return null; - for (var i = 0, nw = []; i < change.text.length; ++i) - nw.push(removeClearedSpans(found[i])); - return nw; - } - - // Used both to provide a JSON-safe object in .getHistory, and, when - // detaching a document, to split the history in two - function copyHistoryArray(events, newGroup) { - for (var i = 0, copy = []; i < events.length; ++i) { - var event = events[i], changes = event.changes, newChanges = []; - copy.push({changes: newChanges, anchorBefore: event.anchorBefore, headBefore: event.headBefore, - anchorAfter: event.anchorAfter, headAfter: event.headAfter}); - for (var j = 0; j < changes.length; ++j) { - var change = changes[j], m; - newChanges.push({from: change.from, to: change.to, text: change.text}); - if (newGroup) for (var prop in change) if (m = prop.match(/^spans_(\d+)$/)) { - if (indexOf(newGroup, Number(m[1])) > -1) { - lst(newChanges)[prop] = change[prop]; - delete change[prop]; - } - } - } - } - return copy; - } - - // Rebasing/resetting history to deal with externally-sourced changes - - function rebaseHistSel(pos, from, to, diff) { - if (to < pos.line) { - pos.line += diff; - } else if (from < pos.line) { - pos.line = from; - pos.ch = 0; - } - } - - // Tries to rebase an array of history events given a change in the - // document. If the change touches the same lines as the event, the - // event, and everything 'behind' it, is discarded. If the change is - // before the event, the event's positions are updated. Uses a - // copy-on-write scheme for the positions, to avoid having to - // reallocate them all on every rebase, but also avoid problems with - // shared position objects being unsafely updated. - function rebaseHistArray(array, from, to, diff) { - for (var i = 0; i < array.length; ++i) { - var sub = array[i], ok = true; - for (var j = 0; j < sub.changes.length; ++j) { - var cur = sub.changes[j]; - if (!sub.copied) { cur.from = copyPos(cur.from); cur.to = copyPos(cur.to); } - if (to < cur.from.line) { - cur.from.line += diff; - cur.to.line += diff; - } else if (from <= cur.to.line) { - ok = false; - break; - } - } - if (!sub.copied) { - sub.anchorBefore = copyPos(sub.anchorBefore); sub.headBefore = copyPos(sub.headBefore); - sub.anchorAfter = copyPos(sub.anchorAfter); sub.readAfter = copyPos(sub.headAfter); - sub.copied = true; - } - if (!ok) { - array.splice(0, i + 1); - i = 0; - } else { - rebaseHistSel(sub.anchorBefore); rebaseHistSel(sub.headBefore); - rebaseHistSel(sub.anchorAfter); rebaseHistSel(sub.headAfter); - } - } - } - - function rebaseHist(hist, change) { - var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1; - rebaseHistArray(hist.done, from, to, diff); - rebaseHistArray(hist.undone, from, to, diff); - } - - // EVENT OPERATORS - - function stopMethod() {e_stop(this);} - // Ensure an event has a stop method. - function addStop(event) { - if (!event.stop) event.stop = stopMethod; - return event; - } - - function e_preventDefault(e) { - if (e.preventDefault) e.preventDefault(); - else e.returnValue = false; - } - function e_stopPropagation(e) { - if (e.stopPropagation) e.stopPropagation(); - else e.cancelBubble = true; - } - function e_defaultPrevented(e) { - return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false; - } - function e_stop(e) {e_preventDefault(e); e_stopPropagation(e);} - CodeMirror.e_stop = e_stop; - CodeMirror.e_preventDefault = e_preventDefault; - CodeMirror.e_stopPropagation = e_stopPropagation; - - function e_target(e) {return e.target || e.srcElement;} - function e_button(e) { - var b = e.which; - if (b == null) { - if (e.button & 1) b = 1; - else if (e.button & 2) b = 3; - else if (e.button & 4) b = 2; - } - if (mac && e.ctrlKey && b == 1) b = 3; - return b; - } - - // EVENT HANDLING - - function on(emitter, type, f) { - if (emitter.addEventListener) - emitter.addEventListener(type, f, false); - else if (emitter.attachEvent) - emitter.attachEvent("on" + type, f); - else { - var map = emitter._handlers || (emitter._handlers = {}); - var arr = map[type] || (map[type] = []); - arr.push(f); - } - } - - function off(emitter, type, f) { - if (emitter.removeEventListener) - emitter.removeEventListener(type, f, false); - else if (emitter.detachEvent) - emitter.detachEvent("on" + type, f); - else { - var arr = emitter._handlers && emitter._handlers[type]; - if (!arr) return; - for (var i = 0; i < arr.length; ++i) - if (arr[i] == f) { arr.splice(i, 1); break; } - } - } - - function signal(emitter, type /*, values...*/) { - var arr = emitter._handlers && emitter._handlers[type]; - if (!arr) return; - var args = Array.prototype.slice.call(arguments, 2); - for (var i = 0; i < arr.length; ++i) arr[i].apply(null, args); - } - - var delayedCallbacks, delayedCallbackDepth = 0; - function signalLater(emitter, type /*, values...*/) { - var arr = emitter._handlers && emitter._handlers[type]; - if (!arr) return; - var args = Array.prototype.slice.call(arguments, 2); - if (!delayedCallbacks) { - ++delayedCallbackDepth; - delayedCallbacks = []; - setTimeout(fireDelayed, 0); - } - function bnd(f) {return function(){f.apply(null, args);};}; - for (var i = 0; i < arr.length; ++i) - delayedCallbacks.push(bnd(arr[i])); - } - - function signalDOMEvent(cm, e, override) { - signal(cm, override || e.type, cm, e); - return e_defaultPrevented(e) || e.codemirrorIgnore; - } - - function fireDelayed() { - --delayedCallbackDepth; - var delayed = delayedCallbacks; - delayedCallbacks = null; - for (var i = 0; i < delayed.length; ++i) delayed[i](); - } - - function hasHandler(emitter, type) { - var arr = emitter._handlers && emitter._handlers[type]; - return arr && arr.length > 0; - } - - CodeMirror.on = on; CodeMirror.off = off; CodeMirror.signal = signal; - - function eventMixin(ctor) { - ctor.prototype.on = function(type, f) {on(this, type, f);}; - ctor.prototype.off = function(type, f) {off(this, type, f);}; - } - - // MISC UTILITIES - - // Number of pixels added to scroller and sizer to hide scrollbar - var scrollerCutOff = 30; - - // Returned or thrown by various protocols to signal 'I'm not - // handling this'. - var Pass = CodeMirror.Pass = {toString: function(){return "CodeMirror.Pass";}}; - - function Delayed() {this.id = null;} - Delayed.prototype = {set: function(ms, f) {clearTimeout(this.id); this.id = setTimeout(f, ms);}}; - - // Counts the column offset in a string, taking tabs into account. - // Used mostly to find indentation. - function countColumn(string, end, tabSize, startIndex, startValue) { - if (end == null) { - end = string.search(/[^\s\u00a0]/); - if (end == -1) end = string.length; - } - for (var i = startIndex || 0, n = startValue || 0; i < end; ++i) { - if (string.charAt(i) == "\t") n += tabSize - (n % tabSize); - else ++n; - } - return n; - } - CodeMirror.countColumn = countColumn; - - var spaceStrs = [""]; - function spaceStr(n) { - while (spaceStrs.length <= n) - spaceStrs.push(lst(spaceStrs) + " "); - return spaceStrs[n]; - } - - function lst(arr) { return arr[arr.length-1]; } - - function selectInput(node) { - if (ios) { // Mobile Safari apparently has a bug where select() is broken. - node.selectionStart = 0; - node.selectionEnd = node.value.length; - } else { - // Suppress mysterious IE10 errors - try { node.select(); } - catch(_e) {} - } - } - - function indexOf(collection, elt) { - if (collection.indexOf) return collection.indexOf(elt); - for (var i = 0, e = collection.length; i < e; ++i) - if (collection[i] == elt) return i; - return -1; - } - - function createObj(base, props) { - function Obj() {} - Obj.prototype = base; - var inst = new Obj(); - if (props) copyObj(props, inst); - return inst; - } - - function copyObj(obj, target) { - if (!target) target = {}; - for (var prop in obj) if (obj.hasOwnProperty(prop)) target[prop] = obj[prop]; - return target; - } - - function emptyArray(size) { - for (var a = [], i = 0; i < size; ++i) a.push(undefined); - return a; - } - - function bind(f) { - var args = Array.prototype.slice.call(arguments, 1); - return function(){return f.apply(null, args);}; - } - - var nonASCIISingleCaseWordChar = /[\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/; - function isWordChar(ch) { - return /\w/.test(ch) || ch > "\x80" && - (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch)); - } - - function isEmpty(obj) { - for (var n in obj) if (obj.hasOwnProperty(n) && obj[n]) return false; - return true; - } - - var isExtendingChar = /[\u0300-\u036F\u0483-\u0487\u0488-\u0489\u0591-\u05BD\u05BF\u05C1-\u05C2\u05C4-\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7-\u06E8\u06EA-\u06ED\uA66F\u1DC0–\u1DFF\u20D0–\u20FF\uA670-\uA672\uA674-\uA67D\uA69F\udc00-\udfff\uFE20–\uFE2F]/; - - // DOM UTILITIES - - function elt(tag, content, className, style) { - var e = document.createElement(tag); - if (className) e.className = className; - if (style) e.style.cssText = style; - if (typeof content == "string") setTextContent(e, content); - else if (content) for (var i = 0; i < content.length; ++i) e.appendChild(content[i]); - return e; - } - - function removeChildren(e) { - for (var count = e.childNodes.length; count > 0; --count) - e.removeChild(e.firstChild); - return e; - } - - function removeChildrenAndAdd(parent, e) { - return removeChildren(parent).appendChild(e); - } - - function setTextContent(e, str) { - if (ie_lt9) { - e.innerHTML = ""; - e.appendChild(document.createTextNode(str)); - } else e.textContent = str; - } - - function getRect(node) { - return node.getBoundingClientRect(); - } - CodeMirror.replaceGetRect = function(f) { getRect = f; }; - - // FEATURE DETECTION - - // Detect drag-and-drop - var dragAndDrop = function() { - // There is *some* kind of drag-and-drop support in IE6-8, but I - // couldn't get it to work yet. - if (ie_lt9) return false; - var div = elt('div'); - return "draggable" in div || "dragDrop" in div; - }(); - - // For a reason I have yet to figure out, some browsers disallow - // word wrapping between certain characters *only* if a new inline - // element is started between them. This makes it hard to reliably - // measure the position of things, since that requires inserting an - // extra span. This terribly fragile set of tests matches the - // character combinations that suffer from this phenomenon on the - // various browsers. - function spanAffectsWrapping() { return false; } - if (gecko) // Only for "$'" - spanAffectsWrapping = function(str, i) { - return str.charCodeAt(i - 1) == 36 && str.charCodeAt(i) == 39; - }; - else if (safari && !/Version\/([6-9]|\d\d)\b/.test(navigator.userAgent)) - spanAffectsWrapping = function(str, i) { - return /\-[^ \-?]|\?[^ !\'\"\),.\-\/:;\?\]\}]/.test(str.slice(i - 1, i + 1)); - }; - else if (webkit && /Chrome\/(?:29|[3-9]\d|\d\d\d)\./.test(navigator.userAgent)) - spanAffectsWrapping = function(str, i) { - var code = str.charCodeAt(i - 1); - return code >= 8208 && code <= 8212; - }; - else if (webkit) - spanAffectsWrapping = function(str, i) { - if (i > 1 && str.charCodeAt(i - 1) == 45) { - if (/\w/.test(str.charAt(i - 2)) && /[^\-?\.]/.test(str.charAt(i))) return true; - if (i > 2 && /[\d\.,]/.test(str.charAt(i - 2)) && /[\d\.,]/.test(str.charAt(i))) return false; - } - return /[~!#%&*)=+}\]\\|\"\.>,:;][({[<]|-[^\-?\.\u2010-\u201f\u2026]|\?[\w~`@#$%\^&*(_=+{[|><]|…[\w~`@#$%\^&*(_=+{[><]/.test(str.slice(i - 1, i + 1)); - }; - - var knownScrollbarWidth; - function scrollbarWidth(measure) { - if (knownScrollbarWidth != null) return knownScrollbarWidth; - var test = elt("div", null, null, "width: 50px; height: 50px; overflow-x: scroll"); - removeChildrenAndAdd(measure, test); - if (test.offsetWidth) - knownScrollbarWidth = test.offsetHeight - test.clientHeight; - return knownScrollbarWidth || 0; - } - - var zwspSupported; - function zeroWidthElement(measure) { - if (zwspSupported == null) { - var test = elt("span", "\u200b"); - removeChildrenAndAdd(measure, elt("span", [test, document.createTextNode("x")])); - if (measure.firstChild.offsetHeight != 0) - zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !ie_lt8; - } - if (zwspSupported) return elt("span", "\u200b"); - else return elt("span", "\u00a0", null, "display: inline-block; width: 1px; margin-right: -1px"); - } - - // See if "".split is the broken IE version, if so, provide an - // alternative way to split lines. - var splitLines = "\n\nb".split(/\n/).length != 3 ? function(string) { - var pos = 0, result = [], l = string.length; - while (pos <= l) { - var nl = string.indexOf("\n", pos); - if (nl == -1) nl = string.length; - var line = string.slice(pos, string.charAt(nl - 1) == "\r" ? nl - 1 : nl); - var rt = line.indexOf("\r"); - if (rt != -1) { - result.push(line.slice(0, rt)); - pos += rt + 1; - } else { - result.push(line); - pos = nl + 1; - } - } - return result; - } : function(string){return string.split(/\r\n?|\n/);}; - CodeMirror.splitLines = splitLines; - - var hasSelection = window.getSelection ? function(te) { - try { return te.selectionStart != te.selectionEnd; } - catch(e) { return false; } - } : function(te) { - try {var range = te.ownerDocument.selection.createRange();} - catch(e) {} - if (!range || range.parentElement() != te) return false; - return range.compareEndPoints("StartToEnd", range) != 0; - }; - - var hasCopyEvent = (function() { - var e = elt("div"); - if ("oncopy" in e) return true; - e.setAttribute("oncopy", "return;"); - return typeof e.oncopy == 'function'; - })(); - - // KEY NAMING - - var keyNames = {3: "Enter", 8: "Backspace", 9: "Tab", 13: "Enter", 16: "Shift", 17: "Ctrl", 18: "Alt", - 19: "Pause", 20: "CapsLock", 27: "Esc", 32: "Space", 33: "PageUp", 34: "PageDown", 35: "End", - 36: "Home", 37: "Left", 38: "Up", 39: "Right", 40: "Down", 44: "PrintScrn", 45: "Insert", - 46: "Delete", 59: ";", 91: "Mod", 92: "Mod", 93: "Mod", 109: "-", 107: "=", 127: "Delete", - 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\", - 221: "]", 222: "'", 63276: "PageUp", 63277: "PageDown", 63275: "End", 63273: "Home", - 63234: "Left", 63232: "Up", 63235: "Right", 63233: "Down", 63302: "Insert", 63272: "Delete"}; - CodeMirror.keyNames = keyNames; - (function() { - // Number keys - for (var i = 0; i < 10; i++) keyNames[i + 48] = String(i); - // Alphabetic keys - for (var i = 65; i <= 90; i++) keyNames[i] = String.fromCharCode(i); - // Function keys - for (var i = 1; i <= 12; i++) keyNames[i + 111] = keyNames[i + 63235] = "F" + i; - })(); - - // BIDI HELPERS - - function iterateBidiSections(order, from, to, f) { - if (!order) return f(from, to, "ltr"); - var found = false; - for (var i = 0; i < order.length; ++i) { - var part = order[i]; - if (part.from < to && part.to > from || from == to && part.to == from) { - f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? "rtl" : "ltr"); - found = true; - } - } - if (!found) f(from, to, "ltr"); - } - - function bidiLeft(part) { return part.level % 2 ? part.to : part.from; } - function bidiRight(part) { return part.level % 2 ? part.from : part.to; } - - function lineLeft(line) { var order = getOrder(line); return order ? bidiLeft(order[0]) : 0; } - function lineRight(line) { - var order = getOrder(line); - if (!order) return line.text.length; - return bidiRight(lst(order)); - } - - function lineStart(cm, lineN) { - var line = getLine(cm.doc, lineN); - var visual = visualLine(cm.doc, line); - if (visual != line) lineN = lineNo(visual); - var order = getOrder(visual); - var ch = !order ? 0 : order[0].level % 2 ? lineRight(visual) : lineLeft(visual); - return Pos(lineN, ch); - } - function lineEnd(cm, lineN) { - var merged, line; - while (merged = collapsedSpanAtEnd(line = getLine(cm.doc, lineN))) - lineN = merged.find().to.line; - var order = getOrder(line); - var ch = !order ? line.text.length : order[0].level % 2 ? lineLeft(line) : lineRight(line); - return Pos(lineN, ch); - } - - function compareBidiLevel(order, a, b) { - var linedir = order[0].level; - if (a == linedir) return true; - if (b == linedir) return false; - return a < b; - } - var bidiOther; - function getBidiPartAt(order, pos) { - for (var i = 0, found; i < order.length; ++i) { - var cur = order[i]; - if (cur.from < pos && cur.to > pos) { bidiOther = null; return i; } - if (cur.from == pos || cur.to == pos) { - if (found == null) { - found = i; - } else if (compareBidiLevel(order, cur.level, order[found].level)) { - bidiOther = found; - return i; - } else { - bidiOther = i; - return found; - } - } - } - bidiOther = null; - return found; - } - - function moveInLine(line, pos, dir, byUnit) { - if (!byUnit) return pos + dir; - do pos += dir; - while (pos > 0 && isExtendingChar.test(line.text.charAt(pos))); - return pos; - } - - // This is somewhat involved. It is needed in order to move - // 'visually' through bi-directional text -- i.e., pressing left - // should make the cursor go left, even when in RTL text. The - // tricky part is the 'jumps', where RTL and LTR text touch each - // other. This often requires the cursor offset to move more than - // one unit, in order to visually move one unit. - function moveVisually(line, start, dir, byUnit) { - var bidi = getOrder(line); - if (!bidi) return moveLogically(line, start, dir, byUnit); - var pos = getBidiPartAt(bidi, start), part = bidi[pos]; - var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit); - - for (;;) { - if (target > part.from && target < part.to) return target; - if (target == part.from || target == part.to) { - if (getBidiPartAt(bidi, target) == pos) return target; - part = bidi[pos += dir]; - return (dir > 0) == part.level % 2 ? part.to : part.from; - } else { - part = bidi[pos += dir]; - if (!part) return null; - if ((dir > 0) == part.level % 2) - target = moveInLine(line, part.to, -1, byUnit); - else - target = moveInLine(line, part.from, 1, byUnit); - } - } - } - - function moveLogically(line, start, dir, byUnit) { - var target = start + dir; - if (byUnit) while (target > 0 && isExtendingChar.test(line.text.charAt(target))) target += dir; - return target < 0 || target > line.text.length ? null : target; - } - - // Bidirectional ordering algorithm - // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm - // that this (partially) implements. - - // One-char codes used for character types: - // L (L): Left-to-Right - // R (R): Right-to-Left - // r (AL): Right-to-Left Arabic - // 1 (EN): European Number - // + (ES): European Number Separator - // % (ET): European Number Terminator - // n (AN): Arabic Number - // , (CS): Common Number Separator - // m (NSM): Non-Spacing Mark - // b (BN): Boundary Neutral - // s (B): Paragraph Separator - // t (S): Segment Separator - // w (WS): Whitespace - // N (ON): Other Neutrals - - // Returns null if characters are ordered as they appear - // (left-to-right), or an array of sections ({from, to, level} - // objects) in the order in which they occur visually. - var bidiOrdering = (function() { - // Character types for codepoints 0 to 0xff - var lowTypes = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLL"; - // Character types for codepoints 0x600 to 0x6ff - var arabicTypes = "rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmmrrrrrrrrrrrrrrrrrr"; - function charType(code) { - if (code <= 0xff) return lowTypes.charAt(code); - else if (0x590 <= code && code <= 0x5f4) return "R"; - else if (0x600 <= code && code <= 0x6ff) return arabicTypes.charAt(code - 0x600); - else if (0x700 <= code && code <= 0x8ac) return "r"; - else return "L"; - } - - var bidiRE = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/; - var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/; - // Browsers seem to always treat the boundaries of block elements as being L. - var outerType = "L"; - - return function(str) { - if (!bidiRE.test(str)) return false; - var len = str.length, types = []; - for (var i = 0, type; i < len; ++i) - types.push(type = charType(str.charCodeAt(i))); - - // W1. Examine each non-spacing mark (NSM) in the level run, and - // change the type of the NSM to the type of the previous - // character. If the NSM is at the start of the level run, it will - // get the type of sor. - for (var i = 0, prev = outerType; i < len; ++i) { - var type = types[i]; - if (type == "m") types[i] = prev; - else prev = type; - } - - // W2. Search backwards from each instance of a European number - // until the first strong type (R, L, AL, or sor) is found. If an - // AL is found, change the type of the European number to Arabic - // number. - // W3. Change all ALs to R. - for (var i = 0, cur = outerType; i < len; ++i) { - var type = types[i]; - if (type == "1" && cur == "r") types[i] = "n"; - else if (isStrong.test(type)) { cur = type; if (type == "r") types[i] = "R"; } - } - - // W4. A single European separator between two European numbers - // changes to a European number. A single common separator between - // two numbers of the same type changes to that type. - for (var i = 1, prev = types[0]; i < len - 1; ++i) { - var type = types[i]; - if (type == "+" && prev == "1" && types[i+1] == "1") types[i] = "1"; - else if (type == "," && prev == types[i+1] && - (prev == "1" || prev == "n")) types[i] = prev; - prev = type; - } - - // W5. A sequence of European terminators adjacent to European - // numbers changes to all European numbers. - // W6. Otherwise, separators and terminators change to Other - // Neutral. - for (var i = 0; i < len; ++i) { - var type = types[i]; - if (type == ",") types[i] = "N"; - else if (type == "%") { - for (var end = i + 1; end < len && types[end] == "%"; ++end) {} - var replace = (i && types[i-1] == "!") || (end < len - 1 && types[end] == "1") ? "1" : "N"; - for (var j = i; j < end; ++j) types[j] = replace; - i = end - 1; - } - } - - // W7. Search backwards from each instance of a European number - // until the first strong type (R, L, or sor) is found. If an L is - // found, then change the type of the European number to L. - for (var i = 0, cur = outerType; i < len; ++i) { - var type = types[i]; - if (cur == "L" && type == "1") types[i] = "L"; - else if (isStrong.test(type)) cur = type; - } - - // N1. A sequence of neutrals takes the direction of the - // surrounding strong text if the text on both sides has the same - // direction. European and Arabic numbers act as if they were R in - // terms of their influence on neutrals. Start-of-level-run (sor) - // and end-of-level-run (eor) are used at level run boundaries. - // N2. Any remaining neutrals take the embedding direction. - for (var i = 0; i < len; ++i) { - if (isNeutral.test(types[i])) { - for (var end = i + 1; end < len && isNeutral.test(types[end]); ++end) {} - var before = (i ? types[i-1] : outerType) == "L"; - var after = (end < len - 1 ? types[end] : outerType) == "L"; - var replace = before || after ? "L" : "R"; - for (var j = i; j < end; ++j) types[j] = replace; - i = end - 1; - } - } - - // Here we depart from the documented algorithm, in order to avoid - // building up an actual levels array. Since there are only three - // levels (0, 1, 2) in an implementation that doesn't take - // explicit embedding into account, we can build up the order on - // the fly, without following the level-based algorithm. - var order = [], m; - for (var i = 0; i < len;) { - if (countsAsLeft.test(types[i])) { - var start = i; - for (++i; i < len && countsAsLeft.test(types[i]); ++i) {} - order.push({from: start, to: i, level: 0}); - } else { - var pos = i, at = order.length; - for (++i; i < len && types[i] != "L"; ++i) {} - for (var j = pos; j < i;) { - if (countsAsNum.test(types[j])) { - if (pos < j) order.splice(at, 0, {from: pos, to: j, level: 1}); - var nstart = j; - for (++j; j < i && countsAsNum.test(types[j]); ++j) {} - order.splice(at, 0, {from: nstart, to: j, level: 2}); - pos = j; - } else ++j; - } - if (pos < i) order.splice(at, 0, {from: pos, to: i, level: 1}); - } - } - if (order[0].level == 1 && (m = str.match(/^\s+/))) { - order[0].from = m[0].length; - order.unshift({from: 0, to: m[0].length, level: 0}); - } - if (lst(order).level == 1 && (m = str.match(/\s+$/))) { - lst(order).to -= m[0].length; - order.push({from: len - m[0].length, to: len, level: 0}); - } - if (order[0].level != lst(order).level) - order.push({from: len, to: len, level: order[0].level}); - - return order; - }; - })(); - - // THE END - - CodeMirror.version = "3.20.0"; - - return CodeMirror; -})(); diff --git a/plugins/codemirror/codemirror/mode/apl/apl.js b/plugins/codemirror/codemirror/mode/apl/apl.js deleted file mode 100644 index 5c23af8..0000000 --- a/plugins/codemirror/codemirror/mode/apl/apl.js +++ /dev/null @@ -1,160 +0,0 @@ -CodeMirror.defineMode("apl", function() { - var builtInOps = { - ".": "innerProduct", - "\\": "scan", - "/": "reduce", - "⌿": "reduce1Axis", - "â€": "scan1Axis", - "¨": "each", - "â£": "power" - }; - var builtInFuncs = { - "+": ["conjugate", "add"], - "−": ["negate", "subtract"], - "×": ["signOf", "multiply"], - "÷": ["reciprocal", "divide"], - "⌈": ["ceiling", "greaterOf"], - "⌊": ["floor", "lesserOf"], - "∣": ["absolute", "residue"], - "â³": ["indexGenerate", "indexOf"], - "?": ["roll", "deal"], - "⋆": ["exponentiate", "toThePowerOf"], - "âŸ": ["naturalLog", "logToTheBase"], - "â—‹": ["piTimes", "circularFuncs"], - "!": ["factorial", "binomial"], - "⌹": ["matrixInverse", "matrixDivide"], - "<": [null, "lessThan"], - "≤": [null, "lessThanOrEqual"], - "=": [null, "equals"], - ">": [null, "greaterThan"], - "≥": [null, "greaterThanOrEqual"], - "≠": [null, "notEqual"], - "≡": ["depth", "match"], - "≢": [null, "notMatch"], - "∈": ["enlist", "membership"], - "â·": [null, "find"], - "∪": ["unique", "union"], - "∩": [null, "intersection"], - "∼": ["not", "without"], - "∨": [null, "or"], - "∧": [null, "and"], - "â±": [null, "nor"], - "â²": [null, "nand"], - "â´": ["shapeOf", "reshape"], - ",": ["ravel", "catenate"], - "âª": [null, "firstAxisCatenate"], - "⌽": ["reverse", "rotate"], - "⊖": ["axis1Reverse", "axis1Rotate"], - "â‰": ["transpose", null], - "↑": ["first", "take"], - "↓": [null, "drop"], - "⊂": ["enclose", "partitionWithAxis"], - "⊃": ["diclose", "pick"], - "⌷": [null, "index"], - "â‹": ["gradeUp", null], - "â’": ["gradeDown", null], - "⊤": ["encode", null], - "⊥": ["decode", null], - "â•": ["format", "formatByExample"], - "âŽ": ["execute", null], - "⊣": ["stop", "left"], - "⊢": ["pass", "right"] - }; - - var isOperator = /[\.\/⌿â€Â¨â£]/; - var isNiladic = /â¬/; - var isFunction = /[\+−×÷⌈⌊∣â³\?⋆âŸâ—‹!⌹<≤=>≥≠≡≢∈â·âˆªâˆ©âˆ¼âˆ¨âˆ§â±â²â´,âªâŒ½âŠ–â‰â†‘↓⊂⊃⌷â‹â’⊤⊥â•âŽâŠ£âŠ¢]/; - var isArrow = /â†/; - var isComment = /[â#].*$/; - - var stringEater = function(type) { - var prev; - prev = false; - return function(c) { - prev = c; - if (c === type) { - return prev === "\\"; - } - return true; - }; - }; - return { - startState: function() { - return { - prev: false, - func: false, - op: false, - string: false, - escape: false - }; - }, - token: function(stream, state) { - var ch, funcName, word; - if (stream.eatSpace()) { - return null; - } - ch = stream.next(); - if (ch === '"' || ch === "'") { - stream.eatWhile(stringEater(ch)); - stream.next(); - state.prev = true; - return "string"; - } - if (/[\[{\(]/.test(ch)) { - state.prev = false; - return null; - } - if (/[\]}\)]/.test(ch)) { - state.prev = true; - return null; - } - if (isNiladic.test(ch)) { - state.prev = false; - return "niladic"; - } - if (/[¯\d]/.test(ch)) { - if (state.func) { - state.func = false; - state.prev = false; - } else { - state.prev = true; - } - stream.eatWhile(/[\w\.]/); - return "number"; - } - if (isOperator.test(ch)) { - return "operator apl-" + builtInOps[ch]; - } - if (isArrow.test(ch)) { - return "apl-arrow"; - } - if (isFunction.test(ch)) { - funcName = "apl-"; - if (builtInFuncs[ch] != null) { - if (state.prev) { - funcName += builtInFuncs[ch][1]; - } else { - funcName += builtInFuncs[ch][0]; - } - } - state.func = true; - state.prev = false; - return "function " + funcName; - } - if (isComment.test(ch)) { - stream.skipToEnd(); - return "comment"; - } - if (ch === "∘" && stream.peek() === ".") { - stream.next(); - return "function jot-dot"; - } - stream.eatWhile(/[\w\$_]/); - word = stream.current(); - state.prev = true; - return "keyword"; - } - }; -}); - -CodeMirror.defineMIME("text/apl", "apl"); diff --git a/plugins/codemirror/codemirror/mode/apl/index.html b/plugins/codemirror/codemirror/mode/apl/index.html deleted file mode 100644 index f8282ac..0000000 --- a/plugins/codemirror/codemirror/mode/apl/index.html +++ /dev/null @@ -1,72 +0,0 @@ - - -CodeMirror: APL mode - - - - - - - - - - -
    -

    APL mode

    -
    - - - -

    Simple mode that tries to handle APL as well as it can.

    -

    It attempts to label functions/operators based upon - monadic/dyadic usage (but this is far from fully fleshed out). - This means there are meaningful classnames so hover states can - have popups etc.

    - -

    MIME types defined: text/apl (APL code)

    -
    diff --git a/plugins/codemirror/codemirror/mode/asterisk/asterisk.js b/plugins/codemirror/codemirror/mode/asterisk/asterisk.js deleted file mode 100644 index 60b689d..0000000 --- a/plugins/codemirror/codemirror/mode/asterisk/asterisk.js +++ /dev/null @@ -1,183 +0,0 @@ -/* - * ===================================================================================== - * - * Filename: mode/asterisk/asterisk.js - * - * Description: CodeMirror mode for Asterisk dialplan - * - * Created: 05/17/2012 09:20:25 PM - * Revision: none - * - * Author: Stas Kobzar (stas@modulis.ca), - * Company: Modulis.ca Inc. - * - * ===================================================================================== - */ - -CodeMirror.defineMode("asterisk", function() { - var atoms = ["exten", "same", "include","ignorepat","switch"], - dpcmd = ["#include","#exec"], - apps = [ - "addqueuemember","adsiprog","aelsub","agentlogin","agentmonitoroutgoing","agi", - "alarmreceiver","amd","answer","authenticate","background","backgrounddetect", - "bridge","busy","callcompletioncancel","callcompletionrequest","celgenuserevent", - "changemonitor","chanisavail","channelredirect","chanspy","clearhash","confbridge", - "congestion","continuewhile","controlplayback","dahdiacceptr2call","dahdibarge", - "dahdiras","dahdiscan","dahdisendcallreroutingfacility","dahdisendkeypadfacility", - "datetime","dbdel","dbdeltree","deadagi","dial","dictate","directory","disa", - "dumpchan","eagi","echo","endwhile","exec","execif","execiftime","exitwhile","extenspy", - "externalivr","festival","flash","followme","forkcdr","getcpeid","gosub","gosubif", - "goto","gotoif","gotoiftime","hangup","iax2provision","ices","importvar","incomplete", - "ivrdemo","jabberjoin","jabberleave","jabbersend","jabbersendgroup","jabberstatus", - "jack","log","macro","macroexclusive","macroexit","macroif","mailboxexists","meetme", - "meetmeadmin","meetmechanneladmin","meetmecount","milliwatt","minivmaccmess","minivmdelete", - "minivmgreet","minivmmwi","minivmnotify","minivmrecord","mixmonitor","monitor","morsecode", - "mp3player","mset","musiconhold","nbscat","nocdr","noop","odbc","odbc","odbcfinish", - "originate","ospauth","ospfinish","osplookup","ospnext","page","park","parkandannounce", - "parkedcall","pausemonitor","pausequeuemember","pickup","pickupchan","playback","playtones", - "privacymanager","proceeding","progress","queue","queuelog","raiseexception","read","readexten", - "readfile","receivefax","receivefax","receivefax","record","removequeuemember", - "resetcdr","retrydial","return","ringing","sayalpha","saycountedadj","saycountednoun", - "saycountpl","saydigits","saynumber","sayphonetic","sayunixtime","senddtmf","sendfax", - "sendfax","sendfax","sendimage","sendtext","sendurl","set","setamaflags", - "setcallerpres","setmusiconhold","sipaddheader","sipdtmfmode","sipremoveheader","skel", - "slastation","slatrunk","sms","softhangup","speechactivategrammar","speechbackground", - "speechcreate","speechdeactivategrammar","speechdestroy","speechloadgrammar","speechprocessingsound", - "speechstart","speechunloadgrammar","stackpop","startmusiconhold","stopmixmonitor","stopmonitor", - "stopmusiconhold","stopplaytones","system","testclient","testserver","transfer","tryexec", - "trysystem","unpausemonitor","unpausequeuemember","userevent","verbose","vmauthenticate", - "vmsayname","voicemail","voicemailmain","wait","waitexten","waitfornoise","waitforring", - "waitforsilence","waitmusiconhold","waituntil","while","zapateller" - ]; - - function basicToken(stream,state){ - var cur = ''; - var ch = ''; - ch = stream.next(); - // comment - if(ch == ";") { - stream.skipToEnd(); - return "comment"; - } - // context - if(ch == '[') { - stream.skipTo(']'); - stream.eat(']'); - return "header"; - } - // string - if(ch == '"') { - stream.skipTo('"'); - return "string"; - } - if(ch == "'") { - stream.skipTo("'"); - return "string-2"; - } - // dialplan commands - if(ch == '#') { - stream.eatWhile(/\w/); - cur = stream.current(); - if(dpcmd.indexOf(cur) !== -1) { - stream.skipToEnd(); - return "strong"; - } - } - // application args - if(ch == '$'){ - var ch1 = stream.peek(); - if(ch1 == '{'){ - stream.skipTo('}'); - stream.eat('}'); - return "variable-3"; - } - } - // extension - stream.eatWhile(/\w/); - cur = stream.current(); - if(atoms.indexOf(cur) !== -1) { - state.extenStart = true; - switch(cur) { - case 'same': state.extenSame = true; break; - case 'include': - case 'switch': - case 'ignorepat': - state.extenInclude = true;break; - default:break; - } - return "atom"; - } - } - - return { - startState: function() { - return { - extenStart: false, - extenSame: false, - extenInclude: false, - extenExten: false, - extenPriority: false, - extenApplication: false - }; - }, - token: function(stream, state) { - - var cur = ''; - var ch = ''; - if(stream.eatSpace()) return null; - // extension started - if(state.extenStart){ - stream.eatWhile(/[^\s]/); - cur = stream.current(); - if(/^=>?$/.test(cur)){ - state.extenExten = true; - state.extenStart = false; - return "strong"; - } else { - state.extenStart = false; - stream.skipToEnd(); - return "error"; - } - } else if(state.extenExten) { - // set exten and priority - state.extenExten = false; - state.extenPriority = true; - stream.eatWhile(/[^,]/); - if(state.extenInclude) { - stream.skipToEnd(); - state.extenPriority = false; - state.extenInclude = false; - } - if(state.extenSame) { - state.extenPriority = false; - state.extenSame = false; - state.extenApplication = true; - } - return "tag"; - } else if(state.extenPriority) { - state.extenPriority = false; - state.extenApplication = true; - ch = stream.next(); // get comma - if(state.extenSame) return null; - stream.eatWhile(/[^,]/); - return "number"; - } else if(state.extenApplication) { - stream.eatWhile(/,/); - cur = stream.current(); - if(cur === ',') return null; - stream.eatWhile(/\w/); - cur = stream.current().toLowerCase(); - state.extenApplication = false; - if(apps.indexOf(cur) !== -1){ - return "def strong"; - } - } else{ - return basicToken(stream,state); - } - - return null; - } - }; -}); - -CodeMirror.defineMIME("text/x-asterisk", "asterisk"); diff --git a/plugins/codemirror/codemirror/mode/asterisk/index.html b/plugins/codemirror/codemirror/mode/asterisk/index.html deleted file mode 100644 index 6abdecb..0000000 --- a/plugins/codemirror/codemirror/mode/asterisk/index.html +++ /dev/null @@ -1,154 +0,0 @@ - - -CodeMirror: Asterisk dialplan mode - - - - - - - - - -
    -

    Asterisk dialplan mode

    -
    - - -

    MIME types defined: text/x-asterisk.

    - -
    diff --git a/plugins/codemirror/codemirror/mode/clike/clike.js b/plugins/codemirror/codemirror/mode/clike/clike.js deleted file mode 100644 index f6626cd..0000000 --- a/plugins/codemirror/codemirror/mode/clike/clike.js +++ /dev/null @@ -1,362 +0,0 @@ -CodeMirror.defineMode("clike", function(config, parserConfig) { - var indentUnit = config.indentUnit, - statementIndentUnit = parserConfig.statementIndentUnit || indentUnit, - dontAlignCalls = parserConfig.dontAlignCalls, - keywords = parserConfig.keywords || {}, - builtin = parserConfig.builtin || {}, - blockKeywords = parserConfig.blockKeywords || {}, - atoms = parserConfig.atoms || {}, - hooks = parserConfig.hooks || {}, - multiLineStrings = parserConfig.multiLineStrings; - var isOperatorChar = /[+\-*&%=<>!?|\/]/; - - var curPunc; - - function tokenBase(stream, state) { - var ch = stream.next(); - if (hooks[ch]) { - var result = hooks[ch](stream, state); - if (result !== false) return result; - } - if (ch == '"' || ch == "'") { - state.tokenize = tokenString(ch); - return state.tokenize(stream, state); - } - if (/[\[\]{}\(\),;\:\.]/.test(ch)) { - curPunc = ch; - return null; - } - if (/\d/.test(ch)) { - stream.eatWhile(/[\w\.]/); - return "number"; - } - if (ch == "/") { - if (stream.eat("*")) { - state.tokenize = tokenComment; - return tokenComment(stream, state); - } - if (stream.eat("/")) { - stream.skipToEnd(); - return "comment"; - } - } - if (isOperatorChar.test(ch)) { - stream.eatWhile(isOperatorChar); - return "operator"; - } - stream.eatWhile(/[\w\$_]/); - var cur = stream.current(); - if (keywords.propertyIsEnumerable(cur)) { - if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement"; - return "keyword"; - } - if (builtin.propertyIsEnumerable(cur)) { - if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement"; - return "builtin"; - } - if (atoms.propertyIsEnumerable(cur)) return "atom"; - return "variable"; - } - - function tokenString(quote) { - return function(stream, state) { - var escaped = false, next, end = false; - while ((next = stream.next()) != null) { - if (next == quote && !escaped) {end = true; break;} - escaped = !escaped && next == "\\"; - } - if (end || !(escaped || multiLineStrings)) - state.tokenize = null; - return "string"; - }; - } - - function tokenComment(stream, state) { - var maybeEnd = false, ch; - while (ch = stream.next()) { - if (ch == "/" && maybeEnd) { - state.tokenize = null; - break; - } - maybeEnd = (ch == "*"); - } - return "comment"; - } - - function Context(indented, column, type, align, prev) { - this.indented = indented; - this.column = column; - this.type = type; - this.align = align; - this.prev = prev; - } - function pushContext(state, col, type) { - var indent = state.indented; - if (state.context && state.context.type == "statement") - indent = state.context.indented; - return state.context = new Context(indent, col, type, null, state.context); - } - function popContext(state) { - var t = state.context.type; - if (t == ")" || t == "]" || t == "}") - state.indented = state.context.indented; - return state.context = state.context.prev; - } - - // Interface - - return { - startState: function(basecolumn) { - return { - tokenize: null, - context: new Context((basecolumn || 0) - indentUnit, 0, "top", false), - indented: 0, - startOfLine: true - }; - }, - - token: function(stream, state) { - var ctx = state.context; - if (stream.sol()) { - if (ctx.align == null) ctx.align = false; - state.indented = stream.indentation(); - state.startOfLine = true; - } - if (stream.eatSpace()) return null; - curPunc = null; - var style = (state.tokenize || tokenBase)(stream, state); - if (style == "comment" || style == "meta") return style; - if (ctx.align == null) ctx.align = true; - - if ((curPunc == ";" || curPunc == ":" || curPunc == ",") && ctx.type == "statement") popContext(state); - else if (curPunc == "{") pushContext(state, stream.column(), "}"); - else if (curPunc == "[") pushContext(state, stream.column(), "]"); - else if (curPunc == "(") pushContext(state, stream.column(), ")"); - else if (curPunc == "}") { - while (ctx.type == "statement") ctx = popContext(state); - if (ctx.type == "}") ctx = popContext(state); - while (ctx.type == "statement") ctx = popContext(state); - } - else if (curPunc == ctx.type) popContext(state); - else if (((ctx.type == "}" || ctx.type == "top") && curPunc != ';') || (ctx.type == "statement" && curPunc == "newstatement")) - pushContext(state, stream.column(), "statement"); - state.startOfLine = false; - return style; - }, - - indent: function(state, textAfter) { - if (state.tokenize != tokenBase && state.tokenize != null) return CodeMirror.Pass; - var ctx = state.context, firstChar = textAfter && textAfter.charAt(0); - if (ctx.type == "statement" && firstChar == "}") ctx = ctx.prev; - var closing = firstChar == ctx.type; - if (ctx.type == "statement") return ctx.indented + (firstChar == "{" ? 0 : statementIndentUnit); - else if (ctx.align && (!dontAlignCalls || ctx.type != ")")) return ctx.column + (closing ? 0 : 1); - else if (ctx.type == ")" && !closing) return ctx.indented + statementIndentUnit; - else return ctx.indented + (closing ? 0 : indentUnit); - }, - - electricChars: "{}", - blockCommentStart: "/*", - blockCommentEnd: "*/", - lineComment: "//", - fold: "brace" - }; -}); - -(function() { - function words(str) { - var obj = {}, words = str.split(" "); - for (var i = 0; i < words.length; ++i) obj[words[i]] = true; - return obj; - } - var cKeywords = "auto if break int case long char register continue return default short do sizeof " + - "double static else struct entry switch extern typedef float union for unsigned " + - "goto while enum void const signed volatile"; - - function cppHook(stream, state) { - if (!state.startOfLine) return false; - for (;;) { - if (stream.skipTo("\\")) { - stream.next(); - if (stream.eol()) { - state.tokenize = cppHook; - break; - } - } else { - stream.skipToEnd(); - state.tokenize = null; - break; - } - } - return "meta"; - } - - // C#-style strings where "" escapes a quote. - function tokenAtString(stream, state) { - var next; - while ((next = stream.next()) != null) { - if (next == '"' && !stream.eat('"')) { - state.tokenize = null; - break; - } - } - return "string"; - } - - function mimes(ms, mode) { - for (var i = 0; i < ms.length; ++i) CodeMirror.defineMIME(ms[i], mode); - } - - mimes(["text/x-csrc", "text/x-c", "text/x-chdr"], { - name: "clike", - keywords: words(cKeywords), - blockKeywords: words("case do else for if switch while struct"), - atoms: words("null"), - hooks: {"#": cppHook} - }); - mimes(["text/x-c++src", "text/x-c++hdr"], { - name: "clike", - keywords: words(cKeywords + " asm dynamic_cast namespace reinterpret_cast try bool explicit new " + - "static_cast typeid catch operator template typename class friend private " + - "this using const_cast inline public throw virtual delete mutable protected " + - "wchar_t"), - blockKeywords: words("catch class do else finally for if struct switch try while"), - atoms: words("true false null"), - hooks: {"#": cppHook} - }); - CodeMirror.defineMIME("text/x-java", { - name: "clike", - keywords: words("abstract assert boolean break byte case catch char class const continue default " + - "do double else enum extends final finally float for goto if implements import " + - "instanceof int interface long native new package private protected public " + - "return short static strictfp super switch synchronized this throw throws transient " + - "try void volatile while"), - blockKeywords: words("catch class do else finally for if switch try while"), - atoms: words("true false null"), - hooks: { - "@": function(stream) { - stream.eatWhile(/[\w\$_]/); - return "meta"; - } - } - }); - CodeMirror.defineMIME("text/x-csharp", { - name: "clike", - keywords: words("abstract as base break case catch checked class const continue" + - " default delegate do else enum event explicit extern finally fixed for" + - " foreach goto if implicit in interface internal is lock namespace new" + - " operator out override params private protected public readonly ref return sealed" + - " sizeof stackalloc static struct switch this throw try typeof unchecked" + - " unsafe using virtual void volatile while add alias ascending descending dynamic from get" + - " global group into join let orderby partial remove select set value var yield"), - blockKeywords: words("catch class do else finally for foreach if struct switch try while"), - builtin: words("Boolean Byte Char DateTime DateTimeOffset Decimal Double" + - " Guid Int16 Int32 Int64 Object SByte Single String TimeSpan UInt16 UInt32" + - " UInt64 bool byte char decimal double short int long object" + - " sbyte float string ushort uint ulong"), - atoms: words("true false null"), - hooks: { - "@": function(stream, state) { - if (stream.eat('"')) { - state.tokenize = tokenAtString; - return tokenAtString(stream, state); - } - stream.eatWhile(/[\w\$_]/); - return "meta"; - } - } - }); - CodeMirror.defineMIME("text/x-scala", { - name: "clike", - keywords: words( - - /* scala */ - "abstract case catch class def do else extends false final finally for forSome if " + - "implicit import lazy match new null object override package private protected return " + - "sealed super this throw trait try trye type val var while with yield _ : = => <- <: " + - "<% >: # @ " + - - /* package scala */ - "assert assume require print println printf readLine readBoolean readByte readShort " + - "readChar readInt readLong readFloat readDouble " + - - "AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either " + - "Enumeration Equiv Error Exception Fractional Function IndexedSeq Integral Iterable " + - "Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering " + - "Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder " + - "StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector :: #:: " + - - /* package java.lang */ - "Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable " + - "Compiler Double Exception Float Integer Long Math Number Object Package Pair Process " + - "Runtime Runnable SecurityManager Short StackTraceElement StrictMath String " + - "StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void" - - - ), - blockKeywords: words("catch class do else finally for forSome if match switch try while"), - atoms: words("true false null"), - hooks: { - "@": function(stream) { - stream.eatWhile(/[\w\$_]/); - return "meta"; - } - } - }); - mimes(["x-shader/x-vertex", "x-shader/x-fragment"], { - name: "clike", - keywords: words("float int bool void " + - "vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 " + - "mat2 mat3 mat4 " + - "sampler1D sampler2D sampler3D samplerCube " + - "sampler1DShadow sampler2DShadow" + - "const attribute uniform varying " + - "break continue discard return " + - "for while do if else struct " + - "in out inout"), - blockKeywords: words("for while do if else struct"), - builtin: words("radians degrees sin cos tan asin acos atan " + - "pow exp log exp2 sqrt inversesqrt " + - "abs sign floor ceil fract mod min max clamp mix step smootstep " + - "length distance dot cross normalize ftransform faceforward " + - "reflect refract matrixCompMult " + - "lessThan lessThanEqual greaterThan greaterThanEqual " + - "equal notEqual any all not " + - "texture1D texture1DProj texture1DLod texture1DProjLod " + - "texture2D texture2DProj texture2DLod texture2DProjLod " + - "texture3D texture3DProj texture3DLod texture3DProjLod " + - "textureCube textureCubeLod " + - "shadow1D shadow2D shadow1DProj shadow2DProj " + - "shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod " + - "dFdx dFdy fwidth " + - "noise1 noise2 noise3 noise4"), - atoms: words("true false " + - "gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex " + - "gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 " + - "gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 " + - "gl_FogCoord " + - "gl_Position gl_PointSize gl_ClipVertex " + - "gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor " + - "gl_TexCoord gl_FogFragCoord " + - "gl_FragCoord gl_FrontFacing " + - "gl_FragColor gl_FragData gl_FragDepth " + - "gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix " + - "gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse " + - "gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse " + - "gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose " + - "gl_ProjectionMatrixInverseTranspose " + - "gl_ModelViewProjectionMatrixInverseTranspose " + - "gl_TextureMatrixInverseTranspose " + - "gl_NormalScale gl_DepthRange gl_ClipPlane " + - "gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel " + - "gl_FrontLightModelProduct gl_BackLightModelProduct " + - "gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ " + - "gl_FogParameters " + - "gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords " + - "gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats " + - "gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits " + - "gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits " + - "gl_MaxDrawBuffers"), - hooks: {"#": cppHook} - }); -}()); diff --git a/plugins/codemirror/codemirror/mode/clike/index.html b/plugins/codemirror/codemirror/mode/clike/index.html deleted file mode 100644 index 93bd718..0000000 --- a/plugins/codemirror/codemirror/mode/clike/index.html +++ /dev/null @@ -1,195 +0,0 @@ - - -CodeMirror: C-like mode - - - - - - - - - - -
    -

    C-like mode

    - -
    - -

    C++ example

    - -
    - -

    Java example

    - -
    - - - -

    Simple mode that tries to handle C-like languages as well as it - can. Takes two configuration parameters: keywords, an - object whose property names are the keywords in the language, - and useCPP, which determines whether C preprocessor - directives are recognized.

    - -

    MIME types defined: text/x-csrc - (C code), text/x-c++src (C++ - code), text/x-java (Java - code), text/x-csharp (C#).

    -
    diff --git a/plugins/codemirror/codemirror/mode/clike/scala.html b/plugins/codemirror/codemirror/mode/clike/scala.html deleted file mode 100644 index e9acc04..0000000 --- a/plugins/codemirror/codemirror/mode/clike/scala.html +++ /dev/null @@ -1,767 +0,0 @@ - - -CodeMirror: Scala mode - - - - - - - - - - -
    -

    Scala mode

    -
    - -
    - - -
    diff --git a/plugins/codemirror/codemirror/mode/clojure/clojure.js b/plugins/codemirror/codemirror/mode/clojure/clojure.js deleted file mode 100644 index ee22a12..0000000 --- a/plugins/codemirror/codemirror/mode/clojure/clojure.js +++ /dev/null @@ -1,224 +0,0 @@ -/** - * Author: Hans Engel - * Branched from CodeMirror's Scheme mode (by Koh Zi Han, based on implementation by Koh Zi Chun) - */ -CodeMirror.defineMode("clojure", function () { - var BUILTIN = "builtin", COMMENT = "comment", STRING = "string", CHARACTER = "string-2", - ATOM = "atom", NUMBER = "number", BRACKET = "bracket", KEYWORD = "keyword"; - var INDENT_WORD_SKIP = 2; - - function makeKeywords(str) { - var obj = {}, words = str.split(" "); - for (var i = 0; i < words.length; ++i) obj[words[i]] = true; - return obj; - } - - var atoms = makeKeywords("true false nil"); - - var keywords = makeKeywords( - "defn defn- def def- defonce defmulti defmethod defmacro defstruct deftype defprotocol defrecord defproject deftest slice defalias defhinted defmacro- defn-memo defnk defnk defonce- defunbound defunbound- defvar defvar- let letfn do case cond condp for loop recur when when-not when-let when-first if if-let if-not . .. -> ->> doto and or dosync doseq dotimes dorun doall load import unimport ns in-ns refer try catch finally throw with-open with-local-vars binding gen-class gen-and-load-class gen-and-save-class handler-case handle"); - - var builtins = makeKeywords( - "* *' *1 *2 *3 *agent* *allow-unresolved-vars* *assert* *clojure-version* *command-line-args* *compile-files* *compile-path* *compiler-options* *data-readers* *e *err* *file* *flush-on-newline* *fn-loader* *in* *math-context* *ns* *out* *print-dup* *print-length* *print-level* *print-meta* *print-readably* *read-eval* *source-path* *unchecked-math* *use-context-classloader* *verbose-defrecords* *warn-on-reflection* + +' - -' -> ->> ->ArrayChunk ->Vec ->VecNode ->VecSeq -cache-protocol-fn -reset-methods .. / < <= = == > >= EMPTY-NODE accessor aclone add-classpath add-watch agent agent-error agent-errors aget alength alias all-ns alter alter-meta! alter-var-root amap ancestors and apply areduce array-map aset aset-boolean aset-byte aset-char aset-double aset-float aset-int aset-long aset-short assert assoc assoc! assoc-in associative? atom await await-for await1 bases bean bigdec bigint biginteger binding bit-and bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left bit-shift-right bit-test bit-xor boolean boolean-array booleans bound-fn bound-fn* bound? butlast byte byte-array bytes case cast char char-array char-escape-string char-name-string char? chars chunk chunk-append chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? class class? clear-agent-errors clojure-version coll? comment commute comp comparator compare compare-and-set! compile complement concat cond condp conj conj! cons constantly construct-proxy contains? count counted? create-ns create-struct cycle dec dec' decimal? declare default-data-readers definline definterface defmacro defmethod defmulti defn defn- defonce defprotocol defrecord defstruct deftype delay delay? deliver denominator deref derive descendants destructure disj disj! dissoc dissoc! distinct distinct? doall dorun doseq dosync dotimes doto double double-array doubles drop drop-last drop-while empty empty? ensure enumeration-seq error-handler error-mode eval even? every-pred every? ex-data ex-info extend extend-protocol extend-type extenders extends? false? ffirst file-seq filter filterv find find-keyword find-ns find-protocol-impl find-protocol-method find-var first flatten float float-array float? floats flush fn fn? fnext fnil for force format frequencies future future-call future-cancel future-cancelled? future-done? future? gen-class gen-interface gensym get get-in get-method get-proxy-class get-thread-bindings get-validator group-by hash hash-combine hash-map hash-set identical? identity if-let if-not ifn? import in-ns inc inc' init-proxy instance? int int-array integer? interleave intern interpose into into-array ints io! isa? iterate iterator-seq juxt keep keep-indexed key keys keyword keyword? last lazy-cat lazy-seq let letfn line-seq list list* list? load load-file load-reader load-string loaded-libs locking long long-array longs loop macroexpand macroexpand-1 make-array make-hierarchy map map-indexed map? mapcat mapv max max-key memfn memoize merge merge-with meta method-sig methods min min-key mod munge name namespace namespace-munge neg? newline next nfirst nil? nnext not not-any? not-empty not-every? not= ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ns-refers ns-resolve ns-unalias ns-unmap nth nthnext nthrest num number? numerator object-array odd? or parents partial partition partition-all partition-by pcalls peek persistent! pmap pop pop! pop-thread-bindings pos? pr pr-str prefer-method prefers primitives-classnames print print-ctor print-dup print-method print-simple print-str printf println println-str prn prn-str promise proxy proxy-call-with-super proxy-mappings proxy-name proxy-super push-thread-bindings pvalues quot rand rand-int rand-nth range ratio? rational? rationalize re-find re-groups re-matcher re-matches re-pattern re-seq read read-line read-string realized? reduce reduce-kv reductions ref ref-history-count ref-max-history ref-min-history ref-set refer refer-clojure reify release-pending-sends rem remove remove-all-methods remove-method remove-ns remove-watch repeat repeatedly replace replicate require reset! reset-meta! resolve rest restart-agent resultset-seq reverse reversible? rseq rsubseq satisfies? second select-keys send send-off seq seq? seque sequence sequential? set set-error-handler! set-error-mode! set-validator! set? short short-array shorts shuffle shutdown-agents slurp some some-fn sort sort-by sorted-map sorted-map-by sorted-set sorted-set-by sorted? special-symbol? spit split-at split-with str string? struct struct-map subs subseq subvec supers swap! symbol symbol? sync take take-last take-nth take-while test the-ns thread-bound? time to-array to-array-2d trampoline transient tree-seq true? type unchecked-add unchecked-add-int unchecked-byte unchecked-char unchecked-dec unchecked-dec-int unchecked-divide-int unchecked-double unchecked-float unchecked-inc unchecked-inc-int unchecked-int unchecked-long unchecked-multiply unchecked-multiply-int unchecked-negate unchecked-negate-int unchecked-remainder-int unchecked-short unchecked-subtract unchecked-subtract-int underive unquote unquote-splicing update-in update-proxy use val vals var-get var-set var? vary-meta vec vector vector-of vector? when when-first when-let when-not while with-bindings with-bindings* with-in-str with-loading-context with-local-vars with-meta with-open with-out-str with-precision with-redefs with-redefs-fn xml-seq zero? zipmap *default-data-reader-fn* as-> cond-> cond->> reduced reduced? send-via set-agent-send-executor! set-agent-send-off-executor! some-> some->>"); - - var indentKeys = makeKeywords( - // Built-ins - "ns fn def defn defmethod bound-fn if if-not case condp when while when-not when-first do future comment doto locking proxy with-open with-precision reify deftype defrecord defprotocol extend extend-protocol extend-type try catch " + - - // Binding forms - "let letfn binding loop for doseq dotimes when-let if-let " + - - // Data structures - "defstruct struct-map assoc " + - - // clojure.test - "testing deftest " + - - // contrib - "handler-case handle dotrace deftrace"); - - var tests = { - digit: /\d/, - digit_or_colon: /[\d:]/, - hex: /[0-9a-f]/i, - sign: /[+-]/, - exponent: /e/i, - keyword_char: /[^\s\(\[\;\)\]]/, - symbol: /[\w*+!\-\._?:\/]/ - }; - - function stateStack(indent, type, prev) { // represents a state stack object - this.indent = indent; - this.type = type; - this.prev = prev; - } - - function pushStack(state, indent, type) { - state.indentStack = new stateStack(indent, type, state.indentStack); - } - - function popStack(state) { - state.indentStack = state.indentStack.prev; - } - - function isNumber(ch, stream){ - // hex - if ( ch === '0' && stream.eat(/x/i) ) { - stream.eatWhile(tests.hex); - return true; - } - - // leading sign - if ( ( ch == '+' || ch == '-' ) && ( tests.digit.test(stream.peek()) ) ) { - stream.eat(tests.sign); - ch = stream.next(); - } - - if ( tests.digit.test(ch) ) { - stream.eat(ch); - stream.eatWhile(tests.digit); - - if ( '.' == stream.peek() ) { - stream.eat('.'); - stream.eatWhile(tests.digit); - } - - if ( stream.eat(tests.exponent) ) { - stream.eat(tests.sign); - stream.eatWhile(tests.digit); - } - - return true; - } - - return false; - } - - // Eat character that starts after backslash \ - function eatCharacter(stream) { - var first = stream.next(); - // Read special literals: backspace, newline, space, return. - // Just read all lowercase letters. - if (first.match(/[a-z]/) && stream.match(/[a-z]+/, true)) { - return; - } - // Read unicode character: \u1000 \uA0a1 - if (first === "u") { - stream.match(/[0-9a-z]{4}/i, true); - } - } - - return { - startState: function () { - return { - indentStack: null, - indentation: 0, - mode: false - }; - }, - - token: function (stream, state) { - if (state.indentStack == null && stream.sol()) { - // update indentation, but only if indentStack is empty - state.indentation = stream.indentation(); - } - - // skip spaces - if (stream.eatSpace()) { - return null; - } - var returnType = null; - - switch(state.mode){ - case "string": // multi-line string parsing mode - var next, escaped = false; - while ((next = stream.next()) != null) { - if (next == "\"" && !escaped) { - - state.mode = false; - break; - } - escaped = !escaped && next == "\\"; - } - returnType = STRING; // continue on in string mode - break; - default: // default parsing mode - var ch = stream.next(); - - if (ch == "\"") { - state.mode = "string"; - returnType = STRING; - } else if (ch == "\\") { - eatCharacter(stream); - returnType = CHARACTER; - } else if (ch == "'" && !( tests.digit_or_colon.test(stream.peek()) )) { - returnType = ATOM; - } else if (ch == ";") { // comment - stream.skipToEnd(); // rest of the line is a comment - returnType = COMMENT; - } else if (isNumber(ch,stream)){ - returnType = NUMBER; - } else if (ch == "(" || ch == "[" || ch == "{" ) { - var keyWord = '', indentTemp = stream.column(), letter; - /** - Either - (indent-word .. - (non-indent-word .. - (;something else, bracket, etc. - */ - - if (ch == "(") while ((letter = stream.eat(tests.keyword_char)) != null) { - keyWord += letter; - } - - if (keyWord.length > 0 && (indentKeys.propertyIsEnumerable(keyWord) || - /^(?:def|with)/.test(keyWord))) { // indent-word - pushStack(state, indentTemp + INDENT_WORD_SKIP, ch); - } else { // non-indent word - // we continue eating the spaces - stream.eatSpace(); - if (stream.eol() || stream.peek() == ";") { - // nothing significant after - // we restart indentation 1 space after - pushStack(state, indentTemp + 1, ch); - } else { - pushStack(state, indentTemp + stream.current().length, ch); // else we match - } - } - stream.backUp(stream.current().length - 1); // undo all the eating - - returnType = BRACKET; - } else if (ch == ")" || ch == "]" || ch == "}") { - returnType = BRACKET; - if (state.indentStack != null && state.indentStack.type == (ch == ")" ? "(" : (ch == "]" ? "[" :"{"))) { - popStack(state); - } - } else if ( ch == ":" ) { - stream.eatWhile(tests.symbol); - return ATOM; - } else { - stream.eatWhile(tests.symbol); - - if (keywords && keywords.propertyIsEnumerable(stream.current())) { - returnType = KEYWORD; - } else if (builtins && builtins.propertyIsEnumerable(stream.current())) { - returnType = BUILTIN; - } else if (atoms && atoms.propertyIsEnumerable(stream.current())) { - returnType = ATOM; - } else returnType = null; - } - } - - return returnType; - }, - - indent: function (state) { - if (state.indentStack == null) return state.indentation; - return state.indentStack.indent; - }, - - lineComment: ";;" - }; -}); - -CodeMirror.defineMIME("text/x-clojure", "clojure"); diff --git a/plugins/codemirror/codemirror/mode/clojure/index.html b/plugins/codemirror/codemirror/mode/clojure/index.html deleted file mode 100644 index 5a50c56..0000000 --- a/plugins/codemirror/codemirror/mode/clojure/index.html +++ /dev/null @@ -1,88 +0,0 @@ - - -CodeMirror: Clojure mode - - - - - - - - - -
    -

    Clojure mode

    -
    - - -

    MIME types defined: text/x-clojure.

    - -
    diff --git a/plugins/codemirror/codemirror/mode/cobol/cobol.js b/plugins/codemirror/codemirror/mode/cobol/cobol.js deleted file mode 100644 index d92491d..0000000 --- a/plugins/codemirror/codemirror/mode/cobol/cobol.js +++ /dev/null @@ -1,240 +0,0 @@ -/** - * Author: Gautam Mehta - * Branched from CodeMirror's Scheme mode - */ -CodeMirror.defineMode("cobol", function () { - var BUILTIN = "builtin", COMMENT = "comment", STRING = "string", - ATOM = "atom", NUMBER = "number", KEYWORD = "keyword", MODTAG = "header", - COBOLLINENUM = "def", PERIOD = "link"; - function makeKeywords(str) { - var obj = {}, words = str.split(" "); - for (var i = 0; i < words.length; ++i) obj[words[i]] = true; - return obj; - } - var atoms = makeKeywords("TRUE FALSE ZEROES ZEROS ZERO SPACES SPACE LOW-VALUE LOW-VALUES "); - var keywords = makeKeywords( - "ACCEPT ACCESS ACQUIRE ADD ADDRESS " + - "ADVANCING AFTER ALIAS ALL ALPHABET " + - "ALPHABETIC ALPHABETIC-LOWER ALPHABETIC-UPPER ALPHANUMERIC ALPHANUMERIC-EDITED " + - "ALSO ALTER ALTERNATE AND ANY " + - "ARE AREA AREAS ARITHMETIC ASCENDING " + - "ASSIGN AT ATTRIBUTE AUTHOR AUTO " + - "AUTO-SKIP AUTOMATIC B-AND B-EXOR B-LESS " + - "B-NOT B-OR BACKGROUND-COLOR BACKGROUND-COLOUR BEEP " + - "BEFORE BELL BINARY BIT BITS " + - "BLANK BLINK BLOCK BOOLEAN BOTTOM " + - "BY CALL CANCEL CD CF " + - "CH CHARACTER CHARACTERS CLASS CLOCK-UNITS " + - "CLOSE COBOL CODE CODE-SET COL " + - "COLLATING COLUMN COMMA COMMIT COMMITMENT " + - "COMMON COMMUNICATION COMP COMP-0 COMP-1 " + - "COMP-2 COMP-3 COMP-4 COMP-5 COMP-6 " + - "COMP-7 COMP-8 COMP-9 COMPUTATIONAL COMPUTATIONAL-0 " + - "COMPUTATIONAL-1 COMPUTATIONAL-2 COMPUTATIONAL-3 COMPUTATIONAL-4 COMPUTATIONAL-5 " + - "COMPUTATIONAL-6 COMPUTATIONAL-7 COMPUTATIONAL-8 COMPUTATIONAL-9 COMPUTE " + - "CONFIGURATION CONNECT CONSOLE CONTAINED CONTAINS " + - "CONTENT CONTINUE CONTROL CONTROL-AREA CONTROLS " + - "CONVERTING COPY CORR CORRESPONDING COUNT " + - "CRT CRT-UNDER CURRENCY CURRENT CURSOR " + - "DATA DATE DATE-COMPILED DATE-WRITTEN DAY " + - "DAY-OF-WEEK DB DB-ACCESS-CONTROL-KEY DB-DATA-NAME DB-EXCEPTION " + - "DB-FORMAT-NAME DB-RECORD-NAME DB-SET-NAME DB-STATUS DBCS " + - "DBCS-EDITED DE DEBUG-CONTENTS DEBUG-ITEM DEBUG-LINE " + - "DEBUG-NAME DEBUG-SUB-1 DEBUG-SUB-2 DEBUG-SUB-3 DEBUGGING " + - "DECIMAL-POINT DECLARATIVES DEFAULT DELETE DELIMITED " + - "DELIMITER DEPENDING DESCENDING DESCRIBED DESTINATION " + - "DETAIL DISABLE DISCONNECT DISPLAY DISPLAY-1 " + - "DISPLAY-2 DISPLAY-3 DISPLAY-4 DISPLAY-5 DISPLAY-6 " + - "DISPLAY-7 DISPLAY-8 DISPLAY-9 DIVIDE DIVISION " + - "DOWN DROP DUPLICATE DUPLICATES DYNAMIC " + - "EBCDIC EGI EJECT ELSE EMI " + - "EMPTY EMPTY-CHECK ENABLE END END. END-ACCEPT END-ACCEPT. " + - "END-ADD END-CALL END-COMPUTE END-DELETE END-DISPLAY " + - "END-DIVIDE END-EVALUATE END-IF END-INVOKE END-MULTIPLY " + - "END-OF-PAGE END-PERFORM END-READ END-RECEIVE END-RETURN " + - "END-REWRITE END-SEARCH END-START END-STRING END-SUBTRACT " + - "END-UNSTRING END-WRITE END-XML ENTER ENTRY " + - "ENVIRONMENT EOP EQUAL EQUALS ERASE " + - "ERROR ESI EVALUATE EVERY EXCEEDS " + - "EXCEPTION EXCLUSIVE EXIT EXTEND EXTERNAL " + - "EXTERNALLY-DESCRIBED-KEY FD FETCH FILE FILE-CONTROL " + - "FILE-STREAM FILES FILLER FINAL FIND " + - "FINISH FIRST FOOTING FOR FOREGROUND-COLOR " + - "FOREGROUND-COLOUR FORMAT FREE FROM FULL " + - "FUNCTION GENERATE GET GIVING GLOBAL " + - "GO GOBACK GREATER GROUP HEADING " + - "HIGH-VALUE HIGH-VALUES HIGHLIGHT I-O I-O-CONTROL " + - "ID IDENTIFICATION IF IN INDEX " + - "INDEX-1 INDEX-2 INDEX-3 INDEX-4 INDEX-5 " + - "INDEX-6 INDEX-7 INDEX-8 INDEX-9 INDEXED " + - "INDIC INDICATE INDICATOR INDICATORS INITIAL " + - "INITIALIZE INITIATE INPUT INPUT-OUTPUT INSPECT " + - "INSTALLATION INTO INVALID INVOKE IS " + - "JUST JUSTIFIED KANJI KEEP KEY " + - "LABEL LAST LD LEADING LEFT " + - "LEFT-JUSTIFY LENGTH LENGTH-CHECK LESS LIBRARY " + - "LIKE LIMIT LIMITS LINAGE LINAGE-COUNTER " + - "LINE LINE-COUNTER LINES LINKAGE LOCAL-STORAGE " + - "LOCALE LOCALLY LOCK " + - "MEMBER MEMORY MERGE MESSAGE METACLASS " + - "MODE MODIFIED MODIFY MODULES MOVE " + - "MULTIPLE MULTIPLY NATIONAL NATIVE NEGATIVE " + - "NEXT NO NO-ECHO NONE NOT " + - "NULL NULL-KEY-MAP NULL-MAP NULLS NUMBER " + - "NUMERIC NUMERIC-EDITED OBJECT OBJECT-COMPUTER OCCURS " + - "OF OFF OMITTED ON ONLY " + - "OPEN OPTIONAL OR ORDER ORGANIZATION " + - "OTHER OUTPUT OVERFLOW OWNER PACKED-DECIMAL " + - "PADDING PAGE PAGE-COUNTER PARSE PERFORM " + - "PF PH PIC PICTURE PLUS " + - "POINTER POSITION POSITIVE PREFIX PRESENT " + - "PRINTING PRIOR PROCEDURE PROCEDURE-POINTER PROCEDURES " + - "PROCEED PROCESS PROCESSING PROGRAM PROGRAM-ID " + - "PROMPT PROTECTED PURGE QUEUE QUOTE " + - "QUOTES RANDOM RD READ READY " + - "REALM RECEIVE RECONNECT RECORD RECORD-NAME " + - "RECORDS RECURSIVE REDEFINES REEL REFERENCE " + - "REFERENCE-MONITOR REFERENCES RELATION RELATIVE RELEASE " + - "REMAINDER REMOVAL RENAMES REPEATED REPLACE " + - "REPLACING REPORT REPORTING REPORTS REPOSITORY " + - "REQUIRED RERUN RESERVE RESET RETAINING " + - "RETRIEVAL RETURN RETURN-CODE RETURNING REVERSE-VIDEO " + - "REVERSED REWIND REWRITE RF RH " + - "RIGHT RIGHT-JUSTIFY ROLLBACK ROLLING ROUNDED " + - "RUN SAME SCREEN SD SEARCH " + - "SECTION SECURE SECURITY SEGMENT SEGMENT-LIMIT " + - "SELECT SEND SENTENCE SEPARATE SEQUENCE " + - "SEQUENTIAL SET SHARED SIGN SIZE " + - "SKIP1 SKIP2 SKIP3 SORT SORT-MERGE " + - "SORT-RETURN SOURCE SOURCE-COMPUTER SPACE-FILL " + - "SPECIAL-NAMES STANDARD STANDARD-1 STANDARD-2 " + - "START STARTING STATUS STOP STORE " + - "STRING SUB-QUEUE-1 SUB-QUEUE-2 SUB-QUEUE-3 SUB-SCHEMA " + - "SUBFILE SUBSTITUTE SUBTRACT SUM SUPPRESS " + - "SYMBOLIC SYNC SYNCHRONIZED SYSIN SYSOUT " + - "TABLE TALLYING TAPE TENANT TERMINAL " + - "TERMINATE TEST TEXT THAN THEN " + - "THROUGH THRU TIME TIMES TITLE " + - "TO TOP TRAILING TRAILING-SIGN TRANSACTION " + - "TYPE TYPEDEF UNDERLINE UNEQUAL UNIT " + - "UNSTRING UNTIL UP UPDATE UPON " + - "USAGE USAGE-MODE USE USING VALID " + - "VALIDATE VALUE VALUES VARYING VLR " + - "WAIT WHEN WHEN-COMPILED WITH WITHIN " + - "WORDS WORKING-STORAGE WRITE XML XML-CODE " + - "XML-EVENT XML-NTEXT XML-TEXT ZERO ZERO-FILL " ); - - var builtins = makeKeywords("- * ** / + < <= = > >= "); - var tests = { - digit: /\d/, - digit_or_colon: /[\d:]/, - hex: /[0-9a-f]/i, - sign: /[+-]/, - exponent: /e/i, - keyword_char: /[^\s\(\[\;\)\]]/, - symbol: /[\w*+\-]/ - }; - function isNumber(ch, stream){ - // hex - if ( ch === '0' && stream.eat(/x/i) ) { - stream.eatWhile(tests.hex); - return true; - } - // leading sign - if ( ( ch == '+' || ch == '-' ) && ( tests.digit.test(stream.peek()) ) ) { - stream.eat(tests.sign); - ch = stream.next(); - } - if ( tests.digit.test(ch) ) { - stream.eat(ch); - stream.eatWhile(tests.digit); - if ( '.' == stream.peek()) { - stream.eat('.'); - stream.eatWhile(tests.digit); - } - if ( stream.eat(tests.exponent) ) { - stream.eat(tests.sign); - stream.eatWhile(tests.digit); - } - return true; - } - return false; - } - return { - startState: function () { - return { - indentStack: null, - indentation: 0, - mode: false - }; - }, - token: function (stream, state) { - if (state.indentStack == null && stream.sol()) { - // update indentation, but only if indentStack is empty - state.indentation = 6 ; //stream.indentation(); - } - // skip spaces - if (stream.eatSpace()) { - return null; - } - var returnType = null; - switch(state.mode){ - case "string": // multi-line string parsing mode - var next = false; - while ((next = stream.next()) != null) { - if (next == "\"" || next == "\'") { - state.mode = false; - break; - } - } - returnType = STRING; // continue on in string mode - break; - default: // default parsing mode - var ch = stream.next(); - var col = stream.column(); - if (col >= 0 && col <= 5) { - returnType = COBOLLINENUM; - } else if (col >= 72 && col <= 79) { - stream.skipToEnd(); - returnType = MODTAG; - } else if (ch == "*" && col == 6) { // comment - stream.skipToEnd(); // rest of the line is a comment - returnType = COMMENT; - } else if (ch == "\"" || ch == "\'") { - state.mode = "string"; - returnType = STRING; - } else if (ch == "'" && !( tests.digit_or_colon.test(stream.peek()) )) { - returnType = ATOM; - } else if (ch == ".") { - returnType = PERIOD; - } else if (isNumber(ch,stream)){ - returnType = NUMBER; - } else { - if (stream.current().match(tests.symbol)) { - while (col < 71) { - if (stream.eat(tests.symbol) === undefined) { - break; - } else { - col++; - } - } - } - if (keywords && keywords.propertyIsEnumerable(stream.current().toUpperCase())) { - returnType = KEYWORD; - } else if (builtins && builtins.propertyIsEnumerable(stream.current().toUpperCase())) { - returnType = BUILTIN; - } else if (atoms && atoms.propertyIsEnumerable(stream.current().toUpperCase())) { - returnType = ATOM; - } else returnType = null; - } - } - return returnType; - }, - indent: function (state) { - if (state.indentStack == null) return state.indentation; - return state.indentStack.indent; - } - }; -}); - -CodeMirror.defineMIME("text/x-cobol", "cobol"); diff --git a/plugins/codemirror/codemirror/mode/cobol/index.html b/plugins/codemirror/codemirror/mode/cobol/index.html deleted file mode 100644 index 326e398..0000000 --- a/plugins/codemirror/codemirror/mode/cobol/index.html +++ /dev/null @@ -1,210 +0,0 @@ - - -CodeMirror: COBOL mode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    COBOL mode

    - -

    Select Theme Select Font Size - - - - -

    - - -
    diff --git a/plugins/codemirror/codemirror/mode/coffeescript/coffeescript.js b/plugins/codemirror/codemirror/mode/coffeescript/coffeescript.js deleted file mode 100644 index e8bfe48..0000000 --- a/plugins/codemirror/codemirror/mode/coffeescript/coffeescript.js +++ /dev/null @@ -1,354 +0,0 @@ -/** - * Link to the project's GitHub page: - * https://github.com/pickhardt/coffeescript-codemirror-mode - */ -CodeMirror.defineMode("coffeescript", function(conf) { - var ERRORCLASS = "error"; - - function wordRegexp(words) { - return new RegExp("^((" + words.join(")|(") + "))\\b"); - } - - var operators = /^(?:->|=>|\+[+=]?|-[\-=]?|\*[\*=]?|\/[\/=]?|[=!]=|<[><]?=?|>>?=?|%=?|&=?|\|=?|\^=?|\~|!|\?)/; - var delimiters = /^(?:[()\[\]{},:`=;]|\.\.?\.?)/; - var identifiers = /^[_A-Za-z$][_A-Za-z$0-9]*/; - var properties = /^(@|this\.)[_A-Za-z$][_A-Za-z$0-9]*/; - - var wordOperators = wordRegexp(["and", "or", "not", - "is", "isnt", "in", - "instanceof", "typeof"]); - var indentKeywords = ["for", "while", "loop", "if", "unless", "else", - "switch", "try", "catch", "finally", "class"]; - var commonKeywords = ["break", "by", "continue", "debugger", "delete", - "do", "in", "of", "new", "return", "then", - "this", "throw", "when", "until"]; - - var keywords = wordRegexp(indentKeywords.concat(commonKeywords)); - - indentKeywords = wordRegexp(indentKeywords); - - - var stringPrefixes = /^('{3}|\"{3}|['\"])/; - var regexPrefixes = /^(\/{3}|\/)/; - var commonConstants = ["Infinity", "NaN", "undefined", "null", "true", "false", "on", "off", "yes", "no"]; - var constants = wordRegexp(commonConstants); - - // Tokenizers - function tokenBase(stream, state) { - // Handle scope changes - if (stream.sol()) { - if (state.scope.align === null) state.scope.align = false; - var scopeOffset = state.scope.offset; - if (stream.eatSpace()) { - var lineOffset = stream.indentation(); - if (lineOffset > scopeOffset && state.scope.type == "coffee") { - return "indent"; - } else if (lineOffset < scopeOffset) { - return "dedent"; - } - return null; - } else { - if (scopeOffset > 0) { - dedent(stream, state); - } - } - } - if (stream.eatSpace()) { - return null; - } - - var ch = stream.peek(); - - // Handle docco title comment (single line) - if (stream.match("####")) { - stream.skipToEnd(); - return "comment"; - } - - // Handle multi line comments - if (stream.match("###")) { - state.tokenize = longComment; - return state.tokenize(stream, state); - } - - // Single line comment - if (ch === "#") { - stream.skipToEnd(); - return "comment"; - } - - // Handle number literals - if (stream.match(/^-?[0-9\.]/, false)) { - var floatLiteral = false; - // Floats - if (stream.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)) { - floatLiteral = true; - } - if (stream.match(/^-?\d+\.\d*/)) { - floatLiteral = true; - } - if (stream.match(/^-?\.\d+/)) { - floatLiteral = true; - } - - if (floatLiteral) { - // prevent from getting extra . on 1.. - if (stream.peek() == "."){ - stream.backUp(1); - } - return "number"; - } - // Integers - var intLiteral = false; - // Hex - if (stream.match(/^-?0x[0-9a-f]+/i)) { - intLiteral = true; - } - // Decimal - if (stream.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)) { - intLiteral = true; - } - // Zero by itself with no other piece of number. - if (stream.match(/^-?0(?![\dx])/i)) { - intLiteral = true; - } - if (intLiteral) { - return "number"; - } - } - - // Handle strings - if (stream.match(stringPrefixes)) { - state.tokenize = tokenFactory(stream.current(), "string"); - return state.tokenize(stream, state); - } - // Handle regex literals - if (stream.match(regexPrefixes)) { - if (stream.current() != "/" || stream.match(/^.*\//, false)) { // prevent highlight of division - state.tokenize = tokenFactory(stream.current(), "string-2"); - return state.tokenize(stream, state); - } else { - stream.backUp(1); - } - } - - // Handle operators and delimiters - if (stream.match(operators) || stream.match(wordOperators)) { - return "operator"; - } - if (stream.match(delimiters)) { - return "punctuation"; - } - - if (stream.match(constants)) { - return "atom"; - } - - if (stream.match(keywords)) { - return "keyword"; - } - - if (stream.match(identifiers)) { - return "variable"; - } - - if (stream.match(properties)) { - return "property"; - } - - // Handle non-detected items - stream.next(); - return ERRORCLASS; - } - - function tokenFactory(delimiter, outclass) { - var singleline = delimiter.length == 1; - return function(stream, state) { - while (!stream.eol()) { - stream.eatWhile(/[^'"\/\\]/); - if (stream.eat("\\")) { - stream.next(); - if (singleline && stream.eol()) { - return outclass; - } - } else if (stream.match(delimiter)) { - state.tokenize = tokenBase; - return outclass; - } else { - stream.eat(/['"\/]/); - } - } - if (singleline) { - if (conf.mode.singleLineStringErrors) { - outclass = ERRORCLASS; - } else { - state.tokenize = tokenBase; - } - } - return outclass; - }; - } - - function longComment(stream, state) { - while (!stream.eol()) { - stream.eatWhile(/[^#]/); - if (stream.match("###")) { - state.tokenize = tokenBase; - break; - } - stream.eatWhile("#"); - } - return "comment"; - } - - function indent(stream, state, type) { - type = type || "coffee"; - var offset = 0, align = false, alignOffset = null; - for (var scope = state.scope; scope; scope = scope.prev) { - if (scope.type === "coffee") { - offset = scope.offset + conf.indentUnit; - break; - } - } - if (type !== "coffee") { - align = null; - alignOffset = stream.column() + stream.current().length; - } else if (state.scope.align) { - state.scope.align = false; - } - state.scope = { - offset: offset, - type: type, - prev: state.scope, - align: align, - alignOffset: alignOffset - }; - } - - function dedent(stream, state) { - if (!state.scope.prev) return; - if (state.scope.type === "coffee") { - var _indent = stream.indentation(); - var matched = false; - for (var scope = state.scope; scope; scope = scope.prev) { - if (_indent === scope.offset) { - matched = true; - break; - } - } - if (!matched) { - return true; - } - while (state.scope.prev && state.scope.offset !== _indent) { - state.scope = state.scope.prev; - } - return false; - } else { - state.scope = state.scope.prev; - return false; - } - } - - function tokenLexer(stream, state) { - var style = state.tokenize(stream, state); - var current = stream.current(); - - // Handle "." connected identifiers - if (current === ".") { - style = state.tokenize(stream, state); - current = stream.current(); - if (/^\.[\w$]+$/.test(current)) { - return "variable"; - } else { - return ERRORCLASS; - } - } - - // Handle scope changes. - if (current === "return") { - state.dedent += 1; - } - if (((current === "->" || current === "=>") && - !state.lambda && - !stream.peek()) - || style === "indent") { - indent(stream, state); - } - var delimiter_index = "[({".indexOf(current); - if (delimiter_index !== -1) { - indent(stream, state, "])}".slice(delimiter_index, delimiter_index+1)); - } - if (indentKeywords.exec(current)){ - indent(stream, state); - } - if (current == "then"){ - dedent(stream, state); - } - - - if (style === "dedent") { - if (dedent(stream, state)) { - return ERRORCLASS; - } - } - delimiter_index = "])}".indexOf(current); - if (delimiter_index !== -1) { - while (state.scope.type == "coffee" && state.scope.prev) - state.scope = state.scope.prev; - if (state.scope.type == current) - state.scope = state.scope.prev; - } - if (state.dedent > 0 && stream.eol() && state.scope.type == "coffee") { - if (state.scope.prev) state.scope = state.scope.prev; - state.dedent -= 1; - } - - return style; - } - - var external = { - startState: function(basecolumn) { - return { - tokenize: tokenBase, - scope: {offset:basecolumn || 0, type:"coffee", prev: null, align: false}, - lastToken: null, - lambda: false, - dedent: 0 - }; - }, - - token: function(stream, state) { - var fillAlign = state.scope.align === null && state.scope; - if (fillAlign && stream.sol()) fillAlign.align = false; - - var style = tokenLexer(stream, state); - if (fillAlign && style && style != "comment") fillAlign.align = true; - - state.lastToken = {style:style, content: stream.current()}; - - if (stream.eol() && stream.lambda) { - state.lambda = false; - } - - return style; - }, - - indent: function(state, text) { - if (state.tokenize != tokenBase) return 0; - var scope = state.scope; - var closer = text && "])}".indexOf(text.charAt(0)) > -1; - if (closer) while (scope.type == "coffee" && scope.prev) scope = scope.prev; - var closes = closer && scope.type === text.charAt(0); - if (scope.align) - return scope.alignOffset - (closes ? 1 : 0); - else - return (closes ? scope.prev : scope).offset; - }, - - lineComment: "#", - fold: "indent" - }; - return external; -}); - -CodeMirror.defineMIME("text/x-coffeescript", "coffeescript"); diff --git a/plugins/codemirror/codemirror/mode/coffeescript/index.html b/plugins/codemirror/codemirror/mode/coffeescript/index.html deleted file mode 100644 index 6e6fde5..0000000 --- a/plugins/codemirror/codemirror/mode/coffeescript/index.html +++ /dev/null @@ -1,740 +0,0 @@ - - -CodeMirror: CoffeeScript mode - - - - - - - - - -
    -

    CoffeeScript mode

    -
    - - -

    MIME types defined: text/x-coffeescript.

    - -

    The CoffeeScript mode was written by Jeff Pickhardt (license).

    - -
    diff --git a/plugins/codemirror/codemirror/mode/commonlisp/commonlisp.js b/plugins/codemirror/codemirror/mode/commonlisp/commonlisp.js deleted file mode 100644 index 8fa08c8..0000000 --- a/plugins/codemirror/codemirror/mode/commonlisp/commonlisp.js +++ /dev/null @@ -1,105 +0,0 @@ -CodeMirror.defineMode("commonlisp", function (config) { - var assumeBody = /^with|^def|^do|^prog|case$|^cond$|bind$|when$|unless$/; - var numLiteral = /^(?:[+\-]?(?:\d+|\d*\.\d+)(?:[efd][+\-]?\d+)?|[+\-]?\d+(?:\/[+\-]?\d+)?|#b[+\-]?[01]+|#o[+\-]?[0-7]+|#x[+\-]?[\da-f]+)/; - var symbol = /[^\s'`,@()\[\]";]/; - var type; - - function readSym(stream) { - var ch; - while (ch = stream.next()) { - if (ch == "\\") stream.next(); - else if (!symbol.test(ch)) { stream.backUp(1); break; } - } - return stream.current(); - } - - function base(stream, state) { - if (stream.eatSpace()) {type = "ws"; return null;} - if (stream.match(numLiteral)) return "number"; - var ch = stream.next(); - if (ch == "\\") ch = stream.next(); - - if (ch == '"') return (state.tokenize = inString)(stream, state); - else if (ch == "(") { type = "open"; return "bracket"; } - else if (ch == ")" || ch == "]") { type = "close"; return "bracket"; } - else if (ch == ";") { stream.skipToEnd(); type = "ws"; return "comment"; } - else if (/['`,@]/.test(ch)) return null; - else if (ch == "|") { - if (stream.skipTo("|")) { stream.next(); return "symbol"; } - else { stream.skipToEnd(); return "error"; } - } else if (ch == "#") { - var ch = stream.next(); - if (ch == "[") { type = "open"; return "bracket"; } - else if (/[+\-=\.']/.test(ch)) return null; - else if (/\d/.test(ch) && stream.match(/^\d*#/)) return null; - else if (ch == "|") return (state.tokenize = inComment)(stream, state); - else if (ch == ":") { readSym(stream); return "meta"; } - else return "error"; - } else { - var name = readSym(stream); - if (name == ".") return null; - type = "symbol"; - if (name == "nil" || name == "t") return "atom"; - if (name.charAt(0) == ":") return "keyword"; - if (name.charAt(0) == "&") return "variable-2"; - return "variable"; - } - } - - function inString(stream, state) { - var escaped = false, next; - while (next = stream.next()) { - if (next == '"' && !escaped) { state.tokenize = base; break; } - escaped = !escaped && next == "\\"; - } - return "string"; - } - - function inComment(stream, state) { - var next, last; - while (next = stream.next()) { - if (next == "#" && last == "|") { state.tokenize = base; break; } - last = next; - } - type = "ws"; - return "comment"; - } - - return { - startState: function () { - return {ctx: {prev: null, start: 0, indentTo: 0}, tokenize: base}; - }, - - token: function (stream, state) { - if (stream.sol() && typeof state.ctx.indentTo != "number") - state.ctx.indentTo = state.ctx.start + 1; - - type = null; - var style = state.tokenize(stream, state); - if (type != "ws") { - if (state.ctx.indentTo == null) { - if (type == "symbol" && assumeBody.test(stream.current())) - state.ctx.indentTo = state.ctx.start + config.indentUnit; - else - state.ctx.indentTo = "next"; - } else if (state.ctx.indentTo == "next") { - state.ctx.indentTo = stream.column(); - } - } - if (type == "open") state.ctx = {prev: state.ctx, start: stream.column(), indentTo: null}; - else if (type == "close") state.ctx = state.ctx.prev || state.ctx; - return style; - }, - - indent: function (state, _textAfter) { - var i = state.ctx.indentTo; - return typeof i == "number" ? i : state.ctx.start + 1; - }, - - lineComment: ";;", - blockCommentStart: "#|", - blockCommentEnd: "|#" - }; -}); - -CodeMirror.defineMIME("text/x-common-lisp", "commonlisp"); diff --git a/plugins/codemirror/codemirror/mode/commonlisp/index.html b/plugins/codemirror/codemirror/mode/commonlisp/index.html deleted file mode 100644 index d48be8d..0000000 --- a/plugins/codemirror/codemirror/mode/commonlisp/index.html +++ /dev/null @@ -1,177 +0,0 @@ - - -CodeMirror: Common Lisp mode - - - - - - - - - -
    -

    Common Lisp mode

    -
    - - -

    MIME types defined: text/x-common-lisp.

    - -
    diff --git a/plugins/codemirror/codemirror/mode/css/css.js b/plugins/codemirror/codemirror/mode/css/css.js deleted file mode 100644 index d8c30cf..0000000 --- a/plugins/codemirror/codemirror/mode/css/css.js +++ /dev/null @@ -1,639 +0,0 @@ -CodeMirror.defineMode("css", function(config, parserConfig) { - "use strict"; - - if (!parserConfig.propertyKeywords) parserConfig = CodeMirror.resolveMode("text/css"); - - var indentUnit = config.indentUnit || config.tabSize || 2, - hooks = parserConfig.hooks || {}, - atMediaTypes = parserConfig.atMediaTypes || {}, - atMediaFeatures = parserConfig.atMediaFeatures || {}, - propertyKeywords = parserConfig.propertyKeywords || {}, - colorKeywords = parserConfig.colorKeywords || {}, - valueKeywords = parserConfig.valueKeywords || {}, - allowNested = !!parserConfig.allowNested, - type = null; - - function ret(style, tp) { type = tp; return style; } - - function tokenBase(stream, state) { - var ch = stream.next(); - if (hooks[ch]) { - // result[0] is style and result[1] is type - var result = hooks[ch](stream, state); - if (result !== false) return result; - } - if (ch == "@") {stream.eatWhile(/[\w\\\-]/); return ret("def", stream.current());} - else if (ch == "=") ret(null, "compare"); - else if ((ch == "~" || ch == "|") && stream.eat("=")) return ret(null, "compare"); - else if (ch == "\"" || ch == "'") { - state.tokenize = tokenString(ch); - return state.tokenize(stream, state); - } - else if (ch == "#") { - stream.eatWhile(/[\w\\\-]/); - return ret("atom", "hash"); - } - else if (ch == "!") { - stream.match(/^\s*\w*/); - return ret("keyword", "important"); - } - else if (/\d/.test(ch) || ch == "." && stream.eat(/\d/)) { - stream.eatWhile(/[\w.%]/); - return ret("number", "unit"); - } - else if (ch === "-") { - if (/\d/.test(stream.peek())) { - stream.eatWhile(/[\w.%]/); - return ret("number", "unit"); - } else if (stream.match(/^[^-]+-/)) { - return ret("meta", "meta"); - } - } - else if (/[,+>*\/]/.test(ch)) { - return ret(null, "select-op"); - } - else if (ch == "." && stream.match(/^-?[_a-z][_a-z0-9-]*/i)) { - return ret("qualifier", "qualifier"); - } - else if (ch == ":") { - return ret("operator", ch); - } - else if (/[;{}\[\]\(\)]/.test(ch)) { - return ret(null, ch); - } - else if (ch == "u" && stream.match("rl(")) { - stream.backUp(1); - state.tokenize = tokenParenthesized; - return ret("property", "variable"); - } - else { - stream.eatWhile(/[\w\\\-]/); - return ret("property", "variable"); - } - } - - function tokenString(quote, nonInclusive) { - return function(stream, state) { - var escaped = false, ch; - while ((ch = stream.next()) != null) { - if (ch == quote && !escaped) - break; - escaped = !escaped && ch == "\\"; - } - if (!escaped) { - if (nonInclusive) stream.backUp(1); - state.tokenize = tokenBase; - } - return ret("string", "string"); - }; - } - - function tokenParenthesized(stream, state) { - stream.next(); // Must be '(' - if (!stream.match(/\s*[\"\']/, false)) - state.tokenize = tokenString(")", true); - else - state.tokenize = tokenBase; - return ret(null, "("); - } - - return { - startState: function(base) { - return {tokenize: tokenBase, - baseIndent: base || 0, - stack: [], - lastToken: null}; - }, - - token: function(stream, state) { - - // Use these terms when applicable (see http://www.xanthir.com/blog/b4E50) - // - // rule** or **ruleset: - // A selector + braces combo, or an at-rule. - // - // declaration block: - // A sequence of declarations. - // - // declaration: - // A property + colon + value combo. - // - // property value: - // The entire value of a property. - // - // component value: - // A single piece of a property value. Like the 5px in - // text-shadow: 0 0 5px blue;. Can also refer to things that are - // multiple terms, like the 1-4 terms that make up the background-size - // portion of the background shorthand. - // - // term: - // The basic unit of author-facing CSS, like a single number (5), - // dimension (5px), string ("foo"), or function. Officially defined - // by the CSS 2.1 grammar (look for the 'term' production) - // - // - // simple selector: - // A single atomic selector, like a type selector, an attr selector, a - // class selector, etc. - // - // compound selector: - // One or more simple selectors without a combinator. div.example is - // compound, div > .example is not. - // - // complex selector: - // One or more compound selectors chained with combinators. - // - // combinator: - // The parts of selectors that express relationships. There are four - // currently - the space (descendant combinator), the greater-than - // bracket (child combinator), the plus sign (next sibling combinator), - // and the tilda (following sibling combinator). - // - // sequence of selectors: - // One or more of the named type of selector chained with commas. - - state.tokenize = state.tokenize || tokenBase; - if (state.tokenize == tokenBase && stream.eatSpace()) return null; - var style = state.tokenize(stream, state); - if (style && typeof style != "string") style = ret(style[0], style[1]); - - // Changing style returned based on context - var context = state.stack[state.stack.length-1]; - if (style == "variable") { - if (type == "variable-definition") state.stack.push("propertyValue"); - return state.lastToken = "variable-2"; - } else if (style == "property") { - var word = stream.current().toLowerCase(); - if (context == "propertyValue") { - if (valueKeywords.hasOwnProperty(word)) { - style = "string-2"; - } else if (colorKeywords.hasOwnProperty(word)) { - style = "keyword"; - } else { - style = "variable-2"; - } - } else if (context == "rule") { - if (!propertyKeywords.hasOwnProperty(word)) { - style += " error"; - } - } else if (context == "block") { - // if a value is present in both property, value, or color, the order - // of preference is property -> color -> value - if (propertyKeywords.hasOwnProperty(word)) { - style = "property"; - } else if (colorKeywords.hasOwnProperty(word)) { - style = "keyword"; - } else if (valueKeywords.hasOwnProperty(word)) { - style = "string-2"; - } else { - style = "tag"; - } - } else if (!context || context == "@media{") { - style = "tag"; - } else if (context == "@media") { - if (atMediaTypes[stream.current()]) { - style = "attribute"; // Known attribute - } else if (/^(only|not)$/.test(word)) { - style = "keyword"; - } else if (word == "and") { - style = "error"; // "and" is only allowed in @mediaType - } else if (atMediaFeatures.hasOwnProperty(word)) { - style = "error"; // Known property, should be in @mediaType( - } else { - // Unknown, expecting keyword or attribute, assuming attribute - style = "attribute error"; - } - } else if (context == "@mediaType") { - if (atMediaTypes.hasOwnProperty(word)) { - style = "attribute"; - } else if (word == "and") { - style = "operator"; - } else if (/^(only|not)$/.test(word)) { - style = "error"; // Only allowed in @media - } else { - // Unknown attribute or property, but expecting property (preceded - // by "and"). Should be in parentheses - style = "error"; - } - } else if (context == "@mediaType(") { - if (propertyKeywords.hasOwnProperty(word)) { - // do nothing, remains "property" - } else if (atMediaTypes.hasOwnProperty(word)) { - style = "error"; // Known property, should be in parentheses - } else if (word == "and") { - style = "operator"; - } else if (/^(only|not)$/.test(word)) { - style = "error"; // Only allowed in @media - } else { - style += " error"; - } - } else if (context == "@import") { - style = "tag"; - } else { - style = "error"; - } - } else if (style == "atom") { - if(!context || context == "@media{" || context == "block") { - style = "builtin"; - } else if (context == "propertyValue") { - if (!/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(stream.current())) { - style += " error"; - } - } else { - style = "error"; - } - } else if (context == "@media" && type == "{") { - style = "error"; - } - - // Push/pop context stack - if (type == "{") { - if (context == "@media" || context == "@mediaType") { - state.stack[state.stack.length-1] = "@media{"; - } - else { - var newContext = allowNested ? "block" : "rule"; - state.stack.push(newContext); - } - } - else if (type == "}") { - if (context == "interpolation") style = "operator"; - // Pop off end of array until { is reached - while(state.stack.length){ - var removed = state.stack.pop(); - if(removed.indexOf("{") > -1 || removed == "block" || removed == "rule"){ - break; - } - } - } - else if (type == "interpolation") state.stack.push("interpolation"); - else if (type == "@media") state.stack.push("@media"); - else if (type == "@import") state.stack.push("@import"); - else if (context == "@media" && /\b(keyword|attribute)\b/.test(style)) - state.stack[state.stack.length-1] = "@mediaType"; - else if (context == "@mediaType" && stream.current() == ",") - state.stack[state.stack.length-1] = "@media"; - else if (type == "(") { - if (context == "@media" || context == "@mediaType") { - // Make sure @mediaType is used to avoid error on { - state.stack[state.stack.length-1] = "@mediaType"; - state.stack.push("@mediaType("); - } - else state.stack.push("("); - } - else if (type == ")") { - // Pop off end of array until ( is reached - while(state.stack.length){ - var removed = state.stack.pop(); - if(removed.indexOf("(") > -1){ - break; - } - } - } - else if (type == ":" && state.lastToken == "property") state.stack.push("propertyValue"); - else if (context == "propertyValue" && type == ";") state.stack.pop(); - else if (context == "@import" && type == ";") state.stack.pop(); - - return state.lastToken = style; - }, - - indent: function(state, textAfter) { - var n = state.stack.length; - if (/^\}/.test(textAfter)) - n -= state.stack[n-1] == "propertyValue" ? 2 : 1; - return state.baseIndent + n * indentUnit; - }, - - electricChars: "}", - blockCommentStart: "/*", - blockCommentEnd: "*/", - fold: "brace" - }; -}); - -(function() { - function keySet(array) { - var keys = {}; - for (var i = 0; i < array.length; ++i) { - keys[array[i]] = true; - } - return keys; - } - - var atMediaTypes = keySet([ - "all", "aural", "braille", "handheld", "print", "projection", "screen", - "tty", "tv", "embossed" - ]); - - var atMediaFeatures = keySet([ - "width", "min-width", "max-width", "height", "min-height", "max-height", - "device-width", "min-device-width", "max-device-width", "device-height", - "min-device-height", "max-device-height", "aspect-ratio", - "min-aspect-ratio", "max-aspect-ratio", "device-aspect-ratio", - "min-device-aspect-ratio", "max-device-aspect-ratio", "color", "min-color", - "max-color", "color-index", "min-color-index", "max-color-index", - "monochrome", "min-monochrome", "max-monochrome", "resolution", - "min-resolution", "max-resolution", "scan", "grid" - ]); - - var propertyKeywords = keySet([ - "align-content", "align-items", "align-self", "alignment-adjust", - "alignment-baseline", "anchor-point", "animation", "animation-delay", - "animation-direction", "animation-duration", "animation-iteration-count", - "animation-name", "animation-play-state", "animation-timing-function", - "appearance", "azimuth", "backface-visibility", "background", - "background-attachment", "background-clip", "background-color", - "background-image", "background-origin", "background-position", - "background-repeat", "background-size", "baseline-shift", "binding", - "bleed", "bookmark-label", "bookmark-level", "bookmark-state", - "bookmark-target", "border", "border-bottom", "border-bottom-color", - "border-bottom-left-radius", "border-bottom-right-radius", - "border-bottom-style", "border-bottom-width", "border-collapse", - "border-color", "border-image", "border-image-outset", - "border-image-repeat", "border-image-slice", "border-image-source", - "border-image-width", "border-left", "border-left-color", - "border-left-style", "border-left-width", "border-radius", "border-right", - "border-right-color", "border-right-style", "border-right-width", - "border-spacing", "border-style", "border-top", "border-top-color", - "border-top-left-radius", "border-top-right-radius", "border-top-style", - "border-top-width", "border-width", "bottom", "box-decoration-break", - "box-shadow", "box-sizing", "break-after", "break-before", "break-inside", - "caption-side", "clear", "clip", "color", "color-profile", "column-count", - "column-fill", "column-gap", "column-rule", "column-rule-color", - "column-rule-style", "column-rule-width", "column-span", "column-width", - "columns", "content", "counter-increment", "counter-reset", "crop", "cue", - "cue-after", "cue-before", "cursor", "direction", "display", - "dominant-baseline", "drop-initial-after-adjust", - "drop-initial-after-align", "drop-initial-before-adjust", - "drop-initial-before-align", "drop-initial-size", "drop-initial-value", - "elevation", "empty-cells", "fit", "fit-position", "flex", "flex-basis", - "flex-direction", "flex-flow", "flex-grow", "flex-shrink", "flex-wrap", - "float", "float-offset", "flow-from", "flow-into", "font", "font-feature-settings", - "font-family", "font-kerning", "font-language-override", "font-size", "font-size-adjust", - "font-stretch", "font-style", "font-synthesis", "font-variant", - "font-variant-alternates", "font-variant-caps", "font-variant-east-asian", - "font-variant-ligatures", "font-variant-numeric", "font-variant-position", - "font-weight", "grid-cell", "grid-column", "grid-column-align", - "grid-column-sizing", "grid-column-span", "grid-columns", "grid-flow", - "grid-row", "grid-row-align", "grid-row-sizing", "grid-row-span", - "grid-rows", "grid-template", "hanging-punctuation", "height", "hyphens", - "icon", "image-orientation", "image-rendering", "image-resolution", - "inline-box-align", "justify-content", "left", "letter-spacing", - "line-break", "line-height", "line-stacking", "line-stacking-ruby", - "line-stacking-shift", "line-stacking-strategy", "list-style", - "list-style-image", "list-style-position", "list-style-type", "margin", - "margin-bottom", "margin-left", "margin-right", "margin-top", - "marker-offset", "marks", "marquee-direction", "marquee-loop", - "marquee-play-count", "marquee-speed", "marquee-style", "max-height", - "max-width", "min-height", "min-width", "move-to", "nav-down", "nav-index", - "nav-left", "nav-right", "nav-up", "opacity", "order", "orphans", "outline", - "outline-color", "outline-offset", "outline-style", "outline-width", - "overflow", "overflow-style", "overflow-wrap", "overflow-x", "overflow-y", - "padding", "padding-bottom", "padding-left", "padding-right", "padding-top", - "page", "page-break-after", "page-break-before", "page-break-inside", - "page-policy", "pause", "pause-after", "pause-before", "perspective", - "perspective-origin", "pitch", "pitch-range", "play-during", "position", - "presentation-level", "punctuation-trim", "quotes", "region-break-after", - "region-break-before", "region-break-inside", "region-fragment", - "rendering-intent", "resize", "rest", "rest-after", "rest-before", "richness", - "right", "rotation", "rotation-point", "ruby-align", "ruby-overhang", - "ruby-position", "ruby-span", "shape-inside", "shape-outside", "size", - "speak", "speak-as", "speak-header", - "speak-numeral", "speak-punctuation", "speech-rate", "stress", "string-set", - "tab-size", "table-layout", "target", "target-name", "target-new", - "target-position", "text-align", "text-align-last", "text-decoration", - "text-decoration-color", "text-decoration-line", "text-decoration-skip", - "text-decoration-style", "text-emphasis", "text-emphasis-color", - "text-emphasis-position", "text-emphasis-style", "text-height", - "text-indent", "text-justify", "text-outline", "text-overflow", "text-shadow", - "text-size-adjust", "text-space-collapse", "text-transform", "text-underline-position", - "text-wrap", "top", "transform", "transform-origin", "transform-style", - "transition", "transition-delay", "transition-duration", - "transition-property", "transition-timing-function", "unicode-bidi", - "vertical-align", "visibility", "voice-balance", "voice-duration", - "voice-family", "voice-pitch", "voice-range", "voice-rate", "voice-stress", - "voice-volume", "volume", "white-space", "widows", "width", "word-break", - "word-spacing", "word-wrap", "z-index", "zoom", - // SVG-specific - "clip-path", "clip-rule", "mask", "enable-background", "filter", "flood-color", - "flood-opacity", "lighting-color", "stop-color", "stop-opacity", "pointer-events", - "color-interpolation", "color-interpolation-filters", "color-profile", - "color-rendering", "fill", "fill-opacity", "fill-rule", "image-rendering", - "marker", "marker-end", "marker-mid", "marker-start", "shape-rendering", "stroke", - "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", - "stroke-miterlimit", "stroke-opacity", "stroke-width", "text-rendering", - "baseline-shift", "dominant-baseline", "glyph-orientation-horizontal", - "glyph-orientation-vertical", "kerning", "text-anchor", "writing-mode" - ]); - - var colorKeywords = keySet([ - "aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige", - "bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown", - "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue", - "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod", - "darkgray", "darkgreen", "darkkhaki", "darkmagenta", "darkolivegreen", - "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen", - "darkslateblue", "darkslategray", "darkturquoise", "darkviolet", - "deeppink", "deepskyblue", "dimgray", "dodgerblue", "firebrick", - "floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite", - "gold", "goldenrod", "gray", "grey", "green", "greenyellow", "honeydew", - "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender", - "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral", - "lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightpink", - "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray", - "lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta", - "maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple", - "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise", - "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin", - "navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered", - "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred", - "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue", - "purple", "red", "rosybrown", "royalblue", "saddlebrown", "salmon", - "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue", - "slateblue", "slategray", "snow", "springgreen", "steelblue", "tan", - "teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white", - "whitesmoke", "yellow", "yellowgreen" - ]); - - var valueKeywords = keySet([ - "above", "absolute", "activeborder", "activecaption", "afar", - "after-white-space", "ahead", "alias", "all", "all-scroll", "alternate", - "always", "amharic", "amharic-abegede", "antialiased", "appworkspace", - "arabic-indic", "armenian", "asterisks", "auto", "avoid", "avoid-column", "avoid-page", - "avoid-region", "background", "backwards", "baseline", "below", "bidi-override", "binary", - "bengali", "blink", "block", "block-axis", "bold", "bolder", "border", "border-box", - "both", "bottom", "break", "break-all", "break-word", "button", "button-bevel", - "buttonface", "buttonhighlight", "buttonshadow", "buttontext", "cambodian", - "capitalize", "caps-lock-indicator", "caption", "captiontext", "caret", - "cell", "center", "checkbox", "circle", "cjk-earthly-branch", - "cjk-heavenly-stem", "cjk-ideographic", "clear", "clip", "close-quote", - "col-resize", "collapse", "column", "compact", "condensed", "contain", "content", - "content-box", "context-menu", "continuous", "copy", "cover", "crop", - "cross", "crosshair", "currentcolor", "cursive", "dashed", "decimal", - "decimal-leading-zero", "default", "default-button", "destination-atop", - "destination-in", "destination-out", "destination-over", "devanagari", - "disc", "discard", "document", "dot-dash", "dot-dot-dash", "dotted", - "double", "down", "e-resize", "ease", "ease-in", "ease-in-out", "ease-out", - "element", "ellipse", "ellipsis", "embed", "end", "ethiopic", "ethiopic-abegede", - "ethiopic-abegede-am-et", "ethiopic-abegede-gez", "ethiopic-abegede-ti-er", - "ethiopic-abegede-ti-et", "ethiopic-halehame-aa-er", - "ethiopic-halehame-aa-et", "ethiopic-halehame-am-et", - "ethiopic-halehame-gez", "ethiopic-halehame-om-et", - "ethiopic-halehame-sid-et", "ethiopic-halehame-so-et", - "ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", - "ethiopic-halehame-tig", "ew-resize", "expanded", "extra-condensed", - "extra-expanded", "fantasy", "fast", "fill", "fixed", "flat", "footnotes", - "forwards", "from", "geometricPrecision", "georgian", "graytext", "groove", - "gujarati", "gurmukhi", "hand", "hangul", "hangul-consonant", "hebrew", - "help", "hidden", "hide", "higher", "highlight", "highlighttext", - "hiragana", "hiragana-iroha", "horizontal", "hsl", "hsla", "icon", "ignore", - "inactiveborder", "inactivecaption", "inactivecaptiontext", "infinite", - "infobackground", "infotext", "inherit", "initial", "inline", "inline-axis", - "inline-block", "inline-table", "inset", "inside", "intrinsic", "invert", - "italic", "justify", "kannada", "katakana", "katakana-iroha", "keep-all", "khmer", - "landscape", "lao", "large", "larger", "left", "level", "lighter", - "line-through", "linear", "lines", "list-item", "listbox", "listitem", - "local", "logical", "loud", "lower", "lower-alpha", "lower-armenian", - "lower-greek", "lower-hexadecimal", "lower-latin", "lower-norwegian", - "lower-roman", "lowercase", "ltr", "malayalam", "match", - "media-controls-background", "media-current-time-display", - "media-fullscreen-button", "media-mute-button", "media-play-button", - "media-return-to-realtime-button", "media-rewind-button", - "media-seek-back-button", "media-seek-forward-button", "media-slider", - "media-sliderthumb", "media-time-remaining-display", "media-volume-slider", - "media-volume-slider-container", "media-volume-sliderthumb", "medium", - "menu", "menulist", "menulist-button", "menulist-text", - "menulist-textfield", "menutext", "message-box", "middle", "min-intrinsic", - "mix", "mongolian", "monospace", "move", "multiple", "myanmar", "n-resize", - "narrower", "ne-resize", "nesw-resize", "no-close-quote", "no-drop", - "no-open-quote", "no-repeat", "none", "normal", "not-allowed", "nowrap", - "ns-resize", "nw-resize", "nwse-resize", "oblique", "octal", "open-quote", - "optimizeLegibility", "optimizeSpeed", "oriya", "oromo", "outset", - "outside", "outside-shape", "overlay", "overline", "padding", "padding-box", - "painted", "page", "paused", "persian", "plus-darker", "plus-lighter", "pointer", - "polygon", "portrait", "pre", "pre-line", "pre-wrap", "preserve-3d", "progress", "push-button", - "radio", "read-only", "read-write", "read-write-plaintext-only", "rectangle", "region", - "relative", "repeat", "repeat-x", "repeat-y", "reset", "reverse", "rgb", "rgba", - "ridge", "right", "round", "row-resize", "rtl", "run-in", "running", - "s-resize", "sans-serif", "scroll", "scrollbar", "se-resize", "searchfield", - "searchfield-cancel-button", "searchfield-decoration", - "searchfield-results-button", "searchfield-results-decoration", - "semi-condensed", "semi-expanded", "separate", "serif", "show", "sidama", - "single", "skip-white-space", "slide", "slider-horizontal", - "slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "slow", - "small", "small-caps", "small-caption", "smaller", "solid", "somali", - "source-atop", "source-in", "source-out", "source-over", "space", "square", - "square-button", "start", "static", "status-bar", "stretch", "stroke", - "sub", "subpixel-antialiased", "super", "sw-resize", "table", - "table-caption", "table-cell", "table-column", "table-column-group", - "table-footer-group", "table-header-group", "table-row", "table-row-group", - "telugu", "text", "text-bottom", "text-top", "textarea", "textfield", "thai", - "thick", "thin", "threeddarkshadow", "threedface", "threedhighlight", - "threedlightshadow", "threedshadow", "tibetan", "tigre", "tigrinya-er", - "tigrinya-er-abegede", "tigrinya-et", "tigrinya-et-abegede", "to", "top", - "transparent", "ultra-condensed", "ultra-expanded", "underline", "up", - "upper-alpha", "upper-armenian", "upper-greek", "upper-hexadecimal", - "upper-latin", "upper-norwegian", "upper-roman", "uppercase", "urdu", "url", - "vertical", "vertical-text", "visible", "visibleFill", "visiblePainted", - "visibleStroke", "visual", "w-resize", "wait", "wave", "wider", - "window", "windowframe", "windowtext", "x-large", "x-small", "xor", - "xx-large", "xx-small" - ]); - - function tokenCComment(stream, state) { - var maybeEnd = false, ch; - while ((ch = stream.next()) != null) { - if (maybeEnd && ch == "/") { - state.tokenize = null; - break; - } - maybeEnd = (ch == "*"); - } - return ["comment", "comment"]; - } - - CodeMirror.defineMIME("text/css", { - atMediaTypes: atMediaTypes, - atMediaFeatures: atMediaFeatures, - propertyKeywords: propertyKeywords, - colorKeywords: colorKeywords, - valueKeywords: valueKeywords, - hooks: { - "<": function(stream, state) { - function tokenSGMLComment(stream, state) { - var dashes = 0, ch; - while ((ch = stream.next()) != null) { - if (dashes >= 2 && ch == ">") { - state.tokenize = null; - break; - } - dashes = (ch == "-") ? dashes + 1 : 0; - } - return ["comment", "comment"]; - } - if (stream.eat("!")) { - state.tokenize = tokenSGMLComment; - return tokenSGMLComment(stream, state); - } - }, - "/": function(stream, state) { - if (stream.eat("*")) { - state.tokenize = tokenCComment; - return tokenCComment(stream, state); - } - return false; - } - }, - name: "css" - }); - - CodeMirror.defineMIME("text/x-scss", { - atMediaTypes: atMediaTypes, - atMediaFeatures: atMediaFeatures, - propertyKeywords: propertyKeywords, - colorKeywords: colorKeywords, - valueKeywords: valueKeywords, - allowNested: true, - hooks: { - ":": function(stream) { - if (stream.match(/\s*{/)) { - return [null, "{"]; - } - return false; - }, - "$": function(stream) { - stream.match(/^[\w-]+/); - if (stream.peek() == ":") { - return ["variable", "variable-definition"]; - } - return ["variable", "variable"]; - }, - ",": function(stream, state) { - if (state.stack[state.stack.length - 1] == "propertyValue" && stream.match(/^ *\$/, false)) { - return ["operator", ";"]; - } - }, - "/": function(stream, state) { - if (stream.eat("/")) { - stream.skipToEnd(); - return ["comment", "comment"]; - } else if (stream.eat("*")) { - state.tokenize = tokenCComment; - return tokenCComment(stream, state); - } else { - return ["operator", "operator"]; - } - }, - "#": function(stream) { - if (stream.eat("{")) { - return ["operator", "interpolation"]; - } else { - stream.eatWhile(/[\w\\\-]/); - return ["atom", "hash"]; - } - } - }, - name: "css" - }); -})(); diff --git a/plugins/codemirror/codemirror/mode/css/index.html b/plugins/codemirror/codemirror/mode/css/index.html deleted file mode 100644 index 1d1865e..0000000 --- a/plugins/codemirror/codemirror/mode/css/index.html +++ /dev/null @@ -1,70 +0,0 @@ - - -CodeMirror: CSS mode - - - - - - - - - -
    -

    CSS mode

    -
    - - -

    MIME types defined: text/css.

    - -

    Parsing/Highlighting Tests: normal, verbose.

    - -
    diff --git a/plugins/codemirror/codemirror/mode/css/scss.html b/plugins/codemirror/codemirror/mode/css/scss.html deleted file mode 100644 index 72781c0..0000000 --- a/plugins/codemirror/codemirror/mode/css/scss.html +++ /dev/null @@ -1,157 +0,0 @@ - - -CodeMirror: SCSS mode - - - - - - - - - -
    -

    SCSS mode

    -
    - - -

    MIME types defined: text/scss.

    - -

    Parsing/Highlighting Tests: normal, verbose.

    - -
    diff --git a/plugins/codemirror/codemirror/mode/css/scss_test.js b/plugins/codemirror/codemirror/mode/css/scss_test.js deleted file mode 100644 index 9998e2a..0000000 --- a/plugins/codemirror/codemirror/mode/css/scss_test.js +++ /dev/null @@ -1,93 +0,0 @@ -(function() { - var mode = CodeMirror.getMode({tabSize: 1}, "text/x-scss"); - function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), "scss"); } - function IT(name) { test.indentation(name, mode, Array.prototype.slice.call(arguments, 1), "scss"); } - - MT('url_with_quotation', - "[tag foo] { [property background][operator :][string-2 url]([string test.jpg]) }"); - - MT('url_with_double_quotes', - "[tag foo] { [property background][operator :][string-2 url]([string \"test.jpg\"]) }"); - - MT('url_with_single_quotes', - "[tag foo] { [property background][operator :][string-2 url]([string \'test.jpg\']) }"); - - MT('string', - "[def @import] [string \"compass/css3\"]"); - - MT('important_keyword', - "[tag foo] { [property background][operator :][string-2 url]([string \'test.jpg\']) [keyword !important] }"); - - MT('variable', - "[variable-2 $blue][operator :][atom #333]"); - - MT('variable_as_attribute', - "[tag foo] { [property color][operator :][variable-2 $blue] }"); - - MT('numbers', - "[tag foo] { [property padding][operator :][number 10px] [number 10] [number 10em] [number 8in] }"); - - MT('number_percentage', - "[tag foo] { [property width][operator :][number 80%] }"); - - MT('selector', - "[builtin #hello][qualifier .world]{}"); - - MT('singleline_comment', - "[comment // this is a comment]"); - - MT('multiline_comment', - "[comment /*foobar*/]"); - - MT('attribute_with_hyphen', - "[tag foo] { [property font-size][operator :][number 10px] }"); - - MT('string_after_attribute', - "[tag foo] { [property content][operator :][string \"::\"] }"); - - MT('directives', - "[def @include] [qualifier .mixin]"); - - MT('basic_structure', - "[tag p] { [property background][operator :][keyword red]; }"); - - MT('nested_structure', - "[tag p] { [tag a] { [property color][operator :][keyword red]; } }"); - - MT('mixin', - "[def @mixin] [tag table-base] {}"); - - MT('number_without_semicolon', - "[tag p] {[property width][operator :][number 12]}", - "[tag a] {[property color][operator :][keyword red];}"); - - MT('atom_in_nested_block', - "[tag p] { [tag a] { [property color][operator :][atom #000]; } }"); - - MT('interpolation_in_property', - "[tag foo] { [operator #{][variable-2 $hello][operator }:][number 2]; }"); - - MT('interpolation_in_selector', - "[tag foo][operator #{][variable-2 $hello][operator }] { [property color][operator :][atom #000]; }"); - - MT('interpolation_error', - "[tag foo][operator #{][error foo][operator }] { [property color][operator :][atom #000]; }"); - - MT("divide_operator", - "[tag foo] { [property width][operator :][number 4] [operator /] [number 2] }"); - - MT('nested_structure_with_id_selector', - "[tag p] { [builtin #hello] { [property color][operator :][keyword red]; } }"); - - IT('mixin', - "@mixin container[1 (][2 $a: 10][1 , ][2 $b: 10][1 , ][2 $c: 10]) [1 {]}"); - - IT('nested', - "foo [1 { bar ][2 { ][1 } ]}"); - - IT('comma', - "foo [1 { font-family][2 : verdana, sans-serif][1 ; ]}"); - - IT('parentheses', - "foo [1 { color][2 : darken][3 ($blue, 9%][2 )][1 ; ]}"); -})(); diff --git a/plugins/codemirror/codemirror/mode/css/test.js b/plugins/codemirror/codemirror/mode/css/test.js deleted file mode 100644 index 3c52460..0000000 --- a/plugins/codemirror/codemirror/mode/css/test.js +++ /dev/null @@ -1,142 +0,0 @@ -(function() { - var mode = CodeMirror.getMode({tabSize: 1}, "css"); - function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } - function IT(name) { test.indentation(name, mode, Array.prototype.slice.call(arguments, 1)); } - - // Requires at least one media query - MT("atMediaEmpty", - "[def @media] [error {] }"); - - MT("atMediaMultiple", - "[def @media] [keyword not] [attribute screen] [operator and] ([property color]), [keyword not] [attribute print] [operator and] ([property color]) { }"); - - MT("atMediaCheckStack", - "[def @media] [attribute screen] { } [tag foo] { }"); - - MT("atMediaCheckStack", - "[def @media] [attribute screen] ([property color]) { } [tag foo] { }"); - - MT("atMediaPropertyOnly", - "[def @media] ([property color]) { } [tag foo] { }"); - - MT("atMediaCheckStackInvalidAttribute", - "[def @media] [attribute&error foobarhello] { [tag foo] { } }"); - - MT("atMediaCheckStackInvalidAttribute", - "[def @media] [attribute&error foobarhello] { } [tag foo] { }"); - - // Error, because "and" is only allowed immediately preceding a media expression - MT("atMediaInvalidAttribute", - "[def @media] [attribute&error foobarhello] { }"); - - // Error, because "and" is only allowed immediately preceding a media expression - MT("atMediaInvalidAnd", - "[def @media] [error and] [attribute screen] { }"); - - // Error, because "not" is only allowed as the first item in each media query - MT("atMediaInvalidNot", - "[def @media] [attribute screen] [error not] ([error not]) { }"); - - // Error, because "only" is only allowed as the first item in each media query - MT("atMediaInvalidOnly", - "[def @media] [attribute screen] [error only] ([error only]) { }"); - - // Error, because "foobarhello" is neither a known type or property, but - // property was expected (after "and"), and it should be in parenthese. - MT("atMediaUnknownType", - "[def @media] [attribute screen] [operator and] [error foobarhello] { }"); - - // Error, because "color" is not a known type, but is a known property, and - // should be in parentheses. - MT("atMediaInvalidType", - "[def @media] [attribute screen] [operator and] [error color] { }"); - - // Error, because "print" is not a known property, but is a known type, - // and should not be in parenthese. - MT("atMediaInvalidProperty", - "[def @media] [attribute screen] [operator and] ([error print]) { }"); - - // Soft error, because "foobarhello" is not a known property or type. - MT("atMediaUnknownProperty", - "[def @media] [attribute screen] [operator and] ([property&error foobarhello]) { }"); - - // Make sure nesting works with media queries - MT("atMediaMaxWidthNested", - "[def @media] [attribute screen] [operator and] ([property max-width][operator :] [number 25px]) { [tag foo] { } }"); - - MT("tagSelector", - "[tag foo] { }"); - - MT("classSelector", - "[qualifier .foo-bar_hello] { }"); - - MT("idSelector", - "[builtin #foo] { [error #foo] }"); - - MT("tagSelectorUnclosed", - "[tag foo] { [property margin][operator :] [number 0] } [tag bar] { }"); - - MT("tagStringNoQuotes", - "[tag foo] { [property font-family][operator :] [variable-2 hello] [variable-2 world]; }"); - - MT("tagStringDouble", - "[tag foo] { [property font-family][operator :] [string \"hello world\"]; }"); - - MT("tagStringSingle", - "[tag foo] { [property font-family][operator :] [string 'hello world']; }"); - - MT("tagColorKeyword", - "[tag foo] {" + - "[property color][operator :] [keyword black];" + - "[property color][operator :] [keyword navy];" + - "[property color][operator :] [keyword yellow];" + - "}"); - - MT("tagColorHex3", - "[tag foo] { [property background][operator :] [atom #fff]; }"); - - MT("tagColorHex6", - "[tag foo] { [property background][operator :] [atom #ffffff]; }"); - - MT("tagColorHex4", - "[tag foo] { [property background][operator :] [atom&error #ffff]; }"); - - MT("tagColorHexInvalid", - "[tag foo] { [property background][operator :] [atom&error #ffg]; }"); - - MT("tagNegativeNumber", - "[tag foo] { [property margin][operator :] [number -5px]; }"); - - MT("tagPositiveNumber", - "[tag foo] { [property padding][operator :] [number 5px]; }"); - - MT("tagVendor", - "[tag foo] { [meta -foo-][property box-sizing][operator :] [meta -foo-][string-2 border-box]; }"); - - MT("tagBogusProperty", - "[tag foo] { [property&error barhelloworld][operator :] [number 0]; }"); - - MT("tagTwoProperties", - "[tag foo] { [property margin][operator :] [number 0]; [property padding][operator :] [number 0]; }"); - - MT("tagTwoPropertiesURL", - "[tag foo] { [property background][operator :] [string-2 url]([string //example.com/foo.png]); [property padding][operator :] [number 0]; }"); - - MT("commentSGML", - "[comment ]"); - - IT("tagSelector", - "strong, em [1 { background][2 : rgba][3 (255, 255, 0, .2][2 )][1 ;]}"); - - IT("atMedia", - "[1 @media { foo ][2 { ][1 } ]}"); - - IT("comma", - "foo [1 { font-family][2 : verdana, sans-serif][1 ; ]}"); - - IT("parentheses", - "foo [1 { background][2 : url][3 (\"bar\"][2 )][1 ; ]}"); - - IT("pseudo", - "foo:before [1 { ]}"); -})(); diff --git a/plugins/codemirror/codemirror/mode/d/d.js b/plugins/codemirror/codemirror/mode/d/d.js deleted file mode 100644 index ab345f1..0000000 --- a/plugins/codemirror/codemirror/mode/d/d.js +++ /dev/null @@ -1,205 +0,0 @@ -CodeMirror.defineMode("d", function(config, parserConfig) { - var indentUnit = config.indentUnit, - statementIndentUnit = parserConfig.statementIndentUnit || indentUnit, - keywords = parserConfig.keywords || {}, - builtin = parserConfig.builtin || {}, - blockKeywords = parserConfig.blockKeywords || {}, - atoms = parserConfig.atoms || {}, - hooks = parserConfig.hooks || {}, - multiLineStrings = parserConfig.multiLineStrings; - var isOperatorChar = /[+\-*&%=<>!?|\/]/; - - var curPunc; - - function tokenBase(stream, state) { - var ch = stream.next(); - if (hooks[ch]) { - var result = hooks[ch](stream, state); - if (result !== false) return result; - } - if (ch == '"' || ch == "'" || ch == "`") { - state.tokenize = tokenString(ch); - return state.tokenize(stream, state); - } - if (/[\[\]{}\(\),;\:\.]/.test(ch)) { - curPunc = ch; - return null; - } - if (/\d/.test(ch)) { - stream.eatWhile(/[\w\.]/); - return "number"; - } - if (ch == "/") { - if (stream.eat("+")) { - state.tokenize = tokenComment; - return tokenNestedComment(stream, state); - } - if (stream.eat("*")) { - state.tokenize = tokenComment; - return tokenComment(stream, state); - } - if (stream.eat("/")) { - stream.skipToEnd(); - return "comment"; - } - } - if (isOperatorChar.test(ch)) { - stream.eatWhile(isOperatorChar); - return "operator"; - } - stream.eatWhile(/[\w\$_]/); - var cur = stream.current(); - if (keywords.propertyIsEnumerable(cur)) { - if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement"; - return "keyword"; - } - if (builtin.propertyIsEnumerable(cur)) { - if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement"; - return "builtin"; - } - if (atoms.propertyIsEnumerable(cur)) return "atom"; - return "variable"; - } - - function tokenString(quote) { - return function(stream, state) { - var escaped = false, next, end = false; - while ((next = stream.next()) != null) { - if (next == quote && !escaped) {end = true; break;} - escaped = !escaped && next == "\\"; - } - if (end || !(escaped || multiLineStrings)) - state.tokenize = null; - return "string"; - }; - } - - function tokenComment(stream, state) { - var maybeEnd = false, ch; - while (ch = stream.next()) { - if (ch == "/" && maybeEnd) { - state.tokenize = null; - break; - } - maybeEnd = (ch == "*"); - } - return "comment"; - } - - function tokenNestedComment(stream, state) { - var maybeEnd = false, ch; - while (ch = stream.next()) { - if (ch == "/" && maybeEnd) { - state.tokenize = null; - break; - } - maybeEnd = (ch == "+"); - } - return "comment"; - } - - function Context(indented, column, type, align, prev) { - this.indented = indented; - this.column = column; - this.type = type; - this.align = align; - this.prev = prev; - } - function pushContext(state, col, type) { - var indent = state.indented; - if (state.context && state.context.type == "statement") - indent = state.context.indented; - return state.context = new Context(indent, col, type, null, state.context); - } - function popContext(state) { - var t = state.context.type; - if (t == ")" || t == "]" || t == "}") - state.indented = state.context.indented; - return state.context = state.context.prev; - } - - // Interface - - return { - startState: function(basecolumn) { - return { - tokenize: null, - context: new Context((basecolumn || 0) - indentUnit, 0, "top", false), - indented: 0, - startOfLine: true - }; - }, - - token: function(stream, state) { - var ctx = state.context; - if (stream.sol()) { - if (ctx.align == null) ctx.align = false; - state.indented = stream.indentation(); - state.startOfLine = true; - } - if (stream.eatSpace()) return null; - curPunc = null; - var style = (state.tokenize || tokenBase)(stream, state); - if (style == "comment" || style == "meta") return style; - if (ctx.align == null) ctx.align = true; - - if ((curPunc == ";" || curPunc == ":" || curPunc == ",") && ctx.type == "statement") popContext(state); - else if (curPunc == "{") pushContext(state, stream.column(), "}"); - else if (curPunc == "[") pushContext(state, stream.column(), "]"); - else if (curPunc == "(") pushContext(state, stream.column(), ")"); - else if (curPunc == "}") { - while (ctx.type == "statement") ctx = popContext(state); - if (ctx.type == "}") ctx = popContext(state); - while (ctx.type == "statement") ctx = popContext(state); - } - else if (curPunc == ctx.type) popContext(state); - else if (((ctx.type == "}" || ctx.type == "top") && curPunc != ';') || (ctx.type == "statement" && curPunc == "newstatement")) - pushContext(state, stream.column(), "statement"); - state.startOfLine = false; - return style; - }, - - indent: function(state, textAfter) { - if (state.tokenize != tokenBase && state.tokenize != null) return CodeMirror.Pass; - var ctx = state.context, firstChar = textAfter && textAfter.charAt(0); - if (ctx.type == "statement" && firstChar == "}") ctx = ctx.prev; - var closing = firstChar == ctx.type; - if (ctx.type == "statement") return ctx.indented + (firstChar == "{" ? 0 : statementIndentUnit); - else if (ctx.align) return ctx.column + (closing ? 0 : 1); - else return ctx.indented + (closing ? 0 : indentUnit); - }, - - electricChars: "{}" - }; -}); - -(function() { - function words(str) { - var obj = {}, words = str.split(" "); - for (var i = 0; i < words.length; ++i) obj[words[i]] = true; - return obj; - } - - var blockKeywords = "body catch class do else enum for foreach foreach_reverse if in interface mixin " + - "out scope struct switch try union unittest version while with"; - - CodeMirror.defineMIME("text/x-d", { - name: "d", - keywords: words("abstract alias align asm assert auto break case cast cdouble cent cfloat const continue " + - "debug default delegate delete deprecated export extern final finally function goto immutable " + - "import inout invariant is lazy macro module new nothrow override package pragma private " + - "protected public pure ref return shared short static super synchronized template this " + - "throw typedef typeid typeof volatile __FILE__ __LINE__ __gshared __traits __vector __parameters " + - blockKeywords), - blockKeywords: words(blockKeywords), - builtin: words("bool byte char creal dchar double float idouble ifloat int ireal long real short ubyte " + - "ucent uint ulong ushort wchar wstring void size_t sizediff_t"), - atoms: words("exit failure success true false null"), - hooks: { - "@": function(stream, _state) { - stream.eatWhile(/[\w\$_]/); - return "meta"; - } - } - }); -}()); diff --git a/plugins/codemirror/codemirror/mode/d/index.html b/plugins/codemirror/codemirror/mode/d/index.html deleted file mode 100644 index 8b25fcc..0000000 --- a/plugins/codemirror/codemirror/mode/d/index.html +++ /dev/null @@ -1,273 +0,0 @@ - - -CodeMirror: D mode - - - - - - - - - - -
    -

    D mode

    -
    - - - -

    Simple mode that handle D-Syntax (DLang Homepage).

    - -

    MIME types defined: text/x-d - .

    -
    diff --git a/plugins/codemirror/codemirror/mode/diff/diff.js b/plugins/codemirror/codemirror/mode/diff/diff.js deleted file mode 100644 index 9a0d90e..0000000 --- a/plugins/codemirror/codemirror/mode/diff/diff.js +++ /dev/null @@ -1,32 +0,0 @@ -CodeMirror.defineMode("diff", function() { - - var TOKEN_NAMES = { - '+': 'positive', - '-': 'negative', - '@': 'meta' - }; - - return { - token: function(stream) { - var tw_pos = stream.string.search(/[\t ]+?$/); - - if (!stream.sol() || tw_pos === 0) { - stream.skipToEnd(); - return ("error " + ( - TOKEN_NAMES[stream.string.charAt(0)] || '')).replace(/ $/, ''); - } - - var token_name = TOKEN_NAMES[stream.peek()] || stream.skipToEnd(); - - if (tw_pos === -1) { - stream.skipToEnd(); - } else { - stream.pos = tw_pos; - } - - return token_name; - } - }; -}); - -CodeMirror.defineMIME("text/x-diff", "diff"); diff --git a/plugins/codemirror/codemirror/mode/diff/index.html b/plugins/codemirror/codemirror/mode/diff/index.html deleted file mode 100644 index 6ceae8b..0000000 --- a/plugins/codemirror/codemirror/mode/diff/index.html +++ /dev/null @@ -1,117 +0,0 @@ - - -CodeMirror: Diff mode - - - - - - - - - -
    -

    Diff mode

    -
    - - -

    MIME types defined: text/x-diff.

    - -
    diff --git a/plugins/codemirror/codemirror/mode/dtd/dtd.js b/plugins/codemirror/codemirror/mode/dtd/dtd.js deleted file mode 100644 index 7033bf0..0000000 --- a/plugins/codemirror/codemirror/mode/dtd/dtd.js +++ /dev/null @@ -1,127 +0,0 @@ -/* - DTD mode - Ported to CodeMirror by Peter Kroon - Report bugs/issues here: https://github.com/marijnh/CodeMirror/issues - GitHub: @peterkroon -*/ - -CodeMirror.defineMode("dtd", function(config) { - var indentUnit = config.indentUnit, type; - function ret(style, tp) {type = tp; return style;} - - function tokenBase(stream, state) { - var ch = stream.next(); - - if (ch == "<" && stream.eat("!") ) { - if (stream.eatWhile(/[\-]/)) { - state.tokenize = tokenSGMLComment; - return tokenSGMLComment(stream, state); - } else if (stream.eatWhile(/[\w]/)) return ret("keyword", "doindent"); - } else if (ch == "<" && stream.eat("?")) { //xml declaration - state.tokenize = inBlock("meta", "?>"); - return ret("meta", ch); - } else if (ch == "#" && stream.eatWhile(/[\w]/)) return ret("atom", "tag"); - else if (ch == "|") return ret("keyword", "seperator"); - else if (ch.match(/[\(\)\[\]\-\.,\+\?>]/)) return ret(null, ch);//if(ch === ">") return ret(null, "endtag"); else - else if (ch.match(/[\[\]]/)) return ret("rule", ch); - else if (ch == "\"" || ch == "'") { - state.tokenize = tokenString(ch); - return state.tokenize(stream, state); - } else if (stream.eatWhile(/[a-zA-Z\?\+\d]/)) { - var sc = stream.current(); - if( sc.substr(sc.length-1,sc.length).match(/\?|\+/) !== null )stream.backUp(1); - return ret("tag", "tag"); - } else if (ch == "%" || ch == "*" ) return ret("number", "number"); - else { - stream.eatWhile(/[\w\\\-_%.{,]/); - return ret(null, null); - } - } - - function tokenSGMLComment(stream, state) { - var dashes = 0, ch; - while ((ch = stream.next()) != null) { - if (dashes >= 2 && ch == ">") { - state.tokenize = tokenBase; - break; - } - dashes = (ch == "-") ? dashes + 1 : 0; - } - return ret("comment", "comment"); - } - - function tokenString(quote) { - return function(stream, state) { - var escaped = false, ch; - while ((ch = stream.next()) != null) { - if (ch == quote && !escaped) { - state.tokenize = tokenBase; - break; - } - escaped = !escaped && ch == "\\"; - } - return ret("string", "tag"); - }; - } - - function inBlock(style, terminator) { - return function(stream, state) { - while (!stream.eol()) { - if (stream.match(terminator)) { - state.tokenize = tokenBase; - break; - } - stream.next(); - } - return style; - }; - } - - return { - startState: function(base) { - return {tokenize: tokenBase, - baseIndent: base || 0, - stack: []}; - }, - - token: function(stream, state) { - if (stream.eatSpace()) return null; - var style = state.tokenize(stream, state); - - var context = state.stack[state.stack.length-1]; - if (stream.current() == "[" || type === "doindent" || type == "[") state.stack.push("rule"); - else if (type === "endtag") state.stack[state.stack.length-1] = "endtag"; - else if (stream.current() == "]" || type == "]" || (type == ">" && context == "rule")) state.stack.pop(); - else if (type == "[") state.stack.push("["); - return style; - }, - - indent: function(state, textAfter) { - var n = state.stack.length; - - if( textAfter.match(/\]\s+|\]/) )n=n-1; - else if(textAfter.substr(textAfter.length-1, textAfter.length) === ">"){ - if(textAfter.substr(0,1) === "<")n; - else if( type == "doindent" && textAfter.length > 1 )n; - else if( type == "doindent")n--; - else if( type == ">" && textAfter.length > 1)n; - else if( type == "tag" && textAfter !== ">")n; - else if( type == "tag" && state.stack[state.stack.length-1] == "rule")n--; - else if( type == "tag")n++; - else if( textAfter === ">" && state.stack[state.stack.length-1] == "rule" && type === ">")n--; - else if( textAfter === ">" && state.stack[state.stack.length-1] == "rule")n; - else if( textAfter.substr(0,1) !== "<" && textAfter.substr(0,1) === ">" )n=n-1; - else if( textAfter === ">")n; - else n=n-1; - //over rule them all - if(type == null || type == "]")n--; - } - - return state.baseIndent + n * indentUnit; - }, - - electricChars: "]>" - }; -}); - -CodeMirror.defineMIME("application/xml-dtd", "dtd"); diff --git a/plugins/codemirror/codemirror/mode/dtd/index.html b/plugins/codemirror/codemirror/mode/dtd/index.html deleted file mode 100644 index 076d827..0000000 --- a/plugins/codemirror/codemirror/mode/dtd/index.html +++ /dev/null @@ -1,89 +0,0 @@ - - -CodeMirror: DTD mode - - - - - - - - - -
    -

    DTD mode

    -
    - - -

    MIME types defined: application/xml-dtd.

    -
    diff --git a/plugins/codemirror/codemirror/mode/ecl/ecl.js b/plugins/codemirror/codemirror/mode/ecl/ecl.js deleted file mode 100644 index 7601b18..0000000 --- a/plugins/codemirror/codemirror/mode/ecl/ecl.js +++ /dev/null @@ -1,192 +0,0 @@ -CodeMirror.defineMode("ecl", function(config) { - - function words(str) { - var obj = {}, words = str.split(" "); - for (var i = 0; i < words.length; ++i) obj[words[i]] = true; - return obj; - } - - function metaHook(stream, state) { - if (!state.startOfLine) return false; - stream.skipToEnd(); - return "meta"; - } - - var indentUnit = config.indentUnit; - var keyword = words("abs acos allnodes ascii asin asstring atan atan2 ave case choose choosen choosesets clustersize combine correlation cos cosh count covariance cron dataset dedup define denormalize distribute distributed distribution ebcdic enth error evaluate event eventextra eventname exists exp failcode failmessage fetch fromunicode getisvalid global graph group hash hash32 hash64 hashcrc hashmd5 having if index intformat isvalid iterate join keyunicode length library limit ln local log loop map matched matchlength matchposition matchtext matchunicode max merge mergejoin min nolocal nonempty normalize parse pipe power preload process project pull random range rank ranked realformat recordof regexfind regexreplace regroup rejected rollup round roundup row rowdiff sample set sin sinh sizeof soapcall sort sorted sqrt stepped stored sum table tan tanh thisnode topn tounicode transfer trim truncate typeof ungroup unicodeorder variance which workunit xmldecode xmlencode xmltext xmlunicode"); - var variable = words("apply assert build buildindex evaluate fail keydiff keypatch loadxml nothor notify output parallel sequential soapcall wait"); - var variable_2 = words("__compressed__ all and any as atmost before beginc++ best between case const counter csv descend encrypt end endc++ endmacro except exclusive expire export extend false few first flat from full function group header heading hole ifblock import in interface joined keep keyed last left limit load local locale lookup macro many maxcount maxlength min skew module named nocase noroot noscan nosort not of only opt or outer overwrite packed partition penalty physicallength pipe quote record relationship repeat return right scan self separator service shared skew skip sql store terminator thor threshold token transform trim true type unicodeorder unsorted validate virtual whole wild within xml xpath"); - var variable_3 = words("ascii big_endian boolean data decimal ebcdic integer pattern qstring real record rule set of string token udecimal unicode unsigned varstring varunicode"); - var builtin = words("checkpoint deprecated failcode failmessage failure global independent onwarning persist priority recovery stored success wait when"); - var blockKeywords = words("catch class do else finally for if switch try while"); - var atoms = words("true false null"); - var hooks = {"#": metaHook}; - var multiLineStrings; - var isOperatorChar = /[+\-*&%=<>!?|\/]/; - - var curPunc; - - function tokenBase(stream, state) { - var ch = stream.next(); - if (hooks[ch]) { - var result = hooks[ch](stream, state); - if (result !== false) return result; - } - if (ch == '"' || ch == "'") { - state.tokenize = tokenString(ch); - return state.tokenize(stream, state); - } - if (/[\[\]{}\(\),;\:\.]/.test(ch)) { - curPunc = ch; - return null; - } - if (/\d/.test(ch)) { - stream.eatWhile(/[\w\.]/); - return "number"; - } - if (ch == "/") { - if (stream.eat("*")) { - state.tokenize = tokenComment; - return tokenComment(stream, state); - } - if (stream.eat("/")) { - stream.skipToEnd(); - return "comment"; - } - } - if (isOperatorChar.test(ch)) { - stream.eatWhile(isOperatorChar); - return "operator"; - } - stream.eatWhile(/[\w\$_]/); - var cur = stream.current().toLowerCase(); - if (keyword.propertyIsEnumerable(cur)) { - if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement"; - return "keyword"; - } else if (variable.propertyIsEnumerable(cur)) { - if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement"; - return "variable"; - } else if (variable_2.propertyIsEnumerable(cur)) { - if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement"; - return "variable-2"; - } else if (variable_3.propertyIsEnumerable(cur)) { - if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement"; - return "variable-3"; - } else if (builtin.propertyIsEnumerable(cur)) { - if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement"; - return "builtin"; - } else { //Data types are of from KEYWORD## - var i = cur.length - 1; - while(i >= 0 && (!isNaN(cur[i]) || cur[i] == '_')) - --i; - - if (i > 0) { - var cur2 = cur.substr(0, i + 1); - if (variable_3.propertyIsEnumerable(cur2)) { - if (blockKeywords.propertyIsEnumerable(cur2)) curPunc = "newstatement"; - return "variable-3"; - } - } - } - if (atoms.propertyIsEnumerable(cur)) return "atom"; - return null; - } - - function tokenString(quote) { - return function(stream, state) { - var escaped = false, next, end = false; - while ((next = stream.next()) != null) { - if (next == quote && !escaped) {end = true; break;} - escaped = !escaped && next == "\\"; - } - if (end || !(escaped || multiLineStrings)) - state.tokenize = tokenBase; - return "string"; - }; - } - - function tokenComment(stream, state) { - var maybeEnd = false, ch; - while (ch = stream.next()) { - if (ch == "/" && maybeEnd) { - state.tokenize = tokenBase; - break; - } - maybeEnd = (ch == "*"); - } - return "comment"; - } - - function Context(indented, column, type, align, prev) { - this.indented = indented; - this.column = column; - this.type = type; - this.align = align; - this.prev = prev; - } - function pushContext(state, col, type) { - return state.context = new Context(state.indented, col, type, null, state.context); - } - function popContext(state) { - var t = state.context.type; - if (t == ")" || t == "]" || t == "}") - state.indented = state.context.indented; - return state.context = state.context.prev; - } - - // Interface - - return { - startState: function(basecolumn) { - return { - tokenize: null, - context: new Context((basecolumn || 0) - indentUnit, 0, "top", false), - indented: 0, - startOfLine: true - }; - }, - - token: function(stream, state) { - var ctx = state.context; - if (stream.sol()) { - if (ctx.align == null) ctx.align = false; - state.indented = stream.indentation(); - state.startOfLine = true; - } - if (stream.eatSpace()) return null; - curPunc = null; - var style = (state.tokenize || tokenBase)(stream, state); - if (style == "comment" || style == "meta") return style; - if (ctx.align == null) ctx.align = true; - - if ((curPunc == ";" || curPunc == ":") && ctx.type == "statement") popContext(state); - else if (curPunc == "{") pushContext(state, stream.column(), "}"); - else if (curPunc == "[") pushContext(state, stream.column(), "]"); - else if (curPunc == "(") pushContext(state, stream.column(), ")"); - else if (curPunc == "}") { - while (ctx.type == "statement") ctx = popContext(state); - if (ctx.type == "}") ctx = popContext(state); - while (ctx.type == "statement") ctx = popContext(state); - } - else if (curPunc == ctx.type) popContext(state); - else if (ctx.type == "}" || ctx.type == "top" || (ctx.type == "statement" && curPunc == "newstatement")) - pushContext(state, stream.column(), "statement"); - state.startOfLine = false; - return style; - }, - - indent: function(state, textAfter) { - if (state.tokenize != tokenBase && state.tokenize != null) return 0; - var ctx = state.context, firstChar = textAfter && textAfter.charAt(0); - if (ctx.type == "statement" && firstChar == "}") ctx = ctx.prev; - var closing = firstChar == ctx.type; - if (ctx.type == "statement") return ctx.indented + (firstChar == "{" ? 0 : indentUnit); - else if (ctx.align) return ctx.column + (closing ? 0 : 1); - else return ctx.indented + (closing ? 0 : indentUnit); - }, - - electricChars: "{}" - }; -}); - -CodeMirror.defineMIME("text/x-ecl", "ecl"); diff --git a/plugins/codemirror/codemirror/mode/ecl/index.html b/plugins/codemirror/codemirror/mode/ecl/index.html deleted file mode 100644 index f4b612d..0000000 --- a/plugins/codemirror/codemirror/mode/ecl/index.html +++ /dev/null @@ -1,52 +0,0 @@ - - -CodeMirror: ECL mode - - - - - - - - - -
    -

    ECL mode

    -
    - - -

    Based on CodeMirror's clike mode. For more information see HPCC Systems web site.

    -

    MIME types defined: text/x-ecl.

    - -
    diff --git a/plugins/codemirror/codemirror/mode/eiffel/eiffel.js b/plugins/codemirror/codemirror/mode/eiffel/eiffel.js deleted file mode 100644 index 15f34a9..0000000 --- a/plugins/codemirror/codemirror/mode/eiffel/eiffel.js +++ /dev/null @@ -1,147 +0,0 @@ -CodeMirror.defineMode("eiffel", function() { - function wordObj(words) { - var o = {}; - for (var i = 0, e = words.length; i < e; ++i) o[words[i]] = true; - return o; - } - var keywords = wordObj([ - 'note', - 'across', - 'when', - 'variant', - 'until', - 'unique', - 'undefine', - 'then', - 'strip', - 'select', - 'retry', - 'rescue', - 'require', - 'rename', - 'reference', - 'redefine', - 'prefix', - 'once', - 'old', - 'obsolete', - 'loop', - 'local', - 'like', - 'is', - 'inspect', - 'infix', - 'include', - 'if', - 'frozen', - 'from', - 'external', - 'export', - 'ensure', - 'end', - 'elseif', - 'else', - 'do', - 'creation', - 'create', - 'check', - 'alias', - 'agent', - 'separate', - 'invariant', - 'inherit', - 'indexing', - 'feature', - 'expanded', - 'deferred', - 'class', - 'Void', - 'True', - 'Result', - 'Precursor', - 'False', - 'Current', - 'create', - 'attached', - 'detachable', - 'as', - 'and', - 'implies', - 'not', - 'or' - ]); - var operators = wordObj([":=", "and then","and", "or","<<",">>"]); - var curPunc; - - function chain(newtok, stream, state) { - state.tokenize.push(newtok); - return newtok(stream, state); - } - - function tokenBase(stream, state) { - curPunc = null; - if (stream.eatSpace()) return null; - var ch = stream.next(); - if (ch == '"'||ch == "'") { - return chain(readQuoted(ch, "string"), stream, state); - } else if (ch == "-"&&stream.eat("-")) { - stream.skipToEnd(); - return "comment"; - } else if (ch == ":"&&stream.eat("=")) { - return "operator"; - } else if (/[0-9]/.test(ch)) { - stream.eatWhile(/[xXbBCc0-9\.]/); - stream.eat(/[\?\!]/); - return "ident"; - } else if (/[a-zA-Z_0-9]/.test(ch)) { - stream.eatWhile(/[a-zA-Z_0-9]/); - stream.eat(/[\?\!]/); - return "ident"; - } else if (/[=+\-\/*^%<>~]/.test(ch)) { - stream.eatWhile(/[=+\-\/*^%<>~]/); - return "operator"; - } else { - return null; - } - } - - function readQuoted(quote, style, unescaped) { - return function(stream, state) { - var escaped = false, ch; - while ((ch = stream.next()) != null) { - if (ch == quote && (unescaped || !escaped)) { - state.tokenize.pop(); - break; - } - escaped = !escaped && ch == "%"; - } - return style; - }; - } - - return { - startState: function() { - return {tokenize: [tokenBase]}; - }, - - token: function(stream, state) { - var style = state.tokenize[state.tokenize.length-1](stream, state); - if (style == "ident") { - var word = stream.current(); - style = keywords.propertyIsEnumerable(stream.current()) ? "keyword" - : operators.propertyIsEnumerable(stream.current()) ? "operator" - : /^[A-Z][A-Z_0-9]*$/g.test(word) ? "tag" - : /^0[bB][0-1]+$/g.test(word) ? "number" - : /^0[cC][0-7]+$/g.test(word) ? "number" - : /^0[xX][a-fA-F0-9]+$/g.test(word) ? "number" - : /^([0-9]+\.[0-9]*)|([0-9]*\.[0-9]+)$/g.test(word) ? "number" - : /^[0-9]+$/g.test(word) ? "number" - : "variable"; - } - return style; - }, - lineComment: "--" - }; -}); - -CodeMirror.defineMIME("text/x-eiffel", "eiffel"); diff --git a/plugins/codemirror/codemirror/mode/eiffel/index.html b/plugins/codemirror/codemirror/mode/eiffel/index.html deleted file mode 100644 index 5d395a0..0000000 --- a/plugins/codemirror/codemirror/mode/eiffel/index.html +++ /dev/null @@ -1,430 +0,0 @@ - - -CodeMirror: Eiffel mode - - - - - - - - - - -
    -

    Eiffel mode

    -
    - - -

    MIME types defined: text/x-eiffel.

    - -

    Created by YNH.

    -
    diff --git a/plugins/codemirror/codemirror/mode/erlang/erlang.js b/plugins/codemirror/codemirror/mode/erlang/erlang.js deleted file mode 100644 index af8953c..0000000 --- a/plugins/codemirror/codemirror/mode/erlang/erlang.js +++ /dev/null @@ -1,484 +0,0 @@ -// block; "begin", "case", "fun", "if", "receive", "try": closed by "end" -// block internal; "after", "catch", "of" -// guard; "when", closed by "->" -// "->" opens a clause, closed by ";" or "." -// "<<" opens a binary, closed by ">>" -// "," appears in arglists, lists, tuples and terminates lines of code -// "." resets indentation to 0 -// obsolete; "cond", "let", "query" - -CodeMirror.defineMIME("text/x-erlang", "erlang"); - -CodeMirror.defineMode("erlang", function(cmCfg) { - - function rval(state,_stream,type) { - // distinguish between "." as terminator and record field operator - state.in_record = (type == "record"); - - // erlang -> CodeMirror tag - switch (type) { - case "atom": return "atom"; - case "attribute": return "attribute"; - case "boolean": return "special"; - case "builtin": return "builtin"; - case "comment": return "comment"; - case "fun": return "meta"; - case "function": return "tag"; - case "guard": return "property"; - case "keyword": return "keyword"; - case "macro": return "variable-2"; - case "number": return "number"; - case "operator": return "operator"; - case "record": return "bracket"; - case "string": return "string"; - case "type": return "def"; - case "variable": return "variable"; - case "error": return "error"; - case "separator": return null; - case "open_paren": return null; - case "close_paren": return null; - default: return null; - } - } - - var typeWords = [ - "-type", "-spec", "-export_type", "-opaque"]; - - var keywordWords = [ - "after","begin","catch","case","cond","end","fun","if", - "let","of","query","receive","try","when"]; - - var separatorRE = /[\->\.,:;]/; - var separatorWords = [ - "->",";",":",".",","]; - - var operatorWords = [ - "and","andalso","band","bnot","bor","bsl","bsr","bxor", - "div","not","or","orelse","rem","xor"]; - - var symbolRE = /[\+\-\*\/<>=\|:!]/; - var symbolWords = [ - "+","-","*","/",">",">=","<","=<","=:=","==","=/=","/=","||","<-","!"]; - - var openParenRE = /[<\(\[\{]/; - var openParenWords = [ - "<<","(","[","{"]; - - var closeParenRE = /[>\)\]\}]/; - var closeParenWords = [ - "}","]",")",">>"]; - - var guardWords = [ - "is_atom","is_binary","is_bitstring","is_boolean","is_float", - "is_function","is_integer","is_list","is_number","is_pid", - "is_port","is_record","is_reference","is_tuple", - "atom","binary","bitstring","boolean","function","integer","list", - "number","pid","port","record","reference","tuple"]; - - var bifWords = [ - "abs","adler32","adler32_combine","alive","apply","atom_to_binary", - "atom_to_list","binary_to_atom","binary_to_existing_atom", - "binary_to_list","binary_to_term","bit_size","bitstring_to_list", - "byte_size","check_process_code","contact_binary","crc32", - "crc32_combine","date","decode_packet","delete_module", - "disconnect_node","element","erase","exit","float","float_to_list", - "garbage_collect","get","get_keys","group_leader","halt","hd", - "integer_to_list","internal_bif","iolist_size","iolist_to_binary", - "is_alive","is_atom","is_binary","is_bitstring","is_boolean", - "is_float","is_function","is_integer","is_list","is_number","is_pid", - "is_port","is_process_alive","is_record","is_reference","is_tuple", - "length","link","list_to_atom","list_to_binary","list_to_bitstring", - "list_to_existing_atom","list_to_float","list_to_integer", - "list_to_pid","list_to_tuple","load_module","make_ref","module_loaded", - "monitor_node","node","node_link","node_unlink","nodes","notalive", - "now","open_port","pid_to_list","port_close","port_command", - "port_connect","port_control","pre_loaded","process_flag", - "process_info","processes","purge_module","put","register", - "registered","round","self","setelement","size","spawn","spawn_link", - "spawn_monitor","spawn_opt","split_binary","statistics", - "term_to_binary","time","throw","tl","trunc","tuple_size", - "tuple_to_list","unlink","unregister","whereis"]; - -// [Ø-Þ] [À-Ö] -// [ß-ö] [ø-ÿ] - var anumRE = /[\w@Ø-ÞÀ-Öß-öø-ÿ]/; - var escapesRE = - /[0-7]{1,3}|[bdefnrstv\\"']|\^[a-zA-Z]|x[0-9a-zA-Z]{2}|x{[0-9a-zA-Z]+}/; - - function tokenize(stream, state) { - - // in multi-line string - if (state.in_string) { - state.in_string = (!doubleQuote(stream)); - return rval(state,stream,"string"); - } - - // in multi-line atom - if (state.in_atom) { - state.in_atom = (!singleQuote(stream)); - return rval(state,stream,"atom"); - } - - // whitespace - if (stream.eatSpace()) { - return rval(state,stream,"whitespace"); - } - - // attributes and type specs - if ((peekToken(state).token == "") && - stream.match(/-\s*[a-zß-öø-ÿ][\wØ-ÞÀ-Öß-öø-ÿ]*/)) { - if (isMember(stream.current(),typeWords)) { - return rval(state,stream,"type"); - }else{ - return rval(state,stream,"attribute"); - } - } - - var ch = stream.next(); - - // comment - if (ch == '%') { - stream.skipToEnd(); - return rval(state,stream,"comment"); - } - - // macro - if (ch == '?') { - stream.eatWhile(anumRE); - return rval(state,stream,"macro"); - } - - // record - if (ch == "#") { - stream.eatWhile(anumRE); - return rval(state,stream,"record"); - } - - // dollar escape - if ( ch == "$" ) { - if (stream.next() == "\\" && !stream.match(escapesRE)) { - return rval(state,stream,"error"); - } - return rval(state,stream,"number"); - } - - // quoted atom - if (ch == '\'') { - if (!(state.in_atom = (!singleQuote(stream)))) { - if (stream.match(/\s*\/\s*[0-9]/,false)) { - stream.match(/\s*\/\s*[0-9]/,true); - popToken(state); - return rval(state,stream,"fun"); // 'f'/0 style fun - } - if (stream.match(/\s*\(/,false) || stream.match(/\s*:/,false)) { - return rval(state,stream,"function"); - } - } - return rval(state,stream,"atom"); - } - - // string - if (ch == '"') { - state.in_string = (!doubleQuote(stream)); - return rval(state,stream,"string"); - } - - // variable - if (/[A-Z_Ø-ÞÀ-Ö]/.test(ch)) { - stream.eatWhile(anumRE); - return rval(state,stream,"variable"); - } - - // atom/keyword/BIF/function - if (/[a-z_ß-öø-ÿ]/.test(ch)) { - stream.eatWhile(anumRE); - - if (stream.match(/\s*\/\s*[0-9]/,false)) { - stream.match(/\s*\/\s*[0-9]/,true); - popToken(state); - return rval(state,stream,"fun"); // f/0 style fun - } - - var w = stream.current(); - - if (isMember(w,keywordWords)) { - pushToken(state,stream); - return rval(state,stream,"keyword"); - }else if (stream.match(/\s*\(/,false)) { - // 'put' and 'erlang:put' are bifs, 'foo:put' is not - if (isMember(w,bifWords) && - (!isPrev(stream,":") || isPrev(stream,"erlang:"))) { - return rval(state,stream,"builtin"); - }else if (isMember(w,guardWords)) { - return rval(state,stream,"guard"); - }else{ - return rval(state,stream,"function"); - } - }else if (isMember(w,operatorWords)) { - return rval(state,stream,"operator"); - }else if (stream.match(/\s*:/,false)) { - if (w == "erlang") { - return rval(state,stream,"builtin"); - } else { - return rval(state,stream,"function"); - } - }else if (isMember(w,["true","false"])) { - return rval(state,stream,"boolean"); - }else{ - return rval(state,stream,"atom"); - } - } - - // number - var digitRE = /[0-9]/; - var radixRE = /[0-9a-zA-Z]/; // 36#zZ style int - if (digitRE.test(ch)) { - stream.eatWhile(digitRE); - if (stream.eat('#')) { - stream.eatWhile(radixRE); // 36#aZ style integer - } else { - if (stream.eat('.')) { // float - stream.eatWhile(digitRE); - } - if (stream.eat(/[eE]/)) { - stream.eat(/[-+]/); // float with exponent - stream.eatWhile(digitRE); - } - } - return rval(state,stream,"number"); // normal integer - } - - // open parens - if (nongreedy(stream,openParenRE,openParenWords)) { - pushToken(state,stream); - return rval(state,stream,"open_paren"); - } - - // close parens - if (nongreedy(stream,closeParenRE,closeParenWords)) { - pushToken(state,stream); - return rval(state,stream,"close_paren"); - } - - // separators - if (greedy(stream,separatorRE,separatorWords)) { - // distinguish between "." as terminator and record field operator - if (!state.in_record) { - pushToken(state,stream); - } - return rval(state,stream,"separator"); - } - - // operators - if (greedy(stream,symbolRE,symbolWords)) { - return rval(state,stream,"operator"); - } - - return rval(state,stream,null); - } - - function isPrev(stream,string) { - var start = stream.start; - var len = string.length; - if (len <= start) { - var word = stream.string.slice(start-len,start); - return word == string; - }else{ - return false; - } - } - - function nongreedy(stream,re,words) { - if (stream.current().length == 1 && re.test(stream.current())) { - stream.backUp(1); - while (re.test(stream.peek())) { - stream.next(); - if (isMember(stream.current(),words)) { - return true; - } - } - stream.backUp(stream.current().length-1); - } - return false; - } - - function greedy(stream,re,words) { - if (stream.current().length == 1 && re.test(stream.current())) { - while (re.test(stream.peek())) { - stream.next(); - } - while (0 < stream.current().length) { - if (isMember(stream.current(),words)) { - return true; - }else{ - stream.backUp(1); - } - } - stream.next(); - } - return false; - } - - function doubleQuote(stream) { - return quote(stream, '"', '\\'); - } - - function singleQuote(stream) { - return quote(stream,'\'','\\'); - } - - function quote(stream,quoteChar,escapeChar) { - while (!stream.eol()) { - var ch = stream.next(); - if (ch == quoteChar) { - return true; - }else if (ch == escapeChar) { - stream.next(); - } - } - return false; - } - - function isMember(element,list) { - return (-1 < list.indexOf(element)); - } - -///////////////////////////////////////////////////////////////////////////// - function myIndent(state,textAfter) { - var indent = cmCfg.indentUnit; - var token = (peekToken(state)).token; - var wordAfter = takewhile(textAfter,/[^a-z]/); - - if (state.in_string || state.in_atom) { - return CodeMirror.Pass; - }else if (token == "") { - return 0; - }else if (isMember(token,openParenWords)) { - return (peekToken(state)).column+token.length; - }else if (token == "when") { - return (peekToken(state)).column+token.length+1; - }else if (token == "fun" && wordAfter == "") { - return (peekToken(state)).column+token.length; - }else if (token == "->") { - if (isMember(wordAfter,["end","after","catch"])) { - return peekToken(state,2).column; - }else if (peekToken(state,2).token == "fun") { - return peekToken(state,2).column+indent; - }else if (peekToken(state,2).token == "") { - return indent; - }else{ - return (peekToken(state)).indent+indent; - } - }else if (isMember(wordAfter,["after","catch","of"])) { - return (peekToken(state)).indent; - }else{ - return (peekToken(state)).column+indent; - } - } - - function takewhile(str,re) { - var m = str.match(re); - return m ? str.slice(0,m.index) : str; - } - - function Token(stream) { - this.token = stream ? stream.current() : ""; - this.column = stream ? stream.column() : 0; - this.indent = stream ? stream.indentation() : 0; - } - - function popToken(state) { - return state.tokenStack.pop(); - } - - function peekToken(state,depth) { - var len = state.tokenStack.length; - var dep = (depth ? depth : 1); - if (len < dep) { - return new Token; - }else{ - return state.tokenStack[len-dep]; - } - } - - function pushToken(state,stream) { - var token = stream.current(); - var prev_token = peekToken(state).token; - - if (token == ".") { - state.tokenStack = []; - return false; - }else if(isMember(token,[",", ":", "of", "cond", "let", "query"])) { - return false; - }else if (drop_last(prev_token,token)) { - return false; - }else if (drop_both(prev_token,token)) { - popToken(state); - return false; - }else if (drop_first(prev_token,token)) { - popToken(state); - return pushToken(state,stream); - }else if (isMember(token,["after","catch"])) { - return false; - }else{ - state.tokenStack.push(new Token(stream)); - return true; - } - } - - function drop_last(open, close) { - switch(open+" "+close) { - case "when ;": return true; - default: return false; - } - } - - function drop_first(open, close) { - switch (open+" "+close) { - case "when ->": return true; - case "-> end": return true; - default: return false; - } - } - - function drop_both(open, close) { - switch (open+" "+close) { - case "( )": return true; - case "[ ]": return true; - case "{ }": return true; - case "<< >>": return true; - case "begin end": return true; - case "case end": return true; - case "fun end": return true; - case "if end": return true; - case "receive end": return true; - case "try end": return true; - case "-> catch": return true; - case "-> after": return true; - case "-> ;": return true; - default: return false; - } - } - - return { - startState: - function() { - return {tokenStack: [], - in_record: false, - in_string: false, - in_atom: false}; - }, - - token: - function(stream, state) { - return tokenize(stream, state); - }, - - indent: - function(state, textAfter) { - return myIndent(state,textAfter); - }, - - lineComment: "%" - }; -}); diff --git a/plugins/codemirror/codemirror/mode/erlang/index.html b/plugins/codemirror/codemirror/mode/erlang/index.html deleted file mode 100644 index e63e231..0000000 --- a/plugins/codemirror/codemirror/mode/erlang/index.html +++ /dev/null @@ -1,75 +0,0 @@ - - -CodeMirror: Erlang mode - - - - - - - - - - - -
    -

    Erlang mode

    -
    - - - -

    MIME types defined: text/x-erlang.

    -
    diff --git a/plugins/codemirror/codemirror/mode/fortran/fortran.js b/plugins/codemirror/codemirror/mode/fortran/fortran.js deleted file mode 100644 index 83fd8fd..0000000 --- a/plugins/codemirror/codemirror/mode/fortran/fortran.js +++ /dev/null @@ -1,173 +0,0 @@ -CodeMirror.defineMode("fortran", function() { - function words(array) { - var keys = {}; - for (var i = 0; i < array.length; ++i) { - keys[array[i]] = true; - } - return keys; - } - - var keywords = words([ - "abstract", "accept", "allocatable", "allocate", - "array", "assign", "asynchronous", "backspace", - "bind", "block", "byte", "call", "case", - "class", "close", "common", "contains", - "continue", "cycle", "data", "deallocate", - "decode", "deferred", "dimension", "do", - "elemental", "else", "encode", "end", - "endif", "entry", "enumerator", "equivalence", - "exit", "external", "extrinsic", "final", - "forall", "format", "function", "generic", - "go", "goto", "if", "implicit", "import", "include", - "inquire", "intent", "interface", "intrinsic", - "module", "namelist", "non_intrinsic", - "non_overridable", "none", "nopass", - "nullify", "open", "optional", "options", - "parameter", "pass", "pause", "pointer", - "print", "private", "program", "protected", - "public", "pure", "read", "recursive", "result", - "return", "rewind", "save", "select", "sequence", - "stop", "subroutine", "target", "then", "to", "type", - "use", "value", "volatile", "where", "while", - "write"]); - var builtins = words(["abort", "abs", "access", "achar", "acos", - "adjustl", "adjustr", "aimag", "aint", "alarm", - "all", "allocated", "alog", "amax", "amin", - "amod", "and", "anint", "any", "asin", - "associated", "atan", "besj", "besjn", "besy", - "besyn", "bit_size", "btest", "cabs", "ccos", - "ceiling", "cexp", "char", "chdir", "chmod", - "clog", "cmplx", "command_argument_count", - "complex", "conjg", "cos", "cosh", "count", - "cpu_time", "cshift", "csin", "csqrt", "ctime", - "c_funloc", "c_loc", "c_associated", "c_null_ptr", - "c_null_funptr", "c_f_pointer", "c_null_char", - "c_alert", "c_backspace", "c_form_feed", - "c_new_line", "c_carriage_return", - "c_horizontal_tab", "c_vertical_tab", "dabs", - "dacos", "dasin", "datan", "date_and_time", - "dbesj", "dbesj", "dbesjn", "dbesy", "dbesy", - "dbesyn", "dble", "dcos", "dcosh", "ddim", "derf", - "derfc", "dexp", "digits", "dim", "dint", "dlog", - "dlog", "dmax", "dmin", "dmod", "dnint", - "dot_product", "dprod", "dsign", "dsinh", - "dsin", "dsqrt", "dtanh", "dtan", "dtime", - "eoshift", "epsilon", "erf", "erfc", "etime", - "exit", "exp", "exponent", "extends_type_of", - "fdate", "fget", "fgetc", "float", "floor", - "flush", "fnum", "fputc", "fput", "fraction", - "fseek", "fstat", "ftell", "gerror", "getarg", - "get_command", "get_command_argument", - "get_environment_variable", "getcwd", - "getenv", "getgid", "getlog", "getpid", - "getuid", "gmtime", "hostnm", "huge", "iabs", - "iachar", "iand", "iargc", "ibclr", "ibits", - "ibset", "ichar", "idate", "idim", "idint", - "idnint", "ieor", "ierrno", "ifix", "imag", - "imagpart", "index", "int", "ior", "irand", - "isatty", "ishft", "ishftc", "isign", - "iso_c_binding", "is_iostat_end", "is_iostat_eor", - "itime", "kill", "kind", "lbound", "len", "len_trim", - "lge", "lgt", "link", "lle", "llt", "lnblnk", "loc", - "log", "logical", "long", "lshift", "lstat", "ltime", - "matmul", "max", "maxexponent", "maxloc", "maxval", - "mclock", "merge", "move_alloc", "min", "minexponent", - "minloc", "minval", "mod", "modulo", "mvbits", - "nearest", "new_line", "nint", "not", "or", "pack", - "perror", "precision", "present", "product", "radix", - "rand", "random_number", "random_seed", "range", - "real", "realpart", "rename", "repeat", "reshape", - "rrspacing", "rshift", "same_type_as", "scale", - "scan", "second", "selected_int_kind", - "selected_real_kind", "set_exponent", "shape", - "short", "sign", "signal", "sinh", "sin", "sleep", - "sngl", "spacing", "spread", "sqrt", "srand", "stat", - "sum", "symlnk", "system", "system_clock", "tan", - "tanh", "time", "tiny", "transfer", "transpose", - "trim", "ttynam", "ubound", "umask", "unlink", - "unpack", "verify", "xor", "zabs", "zcos", "zexp", - "zlog", "zsin", "zsqrt"]); - - var dataTypes = words(["c_bool", "c_char", "c_double", "c_double_complex", - "c_float", "c_float_complex", "c_funptr", "c_int", - "c_int16_t", "c_int32_t", "c_int64_t", "c_int8_t", - "c_int_fast16_t", "c_int_fast32_t", "c_int_fast64_t", - "c_int_fast8_t", "c_int_least16_t", "c_int_least32_t", - "c_int_least64_t", "c_int_least8_t", "c_intmax_t", - "c_intptr_t", "c_long", "c_long_double", - "c_long_double_complex", "c_long_long", "c_ptr", - "c_short", "c_signed_char", "c_size_t", "character", - "complex", "double", "integer", "logical", "real"]); - var isOperatorChar = /[+\-*&=<>\/\:]/; - var litOperator = new RegExp("(\.and\.|\.or\.|\.eq\.|\.lt\.|\.le\.|\.gt\.|\.ge\.|\.ne\.|\.not\.|\.eqv\.|\.neqv\.)", "i"); - - function tokenBase(stream, state) { - - if (stream.match(litOperator)){ - return 'operator'; - } - - var ch = stream.next(); - if (ch == "!") { - stream.skipToEnd(); - return "comment"; - } - if (ch == '"' || ch == "'") { - state.tokenize = tokenString(ch); - return state.tokenize(stream, state); - } - if (/[\[\]\(\),]/.test(ch)) { - return null; - } - if (/\d/.test(ch)) { - stream.eatWhile(/[\w\.]/); - return "number"; - } - if (isOperatorChar.test(ch)) { - stream.eatWhile(isOperatorChar); - return "operator"; - } - stream.eatWhile(/[\w\$_]/); - var word = stream.current().toLowerCase(); - - if (keywords.hasOwnProperty(word)){ - return 'keyword'; - } - if (builtins.hasOwnProperty(word) || dataTypes.hasOwnProperty(word)) { - return 'builtin'; - } - return "variable"; - } - - function tokenString(quote) { - return function(stream, state) { - var escaped = false, next, end = false; - while ((next = stream.next()) != null) { - if (next == quote && !escaped) { - end = true; - break; - } - escaped = !escaped && next == "\\"; - } - if (end || !escaped) state.tokenize = null; - return "string"; - }; - } - - // Interface - - return { - startState: function() { - return {tokenize: null}; - }, - - token: function(stream, state) { - if (stream.eatSpace()) return null; - var style = (state.tokenize || tokenBase)(stream, state); - if (style == "comment" || style == "meta") return style; - return style; - } - }; -}); - -CodeMirror.defineMIME("text/x-fortran", "fortran"); diff --git a/plugins/codemirror/codemirror/mode/fortran/index.html b/plugins/codemirror/codemirror/mode/fortran/index.html deleted file mode 100644 index efa55ec..0000000 --- a/plugins/codemirror/codemirror/mode/fortran/index.html +++ /dev/null @@ -1,81 +0,0 @@ - - -CodeMirror: Fortran mode - - - - - - - - - -
    -

    Fortran mode

    - - -
    - - - -

    MIME types defined: text/x-Fortran.

    -
    diff --git a/plugins/codemirror/codemirror/mode/gas/gas.js b/plugins/codemirror/codemirror/mode/gas/gas.js deleted file mode 100644 index a6e6892..0000000 --- a/plugins/codemirror/codemirror/mode/gas/gas.js +++ /dev/null @@ -1,330 +0,0 @@ -CodeMirror.defineMode("gas", function(_config, parserConfig) { - 'use strict'; - - // If an architecture is specified, its initialization function may - // populate this array with custom parsing functions which will be - // tried in the event that the standard functions do not find a match. - var custom = []; - - // The symbol used to start a line comment changes based on the target - // architecture. - // If no architecture is pased in "parserConfig" then only multiline - // comments will have syntax support. - var lineCommentStartSymbol = ""; - - // These directives are architecture independent. - // Machine specific directives should go in their respective - // architecture initialization function. - // Reference: - // http://sourceware.org/binutils/docs/as/Pseudo-Ops.html#Pseudo-Ops - var directives = { - ".abort" : "builtin", - ".align" : "builtin", - ".altmacro" : "builtin", - ".ascii" : "builtin", - ".asciz" : "builtin", - ".balign" : "builtin", - ".balignw" : "builtin", - ".balignl" : "builtin", - ".bundle_align_mode" : "builtin", - ".bundle_lock" : "builtin", - ".bundle_unlock" : "builtin", - ".byte" : "builtin", - ".cfi_startproc" : "builtin", - ".comm" : "builtin", - ".data" : "builtin", - ".def" : "builtin", - ".desc" : "builtin", - ".dim" : "builtin", - ".double" : "builtin", - ".eject" : "builtin", - ".else" : "builtin", - ".elseif" : "builtin", - ".end" : "builtin", - ".endef" : "builtin", - ".endfunc" : "builtin", - ".endif" : "builtin", - ".equ" : "builtin", - ".equiv" : "builtin", - ".eqv" : "builtin", - ".err" : "builtin", - ".error" : "builtin", - ".exitm" : "builtin", - ".extern" : "builtin", - ".fail" : "builtin", - ".file" : "builtin", - ".fill" : "builtin", - ".float" : "builtin", - ".func" : "builtin", - ".global" : "builtin", - ".gnu_attribute" : "builtin", - ".hidden" : "builtin", - ".hword" : "builtin", - ".ident" : "builtin", - ".if" : "builtin", - ".incbin" : "builtin", - ".include" : "builtin", - ".int" : "builtin", - ".internal" : "builtin", - ".irp" : "builtin", - ".irpc" : "builtin", - ".lcomm" : "builtin", - ".lflags" : "builtin", - ".line" : "builtin", - ".linkonce" : "builtin", - ".list" : "builtin", - ".ln" : "builtin", - ".loc" : "builtin", - ".loc_mark_labels" : "builtin", - ".local" : "builtin", - ".long" : "builtin", - ".macro" : "builtin", - ".mri" : "builtin", - ".noaltmacro" : "builtin", - ".nolist" : "builtin", - ".octa" : "builtin", - ".offset" : "builtin", - ".org" : "builtin", - ".p2align" : "builtin", - ".popsection" : "builtin", - ".previous" : "builtin", - ".print" : "builtin", - ".protected" : "builtin", - ".psize" : "builtin", - ".purgem" : "builtin", - ".pushsection" : "builtin", - ".quad" : "builtin", - ".reloc" : "builtin", - ".rept" : "builtin", - ".sbttl" : "builtin", - ".scl" : "builtin", - ".section" : "builtin", - ".set" : "builtin", - ".short" : "builtin", - ".single" : "builtin", - ".size" : "builtin", - ".skip" : "builtin", - ".sleb128" : "builtin", - ".space" : "builtin", - ".stab" : "builtin", - ".string" : "builtin", - ".struct" : "builtin", - ".subsection" : "builtin", - ".symver" : "builtin", - ".tag" : "builtin", - ".text" : "builtin", - ".title" : "builtin", - ".type" : "builtin", - ".uleb128" : "builtin", - ".val" : "builtin", - ".version" : "builtin", - ".vtable_entry" : "builtin", - ".vtable_inherit" : "builtin", - ".warning" : "builtin", - ".weak" : "builtin", - ".weakref" : "builtin", - ".word" : "builtin" - }; - - var registers = {}; - - function x86(_parserConfig) { - lineCommentStartSymbol = "#"; - - registers.ax = "variable"; - registers.eax = "variable-2"; - registers.rax = "variable-3"; - - registers.bx = "variable"; - registers.ebx = "variable-2"; - registers.rbx = "variable-3"; - - registers.cx = "variable"; - registers.ecx = "variable-2"; - registers.rcx = "variable-3"; - - registers.dx = "variable"; - registers.edx = "variable-2"; - registers.rdx = "variable-3"; - - registers.si = "variable"; - registers.esi = "variable-2"; - registers.rsi = "variable-3"; - - registers.di = "variable"; - registers.edi = "variable-2"; - registers.rdi = "variable-3"; - - registers.sp = "variable"; - registers.esp = "variable-2"; - registers.rsp = "variable-3"; - - registers.bp = "variable"; - registers.ebp = "variable-2"; - registers.rbp = "variable-3"; - - registers.ip = "variable"; - registers.eip = "variable-2"; - registers.rip = "variable-3"; - - registers.cs = "keyword"; - registers.ds = "keyword"; - registers.ss = "keyword"; - registers.es = "keyword"; - registers.fs = "keyword"; - registers.gs = "keyword"; - } - - function armv6(_parserConfig) { - // Reference: - // http://infocenter.arm.com/help/topic/com.arm.doc.qrc0001l/QRC0001_UAL.pdf - // http://infocenter.arm.com/help/topic/com.arm.doc.ddi0301h/DDI0301H_arm1176jzfs_r0p7_trm.pdf - lineCommentStartSymbol = "@"; - directives.syntax = "builtin"; - - registers.r0 = "variable"; - registers.r1 = "variable"; - registers.r2 = "variable"; - registers.r3 = "variable"; - registers.r4 = "variable"; - registers.r5 = "variable"; - registers.r6 = "variable"; - registers.r7 = "variable"; - registers.r8 = "variable"; - registers.r9 = "variable"; - registers.r10 = "variable"; - registers.r11 = "variable"; - registers.r12 = "variable"; - - registers.sp = "variable-2"; - registers.lr = "variable-2"; - registers.pc = "variable-2"; - registers.r13 = registers.sp; - registers.r14 = registers.lr; - registers.r15 = registers.pc; - - custom.push(function(ch, stream) { - if (ch === '#') { - stream.eatWhile(/\w/); - return "number"; - } - }); - } - - var arch = parserConfig.architecture.toLowerCase(); - if (arch === "x86") { - x86(parserConfig); - } else if (arch === "arm" || arch === "armv6") { - armv6(parserConfig); - } - - function nextUntilUnescaped(stream, end) { - var escaped = false, next; - while ((next = stream.next()) != null) { - if (next === end && !escaped) { - return false; - } - escaped = !escaped && next === "\\"; - } - return escaped; - } - - function clikeComment(stream, state) { - var maybeEnd = false, ch; - while ((ch = stream.next()) != null) { - if (ch === "/" && maybeEnd) { - state.tokenize = null; - break; - } - maybeEnd = (ch === "*"); - } - return "comment"; - } - - return { - startState: function() { - return { - tokenize: null - }; - }, - - token: function(stream, state) { - if (state.tokenize) { - return state.tokenize(stream, state); - } - - if (stream.eatSpace()) { - return null; - } - - var style, cur, ch = stream.next(); - - if (ch === "/") { - if (stream.eat("*")) { - state.tokenize = clikeComment; - return clikeComment(stream, state); - } - } - - if (ch === lineCommentStartSymbol) { - stream.skipToEnd(); - return "comment"; - } - - if (ch === '"') { - nextUntilUnescaped(stream, '"'); - return "string"; - } - - if (ch === '.') { - stream.eatWhile(/\w/); - cur = stream.current().toLowerCase(); - style = directives[cur]; - return style || null; - } - - if (ch === '=') { - stream.eatWhile(/\w/); - return "tag"; - } - - if (ch === '{') { - return "braket"; - } - - if (ch === '}') { - return "braket"; - } - - if (/\d/.test(ch)) { - if (ch === "0" && stream.eat("x")) { - stream.eatWhile(/[0-9a-fA-F]/); - return "number"; - } - stream.eatWhile(/\d/); - return "number"; - } - - if (/\w/.test(ch)) { - stream.eatWhile(/\w/); - if (stream.eat(":")) { - return 'tag'; - } - cur = stream.current().toLowerCase(); - style = registers[cur]; - return style || null; - } - - for (var i = 0; i < custom.length; i++) { - style = custom[i](ch, stream, state); - if (style) { - return style; - } - } - }, - - lineComment: lineCommentStartSymbol, - blockCommentStart: "/*", - blockCommentEnd: "*/" - }; -}); diff --git a/plugins/codemirror/codemirror/mode/gas/index.html b/plugins/codemirror/codemirror/mode/gas/index.html deleted file mode 100644 index 77f24de..0000000 --- a/plugins/codemirror/codemirror/mode/gas/index.html +++ /dev/null @@ -1,68 +0,0 @@ - - -CodeMirror: Gas mode - - - - - - - - - -
    -

    Gas mode

    -
    - -
    - - - -

    Handles AT&T assembler syntax (more specifically this handles - the GNU Assembler (gas) syntax.) - It takes a single optional configuration parameter: - architecture, which can be one of "ARM", - "ARMv6" or "x86". - Including the parameter adds syntax for the registers and special - directives for the supplied architecture. - -

    MIME types defined: text/x-gas

    -
    diff --git a/plugins/codemirror/codemirror/mode/gfm/gfm.js b/plugins/codemirror/codemirror/mode/gfm/gfm.js deleted file mode 100644 index 1411a93..0000000 --- a/plugins/codemirror/codemirror/mode/gfm/gfm.js +++ /dev/null @@ -1,97 +0,0 @@ -CodeMirror.defineMode("gfm", function(config) { - var codeDepth = 0; - function blankLine(state) { - state.code = false; - return null; - } - var gfmOverlay = { - startState: function() { - return { - code: false, - codeBlock: false, - ateSpace: false - }; - }, - copyState: function(s) { - return { - code: s.code, - codeBlock: s.codeBlock, - ateSpace: s.ateSpace - }; - }, - token: function(stream, state) { - // Hack to prevent formatting override inside code blocks (block and inline) - if (state.codeBlock) { - if (stream.match(/^```/)) { - state.codeBlock = false; - return null; - } - stream.skipToEnd(); - return null; - } - if (stream.sol()) { - state.code = false; - } - if (stream.sol() && stream.match(/^```/)) { - stream.skipToEnd(); - state.codeBlock = true; - return null; - } - // If this block is changed, it may need to be updated in Markdown mode - if (stream.peek() === '`') { - stream.next(); - var before = stream.pos; - stream.eatWhile('`'); - var difference = 1 + stream.pos - before; - if (!state.code) { - codeDepth = difference; - state.code = true; - } else { - if (difference === codeDepth) { // Must be exact - state.code = false; - } - } - return null; - } else if (state.code) { - stream.next(); - return null; - } - // Check if space. If so, links can be formatted later on - if (stream.eatSpace()) { - state.ateSpace = true; - return null; - } - if (stream.sol() || state.ateSpace) { - state.ateSpace = false; - if(stream.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?:[a-f0-9]{7,40}\b)/)) { - // User/Project@SHA - // User@SHA - // SHA - return "link"; - } else if (stream.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/)) { - // User/Project#Num - // User#Num - // #Num - return "link"; - } - } - if (stream.match(/^((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`!()\[\]{};:'".,<>?«»“â€â€˜â€™]))/i) && - stream.string.slice(stream.start - 2, stream.start) != "](") { - // URLs - // Taken from http://daringfireball.net/2010/07/improved_regex_for_matching_urls - // And then (issue #1160) simplified to make it not crash the Chrome Regexp engine - return "link"; - } - stream.next(); - return null; - }, - blankLine: blankLine - }; - CodeMirror.defineMIME("gfmBase", { - name: "markdown", - underscoresBreakWords: false, - taskLists: true, - fencedCodeBlocks: true - }); - return CodeMirror.overlayMode(CodeMirror.getMode(config, "gfmBase"), gfmOverlay); -}, "markdown"); diff --git a/plugins/codemirror/codemirror/mode/gfm/index.html b/plugins/codemirror/codemirror/mode/gfm/index.html deleted file mode 100644 index b71cd5c..0000000 --- a/plugins/codemirror/codemirror/mode/gfm/index.html +++ /dev/null @@ -1,82 +0,0 @@ - - -CodeMirror: GFM mode - - - - - - - - - - - - - - - - -
    -

    GFM mode

    -
    - - - -

    Optionally depends on other modes for properly highlighted code blocks.

    - -

    Parsing/Highlighting Tests: normal, verbose.

    - -
    diff --git a/plugins/codemirror/codemirror/mode/gfm/test.js b/plugins/codemirror/codemirror/mode/gfm/test.js deleted file mode 100644 index 3ccaec5..0000000 --- a/plugins/codemirror/codemirror/mode/gfm/test.js +++ /dev/null @@ -1,112 +0,0 @@ -(function() { - var mode = CodeMirror.getMode({tabSize: 4}, "gfm"); - function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } - - MT("emInWordAsterisk", - "foo[em *bar*]hello"); - - MT("emInWordUnderscore", - "foo_bar_hello"); - - MT("emStrongUnderscore", - "[strong __][em&strong _foo__][em _] bar"); - - MT("fencedCodeBlocks", - "[comment ```]", - "[comment foo]", - "", - "[comment ```]", - "bar"); - - MT("fencedCodeBlockModeSwitching", - "[comment ```javascript]", - "[variable foo]", - "", - "[comment ```]", - "bar"); - - MT("taskListAsterisk", - "[variable-2 * []] foo]", // Invalid; must have space or x between [] - "[variable-2 * [ ]]bar]", // Invalid; must have space after ] - "[variable-2 * [x]]hello]", // Invalid; must have space after ] - "[variable-2 * ][meta [ ]]][variable-2 [world]]]", // Valid; tests reference style links - " [variable-3 * ][property [x]]][variable-3 foo]"); // Valid; can be nested - - MT("taskListPlus", - "[variable-2 + []] foo]", // Invalid; must have space or x between [] - "[variable-2 + [ ]]bar]", // Invalid; must have space after ] - "[variable-2 + [x]]hello]", // Invalid; must have space after ] - "[variable-2 + ][meta [ ]]][variable-2 [world]]]", // Valid; tests reference style links - " [variable-3 + ][property [x]]][variable-3 foo]"); // Valid; can be nested - - MT("taskListDash", - "[variable-2 - []] foo]", // Invalid; must have space or x between [] - "[variable-2 - [ ]]bar]", // Invalid; must have space after ] - "[variable-2 - [x]]hello]", // Invalid; must have space after ] - "[variable-2 - ][meta [ ]]][variable-2 [world]]]", // Valid; tests reference style links - " [variable-3 - ][property [x]]][variable-3 foo]"); // Valid; can be nested - - MT("taskListNumber", - "[variable-2 1. []] foo]", // Invalid; must have space or x between [] - "[variable-2 2. [ ]]bar]", // Invalid; must have space after ] - "[variable-2 3. [x]]hello]", // Invalid; must have space after ] - "[variable-2 4. ][meta [ ]]][variable-2 [world]]]", // Valid; tests reference style links - " [variable-3 1. ][property [x]]][variable-3 foo]"); // Valid; can be nested - - MT("SHA", - "foo [link be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2] bar"); - - MT("shortSHA", - "foo [link be6a8cc] bar"); - - MT("tooShortSHA", - "foo be6a8c bar"); - - MT("longSHA", - "foo be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd22 bar"); - - MT("badSHA", - "foo be6a8cc1c1ecfe9489fb51e4869af15a13fc2cg2 bar"); - - MT("userSHA", - "foo [link bar@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2] hello"); - - MT("userProjectSHA", - "foo [link bar/hello@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2] world"); - - MT("num", - "foo [link #1] bar"); - - MT("badNum", - "foo #1bar hello"); - - MT("userNum", - "foo [link bar#1] hello"); - - MT("userProjectNum", - "foo [link bar/hello#1] world"); - - MT("vanillaLink", - "foo [link http://www.example.com/] bar"); - - MT("vanillaLinkPunctuation", - "foo [link http://www.example.com/]. bar"); - - MT("vanillaLinkExtension", - "foo [link http://www.example.com/index.html] bar"); - - MT("notALink", - "[comment ```css]", - "[tag foo] {[property color][operator :][keyword black];}", - "[comment ```][link http://www.example.com/]"); - - MT("notALink", - "[comment ``foo `bar` http://www.example.com/``] hello"); - - MT("notALink", - "[comment `foo]", - "[link http://www.example.com/]", - "[comment `foo]", - "", - "[link http://www.example.com/]"); -})(); diff --git a/plugins/codemirror/codemirror/mode/gherkin/gherkin.js b/plugins/codemirror/codemirror/mode/gherkin/gherkin.js deleted file mode 100644 index dadb583..0000000 --- a/plugins/codemirror/codemirror/mode/gherkin/gherkin.js +++ /dev/null @@ -1,168 +0,0 @@ -/* -Gherkin mode - http://www.cukes.info/ -Report bugs/issues here: https://github.com/marijnh/CodeMirror/issues -*/ - -// Following Objs from Brackets implementation: https://github.com/tregusti/brackets-gherkin/blob/master/main.js -//var Quotes = { -// SINGLE: 1, -// DOUBLE: 2 -//}; - -//var regex = { -// keywords: /(Feature| {2}(Scenario|In order to|As|I)| {4}(Given|When|Then|And))/ -//}; - -CodeMirror.defineMode("gherkin", function () { - return { - startState: function () { - return { - lineNumber: 0, - tableHeaderLine: null, - allowFeature: true, - allowBackground: false, - allowScenario: false, - allowSteps: false, - allowPlaceholders: false, - inMultilineArgument: false, - inMultilineString: false, - inMultilineTable: false - }; - }, - token: function (stream, state) { - if (stream.sol()) { - state.lineNumber++; - } - stream.eatSpace(); - - // INSIDE OF MULTILINE ARGUMENTS - if (state.inMultilineArgument) { - - // STRING - if (state.inMultilineString) { - if (stream.match('"""')) { - state.inMultilineString = false; - state.inMultilineArgument = false; - } else { - stream.match(/.*/); - } - return "string"; - } - - // TABLE - if (state.inMultilineTable) { - // New table, assume first row is headers - if (state.tableHeaderLine === null) { - state.tableHeaderLine = state.lineNumber; - } - - if (stream.match(/\|\s*/)) { - if (stream.eol()) { - state.inMultilineTable = false; - } - return "bracket"; - } else { - stream.match(/[^\|]*/); - return state.tableHeaderLine === state.lineNumber ? "property" : "string"; - } - } - - // DETECT START - if (stream.match('"""')) { - // String - state.inMultilineString = true; - return "string"; - } else if (stream.match("|")) { - // Table - state.inMultilineTable = true; - return "bracket"; - } else { - // Or abort - state.inMultilineArgument = false; - state.tableHeaderLine = null; - } - - - return null; - } - - // LINE COMMENT - if (stream.match(/#.*/)) { - return "comment"; - - // TAG - } else if (stream.match(/@\S+/)) { - return "def"; - - // FEATURE - } else if (state.allowFeature && stream.match(/Feature:/)) { - state.allowScenario = true; - state.allowBackground = true; - state.allowPlaceholders = false; - state.allowSteps = false; - return "keyword"; - - // BACKGROUND - } else if (state.allowBackground && stream.match("Background:")) { - state.allowPlaceholders = false; - state.allowSteps = true; - state.allowBackground = false; - return "keyword"; - - // SCENARIO OUTLINE - } else if (state.allowScenario && stream.match("Scenario Outline:")) { - state.allowPlaceholders = true; - state.allowSteps = true; - return "keyword"; - - // EXAMPLES - } else if (state.allowScenario && stream.match("Examples:")) { - state.allowPlaceholders = false; - state.allowSteps = true; - state.allowBackground = false; - state.inMultilineArgument = true; - return "keyword"; - - // SCENARIO - } else if (state.allowScenario && stream.match(/Scenario:/)) { - state.allowPlaceholders = false; - state.allowSteps = true; - state.allowBackground = false; - return "keyword"; - - // STEPS - } else if (state.allowSteps && stream.match(/(Given|When|Then|And|But)/)) { - return "keyword"; - - // INLINE STRING - } else if (!state.inMultilineArgument && stream.match(/"/)) { - stream.match(/.*?"/); - return "string"; - - // MULTILINE ARGUMENTS - } else if (state.allowSteps && stream.eat(":")) { - if (stream.match(/\s*$/)) { - state.inMultilineArgument = true; - return "keyword"; - } else { - return null; - } - - } else if (state.allowSteps && stream.match("<")) { - if (stream.match(/.*?>/)) { - return "property"; - } else { - return null; - } - - // Fall through - } else { - stream.eatWhile(/[^":<]/); - } - - return null; - } - }; -}); - -CodeMirror.defineMIME("text/x-feature", "gherkin"); diff --git a/plugins/codemirror/codemirror/mode/gherkin/index.html b/plugins/codemirror/codemirror/mode/gherkin/index.html deleted file mode 100644 index b76877a..0000000 --- a/plugins/codemirror/codemirror/mode/gherkin/index.html +++ /dev/null @@ -1,48 +0,0 @@ - - -CodeMirror: Gherkin mode - - - - - - - - - -
    -

    Gherkin mode

    -
    - - -

    MIME types defined: text/x-feature.

    - -
    diff --git a/plugins/codemirror/codemirror/mode/go/go.js b/plugins/codemirror/codemirror/mode/go/go.js deleted file mode 100644 index 862c091..0000000 --- a/plugins/codemirror/codemirror/mode/go/go.js +++ /dev/null @@ -1,168 +0,0 @@ -CodeMirror.defineMode("go", function(config) { - var indentUnit = config.indentUnit; - - var keywords = { - "break":true, "case":true, "chan":true, "const":true, "continue":true, - "default":true, "defer":true, "else":true, "fallthrough":true, "for":true, - "func":true, "go":true, "goto":true, "if":true, "import":true, - "interface":true, "map":true, "package":true, "range":true, "return":true, - "select":true, "struct":true, "switch":true, "type":true, "var":true, - "bool":true, "byte":true, "complex64":true, "complex128":true, - "float32":true, "float64":true, "int8":true, "int16":true, "int32":true, - "int64":true, "string":true, "uint8":true, "uint16":true, "uint32":true, - "uint64":true, "int":true, "uint":true, "uintptr":true - }; - - var atoms = { - "true":true, "false":true, "iota":true, "nil":true, "append":true, - "cap":true, "close":true, "complex":true, "copy":true, "imag":true, - "len":true, "make":true, "new":true, "panic":true, "print":true, - "println":true, "real":true, "recover":true - }; - - var isOperatorChar = /[+\-*&^%:=<>!|\/]/; - - var curPunc; - - function tokenBase(stream, state) { - var ch = stream.next(); - if (ch == '"' || ch == "'" || ch == "`") { - state.tokenize = tokenString(ch); - return state.tokenize(stream, state); - } - if (/[\d\.]/.test(ch)) { - if (ch == ".") { - stream.match(/^[0-9]+([eE][\-+]?[0-9]+)?/); - } else if (ch == "0") { - stream.match(/^[xX][0-9a-fA-F]+/) || stream.match(/^0[0-7]+/); - } else { - stream.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/); - } - return "number"; - } - if (/[\[\]{}\(\),;\:\.]/.test(ch)) { - curPunc = ch; - return null; - } - if (ch == "/") { - if (stream.eat("*")) { - state.tokenize = tokenComment; - return tokenComment(stream, state); - } - if (stream.eat("/")) { - stream.skipToEnd(); - return "comment"; - } - } - if (isOperatorChar.test(ch)) { - stream.eatWhile(isOperatorChar); - return "operator"; - } - stream.eatWhile(/[\w\$_]/); - var cur = stream.current(); - if (keywords.propertyIsEnumerable(cur)) { - if (cur == "case" || cur == "default") curPunc = "case"; - return "keyword"; - } - if (atoms.propertyIsEnumerable(cur)) return "atom"; - return "variable"; - } - - function tokenString(quote) { - return function(stream, state) { - var escaped = false, next, end = false; - while ((next = stream.next()) != null) { - if (next == quote && !escaped) {end = true; break;} - escaped = !escaped && next == "\\"; - } - if (end || !(escaped || quote == "`")) - state.tokenize = tokenBase; - return "string"; - }; - } - - function tokenComment(stream, state) { - var maybeEnd = false, ch; - while (ch = stream.next()) { - if (ch == "/" && maybeEnd) { - state.tokenize = tokenBase; - break; - } - maybeEnd = (ch == "*"); - } - return "comment"; - } - - function Context(indented, column, type, align, prev) { - this.indented = indented; - this.column = column; - this.type = type; - this.align = align; - this.prev = prev; - } - function pushContext(state, col, type) { - return state.context = new Context(state.indented, col, type, null, state.context); - } - function popContext(state) { - var t = state.context.type; - if (t == ")" || t == "]" || t == "}") - state.indented = state.context.indented; - return state.context = state.context.prev; - } - - // Interface - - return { - startState: function(basecolumn) { - return { - tokenize: null, - context: new Context((basecolumn || 0) - indentUnit, 0, "top", false), - indented: 0, - startOfLine: true - }; - }, - - token: function(stream, state) { - var ctx = state.context; - if (stream.sol()) { - if (ctx.align == null) ctx.align = false; - state.indented = stream.indentation(); - state.startOfLine = true; - if (ctx.type == "case") ctx.type = "}"; - } - if (stream.eatSpace()) return null; - curPunc = null; - var style = (state.tokenize || tokenBase)(stream, state); - if (style == "comment") return style; - if (ctx.align == null) ctx.align = true; - - if (curPunc == "{") pushContext(state, stream.column(), "}"); - else if (curPunc == "[") pushContext(state, stream.column(), "]"); - else if (curPunc == "(") pushContext(state, stream.column(), ")"); - else if (curPunc == "case") ctx.type = "case"; - else if (curPunc == "}" && ctx.type == "}") ctx = popContext(state); - else if (curPunc == ctx.type) popContext(state); - state.startOfLine = false; - return style; - }, - - indent: function(state, textAfter) { - if (state.tokenize != tokenBase && state.tokenize != null) return 0; - var ctx = state.context, firstChar = textAfter && textAfter.charAt(0); - if (ctx.type == "case" && /^(?:case|default)\b/.test(textAfter)) { - state.context.type = "}"; - return ctx.indented; - } - var closing = firstChar == ctx.type; - if (ctx.align) return ctx.column + (closing ? 0 : 1); - else return ctx.indented + (closing ? 0 : indentUnit); - }, - - electricChars: "{}):", - blockCommentStart: "/*", - blockCommentEnd: "*/", - lineComment: "//" - }; -}); - -CodeMirror.defineMIME("text/x-go", "go"); diff --git a/plugins/codemirror/codemirror/mode/go/index.html b/plugins/codemirror/codemirror/mode/go/index.html deleted file mode 100644 index 3673fa0..0000000 --- a/plugins/codemirror/codemirror/mode/go/index.html +++ /dev/null @@ -1,85 +0,0 @@ - - -CodeMirror: Go mode - - - - - - - - - - - -
    -

    Go mode

    -
    - - - -

    MIME type: text/x-go

    -
    diff --git a/plugins/codemirror/codemirror/mode/groovy/groovy.js b/plugins/codemirror/codemirror/mode/groovy/groovy.js deleted file mode 100644 index 6800e0a..0000000 --- a/plugins/codemirror/codemirror/mode/groovy/groovy.js +++ /dev/null @@ -1,211 +0,0 @@ -CodeMirror.defineMode("groovy", function(config) { - function words(str) { - var obj = {}, words = str.split(" "); - for (var i = 0; i < words.length; ++i) obj[words[i]] = true; - return obj; - } - var keywords = words( - "abstract as assert boolean break byte case catch char class const continue def default " + - "do double else enum extends final finally float for goto if implements import in " + - "instanceof int interface long native new package private protected public return " + - "short static strictfp super switch synchronized threadsafe throw throws transient " + - "try void volatile while"); - var blockKeywords = words("catch class do else finally for if switch try while enum interface def"); - var atoms = words("null true false this"); - - var curPunc; - function tokenBase(stream, state) { - var ch = stream.next(); - if (ch == '"' || ch == "'") { - return startString(ch, stream, state); - } - if (/[\[\]{}\(\),;\:\.]/.test(ch)) { - curPunc = ch; - return null; - } - if (/\d/.test(ch)) { - stream.eatWhile(/[\w\.]/); - if (stream.eat(/eE/)) { stream.eat(/\+\-/); stream.eatWhile(/\d/); } - return "number"; - } - if (ch == "/") { - if (stream.eat("*")) { - state.tokenize.push(tokenComment); - return tokenComment(stream, state); - } - if (stream.eat("/")) { - stream.skipToEnd(); - return "comment"; - } - if (expectExpression(state.lastToken)) { - return startString(ch, stream, state); - } - } - if (ch == "-" && stream.eat(">")) { - curPunc = "->"; - return null; - } - if (/[+\-*&%=<>!?|\/~]/.test(ch)) { - stream.eatWhile(/[+\-*&%=<>|~]/); - return "operator"; - } - stream.eatWhile(/[\w\$_]/); - if (ch == "@") { stream.eatWhile(/[\w\$_\.]/); return "meta"; } - if (state.lastToken == ".") return "property"; - if (stream.eat(":")) { curPunc = "proplabel"; return "property"; } - var cur = stream.current(); - if (atoms.propertyIsEnumerable(cur)) { return "atom"; } - if (keywords.propertyIsEnumerable(cur)) { - if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement"; - return "keyword"; - } - return "variable"; - } - tokenBase.isBase = true; - - function startString(quote, stream, state) { - var tripleQuoted = false; - if (quote != "/" && stream.eat(quote)) { - if (stream.eat(quote)) tripleQuoted = true; - else return "string"; - } - function t(stream, state) { - var escaped = false, next, end = !tripleQuoted; - while ((next = stream.next()) != null) { - if (next == quote && !escaped) { - if (!tripleQuoted) { break; } - if (stream.match(quote + quote)) { end = true; break; } - } - if (quote == '"' && next == "$" && !escaped && stream.eat("{")) { - state.tokenize.push(tokenBaseUntilBrace()); - return "string"; - } - escaped = !escaped && next == "\\"; - } - if (end) state.tokenize.pop(); - return "string"; - } - state.tokenize.push(t); - return t(stream, state); - } - - function tokenBaseUntilBrace() { - var depth = 1; - function t(stream, state) { - if (stream.peek() == "}") { - depth--; - if (depth == 0) { - state.tokenize.pop(); - return state.tokenize[state.tokenize.length-1](stream, state); - } - } else if (stream.peek() == "{") { - depth++; - } - return tokenBase(stream, state); - } - t.isBase = true; - return t; - } - - function tokenComment(stream, state) { - var maybeEnd = false, ch; - while (ch = stream.next()) { - if (ch == "/" && maybeEnd) { - state.tokenize.pop(); - break; - } - maybeEnd = (ch == "*"); - } - return "comment"; - } - - function expectExpression(last) { - return !last || last == "operator" || last == "->" || /[\.\[\{\(,;:]/.test(last) || - last == "newstatement" || last == "keyword" || last == "proplabel"; - } - - function Context(indented, column, type, align, prev) { - this.indented = indented; - this.column = column; - this.type = type; - this.align = align; - this.prev = prev; - } - function pushContext(state, col, type) { - return state.context = new Context(state.indented, col, type, null, state.context); - } - function popContext(state) { - var t = state.context.type; - if (t == ")" || t == "]" || t == "}") - state.indented = state.context.indented; - return state.context = state.context.prev; - } - - // Interface - - return { - startState: function(basecolumn) { - return { - tokenize: [tokenBase], - context: new Context((basecolumn || 0) - config.indentUnit, 0, "top", false), - indented: 0, - startOfLine: true, - lastToken: null - }; - }, - - token: function(stream, state) { - var ctx = state.context; - if (stream.sol()) { - if (ctx.align == null) ctx.align = false; - state.indented = stream.indentation(); - state.startOfLine = true; - // Automatic semicolon insertion - if (ctx.type == "statement" && !expectExpression(state.lastToken)) { - popContext(state); ctx = state.context; - } - } - if (stream.eatSpace()) return null; - curPunc = null; - var style = state.tokenize[state.tokenize.length-1](stream, state); - if (style == "comment") return style; - if (ctx.align == null) ctx.align = true; - - if ((curPunc == ";" || curPunc == ":") && ctx.type == "statement") popContext(state); - // Handle indentation for {x -> \n ... } - else if (curPunc == "->" && ctx.type == "statement" && ctx.prev.type == "}") { - popContext(state); - state.context.align = false; - } - else if (curPunc == "{") pushContext(state, stream.column(), "}"); - else if (curPunc == "[") pushContext(state, stream.column(), "]"); - else if (curPunc == "(") pushContext(state, stream.column(), ")"); - else if (curPunc == "}") { - while (ctx.type == "statement") ctx = popContext(state); - if (ctx.type == "}") ctx = popContext(state); - while (ctx.type == "statement") ctx = popContext(state); - } - else if (curPunc == ctx.type) popContext(state); - else if (ctx.type == "}" || ctx.type == "top" || (ctx.type == "statement" && curPunc == "newstatement")) - pushContext(state, stream.column(), "statement"); - state.startOfLine = false; - state.lastToken = curPunc || style; - return style; - }, - - indent: function(state, textAfter) { - if (!state.tokenize[state.tokenize.length-1].isBase) return 0; - var firstChar = textAfter && textAfter.charAt(0), ctx = state.context; - if (ctx.type == "statement" && !expectExpression(state.lastToken)) ctx = ctx.prev; - var closing = firstChar == ctx.type; - if (ctx.type == "statement") return ctx.indented + (firstChar == "{" ? 0 : config.indentUnit); - else if (ctx.align) return ctx.column + (closing ? 0 : 1); - else return ctx.indented + (closing ? 0 : config.indentUnit); - }, - - electricChars: "{}", - fold: "brace" - }; -}); - -CodeMirror.defineMIME("text/x-groovy", "groovy"); diff --git a/plugins/codemirror/codemirror/mode/groovy/index.html b/plugins/codemirror/codemirror/mode/groovy/index.html deleted file mode 100644 index f5efdf7..0000000 --- a/plugins/codemirror/codemirror/mode/groovy/index.html +++ /dev/null @@ -1,84 +0,0 @@ - - -CodeMirror: Groovy mode - - - - - - - - - - -
    -

    Groovy mode

    -
    - - - -

    MIME types defined: text/x-groovy

    -
    diff --git a/plugins/codemirror/codemirror/mode/haml/haml.js b/plugins/codemirror/codemirror/mode/haml/haml.js deleted file mode 100644 index 793308f..0000000 --- a/plugins/codemirror/codemirror/mode/haml/haml.js +++ /dev/null @@ -1,153 +0,0 @@ -(function() { - "use strict"; - - // full haml mode. This handled embeded ruby and html fragments too - CodeMirror.defineMode("haml", function(config) { - var htmlMode = CodeMirror.getMode(config, {name: "htmlmixed"}); - var rubyMode = CodeMirror.getMode(config, "ruby"); - - function rubyInQuote(endQuote) { - return function(stream, state) { - var ch = stream.peek(); - if (ch == endQuote && state.rubyState.tokenize.length == 1) { - // step out of ruby context as it seems to complete processing all the braces - stream.next(); - state.tokenize = html; - return "closeAttributeTag"; - } else { - return ruby(stream, state); - } - }; - } - - function ruby(stream, state) { - if (stream.match("-#")) { - stream.skipToEnd(); - return "comment"; - } - return rubyMode.token(stream, state.rubyState); - } - - function html(stream, state) { - var ch = stream.peek(); - - // handle haml declarations. All declarations that cant be handled here - // will be passed to html mode - if (state.previousToken.style == "comment" ) { - if (state.indented > state.previousToken.indented) { - stream.skipToEnd(); - return "commentLine"; - } - } - - if (state.startOfLine) { - if (ch == "!" && stream.match("!!")) { - stream.skipToEnd(); - return "tag"; - } else if (stream.match(/^%[\w:#\.]+=/)) { - state.tokenize = ruby; - return "hamlTag"; - } else if (stream.match(/^%[\w:]+/)) { - return "hamlTag"; - } else if (ch == "/" ) { - stream.skipToEnd(); - return "comment"; - } - } - - if (state.startOfLine || state.previousToken.style == "hamlTag") { - if ( ch == "#" || ch == ".") { - stream.match(/[\w-#\.]*/); - return "hamlAttribute"; - } - } - - // donot handle --> as valid ruby, make it HTML close comment instead - if (state.startOfLine && !stream.match("-->", false) && (ch == "=" || ch == "-" )) { - state.tokenize = ruby; - return null; - } - - if (state.previousToken.style == "hamlTag" || - state.previousToken.style == "closeAttributeTag" || - state.previousToken.style == "hamlAttribute") { - if (ch == "(") { - state.tokenize = rubyInQuote(")"); - return null; - } else if (ch == "{") { - state.tokenize = rubyInQuote("}"); - return null; - } - } - - return htmlMode.token(stream, state.htmlState); - } - - return { - // default to html mode - startState: function() { - var htmlState = htmlMode.startState(); - var rubyState = rubyMode.startState(); - return { - htmlState: htmlState, - rubyState: rubyState, - indented: 0, - previousToken: { style: null, indented: 0}, - tokenize: html - }; - }, - - copyState: function(state) { - return { - htmlState : CodeMirror.copyState(htmlMode, state.htmlState), - rubyState: CodeMirror.copyState(rubyMode, state.rubyState), - indented: state.indented, - previousToken: state.previousToken, - tokenize: state.tokenize - }; - }, - - token: function(stream, state) { - if (stream.sol()) { - state.indented = stream.indentation(); - state.startOfLine = true; - } - if (stream.eatSpace()) return null; - var style = state.tokenize(stream, state); - state.startOfLine = false; - // dont record comment line as we only want to measure comment line with - // the opening comment block - if (style && style != "commentLine") { - state.previousToken = { style: style, indented: state.indented }; - } - // if current state is ruby and the previous token is not `,` reset the - // tokenize to html - if (stream.eol() && state.tokenize == ruby) { - stream.backUp(1); - var ch = stream.peek(); - stream.next(); - if (ch && ch != ",") { - state.tokenize = html; - } - } - // reprocess some of the specific style tag when finish setting previousToken - if (style == "hamlTag") { - style = "tag"; - } else if (style == "commentLine") { - style = "comment"; - } else if (style == "hamlAttribute") { - style = "attribute"; - } else if (style == "closeAttributeTag") { - style = null; - } - return style; - }, - - indent: function(state) { - return state.indented; - } - }; - }, "htmlmixed", "ruby"); - - CodeMirror.defineMIME("text/x-haml", "haml"); -})(); diff --git a/plugins/codemirror/codemirror/mode/haml/index.html b/plugins/codemirror/codemirror/mode/haml/index.html deleted file mode 100644 index a737875..0000000 --- a/plugins/codemirror/codemirror/mode/haml/index.html +++ /dev/null @@ -1,79 +0,0 @@ - - -CodeMirror: HAML mode - - - - - - - - - - - - - -
    -

    HAML mode

    -
    - - -

    MIME types defined: text/x-haml.

    - -

    Parsing/Highlighting Tests: normal, verbose.

    - -
    diff --git a/plugins/codemirror/codemirror/mode/haml/test.js b/plugins/codemirror/codemirror/mode/haml/test.js deleted file mode 100644 index b7178d4..0000000 --- a/plugins/codemirror/codemirror/mode/haml/test.js +++ /dev/null @@ -1,94 +0,0 @@ -(function() { - var mode = CodeMirror.getMode({tabSize: 4}, "haml"); - function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } - - // Requires at least one media query - MT("elementName", - "[tag %h1] Hey There"); - - MT("oneElementPerLine", - "[tag %h1] Hey There %h2"); - - MT("idSelector", - "[tag %h1][attribute #test] Hey There"); - - MT("classSelector", - "[tag %h1][attribute .hello] Hey There"); - - MT("docType", - "[tag !!! XML]"); - - MT("comment", - "[comment / Hello WORLD]"); - - MT("notComment", - "[tag %h1] This is not a / comment "); - - MT("attributes", - "[tag %a]([variable title][operator =][string \"test\"]){[atom :title] [operator =>] [string \"test\"]}"); - - MT("htmlCode", - "[tag

    ]Title[tag

    ]"); - - MT("rubyBlock", - "[operator =][variable-2 @item]"); - - MT("selectorRubyBlock", - "[tag %a.selector=] [variable-2 @item]"); - - MT("nestedRubyBlock", - "[tag %a]", - " [operator =][variable puts] [string \"test\"]"); - - MT("multilinePlaintext", - "[tag %p]", - " Hello,", - " World"); - - MT("multilineRuby", - "[tag %p]", - " [comment -# this is a comment]", - " [comment and this is a comment too]", - " Date/Time", - " [operator -] [variable now] [operator =] [tag DateTime][operator .][variable now]", - " [tag %strong=] [variable now]", - " [operator -] [keyword if] [variable now] [operator >] [tag DateTime][operator .][variable parse]([string \"December 31, 2006\"])", - " [operator =][string \"Happy\"]", - " [operator =][string \"Belated\"]", - " [operator =][string \"Birthday\"]"); - - MT("multilineComment", - "[comment /]", - " [comment Multiline]", - " [comment Comment]"); - - MT("hamlComment", - "[comment -# this is a comment]"); - - MT("multilineHamlComment", - "[comment -# this is a comment]", - " [comment and this is a comment too]"); - - MT("multilineHTMLComment", - "[comment ]"); - - MT("hamlAfterRubyTag", - "[attribute .block]", - " [tag %strong=] [variable now]", - " [attribute .test]", - " [operator =][variable now]", - " [attribute .right]"); - - MT("stretchedRuby", - "[operator =] [variable puts] [string \"Hello\"],", - " [string \"World\"]"); - - MT("interpolationInHashAttribute", - //"[tag %div]{[atom :id] [operator =>] [string \"#{][variable test][string }_#{][variable ting][string }\"]} test"); - "[tag %div]{[atom :id] [operator =>] [string \"#{][variable test][string }_#{][variable ting][string }\"]} test"); - - MT("interpolationInHTMLAttribute", - "[tag %div]([variable title][operator =][string \"#{][variable test][string }_#{][variable ting]()[string }\"]) Test"); -})(); diff --git a/plugins/codemirror/codemirror/mode/haskell/haskell.js b/plugins/codemirror/codemirror/mode/haskell/haskell.js deleted file mode 100644 index 68a6317..0000000 --- a/plugins/codemirror/codemirror/mode/haskell/haskell.js +++ /dev/null @@ -1,250 +0,0 @@ -CodeMirror.defineMode("haskell", function(_config, modeConfig) { - - function switchState(source, setState, f) { - setState(f); - return f(source, setState); - } - - // These should all be Unicode extended, as per the Haskell 2010 report - var smallRE = /[a-z_]/; - var largeRE = /[A-Z]/; - var digitRE = /[0-9]/; - var hexitRE = /[0-9A-Fa-f]/; - var octitRE = /[0-7]/; - var idRE = /[a-z_A-Z0-9']/; - var symbolRE = /[-!#$%&*+.\/<=>?@\\^|~:]/; - var specialRE = /[(),;[\]`{}]/; - var whiteCharRE = /[ \t\v\f]/; // newlines are handled in tokenizer - - function normal(source, setState) { - if (source.eatWhile(whiteCharRE)) { - return null; - } - - var ch = source.next(); - if (specialRE.test(ch)) { - if (ch == '{' && source.eat('-')) { - var t = "comment"; - if (source.eat('#')) { - t = "meta"; - } - return switchState(source, setState, ncomment(t, 1)); - } - return null; - } - - if (ch == '\'') { - if (source.eat('\\')) { - source.next(); // should handle other escapes here - } - else { - source.next(); - } - if (source.eat('\'')) { - return "string"; - } - return "error"; - } - - if (ch == '"') { - return switchState(source, setState, stringLiteral); - } - - if (largeRE.test(ch)) { - source.eatWhile(idRE); - if (source.eat('.')) { - return "qualifier"; - } - return "variable-2"; - } - - if (smallRE.test(ch)) { - source.eatWhile(idRE); - return "variable"; - } - - if (digitRE.test(ch)) { - if (ch == '0') { - if (source.eat(/[xX]/)) { - source.eatWhile(hexitRE); // should require at least 1 - return "integer"; - } - if (source.eat(/[oO]/)) { - source.eatWhile(octitRE); // should require at least 1 - return "number"; - } - } - source.eatWhile(digitRE); - var t = "number"; - if (source.eat('.')) { - t = "number"; - source.eatWhile(digitRE); // should require at least 1 - } - if (source.eat(/[eE]/)) { - t = "number"; - source.eat(/[-+]/); - source.eatWhile(digitRE); // should require at least 1 - } - return t; - } - - if (symbolRE.test(ch)) { - if (ch == '-' && source.eat(/-/)) { - source.eatWhile(/-/); - if (!source.eat(symbolRE)) { - source.skipToEnd(); - return "comment"; - } - } - var t = "variable"; - if (ch == ':') { - t = "variable-2"; - } - source.eatWhile(symbolRE); - return t; - } - - return "error"; - } - - function ncomment(type, nest) { - if (nest == 0) { - return normal; - } - return function(source, setState) { - var currNest = nest; - while (!source.eol()) { - var ch = source.next(); - if (ch == '{' && source.eat('-')) { - ++currNest; - } - else if (ch == '-' && source.eat('}')) { - --currNest; - if (currNest == 0) { - setState(normal); - return type; - } - } - } - setState(ncomment(type, currNest)); - return type; - }; - } - - function stringLiteral(source, setState) { - while (!source.eol()) { - var ch = source.next(); - if (ch == '"') { - setState(normal); - return "string"; - } - if (ch == '\\') { - if (source.eol() || source.eat(whiteCharRE)) { - setState(stringGap); - return "string"; - } - if (source.eat('&')) { - } - else { - source.next(); // should handle other escapes here - } - } - } - setState(normal); - return "error"; - } - - function stringGap(source, setState) { - if (source.eat('\\')) { - return switchState(source, setState, stringLiteral); - } - source.next(); - setState(normal); - return "error"; - } - - - var wellKnownWords = (function() { - var wkw = {}; - function setType(t) { - return function () { - for (var i = 0; i < arguments.length; i++) - wkw[arguments[i]] = t; - }; - } - - setType("keyword")( - "case", "class", "data", "default", "deriving", "do", "else", "foreign", - "if", "import", "in", "infix", "infixl", "infixr", "instance", "let", - "module", "newtype", "of", "then", "type", "where", "_"); - - setType("keyword")( - "\.\.", ":", "::", "=", "\\", "\"", "<-", "->", "@", "~", "=>"); - - setType("builtin")( - "!!", "$!", "$", "&&", "+", "++", "-", ".", "/", "/=", "<", "<=", "=<<", - "==", ">", ">=", ">>", ">>=", "^", "^^", "||", "*", "**"); - - setType("builtin")( - "Bool", "Bounded", "Char", "Double", "EQ", "Either", "Enum", "Eq", - "False", "FilePath", "Float", "Floating", "Fractional", "Functor", "GT", - "IO", "IOError", "Int", "Integer", "Integral", "Just", "LT", "Left", - "Maybe", "Monad", "Nothing", "Num", "Ord", "Ordering", "Rational", "Read", - "ReadS", "Real", "RealFloat", "RealFrac", "Right", "Show", "ShowS", - "String", "True"); - - setType("builtin")( - "abs", "acos", "acosh", "all", "and", "any", "appendFile", "asTypeOf", - "asin", "asinh", "atan", "atan2", "atanh", "break", "catch", "ceiling", - "compare", "concat", "concatMap", "const", "cos", "cosh", "curry", - "cycle", "decodeFloat", "div", "divMod", "drop", "dropWhile", "either", - "elem", "encodeFloat", "enumFrom", "enumFromThen", "enumFromThenTo", - "enumFromTo", "error", "even", "exp", "exponent", "fail", "filter", - "flip", "floatDigits", "floatRadix", "floatRange", "floor", "fmap", - "foldl", "foldl1", "foldr", "foldr1", "fromEnum", "fromInteger", - "fromIntegral", "fromRational", "fst", "gcd", "getChar", "getContents", - "getLine", "head", "id", "init", "interact", "ioError", "isDenormalized", - "isIEEE", "isInfinite", "isNaN", "isNegativeZero", "iterate", "last", - "lcm", "length", "lex", "lines", "log", "logBase", "lookup", "map", - "mapM", "mapM_", "max", "maxBound", "maximum", "maybe", "min", "minBound", - "minimum", "mod", "negate", "not", "notElem", "null", "odd", "or", - "otherwise", "pi", "pred", "print", "product", "properFraction", - "putChar", "putStr", "putStrLn", "quot", "quotRem", "read", "readFile", - "readIO", "readList", "readLn", "readParen", "reads", "readsPrec", - "realToFrac", "recip", "rem", "repeat", "replicate", "return", "reverse", - "round", "scaleFloat", "scanl", "scanl1", "scanr", "scanr1", "seq", - "sequence", "sequence_", "show", "showChar", "showList", "showParen", - "showString", "shows", "showsPrec", "significand", "signum", "sin", - "sinh", "snd", "span", "splitAt", "sqrt", "subtract", "succ", "sum", - "tail", "take", "takeWhile", "tan", "tanh", "toEnum", "toInteger", - "toRational", "truncate", "uncurry", "undefined", "unlines", "until", - "unwords", "unzip", "unzip3", "userError", "words", "writeFile", "zip", - "zip3", "zipWith", "zipWith3"); - - var override = modeConfig.overrideKeywords; - if (override) for (var word in override) if (override.hasOwnProperty(word)) - wkw[word] = override[word]; - - return wkw; - })(); - - - - return { - startState: function () { return { f: normal }; }, - copyState: function (s) { return { f: s.f }; }, - - token: function(stream, state) { - var t = state.f(stream, function(s) { state.f = s; }); - var w = stream.current(); - return wellKnownWords.hasOwnProperty(w) ? wellKnownWords[w] : t; - }, - - blockCommentStart: "{-", - blockCommentEnd: "-}", - lineComment: "--" - }; - -}); - -CodeMirror.defineMIME("text/x-haskell", "haskell"); diff --git a/plugins/codemirror/codemirror/mode/haskell/index.html b/plugins/codemirror/codemirror/mode/haskell/index.html deleted file mode 100644 index 056b01d..0000000 --- a/plugins/codemirror/codemirror/mode/haskell/index.html +++ /dev/null @@ -1,73 +0,0 @@ - - -CodeMirror: Haskell mode - - - - - - - - - - - -
    -

    Haskell mode

    -
    - - - -

    MIME types defined: text/x-haskell.

    -
    diff --git a/plugins/codemirror/codemirror/mode/haxe/haxe.js b/plugins/codemirror/codemirror/mode/haxe/haxe.js deleted file mode 100644 index cb761ad..0000000 --- a/plugins/codemirror/codemirror/mode/haxe/haxe.js +++ /dev/null @@ -1,429 +0,0 @@ -CodeMirror.defineMode("haxe", function(config, parserConfig) { - var indentUnit = config.indentUnit; - - // Tokenizer - - var keywords = function(){ - function kw(type) {return {type: type, style: "keyword"};} - var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c"); - var operator = kw("operator"), atom = {type: "atom", style: "atom"}, attribute = {type:"attribute", style: "attribute"}; - var type = kw("typedef"); - return { - "if": A, "while": A, "else": B, "do": B, "try": B, - "return": C, "break": C, "continue": C, "new": C, "throw": C, - "var": kw("var"), "inline":attribute, "static": attribute, "using":kw("import"), - "public": attribute, "private": attribute, "cast": kw("cast"), "import": kw("import"), "macro": kw("macro"), - "function": kw("function"), "catch": kw("catch"), "untyped": kw("untyped"), "callback": kw("cb"), - "for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"), - "in": operator, "never": kw("property_access"), "trace":kw("trace"), - "class": type, "enum":type, "interface":type, "typedef":type, "extends":type, "implements":type, "dynamic":type, - "true": atom, "false": atom, "null": atom - }; - }(); - - var isOperatorChar = /[+\-*&%=<>!?|]/; - - function chain(stream, state, f) { - state.tokenize = f; - return f(stream, state); - } - - function nextUntilUnescaped(stream, end) { - var escaped = false, next; - while ((next = stream.next()) != null) { - if (next == end && !escaped) - return false; - escaped = !escaped && next == "\\"; - } - return escaped; - } - - // Used as scratch variables to communicate multiple values without - // consing up tons of objects. - var type, content; - function ret(tp, style, cont) { - type = tp; content = cont; - return style; - } - - function haxeTokenBase(stream, state) { - var ch = stream.next(); - if (ch == '"' || ch == "'") - return chain(stream, state, haxeTokenString(ch)); - else if (/[\[\]{}\(\),;\:\.]/.test(ch)) - return ret(ch); - else if (ch == "0" && stream.eat(/x/i)) { - stream.eatWhile(/[\da-f]/i); - return ret("number", "number"); - } - else if (/\d/.test(ch) || ch == "-" && stream.eat(/\d/)) { - stream.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/); - return ret("number", "number"); - } - else if (state.reAllowed && (ch == "~" && stream.eat(/\//))) { - nextUntilUnescaped(stream, "/"); - stream.eatWhile(/[gimsu]/); - return ret("regexp", "string-2"); - } - else if (ch == "/") { - if (stream.eat("*")) { - return chain(stream, state, haxeTokenComment); - } - else if (stream.eat("/")) { - stream.skipToEnd(); - return ret("comment", "comment"); - } - else { - stream.eatWhile(isOperatorChar); - return ret("operator", null, stream.current()); - } - } - else if (ch == "#") { - stream.skipToEnd(); - return ret("conditional", "meta"); - } - else if (ch == "@") { - stream.eat(/:/); - stream.eatWhile(/[\w_]/); - return ret ("metadata", "meta"); - } - else if (isOperatorChar.test(ch)) { - stream.eatWhile(isOperatorChar); - return ret("operator", null, stream.current()); - } - else { - var word; - if(/[A-Z]/.test(ch)) - { - stream.eatWhile(/[\w_<>]/); - word = stream.current(); - return ret("type", "variable-3", word); - } - else - { - stream.eatWhile(/[\w_]/); - var word = stream.current(), known = keywords.propertyIsEnumerable(word) && keywords[word]; - return (known && state.kwAllowed) ? ret(known.type, known.style, word) : - ret("variable", "variable", word); - } - } - } - - function haxeTokenString(quote) { - return function(stream, state) { - if (!nextUntilUnescaped(stream, quote)) - state.tokenize = haxeTokenBase; - return ret("string", "string"); - }; - } - - function haxeTokenComment(stream, state) { - var maybeEnd = false, ch; - while (ch = stream.next()) { - if (ch == "/" && maybeEnd) { - state.tokenize = haxeTokenBase; - break; - } - maybeEnd = (ch == "*"); - } - return ret("comment", "comment"); - } - - // Parser - - var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true, "regexp": true}; - - function HaxeLexical(indented, column, type, align, prev, info) { - this.indented = indented; - this.column = column; - this.type = type; - this.prev = prev; - this.info = info; - if (align != null) this.align = align; - } - - function inScope(state, varname) { - for (var v = state.localVars; v; v = v.next) - if (v.name == varname) return true; - } - - function parseHaxe(state, style, type, content, stream) { - var cc = state.cc; - // Communicate our context to the combinators. - // (Less wasteful than consing up a hundred closures on every call.) - cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; - - if (!state.lexical.hasOwnProperty("align")) - state.lexical.align = true; - - while(true) { - var combinator = cc.length ? cc.pop() : statement; - if (combinator(type, content)) { - while(cc.length && cc[cc.length - 1].lex) - cc.pop()(); - if (cx.marked) return cx.marked; - if (type == "variable" && inScope(state, content)) return "variable-2"; - if (type == "variable" && imported(state, content)) return "variable-3"; - return style; - } - } - } - - function imported(state, typename) - { - if (/[a-z]/.test(typename.charAt(0))) - return false; - var len = state.importedtypes.length; - for (var i = 0; i= 0; i--) cx.cc.push(arguments[i]); - } - function cont() { - pass.apply(null, arguments); - return true; - } - function register(varname) { - var state = cx.state; - if (state.context) { - cx.marked = "def"; - for (var v = state.localVars; v; v = v.next) - if (v.name == varname) return; - state.localVars = {name: varname, next: state.localVars}; - } - } - - // Combinators - - var defaultVars = {name: "this", next: null}; - function pushcontext() { - if (!cx.state.context) cx.state.localVars = defaultVars; - cx.state.context = {prev: cx.state.context, vars: cx.state.localVars}; - } - function popcontext() { - cx.state.localVars = cx.state.context.vars; - cx.state.context = cx.state.context.prev; - } - function pushlex(type, info) { - var result = function() { - var state = cx.state; - state.lexical = new HaxeLexical(state.indented, cx.stream.column(), type, null, state.lexical, info); - }; - result.lex = true; - return result; - } - function poplex() { - var state = cx.state; - if (state.lexical.prev) { - if (state.lexical.type == ")") - state.indented = state.lexical.indented; - state.lexical = state.lexical.prev; - } - } - poplex.lex = true; - - function expect(wanted) { - return function(type) { - if (type == wanted) return cont(); - else if (wanted == ";") return pass(); - else return cont(arguments.callee); - }; - } - - function statement(type) { - if (type == "@") return cont(metadef); - if (type == "var") return cont(pushlex("vardef"), vardef1, expect(";"), poplex); - if (type == "keyword a") return cont(pushlex("form"), expression, statement, poplex); - if (type == "keyword b") return cont(pushlex("form"), statement, poplex); - if (type == "{") return cont(pushlex("}"), pushcontext, block, poplex, popcontext); - if (type == ";") return cont(); - if (type == "attribute") return cont(maybeattribute); - if (type == "function") return cont(functiondef); - if (type == "for") return cont(pushlex("form"), expect("("), pushlex(")"), forspec1, expect(")"), - poplex, statement, poplex); - if (type == "variable") return cont(pushlex("stat"), maybelabel); - if (type == "switch") return cont(pushlex("form"), expression, pushlex("}", "switch"), expect("{"), - block, poplex, poplex); - if (type == "case") return cont(expression, expect(":")); - if (type == "default") return cont(expect(":")); - if (type == "catch") return cont(pushlex("form"), pushcontext, expect("("), funarg, expect(")"), - statement, poplex, popcontext); - if (type == "import") return cont(importdef, expect(";")); - if (type == "typedef") return cont(typedef); - return pass(pushlex("stat"), expression, expect(";"), poplex); - } - function expression(type) { - if (atomicTypes.hasOwnProperty(type)) return cont(maybeoperator); - if (type == "function") return cont(functiondef); - if (type == "keyword c") return cont(maybeexpression); - if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeoperator); - if (type == "operator") return cont(expression); - if (type == "[") return cont(pushlex("]"), commasep(expression, "]"), poplex, maybeoperator); - if (type == "{") return cont(pushlex("}"), commasep(objprop, "}"), poplex, maybeoperator); - return cont(); - } - function maybeexpression(type) { - if (type.match(/[;\}\)\],]/)) return pass(); - return pass(expression); - } - - function maybeoperator(type, value) { - if (type == "operator" && /\+\+|--/.test(value)) return cont(maybeoperator); - if (type == "operator" || type == ":") return cont(expression); - if (type == ";") return; - if (type == "(") return cont(pushlex(")"), commasep(expression, ")"), poplex, maybeoperator); - if (type == ".") return cont(property, maybeoperator); - if (type == "[") return cont(pushlex("]"), expression, expect("]"), poplex, maybeoperator); - } - - function maybeattribute(type) { - if (type == "attribute") return cont(maybeattribute); - if (type == "function") return cont(functiondef); - if (type == "var") return cont(vardef1); - } - - function metadef(type) { - if(type == ":") return cont(metadef); - if(type == "variable") return cont(metadef); - if(type == "(") return cont(pushlex(")"), commasep(metaargs, ")"), poplex, statement); - } - function metaargs(type) { - if(type == "variable") return cont(); - } - - function importdef (type, value) { - if(type == "variable" && /[A-Z]/.test(value.charAt(0))) { registerimport(value); return cont(); } - else if(type == "variable" || type == "property" || type == ".") return cont(importdef); - } - - function typedef (type, value) - { - if(type == "variable" && /[A-Z]/.test(value.charAt(0))) { registerimport(value); return cont(); } - } - - function maybelabel(type) { - if (type == ":") return cont(poplex, statement); - return pass(maybeoperator, expect(";"), poplex); - } - function property(type) { - if (type == "variable") {cx.marked = "property"; return cont();} - } - function objprop(type) { - if (type == "variable") cx.marked = "property"; - if (atomicTypes.hasOwnProperty(type)) return cont(expect(":"), expression); - } - function commasep(what, end) { - function proceed(type) { - if (type == ",") return cont(what, proceed); - if (type == end) return cont(); - return cont(expect(end)); - } - return function(type) { - if (type == end) return cont(); - else return pass(what, proceed); - }; - } - function block(type) { - if (type == "}") return cont(); - return pass(statement, block); - } - function vardef1(type, value) { - if (type == "variable"){register(value); return cont(typeuse, vardef2);} - return cont(); - } - function vardef2(type, value) { - if (value == "=") return cont(expression, vardef2); - if (type == ",") return cont(vardef1); - } - function forspec1(type, value) { - if (type == "variable") { - register(value); - } - return cont(pushlex(")"), pushcontext, forin, expression, poplex, statement, popcontext); - } - function forin(_type, value) { - if (value == "in") return cont(); - } - function functiondef(type, value) { - if (type == "variable") {register(value); return cont(functiondef);} - if (value == "new") return cont(functiondef); - if (type == "(") return cont(pushlex(")"), pushcontext, commasep(funarg, ")"), poplex, typeuse, statement, popcontext); - } - function typeuse(type) { - if(type == ":") return cont(typestring); - } - function typestring(type) { - if(type == "type") return cont(); - if(type == "variable") return cont(); - if(type == "{") return cont(pushlex("}"), commasep(typeprop, "}"), poplex); - } - function typeprop(type) { - if(type == "variable") return cont(typeuse); - } - function funarg(type, value) { - if (type == "variable") {register(value); return cont(typeuse);} - } - - // Interface - - return { - startState: function(basecolumn) { - var defaulttypes = ["Int", "Float", "String", "Void", "Std", "Bool", "Dynamic", "Array"]; - return { - tokenize: haxeTokenBase, - reAllowed: true, - kwAllowed: true, - cc: [], - lexical: new HaxeLexical((basecolumn || 0) - indentUnit, 0, "block", false), - localVars: parserConfig.localVars, - importedtypes: defaulttypes, - context: parserConfig.localVars && {vars: parserConfig.localVars}, - indented: 0 - }; - }, - - token: function(stream, state) { - if (stream.sol()) { - if (!state.lexical.hasOwnProperty("align")) - state.lexical.align = false; - state.indented = stream.indentation(); - } - if (stream.eatSpace()) return null; - var style = state.tokenize(stream, state); - if (type == "comment") return style; - state.reAllowed = !!(type == "operator" || type == "keyword c" || type.match(/^[\[{}\(,;:]$/)); - state.kwAllowed = type != '.'; - return parseHaxe(state, style, type, content, stream); - }, - - indent: function(state, textAfter) { - if (state.tokenize != haxeTokenBase) return 0; - var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical; - if (lexical.type == "stat" && firstChar == "}") lexical = lexical.prev; - var type = lexical.type, closing = firstChar == type; - if (type == "vardef") return lexical.indented + 4; - else if (type == "form" && firstChar == "{") return lexical.indented; - else if (type == "stat" || type == "form") return lexical.indented + indentUnit; - else if (lexical.info == "switch" && !closing) - return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit); - else if (lexical.align) return lexical.column + (closing ? 0 : 1); - else return lexical.indented + (closing ? 0 : indentUnit); - }, - - electricChars: "{}" - }; -}); - -CodeMirror.defineMIME("text/x-haxe", "haxe"); diff --git a/plugins/codemirror/codemirror/mode/haxe/index.html b/plugins/codemirror/codemirror/mode/haxe/index.html deleted file mode 100644 index ec3b8e0..0000000 --- a/plugins/codemirror/codemirror/mode/haxe/index.html +++ /dev/null @@ -1,103 +0,0 @@ - - -CodeMirror: Haxe mode - - - - - - - - - -
    -

    Haxe mode

    - - -
    - - - -

    MIME types defined: text/x-haxe.

    -
    diff --git a/plugins/codemirror/codemirror/mode/htmlembedded/htmlembedded.js b/plugins/codemirror/codemirror/mode/htmlembedded/htmlembedded.js deleted file mode 100644 index ff6dfd2..0000000 --- a/plugins/codemirror/codemirror/mode/htmlembedded/htmlembedded.js +++ /dev/null @@ -1,73 +0,0 @@ -CodeMirror.defineMode("htmlembedded", function(config, parserConfig) { - - //config settings - var scriptStartRegex = parserConfig.scriptStartRegex || /^<%/i, - scriptEndRegex = parserConfig.scriptEndRegex || /^%>/i; - - //inner modes - var scriptingMode, htmlMixedMode; - - //tokenizer when in html mode - function htmlDispatch(stream, state) { - if (stream.match(scriptStartRegex, false)) { - state.token=scriptingDispatch; - return scriptingMode.token(stream, state.scriptState); - } - else - return htmlMixedMode.token(stream, state.htmlState); - } - - //tokenizer when in scripting mode - function scriptingDispatch(stream, state) { - if (stream.match(scriptEndRegex, false)) { - state.token=htmlDispatch; - return htmlMixedMode.token(stream, state.htmlState); - } - else - return scriptingMode.token(stream, state.scriptState); - } - - - return { - startState: function() { - scriptingMode = scriptingMode || CodeMirror.getMode(config, parserConfig.scriptingModeSpec); - htmlMixedMode = htmlMixedMode || CodeMirror.getMode(config, "htmlmixed"); - return { - token : parserConfig.startOpen ? scriptingDispatch : htmlDispatch, - htmlState : CodeMirror.startState(htmlMixedMode), - scriptState : CodeMirror.startState(scriptingMode) - }; - }, - - token: function(stream, state) { - return state.token(stream, state); - }, - - indent: function(state, textAfter) { - if (state.token == htmlDispatch) - return htmlMixedMode.indent(state.htmlState, textAfter); - else if (scriptingMode.indent) - return scriptingMode.indent(state.scriptState, textAfter); - }, - - copyState: function(state) { - return { - token : state.token, - htmlState : CodeMirror.copyState(htmlMixedMode, state.htmlState), - scriptState : CodeMirror.copyState(scriptingMode, state.scriptState) - }; - }, - - electricChars: "/{}:", - - innerMode: function(state) { - if (state.token == scriptingDispatch) return {state: state.scriptState, mode: scriptingMode}; - else return {state: state.htmlState, mode: htmlMixedMode}; - } - }; -}, "htmlmixed"); - -CodeMirror.defineMIME("application/x-ejs", { name: "htmlembedded", scriptingModeSpec:"javascript"}); -CodeMirror.defineMIME("application/x-aspx", { name: "htmlembedded", scriptingModeSpec:"text/x-csharp"}); -CodeMirror.defineMIME("application/x-jsp", { name: "htmlembedded", scriptingModeSpec:"text/x-java"}); -CodeMirror.defineMIME("application/x-erb", { name: "htmlembedded", scriptingModeSpec:"ruby"}); diff --git a/plugins/codemirror/codemirror/mode/htmlembedded/index.html b/plugins/codemirror/codemirror/mode/htmlembedded/index.html deleted file mode 100644 index 37e9289..0000000 --- a/plugins/codemirror/codemirror/mode/htmlembedded/index.html +++ /dev/null @@ -1,60 +0,0 @@ - - -CodeMirror: Html Embedded Scripts mode - - - - - - - - - - - - - -
    -

    Html Embedded Scripts mode

    -
    - - - -

    Mode for html embedded scripts like JSP and ASP.NET. Depends on HtmlMixed which in turn depends on - JavaScript, CSS and XML.
    Other dependancies include those of the scriping language chosen.

    - -

    MIME types defined: application/x-aspx (ASP.NET), - application/x-ejs (Embedded Javascript), application/x-jsp (JavaServer Pages)

    -
    diff --git a/plugins/codemirror/codemirror/mode/htmlmixed/htmlmixed.js b/plugins/codemirror/codemirror/mode/htmlmixed/htmlmixed.js deleted file mode 100644 index b59ef37..0000000 --- a/plugins/codemirror/codemirror/mode/htmlmixed/htmlmixed.js +++ /dev/null @@ -1,104 +0,0 @@ -CodeMirror.defineMode("htmlmixed", function(config, parserConfig) { - var htmlMode = CodeMirror.getMode(config, {name: "xml", htmlMode: true}); - var cssMode = CodeMirror.getMode(config, "css"); - - var scriptTypes = [], scriptTypesConf = parserConfig && parserConfig.scriptTypes; - scriptTypes.push({matches: /^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i, - mode: CodeMirror.getMode(config, "javascript")}); - if (scriptTypesConf) for (var i = 0; i < scriptTypesConf.length; ++i) { - var conf = scriptTypesConf[i]; - scriptTypes.push({matches: conf.matches, mode: conf.mode && CodeMirror.getMode(config, conf.mode)}); - } - scriptTypes.push({matches: /./, - mode: CodeMirror.getMode(config, "text/plain")}); - - function html(stream, state) { - var tagName = state.htmlState.tagName; - var style = htmlMode.token(stream, state.htmlState); - if (tagName == "script" && /\btag\b/.test(style) && stream.current() == ">") { - // Script block: mode to change to depends on type attribute - var scriptType = stream.string.slice(Math.max(0, stream.pos - 100), stream.pos).match(/\btype\s*=\s*("[^"]+"|'[^']+'|\S+)[^<]*$/i); - scriptType = scriptType ? scriptType[1] : ""; - if (scriptType && /[\"\']/.test(scriptType.charAt(0))) scriptType = scriptType.slice(1, scriptType.length - 1); - for (var i = 0; i < scriptTypes.length; ++i) { - var tp = scriptTypes[i]; - if (typeof tp.matches == "string" ? scriptType == tp.matches : tp.matches.test(scriptType)) { - if (tp.mode) { - state.token = script; - state.localMode = tp.mode; - state.localState = tp.mode.startState && tp.mode.startState(htmlMode.indent(state.htmlState, "")); - } - break; - } - } - } else if (tagName == "style" && /\btag\b/.test(style) && stream.current() == ">") { - state.token = css; - state.localMode = cssMode; - state.localState = cssMode.startState(htmlMode.indent(state.htmlState, "")); - } - return style; - } - function maybeBackup(stream, pat, style) { - var cur = stream.current(); - var close = cur.search(pat), m; - if (close > -1) stream.backUp(cur.length - close); - else if (m = cur.match(/<\/?$/)) { - stream.backUp(cur.length); - if (!stream.match(pat, false)) stream.match(cur); - } - return style; - } - function script(stream, state) { - if (stream.match(/^<\/\s*script\s*>/i, false)) { - state.token = html; - state.localState = state.localMode = null; - return html(stream, state); - } - return maybeBackup(stream, /<\/\s*script\s*>/, - state.localMode.token(stream, state.localState)); - } - function css(stream, state) { - if (stream.match(/^<\/\s*style\s*>/i, false)) { - state.token = html; - state.localState = state.localMode = null; - return html(stream, state); - } - return maybeBackup(stream, /<\/\s*style\s*>/, - cssMode.token(stream, state.localState)); - } - - return { - startState: function() { - var state = htmlMode.startState(); - return {token: html, localMode: null, localState: null, htmlState: state}; - }, - - copyState: function(state) { - if (state.localState) - var local = CodeMirror.copyState(state.localMode, state.localState); - return {token: state.token, localMode: state.localMode, localState: local, - htmlState: CodeMirror.copyState(htmlMode, state.htmlState)}; - }, - - token: function(stream, state) { - return state.token(stream, state); - }, - - indent: function(state, textAfter) { - if (!state.localMode || /^\s*<\//.test(textAfter)) - return htmlMode.indent(state.htmlState, textAfter); - else if (state.localMode.indent) - return state.localMode.indent(state.localState, textAfter); - else - return CodeMirror.Pass; - }, - - electricChars: "/{}:", - - innerMode: function(state) { - return {state: state.localState || state.htmlState, mode: state.localMode || htmlMode}; - } - }; -}, "xml", "javascript", "css"); - -CodeMirror.defineMIME("text/html", "htmlmixed"); diff --git a/plugins/codemirror/codemirror/mode/htmlmixed/index.html b/plugins/codemirror/codemirror/mode/htmlmixed/index.html deleted file mode 100644 index b461743..0000000 --- a/plugins/codemirror/codemirror/mode/htmlmixed/index.html +++ /dev/null @@ -1,85 +0,0 @@ - - -CodeMirror: HTML mixed mode - - - - - - - - - - - - - -
    -

    HTML mixed mode

    -
    - - -

    The HTML mixed mode depends on the XML, JavaScript, and CSS modes.

    - -

    It takes an optional mode configuration - option, scriptTypes, which can be used to add custom - behavior for specific <script type="..."> tags. If - given, it should hold an array of {matches, mode} - objects, where matches is a string or regexp that - matches the script type, and mode is - either null, for script types that should stay in - HTML mode, or a mode - spec corresponding to the mode that should be used for the - script.

    - -

    MIME types defined: text/html - (redefined, only takes effect if you load this parser after the - XML parser).

    - -
    diff --git a/plugins/codemirror/codemirror/mode/http/http.js b/plugins/codemirror/codemirror/mode/http/http.js deleted file mode 100644 index 5a51636..0000000 --- a/plugins/codemirror/codemirror/mode/http/http.js +++ /dev/null @@ -1,98 +0,0 @@ -CodeMirror.defineMode("http", function() { - function failFirstLine(stream, state) { - stream.skipToEnd(); - state.cur = header; - return "error"; - } - - function start(stream, state) { - if (stream.match(/^HTTP\/\d\.\d/)) { - state.cur = responseStatusCode; - return "keyword"; - } else if (stream.match(/^[A-Z]+/) && /[ \t]/.test(stream.peek())) { - state.cur = requestPath; - return "keyword"; - } else { - return failFirstLine(stream, state); - } - } - - function responseStatusCode(stream, state) { - var code = stream.match(/^\d+/); - if (!code) return failFirstLine(stream, state); - - state.cur = responseStatusText; - var status = Number(code[0]); - if (status >= 100 && status < 200) { - return "positive informational"; - } else if (status >= 200 && status < 300) { - return "positive success"; - } else if (status >= 300 && status < 400) { - return "positive redirect"; - } else if (status >= 400 && status < 500) { - return "negative client-error"; - } else if (status >= 500 && status < 600) { - return "negative server-error"; - } else { - return "error"; - } - } - - function responseStatusText(stream, state) { - stream.skipToEnd(); - state.cur = header; - return null; - } - - function requestPath(stream, state) { - stream.eatWhile(/\S/); - state.cur = requestProtocol; - return "string-2"; - } - - function requestProtocol(stream, state) { - if (stream.match(/^HTTP\/\d\.\d$/)) { - state.cur = header; - return "keyword"; - } else { - return failFirstLine(stream, state); - } - } - - function header(stream) { - if (stream.sol() && !stream.eat(/[ \t]/)) { - if (stream.match(/^.*?:/)) { - return "atom"; - } else { - stream.skipToEnd(); - return "error"; - } - } else { - stream.skipToEnd(); - return "string"; - } - } - - function body(stream) { - stream.skipToEnd(); - return null; - } - - return { - token: function(stream, state) { - var cur = state.cur; - if (cur != header && cur != body && stream.eatSpace()) return null; - return cur(stream, state); - }, - - blankLine: function(state) { - state.cur = body; - }, - - startState: function() { - return {cur: start}; - } - }; -}); - -CodeMirror.defineMIME("message/http", "http"); diff --git a/plugins/codemirror/codemirror/mode/http/index.html b/plugins/codemirror/codemirror/mode/http/index.html deleted file mode 100644 index 705085e..0000000 --- a/plugins/codemirror/codemirror/mode/http/index.html +++ /dev/null @@ -1,45 +0,0 @@ - - -CodeMirror: HTTP mode - - - - - - - - - -
    -

    HTTP mode

    - - -
    - - - -

    MIME types defined: message/http.

    -
    diff --git a/plugins/codemirror/codemirror/mode/index.html b/plugins/codemirror/codemirror/mode/index.html deleted file mode 100644 index 81abc42..0000000 --- a/plugins/codemirror/codemirror/mode/index.html +++ /dev/null @@ -1,114 +0,0 @@ - - -CodeMirror: Language Modes - - - - - -
    - -

    Language modes

    - -

    This is a list of every mode in the distribution. Each mode lives -in a subdirectory of the mode/ directory, and typically -defines a single JavaScript file that implements the mode. Loading -such file will make the language available to CodeMirror, through -the mode -option.

    - -
    - -
    - -
    diff --git a/plugins/codemirror/codemirror/mode/jade/index.html b/plugins/codemirror/codemirror/mode/jade/index.html deleted file mode 100644 index e22b15e..0000000 --- a/plugins/codemirror/codemirror/mode/jade/index.html +++ /dev/null @@ -1,66 +0,0 @@ - - -CodeMirror: Jade Templating Mode - - - - - - - - - -
    -

    Jade Templating Mode

    -
    - -

    The Jade Templating Mode

    -

    Created by Drew Bratcher. Managed as part of an Adobe Brackets extension at https://github.com/dbratcher/brackets-jade.

    -

    MIME type defined: text/x-jade.

    -
    diff --git a/plugins/codemirror/codemirror/mode/jade/jade.js b/plugins/codemirror/codemirror/mode/jade/jade.js deleted file mode 100644 index 61abb27..0000000 --- a/plugins/codemirror/codemirror/mode/jade/jade.js +++ /dev/null @@ -1,90 +0,0 @@ -CodeMirror.defineMode("jade", function () { - var symbol_regex1 = /^(?:~|!|%|\^|\*|\+|=|\\|:|;|,|\/|\?|&|<|>|\|)/; - var open_paren_regex = /^(\(|\[)/; - var close_paren_regex = /^(\)|\])/; - var keyword_regex1 = /^(if|else|return|var|function|include|doctype|each)/; - var keyword_regex2 = /^(#|{|}|\.)/; - var keyword_regex3 = /^(in)/; - var html_regex1 = /^(html|head|title|meta|link|script|body|br|div|input|span|a|img)/; - var html_regex2 = /^(h1|h2|h3|h4|h5|p|strong|em)/; - return { - startState: function () { - return { - inString: false, - stringType: "", - beforeTag: true, - justMatchedKeyword: false, - afterParen: false - }; - }, - token: function (stream, state) { - //check for state changes - if (!state.inString && ((stream.peek() == '"') || (stream.peek() == "'"))) { - state.stringType = stream.peek(); - stream.next(); // Skip quote - state.inString = true; // Update state - } - - //return state - if (state.inString) { - if (stream.skipTo(state.stringType)) { // Quote found on this line - stream.next(); // Skip quote - state.inString = false; // Clear flag - } else { - stream.skipToEnd(); // Rest of line is string - } - state.justMatchedKeyword = false; - return "string"; // Token style - } else if (stream.sol() && stream.eatSpace()) { - if (stream.match(keyword_regex1)) { - state.justMatchedKeyword = true; - stream.eatSpace(); - return "keyword"; - } - if (stream.match(html_regex1) || stream.match(html_regex2)) { - state.justMatchedKeyword = true; - return "variable"; - } - } else if (stream.sol() && stream.match(keyword_regex1)) { - state.justMatchedKeyword = true; - stream.eatSpace(); - return "keyword"; - } else if (stream.sol() && (stream.match(html_regex1) || stream.match(html_regex2))) { - state.justMatchedKeyword = true; - return "variable"; - } else if (stream.eatSpace()) { - state.justMatchedKeyword = false; - if (stream.match(keyword_regex3) && stream.eatSpace()) { - state.justMatchedKeyword = true; - return "keyword"; - } - } else if (stream.match(symbol_regex1)) { - state.justMatchedKeyword = false; - return "atom"; - } else if (stream.match(open_paren_regex)) { - state.afterParen = true; - state.justMatchedKeyword = true; - return "def"; - } else if (stream.match(close_paren_regex)) { - state.afterParen = false; - state.justMatchedKeyword = true; - return "def"; - } else if (stream.match(keyword_regex2)) { - state.justMatchedKeyword = true; - return "keyword"; - } else if (stream.eatSpace()) { - state.justMatchedKeyword = false; - } else { - stream.next(); - if (state.justMatchedKeyword) { - return "property"; - } else if (state.afterParen) { - return "property"; - } - } - return null; - } - }; -}); - -CodeMirror.defineMIME('text/x-jade', 'jade'); diff --git a/plugins/codemirror/codemirror/mode/javascript/index.html b/plugins/codemirror/codemirror/mode/javascript/index.html deleted file mode 100644 index 45d70ff..0000000 --- a/plugins/codemirror/codemirror/mode/javascript/index.html +++ /dev/null @@ -1,107 +0,0 @@ - - -CodeMirror: JavaScript mode - - - - - - - - - - - - -
    -

    JavaScript mode

    - - -
    - - - -

    - JavaScript mode supports a two configuration - options: -

      -
    • json which will set the mode to expect JSON - data rather than a JavaScript program.
    • -
    • typescript which will activate additional - syntax highlighting and some other things for TypeScript code - (demo).
    • -
    • statementIndent which (given a number) will - determine the amount of indentation to use for statements - continued on a new line.
    • -
    -

    - -

    MIME types defined: text/javascript, application/json, text/typescript, application/typescript.

    -
    diff --git a/plugins/codemirror/codemirror/mode/javascript/javascript.js b/plugins/codemirror/codemirror/mode/javascript/javascript.js deleted file mode 100644 index f27c063..0000000 --- a/plugins/codemirror/codemirror/mode/javascript/javascript.js +++ /dev/null @@ -1,617 +0,0 @@ -// TODO actually recognize syntax of TypeScript constructs - -CodeMirror.defineMode("javascript", function(config, parserConfig) { - var indentUnit = config.indentUnit; - var statementIndent = parserConfig.statementIndent; - var jsonMode = parserConfig.json; - var isTS = parserConfig.typescript; - - // Tokenizer - - var keywords = function(){ - function kw(type) {return {type: type, style: "keyword"};} - var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c"); - var operator = kw("operator"), atom = {type: "atom", style: "atom"}; - - var jsKeywords = { - "if": kw("if"), "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B, - "return": C, "break": C, "continue": C, "new": C, "delete": C, "throw": C, - "var": kw("var"), "const": kw("var"), "let": kw("var"), - "function": kw("function"), "catch": kw("catch"), - "for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"), - "in": operator, "typeof": operator, "instanceof": operator, - "true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom, - "this": kw("this"), "module": kw("module"), "class": kw("class"), "super": kw("atom"), - "yield": C, "export": kw("export"), "import": kw("import"), "extends": C - }; - - // Extend the 'normal' keywords with the TypeScript language extensions - if (isTS) { - var type = {type: "variable", style: "variable-3"}; - var tsKeywords = { - // object-like things - "interface": kw("interface"), - "extends": kw("extends"), - "constructor": kw("constructor"), - - // scope modifiers - "public": kw("public"), - "private": kw("private"), - "protected": kw("protected"), - "static": kw("static"), - - // types - "string": type, "number": type, "bool": type, "any": type - }; - - for (var attr in tsKeywords) { - jsKeywords[attr] = tsKeywords[attr]; - } - } - - return jsKeywords; - }(); - - var isOperatorChar = /[+\-*&%=<>!?|~^]/; - - function nextUntilUnescaped(stream, end) { - var escaped = false, next; - while ((next = stream.next()) != null) { - if (next == end && !escaped) - return false; - escaped = !escaped && next == "\\"; - } - return escaped; - } - - // Used as scratch variables to communicate multiple values without - // consing up tons of objects. - var type, content; - function ret(tp, style, cont) { - type = tp; content = cont; - return style; - } - function tokenBase(stream, state) { - var ch = stream.next(); - if (ch == '"' || ch == "'") { - state.tokenize = tokenString(ch); - return state.tokenize(stream, state); - } else if (ch == "." && stream.match(/^\d+(?:[eE][+\-]?\d+)?/)) { - return ret("number", "number"); - } else if (ch == "." && stream.match("..")) { - return ret("spread", "meta"); - } else if (/[\[\]{}\(\),;\:\.]/.test(ch)) { - return ret(ch); - } else if (ch == "=" && stream.eat(">")) { - return ret("=>"); - } else if (ch == "0" && stream.eat(/x/i)) { - stream.eatWhile(/[\da-f]/i); - return ret("number", "number"); - } else if (/\d/.test(ch)) { - stream.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/); - return ret("number", "number"); - } else if (ch == "/") { - if (stream.eat("*")) { - state.tokenize = tokenComment; - return tokenComment(stream, state); - } else if (stream.eat("/")) { - stream.skipToEnd(); - return ret("comment", "comment"); - } else if (state.lastType == "operator" || state.lastType == "keyword c" || - state.lastType == "sof" || /^[\[{}\(,;:]$/.test(state.lastType)) { - nextUntilUnescaped(stream, "/"); - stream.eatWhile(/[gimy]/); // 'y' is "sticky" option in Mozilla - return ret("regexp", "string-2"); - } else { - stream.eatWhile(isOperatorChar); - return ret("operator", null, stream.current()); - } - } else if (ch == "`") { - state.tokenize = tokenQuasi; - return tokenQuasi(stream, state); - } else if (ch == "#") { - stream.skipToEnd(); - return ret("error", "error"); - } else if (isOperatorChar.test(ch)) { - stream.eatWhile(isOperatorChar); - return ret("operator", null, stream.current()); - } else { - stream.eatWhile(/[\w\$_]/); - var word = stream.current(), known = keywords.propertyIsEnumerable(word) && keywords[word]; - return (known && state.lastType != ".") ? ret(known.type, known.style, word) : - ret("variable", "variable", word); - } - } - - function tokenString(quote) { - return function(stream, state) { - if (!nextUntilUnescaped(stream, quote)) - state.tokenize = tokenBase; - return ret("string", "string"); - }; - } - - function tokenComment(stream, state) { - var maybeEnd = false, ch; - while (ch = stream.next()) { - if (ch == "/" && maybeEnd) { - state.tokenize = tokenBase; - break; - } - maybeEnd = (ch == "*"); - } - return ret("comment", "comment"); - } - - function tokenQuasi(stream, state) { - var escaped = false, next; - while ((next = stream.next()) != null) { - if (!escaped && (next == "`" || next == "$" && stream.eat("{"))) { - state.tokenize = tokenBase; - break; - } - escaped = !escaped && next == "\\"; - } - return ret("quasi", "string-2", stream.current()); - } - - var brackets = "([{}])"; - // This is a crude lookahead trick to try and notice that we're - // parsing the argument patterns for a fat-arrow function before we - // actually hit the arrow token. It only works if the arrow is on - // the same line as the arguments and there's no strange noise - // (comments) in between. Fallback is to only notice when we hit the - // arrow, and not declare the arguments as locals for the arrow - // body. - function findFatArrow(stream, state) { - if (state.fatArrowAt) state.fatArrowAt = null; - var arrow = stream.string.indexOf("=>", stream.start); - if (arrow < 0) return; - - var depth = 0, sawSomething = false; - for (var pos = arrow - 1; pos >= 0; --pos) { - var ch = stream.string.charAt(pos); - var bracket = brackets.indexOf(ch); - if (bracket >= 0 && bracket < 3) { - if (!depth) { ++pos; break; } - if (--depth == 0) break; - } else if (bracket >= 3 && bracket < 6) { - ++depth; - } else if (/[$\w]/.test(ch)) { - sawSomething = true; - } else if (sawSomething && !depth) { - ++pos; - break; - } - } - if (sawSomething && !depth) state.fatArrowAt = pos; - } - - // Parser - - var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true, "regexp": true, "this": true}; - - function JSLexical(indented, column, type, align, prev, info) { - this.indented = indented; - this.column = column; - this.type = type; - this.prev = prev; - this.info = info; - if (align != null) this.align = align; - } - - function inScope(state, varname) { - for (var v = state.localVars; v; v = v.next) - if (v.name == varname) return true; - for (var cx = state.context; cx; cx = cx.prev) { - for (var v = cx.vars; v; v = v.next) - if (v.name == varname) return true; - } - } - - function parseJS(state, style, type, content, stream) { - var cc = state.cc; - // Communicate our context to the combinators. - // (Less wasteful than consing up a hundred closures on every call.) - cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; - - if (!state.lexical.hasOwnProperty("align")) - state.lexical.align = true; - - while(true) { - var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement; - if (combinator(type, content)) { - while(cc.length && cc[cc.length - 1].lex) - cc.pop()(); - if (cx.marked) return cx.marked; - if (type == "variable" && inScope(state, content)) return "variable-2"; - return style; - } - } - } - - // Combinator utils - - var cx = {state: null, column: null, marked: null, cc: null}; - function pass() { - for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]); - } - function cont() { - pass.apply(null, arguments); - return true; - } - function register(varname) { - function inList(list) { - for (var v = list; v; v = v.next) - if (v.name == varname) return true; - return false; - } - var state = cx.state; - if (state.context) { - cx.marked = "def"; - if (inList(state.localVars)) return; - state.localVars = {name: varname, next: state.localVars}; - } else { - if (inList(state.globalVars)) return; - if (parserConfig.globalVars) - state.globalVars = {name: varname, next: state.globalVars}; - } - } - - // Combinators - - var defaultVars = {name: "this", next: {name: "arguments"}}; - function pushcontext() { - cx.state.context = {prev: cx.state.context, vars: cx.state.localVars}; - cx.state.localVars = defaultVars; - } - function popcontext() { - cx.state.localVars = cx.state.context.vars; - cx.state.context = cx.state.context.prev; - } - function pushlex(type, info) { - var result = function() { - var state = cx.state, indent = state.indented; - if (state.lexical.type == "stat") indent = state.lexical.indented; - state.lexical = new JSLexical(indent, cx.stream.column(), type, null, state.lexical, info); - }; - result.lex = true; - return result; - } - function poplex() { - var state = cx.state; - if (state.lexical.prev) { - if (state.lexical.type == ")") - state.indented = state.lexical.indented; - state.lexical = state.lexical.prev; - } - } - poplex.lex = true; - - function expect(wanted) { - return function(type) { - if (type == wanted) return cont(); - else if (wanted == ";") return pass(); - else return cont(arguments.callee); - }; - } - - function statement(type, value) { - if (type == "var") return cont(pushlex("vardef", value.length), vardef, expect(";"), poplex); - if (type == "keyword a") return cont(pushlex("form"), expression, statement, poplex); - if (type == "keyword b") return cont(pushlex("form"), statement, poplex); - if (type == "{") return cont(pushlex("}"), block, poplex); - if (type == ";") return cont(); - if (type == "if") return cont(pushlex("form"), expression, statement, poplex, maybeelse); - if (type == "function") return cont(functiondef); - if (type == "for") return cont(pushlex("form"), forspec, poplex, statement, poplex); - if (type == "variable") return cont(pushlex("stat"), maybelabel); - if (type == "switch") return cont(pushlex("form"), expression, pushlex("}", "switch"), expect("{"), - block, poplex, poplex); - if (type == "case") return cont(expression, expect(":")); - if (type == "default") return cont(expect(":")); - if (type == "catch") return cont(pushlex("form"), pushcontext, expect("("), funarg, expect(")"), - statement, poplex, popcontext); - if (type == "module") return cont(pushlex("form"), pushcontext, afterModule, popcontext, poplex); - if (type == "class") return cont(pushlex("form"), className, objlit, poplex); - if (type == "export") return cont(pushlex("form"), afterExport, poplex); - if (type == "import") return cont(pushlex("form"), afterImport, poplex); - return pass(pushlex("stat"), expression, expect(";"), poplex); - } - function expression(type) { - return expressionInner(type, false); - } - function expressionNoComma(type) { - return expressionInner(type, true); - } - function expressionInner(type, noComma) { - if (cx.state.fatArrowAt == cx.stream.start) { - var body = noComma ? arrowBodyNoComma : arrowBody; - if (type == "(") return cont(pushcontext, commasep(pattern, ")"), expect("=>"), body, popcontext); - else if (type == "variable") return pass(pushcontext, pattern, expect("=>"), body, popcontext); - } - - var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma; - if (atomicTypes.hasOwnProperty(type)) return cont(maybeop); - if (type == "function") return cont(functiondef); - if (type == "keyword c") return cont(noComma ? maybeexpressionNoComma : maybeexpression); - if (type == "(") return cont(pushlex(")"), maybeexpression, comprehension, expect(")"), poplex, maybeop); - if (type == "operator" || type == "spread") return cont(noComma ? expressionNoComma : expression); - if (type == "[") return cont(pushlex("]"), expressionNoComma, maybeArrayComprehension, poplex, maybeop); - if (type == "{") return cont(commasep(objprop, "}"), maybeop); - return cont(); - } - function maybeexpression(type) { - if (type.match(/[;\}\)\],]/)) return pass(); - return pass(expression); - } - function maybeexpressionNoComma(type) { - if (type.match(/[;\}\)\],]/)) return pass(); - return pass(expressionNoComma); - } - - function maybeoperatorComma(type, value) { - if (type == ",") return cont(expression); - return maybeoperatorNoComma(type, value, false); - } - function maybeoperatorNoComma(type, value, noComma) { - var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma; - var expr = noComma == false ? expression : expressionNoComma; - if (value == "=>") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext); - if (type == "operator") { - if (/\+\+|--/.test(value)) return cont(me); - if (value == "?") return cont(expression, expect(":"), expr); - return cont(expr); - } - if (type == "quasi") { cx.cc.push(me); return quasi(value); } - if (type == ";") return; - if (type == "(") return cont(commasep(expressionNoComma, ")", "call"), me); - if (type == ".") return cont(property, me); - if (type == "[") return cont(pushlex("]"), maybeexpression, expect("]"), poplex, me); - } - function quasi(value) { - if (!value) debugger; - if (value.slice(value.length - 2) != "${") return cont(); - return cont(expression, continueQuasi); - } - function continueQuasi(type) { - if (type == "}") { - cx.marked = "string-2"; - cx.state.tokenize = tokenQuasi; - return cont(); - } - } - function arrowBody(type) { - findFatArrow(cx.stream, cx.state); - if (type == "{") return pass(statement); - return pass(expression); - } - function arrowBodyNoComma(type) { - findFatArrow(cx.stream, cx.state); - if (type == "{") return pass(statement); - return pass(expressionNoComma); - } - function maybelabel(type) { - if (type == ":") return cont(poplex, statement); - return pass(maybeoperatorComma, expect(";"), poplex); - } - function property(type) { - if (type == "variable") {cx.marked = "property"; return cont();} - } - function objprop(type, value) { - if (type == "variable") { - cx.marked = "property"; - if (value == "get" || value == "set") return cont(getterSetter); - } else if (type == "number" || type == "string") { - cx.marked = type + " property"; - } else if (type == "[") { - return cont(expression, expect("]"), afterprop); - } - if (atomicTypes.hasOwnProperty(type)) return cont(afterprop); - } - function getterSetter(type) { - if (type != "variable") return pass(afterprop); - cx.marked = "property"; - return cont(functiondef); - } - function afterprop(type) { - if (type == ":") return cont(expressionNoComma); - if (type == "(") return pass(functiondef); - } - function commasep(what, end, info) { - function proceed(type) { - if (type == ",") { - var lex = cx.state.lexical; - if (lex.info == "call") lex.pos = (lex.pos || 0) + 1; - return cont(what, proceed); - } - if (type == end) return cont(); - return cont(expect(end)); - } - return function(type) { - if (type == end) return cont(); - if (info === false) return pass(what, proceed); - return pass(pushlex(end, info), what, proceed, poplex); - }; - } - function block(type) { - if (type == "}") return cont(); - return pass(statement, block); - } - function maybetype(type) { - if (isTS && type == ":") return cont(typedef); - } - function typedef(type) { - if (type == "variable"){cx.marked = "variable-3"; return cont();} - } - function vardef() { - return pass(pattern, maybetype, maybeAssign, vardefCont); - } - function pattern(type, value) { - if (type == "variable") { register(value); return cont(); } - if (type == "[") return cont(commasep(pattern, "]")); - if (type == "{") return cont(commasep(proppattern, "}")); - } - function proppattern(type, value) { - if (type == "variable" && !cx.stream.match(/^\s*:/, false)) { - register(value); - return cont(maybeAssign); - } - if (type == "variable") cx.marked = "property"; - return cont(expect(":"), pattern, maybeAssign); - } - function maybeAssign(_type, value) { - if (value == "=") return cont(expressionNoComma); - } - function vardefCont(type) { - if (type == ",") return cont(vardef); - } - function maybeelse(type, value) { - if (type == "keyword b" && value == "else") return cont(pushlex("form"), statement, poplex); - } - function forspec(type) { - if (type == "(") return cont(pushlex(")"), forspec1, expect(")")); - } - function forspec1(type) { - if (type == "var") return cont(vardef, expect(";"), forspec2); - if (type == ";") return cont(forspec2); - if (type == "variable") return cont(formaybeinof); - return pass(expression, expect(";"), forspec2); - } - function formaybeinof(_type, value) { - if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression); } - return cont(maybeoperatorComma, forspec2); - } - function forspec2(type, value) { - if (type == ";") return cont(forspec3); - if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression); } - return pass(expression, expect(";"), forspec3); - } - function forspec3(type) { - if (type != ")") cont(expression); - } - function functiondef(type, value) { - if (value == "*") {cx.marked = "keyword"; return cont(functiondef);} - if (type == "variable") {register(value); return cont(functiondef);} - if (type == "(") return cont(pushcontext, commasep(funarg, ")"), statement, popcontext); - } - function funarg(type) { - if (type == "spread") return cont(funarg); - return pass(pattern, maybetype); - } - function className(type, value) { - if (type == "variable") {register(value); return cont(classNameAfter);} - } - function classNameAfter(_type, value) { - if (value == "extends") return cont(expression); - } - function objlit(type) { - if (type == "{") return cont(commasep(objprop, "}")); - } - function afterModule(type, value) { - if (type == "string") return cont(statement); - if (type == "variable") { register(value); return cont(maybeFrom); } - } - function afterExport(_type, value) { - if (value == "*") { cx.marked = "keyword"; return cont(maybeFrom, expect(";")); } - if (value == "default") { cx.marked = "keyword"; return cont(expression, expect(";")); } - return pass(statement); - } - function afterImport(type) { - if (type == "string") return cont(); - return pass(importSpec, maybeFrom); - } - function importSpec(type, value) { - if (type == "{") return cont(commasep(importSpec, "}")); - if (type == "variable") register(value); - return cont(); - } - function maybeFrom(_type, value) { - if (value == "from") { cx.marked = "keyword"; return cont(expression); } - } - function maybeArrayComprehension(type) { - if (type == "for") return pass(comprehension); - if (type == ",") return cont(commasep(expressionNoComma, "]", false)); - return pass(commasep(expressionNoComma, "]", false)); - } - function comprehension(type) { - if (type == "for") return cont(forspec, comprehension); - if (type == "if") return cont(expression, comprehension); - } - - // Interface - - return { - startState: function(basecolumn) { - var state = { - tokenize: tokenBase, - lastType: "sof", - cc: [], - lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false), - localVars: parserConfig.localVars, - context: parserConfig.localVars && {vars: parserConfig.localVars}, - indented: 0 - }; - if (parserConfig.globalVars) state.globalVars = parserConfig.globalVars; - return state; - }, - - token: function(stream, state) { - if (stream.sol()) { - if (!state.lexical.hasOwnProperty("align")) - state.lexical.align = false; - state.indented = stream.indentation(); - findFatArrow(stream, state); - } - if (state.tokenize != tokenComment && stream.eatSpace()) return null; - var style = state.tokenize(stream, state); - if (type == "comment") return style; - state.lastType = type == "operator" && (content == "++" || content == "--") ? "incdec" : type; - return parseJS(state, style, type, content, stream); - }, - - indent: function(state, textAfter) { - if (state.tokenize == tokenComment) return CodeMirror.Pass; - if (state.tokenize != tokenBase) return 0; - var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical; - // Kludge to prevent 'maybelse' from blocking lexical scope pops - for (var i = state.cc.length - 1; i >= 0; --i) { - var c = state.cc[i]; - if (c == poplex) lexical = lexical.prev; - else if (c != maybeelse) break; - } - if (lexical.type == "stat" && firstChar == "}") lexical = lexical.prev; - if (statementIndent && lexical.type == ")" && lexical.prev.type == "stat") - lexical = lexical.prev; - var type = lexical.type, closing = firstChar == type; - - if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info + 1 : 0); - else if (type == "form" && firstChar == "{") return lexical.indented; - else if (type == "form") return lexical.indented + indentUnit; - else if (type == "stat") - return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? statementIndent || indentUnit : 0); - else if (lexical.info == "switch" && !closing && parserConfig.doubleIndentSwitch != false) - return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit); - else if (lexical.align) return lexical.column + (closing ? 0 : 1); - else return lexical.indented + (closing ? 0 : indentUnit); - }, - - electricChars: ":{}", - blockCommentStart: jsonMode ? null : "/*", - blockCommentEnd: jsonMode ? null : "*/", - lineComment: jsonMode ? null : "//", - fold: "brace", - - helperType: jsonMode ? "json" : "javascript", - jsonMode: jsonMode - }; -}); - -CodeMirror.defineMIME("text/javascript", "javascript"); -CodeMirror.defineMIME("text/ecmascript", "javascript"); -CodeMirror.defineMIME("application/javascript", "javascript"); -CodeMirror.defineMIME("application/ecmascript", "javascript"); -CodeMirror.defineMIME("application/json", {name: "javascript", json: true}); -CodeMirror.defineMIME("application/x-json", {name: "javascript", json: true}); -CodeMirror.defineMIME("text/typescript", { name: "javascript", typescript: true }); -CodeMirror.defineMIME("application/typescript", { name: "javascript", typescript: true }); diff --git a/plugins/codemirror/codemirror/mode/javascript/test.js b/plugins/codemirror/codemirror/mode/javascript/test.js deleted file mode 100644 index 7601524..0000000 --- a/plugins/codemirror/codemirror/mode/javascript/test.js +++ /dev/null @@ -1,72 +0,0 @@ -(function() { - var mode = CodeMirror.getMode({indentUnit: 2}, "javascript"); - function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } - - MT("locals", - "[keyword function] [variable foo]([def a], [def b]) { [keyword var] [def c] = [number 10]; [keyword return] [variable-2 a] + [variable-2 c] + [variable d]; }"); - - MT("comma-and-binop", - "[keyword function](){ [keyword var] [def x] = [number 1] + [number 2], [def y]; }"); - - MT("destructuring", - "([keyword function]([def a], [[[def b], [def c] ]]) {", - " [keyword let] {[def d], [property foo]: [def c]=[number 10], [def x]} = [variable foo]([variable-2 a]);", - " [[[variable-2 c], [variable y] ]] = [variable-2 c];", - "})();"); - - MT("class", - "[keyword class] [variable Point] [keyword extends] [variable SuperThing] {", - " [[ [string-2 /expr/] ]]: [number 24],", - " [property constructor]([def x], [def y]) {", - " [keyword super]([string 'something']);", - " [keyword this].[property x] = [variable-2 x];", - " }", - "}"); - - MT("module", - "[keyword module] [string 'foo'] {", - " [keyword export] [keyword let] [def x] = [number 42];", - " [keyword export] [keyword *] [keyword from] [string 'somewhere'];", - "}"); - - MT("import", - "[keyword function] [variable foo]() {", - " [keyword import] [def $] [keyword from] [string 'jquery'];", - " [keyword module] [def crypto] [keyword from] [string 'crypto'];", - " [keyword import] { [def encrypt], [def decrypt] } [keyword from] [string 'crypto'];", - "}"); - - MT("const", - "[keyword function] [variable f]() {", - " [keyword const] [[ [def a], [def b] ]] = [[ [number 1], [number 2] ]];", - "}"); - - MT("for/of", - "[keyword for]([keyword let] [variable of] [keyword of] [variable something]) {}"); - - MT("generator", - "[keyword function*] [variable repeat]([def n]) {", - " [keyword for]([keyword var] [def i] = [number 0]; [variable-2 i] < [variable-2 n]; ++[variable-2 i])", - " [keyword yield] [variable-2 i];", - "}"); - - MT("fatArrow", - "[variable array].[property filter]([def a] => [variable-2 a] + [number 1]);", - "[variable a];", // No longer in scope - "[keyword let] [variable f] = ([[ [def a], [def b] ]], [def c]) => [variable-2 a] + [variable-2 c];", - "[variable c];"); - - MT("spread", - "[keyword function] [variable f]([def a], [meta ...][def b]) {", - " [variable something]([variable-2 a], [meta ...][variable-2 b]);", - "}"); - - MT("comprehension", - "[keyword function] [variable f]() {", - " [[ [variable x] + [number 1] [keyword for] ([keyword var] [def x] [keyword in] [variable y]) [keyword if] [variable pred]([variable-2 x]) ]];", - " ([variable u] [keyword for] ([keyword var] [def u] [keyword of] [variable generateValues]()) [keyword if] ([variable-2 u].[property color] === [string 'blue']));", - "}"); - - MT("quasi", - "[variable re][string-2 `fofdlakj${][variable x] + ([variable re][string-2 `foo`]) + [number 1][string-2 }fdsa`] + [number 2]"); -})(); diff --git a/plugins/codemirror/codemirror/mode/javascript/typescript.html b/plugins/codemirror/codemirror/mode/javascript/typescript.html deleted file mode 100644 index 9cc5f49..0000000 --- a/plugins/codemirror/codemirror/mode/javascript/typescript.html +++ /dev/null @@ -1,61 +0,0 @@ - - -CodeMirror: TypeScript mode - - - - - - - - - -
    -

    TypeScript mode

    - - -
    - - - -

    This is a specialization of the JavaScript mode.

    -
    diff --git a/plugins/codemirror/codemirror/mode/jinja2/index.html b/plugins/codemirror/codemirror/mode/jinja2/index.html deleted file mode 100644 index 66bf2ec..0000000 --- a/plugins/codemirror/codemirror/mode/jinja2/index.html +++ /dev/null @@ -1,50 +0,0 @@ - - -CodeMirror: Jinja2 mode - - - - - - - - - -
    -

    Jinja2 mode

    -
    - -
    diff --git a/plugins/codemirror/codemirror/mode/jinja2/jinja2.js b/plugins/codemirror/codemirror/mode/jinja2/jinja2.js deleted file mode 100644 index 16b06c4..0000000 --- a/plugins/codemirror/codemirror/mode/jinja2/jinja2.js +++ /dev/null @@ -1,42 +0,0 @@ -CodeMirror.defineMode("jinja2", function() { - var keywords = ["block", "endblock", "for", "endfor", "in", "true", "false", - "loop", "none", "self", "super", "if", "as", "not", "and", - "else", "import", "with", "without", "context"]; - keywords = new RegExp("^((" + keywords.join(")|(") + "))\\b"); - - function tokenBase (stream, state) { - var ch = stream.next(); - if (ch == "{") { - if (ch = stream.eat(/\{|%|#/)) { - stream.eat("-"); - state.tokenize = inTag(ch); - return "tag"; - } - } - } - function inTag (close) { - if (close == "{") { - close = "}"; - } - return function (stream, state) { - var ch = stream.next(); - if ((ch == close || (ch == "-" && stream.eat(close))) - && stream.eat("}")) { - state.tokenize = tokenBase; - return "tag"; - } - if (stream.match(keywords)) { - return "keyword"; - } - return close == "#" ? "comment" : "string"; - }; - } - return { - startState: function () { - return {tokenize: tokenBase}; - }, - token: function (stream, state) { - return state.tokenize(stream, state); - } - }; -}); diff --git a/plugins/codemirror/codemirror/mode/julia/index.html b/plugins/codemirror/codemirror/mode/julia/index.html deleted file mode 100644 index dd567a6..0000000 --- a/plugins/codemirror/codemirror/mode/julia/index.html +++ /dev/null @@ -1,187 +0,0 @@ - - -CodeMirror: Julia mode - - - - - - - - - -
    -

    Julia mode

    - -
    - - -

    MIME types defined: text/x-julia.

    -
    diff --git a/plugins/codemirror/codemirror/mode/julia/julia.js b/plugins/codemirror/codemirror/mode/julia/julia.js deleted file mode 100644 index 9ec2428..0000000 --- a/plugins/codemirror/codemirror/mode/julia/julia.js +++ /dev/null @@ -1,262 +0,0 @@ -CodeMirror.defineMode("julia", function(_conf, parserConf) { - var ERRORCLASS = 'error'; - - function wordRegexp(words) { - return new RegExp("^((" + words.join(")|(") + "))\\b"); - } - - var operators = parserConf.operators || /^(?:\.?[|&^\\%*+\-<>!=\/]=?|\?|~|:|\$|<:|\.[<>]|<<=?|>>>?=?|\.[<>=]=|->?|\/\/|\bin\b|\.{3})/; - var delimiters = parserConf.delimiters || /^[;,()[\]{}]/; - var identifiers = parserConf.identifiers|| /^[_A-Za-z][_A-Za-z0-9]*!*/; - var blockOpeners = ["begin", "function", "type", "immutable", "let", "macro", "for", "while", "quote", "if", "else", "elseif", "try", "finally", "catch"]; - var blockClosers = ["end", "else", "elseif", "catch", "finally"]; - var keywordList = ['if', 'else', 'elseif', 'while', 'for', 'begin', 'let', 'end', 'do', 'try', 'catch', 'finally', 'return', 'break', 'continue', 'global', 'local', 'const', 'export', 'import', 'importall', 'using', 'function', 'macro', 'module', 'baremodule', 'type', 'immutable', 'quote', 'typealias', 'abstract', 'bitstype', 'ccall']; - var builtinList = ['true', 'false', 'enumerate', 'open', 'close', 'nothing', 'NaN', 'Inf', 'print', 'println', 'Int8', 'Uint8', 'Int16', 'Uint16', 'Int32', 'Uint32', 'Int64', 'Uint64', 'Int128', 'Uint128', 'Bool', 'Char', 'Float16', 'Float32', 'Float64', 'Array', 'Vector', 'Matrix', 'String', 'UTF8String', 'ASCIIString', 'error', 'warn', 'info', '@printf']; - - //var stringPrefixes = new RegExp("^[br]?('|\")") - var stringPrefixes = /^[br]?('|"{3}|")/; - var keywords = wordRegexp(keywordList); - var builtins = wordRegexp(builtinList); - var openers = wordRegexp(blockOpeners); - var closers = wordRegexp(blockClosers); - var macro = /@[_A-Za-z][_A-Za-z0-9]*!*/; - var indentInfo = null; - - function in_array(state) { - var ch = cur_scope(state); - if(ch=="[" || ch=="{") { - return true; - } - else { - return false; - } - } - - function cur_scope(state) { - if(state.scopes.length==0) { - return null; - } - return state.scopes[state.scopes.length - 1]; - } - - // tokenizers - function tokenBase(stream, state) { - // Handle scope changes - var leaving_expr = state.leaving_expr; - state.leaving_expr = false; - if(leaving_expr) { - if(stream.match(/^'+/)) { - return 'operator'; - } - if(stream.match("...")) { - return 'operator'; - } - } - - if (stream.eatSpace()) { - return null; - } - - var ch = stream.peek(); - // Handle Comments - if (ch === '#') { - stream.skipToEnd(); - return 'comment'; - } - if(ch==='[') { - state.scopes.push("["); - } - - if(ch==='{') { - state.scopes.push("{"); - } - - var scope=cur_scope(state); - - if(scope==='[' && ch===']') { - state.scopes.pop(); - state.leaving_expr=true; - } - - if(scope==='{' && ch==='}') { - state.scopes.pop(); - state.leaving_expr=true; - } - - var match; - if(match=stream.match(openers, false)) { - state.scopes.push(match); - } - - if(!in_array(state) && stream.match(closers, false)) { - state.scopes.pop(); - } - - if(in_array(state)) { - if(stream.match("end")) { - return 'number'; - } - - } - if(stream.match("=>")) { - return 'operator'; - } - // Handle Number Literals - if (stream.match(/^[0-9\.]/, false)) { - var imMatcher = RegExp(/^im\b/); - var floatLiteral = false; - // Floats - if (stream.match(/^\d*\.\d+([ef][\+\-]?\d+)?/i)) { floatLiteral = true; } - if (stream.match(/^\d+\.\d*/)) { floatLiteral = true; } - if (stream.match(/^\.\d+/)) { floatLiteral = true; } - if (floatLiteral) { - // Float literals may be "imaginary" - stream.match(imMatcher); - return 'number'; - } - // Integers - var intLiteral = false; - // Hex - if (stream.match(/^0x[0-9a-f]+/i)) { intLiteral = true; } - // Binary - if (stream.match(/^0b[01]+/i)) { intLiteral = true; } - // Octal - if (stream.match(/^0o[0-7]+/i)) { intLiteral = true; } - // Decimal - if (stream.match(/^[1-9]\d*(e[\+\-]?\d+)?/)) { - // Decimal literals may be "imaginary" - stream.eat(/J/i); - // TODO - Can you have imaginary longs? - intLiteral = true; - } - // Zero by itself with no other piece of number. - if (stream.match(/^0(?![\dx])/i)) { intLiteral = true; } - if (intLiteral) { - // Integer literals may be "long" - stream.match(imMatcher); - return 'number'; - } - } - - // Handle Strings - if (stream.match(stringPrefixes)) { - state.tokenize = tokenStringFactory(stream.current()); - return state.tokenize(stream, state); - } - - // Handle operators and Delimiters - if (stream.match(operators)) { - return 'operator'; - } - - if (stream.match(delimiters)) { - return null; - } - - if (stream.match(keywords)) { - return 'keyword'; - } - - if (stream.match(builtins)) { - return 'builtin'; - } - - if (stream.match(macro)) { - return 'meta'; - } - - if (stream.match(identifiers)) { - state.leaving_expr=true; - return 'variable'; - } - // Handle non-detected items - stream.next(); - return ERRORCLASS; - } - - function tokenStringFactory(delimiter) { - while ('rub'.indexOf(delimiter.charAt(0).toLowerCase()) >= 0) { - delimiter = delimiter.substr(1); - } - var singleline = delimiter.length == 1; - var OUTCLASS = 'string'; - - function tokenString(stream, state) { - while (!stream.eol()) { - stream.eatWhile(/[^'"\\]/); - if (stream.eat('\\')) { - stream.next(); - if (singleline && stream.eol()) { - return OUTCLASS; - } - } else if (stream.match(delimiter)) { - state.tokenize = tokenBase; - return OUTCLASS; - } else { - stream.eat(/['"]/); - } - } - if (singleline) { - if (parserConf.singleLineStringErrors) { - return ERRORCLASS; - } else { - state.tokenize = tokenBase; - } - } - return OUTCLASS; - } - tokenString.isString = true; - return tokenString; - } - - function tokenLexer(stream, state) { - indentInfo = null; - var style = state.tokenize(stream, state); - var current = stream.current(); - - // Handle '.' connected identifiers - if (current === '.') { - style = stream.match(identifiers, false) ? null : ERRORCLASS; - if (style === null && state.lastStyle === 'meta') { - // Apply 'meta' style to '.' connected identifiers when - // appropriate. - style = 'meta'; - } - return style; - } - - return style; - } - - var external = { - startState: function() { - return { - tokenize: tokenBase, - scopes: [], - leaving_expr: false - }; - }, - - token: function(stream, state) { - var style = tokenLexer(stream, state); - state.lastStyle = style; - return style; - }, - - indent: function(state, textAfter) { - var delta = 0; - if(textAfter=="end" || textAfter=="]" || textAfter=="}" || textAfter=="else" || textAfter=="elseif" || textAfter=="catch" || textAfter=="finally") { - delta = -1; - } - return (state.scopes.length + delta) * 2; - }, - - lineComment: "#", - fold: "indent", - electricChars: "edlsifyh]}" - }; - return external; -}); - - -CodeMirror.defineMIME("text/x-julia", "julia"); diff --git a/plugins/codemirror/codemirror/mode/less/index.html b/plugins/codemirror/codemirror/mode/less/index.html deleted file mode 100644 index 7239143..0000000 --- a/plugins/codemirror/codemirror/mode/less/index.html +++ /dev/null @@ -1,753 +0,0 @@ - - -CodeMirror: LESS mode - - - - - - - - - - - -
    -

    LESS mode

    -
    - - -

    MIME types defined: text/x-less, text/css (if not previously defined).

    -
    diff --git a/plugins/codemirror/codemirror/mode/less/less.js b/plugins/codemirror/codemirror/mode/less/less.js deleted file mode 100644 index da39074..0000000 --- a/plugins/codemirror/codemirror/mode/less/less.js +++ /dev/null @@ -1,346 +0,0 @@ -/* - LESS mode - http://www.lesscss.org/ - Ported to CodeMirror by Peter Kroon - Report bugs/issues here: https://github.com/marijnh/CodeMirror/issues - GitHub: @peterkroon -*/ - -CodeMirror.defineMode("less", function(config) { - var indentUnit = config.indentUnit, type; - function ret(style, tp) {type = tp; return style;} - - var selectors = /(^\:root$|^\:nth\-child$|^\:nth\-last\-child$|^\:nth\-of\-type$|^\:nth\-last\-of\-type$|^\:first\-child$|^\:last\-child$|^\:first\-of\-type$|^\:last\-of\-type$|^\:only\-child$|^\:only\-of\-type$|^\:empty$|^\:link|^\:visited$|^\:active$|^\:hover$|^\:focus$|^\:target$|^\:lang$|^\:enabled^\:disabled$|^\:checked$|^\:first\-line$|^\:first\-letter$|^\:before$|^\:after$|^\:not$|^\:required$|^\:invalid$)/; - - function tokenBase(stream, state) { - var ch = stream.next(); - - if (ch == "@") {stream.eatWhile(/[\w\-]/); return ret("meta", stream.current());} - else if (ch == "/" && stream.eat("*")) { - state.tokenize = tokenCComment; - return tokenCComment(stream, state); - } else if (ch == "<" && stream.eat("!")) { - state.tokenize = tokenSGMLComment; - return tokenSGMLComment(stream, state); - } else if (ch == "=") ret(null, "compare"); - else if (ch == "|" && stream.eat("=")) return ret(null, "compare"); - else if (ch == "\"" || ch == "'") { - state.tokenize = tokenString(ch); - return state.tokenize(stream, state); - } else if (ch == "/") { // e.g.: .png will not be parsed as a class - if(stream.eat("/")){ - state.tokenize = tokenSComment; - return tokenSComment(stream, state); - } else { - if(type == "string" || type == "(") return ret("string", "string"); - if(state.stack[state.stack.length-1] !== undefined) return ret(null, ch); - stream.eatWhile(/[\a-zA-Z0-9\-_.\s]/); - if( /\/|\)|#/.test(stream.peek() || (stream.eatSpace() && stream.peek() === ")")) || stream.eol() )return ret("string", "string"); // let url(/images/logo.png) without quotes return as string - } - } else if (ch == "!") { - stream.match(/^\s*\w*/); - return ret("keyword", "important"); - } else if (/\d/.test(ch)) { - stream.eatWhile(/[\w.%]/); - return ret("number", "unit"); - } else if (/[,+<>*\/]/.test(ch)) { - if(stream.peek() == "=" || type == "a")return ret("string", "string"); - if(ch === ",")return ret(null, ch); - return ret(null, "select-op"); - } else if (/[;{}:\[\]()~\|]/.test(ch)) { - if(ch == ":"){ - stream.eatWhile(/[a-z\\\-]/); - if( selectors.test(stream.current()) ){ - return ret("tag", "tag"); - } else if(stream.peek() == ":"){//::-webkit-search-decoration - stream.next(); - stream.eatWhile(/[a-z\\\-]/); - if(stream.current().match(/\:\:\-(o|ms|moz|webkit)\-/))return ret("string", "string"); - if( selectors.test(stream.current().substring(1)) )return ret("tag", "tag"); - return ret(null, ch); - } else { - return ret(null, ch); - } - } else if(ch == "~"){ - if(type == "r")return ret("string", "string"); - } else { - return ret(null, ch); - } - } else if (ch == ".") { - if(type == "(")return ret("string", "string"); // allow url(../image.png) - stream.eatWhile(/[\a-zA-Z0-9\-_]/); - if(stream.peek() === " ")stream.eatSpace(); - if(stream.peek() === ")" || type === ":")return ret("number", "unit");//rgba(0,0,0,.25); - else if(stream.current().length >1){ - if(state.stack[state.stack.length-1] === "rule" && stream.peek().match(/{|,|\+|\(/) === null)return ret("number", "unit"); - } - return ret("tag", "tag"); - } else if (ch == "#") { - //we don't eat white-space, we want the hex color and or id only - stream.eatWhile(/[A-Za-z0-9]/); - //check if there is a proper hex color length e.g. #eee || #eeeEEE - if(stream.current().length == 4 || stream.current().length == 7){ - if(stream.current().match(/[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}/,false) != null){//is there a valid hex color value present in the current stream - //when not a valid hex value, parse as id - if(stream.current().substring(1) != stream.current().match(/[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}/,false))return ret("atom", "tag"); - //eat white-space - stream.eatSpace(); - //when hex value declaration doesn't end with [;,] but is does with a slash/cc comment treat it as an id, just like the other hex values that don't end with[;,] - if( /[\/<>.(){!$%^&*_\-\\?=+\|#'~`]/.test(stream.peek()) ){ - if(type === "select-op")return ret("number", "unit"); else return ret("atom", "tag"); - } - //#time { color: #aaa } - else if(stream.peek() == "}" )return ret("number", "unit"); - //we have a valid hex color value, parse as id whenever an element/class is defined after the hex(id) value e.g. #eee aaa || #eee .aaa - else if( /[a-zA-Z\\]/.test(stream.peek()) )return ret("atom", "tag"); - //when a hex value is on the end of a line, parse as id - else if(stream.eol())return ret("atom", "tag"); - //default - else return ret("number", "unit"); - } else {//when not a valid hexvalue in the current stream e.g. #footer - stream.eatWhile(/[\w\\\-]/); - return ret("atom", stream.current()); - } - } else {//when not a valid hexvalue length - stream.eatWhile(/[\w\\\-]/); - if(state.stack[state.stack.length-1] === "rule")return ret("atom", stream.current());return ret("atom", stream.current()); - return ret("atom", "tag"); - } - } else if (ch == "&") { - stream.eatWhile(/[\w\-]/); - return ret(null, ch); - } else { - stream.eatWhile(/[\w\\\-_%.{]/); - if(stream.current().match(/\\/) !== null){ - if(stream.current().charAt(stream.current().length-1) === "\\"){ - stream.eat(/\'|\"|\)|\(/); - while(stream.eatWhile(/[\w\\\-_%.{]/)){ - stream.eat(/\'|\"|\)|\(/); - } - return ret("string", stream.current()); - } - } //else if(type === "tag")return ret("tag", "tag"); - else if(type == "string"){ - if(state.stack[state.stack.length-1] === "{" && stream.peek() === ":")return ret("variable", "variable"); - if(stream.peek() === "/")stream.eatWhile(/[\w\\\-_%.{:\/]/); - return ret(type, stream.current()); - } else if(stream.current().match(/(^http$|^https$)/) != null){ - stream.eatWhile(/[\w\\\-_%.{:\/]/); - if(stream.peek() === "/")stream.eatWhile(/[\w\\\-_%.{:\/]/); - return ret("string", "string"); - } else if(stream.peek() == "<" || stream.peek() == ">" || stream.peek() == "+"){ - if(type === "(" && (stream.current() === "n" || stream.current() === "-n"))return ret("string", stream.current()); - return ret("tag", "tag"); - } else if( /\(/.test(stream.peek()) ){ - if(stream.current() === "when")return ret("variable","variable"); - else if(state.stack[state.stack.length-1] === "@media" && stream.current() === "and")return ret("variable",stream.current()); - return ret(null, ch); - } else if (stream.peek() == "/" && state.stack[state.stack.length-1] !== undefined){ // url(dir/center/image.png) - if(stream.peek() === "/")stream.eatWhile(/[\w\\\-_%.{:\/]/); - return ret("string", stream.current()); - } else if( stream.current().match(/\-\d|\-.\d/) ){ // match e.g.: -5px -0.4 etc... only colorize the minus sign - //commment out these 2 comment if you want the minus sign to be parsed as null -500px - //stream.backUp(stream.current().length-1); - //return ret(null, ch); - return ret("number", "unit"); - } else if( /\/|[\s\)]/.test(stream.peek() || stream.eol() || (stream.eatSpace() && stream.peek() == "/")) && stream.current().indexOf(".") !== -1){ - if(stream.current().substring(stream.current().length-1,stream.current().length) == "{"){ - stream.backUp(1); - return ret("tag", "tag"); - }//end if - stream.eatSpace(); - if( /[{<>.a-zA-Z\/]/.test(stream.peek()) || stream.eol() )return ret("tag", "tag"); // e.g. button.icon-plus - return ret("string", "string"); // let url(/images/logo.png) without quotes return as string - } else if( stream.eol() || stream.peek() == "[" || stream.peek() == "#" || type == "tag" ){ - - if(stream.current().substring(stream.current().length-1,stream.current().length) == "{")stream.backUp(1); - else if(state.stack[state.stack.length-1] === "border-color" || state.stack[state.stack.length-1] === "background-position" || state.stack[state.stack.length-1] === "font-family")return ret(null, stream.current()); - else if(type === "tag")return ret("tag", "tag"); - else if((type === ":" || type === "unit") && state.stack[state.stack.length-1] === "rule")return ret(null, stream.current()); - else if(state.stack[state.stack.length-1] === "rule" && type === "tag")return ret("string", stream.current()); - else if(state.stack[state.stack.length-1] === ";" && type === ":")return ret(null, stream.current()); - //else if(state.stack[state.stack.length-1] === ";" || type === "")return ret("variable", stream.current()); - else if(stream.peek() === "#" && type !== undefined && type.match(/\+|,|tag|select\-op|}|{|;/g) === null)return ret("string", stream.current()); - else if(type === "variable")return ret(null, stream.current()); - else if(state.stack[state.stack.length-1] === "{" && type === "comment")return ret("variable", stream.current()); - else if(state.stack.length === 0 && (type === ";" || type === "comment"))return ret("tag", stream.current()); - else if((state.stack[state.stack.length-1] === "{" || type === ";") && state.stack[state.stack.length-1] !== "@media{")return ret("variable", stream.current()); - else if(state.stack[state.stack.length-2] === "{" && state.stack[state.stack.length-1] === ";")return ret("variable", stream.current()); - - return ret("tag", "tag"); - } else if(type == "compare" || type == "a" || type == "("){ - return ret("string", "string"); - } else if(type == "|" || stream.current() == "-" || type == "["){ - if(type == "|" && stream.peek().match(/\]|=|\~/) !== null)return ret("number", stream.current()); - else if(type == "|" )return ret("tag", "tag"); - else if(type == "["){ - stream.eatWhile(/\w\-/); - return ret("number", stream.current()); - } - return ret(null, ch); - } else if((stream.peek() == ":") || ( stream.eatSpace() && stream.peek() == ":")) { - stream.next(); - var t_v = stream.peek() == ":" ? true : false; - if(!t_v){ - var old_pos = stream.pos; - var sc = stream.current().length; - stream.eatWhile(/[a-z\\\-]/); - var new_pos = stream.pos; - if(stream.current().substring(sc-1).match(selectors) != null){ - stream.backUp(new_pos-(old_pos-1)); - return ret("tag", "tag"); - } else stream.backUp(new_pos-(old_pos-1)); - } else { - stream.backUp(1); - } - if(t_v)return ret("tag", "tag"); else return ret("variable", "variable"); - } else if(state.stack[state.stack.length-1] === "font-family" || state.stack[state.stack.length-1] === "background-position" || state.stack[state.stack.length-1] === "border-color"){ - return ret(null, null); - } else { - - if(state.stack[state.stack.length-1] === null && type === ":")return ret(null, stream.current()); - - //else if((type === ")" && state.stack[state.stack.length-1] === "rule") || (state.stack[state.stack.length-2] === "{" && state.stack[state.stack.length-1] === "rule" && type === "variable"))return ret(null, stream.current()); - - else if(/\^|\$/.test(stream.current()) && stream.peek().match(/\~|=/) !== null)return ret("string", "string");//att^=val - - else if(type === "unit" && state.stack[state.stack.length-1] === "rule")return ret(null, "unit"); - else if(type === "unit" && state.stack[state.stack.length-1] === ";")return ret(null, "unit"); - else if(type === ")" && state.stack[state.stack.length-1] === "rule")return ret(null, "unit"); - else if(type && type.match("@") !== null && state.stack[state.stack.length-1] === "rule")return ret(null, "unit"); - //else if(type === "unit" && state.stack[state.stack.length-1] === "rule")return ret(null, stream.current()); - - else if((type === ";" || type === "}" || type === ",") && state.stack[state.stack.length-1] === ";")return ret("tag", stream.current()); - else if((type === ";" && stream.peek() !== undefined && stream.peek().match(/{|./) === null) || (type === ";" && stream.eatSpace() && stream.peek().match(/{|./) === null))return ret("variable", stream.current()); - else if((type === "@media" && state.stack[state.stack.length-1] === "@media") || type === "@namespace")return ret("tag", stream.current()); - - else if(type === "{" && state.stack[state.stack.length-1] === ";" && stream.peek() === "{")return ret("tag", "tag"); - else if((type === "{" || type === ":") && state.stack[state.stack.length-1] === ";")return ret(null, stream.current()); - else if((state.stack[state.stack.length-1] === "{" && stream.eatSpace() && stream.peek().match(/.|#/) === null) || type === "select-op" || (state.stack[state.stack.length-1] === "rule" && type === ",") )return ret("tag", "tag"); - else if(type === "variable" && state.stack[state.stack.length-1] === "rule")return ret("tag", "tag"); - else if((stream.eatSpace() && stream.peek() === "{") || stream.eol() || stream.peek() === "{")return ret("tag", "tag"); - //this one messes up indentation - //else if((type === "}" && stream.peek() !== ":") || (type === "}" && stream.eatSpace() && stream.peek() !== ":"))return(type, "tag"); - - else if(type === ")" && (stream.current() == "and" || stream.current() == "and "))return ret("variable", "variable"); - else if(type === ")" && (stream.current() == "when" || stream.current() == "when "))return ret("variable", "variable"); - else if(type === ")" || type === "comment" || type === "{")return ret("tag", "tag"); - else if(stream.sol())return ret("tag", "tag"); - else if((stream.eatSpace() && stream.peek() === "#") || stream.peek() === "#")return ret("tag", "tag"); - else if(state.stack.length === 0)return ret("tag", "tag"); - else if(type === ";" && stream.peek() !== undefined && stream.peek().match(/^[.|\#]/g) !== null)return ret("tag", "tag"); - - else if(type === ":"){stream.eatSpace();return ret(null, stream.current());} - - else if(stream.current() === "and " || stream.current() === "and")return ret("variable", stream.current()); - else if(type === ";" && state.stack[state.stack.length-1] === "{")return ret("variable", stream.current()); - - else if(state.stack[state.stack.length-1] === "rule")return ret(null, stream.current()); - - return ret("tag", stream.current()); - } - } - } - - function tokenSComment(stream, state) { // SComment = Slash comment - stream.skipToEnd(); - state.tokenize = tokenBase; - return ret("comment", "comment"); - } - - function tokenCComment(stream, state) { - var maybeEnd = false, ch; - while ((ch = stream.next()) != null) { - if (maybeEnd && ch == "/") { - state.tokenize = tokenBase; - break; - } - maybeEnd = (ch == "*"); - } - return ret("comment", "comment"); - } - - function tokenSGMLComment(stream, state) { - var dashes = 0, ch; - while ((ch = stream.next()) != null) { - if (dashes >= 2 && ch == ">") { - state.tokenize = tokenBase; - break; - } - dashes = (ch == "-") ? dashes + 1 : 0; - } - return ret("comment", "comment"); - } - - function tokenString(quote) { - return function(stream, state) { - var escaped = false, ch; - while ((ch = stream.next()) != null) { - if (ch == quote && !escaped) - break; - escaped = !escaped && ch == "\\"; - } - if (!escaped) state.tokenize = tokenBase; - return ret("string", "string"); - }; - } - - return { - startState: function(base) { - return {tokenize: tokenBase, - baseIndent: base || 0, - stack: []}; - }, - - token: function(stream, state) { - if (stream.eatSpace()) return null; - var style = state.tokenize(stream, state); - - var context = state.stack[state.stack.length-1]; - if (type == "hash" && context == "rule") style = "atom"; - else if (style == "variable") { - if (context == "rule") style = null; //"tag" - else if (!context || context == "@media{") { - style = stream.current() == "when" ? "variable" : - /[\s,|\s\)|\s]/.test(stream.peek()) ? "tag" : type; - } - } - - if (context == "rule" && /^[\{\};]$/.test(type)) - state.stack.pop(); - if (type == "{") { - if (context == "@media") state.stack[state.stack.length-1] = "@media{"; - else state.stack.push("{"); - } - else if (type == "}") state.stack.pop(); - else if (type == "@media") state.stack.push("@media"); - else if (stream.current() === "font-family") state.stack[state.stack.length-1] = "font-family"; - else if (stream.current() === "background-position") state.stack[state.stack.length-1] = "background-position"; - else if (stream.current() === "border-color") state.stack[state.stack.length-1] = "border-color"; - else if (context == "{" && type != "comment" && type !== "tag") state.stack.push("rule"); - else if (stream.peek() === ":" && stream.current().match(/@|#/) === null) style = type; - if(type === ";" && (state.stack[state.stack.length-1] == "font-family" || state.stack[state.stack.length-1] == "background-position" || state.stack[state.stack.length-1] == "border-color"))state.stack[state.stack.length-1] = stream.current(); - else if(type === "tag" && stream.peek() === ")" && stream.current().match(/\:/) === null){type = null; style = null;} - // ???? - else if((type === "variable" && stream.peek() === ")") || (type === "variable" && stream.eatSpace() && stream.peek() === ")"))return ret(null,stream.current()); - return style; - }, - - indent: function(state, textAfter) { - var n = state.stack.length; - if (/^\}/.test(textAfter)) - n -= state.stack[state.stack.length-1] === "rule" ? 2 : 1; - else if (state.stack[state.stack.length-2] === "{") - n -= state.stack[state.stack.length-1] === "rule" ? 1 : 0; - return state.baseIndent + n * indentUnit; - }, - - electricChars: "}", - blockCommentStart: "/*", - blockCommentEnd: "*/", - lineComment: "//" - }; -}); - -CodeMirror.defineMIME("text/x-less", "less"); -if (!CodeMirror.mimeModes.hasOwnProperty("text/css")) - CodeMirror.defineMIME("text/css", "less"); diff --git a/plugins/codemirror/codemirror/mode/livescript/index.html b/plugins/codemirror/codemirror/mode/livescript/index.html deleted file mode 100644 index b594469..0000000 --- a/plugins/codemirror/codemirror/mode/livescript/index.html +++ /dev/null @@ -1,459 +0,0 @@ - - -CodeMirror: LiveScript mode - - - - - - - - - - -
    -

    LiveScript mode

    -
    - - -

    MIME types defined: text/x-livescript.

    - -

    The LiveScript mode was written by Kenneth Bentley (license).

    - -
    diff --git a/plugins/codemirror/codemirror/mode/livescript/livescript.js b/plugins/codemirror/codemirror/mode/livescript/livescript.js deleted file mode 100644 index c000324..0000000 --- a/plugins/codemirror/codemirror/mode/livescript/livescript.js +++ /dev/null @@ -1,267 +0,0 @@ -/** - * Link to the project's GitHub page: - * https://github.com/duralog/CodeMirror - */ -(function() { - CodeMirror.defineMode('livescript', function(){ - var tokenBase, external; - tokenBase = function(stream, state){ - var next_rule, nr, i$, len$, r, m; - if (next_rule = state.next || 'start') { - state.next = state.next; - if (Array.isArray(nr = Rules[next_rule])) { - for (i$ = 0, len$ = nr.length; i$ < len$; ++i$) { - r = nr[i$]; - if (r.regex && (m = stream.match(r.regex))) { - state.next = r.next; - return r.token; - } - } - stream.next(); - return 'error'; - } - if (stream.match(r = Rules[next_rule])) { - if (r.regex && stream.match(r.regex)) { - state.next = r.next; - return r.token; - } else { - stream.next(); - return 'error'; - } - } - } - stream.next(); - return 'error'; - }; - external = { - startState: function(){ - return { - next: 'start', - lastToken: null - }; - }, - token: function(stream, state){ - var style; - style = tokenBase(stream, state); - state.lastToken = { - style: style, - indent: stream.indentation(), - content: stream.current() - }; - return style.replace(/\./g, ' '); - }, - indent: function(state){ - var indentation; - indentation = state.lastToken.indent; - if (state.lastToken.content.match(indenter)) { - indentation += 2; - } - return indentation; - } - }; - return external; - }); - - var identifier = '(?![\\d\\s])[$\\w\\xAA-\\uFFDC](?:(?!\\s)[$\\w\\xAA-\\uFFDC]|-[A-Za-z])*'; - var indenter = RegExp('(?:[({[=:]|[-~]>|\\b(?:e(?:lse|xport)|d(?:o|efault)|t(?:ry|hen)|finally|import(?:\\s*all)?|const|var|let|new|catch(?:\\s*' + identifier + ')?))\\s*$'); - var keywordend = '(?![$\\w]|-[A-Za-z]|\\s*:(?![:=]))'; - var stringfill = { - token: 'string', - regex: '.+' - }; - var Rules = { - start: [ - { - token: 'comment.doc', - regex: '/\\*', - next: 'comment' - }, { - token: 'comment', - regex: '#.*' - }, { - token: 'keyword', - regex: '(?:t(?:h(?:is|row|en)|ry|ypeof!?)|c(?:on(?:tinue|st)|a(?:se|tch)|lass)|i(?:n(?:stanceof)?|mp(?:ort(?:\\s+all)?|lements)|[fs])|d(?:e(?:fault|lete|bugger)|o)|f(?:or(?:\\s+own)?|inally|unction)|s(?:uper|witch)|e(?:lse|x(?:tends|port)|val)|a(?:nd|rguments)|n(?:ew|ot)|un(?:less|til)|w(?:hile|ith)|o[fr]|return|break|let|var|loop)' + keywordend - }, { - token: 'constant.language', - regex: '(?:true|false|yes|no|on|off|null|void|undefined)' + keywordend - }, { - token: 'invalid.illegal', - regex: '(?:p(?:ackage|r(?:ivate|otected)|ublic)|i(?:mplements|nterface)|enum|static|yield)' + keywordend - }, { - token: 'language.support.class', - regex: '(?:R(?:e(?:gExp|ferenceError)|angeError)|S(?:tring|yntaxError)|E(?:rror|valError)|Array|Boolean|Date|Function|Number|Object|TypeError|URIError)' + keywordend - }, { - token: 'language.support.function', - regex: '(?:is(?:NaN|Finite)|parse(?:Int|Float)|Math|JSON|(?:en|de)codeURI(?:Component)?)' + keywordend - }, { - token: 'variable.language', - regex: '(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)' + keywordend - }, { - token: 'identifier', - regex: identifier + '\\s*:(?![:=])' - }, { - token: 'variable', - regex: identifier - }, { - token: 'keyword.operator', - regex: '(?:\\.{3}|\\s+\\?)' - }, { - token: 'keyword.variable', - regex: '(?:@+|::|\\.\\.)', - next: 'key' - }, { - token: 'keyword.operator', - regex: '\\.\\s*', - next: 'key' - }, { - token: 'string', - regex: '\\\\\\S[^\\s,;)}\\]]*' - }, { - token: 'string.doc', - regex: '\'\'\'', - next: 'qdoc' - }, { - token: 'string.doc', - regex: '"""', - next: 'qqdoc' - }, { - token: 'string', - regex: '\'', - next: 'qstring' - }, { - token: 'string', - regex: '"', - next: 'qqstring' - }, { - token: 'string', - regex: '`', - next: 'js' - }, { - token: 'string', - regex: '<\\[', - next: 'words' - }, { - token: 'string.regex', - regex: '//', - next: 'heregex' - }, { - token: 'string.regex', - regex: '\\/(?:[^[\\/\\n\\\\]*(?:(?:\\\\.|\\[[^\\]\\n\\\\]*(?:\\\\.[^\\]\\n\\\\]*)*\\])[^[\\/\\n\\\\]*)*)\\/[gimy$]{0,4}', - next: 'key' - }, { - token: 'constant.numeric', - regex: '(?:0x[\\da-fA-F][\\da-fA-F_]*|(?:[2-9]|[12]\\d|3[0-6])r[\\da-zA-Z][\\da-zA-Z_]*|(?:\\d[\\d_]*(?:\\.\\d[\\d_]*)?|\\.\\d[\\d_]*)(?:e[+-]?\\d[\\d_]*)?[\\w$]*)' - }, { - token: 'lparen', - regex: '[({[]' - }, { - token: 'rparen', - regex: '[)}\\]]', - next: 'key' - }, { - token: 'keyword.operator', - regex: '\\S+' - }, { - token: 'text', - regex: '\\s+' - } - ], - heregex: [ - { - token: 'string.regex', - regex: '.*?//[gimy$?]{0,4}', - next: 'start' - }, { - token: 'string.regex', - regex: '\\s*#{' - }, { - token: 'comment.regex', - regex: '\\s+(?:#.*)?' - }, { - token: 'string.regex', - regex: '\\S+' - } - ], - key: [ - { - token: 'keyword.operator', - regex: '[.?@!]+' - }, { - token: 'identifier', - regex: identifier, - next: 'start' - }, { - token: 'text', - regex: '.', - next: 'start' - } - ], - comment: [ - { - token: 'comment.doc', - regex: '.*?\\*/', - next: 'start' - }, { - token: 'comment.doc', - regex: '.+' - } - ], - qdoc: [ - { - token: 'string', - regex: ".*?'''", - next: 'key' - }, stringfill - ], - qqdoc: [ - { - token: 'string', - regex: '.*?"""', - next: 'key' - }, stringfill - ], - qstring: [ - { - token: 'string', - regex: '[^\\\\\']*(?:\\\\.[^\\\\\']*)*\'', - next: 'key' - }, stringfill - ], - qqstring: [ - { - token: 'string', - regex: '[^\\\\"]*(?:\\\\.[^\\\\"]*)*"', - next: 'key' - }, stringfill - ], - js: [ - { - token: 'string', - regex: '[^\\\\`]*(?:\\\\.[^\\\\`]*)*`', - next: 'key' - }, stringfill - ], - words: [ - { - token: 'string', - regex: '.*?\\]>', - next: 'key' - }, stringfill - ] - }; - for (var idx in Rules) { - var r = Rules[idx]; - if (Array.isArray(r)) { - for (var i = 0, len = r.length; i < len; ++i) { - var rr = r[i]; - if (rr.regex) { - Rules[idx][i].regex = new RegExp('^' + rr.regex); - } - } - } else if (r.regex) { - Rules[idx].regex = new RegExp('^' + r.regex); - } - } -})(); - -CodeMirror.defineMIME('text/x-livescript', 'livescript'); diff --git a/plugins/codemirror/codemirror/mode/livescript/livescript.ls b/plugins/codemirror/codemirror/mode/livescript/livescript.ls deleted file mode 100644 index 0652423..0000000 --- a/plugins/codemirror/codemirror/mode/livescript/livescript.ls +++ /dev/null @@ -1,266 +0,0 @@ -/** - * Link to the project's GitHub page: - * https://github.com/duralog/CodeMirror - */ -CodeMirror.defineMode 'livescript', (conf) -> - tokenBase = (stream, state) -> - #indent = - if next_rule = state.next or \start - state.next = state.next - if Array.isArray nr = Rules[next_rule] - for r in nr - if r.regex and m = stream.match r.regex - state.next = r.next - return r.token - stream.next! - return \error - if stream.match r = Rules[next_rule] - if r.regex and stream.match r.regex - state.next = r.next - return r.token - else - stream.next! - return \error - stream.next! - return 'error' - external = { - startState: (basecolumn) -> - { - next: \start - lastToken: null - } - token: (stream, state) -> - style = tokenBase stream, state #tokenLexer stream, state - state.lastToken = { - style: style - indent: stream.indentation! - content: stream.current! - } - style.replace /\./g, ' ' - indent: (state, textAfter) -> - # XXX this won't work with backcalls - indentation = state.lastToken.indent - if state.lastToken.content.match indenter then indentation += 2 - return indentation - } - external - -### Highlight Rules -# taken from mode-ls.ls - -indenter = // (? - : [({[=:] - | [-~]> - | \b (?: e(?:lse|xport) | d(?:o|efault) | t(?:ry|hen) | finally | - import (?:\s* all)? | const | var | - let | new | catch (?:\s* #identifier)? ) - ) \s* $ // - -identifier = /(?![\d\s])[$\w\xAA-\uFFDC](?:(?!\s)[$\w\xAA-\uFFDC]|-[A-Za-z])*/$ -keywordend = /(?![$\w]|-[A-Za-z]|\s*:(?![:=]))/$ -stringfill = token: \string, regex: '.+' - -Rules = - start: - * token: \comment.doc - regex: '/\\*' - next : \comment - - * token: \comment - regex: '#.*' - - * token: \keyword - regex: //(? - :t(?:h(?:is|row|en)|ry|ypeof!?) - |c(?:on(?:tinue|st)|a(?:se|tch)|lass) - |i(?:n(?:stanceof)?|mp(?:ort(?:\s+all)?|lements)|[fs]) - |d(?:e(?:fault|lete|bugger)|o) - |f(?:or(?:\s+own)?|inally|unction) - |s(?:uper|witch) - |e(?:lse|x(?:tends|port)|val) - |a(?:nd|rguments) - |n(?:ew|ot) - |un(?:less|til) - |w(?:hile|ith) - |o[fr]|return|break|let|var|loop - )//$ + keywordend - - * token: \constant.language - regex: '(?:true|false|yes|no|on|off|null|void|undefined)' + keywordend - - * token: \invalid.illegal - regex: '(? - :p(?:ackage|r(?:ivate|otected)|ublic) - |i(?:mplements|nterface) - |enum|static|yield - )' + keywordend - - * token: \language.support.class - regex: '(? - :R(?:e(?:gExp|ferenceError)|angeError) - |S(?:tring|yntaxError) - |E(?:rror|valError) - |Array|Boolean|Date|Function|Number|Object|TypeError|URIError - )' + keywordend - - * token: \language.support.function - regex: '(? - :is(?:NaN|Finite) - |parse(?:Int|Float) - |Math|JSON - |(?:en|de)codeURI(?:Component)? - )' + keywordend - - * token: \variable.language - regex: '(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)' + keywordend - - * token: \identifier - regex: identifier + /\s*:(?![:=])/$ - - * token: \variable - regex: identifier - - * token: \keyword.operator - regex: /(?:\.{3}|\s+\?)/$ - - * token: \keyword.variable - regex: /(?:@+|::|\.\.)/$ - next : \key - - * token: \keyword.operator - regex: /\.\s*/$ - next : \key - - * token: \string - regex: /\\\S[^\s,;)}\]]*/$ - - * token: \string.doc - regex: \''' - next : \qdoc - - * token: \string.doc - regex: \""" - next : \qqdoc - - * token: \string - regex: \' - next : \qstring - - * token: \string - regex: \" - next : \qqstring - - * token: \string - regex: \` - next : \js - - * token: \string - regex: '<\\[' - next : \words - - * token: \string.regex - regex: \// - next : \heregex - - * token: \string.regex - regex: // - /(?: [^ [ / \n \\ ]* - (?: (?: \\. - | \[ [^\]\n\\]* (?:\\.[^\]\n\\]*)* \] - ) [^ [ / \n \\ ]* - )* - )/ [gimy$]{0,4} - //$ - next : \key - - * token: \constant.numeric - regex: '(?:0x[\\da-fA-F][\\da-fA-F_]* - |(?:[2-9]|[12]\\d|3[0-6])r[\\da-zA-Z][\\da-zA-Z_]* - |(?:\\d[\\d_]*(?:\\.\\d[\\d_]*)?|\\.\\d[\\d_]*) - (?:e[+-]?\\d[\\d_]*)?[\\w$]*)' - - * token: \lparen - regex: '[({[]' - - * token: \rparen - regex: '[)}\\]]' - next : \key - - * token: \keyword.operator - regex: \\\S+ - - * token: \text - regex: \\\s+ - - heregex: - * token: \string.regex - regex: '.*?//[gimy$?]{0,4}' - next : \start - * token: \string.regex - regex: '\\s*#{' - * token: \comment.regex - regex: '\\s+(?:#.*)?' - * token: \string.regex - regex: '\\S+' - - key: - * token: \keyword.operator - regex: '[.?@!]+' - * token: \identifier - regex: identifier - next : \start - * token: \text - regex: '.' - next : \start - - comment: - * token: \comment.doc - regex: '.*?\\*/' - next : \start - * token: \comment.doc - regex: '.+' - - qdoc: - token: \string - regex: ".*?'''" - next : \key - stringfill - - qqdoc: - token: \string - regex: '.*?"""' - next : \key - stringfill - - qstring: - token: \string - regex: /[^\\']*(?:\\.[^\\']*)*'/$ - next : \key - stringfill - - qqstring: - token: \string - regex: /[^\\"]*(?:\\.[^\\"]*)*"/$ - next : \key - stringfill - - js: - token: \string - regex: /[^\\`]*(?:\\.[^\\`]*)*`/$ - next : \key - stringfill - - words: - token: \string - regex: '.*?\\]>' - next : \key - stringfill - -# for optimization, precompile the regexps -for idx, r of Rules - if Array.isArray r - for rr, i in r - if rr.regex then Rules[idx][i].regex = new RegExp '^'+rr.regex - else if r.regex then Rules[idx].regex = new RegExp '^'+r.regex - -CodeMirror.defineMIME 'text/x-livescript', 'livescript' diff --git a/plugins/codemirror/codemirror/mode/lua/index.html b/plugins/codemirror/codemirror/mode/lua/index.html deleted file mode 100644 index 69433e4..0000000 --- a/plugins/codemirror/codemirror/mode/lua/index.html +++ /dev/null @@ -1,86 +0,0 @@ - - -CodeMirror: Lua mode - - - - - - - - - - - -
    -

    Lua mode

    -
    - - -

    Loosely based on Franciszek - Wawrzak's CodeMirror - 1 mode. One configuration parameter is - supported, specials, to which you can provide an - array of strings to have those identifiers highlighted with - the lua-special style.

    -

    MIME types defined: text/x-lua.

    - -
    diff --git a/plugins/codemirror/codemirror/mode/lua/lua.js b/plugins/codemirror/codemirror/mode/lua/lua.js deleted file mode 100644 index b8deaa2..0000000 --- a/plugins/codemirror/codemirror/mode/lua/lua.js +++ /dev/null @@ -1,144 +0,0 @@ -// LUA mode. Ported to CodeMirror 2 from Franciszek Wawrzak's -// CodeMirror 1 mode. -// highlights keywords, strings, comments (no leveling supported! ("[==[")), tokens, basic indenting - -CodeMirror.defineMode("lua", function(config, parserConfig) { - var indentUnit = config.indentUnit; - - function prefixRE(words) { - return new RegExp("^(?:" + words.join("|") + ")", "i"); - } - function wordRE(words) { - return new RegExp("^(?:" + words.join("|") + ")$", "i"); - } - var specials = wordRE(parserConfig.specials || []); - - // long list of standard functions from lua manual - var builtins = wordRE([ - "_G","_VERSION","assert","collectgarbage","dofile","error","getfenv","getmetatable","ipairs","load", - "loadfile","loadstring","module","next","pairs","pcall","print","rawequal","rawget","rawset","require", - "select","setfenv","setmetatable","tonumber","tostring","type","unpack","xpcall", - - "coroutine.create","coroutine.resume","coroutine.running","coroutine.status","coroutine.wrap","coroutine.yield", - - "debug.debug","debug.getfenv","debug.gethook","debug.getinfo","debug.getlocal","debug.getmetatable", - "debug.getregistry","debug.getupvalue","debug.setfenv","debug.sethook","debug.setlocal","debug.setmetatable", - "debug.setupvalue","debug.traceback", - - "close","flush","lines","read","seek","setvbuf","write", - - "io.close","io.flush","io.input","io.lines","io.open","io.output","io.popen","io.read","io.stderr","io.stdin", - "io.stdout","io.tmpfile","io.type","io.write", - - "math.abs","math.acos","math.asin","math.atan","math.atan2","math.ceil","math.cos","math.cosh","math.deg", - "math.exp","math.floor","math.fmod","math.frexp","math.huge","math.ldexp","math.log","math.log10","math.max", - "math.min","math.modf","math.pi","math.pow","math.rad","math.random","math.randomseed","math.sin","math.sinh", - "math.sqrt","math.tan","math.tanh", - - "os.clock","os.date","os.difftime","os.execute","os.exit","os.getenv","os.remove","os.rename","os.setlocale", - "os.time","os.tmpname", - - "package.cpath","package.loaded","package.loaders","package.loadlib","package.path","package.preload", - "package.seeall", - - "string.byte","string.char","string.dump","string.find","string.format","string.gmatch","string.gsub", - "string.len","string.lower","string.match","string.rep","string.reverse","string.sub","string.upper", - - "table.concat","table.insert","table.maxn","table.remove","table.sort" - ]); - var keywords = wordRE(["and","break","elseif","false","nil","not","or","return", - "true","function", "end", "if", "then", "else", "do", - "while", "repeat", "until", "for", "in", "local" ]); - - var indentTokens = wordRE(["function", "if","repeat","do", "\\(", "{"]); - var dedentTokens = wordRE(["end", "until", "\\)", "}"]); - var dedentPartial = prefixRE(["end", "until", "\\)", "}", "else", "elseif"]); - - function readBracket(stream) { - var level = 0; - while (stream.eat("=")) ++level; - stream.eat("["); - return level; - } - - function normal(stream, state) { - var ch = stream.next(); - if (ch == "-" && stream.eat("-")) { - if (stream.eat("[") && stream.eat("[")) - return (state.cur = bracketed(readBracket(stream), "comment"))(stream, state); - stream.skipToEnd(); - return "comment"; - } - if (ch == "\"" || ch == "'") - return (state.cur = string(ch))(stream, state); - if (ch == "[" && /[\[=]/.test(stream.peek())) - return (state.cur = bracketed(readBracket(stream), "string"))(stream, state); - if (/\d/.test(ch)) { - stream.eatWhile(/[\w.%]/); - return "number"; - } - if (/[\w_]/.test(ch)) { - stream.eatWhile(/[\w\\\-_.]/); - return "variable"; - } - return null; - } - - function bracketed(level, style) { - return function(stream, state) { - var curlev = null, ch; - while ((ch = stream.next()) != null) { - if (curlev == null) {if (ch == "]") curlev = 0;} - else if (ch == "=") ++curlev; - else if (ch == "]" && curlev == level) { state.cur = normal; break; } - else curlev = null; - } - return style; - }; - } - - function string(quote) { - return function(stream, state) { - var escaped = false, ch; - while ((ch = stream.next()) != null) { - if (ch == quote && !escaped) break; - escaped = !escaped && ch == "\\"; - } - if (!escaped) state.cur = normal; - return "string"; - }; - } - - return { - startState: function(basecol) { - return {basecol: basecol || 0, indentDepth: 0, cur: normal}; - }, - - token: function(stream, state) { - if (stream.eatSpace()) return null; - var style = state.cur(stream, state); - var word = stream.current(); - if (style == "variable") { - if (keywords.test(word)) style = "keyword"; - else if (builtins.test(word)) style = "builtin"; - else if (specials.test(word)) style = "variable-2"; - } - if ((style != "comment") && (style != "string")){ - if (indentTokens.test(word)) ++state.indentDepth; - else if (dedentTokens.test(word)) --state.indentDepth; - } - return style; - }, - - indent: function(state, textAfter) { - var closing = dedentPartial.test(textAfter); - return state.basecol + indentUnit * (state.indentDepth - (closing ? 1 : 0)); - }, - - lineComment: "--", - blockCommentStart: "--[[", - blockCommentEnd: "]]" - }; -}); - -CodeMirror.defineMIME("text/x-lua", "lua"); diff --git a/plugins/codemirror/codemirror/mode/markdown/index.html b/plugins/codemirror/codemirror/mode/markdown/index.html deleted file mode 100644 index a6b541e..0000000 --- a/plugins/codemirror/codemirror/mode/markdown/index.html +++ /dev/null @@ -1,359 +0,0 @@ - - -CodeMirror: Markdown mode - - - - - - - - - - - -
    -

    Markdown mode

    -
    - - - -

    Optionally depends on the XML mode for properly highlighted inline XML blocks.

    - -

    MIME types defined: text/x-markdown.

    - -

    Parsing/Highlighting Tests: normal, verbose.

    - -
    diff --git a/plugins/codemirror/codemirror/mode/markdown/markdown.js b/plugins/codemirror/codemirror/mode/markdown/markdown.js deleted file mode 100644 index 218408f..0000000 --- a/plugins/codemirror/codemirror/mode/markdown/markdown.js +++ /dev/null @@ -1,560 +0,0 @@ -CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) { - - var htmlFound = CodeMirror.modes.hasOwnProperty("xml"); - var htmlMode = CodeMirror.getMode(cmCfg, htmlFound ? {name: "xml", htmlMode: true} : "text/plain"); - var aliases = { - html: "htmlmixed", - js: "javascript", - json: "application/json", - c: "text/x-csrc", - "c++": "text/x-c++src", - java: "text/x-java", - csharp: "text/x-csharp", - "c#": "text/x-csharp", - scala: "text/x-scala" - }; - - var getMode = (function () { - var i, modes = {}, mimes = {}, mime; - - var list = []; - for (var m in CodeMirror.modes) - if (CodeMirror.modes.propertyIsEnumerable(m)) list.push(m); - for (i = 0; i < list.length; i++) { - modes[list[i]] = list[i]; - } - var mimesList = []; - for (var m in CodeMirror.mimeModes) - if (CodeMirror.mimeModes.propertyIsEnumerable(m)) - mimesList.push({mime: m, mode: CodeMirror.mimeModes[m]}); - for (i = 0; i < mimesList.length; i++) { - mime = mimesList[i].mime; - mimes[mime] = mimesList[i].mime; - } - - for (var a in aliases) { - if (aliases[a] in modes || aliases[a] in mimes) - modes[a] = aliases[a]; - } - - return function (lang) { - return modes[lang] ? CodeMirror.getMode(cmCfg, modes[lang]) : null; - }; - }()); - - // Should underscores in words open/close em/strong? - if (modeCfg.underscoresBreakWords === undefined) - modeCfg.underscoresBreakWords = true; - - // Turn on fenced code blocks? ("```" to start/end) - if (modeCfg.fencedCodeBlocks === undefined) modeCfg.fencedCodeBlocks = false; - - // Turn on task lists? ("- [ ] " and "- [x] ") - if (modeCfg.taskLists === undefined) modeCfg.taskLists = false; - - var codeDepth = 0; - - var header = 'header' - , code = 'comment' - , quote1 = 'atom' - , quote2 = 'number' - , list1 = 'variable-2' - , list2 = 'variable-3' - , list3 = 'keyword' - , hr = 'hr' - , image = 'tag' - , linkinline = 'link' - , linkemail = 'link' - , linktext = 'link' - , linkhref = 'string' - , em = 'em' - , strong = 'strong'; - - var hrRE = /^([*\-=_])(?:\s*\1){2,}\s*$/ - , ulRE = /^[*\-+]\s+/ - , olRE = /^[0-9]+\.\s+/ - , taskListRE = /^\[(x| )\](?=\s)/ // Must follow ulRE or olRE - , atxHeaderRE = /^#+/ - , setextHeaderRE = /^(?:\={1,}|-{1,})$/ - , textRE = /^[^!\[\]*_\\<>` "'(]+/; - - function switchInline(stream, state, f) { - state.f = state.inline = f; - return f(stream, state); - } - - function switchBlock(stream, state, f) { - state.f = state.block = f; - return f(stream, state); - } - - - // Blocks - - function blankLine(state) { - // Reset linkTitle state - state.linkTitle = false; - // Reset EM state - state.em = false; - // Reset STRONG state - state.strong = false; - // Reset state.quote - state.quote = 0; - if (!htmlFound && state.f == htmlBlock) { - state.f = inlineNormal; - state.block = blockNormal; - } - // Reset state.trailingSpace - state.trailingSpace = 0; - state.trailingSpaceNewLine = false; - // Mark this line as blank - state.thisLineHasContent = false; - return null; - } - - function blockNormal(stream, state) { - - var prevLineIsList = (state.list !== false); - if (state.list !== false && state.indentationDiff >= 0) { // Continued list - if (state.indentationDiff < 4) { // Only adjust indentation if *not* a code block - state.indentation -= state.indentationDiff; - } - state.list = null; - } else if (state.list !== false && state.indentation > 0) { - state.list = null; - state.listDepth = Math.floor(state.indentation / 4); - } else if (state.list !== false) { // No longer a list - state.list = false; - state.listDepth = 0; - } - - var match = null; - if (state.indentationDiff >= 4) { - state.indentation -= 4; - stream.skipToEnd(); - return code; - } else if (stream.eatSpace()) { - return null; - } else if (match = stream.match(atxHeaderRE)) { - state.header = match[0].length <= 6 ? match[0].length : 6; - } else if (state.prevLineHasContent && (match = stream.match(setextHeaderRE))) { - state.header = match[0].charAt(0) == '=' ? 1 : 2; - } else if (stream.eat('>')) { - state.indentation++; - state.quote = 1; - stream.eatSpace(); - while (stream.eat('>')) { - stream.eatSpace(); - state.quote++; - } - } else if (stream.peek() === '[') { - return switchInline(stream, state, footnoteLink); - } else if (stream.match(hrRE, true)) { - return hr; - } else if ((!state.prevLineHasContent || prevLineIsList) && (stream.match(ulRE, true) || stream.match(olRE, true))) { - state.indentation += 4; - state.list = true; - state.listDepth++; - if (modeCfg.taskLists && stream.match(taskListRE, false)) { - state.taskList = true; - } - } else if (modeCfg.fencedCodeBlocks && stream.match(/^```([\w+#]*)/, true)) { - // try switching mode - state.localMode = getMode(RegExp.$1); - if (state.localMode) state.localState = state.localMode.startState(); - switchBlock(stream, state, local); - return code; - } - - return switchInline(stream, state, state.inline); - } - - function htmlBlock(stream, state) { - var style = htmlMode.token(stream, state.htmlState); - if (htmlFound && style === 'tag' && state.htmlState.type !== 'openTag' && !state.htmlState.context) { - state.f = inlineNormal; - state.block = blockNormal; - } - if (state.md_inside && stream.current().indexOf(">")!=-1) { - state.f = inlineNormal; - state.block = blockNormal; - state.htmlState.context = undefined; - } - return style; - } - - function local(stream, state) { - if (stream.sol() && stream.match(/^```/, true)) { - state.localMode = state.localState = null; - state.f = inlineNormal; - state.block = blockNormal; - return code; - } else if (state.localMode) { - return state.localMode.token(stream, state.localState); - } else { - stream.skipToEnd(); - return code; - } - } - - // Inline - function getType(state) { - var styles = []; - - if (state.taskOpen) { return "meta"; } - if (state.taskClosed) { return "property"; } - - if (state.strong) { styles.push(strong); } - if (state.em) { styles.push(em); } - - if (state.linkText) { styles.push(linktext); } - - if (state.code) { styles.push(code); } - - if (state.header) { styles.push(header); styles.push(header + state.header); } - if (state.quote) { styles.push(state.quote % 2 ? quote1 : quote2); } - if (state.list !== false) { - var listMod = (state.listDepth - 1) % 3; - if (!listMod) { - styles.push(list1); - } else if (listMod === 1) { - styles.push(list2); - } else { - styles.push(list3); - } - } - - if (state.trailingSpaceNewLine) { - styles.push("trailing-space-new-line"); - } else if (state.trailingSpace) { - styles.push("trailing-space-" + (state.trailingSpace % 2 ? "a" : "b")); - } - - return styles.length ? styles.join(' ') : null; - } - - function handleText(stream, state) { - if (stream.match(textRE, true)) { - return getType(state); - } - return undefined; - } - - function inlineNormal(stream, state) { - var style = state.text(stream, state); - if (typeof style !== 'undefined') - return style; - - if (state.list) { // List marker (*, +, -, 1., etc) - state.list = null; - return getType(state); - } - - if (state.taskList) { - var taskOpen = stream.match(taskListRE, true)[1] !== "x"; - if (taskOpen) state.taskOpen = true; - else state.taskClosed = true; - state.taskList = false; - return getType(state); - } - - state.taskOpen = false; - state.taskClosed = false; - - // Get sol() value now, before character is consumed - var sol = stream.sol(); - - var ch = stream.next(); - - if (ch === '\\') { - stream.next(); - return getType(state); - } - - // Matches link titles present on next line - if (state.linkTitle) { - state.linkTitle = false; - var matchCh = ch; - if (ch === '(') { - matchCh = ')'; - } - matchCh = (matchCh+'').replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1"); - var regex = '^\\s*(?:[^' + matchCh + '\\\\]+|\\\\\\\\|\\\\.)' + matchCh; - if (stream.match(new RegExp(regex), true)) { - return linkhref; - } - } - - // If this block is changed, it may need to be updated in GFM mode - if (ch === '`') { - var t = getType(state); - var before = stream.pos; - stream.eatWhile('`'); - var difference = 1 + stream.pos - before; - if (!state.code) { - codeDepth = difference; - state.code = true; - return getType(state); - } else { - if (difference === codeDepth) { // Must be exact - state.code = false; - return t; - } - return getType(state); - } - } else if (state.code) { - return getType(state); - } - - if (ch === '!' && stream.match(/\[[^\]]*\] ?(?:\(|\[)/, false)) { - stream.match(/\[[^\]]*\]/); - state.inline = state.f = linkHref; - return image; - } - - if (ch === '[' && stream.match(/.*\](\(| ?\[)/, false)) { - state.linkText = true; - return getType(state); - } - - if (ch === ']' && state.linkText) { - var type = getType(state); - state.linkText = false; - state.inline = state.f = linkHref; - return type; - } - - if (ch === '<' && stream.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/, false)) { - return switchInline(stream, state, inlineElement(linkinline, '>')); - } - - if (ch === '<' && stream.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/, false)) { - return switchInline(stream, state, inlineElement(linkemail, '>')); - } - - if (ch === '<' && stream.match(/^\w/, false)) { - if (stream.string.indexOf(">")!=-1) { - var atts = stream.string.substring(1,stream.string.indexOf(">")); - if (/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(atts)) { - state.md_inside = true; - } - } - stream.backUp(1); - return switchBlock(stream, state, htmlBlock); - } - - if (ch === '<' && stream.match(/^\/\w*?>/)) { - state.md_inside = false; - return "tag"; - } - - var ignoreUnderscore = false; - if (!modeCfg.underscoresBreakWords) { - if (ch === '_' && stream.peek() !== '_' && stream.match(/(\w)/, false)) { - var prevPos = stream.pos - 2; - if (prevPos >= 0) { - var prevCh = stream.string.charAt(prevPos); - if (prevCh !== '_' && prevCh.match(/(\w)/, false)) { - ignoreUnderscore = true; - } - } - } - } - var t = getType(state); - if (ch === '*' || (ch === '_' && !ignoreUnderscore)) { - if (sol && stream.peek() === ' ') { - // Do nothing, surrounded by newline and space - } else if (state.strong === ch && stream.eat(ch)) { // Remove STRONG - state.strong = false; - return t; - } else if (!state.strong && stream.eat(ch)) { // Add STRONG - state.strong = ch; - return getType(state); - } else if (state.em === ch) { // Remove EM - state.em = false; - return t; - } else if (!state.em) { // Add EM - state.em = ch; - return getType(state); - } - } else if (ch === ' ') { - if (stream.eat('*') || stream.eat('_')) { // Probably surrounded by spaces - if (stream.peek() === ' ') { // Surrounded by spaces, ignore - return getType(state); - } else { // Not surrounded by spaces, back up pointer - stream.backUp(1); - } - } - } - - if (ch === ' ') { - if (stream.match(/ +$/, false)) { - state.trailingSpace++; - } else if (state.trailingSpace) { - state.trailingSpaceNewLine = true; - } - } - - return getType(state); - } - - function linkHref(stream, state) { - // Check if space, and return NULL if so (to avoid marking the space) - if(stream.eatSpace()){ - return null; - } - var ch = stream.next(); - if (ch === '(' || ch === '[') { - return switchInline(stream, state, inlineElement(linkhref, ch === '(' ? ')' : ']')); - } - return 'error'; - } - - function footnoteLink(stream, state) { - if (stream.match(/^[^\]]*\]:/, true)) { - state.f = footnoteUrl; - return linktext; - } - return switchInline(stream, state, inlineNormal); - } - - function footnoteUrl(stream, state) { - // Check if space, and return NULL if so (to avoid marking the space) - if(stream.eatSpace()){ - return null; - } - // Match URL - stream.match(/^[^\s]+/, true); - // Check for link title - if (stream.peek() === undefined) { // End of line, set flag to check next line - state.linkTitle = true; - } else { // More content on line, check if link title - stream.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/, true); - } - state.f = state.inline = inlineNormal; - return linkhref; - } - - var savedInlineRE = []; - function inlineRE(endChar) { - if (!savedInlineRE[endChar]) { - // Escape endChar for RegExp (taken from http://stackoverflow.com/a/494122/526741) - endChar = (endChar+'').replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1"); - // Match any non-endChar, escaped character, as well as the closing - // endChar. - savedInlineRE[endChar] = new RegExp('^(?:[^\\\\]|\\\\.)*?(' + endChar + ')'); - } - return savedInlineRE[endChar]; - } - - function inlineElement(type, endChar, next) { - next = next || inlineNormal; - return function(stream, state) { - stream.match(inlineRE(endChar)); - state.inline = state.f = next; - return type; - }; - } - - return { - startState: function() { - return { - f: blockNormal, - - prevLineHasContent: false, - thisLineHasContent: false, - - block: blockNormal, - htmlState: CodeMirror.startState(htmlMode), - indentation: 0, - - inline: inlineNormal, - text: handleText, - - linkText: false, - linkTitle: false, - em: false, - strong: false, - header: 0, - taskList: false, - list: false, - listDepth: 0, - quote: 0, - trailingSpace: 0, - trailingSpaceNewLine: false - }; - }, - - copyState: function(s) { - return { - f: s.f, - - prevLineHasContent: s.prevLineHasContent, - thisLineHasContent: s.thisLineHasContent, - - block: s.block, - htmlState: CodeMirror.copyState(htmlMode, s.htmlState), - indentation: s.indentation, - - localMode: s.localMode, - localState: s.localMode ? CodeMirror.copyState(s.localMode, s.localState) : null, - - inline: s.inline, - text: s.text, - linkTitle: s.linkTitle, - em: s.em, - strong: s.strong, - header: s.header, - taskList: s.taskList, - list: s.list, - listDepth: s.listDepth, - quote: s.quote, - trailingSpace: s.trailingSpace, - trailingSpaceNewLine: s.trailingSpaceNewLine, - md_inside: s.md_inside - }; - }, - - token: function(stream, state) { - if (stream.sol()) { - if (stream.match(/^\s*$/, true)) { - state.prevLineHasContent = false; - return blankLine(state); - } else { - state.prevLineHasContent = state.thisLineHasContent; - state.thisLineHasContent = true; - } - - // Reset state.header - state.header = 0; - - // Reset state.taskList - state.taskList = false; - - // Reset state.code - state.code = false; - - // Reset state.trailingSpace - state.trailingSpace = 0; - state.trailingSpaceNewLine = false; - - state.f = state.block; - var indentation = stream.match(/^\s*/, true)[0].replace(/\t/g, ' ').length; - var difference = Math.floor((indentation - state.indentation) / 4) * 4; - if (difference > 4) difference = 4; - var adjustedIndentation = state.indentation + difference; - state.indentationDiff = adjustedIndentation - state.indentation; - state.indentation = adjustedIndentation; - if (indentation > 0) return null; - } - return state.f(stream, state); - }, - - blankLine: blankLine, - - getType: getType - }; - -}, "xml"); - -CodeMirror.defineMIME("text/x-markdown", "markdown"); diff --git a/plugins/codemirror/codemirror/mode/markdown/test.js b/plugins/codemirror/codemirror/mode/markdown/test.js deleted file mode 100644 index 6bf4006..0000000 --- a/plugins/codemirror/codemirror/mode/markdown/test.js +++ /dev/null @@ -1,664 +0,0 @@ -(function() { - var mode = CodeMirror.getMode({tabSize: 4}, "markdown"); - function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } - - MT("plainText", - "foo"); - - // Don't style single trailing space - MT("trailingSpace1", - "foo "); - - // Two or more trailing spaces should be styled with line break character - MT("trailingSpace2", - "foo[trailing-space-a ][trailing-space-new-line ]"); - - MT("trailingSpace3", - "foo[trailing-space-a ][trailing-space-b ][trailing-space-new-line ]"); - - MT("trailingSpace4", - "foo[trailing-space-a ][trailing-space-b ][trailing-space-a ][trailing-space-new-line ]"); - - // Code blocks using 4 spaces (regardless of CodeMirror.tabSize value) - MT("codeBlocksUsing4Spaces", - " [comment foo]"); - - // Code blocks using 4 spaces with internal indentation - MT("codeBlocksUsing4SpacesIndentation", - " [comment bar]", - " [comment hello]", - " [comment world]", - " [comment foo]", - "bar"); - - // Code blocks using 4 spaces with internal indentation - MT("codeBlocksUsing4SpacesIndentation", - " foo", - " [comment bar]", - " [comment hello]", - " [comment world]"); - - // Code blocks using 1 tab (regardless of CodeMirror.indentWithTabs value) - MT("codeBlocksUsing1Tab", - "\t[comment foo]"); - - // Inline code using backticks - MT("inlineCodeUsingBackticks", - "foo [comment `bar`]"); - - // Block code using single backtick (shouldn't work) - MT("blockCodeSingleBacktick", - "[comment `]", - "foo", - "[comment `]"); - - // Unclosed backticks - // Instead of simply marking as CODE, it would be nice to have an - // incomplete flag for CODE, that is styled slightly different. - MT("unclosedBackticks", - "foo [comment `bar]"); - - // Per documentation: "To include a literal backtick character within a - // code span, you can use multiple backticks as the opening and closing - // delimiters" - MT("doubleBackticks", - "[comment ``foo ` bar``]"); - - // Tests based on Dingus - // http://daringfireball.net/projects/markdown/dingus - // - // Multiple backticks within an inline code block - MT("consecutiveBackticks", - "[comment `foo```bar`]"); - - // Multiple backticks within an inline code block with a second code block - MT("consecutiveBackticks", - "[comment `foo```bar`] hello [comment `world`]"); - - // Unclosed with several different groups of backticks - MT("unclosedBackticks", - "[comment ``foo ``` bar` hello]"); - - // Closed with several different groups of backticks - MT("closedBackticks", - "[comment ``foo ``` bar` hello``] world"); - - // atx headers - // http://daringfireball.net/projects/markdown/syntax#header - - MT("atxH1", - "[header&header1 # foo]"); - - MT("atxH2", - "[header&header2 ## foo]"); - - MT("atxH3", - "[header&header3 ### foo]"); - - MT("atxH4", - "[header&header4 #### foo]"); - - MT("atxH5", - "[header&header5 ##### foo]"); - - MT("atxH6", - "[header&header6 ###### foo]"); - - // H6 - 7x '#' should still be H6, per Dingus - // http://daringfireball.net/projects/markdown/dingus - MT("atxH6NotH7", - "[header&header6 ####### foo]"); - - // Inline styles should be parsed inside headers - MT("atxH1inline", - "[header&header1 # foo ][header&header1&em *bar*]"); - - // Setext headers - H1, H2 - // Per documentation, "Any number of underlining =’s or -’s will work." - // http://daringfireball.net/projects/markdown/syntax#header - // Ideally, the text would be marked as `header` as well, but this is - // not really feasible at the moment. So, instead, we're testing against - // what works today, to avoid any regressions. - // - // Check if single underlining = works - MT("setextH1", - "foo", - "[header&header1 =]"); - - // Check if 3+ ='s work - MT("setextH1", - "foo", - "[header&header1 ===]"); - - // Check if single underlining - works - MT("setextH2", - "foo", - "[header&header2 -]"); - - // Check if 3+ -'s work - MT("setextH2", - "foo", - "[header&header2 ---]"); - - // Single-line blockquote with trailing space - MT("blockquoteSpace", - "[atom > foo]"); - - // Single-line blockquote - MT("blockquoteNoSpace", - "[atom >foo]"); - - // No blank line before blockquote - MT("blockquoteNoBlankLine", - "foo", - "[atom > bar]"); - - // Nested blockquote - MT("blockquoteSpace", - "[atom > foo]", - "[number > > foo]", - "[atom > > > foo]"); - - // Single-line blockquote followed by normal paragraph - MT("blockquoteThenParagraph", - "[atom >foo]", - "", - "bar"); - - // Multi-line blockquote (lazy mode) - MT("multiBlockquoteLazy", - "[atom >foo]", - "[atom bar]"); - - // Multi-line blockquote followed by normal paragraph (lazy mode) - MT("multiBlockquoteLazyThenParagraph", - "[atom >foo]", - "[atom bar]", - "", - "hello"); - - // Multi-line blockquote (non-lazy mode) - MT("multiBlockquote", - "[atom >foo]", - "[atom >bar]"); - - // Multi-line blockquote followed by normal paragraph (non-lazy mode) - MT("multiBlockquoteThenParagraph", - "[atom >foo]", - "[atom >bar]", - "", - "hello"); - - // Check list types - - MT("listAsterisk", - "foo", - "bar", - "", - "[variable-2 * foo]", - "[variable-2 * bar]"); - - MT("listPlus", - "foo", - "bar", - "", - "[variable-2 + foo]", - "[variable-2 + bar]"); - - MT("listDash", - "foo", - "bar", - "", - "[variable-2 - foo]", - "[variable-2 - bar]"); - - MT("listNumber", - "foo", - "bar", - "", - "[variable-2 1. foo]", - "[variable-2 2. bar]"); - - // Lists require a preceding blank line (per Dingus) - MT("listBogus", - "foo", - "1. bar", - "2. hello"); - - // Formatting in lists (*) - MT("listAsteriskFormatting", - "[variable-2 * ][variable-2&em *foo*][variable-2 bar]", - "[variable-2 * ][variable-2&strong **foo**][variable-2 bar]", - "[variable-2 * ][variable-2&strong **][variable-2&em&strong *foo**][variable-2&em *][variable-2 bar]", - "[variable-2 * ][variable-2&comment `foo`][variable-2 bar]"); - - // Formatting in lists (+) - MT("listPlusFormatting", - "[variable-2 + ][variable-2&em *foo*][variable-2 bar]", - "[variable-2 + ][variable-2&strong **foo**][variable-2 bar]", - "[variable-2 + ][variable-2&strong **][variable-2&em&strong *foo**][variable-2&em *][variable-2 bar]", - "[variable-2 + ][variable-2&comment `foo`][variable-2 bar]"); - - // Formatting in lists (-) - MT("listDashFormatting", - "[variable-2 - ][variable-2&em *foo*][variable-2 bar]", - "[variable-2 - ][variable-2&strong **foo**][variable-2 bar]", - "[variable-2 - ][variable-2&strong **][variable-2&em&strong *foo**][variable-2&em *][variable-2 bar]", - "[variable-2 - ][variable-2&comment `foo`][variable-2 bar]"); - - // Formatting in lists (1.) - MT("listNumberFormatting", - "[variable-2 1. ][variable-2&em *foo*][variable-2 bar]", - "[variable-2 2. ][variable-2&strong **foo**][variable-2 bar]", - "[variable-2 3. ][variable-2&strong **][variable-2&em&strong *foo**][variable-2&em *][variable-2 bar]", - "[variable-2 4. ][variable-2&comment `foo`][variable-2 bar]"); - - // Paragraph lists - MT("listParagraph", - "[variable-2 * foo]", - "", - "[variable-2 * bar]"); - - // Multi-paragraph lists - // - // 4 spaces - MT("listMultiParagraph", - "[variable-2 * foo]", - "", - "[variable-2 * bar]", - "", - " [variable-2 hello]"); - - // 4 spaces, extra blank lines (should still be list, per Dingus) - MT("listMultiParagraphExtra", - "[variable-2 * foo]", - "", - "[variable-2 * bar]", - "", - "", - " [variable-2 hello]"); - - // 4 spaces, plus 1 space (should still be list, per Dingus) - MT("listMultiParagraphExtraSpace", - "[variable-2 * foo]", - "", - "[variable-2 * bar]", - "", - " [variable-2 hello]", - "", - " [variable-2 world]"); - - // 1 tab - MT("listTab", - "[variable-2 * foo]", - "", - "[variable-2 * bar]", - "", - "\t[variable-2 hello]"); - - // No indent - MT("listNoIndent", - "[variable-2 * foo]", - "", - "[variable-2 * bar]", - "", - "hello"); - - // Blockquote - MT("blockquote", - "[variable-2 * foo]", - "", - "[variable-2 * bar]", - "", - " [variable-2&atom > hello]"); - - // Code block - MT("blockquoteCode", - "[variable-2 * foo]", - "", - "[variable-2 * bar]", - "", - " [comment > hello]", - "", - " [variable-2 world]"); - - // Code block followed by text - MT("blockquoteCodeText", - "[variable-2 * foo]", - "", - " [variable-2 bar]", - "", - " [comment hello]", - "", - " [variable-2 world]"); - - // Nested list - - MT("listAsteriskNested", - "[variable-2 * foo]", - "", - " [variable-3 * bar]"); - - MT("listPlusNested", - "[variable-2 + foo]", - "", - " [variable-3 + bar]"); - - MT("listDashNested", - "[variable-2 - foo]", - "", - " [variable-3 - bar]"); - - MT("listNumberNested", - "[variable-2 1. foo]", - "", - " [variable-3 2. bar]"); - - MT("listMixed", - "[variable-2 * foo]", - "", - " [variable-3 + bar]", - "", - " [keyword - hello]", - "", - " [variable-2 1. world]"); - - MT("listBlockquote", - "[variable-2 * foo]", - "", - " [variable-3 + bar]", - "", - " [atom&variable-3 > hello]"); - - MT("listCode", - "[variable-2 * foo]", - "", - " [variable-3 + bar]", - "", - " [comment hello]"); - - // Code with internal indentation - MT("listCodeIndentation", - "[variable-2 * foo]", - "", - " [comment bar]", - " [comment hello]", - " [comment world]", - " [comment foo]", - " [variable-2 bar]"); - - // List nesting edge cases - MT("listNested", - "[variable-2 * foo]", - "", - " [variable-3 * bar]", - "", - " [variable-2 hello]" - ); - MT("listNested", - "[variable-2 * foo]", - "", - " [variable-3 * bar]", - "", - " [variable-3 * foo]" - ); - - // Code followed by text - MT("listCodeText", - "[variable-2 * foo]", - "", - " [comment bar]", - "", - "hello"); - - // Following tests directly from official Markdown documentation - // http://daringfireball.net/projects/markdown/syntax#hr - - MT("hrSpace", - "[hr * * *]"); - - MT("hr", - "[hr ***]"); - - MT("hrLong", - "[hr *****]"); - - MT("hrSpaceDash", - "[hr - - -]"); - - MT("hrDashLong", - "[hr ---------------------------------------]"); - - // Inline link with title - MT("linkTitle", - "[link [[foo]]][string (http://example.com/ \"bar\")] hello"); - - // Inline link without title - MT("linkNoTitle", - "[link [[foo]]][string (http://example.com/)] bar"); - - // Inline link with image - MT("linkImage", - "[link [[][tag ![[foo]]][string (http://example.com/)][link ]]][string (http://example.com/)] bar"); - - // Inline link with Em - MT("linkEm", - "[link [[][link&em *foo*][link ]]][string (http://example.com/)] bar"); - - // Inline link with Strong - MT("linkStrong", - "[link [[][link&strong **foo**][link ]]][string (http://example.com/)] bar"); - - // Inline link with EmStrong - MT("linkEmStrong", - "[link [[][link&strong **][link&em&strong *foo**][link&em *][link ]]][string (http://example.com/)] bar"); - - // Image with title - MT("imageTitle", - "[tag ![[foo]]][string (http://example.com/ \"bar\")] hello"); - - // Image without title - MT("imageNoTitle", - "[tag ![[foo]]][string (http://example.com/)] bar"); - - // Image with asterisks - MT("imageAsterisks", - "[tag ![[*foo*]]][string (http://example.com/)] bar"); - - // Not a link. Should be normal text due to square brackets being used - // regularly in text, especially in quoted material, and no space is allowed - // between square brackets and parentheses (per Dingus). - MT("notALink", - "[[foo]] (bar)"); - - // Reference-style links - MT("linkReference", - "[link [[foo]]][string [[bar]]] hello"); - - // Reference-style links with Em - MT("linkReferenceEm", - "[link [[][link&em *foo*][link ]]][string [[bar]]] hello"); - - // Reference-style links with Strong - MT("linkReferenceStrong", - "[link [[][link&strong **foo**][link ]]][string [[bar]]] hello"); - - // Reference-style links with EmStrong - MT("linkReferenceEmStrong", - "[link [[][link&strong **][link&em&strong *foo**][link&em *][link ]]][string [[bar]]] hello"); - - // Reference-style links with optional space separator (per docuentation) - // "You can optionally use a space to separate the sets of brackets" - MT("linkReferenceSpace", - "[link [[foo]]] [string [[bar]]] hello"); - - // Should only allow a single space ("...use *a* space...") - MT("linkReferenceDoubleSpace", - "[[foo]] [[bar]] hello"); - - // Reference-style links with implicit link name - MT("linkImplicit", - "[link [[foo]]][string [[]]] hello"); - - // @todo It would be nice if, at some point, the document was actually - // checked to see if the referenced link exists - - // Link label, for reference-style links (taken from documentation) - - MT("labelNoTitle", - "[link [[foo]]:] [string http://example.com/]"); - - MT("labelIndented", - " [link [[foo]]:] [string http://example.com/]"); - - MT("labelSpaceTitle", - "[link [[foo bar]]:] [string http://example.com/ \"hello\"]"); - - MT("labelDoubleTitle", - "[link [[foo bar]]:] [string http://example.com/ \"hello\"] \"world\""); - - MT("labelTitleDoubleQuotes", - "[link [[foo]]:] [string http://example.com/ \"bar\"]"); - - MT("labelTitleSingleQuotes", - "[link [[foo]]:] [string http://example.com/ 'bar']"); - - MT("labelTitleParenthese", - "[link [[foo]]:] [string http://example.com/ (bar)]"); - - MT("labelTitleInvalid", - "[link [[foo]]:] [string http://example.com/] bar"); - - MT("labelLinkAngleBrackets", - "[link [[foo]]:] [string \"bar\"]"); - - MT("labelTitleNextDoubleQuotes", - "[link [[foo]]:] [string http://example.com/]", - "[string \"bar\"] hello"); - - MT("labelTitleNextSingleQuotes", - "[link [[foo]]:] [string http://example.com/]", - "[string 'bar'] hello"); - - MT("labelTitleNextParenthese", - "[link [[foo]]:] [string http://example.com/]", - "[string (bar)] hello"); - - MT("labelTitleNextMixed", - "[link [[foo]]:] [string http://example.com/]", - "(bar\" hello"); - - MT("linkWeb", - "[link ] foo"); - - MT("linkWebDouble", - "[link ] foo [link ]"); - - MT("linkEmail", - "[link ] foo"); - - MT("linkEmailDouble", - "[link ] foo [link ]"); - - MT("emAsterisk", - "[em *foo*] bar"); - - MT("emUnderscore", - "[em _foo_] bar"); - - MT("emInWordAsterisk", - "foo[em *bar*]hello"); - - MT("emInWordUnderscore", - "foo[em _bar_]hello"); - - // Per documentation: "...surround an * or _ with spaces, it’ll be - // treated as a literal asterisk or underscore." - - MT("emEscapedBySpaceIn", - "foo [em _bar _ hello_] world"); - - MT("emEscapedBySpaceOut", - "foo _ bar[em _hello_]world"); - - MT("emEscapedByNewline", - "foo", - "_ bar[em _hello_]world"); - - // Unclosed emphasis characters - // Instead of simply marking as EM / STRONG, it would be nice to have an - // incomplete flag for EM and STRONG, that is styled slightly different. - MT("emIncompleteAsterisk", - "foo [em *bar]"); - - MT("emIncompleteUnderscore", - "foo [em _bar]"); - - MT("strongAsterisk", - "[strong **foo**] bar"); - - MT("strongUnderscore", - "[strong __foo__] bar"); - - MT("emStrongAsterisk", - "[em *foo][em&strong **bar*][strong hello**] world"); - - MT("emStrongUnderscore", - "[em _foo][em&strong __bar_][strong hello__] world"); - - // "...same character must be used to open and close an emphasis span."" - MT("emStrongMixed", - "[em _foo][em&strong **bar*hello__ world]"); - - MT("emStrongMixed", - "[em *foo][em&strong __bar_hello** world]"); - - // These characters should be escaped: - // \ backslash - // ` backtick - // * asterisk - // _ underscore - // {} curly braces - // [] square brackets - // () parentheses - // # hash mark - // + plus sign - // - minus sign (hyphen) - // . dot - // ! exclamation mark - - MT("escapeBacktick", - "foo \\`bar\\`"); - - MT("doubleEscapeBacktick", - "foo \\\\[comment `bar\\\\`]"); - - MT("escapeAsterisk", - "foo \\*bar\\*"); - - MT("doubleEscapeAsterisk", - "foo \\\\[em *bar\\\\*]"); - - MT("escapeUnderscore", - "foo \\_bar\\_"); - - MT("doubleEscapeUnderscore", - "foo \\\\[em _bar\\\\_]"); - - MT("escapeHash", - "\\# foo"); - - MT("doubleEscapeHash", - "\\\\# foo"); - - - // Tests to make sure GFM-specific things aren't getting through - - MT("taskList", - "[variable-2 * [ ]] bar]"); - - MT("fencedCodeBlocks", - "[comment ```]", - "foo", - "[comment ```]"); -})(); diff --git a/plugins/codemirror/codemirror/mode/meta.js b/plugins/codemirror/codemirror/mode/meta.js deleted file mode 100644 index 226cff1..0000000 --- a/plugins/codemirror/codemirror/mode/meta.js +++ /dev/null @@ -1,91 +0,0 @@ -CodeMirror.modeInfo = [ - {name: 'APL', mime: 'text/apl', mode: 'apl'}, - {name: 'Asterisk', mime: 'text/x-asterisk', mode: 'asterisk'}, - {name: 'C', mime: 'text/x-csrc', mode: 'clike'}, - {name: 'C++', mime: 'text/x-c++src', mode: 'clike'}, - {name: 'Cobol', mime: 'text/x-cobol', mode: 'cobol'}, - {name: 'Java', mime: 'text/x-java', mode: 'clike'}, - {name: 'C#', mime: 'text/x-csharp', mode: 'clike'}, - {name: 'Scala', mime: 'text/x-scala', mode: 'clike'}, - {name: 'Clojure', mime: 'text/x-clojure', mode: 'clojure'}, - {name: 'CoffeeScript', mime: 'text/x-coffeescript', mode: 'coffeescript'}, - {name: 'Common Lisp', mime: 'text/x-common-lisp', mode: 'commonlisp'}, - {name: 'CSS', mime: 'text/css', mode: 'css'}, - {name: 'D', mime: 'text/x-d', mode: 'd'}, - {name: 'diff', mime: 'text/x-diff', mode: 'diff'}, - {name: 'DTD', mime: 'application/xml-dtd', mode: 'dtd'}, - {name: 'ECL', mime: 'text/x-ecl', mode: 'ecl'}, - {name: 'Eiffel', mime: 'text/x-eiffel', mode: 'eiffel'}, - {name: 'Erlang', mime: 'text/x-erlang', mode: 'erlang'}, - {name: 'Fortran', mime: 'text/x-fortran', mode: 'fortran'}, - {name: 'Gas', mime: 'text/x-gas', mode: 'gas'}, - {name: 'Gherkin', mime: 'text/x-feature', mode: 'gherkin'}, - {name: 'GitHub Flavored Markdown', mime: 'text/x-gfm', mode: 'gfm'}, - {name: 'Go', mime: 'text/x-go', mode: 'go'}, - {name: 'Groovy', mime: 'text/x-groovy', mode: 'groovy'}, - {name: 'HAML', mime: 'text/x-haml', mode: 'haml'}, - {name: 'Haskell', mime: 'text/x-haskell', mode: 'haskell'}, - {name: 'Haxe', mime: 'text/x-haxe', mode: 'haxe'}, - {name: 'ASP.NET', mime: 'application/x-aspx', mode: 'htmlembedded'}, - {name: 'Embedded Javascript', mime: 'application/x-ejs', mode: 'htmlembedded'}, - {name: 'JavaServer Pages', mime: 'application/x-jsp', mode: 'htmlembedded'}, - {name: 'HTML', mime: 'text/html', mode: 'htmlmixed'}, - {name: 'HTTP', mime: 'message/http', mode: 'http'}, - {name: 'Jade', mime: 'text/x-jade', mode: 'jade'}, - {name: 'JavaScript', mime: 'text/javascript', mode: 'javascript'}, - {name: 'JSON', mime: 'application/x-json', mode: 'javascript'}, - {name: 'JSON', mime: 'application/json', mode: 'javascript'}, - {name: 'TypeScript', mime: 'application/typescript', mode: 'javascript'}, - {name: 'Jinja2', mime: null, mode: 'jinja2'}, - {name: 'Julia', mime: 'text/x-julia', mode: 'julia'}, - {name: 'LESS', mime: 'text/x-less', mode: 'less'}, - {name: 'LiveScript', mime: 'text/x-livescript', mode: 'livescript'}, - {name: 'Lua', mime: 'text/x-lua', mode: 'lua'}, - {name: 'Markdown (GitHub-flavour)', mime: 'text/x-markdown', mode: 'markdown'}, - {name: 'mIRC', mime: 'text/mirc', mode: 'mirc'}, - {name: 'Nginx', mime: 'text/x-nginx-conf', mode: 'nginx'}, - {name: 'NTriples', mime: 'text/n-triples', mode: 'ntriples'}, - {name: 'OCaml', mime: 'text/x-ocaml', mode: 'ocaml'}, - {name: 'Octave', mime: 'text/x-octave', mode: 'octave'}, - {name: 'Pascal', mime: 'text/x-pascal', mode: 'pascal'}, - {name: 'PEG.js', mime: null, mode: 'pegjs'}, - {name: 'Perl', mime: 'text/x-perl', mode: 'perl'}, - {name: 'PHP', mime: 'text/x-php', mode: 'php'}, - {name: 'PHP(HTML)', mime: 'application/x-httpd-php', mode: 'php'}, - {name: 'Pig', mime: 'text/x-pig', mode: 'pig'}, - {name: 'Plain Text', mime: 'text/plain', mode: 'null'}, - {name: 'Properties files', mime: 'text/x-properties', mode: 'properties'}, - {name: 'Python', mime: 'text/x-python', mode: 'python'}, - {name: 'Cython', mime: 'text/x-cython', mode: 'python'}, - {name: 'R', mime: 'text/x-rsrc', mode: 'r'}, - {name: 'reStructuredText', mime: 'text/x-rst', mode: 'rst'}, - {name: 'Ruby', mime: 'text/x-ruby', mode: 'ruby'}, - {name: 'Rust', mime: 'text/x-rustsrc', mode: 'rust'}, - {name: 'Sass', mime: 'text/x-sass', mode: 'sass'}, - {name: 'Scheme', mime: 'text/x-scheme', mode: 'scheme'}, - {name: 'SCSS', mime: 'text/x-scss', mode: 'css'}, - {name: 'Shell', mime: 'text/x-sh', mode: 'shell'}, - {name: 'Sieve', mime: 'application/sieve', mode: 'sieve'}, - {name: 'Smalltalk', mime: 'text/x-stsrc', mode: 'smalltalk'}, - {name: 'Smarty', mime: 'text/x-smarty', mode: 'smarty'}, - {name: 'SmartyMixed', mime: 'text/x-smarty', mode: 'smartymixed'}, - {name: 'SPARQL', mime: 'application/x-sparql-query', mode: 'sparql'}, - {name: 'SQL', mime: 'text/x-sql', mode: 'sql'}, - {name: 'MariaDB', mime: 'text/x-mariadb', mode: 'sql'}, - {name: 'sTeX', mime: 'text/x-stex', mode: 'stex'}, - {name: 'LaTeX', mime: 'text/x-latex', mode: 'stex'}, - {name: 'Tcl', mime: 'text/x-tcl', mode: 'tcl'}, - {name: 'TiddlyWiki ', mime: 'text/x-tiddlywiki', mode: 'tiddlywiki'}, - {name: 'Tiki wiki', mime: 'text/tiki', mode: 'tiki'}, - {name: 'TOML', mime: 'text/x-toml', mode: 'toml'}, - {name: 'Turtle', mime: 'text/turtle', mode: 'turtle'}, - {name: 'VB.NET', mime: 'text/x-vb', mode: 'vb'}, - {name: 'VBScript', mime: 'text/vbscript', mode: 'vbscript'}, - {name: 'Velocity', mime: 'text/velocity', mode: 'velocity'}, - {name: 'Verilog', mime: 'text/x-verilog', mode: 'verilog'}, - {name: 'XML', mime: 'application/xml', mode: 'xml'}, - {name: 'HTML', mime: 'text/html', mode: 'xml'}, - {name: 'XQuery', mime: 'application/xquery', mode: 'xquery'}, - {name: 'YAML', mime: 'text/x-yaml', mode: 'yaml'}, - {name: 'Z80', mime: 'text/x-z80', mode: 'z80'} -]; diff --git a/plugins/codemirror/codemirror/mode/mirc/index.html b/plugins/codemirror/codemirror/mode/mirc/index.html deleted file mode 100644 index dbd7a06..0000000 --- a/plugins/codemirror/codemirror/mode/mirc/index.html +++ /dev/null @@ -1,161 +0,0 @@ - - -CodeMirror: mIRC mode - - - - - - - - - - -
    -

    mIRC mode

    -
    - - -

    MIME types defined: text/mirc.

    - -
    diff --git a/plugins/codemirror/codemirror/mode/mirc/mirc.js b/plugins/codemirror/codemirror/mode/mirc/mirc.js deleted file mode 100644 index fc88bc5..0000000 --- a/plugins/codemirror/codemirror/mode/mirc/mirc.js +++ /dev/null @@ -1,177 +0,0 @@ -//mIRC mode by Ford_Lawnmower :: Based on Velocity mode by Steve O'Hara -CodeMirror.defineMIME("text/mirc", "mirc"); -CodeMirror.defineMode("mirc", function() { - function parseWords(str) { - var obj = {}, words = str.split(" "); - for (var i = 0; i < words.length; ++i) obj[words[i]] = true; - return obj; - } - var specials = parseWords("$! $$ $& $? $+ $abook $abs $active $activecid " + - "$activewid $address $addtok $agent $agentname $agentstat $agentver " + - "$alias $and $anick $ansi2mirc $aop $appactive $appstate $asc $asctime " + - "$asin $atan $avoice $away $awaymsg $awaytime $banmask $base $bfind " + - "$binoff $biton $bnick $bvar $bytes $calc $cb $cd $ceil $chan $chanmodes " + - "$chantypes $chat $chr $cid $clevel $click $cmdbox $cmdline $cnick $color " + - "$com $comcall $comchan $comerr $compact $compress $comval $cos $count " + - "$cr $crc $creq $crlf $ctime $ctimer $ctrlenter $date $day $daylight " + - "$dbuh $dbuw $dccignore $dccport $dde $ddename $debug $decode $decompress " + - "$deltok $devent $dialog $did $didreg $didtok $didwm $disk $dlevel $dll " + - "$dllcall $dname $dns $duration $ebeeps $editbox $emailaddr $encode $error " + - "$eval $event $exist $feof $ferr $fgetc $file $filename $filtered $finddir " + - "$finddirn $findfile $findfilen $findtok $fline $floor $fopen $fread $fserve " + - "$fulladdress $fulldate $fullname $fullscreen $get $getdir $getdot $gettok $gmt " + - "$group $halted $hash $height $hfind $hget $highlight $hnick $hotline " + - "$hotlinepos $ial $ialchan $ibl $idle $iel $ifmatch $ignore $iif $iil " + - "$inelipse $ini $inmidi $inpaste $inpoly $input $inrect $inroundrect " + - "$insong $instok $int $inwave $ip $isalias $isbit $isdde $isdir $isfile " + - "$isid $islower $istok $isupper $keychar $keyrpt $keyval $knick $lactive " + - "$lactivecid $lactivewid $left $len $level $lf $line $lines $link $lock " + - "$lock $locked $log $logstamp $logstampfmt $longfn $longip $lower $ltimer " + - "$maddress $mask $matchkey $matchtok $md5 $me $menu $menubar $menucontext " + - "$menutype $mid $middir $mircdir $mircexe $mircini $mklogfn $mnick $mode " + - "$modefirst $modelast $modespl $mouse $msfile $network $newnick $nick $nofile " + - "$nopath $noqt $not $notags $notify $null $numeric $numok $oline $onpoly " + - "$opnick $or $ord $os $passivedcc $pic $play $pnick $port $portable $portfree " + - "$pos $prefix $prop $protect $puttok $qt $query $rand $r $rawmsg $read $readomo " + - "$readn $regex $regml $regsub $regsubex $remove $remtok $replace $replacex " + - "$reptok $result $rgb $right $round $scid $scon $script $scriptdir $scriptline " + - "$sdir $send $server $serverip $sfile $sha1 $shortfn $show $signal $sin " + - "$site $sline $snick $snicks $snotify $sock $sockbr $sockerr $sockname " + - "$sorttok $sound $sqrt $ssl $sreq $sslready $status $strip $str $stripped " + - "$syle $submenu $switchbar $tan $target $ticks $time $timer $timestamp " + - "$timestampfmt $timezone $tip $titlebar $toolbar $treebar $trust $ulevel " + - "$ulist $upper $uptime $url $usermode $v1 $v2 $var $vcmd $vcmdstat $vcmdver " + - "$version $vnick $vol $wid $width $wildsite $wildtok $window $wrap $xor"); - var keywords = parseWords("abook ajinvite alias aline ame amsg anick aop auser autojoin avoice " + - "away background ban bcopy beep bread break breplace bset btrunc bunset bwrite " + - "channel clear clearall cline clipboard close cnick color comclose comopen " + - "comreg continue copy creq ctcpreply ctcps dcc dccserver dde ddeserver " + - "debug dec describe dialog did didtok disable disconnect dlevel dline dll " + - "dns dqwindow drawcopy drawdot drawfill drawline drawpic drawrect drawreplace " + - "drawrot drawsave drawscroll drawtext ebeeps echo editbox emailaddr enable " + - "events exit fclose filter findtext finger firewall flash flist flood flush " + - "flushini font fopen fseek fsend fserve fullname fwrite ghide gload gmove " + - "gopts goto gplay gpoint gqreq groups gshow gsize gstop gtalk gunload hadd " + - "halt haltdef hdec hdel help hfree hinc hload hmake hop hsave ial ialclear " + - "ialmark identd if ignore iline inc invite iuser join kick linesep links list " + - "load loadbuf localinfo log mdi me menubar mkdir mnick mode msg nick noop notice " + - "notify omsg onotice part partall pdcc perform play playctrl pop protect pvoice " + - "qme qmsg query queryn quit raw reload remini remote remove rename renwin " + - "reseterror resetidle return rlevel rline rmdir run ruser save savebuf saveini " + - "say scid scon server set showmirc signam sline sockaccept sockclose socklist " + - "socklisten sockmark sockopen sockpause sockread sockrename sockudp sockwrite " + - "sound speak splay sreq strip switchbar timer timestamp titlebar tnick tokenize " + - "toolbar topic tray treebar ulist unload unset unsetall updatenl url uwho " + - "var vcadd vcmd vcrem vol while whois window winhelp write writeint if isalnum " + - "isalpha isaop isavoice isban ischan ishop isignore isin isincs isletter islower " + - "isnotify isnum ison isop isprotect isreg isupper isvoice iswm iswmcs " + - "elseif else goto menu nicklist status title icon size option text edit " + - "button check radio box scroll list combo link tab item"); - var functions = parseWords("if elseif else and not or eq ne in ni for foreach while switch"); - var isOperatorChar = /[+\-*&%=<>!?^\/\|]/; - function chain(stream, state, f) { - state.tokenize = f; - return f(stream, state); - } - function tokenBase(stream, state) { - var beforeParams = state.beforeParams; - state.beforeParams = false; - var ch = stream.next(); - if (/[\[\]{}\(\),\.]/.test(ch)) { - if (ch == "(" && beforeParams) state.inParams = true; - else if (ch == ")") state.inParams = false; - return null; - } - else if (/\d/.test(ch)) { - stream.eatWhile(/[\w\.]/); - return "number"; - } - else if (ch == "\\") { - stream.eat("\\"); - stream.eat(/./); - return "number"; - } - else if (ch == "/" && stream.eat("*")) { - return chain(stream, state, tokenComment); - } - else if (ch == ";" && stream.match(/ *\( *\(/)) { - return chain(stream, state, tokenUnparsed); - } - else if (ch == ";" && !state.inParams) { - stream.skipToEnd(); - return "comment"; - } - else if (ch == '"') { - stream.eat(/"/); - return "keyword"; - } - else if (ch == "$") { - stream.eatWhile(/[$_a-z0-9A-Z\.:]/); - if (specials && specials.propertyIsEnumerable(stream.current().toLowerCase())) { - return "keyword"; - } - else { - state.beforeParams = true; - return "builtin"; - } - } - else if (ch == "%") { - stream.eatWhile(/[^,^\s^\(^\)]/); - state.beforeParams = true; - return "string"; - } - else if (isOperatorChar.test(ch)) { - stream.eatWhile(isOperatorChar); - return "operator"; - } - else { - stream.eatWhile(/[\w\$_{}]/); - var word = stream.current().toLowerCase(); - if (keywords && keywords.propertyIsEnumerable(word)) - return "keyword"; - if (functions && functions.propertyIsEnumerable(word)) { - state.beforeParams = true; - return "keyword"; - } - return null; - } - } - function tokenComment(stream, state) { - var maybeEnd = false, ch; - while (ch = stream.next()) { - if (ch == "/" && maybeEnd) { - state.tokenize = tokenBase; - break; - } - maybeEnd = (ch == "*"); - } - return "comment"; - } - function tokenUnparsed(stream, state) { - var maybeEnd = 0, ch; - while (ch = stream.next()) { - if (ch == ";" && maybeEnd == 2) { - state.tokenize = tokenBase; - break; - } - if (ch == ")") - maybeEnd++; - else if (ch != " ") - maybeEnd = 0; - } - return "meta"; - } - return { - startState: function() { - return { - tokenize: tokenBase, - beforeParams: false, - inParams: false - }; - }, - token: function(stream, state) { - if (stream.eatSpace()) return null; - return state.tokenize(stream, state); - } - }; -}); diff --git a/plugins/codemirror/codemirror/mode/nginx/index.html b/plugins/codemirror/codemirror/mode/nginx/index.html deleted file mode 100644 index 16be1eb..0000000 --- a/plugins/codemirror/codemirror/mode/nginx/index.html +++ /dev/null @@ -1,181 +0,0 @@ - - -CodeMirror: NGINX mode - - - - - - - - - - - - - -
    -

    NGINX mode

    -
    - - -

    MIME types defined: text/nginx.

    - -
    diff --git a/plugins/codemirror/codemirror/mode/nginx/nginx.js b/plugins/codemirror/codemirror/mode/nginx/nginx.js deleted file mode 100644 index c98c8a1..0000000 --- a/plugins/codemirror/codemirror/mode/nginx/nginx.js +++ /dev/null @@ -1,163 +0,0 @@ -CodeMirror.defineMode("nginx", function(config) { - - function words(str) { - var obj = {}, words = str.split(" "); - for (var i = 0; i < words.length; ++i) obj[words[i]] = true; - return obj; - } - - var keywords = words( - /* ngxDirectiveControl */ "break return rewrite set" + - /* ngxDirective */ " accept_mutex accept_mutex_delay access_log add_after_body add_before_body add_header addition_types aio alias allow ancient_browser ancient_browser_value auth_basic auth_basic_user_file auth_http auth_http_header auth_http_timeout autoindex autoindex_exact_size autoindex_localtime charset charset_types client_body_buffer_size client_body_in_file_only client_body_in_single_buffer client_body_temp_path client_body_timeout client_header_buffer_size client_header_timeout client_max_body_size connection_pool_size create_full_put_path daemon dav_access dav_methods debug_connection debug_points default_type degradation degrade deny devpoll_changes devpoll_events directio directio_alignment empty_gif env epoll_events error_log eventport_events expires fastcgi_bind fastcgi_buffer_size fastcgi_buffers fastcgi_busy_buffers_size fastcgi_cache fastcgi_cache_key fastcgi_cache_methods fastcgi_cache_min_uses fastcgi_cache_path fastcgi_cache_use_stale fastcgi_cache_valid fastcgi_catch_stderr fastcgi_connect_timeout fastcgi_hide_header fastcgi_ignore_client_abort fastcgi_ignore_headers fastcgi_index fastcgi_intercept_errors fastcgi_max_temp_file_size fastcgi_next_upstream fastcgi_param fastcgi_pass_header fastcgi_pass_request_body fastcgi_pass_request_headers fastcgi_read_timeout fastcgi_send_lowat fastcgi_send_timeout fastcgi_split_path_info fastcgi_store fastcgi_store_access fastcgi_temp_file_write_size fastcgi_temp_path fastcgi_upstream_fail_timeout fastcgi_upstream_max_fails flv geoip_city geoip_country google_perftools_profiles gzip gzip_buffers gzip_comp_level gzip_disable gzip_hash gzip_http_version gzip_min_length gzip_no_buffer gzip_proxied gzip_static gzip_types gzip_vary gzip_window if_modified_since ignore_invalid_headers image_filter image_filter_buffer image_filter_jpeg_quality image_filter_transparency imap_auth imap_capabilities imap_client_buffer index ip_hash keepalive_requests keepalive_timeout kqueue_changes kqueue_events large_client_header_buffers limit_conn limit_conn_log_level limit_rate limit_rate_after limit_req limit_req_log_level limit_req_zone limit_zone lingering_time lingering_timeout lock_file log_format log_not_found log_subrequest map_hash_bucket_size map_hash_max_size master_process memcached_bind memcached_buffer_size memcached_connect_timeout memcached_next_upstream memcached_read_timeout memcached_send_timeout memcached_upstream_fail_timeout memcached_upstream_max_fails merge_slashes min_delete_depth modern_browser modern_browser_value msie_padding msie_refresh multi_accept open_file_cache open_file_cache_errors open_file_cache_events open_file_cache_min_uses open_file_cache_valid open_log_file_cache output_buffers override_charset perl perl_modules perl_require perl_set pid pop3_auth pop3_capabilities port_in_redirect postpone_gzipping postpone_output protocol proxy proxy_bind proxy_buffer proxy_buffer_size proxy_buffering proxy_buffers proxy_busy_buffers_size proxy_cache proxy_cache_key proxy_cache_methods proxy_cache_min_uses proxy_cache_path proxy_cache_use_stale proxy_cache_valid proxy_connect_timeout proxy_headers_hash_bucket_size proxy_headers_hash_max_size proxy_hide_header proxy_ignore_client_abort proxy_ignore_headers proxy_intercept_errors proxy_max_temp_file_size proxy_method proxy_next_upstream proxy_pass_error_message proxy_pass_header proxy_pass_request_body proxy_pass_request_headers proxy_read_timeout proxy_redirect proxy_send_lowat proxy_send_timeout proxy_set_body proxy_set_header proxy_ssl_session_reuse proxy_store proxy_store_access proxy_temp_file_write_size proxy_temp_path proxy_timeout proxy_upstream_fail_timeout proxy_upstream_max_fails random_index read_ahead real_ip_header recursive_error_pages request_pool_size reset_timedout_connection resolver resolver_timeout rewrite_log rtsig_overflow_events rtsig_overflow_test rtsig_overflow_threshold rtsig_signo satisfy secure_link_secret send_lowat send_timeout sendfile sendfile_max_chunk server_name_in_redirect server_names_hash_bucket_size server_names_hash_max_size server_tokens set_real_ip_from smtp_auth smtp_capabilities smtp_client_buffer smtp_greeting_delay so_keepalive source_charset ssi ssi_ignore_recycled_buffers ssi_min_file_chunk ssi_silent_errors ssi_types ssi_value_length ssl ssl_certificate ssl_certificate_key ssl_ciphers ssl_client_certificate ssl_crl ssl_dhparam ssl_engine ssl_prefer_server_ciphers ssl_protocols ssl_session_cache ssl_session_timeout ssl_verify_client ssl_verify_depth starttls stub_status sub_filter sub_filter_once sub_filter_types tcp_nodelay tcp_nopush thread_stack_size timeout timer_resolution types_hash_bucket_size types_hash_max_size underscores_in_headers uninitialized_variable_warn use user userid userid_domain userid_expires userid_mark userid_name userid_p3p userid_path userid_service valid_referers variables_hash_bucket_size variables_hash_max_size worker_connections worker_cpu_affinity worker_priority worker_processes worker_rlimit_core worker_rlimit_nofile worker_rlimit_sigpending worker_threads working_directory xclient xml_entities xslt_stylesheet xslt_typesdrew@li229-23" - ); - - var keywords_block = words( - /* ngxDirectiveBlock */ "http mail events server types location upstream charset_map limit_except if geo map" - ); - - var keywords_important = words( - /* ngxDirectiveImportant */ "include root server server_name listen internal proxy_pass memcached_pass fastcgi_pass try_files" - ); - - var indentUnit = config.indentUnit, type; - function ret(style, tp) {type = tp; return style;} - - function tokenBase(stream, state) { - - - stream.eatWhile(/[\w\$_]/); - - var cur = stream.current(); - - - if (keywords.propertyIsEnumerable(cur)) { - return "keyword"; - } - else if (keywords_block.propertyIsEnumerable(cur)) { - return "variable-2"; - } - else if (keywords_important.propertyIsEnumerable(cur)) { - return "string-2"; - } - /**/ - - var ch = stream.next(); - if (ch == "@") {stream.eatWhile(/[\w\\\-]/); return ret("meta", stream.current());} - else if (ch == "/" && stream.eat("*")) { - state.tokenize = tokenCComment; - return tokenCComment(stream, state); - } - else if (ch == "<" && stream.eat("!")) { - state.tokenize = tokenSGMLComment; - return tokenSGMLComment(stream, state); - } - else if (ch == "=") ret(null, "compare"); - else if ((ch == "~" || ch == "|") && stream.eat("=")) return ret(null, "compare"); - else if (ch == "\"" || ch == "'") { - state.tokenize = tokenString(ch); - return state.tokenize(stream, state); - } - else if (ch == "#") { - stream.skipToEnd(); - return ret("comment", "comment"); - } - else if (ch == "!") { - stream.match(/^\s*\w*/); - return ret("keyword", "important"); - } - else if (/\d/.test(ch)) { - stream.eatWhile(/[\w.%]/); - return ret("number", "unit"); - } - else if (/[,.+>*\/]/.test(ch)) { - return ret(null, "select-op"); - } - else if (/[;{}:\[\]]/.test(ch)) { - return ret(null, ch); - } - else { - stream.eatWhile(/[\w\\\-]/); - return ret("variable", "variable"); - } - } - - function tokenCComment(stream, state) { - var maybeEnd = false, ch; - while ((ch = stream.next()) != null) { - if (maybeEnd && ch == "/") { - state.tokenize = tokenBase; - break; - } - maybeEnd = (ch == "*"); - } - return ret("comment", "comment"); - } - - function tokenSGMLComment(stream, state) { - var dashes = 0, ch; - while ((ch = stream.next()) != null) { - if (dashes >= 2 && ch == ">") { - state.tokenize = tokenBase; - break; - } - dashes = (ch == "-") ? dashes + 1 : 0; - } - return ret("comment", "comment"); - } - - function tokenString(quote) { - return function(stream, state) { - var escaped = false, ch; - while ((ch = stream.next()) != null) { - if (ch == quote && !escaped) - break; - escaped = !escaped && ch == "\\"; - } - if (!escaped) state.tokenize = tokenBase; - return ret("string", "string"); - }; - } - - return { - startState: function(base) { - return {tokenize: tokenBase, - baseIndent: base || 0, - stack: []}; - }, - - token: function(stream, state) { - if (stream.eatSpace()) return null; - type = null; - var style = state.tokenize(stream, state); - - var context = state.stack[state.stack.length-1]; - if (type == "hash" && context == "rule") style = "atom"; - else if (style == "variable") { - if (context == "rule") style = "number"; - else if (!context || context == "@media{") style = "tag"; - } - - if (context == "rule" && /^[\{\};]$/.test(type)) - state.stack.pop(); - if (type == "{") { - if (context == "@media") state.stack[state.stack.length-1] = "@media{"; - else state.stack.push("{"); - } - else if (type == "}") state.stack.pop(); - else if (type == "@media") state.stack.push("@media"); - else if (context == "{" && type != "comment") state.stack.push("rule"); - return style; - }, - - indent: function(state, textAfter) { - var n = state.stack.length; - if (/^\}/.test(textAfter)) - n -= state.stack[state.stack.length-1] == "rule" ? 2 : 1; - return state.baseIndent + n * indentUnit; - }, - - electricChars: "}" - }; -}); - -CodeMirror.defineMIME("text/nginx", "text/x-nginx-conf"); diff --git a/plugins/codemirror/codemirror/mode/ntriples/index.html b/plugins/codemirror/codemirror/mode/ntriples/index.html deleted file mode 100644 index c8a6791..0000000 --- a/plugins/codemirror/codemirror/mode/ntriples/index.html +++ /dev/null @@ -1,45 +0,0 @@ - - -CodeMirror: NTriples mode - - - - - - - - - -
    -

    NTriples mode

    -
    - -
    - - -

    MIME types defined: text/n-triples.

    -
    diff --git a/plugins/codemirror/codemirror/mode/ntriples/ntriples.js b/plugins/codemirror/codemirror/mode/ntriples/ntriples.js deleted file mode 100644 index ed0cee3..0000000 --- a/plugins/codemirror/codemirror/mode/ntriples/ntriples.js +++ /dev/null @@ -1,170 +0,0 @@ -/********************************************************** -* This script provides syntax highlighting support for -* the Ntriples format. -* Ntriples format specification: -* http://www.w3.org/TR/rdf-testcases/#ntriples -***********************************************************/ - -/* - The following expression defines the defined ASF grammar transitions. - - pre_subject -> - { - ( writing_subject_uri | writing_bnode_uri ) - -> pre_predicate - -> writing_predicate_uri - -> pre_object - -> writing_object_uri | writing_object_bnode | - ( - writing_object_literal - -> writing_literal_lang | writing_literal_type - ) - -> post_object - -> BEGIN - } otherwise { - -> ERROR - } -*/ -CodeMirror.defineMode("ntriples", function() { - - var Location = { - PRE_SUBJECT : 0, - WRITING_SUB_URI : 1, - WRITING_BNODE_URI : 2, - PRE_PRED : 3, - WRITING_PRED_URI : 4, - PRE_OBJ : 5, - WRITING_OBJ_URI : 6, - WRITING_OBJ_BNODE : 7, - WRITING_OBJ_LITERAL : 8, - WRITING_LIT_LANG : 9, - WRITING_LIT_TYPE : 10, - POST_OBJ : 11, - ERROR : 12 - }; - function transitState(currState, c) { - var currLocation = currState.location; - var ret; - - // Opening. - if (currLocation == Location.PRE_SUBJECT && c == '<') ret = Location.WRITING_SUB_URI; - else if(currLocation == Location.PRE_SUBJECT && c == '_') ret = Location.WRITING_BNODE_URI; - else if(currLocation == Location.PRE_PRED && c == '<') ret = Location.WRITING_PRED_URI; - else if(currLocation == Location.PRE_OBJ && c == '<') ret = Location.WRITING_OBJ_URI; - else if(currLocation == Location.PRE_OBJ && c == '_') ret = Location.WRITING_OBJ_BNODE; - else if(currLocation == Location.PRE_OBJ && c == '"') ret = Location.WRITING_OBJ_LITERAL; - - // Closing. - else if(currLocation == Location.WRITING_SUB_URI && c == '>') ret = Location.PRE_PRED; - else if(currLocation == Location.WRITING_BNODE_URI && c == ' ') ret = Location.PRE_PRED; - else if(currLocation == Location.WRITING_PRED_URI && c == '>') ret = Location.PRE_OBJ; - else if(currLocation == Location.WRITING_OBJ_URI && c == '>') ret = Location.POST_OBJ; - else if(currLocation == Location.WRITING_OBJ_BNODE && c == ' ') ret = Location.POST_OBJ; - else if(currLocation == Location.WRITING_OBJ_LITERAL && c == '"') ret = Location.POST_OBJ; - else if(currLocation == Location.WRITING_LIT_LANG && c == ' ') ret = Location.POST_OBJ; - else if(currLocation == Location.WRITING_LIT_TYPE && c == '>') ret = Location.POST_OBJ; - - // Closing typed and language literal. - else if(currLocation == Location.WRITING_OBJ_LITERAL && c == '@') ret = Location.WRITING_LIT_LANG; - else if(currLocation == Location.WRITING_OBJ_LITERAL && c == '^') ret = Location.WRITING_LIT_TYPE; - - // Spaces. - else if( c == ' ' && - ( - currLocation == Location.PRE_SUBJECT || - currLocation == Location.PRE_PRED || - currLocation == Location.PRE_OBJ || - currLocation == Location.POST_OBJ - ) - ) ret = currLocation; - - // Reset. - else if(currLocation == Location.POST_OBJ && c == '.') ret = Location.PRE_SUBJECT; - - // Error - else ret = Location.ERROR; - - currState.location=ret; - } - - return { - startState: function() { - return { - location : Location.PRE_SUBJECT, - uris : [], - anchors : [], - bnodes : [], - langs : [], - types : [] - }; - }, - token: function(stream, state) { - var ch = stream.next(); - if(ch == '<') { - transitState(state, ch); - var parsedURI = ''; - stream.eatWhile( function(c) { if( c != '#' && c != '>' ) { parsedURI += c; return true; } return false;} ); - state.uris.push(parsedURI); - if( stream.match('#', false) ) return 'variable'; - stream.next(); - transitState(state, '>'); - return 'variable'; - } - if(ch == '#') { - var parsedAnchor = ''; - stream.eatWhile(function(c) { if(c != '>' && c != ' ') { parsedAnchor+= c; return true; } return false;}); - state.anchors.push(parsedAnchor); - return 'variable-2'; - } - if(ch == '>') { - transitState(state, '>'); - return 'variable'; - } - if(ch == '_') { - transitState(state, ch); - var parsedBNode = ''; - stream.eatWhile(function(c) { if( c != ' ' ) { parsedBNode += c; return true; } return false;}); - state.bnodes.push(parsedBNode); - stream.next(); - transitState(state, ' '); - return 'builtin'; - } - if(ch == '"') { - transitState(state, ch); - stream.eatWhile( function(c) { return c != '"'; } ); - stream.next(); - if( stream.peek() != '@' && stream.peek() != '^' ) { - transitState(state, '"'); - } - return 'string'; - } - if( ch == '@' ) { - transitState(state, '@'); - var parsedLang = ''; - stream.eatWhile(function(c) { if( c != ' ' ) { parsedLang += c; return true; } return false;}); - state.langs.push(parsedLang); - stream.next(); - transitState(state, ' '); - return 'string-2'; - } - if( ch == '^' ) { - stream.next(); - transitState(state, '^'); - var parsedType = ''; - stream.eatWhile(function(c) { if( c != '>' ) { parsedType += c; return true; } return false;} ); - state.types.push(parsedType); - stream.next(); - transitState(state, '>'); - return 'variable'; - } - if( ch == ' ' ) { - transitState(state, ch); - } - if( ch == '.' ) { - transitState(state, ch); - } - } - }; -}); - -CodeMirror.defineMIME("text/n-triples", "ntriples"); diff --git a/plugins/codemirror/codemirror/mode/ocaml/index.html b/plugins/codemirror/codemirror/mode/ocaml/index.html deleted file mode 100644 index 5d39fad..0000000 --- a/plugins/codemirror/codemirror/mode/ocaml/index.html +++ /dev/null @@ -1,146 +0,0 @@ - - -CodeMirror: OCaml mode - - - - - - - - - - -
    -

    OCaml mode

    - - - - - - -

    MIME types defined: text/x-ocaml.

    -
    diff --git a/plugins/codemirror/codemirror/mode/ocaml/ocaml.js b/plugins/codemirror/codemirror/mode/ocaml/ocaml.js deleted file mode 100644 index 32cbc0b..0000000 --- a/plugins/codemirror/codemirror/mode/ocaml/ocaml.js +++ /dev/null @@ -1,116 +0,0 @@ -CodeMirror.defineMode('ocaml', function() { - - var words = { - 'true': 'atom', - 'false': 'atom', - 'let': 'keyword', - 'rec': 'keyword', - 'in': 'keyword', - 'of': 'keyword', - 'and': 'keyword', - 'succ': 'keyword', - 'if': 'keyword', - 'then': 'keyword', - 'else': 'keyword', - 'for': 'keyword', - 'to': 'keyword', - 'while': 'keyword', - 'do': 'keyword', - 'done': 'keyword', - 'fun': 'keyword', - 'function': 'keyword', - 'val': 'keyword', - 'type': 'keyword', - 'mutable': 'keyword', - 'match': 'keyword', - 'with': 'keyword', - 'try': 'keyword', - 'raise': 'keyword', - 'begin': 'keyword', - 'end': 'keyword', - 'open': 'builtin', - 'trace': 'builtin', - 'ignore': 'builtin', - 'exit': 'builtin', - 'print_string': 'builtin', - 'print_endline': 'builtin' - }; - - function tokenBase(stream, state) { - var ch = stream.next(); - - if (ch === '"') { - state.tokenize = tokenString; - return state.tokenize(stream, state); - } - if (ch === '(') { - if (stream.eat('*')) { - state.commentLevel++; - state.tokenize = tokenComment; - return state.tokenize(stream, state); - } - } - if (ch === '~') { - stream.eatWhile(/\w/); - return 'variable-2'; - } - if (ch === '`') { - stream.eatWhile(/\w/); - return 'quote'; - } - if (/\d/.test(ch)) { - stream.eatWhile(/[\d]/); - if (stream.eat('.')) { - stream.eatWhile(/[\d]/); - } - return 'number'; - } - if ( /[+\-*&%=<>!?|]/.test(ch)) { - return 'operator'; - } - stream.eatWhile(/\w/); - var cur = stream.current(); - return words[cur] || 'variable'; - } - - function tokenString(stream, state) { - var next, end = false, escaped = false; - while ((next = stream.next()) != null) { - if (next === '"' && !escaped) { - end = true; - break; - } - escaped = !escaped && next === '\\'; - } - if (end && !escaped) { - state.tokenize = tokenBase; - } - return 'string'; - }; - - function tokenComment(stream, state) { - var prev, next; - while(state.commentLevel > 0 && (next = stream.next()) != null) { - if (prev === '(' && next === '*') state.commentLevel++; - if (prev === '*' && next === ')') state.commentLevel--; - prev = next; - } - if (state.commentLevel <= 0) { - state.tokenize = tokenBase; - } - return 'comment'; - } - - return { - startState: function() {return {tokenize: tokenBase, commentLevel: 0};}, - token: function(stream, state) { - if (stream.eatSpace()) return null; - return state.tokenize(stream, state); - }, - - blockCommentStart: "(*", - blockCommentEnd: "*)" - }; -}); - -CodeMirror.defineMIME('text/x-ocaml', 'ocaml'); diff --git a/plugins/codemirror/codemirror/mode/octave/index.html b/plugins/codemirror/codemirror/mode/octave/index.html deleted file mode 100644 index bd5a523..0000000 --- a/plugins/codemirror/codemirror/mode/octave/index.html +++ /dev/null @@ -1,95 +0,0 @@ - - -CodeMirror: Octave mode - - - - - - - - - -
    -

    Octave mode

    - -
    - - -

    MIME types defined: text/x-octave.

    -
    diff --git a/plugins/codemirror/codemirror/mode/octave/octave.js b/plugins/codemirror/codemirror/mode/octave/octave.js deleted file mode 100644 index 23cd2fe..0000000 --- a/plugins/codemirror/codemirror/mode/octave/octave.js +++ /dev/null @@ -1,118 +0,0 @@ -CodeMirror.defineMode("octave", function() { - function wordRegexp(words) { - return new RegExp("^((" + words.join(")|(") + "))\\b"); - } - - var singleOperators = new RegExp("^[\\+\\-\\*/&|\\^~<>!@'\\\\]"); - var singleDelimiters = new RegExp('^[\\(\\[\\{\\},:=;]'); - var doubleOperators = new RegExp("^((==)|(~=)|(<=)|(>=)|(<<)|(>>)|(\\.[\\+\\-\\*/\\^\\\\]))"); - var doubleDelimiters = new RegExp("^((!=)|(\\+=)|(\\-=)|(\\*=)|(/=)|(&=)|(\\|=)|(\\^=))"); - var tripleDelimiters = new RegExp("^((>>=)|(<<=))"); - var expressionEnd = new RegExp("^[\\]\\)]"); - var identifiers = new RegExp("^[_A-Za-z][_A-Za-z0-9]*"); - - var builtins = wordRegexp([ - 'error', 'eval', 'function', 'abs', 'acos', 'atan', 'asin', 'cos', - 'cosh', 'exp', 'log', 'prod', 'log10', 'max', 'min', 'sign', 'sin', 'sinh', - 'sqrt', 'tan', 'reshape', 'break', 'zeros', 'default', 'margin', 'round', 'ones', - 'rand', 'syn', 'ceil', 'floor', 'size', 'clear', 'zeros', 'eye', 'mean', 'std', 'cov', - 'det', 'eig', 'inv', 'norm', 'rank', 'trace', 'expm', 'logm', 'sqrtm', 'linspace', 'plot', - 'title', 'xlabel', 'ylabel', 'legend', 'text', 'meshgrid', 'mesh', 'num2str' - ]); - - var keywords = wordRegexp([ - 'return', 'case', 'switch', 'else', 'elseif', 'end', 'endif', 'endfunction', - 'if', 'otherwise', 'do', 'for', 'while', 'try', 'catch', 'classdef', 'properties', 'events', - 'methods', 'global', 'persistent', 'endfor', 'endwhile', 'printf', 'disp', 'until', 'continue' - ]); - - - // tokenizers - function tokenTranspose(stream, state) { - if (!stream.sol() && stream.peek() === '\'') { - stream.next(); - state.tokenize = tokenBase; - return 'operator'; - } - state.tokenize = tokenBase; - return tokenBase(stream, state); - } - - - function tokenComment(stream, state) { - if (stream.match(/^.*%}/)) { - state.tokenize = tokenBase; - return 'comment'; - }; - stream.skipToEnd(); - return 'comment'; - } - - function tokenBase(stream, state) { - // whitespaces - if (stream.eatSpace()) return null; - - // Handle one line Comments - if (stream.match('%{')){ - state.tokenize = tokenComment; - stream.skipToEnd(); - return 'comment'; - } - - if (stream.match(/^(%)|(\.\.\.)/)){ - stream.skipToEnd(); - return 'comment'; - } - - // Handle Number Literals - if (stream.match(/^[0-9\.+-]/, false)) { - if (stream.match(/^[+-]?0x[0-9a-fA-F]+[ij]?/)) { - stream.tokenize = tokenBase; - return 'number'; }; - if (stream.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?[ij]?/)) { return 'number'; }; - if (stream.match(/^[+-]?\d+([EeDd][+-]?\d+)?[ij]?/)) { return 'number'; }; - } - if (stream.match(wordRegexp(['nan','NaN','inf','Inf']))) { return 'number'; }; - - // Handle Strings - if (stream.match(/^"([^"]|(""))*"/)) { return 'string'; } ; - if (stream.match(/^'([^']|(''))*'/)) { return 'string'; } ; - - // Handle words - if (stream.match(keywords)) { return 'keyword'; } ; - if (stream.match(builtins)) { return 'builtin'; } ; - if (stream.match(identifiers)) { return 'variable'; } ; - - if (stream.match(singleOperators) || stream.match(doubleOperators)) { return 'operator'; }; - if (stream.match(singleDelimiters) || stream.match(doubleDelimiters) || stream.match(tripleDelimiters)) { return null; }; - - if (stream.match(expressionEnd)) { - state.tokenize = tokenTranspose; - return null; - }; - - - // Handle non-detected items - stream.next(); - return 'error'; - }; - - - return { - startState: function() { - return { - tokenize: tokenBase - }; - }, - - token: function(stream, state) { - var style = state.tokenize(stream, state); - if (style === 'number' || style === 'variable'){ - state.tokenize = tokenTranspose; - } - return style; - } - }; -}); - -CodeMirror.defineMIME("text/x-octave", "octave"); diff --git a/plugins/codemirror/codemirror/mode/pascal/index.html b/plugins/codemirror/codemirror/mode/pascal/index.html deleted file mode 100644 index bf8ff0d..0000000 --- a/plugins/codemirror/codemirror/mode/pascal/index.html +++ /dev/null @@ -1,61 +0,0 @@ - - -CodeMirror: Pascal mode - - - - - - - - - -
    -

    Pascal mode

    - - -
    - - - -

    MIME types defined: text/x-pascal.

    -
    diff --git a/plugins/codemirror/codemirror/mode/pascal/pascal.js b/plugins/codemirror/codemirror/mode/pascal/pascal.js deleted file mode 100644 index 09d9b06..0000000 --- a/plugins/codemirror/codemirror/mode/pascal/pascal.js +++ /dev/null @@ -1,94 +0,0 @@ -CodeMirror.defineMode("pascal", function() { - function words(str) { - var obj = {}, words = str.split(" "); - for (var i = 0; i < words.length; ++i) obj[words[i]] = true; - return obj; - } - var keywords = words("and array begin case const div do downto else end file for forward integer " + - "boolean char function goto if in label mod nil not of or packed procedure " + - "program record repeat set string then to type until var while with"); - var atoms = {"null": true}; - - var isOperatorChar = /[+\-*&%=<>!?|\/]/; - - function tokenBase(stream, state) { - var ch = stream.next(); - if (ch == "#" && state.startOfLine) { - stream.skipToEnd(); - return "meta"; - } - if (ch == '"' || ch == "'") { - state.tokenize = tokenString(ch); - return state.tokenize(stream, state); - } - if (ch == "(" && stream.eat("*")) { - state.tokenize = tokenComment; - return tokenComment(stream, state); - } - if (/[\[\]{}\(\),;\:\.]/.test(ch)) { - return null; - } - if (/\d/.test(ch)) { - stream.eatWhile(/[\w\.]/); - return "number"; - } - if (ch == "/") { - if (stream.eat("/")) { - stream.skipToEnd(); - return "comment"; - } - } - if (isOperatorChar.test(ch)) { - stream.eatWhile(isOperatorChar); - return "operator"; - } - stream.eatWhile(/[\w\$_]/); - var cur = stream.current(); - if (keywords.propertyIsEnumerable(cur)) return "keyword"; - if (atoms.propertyIsEnumerable(cur)) return "atom"; - return "variable"; - } - - function tokenString(quote) { - return function(stream, state) { - var escaped = false, next, end = false; - while ((next = stream.next()) != null) { - if (next == quote && !escaped) {end = true; break;} - escaped = !escaped && next == "\\"; - } - if (end || !escaped) state.tokenize = null; - return "string"; - }; - } - - function tokenComment(stream, state) { - var maybeEnd = false, ch; - while (ch = stream.next()) { - if (ch == ")" && maybeEnd) { - state.tokenize = null; - break; - } - maybeEnd = (ch == "*"); - } - return "comment"; - } - - // Interface - - return { - startState: function() { - return {tokenize: null}; - }, - - token: function(stream, state) { - if (stream.eatSpace()) return null; - var style = (state.tokenize || tokenBase)(stream, state); - if (style == "comment" || style == "meta") return style; - return style; - }, - - electricChars: "{}" - }; -}); - -CodeMirror.defineMIME("text/x-pascal", "pascal"); diff --git a/plugins/codemirror/codemirror/mode/pegjs/index.html b/plugins/codemirror/codemirror/mode/pegjs/index.html deleted file mode 100644 index 678b714..0000000 --- a/plugins/codemirror/codemirror/mode/pegjs/index.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - CodeMirror: PEG.js Mode - - - - - - - - - - - - -
    -

    PEG.js Mode

    -
    - -

    The PEG.js Mode

    -

    Created by Forbes Lindesay.

    -
    - - diff --git a/plugins/codemirror/codemirror/mode/pegjs/pegjs.js b/plugins/codemirror/codemirror/mode/pegjs/pegjs.js deleted file mode 100644 index 6cdcc61..0000000 --- a/plugins/codemirror/codemirror/mode/pegjs/pegjs.js +++ /dev/null @@ -1,103 +0,0 @@ -CodeMirror.defineMode("pegjs", function (config) { - var jsMode = CodeMirror.getMode(config, "javascript"); - - function identifier(stream) { - return stream.match(/^[a-zA-Z_][a-zA-Z0-9_]*/); - } - - return { - startState: function () { - return { - inString: false, - stringType: null, - inComment: false, - inChracterClass: false, - braced: 0, - lhs: true, - localState: null - }; - }, - token: function (stream, state) { - if (stream) - - //check for state changes - if (!state.inString && !state.inComment && ((stream.peek() == '"') || (stream.peek() == "'"))) { - state.stringType = stream.peek(); - stream.next(); // Skip quote - state.inString = true; // Update state - } - if (!state.inString && !state.inComment && stream.match(/^\/\*/)) { - state.inComment = true; - } - - //return state - if (state.inString) { - while (state.inString && !stream.eol()) { - if (stream.peek() === state.stringType) { - stream.next(); // Skip quote - state.inString = false; // Clear flag - } else if (stream.peek() === '\\') { - stream.next(); - stream.next(); - } else { - stream.match(/^.[^\\\"\']*/); - } - } - return state.lhs ? "property string" : "string"; // Token style - } else if (state.inComment) { - while (state.inComment && !stream.eol()) { - if (stream.match(/\*\//)) { - state.inComment = false; // Clear flag - } else { - stream.match(/^.[^\*]*/); - } - } - return "comment"; - } else if (state.inChracterClass) { - if (stream.match(/^[^\]\\]+/)) { - return; - } else if (stream.match(/^\\./)) { - return; - } else { - stream.next(); - state.inChracterClass = false; - return 'bracket'; - } - } else if (stream.peek() === '[') { - stream.next(); - state.inChracterClass = true; - return 'bracket'; - } else if (stream.match(/^\/\//)) { - stream.skipToEnd(); - return "comment"; - } else if (state.braced || stream.peek() === '{') { - if (state.localState === null) { - state.localState = jsMode.startState(); - } - var token = jsMode.token(stream, state.localState); - var text = stream.current(); - if (!token) { - for (var i = 0; i < text.length; i++) { - if (text[i] === '{') { - state.braced++; - } else if (text[i] === '}') { - state.braced--; - } - }; - } - return token; - } else if (identifier(stream)) { - if (stream.peek() === ':') { - return 'variable'; - } - return 'variable-2'; - } else if (['[', ']', '(', ')'].indexOf(stream.peek()) != -1) { - stream.next(); - return 'bracket'; - } else if (!stream.eatSpace()) { - stream.next(); - } - return null; - } - }; -}, "javascript"); diff --git a/plugins/codemirror/codemirror/mode/perl/index.html b/plugins/codemirror/codemirror/mode/perl/index.html deleted file mode 100644 index 2b7578e..0000000 --- a/plugins/codemirror/codemirror/mode/perl/index.html +++ /dev/null @@ -1,75 +0,0 @@ - - -CodeMirror: Perl mode - - - - - - - - - -
    -

    Perl mode

    - - -
    - - - -

    MIME types defined: text/x-perl.

    -
    diff --git a/plugins/codemirror/codemirror/mode/perl/perl.js b/plugins/codemirror/codemirror/mode/perl/perl.js deleted file mode 100644 index 5954b1a..0000000 --- a/plugins/codemirror/codemirror/mode/perl/perl.js +++ /dev/null @@ -1,816 +0,0 @@ -// CodeMirror2 mode/perl/perl.js (text/x-perl) beta 0.10 (2011-11-08) -// This is a part of CodeMirror from https://github.com/sabaca/CodeMirror_mode_perl (mail@sabaca.com) -CodeMirror.defineMode("perl",function(){ - // http://perldoc.perl.org - var PERL={ // null - magic touch - // 1 - keyword - // 2 - def - // 3 - atom - // 4 - operator - // 5 - variable-2 (predefined) - // [x,y] - x=1,2,3; y=must be defined if x{...} - // PERL operators - '->' : 4, - '++' : 4, - '--' : 4, - '**' : 4, - // ! ~ \ and unary + and - - '=~' : 4, - '!~' : 4, - '*' : 4, - '/' : 4, - '%' : 4, - 'x' : 4, - '+' : 4, - '-' : 4, - '.' : 4, - '<<' : 4, - '>>' : 4, - // named unary operators - '<' : 4, - '>' : 4, - '<=' : 4, - '>=' : 4, - 'lt' : 4, - 'gt' : 4, - 'le' : 4, - 'ge' : 4, - '==' : 4, - '!=' : 4, - '<=>' : 4, - 'eq' : 4, - 'ne' : 4, - 'cmp' : 4, - '~~' : 4, - '&' : 4, - '|' : 4, - '^' : 4, - '&&' : 4, - '||' : 4, - '//' : 4, - '..' : 4, - '...' : 4, - '?' : 4, - ':' : 4, - '=' : 4, - '+=' : 4, - '-=' : 4, - '*=' : 4, // etc. ??? - ',' : 4, - '=>' : 4, - '::' : 4, - // list operators (rightward) - 'not' : 4, - 'and' : 4, - 'or' : 4, - 'xor' : 4, - // PERL predefined variables (I know, what this is a paranoid idea, but may be needed for people, who learn PERL, and for me as well, ...and may be for you?;) - 'BEGIN' : [5,1], - 'END' : [5,1], - 'PRINT' : [5,1], - 'PRINTF' : [5,1], - 'GETC' : [5,1], - 'READ' : [5,1], - 'READLINE' : [5,1], - 'DESTROY' : [5,1], - 'TIE' : [5,1], - 'TIEHANDLE' : [5,1], - 'UNTIE' : [5,1], - 'STDIN' : 5, - 'STDIN_TOP' : 5, - 'STDOUT' : 5, - 'STDOUT_TOP' : 5, - 'STDERR' : 5, - 'STDERR_TOP' : 5, - '$ARG' : 5, - '$_' : 5, - '@ARG' : 5, - '@_' : 5, - '$LIST_SEPARATOR' : 5, - '$"' : 5, - '$PROCESS_ID' : 5, - '$PID' : 5, - '$$' : 5, - '$REAL_GROUP_ID' : 5, - '$GID' : 5, - '$(' : 5, - '$EFFECTIVE_GROUP_ID' : 5, - '$EGID' : 5, - '$)' : 5, - '$PROGRAM_NAME' : 5, - '$0' : 5, - '$SUBSCRIPT_SEPARATOR' : 5, - '$SUBSEP' : 5, - '$;' : 5, - '$REAL_USER_ID' : 5, - '$UID' : 5, - '$<' : 5, - '$EFFECTIVE_USER_ID' : 5, - '$EUID' : 5, - '$>' : 5, - '$a' : 5, - '$b' : 5, - '$COMPILING' : 5, - '$^C' : 5, - '$DEBUGGING' : 5, - '$^D' : 5, - '${^ENCODING}' : 5, - '$ENV' : 5, - '%ENV' : 5, - '$SYSTEM_FD_MAX' : 5, - '$^F' : 5, - '@F' : 5, - '${^GLOBAL_PHASE}' : 5, - '$^H' : 5, - '%^H' : 5, - '@INC' : 5, - '%INC' : 5, - '$INPLACE_EDIT' : 5, - '$^I' : 5, - '$^M' : 5, - '$OSNAME' : 5, - '$^O' : 5, - '${^OPEN}' : 5, - '$PERLDB' : 5, - '$^P' : 5, - '$SIG' : 5, - '%SIG' : 5, - '$BASETIME' : 5, - '$^T' : 5, - '${^TAINT}' : 5, - '${^UNICODE}' : 5, - '${^UTF8CACHE}' : 5, - '${^UTF8LOCALE}' : 5, - '$PERL_VERSION' : 5, - '$^V' : 5, - '${^WIN32_SLOPPY_STAT}' : 5, - '$EXECUTABLE_NAME' : 5, - '$^X' : 5, - '$1' : 5, // - regexp $1, $2... - '$MATCH' : 5, - '$&' : 5, - '${^MATCH}' : 5, - '$PREMATCH' : 5, - '$`' : 5, - '${^PREMATCH}' : 5, - '$POSTMATCH' : 5, - "$'" : 5, - '${^POSTMATCH}' : 5, - '$LAST_PAREN_MATCH' : 5, - '$+' : 5, - '$LAST_SUBMATCH_RESULT' : 5, - '$^N' : 5, - '@LAST_MATCH_END' : 5, - '@+' : 5, - '%LAST_PAREN_MATCH' : 5, - '%+' : 5, - '@LAST_MATCH_START' : 5, - '@-' : 5, - '%LAST_MATCH_START' : 5, - '%-' : 5, - '$LAST_REGEXP_CODE_RESULT' : 5, - '$^R' : 5, - '${^RE_DEBUG_FLAGS}' : 5, - '${^RE_TRIE_MAXBUF}' : 5, - '$ARGV' : 5, - '@ARGV' : 5, - 'ARGV' : 5, - 'ARGVOUT' : 5, - '$OUTPUT_FIELD_SEPARATOR' : 5, - '$OFS' : 5, - '$,' : 5, - '$INPUT_LINE_NUMBER' : 5, - '$NR' : 5, - '$.' : 5, - '$INPUT_RECORD_SEPARATOR' : 5, - '$RS' : 5, - '$/' : 5, - '$OUTPUT_RECORD_SEPARATOR' : 5, - '$ORS' : 5, - '$\\' : 5, - '$OUTPUT_AUTOFLUSH' : 5, - '$|' : 5, - '$ACCUMULATOR' : 5, - '$^A' : 5, - '$FORMAT_FORMFEED' : 5, - '$^L' : 5, - '$FORMAT_PAGE_NUMBER' : 5, - '$%' : 5, - '$FORMAT_LINES_LEFT' : 5, - '$-' : 5, - '$FORMAT_LINE_BREAK_CHARACTERS' : 5, - '$:' : 5, - '$FORMAT_LINES_PER_PAGE' : 5, - '$=' : 5, - '$FORMAT_TOP_NAME' : 5, - '$^' : 5, - '$FORMAT_NAME' : 5, - '$~' : 5, - '${^CHILD_ERROR_NATIVE}' : 5, - '$EXTENDED_OS_ERROR' : 5, - '$^E' : 5, - '$EXCEPTIONS_BEING_CAUGHT' : 5, - '$^S' : 5, - '$WARNING' : 5, - '$^W' : 5, - '${^WARNING_BITS}' : 5, - '$OS_ERROR' : 5, - '$ERRNO' : 5, - '$!' : 5, - '%OS_ERROR' : 5, - '%ERRNO' : 5, - '%!' : 5, - '$CHILD_ERROR' : 5, - '$?' : 5, - '$EVAL_ERROR' : 5, - '$@' : 5, - '$OFMT' : 5, - '$#' : 5, - '$*' : 5, - '$ARRAY_BASE' : 5, - '$[' : 5, - '$OLD_PERL_VERSION' : 5, - '$]' : 5, - // PERL blocks - 'if' :[1,1], - elsif :[1,1], - 'else' :[1,1], - 'while' :[1,1], - unless :[1,1], - 'for' :[1,1], - foreach :[1,1], - // PERL functions - 'abs' :1, // - absolute value function - accept :1, // - accept an incoming socket connect - alarm :1, // - schedule a SIGALRM - 'atan2' :1, // - arctangent of Y/X in the range -PI to PI - bind :1, // - binds an address to a socket - binmode :1, // - prepare binary files for I/O - bless :1, // - create an object - bootstrap :1, // - 'break' :1, // - break out of a "given" block - caller :1, // - get context of the current subroutine call - chdir :1, // - change your current working directory - chmod :1, // - changes the permissions on a list of files - chomp :1, // - remove a trailing record separator from a string - chop :1, // - remove the last character from a string - chown :1, // - change the owership on a list of files - chr :1, // - get character this number represents - chroot :1, // - make directory new root for path lookups - close :1, // - close file (or pipe or socket) handle - closedir :1, // - close directory handle - connect :1, // - connect to a remote socket - 'continue' :[1,1], // - optional trailing block in a while or foreach - 'cos' :1, // - cosine function - crypt :1, // - one-way passwd-style encryption - dbmclose :1, // - breaks binding on a tied dbm file - dbmopen :1, // - create binding on a tied dbm file - 'default' :1, // - defined :1, // - test whether a value, variable, or function is defined - 'delete' :1, // - deletes a value from a hash - die :1, // - raise an exception or bail out - 'do' :1, // - turn a BLOCK into a TERM - dump :1, // - create an immediate core dump - each :1, // - retrieve the next key/value pair from a hash - endgrent :1, // - be done using group file - endhostent :1, // - be done using hosts file - endnetent :1, // - be done using networks file - endprotoent :1, // - be done using protocols file - endpwent :1, // - be done using passwd file - endservent :1, // - be done using services file - eof :1, // - test a filehandle for its end - 'eval' :1, // - catch exceptions or compile and run code - 'exec' :1, // - abandon this program to run another - exists :1, // - test whether a hash key is present - exit :1, // - terminate this program - 'exp' :1, // - raise I to a power - fcntl :1, // - file control system call - fileno :1, // - return file descriptor from filehandle - flock :1, // - lock an entire file with an advisory lock - fork :1, // - create a new process just like this one - format :1, // - declare a picture format with use by the write() function - formline :1, // - internal function used for formats - getc :1, // - get the next character from the filehandle - getgrent :1, // - get next group record - getgrgid :1, // - get group record given group user ID - getgrnam :1, // - get group record given group name - gethostbyaddr :1, // - get host record given its address - gethostbyname :1, // - get host record given name - gethostent :1, // - get next hosts record - getlogin :1, // - return who logged in at this tty - getnetbyaddr :1, // - get network record given its address - getnetbyname :1, // - get networks record given name - getnetent :1, // - get next networks record - getpeername :1, // - find the other end of a socket connection - getpgrp :1, // - get process group - getppid :1, // - get parent process ID - getpriority :1, // - get current nice value - getprotobyname :1, // - get protocol record given name - getprotobynumber :1, // - get protocol record numeric protocol - getprotoent :1, // - get next protocols record - getpwent :1, // - get next passwd record - getpwnam :1, // - get passwd record given user login name - getpwuid :1, // - get passwd record given user ID - getservbyname :1, // - get services record given its name - getservbyport :1, // - get services record given numeric port - getservent :1, // - get next services record - getsockname :1, // - retrieve the sockaddr for a given socket - getsockopt :1, // - get socket options on a given socket - given :1, // - glob :1, // - expand filenames using wildcards - gmtime :1, // - convert UNIX time into record or string using Greenwich time - 'goto' :1, // - create spaghetti code - grep :1, // - locate elements in a list test true against a given criterion - hex :1, // - convert a string to a hexadecimal number - 'import' :1, // - patch a module's namespace into your own - index :1, // - find a substring within a string - 'int' :1, // - get the integer portion of a number - ioctl :1, // - system-dependent device control system call - 'join' :1, // - join a list into a string using a separator - keys :1, // - retrieve list of indices from a hash - kill :1, // - send a signal to a process or process group - last :1, // - exit a block prematurely - lc :1, // - return lower-case version of a string - lcfirst :1, // - return a string with just the next letter in lower case - length :1, // - return the number of bytes in a string - 'link' :1, // - create a hard link in the filesytem - listen :1, // - register your socket as a server - local : 2, // - create a temporary value for a global variable (dynamic scoping) - localtime :1, // - convert UNIX time into record or string using local time - lock :1, // - get a thread lock on a variable, subroutine, or method - 'log' :1, // - retrieve the natural logarithm for a number - lstat :1, // - stat a symbolic link - m :null, // - match a string with a regular expression pattern - map :1, // - apply a change to a list to get back a new list with the changes - mkdir :1, // - create a directory - msgctl :1, // - SysV IPC message control operations - msgget :1, // - get SysV IPC message queue - msgrcv :1, // - receive a SysV IPC message from a message queue - msgsnd :1, // - send a SysV IPC message to a message queue - my : 2, // - declare and assign a local variable (lexical scoping) - 'new' :1, // - next :1, // - iterate a block prematurely - no :1, // - unimport some module symbols or semantics at compile time - oct :1, // - convert a string to an octal number - open :1, // - open a file, pipe, or descriptor - opendir :1, // - open a directory - ord :1, // - find a character's numeric representation - our : 2, // - declare and assign a package variable (lexical scoping) - pack :1, // - convert a list into a binary representation - 'package' :1, // - declare a separate global namespace - pipe :1, // - open a pair of connected filehandles - pop :1, // - remove the last element from an array and return it - pos :1, // - find or set the offset for the last/next m//g search - print :1, // - output a list to a filehandle - printf :1, // - output a formatted list to a filehandle - prototype :1, // - get the prototype (if any) of a subroutine - push :1, // - append one or more elements to an array - q :null, // - singly quote a string - qq :null, // - doubly quote a string - qr :null, // - Compile pattern - quotemeta :null, // - quote regular expression magic characters - qw :null, // - quote a list of words - qx :null, // - backquote quote a string - rand :1, // - retrieve the next pseudorandom number - read :1, // - fixed-length buffered input from a filehandle - readdir :1, // - get a directory from a directory handle - readline :1, // - fetch a record from a file - readlink :1, // - determine where a symbolic link is pointing - readpipe :1, // - execute a system command and collect standard output - recv :1, // - receive a message over a Socket - redo :1, // - start this loop iteration over again - ref :1, // - find out the type of thing being referenced - rename :1, // - change a filename - require :1, // - load in external functions from a library at runtime - reset :1, // - clear all variables of a given name - 'return' :1, // - get out of a function early - reverse :1, // - flip a string or a list - rewinddir :1, // - reset directory handle - rindex :1, // - right-to-left substring search - rmdir :1, // - remove a directory - s :null, // - replace a pattern with a string - say :1, // - print with newline - scalar :1, // - force a scalar context - seek :1, // - reposition file pointer for random-access I/O - seekdir :1, // - reposition directory pointer - select :1, // - reset default output or do I/O multiplexing - semctl :1, // - SysV semaphore control operations - semget :1, // - get set of SysV semaphores - semop :1, // - SysV semaphore operations - send :1, // - send a message over a socket - setgrent :1, // - prepare group file for use - sethostent :1, // - prepare hosts file for use - setnetent :1, // - prepare networks file for use - setpgrp :1, // - set the process group of a process - setpriority :1, // - set a process's nice value - setprotoent :1, // - prepare protocols file for use - setpwent :1, // - prepare passwd file for use - setservent :1, // - prepare services file for use - setsockopt :1, // - set some socket options - shift :1, // - remove the first element of an array, and return it - shmctl :1, // - SysV shared memory operations - shmget :1, // - get SysV shared memory segment identifier - shmread :1, // - read SysV shared memory - shmwrite :1, // - write SysV shared memory - shutdown :1, // - close down just half of a socket connection - 'sin' :1, // - return the sine of a number - sleep :1, // - block for some number of seconds - socket :1, // - create a socket - socketpair :1, // - create a pair of sockets - 'sort' :1, // - sort a list of values - splice :1, // - add or remove elements anywhere in an array - 'split' :1, // - split up a string using a regexp delimiter - sprintf :1, // - formatted print into a string - 'sqrt' :1, // - square root function - srand :1, // - seed the random number generator - stat :1, // - get a file's status information - state :1, // - declare and assign a state variable (persistent lexical scoping) - study :1, // - optimize input data for repeated searches - 'sub' :1, // - declare a subroutine, possibly anonymously - 'substr' :1, // - get or alter a portion of a stirng - symlink :1, // - create a symbolic link to a file - syscall :1, // - execute an arbitrary system call - sysopen :1, // - open a file, pipe, or descriptor - sysread :1, // - fixed-length unbuffered input from a filehandle - sysseek :1, // - position I/O pointer on handle used with sysread and syswrite - system :1, // - run a separate program - syswrite :1, // - fixed-length unbuffered output to a filehandle - tell :1, // - get current seekpointer on a filehandle - telldir :1, // - get current seekpointer on a directory handle - tie :1, // - bind a variable to an object class - tied :1, // - get a reference to the object underlying a tied variable - time :1, // - return number of seconds since 1970 - times :1, // - return elapsed time for self and child processes - tr :null, // - transliterate a string - truncate :1, // - shorten a file - uc :1, // - return upper-case version of a string - ucfirst :1, // - return a string with just the next letter in upper case - umask :1, // - set file creation mode mask - undef :1, // - remove a variable or function definition - unlink :1, // - remove one link to a file - unpack :1, // - convert binary structure into normal perl variables - unshift :1, // - prepend more elements to the beginning of a list - untie :1, // - break a tie binding to a variable - use :1, // - load in a module at compile time - utime :1, // - set a file's last access and modify times - values :1, // - return a list of the values in a hash - vec :1, // - test or set particular bits in a string - wait :1, // - wait for any child process to die - waitpid :1, // - wait for a particular child process to die - wantarray :1, // - get void vs scalar vs list context of current subroutine call - warn :1, // - print debugging info - when :1, // - write :1, // - print a picture record - y :null}; // - transliterate a string - - var RXstyle="string-2"; - var RXmodifiers=/[goseximacplud]/; // NOTE: "m", "s", "y" and "tr" need to correct real modifiers for each regexp type - - function tokenChain(stream,state,chain,style,tail){ // NOTE: chain.length > 2 is not working now (it's for s[...][...]geos;) - state.chain=null; // 12 3tail - state.style=null; - state.tail=null; - state.tokenize=function(stream,state){ - var e=false,c,i=0; - while(c=stream.next()){ - if(c===chain[i]&&!e){ - if(chain[++i]!==undefined){ - state.chain=chain[i]; - state.style=style; - state.tail=tail;} - else if(tail) - stream.eatWhile(tail); - state.tokenize=tokenPerl; - return style;} - e=!e&&c=="\\";} - return style;}; - return state.tokenize(stream,state);} - - function tokenSOMETHING(stream,state,string){ - state.tokenize=function(stream,state){ - if(stream.string==string) - state.tokenize=tokenPerl; - stream.skipToEnd(); - return "string";}; - return state.tokenize(stream,state);} - - function tokenPerl(stream,state){ - if(stream.eatSpace()) - return null; - if(state.chain) - return tokenChain(stream,state,state.chain,state.style,state.tail); - if(stream.match(/^\-?[\d\.]/,false)) - if(stream.match(/^(\-?(\d*\.\d+(e[+-]?\d+)?|\d+\.\d*)|0x[\da-fA-F]+|0b[01]+|\d+(e[+-]?\d+)?)/)) - return 'number'; - if(stream.match(/^<<(?=\w)/)){ // NOTE: <"],RXstyle,RXmodifiers);} - if(/[\^'"!~\/]/.test(c)){ - stream.eatSuffix(1); - return tokenChain(stream,state,[stream.eat(c)],RXstyle,RXmodifiers);}} - else if(c=="q"){ - c=stream.look(1); - if(c=="("){ - stream.eatSuffix(2); - return tokenChain(stream,state,[")"],"string");} - if(c=="["){ - stream.eatSuffix(2); - return tokenChain(stream,state,["]"],"string");} - if(c=="{"){ -stream.eatSuffix(2); - return tokenChain(stream,state,["}"],"string");} - if(c=="<"){ - stream.eatSuffix(2); - return tokenChain(stream,state,[">"],"string");} - if(/[\^'"!~\/]/.test(c)){ - stream.eatSuffix(1); - return tokenChain(stream,state,[stream.eat(c)],"string");}} - else if(c=="w"){ - c=stream.look(1); - if(c=="("){ - stream.eatSuffix(2); - return tokenChain(stream,state,[")"],"bracket");} - if(c=="["){ - stream.eatSuffix(2); - return tokenChain(stream,state,["]"],"bracket");} - if(c=="{"){ - stream.eatSuffix(2); - return tokenChain(stream,state,["}"],"bracket");} - if(c=="<"){ - stream.eatSuffix(2); - return tokenChain(stream,state,[">"],"bracket");} - if(/[\^'"!~\/]/.test(c)){ - stream.eatSuffix(1); - return tokenChain(stream,state,[stream.eat(c)],"bracket");}} - else if(c=="r"){ - c=stream.look(1); - if(c=="("){ - stream.eatSuffix(2); - return tokenChain(stream,state,[")"],RXstyle,RXmodifiers);} - if(c=="["){ - stream.eatSuffix(2); - return tokenChain(stream,state,["]"],RXstyle,RXmodifiers);} - if(c=="{"){ - stream.eatSuffix(2); - return tokenChain(stream,state,["}"],RXstyle,RXmodifiers);} - if(c=="<"){ - stream.eatSuffix(2); - return tokenChain(stream,state,[">"],RXstyle,RXmodifiers);} - if(/[\^'"!~\/]/.test(c)){ - stream.eatSuffix(1); - return tokenChain(stream,state,[stream.eat(c)],RXstyle,RXmodifiers);}} - else if(/[\^'"!~\/(\[{<]/.test(c)){ - if(c=="("){ - stream.eatSuffix(1); - return tokenChain(stream,state,[")"],"string");} - if(c=="["){ - stream.eatSuffix(1); - return tokenChain(stream,state,["]"],"string");} - if(c=="{"){ - stream.eatSuffix(1); - return tokenChain(stream,state,["}"],"string");} - if(c=="<"){ - stream.eatSuffix(1); - return tokenChain(stream,state,[">"],"string");} - if(/[\^'"!~\/]/.test(c)){ - return tokenChain(stream,state,[stream.eat(c)],"string");}}}} - if(ch=="m"){ - var c=stream.look(-2); - if(!(c&&/\w/.test(c))){ - c=stream.eat(/[(\[{<\^'"!~\/]/); - if(c){ - if(/[\^'"!~\/]/.test(c)){ - return tokenChain(stream,state,[c],RXstyle,RXmodifiers);} - if(c=="("){ - return tokenChain(stream,state,[")"],RXstyle,RXmodifiers);} - if(c=="["){ - return tokenChain(stream,state,["]"],RXstyle,RXmodifiers);} - if(c=="{"){ - return tokenChain(stream,state,["}"],RXstyle,RXmodifiers);} - if(c=="<"){ - return tokenChain(stream,state,[">"],RXstyle,RXmodifiers);}}}} - if(ch=="s"){ - var c=/[\/>\]})\w]/.test(stream.look(-2)); - if(!c){ - c=stream.eat(/[(\[{<\^'"!~\/]/); - if(c){ - if(c=="[") - return tokenChain(stream,state,["]","]"],RXstyle,RXmodifiers); - if(c=="{") - return tokenChain(stream,state,["}","}"],RXstyle,RXmodifiers); - if(c=="<") - return tokenChain(stream,state,[">",">"],RXstyle,RXmodifiers); - if(c=="(") - return tokenChain(stream,state,[")",")"],RXstyle,RXmodifiers); - return tokenChain(stream,state,[c,c],RXstyle,RXmodifiers);}}} - if(ch=="y"){ - var c=/[\/>\]})\w]/.test(stream.look(-2)); - if(!c){ - c=stream.eat(/[(\[{<\^'"!~\/]/); - if(c){ - if(c=="[") - return tokenChain(stream,state,["]","]"],RXstyle,RXmodifiers); - if(c=="{") - return tokenChain(stream,state,["}","}"],RXstyle,RXmodifiers); - if(c=="<") - return tokenChain(stream,state,[">",">"],RXstyle,RXmodifiers); - if(c=="(") - return tokenChain(stream,state,[")",")"],RXstyle,RXmodifiers); - return tokenChain(stream,state,[c,c],RXstyle,RXmodifiers);}}} - if(ch=="t"){ - var c=/[\/>\]})\w]/.test(stream.look(-2)); - if(!c){ - c=stream.eat("r");if(c){ - c=stream.eat(/[(\[{<\^'"!~\/]/); - if(c){ - if(c=="[") - return tokenChain(stream,state,["]","]"],RXstyle,RXmodifiers); - if(c=="{") - return tokenChain(stream,state,["}","}"],RXstyle,RXmodifiers); - if(c=="<") - return tokenChain(stream,state,[">",">"],RXstyle,RXmodifiers); - if(c=="(") - return tokenChain(stream,state,[")",")"],RXstyle,RXmodifiers); - return tokenChain(stream,state,[c,c],RXstyle,RXmodifiers);}}}} - if(ch=="`"){ - return tokenChain(stream,state,[ch],"variable-2");} - if(ch=="/"){ - if(!/~\s*$/.test(stream.prefix())) - return "operator"; - else - return tokenChain(stream,state,[ch],RXstyle,RXmodifiers);} - if(ch=="$"){ - var p=stream.pos; - if(stream.eatWhile(/\d/)||stream.eat("{")&&stream.eatWhile(/\d/)&&stream.eat("}")) - return "variable-2"; - else - stream.pos=p;} - if(/[$@%]/.test(ch)){ - var p=stream.pos; - if(stream.eat("^")&&stream.eat(/[A-Z]/)||!/[@$%&]/.test(stream.look(-2))&&stream.eat(/[=|\\\-#?@;:&`~\^!\[\]*'"$+.,\/<>()]/)){ - var c=stream.current(); - if(PERL[c]) - return "variable-2";} - stream.pos=p;} - if(/[$@%&]/.test(ch)){ - if(stream.eatWhile(/[\w$\[\]]/)||stream.eat("{")&&stream.eatWhile(/[\w$\[\]]/)&&stream.eat("}")){ - var c=stream.current(); - if(PERL[c]) - return "variable-2"; - else - return "variable";}} - if(ch=="#"){ - if(stream.look(-2)!="$"){ - stream.skipToEnd(); - return "comment";}} - if(/[:+\-\^*$&%@=<>!?|\/~\.]/.test(ch)){ - var p=stream.pos; - stream.eatWhile(/[:+\-\^*$&%@=<>!?|\/~\.]/); - if(PERL[stream.current()]) - return "operator"; - else - stream.pos=p;} - if(ch=="_"){ - if(stream.pos==1){ - if(stream.suffix(6)=="_END__"){ - return tokenChain(stream,state,['\0'],"comment");} - else if(stream.suffix(7)=="_DATA__"){ - return tokenChain(stream,state,['\0'],"variable-2");} - else if(stream.suffix(7)=="_C__"){ - return tokenChain(stream,state,['\0'],"string");}}} - if(/\w/.test(ch)){ - var p=stream.pos; - if(stream.look(-2)=="{"&&(stream.look(0)=="}"||stream.eatWhile(/\w/)&&stream.look(0)=="}")) - return "string"; - else - stream.pos=p;} - if(/[A-Z]/.test(ch)){ - var l=stream.look(-2); - var p=stream.pos; - stream.eatWhile(/[A-Z_]/); - if(/[\da-z]/.test(stream.look(0))){ - stream.pos=p;} - else{ - var c=PERL[stream.current()]; - if(!c) - return "meta"; - if(c[1]) - c=c[0]; - if(l!=":"){ - if(c==1) - return "keyword"; - else if(c==2) - return "def"; - else if(c==3) - return "atom"; - else if(c==4) - return "operator"; - else if(c==5) - return "variable-2"; - else - return "meta";} - else - return "meta";}} - if(/[a-zA-Z_]/.test(ch)){ - var l=stream.look(-2); - stream.eatWhile(/\w/); - var c=PERL[stream.current()]; - if(!c) - return "meta"; - if(c[1]) - c=c[0]; - if(l!=":"){ - if(c==1) - return "keyword"; - else if(c==2) - return "def"; - else if(c==3) - return "atom"; - else if(c==4) - return "operator"; - else if(c==5) - return "variable-2"; - else - return "meta";} - else - return "meta";} - return null;} - - return{ - startState:function(){ - return{ - tokenize:tokenPerl, - chain:null, - style:null, - tail:null};}, - token:function(stream,state){ - return (state.tokenize||tokenPerl)(stream,state);}, - electricChars:"{}"};}); - -CodeMirror.defineMIME("text/x-perl", "perl"); - -// it's like "peek", but need for look-ahead or look-behind if index < 0 -CodeMirror.StringStream.prototype.look=function(c){ - return this.string.charAt(this.pos+(c||0));}; - -// return a part of prefix of current stream from current position -CodeMirror.StringStream.prototype.prefix=function(c){ - if(c){ - var x=this.pos-c; - return this.string.substr((x>=0?x:0),c);} - else{ - return this.string.substr(0,this.pos-1);}}; - -// return a part of suffix of current stream from current position -CodeMirror.StringStream.prototype.suffix=function(c){ - var y=this.string.length; - var x=y-this.pos+1; - return this.string.substr(this.pos,(c&&c=(y=this.string.length-1)) - this.pos=y; - else - this.pos=x;}; diff --git a/plugins/codemirror/codemirror/mode/php/index.html b/plugins/codemirror/codemirror/mode/php/index.html deleted file mode 100644 index aaf51c0..0000000 --- a/plugins/codemirror/codemirror/mode/php/index.html +++ /dev/null @@ -1,62 +0,0 @@ - - -CodeMirror: PHP mode - - - - - - - - - - - - - - - -
    -

    PHP mode

    -
    - - - -

    Simple HTML/PHP mode based on - the C-like mode. Depends on XML, - JavaScript, CSS, HTMLMixed, and C-like modes.

    - -

    MIME types defined: application/x-httpd-php (HTML with PHP code), text/x-php (plain, non-wrapped PHP code).

    -
    diff --git a/plugins/codemirror/codemirror/mode/php/php.js b/plugins/codemirror/codemirror/mode/php/php.js deleted file mode 100644 index 3555b8b..0000000 --- a/plugins/codemirror/codemirror/mode/php/php.js +++ /dev/null @@ -1,132 +0,0 @@ -(function() { - function keywords(str) { - var obj = {}, words = str.split(" "); - for (var i = 0; i < words.length; ++i) obj[words[i]] = true; - return obj; - } - function heredoc(delim) { - return function(stream, state) { - if (stream.match(delim)) state.tokenize = null; - else stream.skipToEnd(); - return "string"; - }; - } - var phpConfig = { - name: "clike", - keywords: keywords("abstract and array as break case catch class clone const continue declare default " + - "do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final " + - "for foreach function global goto if implements interface instanceof namespace " + - "new or private protected public static switch throw trait try use var while xor " + - "die echo empty exit eval include include_once isset list require require_once return " + - "print unset __halt_compiler self static parent yield insteadof finally"), - blockKeywords: keywords("catch do else elseif for foreach if switch try while finally"), - atoms: keywords("true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__"), - builtin: keywords("func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once"), - multiLineStrings: true, - hooks: { - "$": function(stream) { - stream.eatWhile(/[\w\$_]/); - return "variable-2"; - }, - "<": function(stream, state) { - if (stream.match(/<", false)) stream.next(); - return "comment"; - }, - "/": function(stream) { - if (stream.eat("/")) { - while (!stream.eol() && !stream.match("?>", false)) stream.next(); - return "comment"; - } - return false; - } - } - }; - - CodeMirror.defineMode("php", function(config, parserConfig) { - var htmlMode = CodeMirror.getMode(config, "text/html"); - var phpMode = CodeMirror.getMode(config, phpConfig); - - function dispatch(stream, state) { - var isPHP = state.curMode == phpMode; - if (stream.sol() && state.pending != '"') state.pending = null; - if (!isPHP) { - if (stream.match(/^<\?\w*/)) { - state.curMode = phpMode; - state.curState = state.php; - return "meta"; - } - if (state.pending == '"') { - while (!stream.eol() && stream.next() != '"') {} - var style = "string"; - } else if (state.pending && stream.pos < state.pending.end) { - stream.pos = state.pending.end; - var style = state.pending.style; - } else { - var style = htmlMode.token(stream, state.curState); - } - state.pending = null; - var cur = stream.current(), openPHP = cur.search(/<\?/); - if (openPHP != -1) { - if (style == "string" && /\"$/.test(cur) && !/\?>/.test(cur)) state.pending = '"'; - else state.pending = {end: stream.pos, style: style}; - stream.backUp(cur.length - openPHP); - } - return style; - } else if (isPHP && state.php.tokenize == null && stream.match("?>")) { - state.curMode = htmlMode; - state.curState = state.html; - return "meta"; - } else { - return phpMode.token(stream, state.curState); - } - } - - return { - startState: function() { - var html = CodeMirror.startState(htmlMode), php = CodeMirror.startState(phpMode); - return {html: html, - php: php, - curMode: parserConfig.startOpen ? phpMode : htmlMode, - curState: parserConfig.startOpen ? php : html, - pending: null}; - }, - - copyState: function(state) { - var html = state.html, htmlNew = CodeMirror.copyState(htmlMode, html), - php = state.php, phpNew = CodeMirror.copyState(phpMode, php), cur; - if (state.curMode == htmlMode) cur = htmlNew; - else cur = phpNew; - return {html: htmlNew, php: phpNew, curMode: state.curMode, curState: cur, - pending: state.pending}; - }, - - token: dispatch, - - indent: function(state, textAfter) { - if ((state.curMode != phpMode && /^\s*<\//.test(textAfter)) || - (state.curMode == phpMode && /^\?>/.test(textAfter))) - return htmlMode.indent(state.html, textAfter); - return state.curMode.indent(state.curState, textAfter); - }, - - electricChars: "/{}:", - blockCommentStart: "/*", - blockCommentEnd: "*/", - lineComment: "//", - - innerMode: function(state) { return {state: state.curState, mode: state.curMode}; } - }; - }, "htmlmixed", "clike"); - - CodeMirror.defineMIME("application/x-httpd-php", "php"); - CodeMirror.defineMIME("application/x-httpd-php-open", {name: "php", startOpen: true}); - CodeMirror.defineMIME("text/x-php", phpConfig); -})(); diff --git a/plugins/codemirror/codemirror/mode/pig/index.html b/plugins/codemirror/codemirror/mode/pig/index.html deleted file mode 100644 index 93744ae..0000000 --- a/plugins/codemirror/codemirror/mode/pig/index.html +++ /dev/null @@ -1,55 +0,0 @@ - - -CodeMirror: Pig Latin mode - - - - - - - - - -
    -

    Pig Latin mode

    -
    - - - -

    - Simple mode that handles Pig Latin language. -

    - -

    MIME type defined: text/x-pig - (PIG code) - -

    diff --git a/plugins/codemirror/codemirror/mode/pig/pig.js b/plugins/codemirror/codemirror/mode/pig/pig.js deleted file mode 100644 index 4b44e7c..0000000 --- a/plugins/codemirror/codemirror/mode/pig/pig.js +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Pig Latin Mode for CodeMirror 2 - * @author Prasanth Jayachandran - * @link https://github.com/prasanthj/pig-codemirror-2 - * This implementation is adapted from PL/SQL mode in CodeMirror 2. - */ -CodeMirror.defineMode("pig", function(_config, parserConfig) { - var keywords = parserConfig.keywords, - builtins = parserConfig.builtins, - types = parserConfig.types, - multiLineStrings = parserConfig.multiLineStrings; - - var isOperatorChar = /[*+\-%<>=&?:\/!|]/; - - function chain(stream, state, f) { - state.tokenize = f; - return f(stream, state); - } - - var type; - function ret(tp, style) { - type = tp; - return style; - } - - function tokenComment(stream, state) { - var isEnd = false; - var ch; - while(ch = stream.next()) { - if(ch == "/" && isEnd) { - state.tokenize = tokenBase; - break; - } - isEnd = (ch == "*"); - } - return ret("comment", "comment"); - } - - function tokenString(quote) { - return function(stream, state) { - var escaped = false, next, end = false; - while((next = stream.next()) != null) { - if (next == quote && !escaped) { - end = true; break; - } - escaped = !escaped && next == "\\"; - } - if (end || !(escaped || multiLineStrings)) - state.tokenize = tokenBase; - return ret("string", "error"); - }; - } - - function tokenBase(stream, state) { - var ch = stream.next(); - - // is a start of string? - if (ch == '"' || ch == "'") - return chain(stream, state, tokenString(ch)); - // is it one of the special chars - else if(/[\[\]{}\(\),;\.]/.test(ch)) - return ret(ch); - // is it a number? - else if(/\d/.test(ch)) { - stream.eatWhile(/[\w\.]/); - return ret("number", "number"); - } - // multi line comment or operator - else if (ch == "/") { - if (stream.eat("*")) { - return chain(stream, state, tokenComment); - } - else { - stream.eatWhile(isOperatorChar); - return ret("operator", "operator"); - } - } - // single line comment or operator - else if (ch=="-") { - if(stream.eat("-")){ - stream.skipToEnd(); - return ret("comment", "comment"); - } - else { - stream.eatWhile(isOperatorChar); - return ret("operator", "operator"); - } - } - // is it an operator - else if (isOperatorChar.test(ch)) { - stream.eatWhile(isOperatorChar); - return ret("operator", "operator"); - } - else { - // get the while word - stream.eatWhile(/[\w\$_]/); - // is it one of the listed keywords? - if (keywords && keywords.propertyIsEnumerable(stream.current().toUpperCase())) { - if (stream.eat(")") || stream.eat(".")) { - //keywords can be used as variables like flatten(group), group.$0 etc.. - } - else { - return ("keyword", "keyword"); - } - } - // is it one of the builtin functions? - if (builtins && builtins.propertyIsEnumerable(stream.current().toUpperCase())) - { - return ("keyword", "variable-2"); - } - // is it one of the listed types? - if (types && types.propertyIsEnumerable(stream.current().toUpperCase())) - return ("keyword", "variable-3"); - // default is a 'variable' - return ret("variable", "pig-word"); - } - } - - // Interface - return { - startState: function() { - return { - tokenize: tokenBase, - startOfLine: true - }; - }, - - token: function(stream, state) { - if(stream.eatSpace()) return null; - var style = state.tokenize(stream, state); - return style; - } - }; -}); - -(function() { - function keywords(str) { - var obj = {}, words = str.split(" "); - for (var i = 0; i < words.length; ++i) obj[words[i]] = true; - return obj; - } - - // builtin funcs taken from trunk revision 1303237 - var pBuiltins = "ABS ACOS ARITY ASIN ATAN AVG BAGSIZE BINSTORAGE BLOOM BUILDBLOOM CBRT CEIL " - + "CONCAT COR COS COSH COUNT COUNT_STAR COV CONSTANTSIZE CUBEDIMENSIONS DIFF DISTINCT DOUBLEABS " - + "DOUBLEAVG DOUBLEBASE DOUBLEMAX DOUBLEMIN DOUBLEROUND DOUBLESUM EXP FLOOR FLOATABS FLOATAVG " - + "FLOATMAX FLOATMIN FLOATROUND FLOATSUM GENERICINVOKER INDEXOF INTABS INTAVG INTMAX INTMIN " - + "INTSUM INVOKEFORDOUBLE INVOKEFORFLOAT INVOKEFORINT INVOKEFORLONG INVOKEFORSTRING INVOKER " - + "ISEMPTY JSONLOADER JSONMETADATA JSONSTORAGE LAST_INDEX_OF LCFIRST LOG LOG10 LOWER LONGABS " - + "LONGAVG LONGMAX LONGMIN LONGSUM MAX MIN MAPSIZE MONITOREDUDF NONDETERMINISTIC OUTPUTSCHEMA " - + "PIGSTORAGE PIGSTREAMING RANDOM REGEX_EXTRACT REGEX_EXTRACT_ALL REPLACE ROUND SIN SINH SIZE " - + "SQRT STRSPLIT SUBSTRING SUM STRINGCONCAT STRINGMAX STRINGMIN STRINGSIZE TAN TANH TOBAG " - + "TOKENIZE TOMAP TOP TOTUPLE TRIM TEXTLOADER TUPLESIZE UCFIRST UPPER UTF8STORAGECONVERTER "; - - // taken from QueryLexer.g - var pKeywords = "VOID IMPORT RETURNS DEFINE LOAD FILTER FOREACH ORDER CUBE DISTINCT COGROUP " - + "JOIN CROSS UNION SPLIT INTO IF OTHERWISE ALL AS BY USING INNER OUTER ONSCHEMA PARALLEL " - + "PARTITION GROUP AND OR NOT GENERATE FLATTEN ASC DESC IS STREAM THROUGH STORE MAPREDUCE " - + "SHIP CACHE INPUT OUTPUT STDERROR STDIN STDOUT LIMIT SAMPLE LEFT RIGHT FULL EQ GT LT GTE LTE " - + "NEQ MATCHES TRUE FALSE DUMP"; - - // data types - var pTypes = "BOOLEAN INT LONG FLOAT DOUBLE CHARARRAY BYTEARRAY BAG TUPLE MAP "; - - CodeMirror.defineMIME("text/x-pig", { - name: "pig", - builtins: keywords(pBuiltins), - keywords: keywords(pKeywords), - types: keywords(pTypes) - }); -}()); diff --git a/plugins/codemirror/codemirror/mode/properties/index.html b/plugins/codemirror/codemirror/mode/properties/index.html deleted file mode 100644 index 40ee1a3..0000000 --- a/plugins/codemirror/codemirror/mode/properties/index.html +++ /dev/null @@ -1,53 +0,0 @@ - - -CodeMirror: Properties files mode - - - - - - - - - -
    -

    Properties files mode

    -
    - - -

    MIME types defined: text/x-properties, - text/x-ini.

    - -
    diff --git a/plugins/codemirror/codemirror/mode/properties/properties.js b/plugins/codemirror/codemirror/mode/properties/properties.js deleted file mode 100644 index d3a13c7..0000000 --- a/plugins/codemirror/codemirror/mode/properties/properties.js +++ /dev/null @@ -1,63 +0,0 @@ -CodeMirror.defineMode("properties", function() { - return { - token: function(stream, state) { - var sol = stream.sol() || state.afterSection; - var eol = stream.eol(); - - state.afterSection = false; - - if (sol) { - if (state.nextMultiline) { - state.inMultiline = true; - state.nextMultiline = false; - } else { - state.position = "def"; - } - } - - if (eol && ! state.nextMultiline) { - state.inMultiline = false; - state.position = "def"; - } - - if (sol) { - while(stream.eatSpace()); - } - - var ch = stream.next(); - - if (sol && (ch === "#" || ch === "!" || ch === ";")) { - state.position = "comment"; - stream.skipToEnd(); - return "comment"; - } else if (sol && ch === "[") { - state.afterSection = true; - stream.skipTo("]"); stream.eat("]"); - return "header"; - } else if (ch === "=" || ch === ":") { - state.position = "quote"; - return null; - } else if (ch === "\\" && state.position === "quote") { - if (stream.next() !== "u") { // u = Unicode sequence \u1234 - // Multiline value - state.nextMultiline = true; - } - } - - return state.position; - }, - - startState: function() { - return { - position : "def", // Current position, "def", "quote" or "comment" - nextMultiline : false, // Is the next line multiline value - inMultiline : false, // Is the current line a multiline value - afterSection : false // Did we just open a section - }; - } - - }; -}); - -CodeMirror.defineMIME("text/x-properties", "properties"); -CodeMirror.defineMIME("text/x-ini", "properties"); diff --git a/plugins/codemirror/codemirror/mode/python/index.html b/plugins/codemirror/codemirror/mode/python/index.html deleted file mode 100644 index 4977349..0000000 --- a/plugins/codemirror/codemirror/mode/python/index.html +++ /dev/null @@ -1,187 +0,0 @@ - - -CodeMirror: Python mode - - - - - - - - - - -
    -

    Python mode

    - -
    - - -

    Cython mode

    - -
    - - -

    Configuration Options for Python mode:

    -
      -
    • version - 2/3 - The version of Python to recognize. Default is 2.
    • -
    • singleLineStringErrors - true/false - If you have a single-line string that is not terminated at the end of the line, this will show subsequent lines as errors if true, otherwise it will consider the newline as the end of the string. Default is false.
    • -
    -

    Advanced Configuration Options:

    -

    Usefull for superset of python syntax like Enthought enaml, IPython magics and questionmark help

    -
      -
    • singleOperators - RegEx - Regular Expression for single operator matching, default :
      ^[\\+\\-\\*/%&|\\^~<>!]
    • -
    • singleDelimiters - RegEx - Regular Expression for single delimiter matching, default :
      ^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]
    • -
    • doubleOperators - RegEx - Regular Expression for double operators matching, default :
      ^((==)|(!=)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))
    • -
    • doubleDelimiters - RegEx - Regular Expressoin for double delimiters matching, default :
      ^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))
    • -
    • tripleDelimiters - RegEx - Regular Expression for triple delimiters matching, default :
      ^((//=)|(>>=)|(<<=)|(\\*\\*=))
    • -
    • identifiers - RegEx - Regular Expression for identifier, default :
      ^[_A-Za-z][_A-Za-z0-9]*
    • -
    • extra_keywords - list of string - List of extra words ton consider as keywords
    • -
    • extra_builtins - list of string - List of extra words ton consider as builtins
    • -
    - - -

    MIME types defined: text/x-python and text/x-cython.

    -
    diff --git a/plugins/codemirror/codemirror/mode/python/python.js b/plugins/codemirror/codemirror/mode/python/python.js deleted file mode 100644 index 802c2dd..0000000 --- a/plugins/codemirror/codemirror/mode/python/python.js +++ /dev/null @@ -1,368 +0,0 @@ -CodeMirror.defineMode("python", function(conf, parserConf) { - var ERRORCLASS = 'error'; - - function wordRegexp(words) { - return new RegExp("^((" + words.join(")|(") + "))\\b"); - } - - var singleOperators = parserConf.singleOperators || new RegExp("^[\\+\\-\\*/%&|\\^~<>!]"); - var singleDelimiters = parserConf.singleDelimiters || new RegExp('^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]'); - var doubleOperators = parserConf.doubleOperators || new RegExp("^((==)|(!=)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))"); - var doubleDelimiters = parserConf.doubleDelimiters || new RegExp("^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"); - var tripleDelimiters = parserConf.tripleDelimiters || new RegExp("^((//=)|(>>=)|(<<=)|(\\*\\*=))"); - var identifiers = parserConf.identifiers|| new RegExp("^[_A-Za-z][_A-Za-z0-9]*"); - - var wordOperators = wordRegexp(['and', 'or', 'not', 'is', 'in']); - var commonkeywords = ['as', 'assert', 'break', 'class', 'continue', - 'def', 'del', 'elif', 'else', 'except', 'finally', - 'for', 'from', 'global', 'if', 'import', - 'lambda', 'pass', 'raise', 'return', - 'try', 'while', 'with', 'yield']; - var commonBuiltins = ['abs', 'all', 'any', 'bin', 'bool', 'bytearray', 'callable', 'chr', - 'classmethod', 'compile', 'complex', 'delattr', 'dict', 'dir', 'divmod', - 'enumerate', 'eval', 'filter', 'float', 'format', 'frozenset', - 'getattr', 'globals', 'hasattr', 'hash', 'help', 'hex', 'id', - 'input', 'int', 'isinstance', 'issubclass', 'iter', 'len', - 'list', 'locals', 'map', 'max', 'memoryview', 'min', 'next', - 'object', 'oct', 'open', 'ord', 'pow', 'property', 'range', - 'repr', 'reversed', 'round', 'set', 'setattr', 'slice', - 'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple', - 'type', 'vars', 'zip', '__import__', 'NotImplemented', - 'Ellipsis', '__debug__']; - var py2 = {'builtins': ['apply', 'basestring', 'buffer', 'cmp', 'coerce', 'execfile', - 'file', 'intern', 'long', 'raw_input', 'reduce', 'reload', - 'unichr', 'unicode', 'xrange', 'False', 'True', 'None'], - 'keywords': ['exec', 'print']}; - var py3 = {'builtins': ['ascii', 'bytes', 'exec', 'print'], - 'keywords': ['nonlocal', 'False', 'True', 'None']}; - - if(parserConf.extra_keywords != undefined){ - commonkeywords = commonkeywords.concat(parserConf.extra_keywords); - } - if(parserConf.extra_builtins != undefined){ - commonBuiltins = commonBuiltins.concat(parserConf.extra_builtins); - } - if (!!parserConf.version && parseInt(parserConf.version, 10) === 3) { - commonkeywords = commonkeywords.concat(py3.keywords); - commonBuiltins = commonBuiltins.concat(py3.builtins); - var stringPrefixes = new RegExp("^(([rb]|(br))?('{3}|\"{3}|['\"]))", "i"); - } else { - commonkeywords = commonkeywords.concat(py2.keywords); - commonBuiltins = commonBuiltins.concat(py2.builtins); - var stringPrefixes = new RegExp("^(([rub]|(ur)|(br))?('{3}|\"{3}|['\"]))", "i"); - } - var keywords = wordRegexp(commonkeywords); - var builtins = wordRegexp(commonBuiltins); - - var indentInfo = null; - - // tokenizers - function tokenBase(stream, state) { - // Handle scope changes - if (stream.sol()) { - var scopeOffset = state.scopes[0].offset; - if (stream.eatSpace()) { - var lineOffset = stream.indentation(); - if (lineOffset > scopeOffset) { - indentInfo = 'indent'; - } else if (lineOffset < scopeOffset) { - indentInfo = 'dedent'; - } - return null; - } else { - if (scopeOffset > 0) { - dedent(stream, state); - } - } - } - if (stream.eatSpace()) { - return null; - } - - var ch = stream.peek(); - - // Handle Comments - if (ch === '#') { - stream.skipToEnd(); - return 'comment'; - } - - // Handle Number Literals - if (stream.match(/^[0-9\.]/, false)) { - var floatLiteral = false; - // Floats - if (stream.match(/^\d*\.\d+(e[\+\-]?\d+)?/i)) { floatLiteral = true; } - if (stream.match(/^\d+\.\d*/)) { floatLiteral = true; } - if (stream.match(/^\.\d+/)) { floatLiteral = true; } - if (floatLiteral) { - // Float literals may be "imaginary" - stream.eat(/J/i); - return 'number'; - } - // Integers - var intLiteral = false; - // Hex - if (stream.match(/^0x[0-9a-f]+/i)) { intLiteral = true; } - // Binary - if (stream.match(/^0b[01]+/i)) { intLiteral = true; } - // Octal - if (stream.match(/^0o[0-7]+/i)) { intLiteral = true; } - // Decimal - if (stream.match(/^[1-9]\d*(e[\+\-]?\d+)?/)) { - // Decimal literals may be "imaginary" - stream.eat(/J/i); - // TODO - Can you have imaginary longs? - intLiteral = true; - } - // Zero by itself with no other piece of number. - if (stream.match(/^0(?![\dx])/i)) { intLiteral = true; } - if (intLiteral) { - // Integer literals may be "long" - stream.eat(/L/i); - return 'number'; - } - } - - // Handle Strings - if (stream.match(stringPrefixes)) { - state.tokenize = tokenStringFactory(stream.current()); - return state.tokenize(stream, state); - } - - // Handle operators and Delimiters - if (stream.match(tripleDelimiters) || stream.match(doubleDelimiters)) { - return null; - } - if (stream.match(doubleOperators) - || stream.match(singleOperators) - || stream.match(wordOperators)) { - return 'operator'; - } - if (stream.match(singleDelimiters)) { - return null; - } - - if (stream.match(keywords)) { - return 'keyword'; - } - - if (stream.match(builtins)) { - return 'builtin'; - } - - if (stream.match(identifiers)) { - if (state.lastToken == 'def' || state.lastToken == 'class') { - return 'def'; - } - return 'variable'; - } - - // Handle non-detected items - stream.next(); - return ERRORCLASS; - } - - function tokenStringFactory(delimiter) { - while ('rub'.indexOf(delimiter.charAt(0).toLowerCase()) >= 0) { - delimiter = delimiter.substr(1); - } - var singleline = delimiter.length == 1; - var OUTCLASS = 'string'; - - function tokenString(stream, state) { - while (!stream.eol()) { - stream.eatWhile(/[^'"\\]/); - if (stream.eat('\\')) { - stream.next(); - if (singleline && stream.eol()) { - return OUTCLASS; - } - } else if (stream.match(delimiter)) { - state.tokenize = tokenBase; - return OUTCLASS; - } else { - stream.eat(/['"]/); - } - } - if (singleline) { - if (parserConf.singleLineStringErrors) { - return ERRORCLASS; - } else { - state.tokenize = tokenBase; - } - } - return OUTCLASS; - } - tokenString.isString = true; - return tokenString; - } - - function indent(stream, state, type) { - type = type || 'py'; - var indentUnit = 0; - if (type === 'py') { - if (state.scopes[0].type !== 'py') { - state.scopes[0].offset = stream.indentation(); - return; - } - for (var i = 0; i < state.scopes.length; ++i) { - if (state.scopes[i].type === 'py') { - indentUnit = state.scopes[i].offset + conf.indentUnit; - break; - } - } - } else { - indentUnit = stream.column() + stream.current().length; - } - state.scopes.unshift({ - offset: indentUnit, - type: type - }); - } - - function dedent(stream, state, type) { - type = type || 'py'; - if (state.scopes.length == 1) return; - if (state.scopes[0].type === 'py') { - var _indent = stream.indentation(); - var _indent_index = -1; - for (var i = 0; i < state.scopes.length; ++i) { - if (_indent === state.scopes[i].offset) { - _indent_index = i; - break; - } - } - if (_indent_index === -1) { - return true; - } - while (state.scopes[0].offset !== _indent) { - state.scopes.shift(); - } - return false; - } else { - if (type === 'py') { - state.scopes[0].offset = stream.indentation(); - return false; - } else { - if (state.scopes[0].type != type) { - return true; - } - state.scopes.shift(); - return false; - } - } - } - - function tokenLexer(stream, state) { - indentInfo = null; - var style = state.tokenize(stream, state); - var current = stream.current(); - - // Handle '.' connected identifiers - if (current === '.') { - style = stream.match(identifiers, false) ? null : ERRORCLASS; - if (style === null && state.lastStyle === 'meta') { - // Apply 'meta' style to '.' connected identifiers when - // appropriate. - style = 'meta'; - } - return style; - } - - // Handle decorators - if (current === '@') { - return stream.match(identifiers, false) ? 'meta' : ERRORCLASS; - } - - if ((style === 'variable' || style === 'builtin') - && state.lastStyle === 'meta') { - style = 'meta'; - } - - // Handle scope changes. - if (current === 'pass' || current === 'return') { - state.dedent += 1; - } - if (current === 'lambda') state.lambda = true; - if ((current === ':' && !state.lambda && state.scopes[0].type == 'py') - || indentInfo === 'indent') { - indent(stream, state); - } - var delimiter_index = '[({'.indexOf(current); - if (delimiter_index !== -1) { - indent(stream, state, '])}'.slice(delimiter_index, delimiter_index+1)); - } - if (indentInfo === 'dedent') { - if (dedent(stream, state)) { - return ERRORCLASS; - } - } - delimiter_index = '])}'.indexOf(current); - if (delimiter_index !== -1) { - if (dedent(stream, state, current)) { - return ERRORCLASS; - } - } - if (state.dedent > 0 && stream.eol() && state.scopes[0].type == 'py') { - if (state.scopes.length > 1) state.scopes.shift(); - state.dedent -= 1; - } - - return style; - } - - var external = { - startState: function(basecolumn) { - return { - tokenize: tokenBase, - scopes: [{offset:basecolumn || 0, type:'py'}], - lastStyle: null, - lastToken: null, - lambda: false, - dedent: 0 - }; - }, - - token: function(stream, state) { - var style = tokenLexer(stream, state); - - state.lastStyle = style; - - var current = stream.current(); - if (current && style) { - state.lastToken = current; - } - - if (stream.eol() && state.lambda) { - state.lambda = false; - } - return style; - }, - - indent: function(state) { - if (state.tokenize != tokenBase) { - return state.tokenize.isString ? CodeMirror.Pass : 0; - } - - return state.scopes[0].offset; - }, - - lineComment: "#", - fold: "indent" - }; - return external; -}); - -CodeMirror.defineMIME("text/x-python", "python"); - -(function() { - "use strict"; - var words = function(str){return str.split(' ');}; - - CodeMirror.defineMIME("text/x-cython", { - name: "python", - extra_keywords: words("by cdef cimport cpdef ctypedef enum except"+ - "extern gil include nogil property public"+ - "readonly struct union DEF IF ELIF ELSE") - }); -})(); diff --git a/plugins/codemirror/codemirror/mode/q/index.html b/plugins/codemirror/codemirror/mode/q/index.html deleted file mode 100644 index 78ed3d8..0000000 --- a/plugins/codemirror/codemirror/mode/q/index.html +++ /dev/null @@ -1,144 +0,0 @@ - - -CodeMirror: Q mode - - - - - - - - - - -
    -

    Q mode

    - - -
    - - - -

    MIME type defined: text/x-q.

    -
    diff --git a/plugins/codemirror/codemirror/mode/q/q.js b/plugins/codemirror/codemirror/mode/q/q.js deleted file mode 100644 index 56017e3..0000000 --- a/plugins/codemirror/codemirror/mode/q/q.js +++ /dev/null @@ -1,124 +0,0 @@ -CodeMirror.defineMode("q",function(config){ - var indentUnit=config.indentUnit, - curPunc, - keywords=buildRE(["abs","acos","aj","aj0","all","and","any","asc","asin","asof","atan","attr","avg","avgs","bin","by","ceiling","cols","cor","cos","count","cov","cross","csv","cut","delete","deltas","desc","dev","differ","distinct","div","do","each","ej","enlist","eval","except","exec","exit","exp","fby","fills","first","fkeys","flip","floor","from","get","getenv","group","gtime","hclose","hcount","hdel","hopen","hsym","iasc","idesc","if","ij","in","insert","inter","inv","key","keys","last","like","list","lj","load","log","lower","lsq","ltime","ltrim","mavg","max","maxs","mcount","md5","mdev","med","meta","min","mins","mmax","mmin","mmu","mod","msum","neg","next","not","null","or","over","parse","peach","pj","plist","prd","prds","prev","prior","rand","rank","ratios","raze","read0","read1","reciprocal","reverse","rload","rotate","rsave","rtrim","save","scan","select","set","setenv","show","signum","sin","sqrt","ss","ssr","string","sublist","sum","sums","sv","system","tables","tan","til","trim","txf","type","uj","ungroup","union","update","upper","upsert","value","var","view","views","vs","wavg","where","where","while","within","wj","wj1","wsum","xasc","xbar","xcol","xcols","xdesc","xexp","xgroup","xkey","xlog","xprev","xrank"]), - E=/[|/&^!+:\\\-*%$=~#;@><,?_\'\"\[\(\]\)\s{}]/; - function buildRE(w){return new RegExp("^("+w.join("|")+")$");} - function tokenBase(stream,state){ - var sol=stream.sol(),c=stream.next(); - curPunc=null; - if(sol) - if(c=="/") - return(state.tokenize=tokenLineComment)(stream,state); - else if(c=="\\"){ - if(stream.eol()||/\s/.test(stream.peek())) - return stream.skipToEnd(),/^\\\s*$/.test(stream.current())?(state.tokenize=tokenCommentToEOF)(stream, state):state.tokenize=tokenBase,"comment"; - else - return state.tokenize=tokenBase,"builtin"; - } - if(/\s/.test(c)) - return stream.peek()=="/"?(stream.skipToEnd(),"comment"):"whitespace"; - if(c=='"') - return(state.tokenize=tokenString)(stream,state); - if(c=='`') - return stream.eatWhile(/[A-Z|a-z|\d|_|:|\/|\.]/),"symbol"; - if(("."==c&&/\d/.test(stream.peek()))||/\d/.test(c)){ - var t=null; - stream.backUp(1); - if(stream.match(/^\d{4}\.\d{2}(m|\.\d{2}([D|T](\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)?)?)/) - || stream.match(/^\d+D(\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)/) - || stream.match(/^\d{2}:\d{2}(:\d{2}(\.\d{1,9})?)?/) - || stream.match(/^\d+[ptuv]{1}/)) - t="temporal"; - else if(stream.match(/^0[NwW]{1}/) - || stream.match(/^0x[\d|a-f|A-F]*/) - || stream.match(/^[0|1]+[b]{1}/) - || stream.match(/^\d+[chijn]{1}/) - || stream.match(/-?\d*(\.\d*)?(e[+\-]?\d+)?(e|f)?/)) - t="number"; - return(t&&(!(c=stream.peek())||E.test(c)))?t:(stream.next(),"error"); - } - if(/[A-Z|a-z]|\./.test(c)) - return stream.eatWhile(/[A-Z|a-z|\.|_|\d]/),keywords.test(stream.current())?"keyword":"variable"; - if(/[|/&^!+:\\\-*%$=~#;@><\.,?_\']/.test(c)) - return null; - if(/[{}\(\[\]\)]/.test(c)) - return null; - return"error"; - } - function tokenLineComment(stream,state){ - return stream.skipToEnd(),/\/\s*$/.test(stream.current())?(state.tokenize=tokenBlockComment)(stream,state):(state.tokenize=tokenBase),"comment"; - } - function tokenBlockComment(stream,state){ - var f=stream.sol()&&stream.peek()=="\\"; - stream.skipToEnd(); - if(f&&/^\\\s*$/.test(stream.current())) - state.tokenize=tokenBase; - return"comment"; - } - function tokenCommentToEOF(stream){return stream.skipToEnd(),"comment";} - function tokenString(stream,state){ - var escaped=false,next,end=false; - while((next=stream.next())){ - if(next=="\""&&!escaped){end=true;break;} - escaped=!escaped&&next=="\\"; - } - if(end)state.tokenize=tokenBase; - return"string"; - } - function pushContext(state,type,col){state.context={prev:state.context,indent:state.indent,col:col,type:type};} - function popContext(state){state.indent=state.context.indent;state.context=state.context.prev;} - return{ - startState:function(){ - return{tokenize:tokenBase, - context:null, - indent:0, - col:0}; - }, - token:function(stream,state){ - if(stream.sol()){ - if(state.context&&state.context.align==null) - state.context.align=false; - state.indent=stream.indentation(); - } - //if (stream.eatSpace()) return null; - var style=state.tokenize(stream,state); - if(style!="comment"&&state.context&&state.context.align==null&&state.context.type!="pattern"){ - state.context.align=true; - } - if(curPunc=="(")pushContext(state,")",stream.column()); - else if(curPunc=="[")pushContext(state,"]",stream.column()); - else if(curPunc=="{")pushContext(state,"}",stream.column()); - else if(/[\]\}\)]/.test(curPunc)){ - while(state.context&&state.context.type=="pattern")popContext(state); - if(state.context&&curPunc==state.context.type)popContext(state); - } - else if(curPunc=="."&&state.context&&state.context.type=="pattern")popContext(state); - else if(/atom|string|variable/.test(style)&&state.context){ - if(/[\}\]]/.test(state.context.type)) - pushContext(state,"pattern",stream.column()); - else if(state.context.type=="pattern"&&!state.context.align){ - state.context.align=true; - state.context.col=stream.column(); - } - } - return style; - }, - indent:function(state,textAfter){ - var firstChar=textAfter&&textAfter.charAt(0); - var context=state.context; - if(/[\]\}]/.test(firstChar)) - while (context&&context.type=="pattern")context=context.prev; - var closing=context&&firstChar==context.type; - if(!context) - return 0; - else if(context.type=="pattern") - return context.col; - else if(context.align) - return context.col+(closing?0:1); - else - return context.indent+(closing?0:indentUnit); - } - }; -}); -CodeMirror.defineMIME("text/x-q","q"); diff --git a/plugins/codemirror/codemirror/mode/r/index.html b/plugins/codemirror/codemirror/mode/r/index.html deleted file mode 100644 index f73e13d..0000000 --- a/plugins/codemirror/codemirror/mode/r/index.html +++ /dev/null @@ -1,86 +0,0 @@ - - -CodeMirror: R mode - - - - - - - - - -
    -

    R mode

    -
    - - -

    MIME types defined: text/x-rsrc.

    - -

    Development of the CodeMirror R mode was kindly sponsored - by Ubalo, who hold - the license.

    - -
    diff --git a/plugins/codemirror/codemirror/mode/r/r.js b/plugins/codemirror/codemirror/mode/r/r.js deleted file mode 100644 index 6410efb..0000000 --- a/plugins/codemirror/codemirror/mode/r/r.js +++ /dev/null @@ -1,141 +0,0 @@ -CodeMirror.defineMode("r", function(config) { - function wordObj(str) { - var words = str.split(" "), res = {}; - for (var i = 0; i < words.length; ++i) res[words[i]] = true; - return res; - } - var atoms = wordObj("NULL NA Inf NaN NA_integer_ NA_real_ NA_complex_ NA_character_"); - var builtins = wordObj("list quote bquote eval return call parse deparse"); - var keywords = wordObj("if else repeat while function for in next break"); - var blockkeywords = wordObj("if else repeat while function for"); - var opChars = /[+\-*\/^<>=!&|~$:]/; - var curPunc; - - function tokenBase(stream, state) { - curPunc = null; - var ch = stream.next(); - if (ch == "#") { - stream.skipToEnd(); - return "comment"; - } else if (ch == "0" && stream.eat("x")) { - stream.eatWhile(/[\da-f]/i); - return "number"; - } else if (ch == "." && stream.eat(/\d/)) { - stream.match(/\d*(?:e[+\-]?\d+)?/); - return "number"; - } else if (/\d/.test(ch)) { - stream.match(/\d*(?:\.\d+)?(?:e[+\-]\d+)?L?/); - return "number"; - } else if (ch == "'" || ch == '"') { - state.tokenize = tokenString(ch); - return "string"; - } else if (ch == "." && stream.match(/.[.\d]+/)) { - return "keyword"; - } else if (/[\w\.]/.test(ch) && ch != "_") { - stream.eatWhile(/[\w\.]/); - var word = stream.current(); - if (atoms.propertyIsEnumerable(word)) return "atom"; - if (keywords.propertyIsEnumerable(word)) { - if (blockkeywords.propertyIsEnumerable(word)) curPunc = "block"; - return "keyword"; - } - if (builtins.propertyIsEnumerable(word)) return "builtin"; - return "variable"; - } else if (ch == "%") { - if (stream.skipTo("%")) stream.next(); - return "variable-2"; - } else if (ch == "<" && stream.eat("-")) { - return "arrow"; - } else if (ch == "=" && state.ctx.argList) { - return "arg-is"; - } else if (opChars.test(ch)) { - if (ch == "$") return "dollar"; - stream.eatWhile(opChars); - return "operator"; - } else if (/[\(\){}\[\];]/.test(ch)) { - curPunc = ch; - if (ch == ";") return "semi"; - return null; - } else { - return null; - } - } - - function tokenString(quote) { - return function(stream, state) { - if (stream.eat("\\")) { - var ch = stream.next(); - if (ch == "x") stream.match(/^[a-f0-9]{2}/i); - else if ((ch == "u" || ch == "U") && stream.eat("{") && stream.skipTo("}")) stream.next(); - else if (ch == "u") stream.match(/^[a-f0-9]{4}/i); - else if (ch == "U") stream.match(/^[a-f0-9]{8}/i); - else if (/[0-7]/.test(ch)) stream.match(/^[0-7]{1,2}/); - return "string-2"; - } else { - var next; - while ((next = stream.next()) != null) { - if (next == quote) { state.tokenize = tokenBase; break; } - if (next == "\\") { stream.backUp(1); break; } - } - return "string"; - } - }; - } - - function push(state, type, stream) { - state.ctx = {type: type, - indent: state.indent, - align: null, - column: stream.column(), - prev: state.ctx}; - } - function pop(state) { - state.indent = state.ctx.indent; - state.ctx = state.ctx.prev; - } - - return { - startState: function() { - return {tokenize: tokenBase, - ctx: {type: "top", - indent: -config.indentUnit, - align: false}, - indent: 0, - afterIdent: false}; - }, - - token: function(stream, state) { - if (stream.sol()) { - if (state.ctx.align == null) state.ctx.align = false; - state.indent = stream.indentation(); - } - if (stream.eatSpace()) return null; - var style = state.tokenize(stream, state); - if (style != "comment" && state.ctx.align == null) state.ctx.align = true; - - var ctype = state.ctx.type; - if ((curPunc == ";" || curPunc == "{" || curPunc == "}") && ctype == "block") pop(state); - if (curPunc == "{") push(state, "}", stream); - else if (curPunc == "(") { - push(state, ")", stream); - if (state.afterIdent) state.ctx.argList = true; - } - else if (curPunc == "[") push(state, "]", stream); - else if (curPunc == "block") push(state, "block", stream); - else if (curPunc == ctype) pop(state); - state.afterIdent = style == "variable" || style == "keyword"; - return style; - }, - - indent: function(state, textAfter) { - if (state.tokenize != tokenBase) return 0; - var firstChar = textAfter && textAfter.charAt(0), ctx = state.ctx, - closing = firstChar == ctx.type; - if (ctx.type == "block") return ctx.indent + (firstChar == "{" ? 0 : config.indentUnit); - else if (ctx.align) return ctx.column + (closing ? 0 : 1); - else return ctx.indent + (closing ? 0 : config.indentUnit); - } - }; -}); - -CodeMirror.defineMIME("text/x-rsrc", "r"); diff --git a/plugins/codemirror/codemirror/mode/rpm/changes/changes.js b/plugins/codemirror/codemirror/mode/rpm/changes/changes.js deleted file mode 100644 index 14a08d9..0000000 --- a/plugins/codemirror/codemirror/mode/rpm/changes/changes.js +++ /dev/null @@ -1,19 +0,0 @@ -CodeMirror.defineMode("changes", function() { - var headerSeperator = /^-+$/; - var headerLine = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ?\d{1,2} \d{2}:\d{2}(:\d{2})? [A-Z]{3,4} \d{4} - /; - var simpleEmail = /^[\w+.-]+@[\w.-]+/; - - return { - token: function(stream) { - if (stream.sol()) { - if (stream.match(headerSeperator)) { return 'tag'; } - if (stream.match(headerLine)) { return 'tag'; } - } - if (stream.match(simpleEmail)) { return 'string'; } - stream.next(); - return null; - } - }; -}); - -CodeMirror.defineMIME("text/x-rpm-changes", "changes"); diff --git a/plugins/codemirror/codemirror/mode/rpm/changes/index.html b/plugins/codemirror/codemirror/mode/rpm/changes/index.html deleted file mode 100644 index 18fe7ab..0000000 --- a/plugins/codemirror/codemirror/mode/rpm/changes/index.html +++ /dev/null @@ -1,67 +0,0 @@ - - -CodeMirror: RPM changes mode - - - - - - - - - - - -
    -

    RPM changes mode

    - -
    - - -

    MIME types defined: text/x-rpm-changes.

    -
    diff --git a/plugins/codemirror/codemirror/mode/rpm/spec/index.html b/plugins/codemirror/codemirror/mode/rpm/spec/index.html deleted file mode 100644 index 127b72e..0000000 --- a/plugins/codemirror/codemirror/mode/rpm/spec/index.html +++ /dev/null @@ -1,114 +0,0 @@ - - -CodeMirror: RPM spec mode - - - - - - - - - - - - -
    -

    RPM spec mode

    - -
    - - -

    MIME types defined: text/x-rpm-spec.

    - -
    diff --git a/plugins/codemirror/codemirror/mode/rpm/spec/spec.css b/plugins/codemirror/codemirror/mode/rpm/spec/spec.css deleted file mode 100644 index d0a5d43..0000000 --- a/plugins/codemirror/codemirror/mode/rpm/spec/spec.css +++ /dev/null @@ -1,5 +0,0 @@ -.cm-s-default span.cm-preamble {color: #b26818; font-weight: bold;} -.cm-s-default span.cm-macro {color: #b218b2;} -.cm-s-default span.cm-section {color: green; font-weight: bold;} -.cm-s-default span.cm-script {color: red;} -.cm-s-default span.cm-issue {color: yellow;} diff --git a/plugins/codemirror/codemirror/mode/rpm/spec/spec.js b/plugins/codemirror/codemirror/mode/rpm/spec/spec.js deleted file mode 100644 index 9f339c2..0000000 --- a/plugins/codemirror/codemirror/mode/rpm/spec/spec.js +++ /dev/null @@ -1,66 +0,0 @@ -// Quick and dirty spec file highlighting - -CodeMirror.defineMode("spec", function() { - var arch = /^(i386|i586|i686|x86_64|ppc64|ppc|ia64|s390x|s390|sparc64|sparcv9|sparc|noarch|alphaev6|alpha|hppa|mipsel)/; - - var preamble = /^(Name|Version|Release|License|Summary|Url|Group|Source|BuildArch|BuildRequires|BuildRoot|AutoReqProv|Provides|Requires(\(\w+\))?|Obsoletes|Conflicts|Recommends|Source\d*|Patch\d*|ExclusiveArch|NoSource|Supplements):/; - var section = /^%(debug_package|package|description|prep|build|install|files|clean|changelog|preun|postun|pre|post|triggerin|triggerun|pretrans|posttrans|verifyscript|check|triggerpostun|triggerprein|trigger)/; - var control_flow_complex = /^%(ifnarch|ifarch|if)/; // rpm control flow macros - var control_flow_simple = /^%(else|endif)/; // rpm control flow macros - var operators = /^(\!|\?|\<\=|\<|\>\=|\>|\=\=|\&\&|\|\|)/; // operators in control flow macros - - return { - startState: function () { - return { - controlFlow: false, - macroParameters: false, - section: false - }; - }, - token: function (stream, state) { - var ch = stream.peek(); - if (ch == "#") { stream.skipToEnd(); return "comment"; } - - if (stream.sol()) { - if (stream.match(preamble)) { return "preamble"; } - if (stream.match(section)) { return "section"; } - } - - if (stream.match(/^\$\w+/)) { return "def"; } // Variables like '$RPM_BUILD_ROOT' - if (stream.match(/^\$\{\w+\}/)) { return "def"; } // Variables like '${RPM_BUILD_ROOT}' - - if (stream.match(control_flow_simple)) { return "keyword"; } - if (stream.match(control_flow_complex)) { - state.controlFlow = true; - return "keyword"; - } - if (state.controlFlow) { - if (stream.match(operators)) { return "operator"; } - if (stream.match(/^(\d+)/)) { return "number"; } - if (stream.eol()) { state.controlFlow = false; } - } - - if (stream.match(arch)) { return "number"; } - - // Macros like '%make_install' or '%attr(0775,root,root)' - if (stream.match(/^%[\w]+/)) { - if (stream.match(/^\(/)) { state.macroParameters = true; } - return "macro"; - } - if (state.macroParameters) { - if (stream.match(/^\d+/)) { return "number";} - if (stream.match(/^\)/)) { - state.macroParameters = false; - return "macro"; - } - } - if (stream.match(/^%\{\??[\w \-]+\}/)) { return "macro"; } // Macros like '%{defined fedora}' - - //TODO: Include bash script sub-parser (CodeMirror supports that) - stream.next(); - return null; - } - }; -}); - -CodeMirror.defineMIME("text/x-rpm-spec", "spec"); diff --git a/plugins/codemirror/codemirror/mode/rst/index.html b/plugins/codemirror/codemirror/mode/rst/index.html deleted file mode 100644 index 78030eb..0000000 --- a/plugins/codemirror/codemirror/mode/rst/index.html +++ /dev/null @@ -1,534 +0,0 @@ - - -CodeMirror: reStructuredText mode - - - - - - - - - -
    -

    reStructuredText mode

    -
    - - -

    - The python mode will be used for highlighting blocks - containing Python/IPython terminal sessions: blocks starting with - >>> (for Python) or In [num]: (for - IPython). - - Further, the stex mode will be used for highlighting - blocks containing LaTex code. -

    - -

    MIME types defined: text/x-rst.

    -
    diff --git a/plugins/codemirror/codemirror/mode/rst/rst.js b/plugins/codemirror/codemirror/mode/rst/rst.js deleted file mode 100644 index 75563ba..0000000 --- a/plugins/codemirror/codemirror/mode/rst/rst.js +++ /dev/null @@ -1,560 +0,0 @@ -CodeMirror.defineMode('rst-base', function (config) { - - /////////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////////// - - function format(string) { - var args = Array.prototype.slice.call(arguments, 1); - return string.replace(/{(\d+)}/g, function (match, n) { - return typeof args[n] != 'undefined' ? args[n] : match; - }); - } - - function AssertException(message) { - this.message = message; - } - - AssertException.prototype.toString = function () { - return 'AssertException: ' + this.message; - }; - - function assert(expression, message) { - if (!expression) throw new AssertException(message); - return expression; - } - - /////////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////////// - - var mode_python = CodeMirror.getMode(config, 'python'); - var mode_stex = CodeMirror.getMode(config, 'stex'); - - /////////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////////// - - var SEPA = "\\s+"; - var TAIL = "(?:\\s*|\\W|$)", - rx_TAIL = new RegExp(format('^{0}', TAIL)); - - var NAME = - "(?:[^\\W\\d_](?:[\\w!\"#$%&'()\\*\\+,\\-\\.\/:;<=>\\?]*[^\\W_])?)", - rx_NAME = new RegExp(format('^{0}', NAME)); - var NAME_WWS = - "(?:[^\\W\\d_](?:[\\w\\s!\"#$%&'()\\*\\+,\\-\\.\/:;<=>\\?]*[^\\W_])?)"; - var REF_NAME = format('(?:{0}|`{1}`)', NAME, NAME_WWS); - - var TEXT1 = "(?:[^\\s\\|](?:[^\\|]*[^\\s\\|])?)"; - var TEXT2 = "(?:[^\\`]+)", - rx_TEXT2 = new RegExp(format('^{0}', TEXT2)); - - var rx_section = new RegExp( - "^([!'#$%&\"()*+,-./:;<=>?@\\[\\\\\\]^_`{|}~])\\1{3,}\\s*$"); - var rx_explicit = new RegExp( - format('^\\.\\.{0}', SEPA)); - var rx_link = new RegExp( - format('^_{0}:{1}|^__:{1}', REF_NAME, TAIL)); - var rx_directive = new RegExp( - format('^{0}::{1}', REF_NAME, TAIL)); - var rx_substitution = new RegExp( - format('^\\|{0}\\|{1}{2}::{3}', TEXT1, SEPA, REF_NAME, TAIL)); - var rx_footnote = new RegExp( - format('^\\[(?:\\d+|#{0}?|\\*)]{1}', REF_NAME, TAIL)); - var rx_citation = new RegExp( - format('^\\[{0}\\]{1}', REF_NAME, TAIL)); - - var rx_substitution_ref = new RegExp( - format('^\\|{0}\\|', TEXT1)); - var rx_footnote_ref = new RegExp( - format('^\\[(?:\\d+|#{0}?|\\*)]_', REF_NAME)); - var rx_citation_ref = new RegExp( - format('^\\[{0}\\]_', REF_NAME)); - var rx_link_ref1 = new RegExp( - format('^{0}__?', REF_NAME)); - var rx_link_ref2 = new RegExp( - format('^`{0}`_', TEXT2)); - - var rx_role_pre = new RegExp( - format('^:{0}:`{1}`{2}', NAME, TEXT2, TAIL)); - var rx_role_suf = new RegExp( - format('^`{1}`:{0}:{2}', NAME, TEXT2, TAIL)); - var rx_role = new RegExp( - format('^:{0}:{1}', NAME, TAIL)); - - var rx_directive_name = new RegExp(format('^{0}', REF_NAME)); - var rx_directive_tail = new RegExp(format('^::{0}', TAIL)); - var rx_substitution_text = new RegExp(format('^\\|{0}\\|', TEXT1)); - var rx_substitution_sepa = new RegExp(format('^{0}', SEPA)); - var rx_substitution_name = new RegExp(format('^{0}', REF_NAME)); - var rx_substitution_tail = new RegExp(format('^::{0}', TAIL)); - var rx_link_head = new RegExp("^_"); - var rx_link_name = new RegExp(format('^{0}|_', REF_NAME)); - var rx_link_tail = new RegExp(format('^:{0}', TAIL)); - - var rx_verbatim = new RegExp('^::\\s*$'); - var rx_examples = new RegExp('^\\s+(?:>>>|In \\[\\d+\\]:)\\s'); - - /////////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////////// - - function to_normal(stream, state) { - var token = null; - - if (stream.sol() && stream.match(rx_examples, false)) { - change(state, to_mode, { - mode: mode_python, local: mode_python.startState() - }); - } else if (stream.sol() && stream.match(rx_explicit)) { - change(state, to_explicit); - token = 'meta'; - } else if (stream.sol() && stream.match(rx_section)) { - change(state, to_normal); - token = 'header'; - } else if (phase(state) == rx_role_pre || - stream.match(rx_role_pre, false)) { - - switch (stage(state)) { - case 0: - change(state, to_normal, context(rx_role_pre, 1)); - assert(stream.match(/^:/)); - token = 'meta'; - break; - case 1: - change(state, to_normal, context(rx_role_pre, 2)); - assert(stream.match(rx_NAME)); - token = 'keyword'; - - if (stream.current().match(/^(?:math|latex)/)) { - state.tmp_stex = true; - } - break; - case 2: - change(state, to_normal, context(rx_role_pre, 3)); - assert(stream.match(/^:`/)); - token = 'meta'; - break; - case 3: - if (state.tmp_stex) { - state.tmp_stex = undefined; state.tmp = { - mode: mode_stex, local: mode_stex.startState() - }; - } - - if (state.tmp) { - if (stream.peek() == '`') { - change(state, to_normal, context(rx_role_pre, 4)); - state.tmp = undefined; - break; - } - - token = state.tmp.mode.token(stream, state.tmp.local); - break; - } - - change(state, to_normal, context(rx_role_pre, 4)); - assert(stream.match(rx_TEXT2)); - token = 'string'; - break; - case 4: - change(state, to_normal, context(rx_role_pre, 5)); - assert(stream.match(/^`/)); - token = 'meta'; - break; - case 5: - change(state, to_normal, context(rx_role_pre, 6)); - assert(stream.match(rx_TAIL)); - break; - default: - change(state, to_normal); - assert(stream.current() == ''); - } - } else if (phase(state) == rx_role_suf || - stream.match(rx_role_suf, false)) { - - switch (stage(state)) { - case 0: - change(state, to_normal, context(rx_role_suf, 1)); - assert(stream.match(/^`/)); - token = 'meta'; - break; - case 1: - change(state, to_normal, context(rx_role_suf, 2)); - assert(stream.match(rx_TEXT2)); - token = 'string'; - break; - case 2: - change(state, to_normal, context(rx_role_suf, 3)); - assert(stream.match(/^`:/)); - token = 'meta'; - break; - case 3: - change(state, to_normal, context(rx_role_suf, 4)); - assert(stream.match(rx_NAME)); - token = 'keyword'; - break; - case 4: - change(state, to_normal, context(rx_role_suf, 5)); - assert(stream.match(/^:/)); - token = 'meta'; - break; - case 5: - change(state, to_normal, context(rx_role_suf, 6)); - assert(stream.match(rx_TAIL)); - break; - default: - change(state, to_normal); - assert(stream.current() == ''); - } - } else if (phase(state) == rx_role || stream.match(rx_role, false)) { - - switch (stage(state)) { - case 0: - change(state, to_normal, context(rx_role, 1)); - assert(stream.match(/^:/)); - token = 'meta'; - break; - case 1: - change(state, to_normal, context(rx_role, 2)); - assert(stream.match(rx_NAME)); - token = 'keyword'; - break; - case 2: - change(state, to_normal, context(rx_role, 3)); - assert(stream.match(/^:/)); - token = 'meta'; - break; - case 3: - change(state, to_normal, context(rx_role, 4)); - assert(stream.match(rx_TAIL)); - break; - default: - change(state, to_normal); - assert(stream.current() == ''); - } - } else if (phase(state) == rx_substitution_ref || - stream.match(rx_substitution_ref, false)) { - - switch (stage(state)) { - case 0: - change(state, to_normal, context(rx_substitution_ref, 1)); - assert(stream.match(rx_substitution_text)); - token = 'variable-2'; - break; - case 1: - change(state, to_normal, context(rx_substitution_ref, 2)); - if (stream.match(/^_?_?/)) token = 'link'; - break; - default: - change(state, to_normal); - assert(stream.current() == ''); - } - } else if (stream.match(rx_footnote_ref)) { - change(state, to_normal); - token = 'quote'; - } else if (stream.match(rx_citation_ref)) { - change(state, to_normal); - token = 'quote'; - } else if (stream.match(rx_link_ref1)) { - change(state, to_normal); - if (!stream.peek() || stream.peek().match(/^\W$/)) { - token = 'link'; - } - } else if (phase(state) == rx_link_ref2 || - stream.match(rx_link_ref2, false)) { - - switch (stage(state)) { - case 0: - if (!stream.peek() || stream.peek().match(/^\W$/)) { - change(state, to_normal, context(rx_link_ref2, 1)); - } else { - stream.match(rx_link_ref2); - } - break; - case 1: - change(state, to_normal, context(rx_link_ref2, 2)); - assert(stream.match(/^`/)); - token = 'link'; - break; - case 2: - change(state, to_normal, context(rx_link_ref2, 3)); - assert(stream.match(rx_TEXT2)); - break; - case 3: - change(state, to_normal, context(rx_link_ref2, 4)); - assert(stream.match(/^`_/)); - token = 'link'; - break; - default: - change(state, to_normal); - assert(stream.current() == ''); - } - } else if (stream.match(rx_verbatim)) { - change(state, to_verbatim); - } - - else { - if (stream.next()) change(state, to_normal); - } - - return token; - } - - /////////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////////// - - function to_explicit(stream, state) { - var token = null; - - if (phase(state) == rx_substitution || - stream.match(rx_substitution, false)) { - - switch (stage(state)) { - case 0: - change(state, to_explicit, context(rx_substitution, 1)); - assert(stream.match(rx_substitution_text)); - token = 'variable-2'; - break; - case 1: - change(state, to_explicit, context(rx_substitution, 2)); - assert(stream.match(rx_substitution_sepa)); - break; - case 2: - change(state, to_explicit, context(rx_substitution, 3)); - assert(stream.match(rx_substitution_name)); - token = 'keyword'; - break; - case 3: - change(state, to_explicit, context(rx_substitution, 4)); - assert(stream.match(rx_substitution_tail)); - token = 'meta'; - break; - default: - change(state, to_normal); - assert(stream.current() == ''); - } - } else if (phase(state) == rx_directive || - stream.match(rx_directive, false)) { - - switch (stage(state)) { - case 0: - change(state, to_explicit, context(rx_directive, 1)); - assert(stream.match(rx_directive_name)); - token = 'keyword'; - - if (stream.current().match(/^(?:math|latex)/)) - state.tmp_stex = true; - else if (stream.current().match(/^python/)) - state.tmp_py = true; - break; - case 1: - change(state, to_explicit, context(rx_directive, 2)); - assert(stream.match(rx_directive_tail)); - token = 'meta'; - - if (stream.match(/^latex\s*$/) || state.tmp_stex) { - state.tmp_stex = undefined; change(state, to_mode, { - mode: mode_stex, local: mode_stex.startState() - }); - } - break; - case 2: - change(state, to_explicit, context(rx_directive, 3)); - if (stream.match(/^python\s*$/) || state.tmp_py) { - state.tmp_py = undefined; change(state, to_mode, { - mode: mode_python, local: mode_python.startState() - }); - } - break; - default: - change(state, to_normal); - assert(stream.current() == ''); - } - } else if (phase(state) == rx_link || stream.match(rx_link, false)) { - - switch (stage(state)) { - case 0: - change(state, to_explicit, context(rx_link, 1)); - assert(stream.match(rx_link_head)); - assert(stream.match(rx_link_name)); - token = 'link'; - break; - case 1: - change(state, to_explicit, context(rx_link, 2)); - assert(stream.match(rx_link_tail)); - token = 'meta'; - break; - default: - change(state, to_normal); - assert(stream.current() == ''); - } - } else if (stream.match(rx_footnote)) { - change(state, to_normal); - token = 'quote'; - } else if (stream.match(rx_citation)) { - change(state, to_normal); - token = 'quote'; - } - - else { - stream.eatSpace(); - if (stream.eol()) { - change(state, to_normal); - } else { - stream.skipToEnd(); - change(state, to_comment); - token = 'comment'; - } - } - - return token; - } - - /////////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////////// - - function to_comment(stream, state) { - return as_block(stream, state, 'comment'); - } - - function to_verbatim(stream, state) { - return as_block(stream, state, 'meta'); - } - - function as_block(stream, state, token) { - if (stream.eol() || stream.eatSpace()) { - stream.skipToEnd(); - return token; - } else { - change(state, to_normal); - return null; - } - } - - /////////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////////// - - function to_mode(stream, state) { - - if (state.ctx.mode && state.ctx.local) { - - if (stream.sol()) { - if (!stream.eatSpace()) change(state, to_normal); - return null; - } - - return state.ctx.mode.token(stream, state.ctx.local); - } - - change(state, to_normal); - return null; - } - - /////////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////////// - - function context(phase, stage, mode, local) { - return {phase: phase, stage: stage, mode: mode, local: local}; - } - - function change(state, tok, ctx) { - state.tok = tok; - state.ctx = ctx || {}; - } - - function stage(state) { - return state.ctx.stage || 0; - } - - function phase(state) { - return state.ctx.phase; - } - - /////////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////////// - - return { - startState: function () { - return {tok: to_normal, ctx: context(undefined, 0)}; - }, - - copyState: function (state) { - return {tok: state.tok, ctx: state.ctx}; - }, - - innerMode: function (state) { - return state.tmp ? {state: state.tmp.local, mode: state.tmp.mode} - : state.ctx ? {state: state.ctx.local, mode: state.ctx.mode} - : null; - }, - - token: function (stream, state) { - return state.tok(stream, state); - } - }; -}, 'python', 'stex'); - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - -CodeMirror.defineMode('rst', function (config, options) { - - var rx_strong = /^\*\*[^\*\s](?:[^\*]*[^\*\s])?\*\*/; - var rx_emphasis = /^\*[^\*\s](?:[^\*]*[^\*\s])?\*/; - var rx_literal = /^``[^`\s](?:[^`]*[^`\s])``/; - - var rx_number = /^(?:[\d]+(?:[\.,]\d+)*)/; - var rx_positive = /^(?:\s\+[\d]+(?:[\.,]\d+)*)/; - var rx_negative = /^(?:\s\-[\d]+(?:[\.,]\d+)*)/; - - var rx_uri_protocol = "[Hh][Tt][Tt][Pp][Ss]?://"; - var rx_uri_domain = "(?:[\\d\\w.-]+)\\.(?:\\w{2,6})"; - var rx_uri_path = "(?:/[\\d\\w\\#\\%\\&\\-\\.\\,\\/\\:\\=\\?\\~]+)*"; - var rx_uri = new RegExp("^" + - rx_uri_protocol + rx_uri_domain + rx_uri_path - ); - - var overlay = { - token: function (stream) { - - if (stream.match(rx_strong) && stream.match (/\W+|$/, false)) - return 'strong'; - if (stream.match(rx_emphasis) && stream.match (/\W+|$/, false)) - return 'em'; - if (stream.match(rx_literal) && stream.match (/\W+|$/, false)) - return 'string-2'; - if (stream.match(rx_number)) - return 'number'; - if (stream.match(rx_positive)) - return 'positive'; - if (stream.match(rx_negative)) - return 'negative'; - if (stream.match(rx_uri)) - return 'link'; - - while (stream.next() != null) { - if (stream.match(rx_strong, false)) break; - if (stream.match(rx_emphasis, false)) break; - if (stream.match(rx_literal, false)) break; - if (stream.match(rx_number, false)) break; - if (stream.match(rx_positive, false)) break; - if (stream.match(rx_negative, false)) break; - if (stream.match(rx_uri, false)) break; - } - - return null; - } - }; - - var mode = CodeMirror.getMode( - config, options.backdrop || 'rst-base' - ); - - return CodeMirror.overlayMode(mode, overlay, true); // combine -}, 'python', 'stex'); - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - -CodeMirror.defineMIME('text/x-rst', 'rst'); - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// diff --git a/plugins/codemirror/codemirror/mode/ruby/index.html b/plugins/codemirror/codemirror/mode/ruby/index.html deleted file mode 100644 index 2b3e1a3..0000000 --- a/plugins/codemirror/codemirror/mode/ruby/index.html +++ /dev/null @@ -1,185 +0,0 @@ - - -CodeMirror: Ruby mode - - - - - - - - - - -
    -

    Ruby mode

    -
    - - -

    MIME types defined: text/x-ruby.

    - -

    Development of the CodeMirror Ruby mode was kindly sponsored - by Ubalo, who hold - the license.

    - -
    diff --git a/plugins/codemirror/codemirror/mode/ruby/ruby.js b/plugins/codemirror/codemirror/mode/ruby/ruby.js deleted file mode 100644 index 96cdd5f..0000000 --- a/plugins/codemirror/codemirror/mode/ruby/ruby.js +++ /dev/null @@ -1,247 +0,0 @@ -CodeMirror.defineMode("ruby", function(config) { - function wordObj(words) { - var o = {}; - for (var i = 0, e = words.length; i < e; ++i) o[words[i]] = true; - return o; - } - var keywords = wordObj([ - "alias", "and", "BEGIN", "begin", "break", "case", "class", "def", "defined?", "do", "else", - "elsif", "END", "end", "ensure", "false", "for", "if", "in", "module", "next", "not", "or", - "redo", "rescue", "retry", "return", "self", "super", "then", "true", "undef", "unless", - "until", "when", "while", "yield", "nil", "raise", "throw", "catch", "fail", "loop", "callcc", - "caller", "lambda", "proc", "public", "protected", "private", "require", "load", - "require_relative", "extend", "autoload", "__END__", "__FILE__", "__LINE__", "__dir__" - ]); - var indentWords = wordObj(["def", "class", "case", "for", "while", "do", "module", "then", - "catch", "loop", "proc", "begin"]); - var dedentWords = wordObj(["end", "until"]); - var matching = {"[": "]", "{": "}", "(": ")"}; - var curPunc; - - function chain(newtok, stream, state) { - state.tokenize.push(newtok); - return newtok(stream, state); - } - - function tokenBase(stream, state) { - curPunc = null; - if (stream.sol() && stream.match("=begin") && stream.eol()) { - state.tokenize.push(readBlockComment); - return "comment"; - } - if (stream.eatSpace()) return null; - var ch = stream.next(), m; - if (ch == "`" || ch == "'" || ch == '"') { - return chain(readQuoted(ch, "string", ch == '"' || ch == "`"), stream, state); - } else if (ch == "/" && !stream.eol() && stream.peek() != " ") { - return chain(readQuoted(ch, "string-2", true), stream, state); - } else if (ch == "%") { - var style = "string", embed = true; - if (stream.eat("s")) style = "atom"; - else if (stream.eat(/[WQ]/)) style = "string"; - else if (stream.eat(/[r]/)) style = "string-2"; - else if (stream.eat(/[wxq]/)) { style = "string"; embed = false; } - var delim = stream.eat(/[^\w\s]/); - if (!delim) return "operator"; - if (matching.propertyIsEnumerable(delim)) delim = matching[delim]; - return chain(readQuoted(delim, style, embed, true), stream, state); - } else if (ch == "#") { - stream.skipToEnd(); - return "comment"; - } else if (ch == "<" && (m = stream.match(/^<-?[\`\"\']?([a-zA-Z_?]\w*)[\`\"\']?(?:;|$)/))) { - return chain(readHereDoc(m[1]), stream, state); - } else if (ch == "0") { - if (stream.eat("x")) stream.eatWhile(/[\da-fA-F]/); - else if (stream.eat("b")) stream.eatWhile(/[01]/); - else stream.eatWhile(/[0-7]/); - return "number"; - } else if (/\d/.test(ch)) { - stream.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+\-]?[\d_]+)?/); - return "number"; - } else if (ch == "?") { - while (stream.match(/^\\[CM]-/)) {} - if (stream.eat("\\")) stream.eatWhile(/\w/); - else stream.next(); - return "string"; - } else if (ch == ":") { - if (stream.eat("'")) return chain(readQuoted("'", "atom", false), stream, state); - if (stream.eat('"')) return chain(readQuoted('"', "atom", true), stream, state); - - // :> :>> :< :<< are valid symbols - if (stream.eat(/[\<\>]/)) { - stream.eat(/[\<\>]/); - return "atom"; - } - - // :+ :- :/ :* :| :& :! are valid symbols - if (stream.eat(/[\+\-\*\/\&\|\:\!]/)) { - return "atom"; - } - - // Symbols can't start by a digit - if (stream.eat(/[a-zA-Z$@_]/)) { - stream.eatWhile(/[\w]/); - // Only one ? ! = is allowed and only as the last character - stream.eat(/[\?\!\=]/); - return "atom"; - } - return "operator"; - } else if (ch == "@" && stream.match(/^@?[a-zA-Z_]/)) { - stream.eat("@"); - stream.eatWhile(/[\w]/); - return "variable-2"; - } else if (ch == "$") { - if (stream.eat(/[a-zA-Z_]/)) { - stream.eatWhile(/[\w]/); - } else if (stream.eat(/\d/)) { - stream.eat(/\d/); - } else { - stream.next(); // Must be a special global like $: or $! - } - return "variable-3"; - } else if (/[a-zA-Z_]/.test(ch)) { - stream.eatWhile(/[\w]/); - stream.eat(/[\?\!]/); - if (stream.eat(":")) return "atom"; - return "ident"; - } else if (ch == "|" && (state.varList || state.lastTok == "{" || state.lastTok == "do")) { - curPunc = "|"; - return null; - } else if (/[\(\)\[\]{}\\;]/.test(ch)) { - curPunc = ch; - return null; - } else if (ch == "-" && stream.eat(">")) { - return "arrow"; - } else if (/[=+\-\/*:\.^%<>~|]/.test(ch)) { - stream.eatWhile(/[=+\-\/*:\.^%<>~|]/); - return "operator"; - } else { - return null; - } - } - - function tokenBaseUntilBrace() { - var depth = 1; - return function(stream, state) { - if (stream.peek() == "}") { - depth--; - if (depth == 0) { - state.tokenize.pop(); - return state.tokenize[state.tokenize.length-1](stream, state); - } - } else if (stream.peek() == "{") { - depth++; - } - return tokenBase(stream, state); - }; - } - function tokenBaseOnce() { - var alreadyCalled = false; - return function(stream, state) { - if (alreadyCalled) { - state.tokenize.pop(); - return state.tokenize[state.tokenize.length-1](stream, state); - } - alreadyCalled = true; - return tokenBase(stream, state); - }; - } - function readQuoted(quote, style, embed, unescaped) { - return function(stream, state) { - var escaped = false, ch; - - if (state.context.type === 'read-quoted-paused') { - state.context = state.context.prev; - stream.eat("}"); - } - - while ((ch = stream.next()) != null) { - if (ch == quote && (unescaped || !escaped)) { - state.tokenize.pop(); - break; - } - if (embed && ch == "#" && !escaped) { - if (stream.eat("{")) { - if (quote == "}") { - state.context = {prev: state.context, type: 'read-quoted-paused'}; - } - state.tokenize.push(tokenBaseUntilBrace()); - break; - } else if (/[@\$]/.test(stream.peek())) { - state.tokenize.push(tokenBaseOnce()); - break; - } - } - escaped = !escaped && ch == "\\"; - } - return style; - }; - } - function readHereDoc(phrase) { - return function(stream, state) { - if (stream.match(phrase)) state.tokenize.pop(); - else stream.skipToEnd(); - return "string"; - }; - } - function readBlockComment(stream, state) { - if (stream.sol() && stream.match("=end") && stream.eol()) - state.tokenize.pop(); - stream.skipToEnd(); - return "comment"; - } - - return { - startState: function() { - return {tokenize: [tokenBase], - indented: 0, - context: {type: "top", indented: -config.indentUnit}, - continuedLine: false, - lastTok: null, - varList: false}; - }, - - token: function(stream, state) { - if (stream.sol()) state.indented = stream.indentation(); - var style = state.tokenize[state.tokenize.length-1](stream, state), kwtype; - if (style == "ident") { - var word = stream.current(); - style = keywords.propertyIsEnumerable(stream.current()) ? "keyword" - : /^[A-Z]/.test(word) ? "tag" - : (state.lastTok == "def" || state.lastTok == "class" || state.varList) ? "def" - : "variable"; - if (indentWords.propertyIsEnumerable(word)) kwtype = "indent"; - else if (dedentWords.propertyIsEnumerable(word)) kwtype = "dedent"; - else if ((word == "if" || word == "unless") && stream.column() == stream.indentation()) - kwtype = "indent"; - } - if (curPunc || (style && style != "comment")) state.lastTok = word || curPunc || style; - if (curPunc == "|") state.varList = !state.varList; - - if (kwtype == "indent" || /[\(\[\{]/.test(curPunc)) - state.context = {prev: state.context, type: curPunc || style, indented: state.indented}; - else if ((kwtype == "dedent" || /[\)\]\}]/.test(curPunc)) && state.context.prev) - state.context = state.context.prev; - - if (stream.eol()) - state.continuedLine = (curPunc == "\\" || style == "operator"); - return style; - }, - - indent: function(state, textAfter) { - if (state.tokenize[state.tokenize.length-1] != tokenBase) return 0; - var firstChar = textAfter && textAfter.charAt(0); - var ct = state.context; - var closing = ct.type == matching[firstChar] || - ct.type == "keyword" && /^(?:end|until|else|elsif|when|rescue)\b/.test(textAfter); - return ct.indented + (closing ? 0 : config.indentUnit) + - (state.continuedLine ? config.indentUnit : 0); - }, - - electricChars: "}de", // enD and rescuE - lineComment: "#" - }; -}); - -CodeMirror.defineMIME("text/x-ruby", "ruby"); - diff --git a/plugins/codemirror/codemirror/mode/rust/index.html b/plugins/codemirror/codemirror/mode/rust/index.html deleted file mode 100644 index b0b4c24..0000000 --- a/plugins/codemirror/codemirror/mode/rust/index.html +++ /dev/null @@ -1,61 +0,0 @@ - - -CodeMirror: Rust mode - - - - - - - - - -
    -

    Rust mode

    - - -
    - - - -

    MIME types defined: text/x-rustsrc.

    -
    diff --git a/plugins/codemirror/codemirror/mode/rust/rust.js b/plugins/codemirror/codemirror/mode/rust/rust.js deleted file mode 100644 index c7530b6..0000000 --- a/plugins/codemirror/codemirror/mode/rust/rust.js +++ /dev/null @@ -1,436 +0,0 @@ -CodeMirror.defineMode("rust", function() { - var indentUnit = 4, altIndentUnit = 2; - var valKeywords = { - "if": "if-style", "while": "if-style", "else": "else-style", - "do": "else-style", "ret": "else-style", "fail": "else-style", - "break": "atom", "cont": "atom", "const": "let", "resource": "fn", - "let": "let", "fn": "fn", "for": "for", "alt": "alt", "iface": "iface", - "impl": "impl", "type": "type", "enum": "enum", "mod": "mod", - "as": "op", "true": "atom", "false": "atom", "assert": "op", "check": "op", - "claim": "op", "native": "ignore", "unsafe": "ignore", "import": "else-style", - "export": "else-style", "copy": "op", "log": "op", "log_err": "op", - "use": "op", "bind": "op", "self": "atom" - }; - var typeKeywords = function() { - var keywords = {"fn": "fn", "block": "fn", "obj": "obj"}; - var atoms = "bool uint int i8 i16 i32 i64 u8 u16 u32 u64 float f32 f64 str char".split(" "); - for (var i = 0, e = atoms.length; i < e; ++i) keywords[atoms[i]] = "atom"; - return keywords; - }(); - var operatorChar = /[+\-*&%=<>!?|\.@]/; - - // Tokenizer - - // Used as scratch variable to communicate multiple values without - // consing up tons of objects. - var tcat, content; - function r(tc, style) { - tcat = tc; - return style; - } - - function tokenBase(stream, state) { - var ch = stream.next(); - if (ch == '"') { - state.tokenize = tokenString; - return state.tokenize(stream, state); - } - if (ch == "'") { - tcat = "atom"; - if (stream.eat("\\")) { - if (stream.skipTo("'")) { stream.next(); return "string"; } - else { return "error"; } - } else { - stream.next(); - return stream.eat("'") ? "string" : "error"; - } - } - if (ch == "/") { - if (stream.eat("/")) { stream.skipToEnd(); return "comment"; } - if (stream.eat("*")) { - state.tokenize = tokenComment(1); - return state.tokenize(stream, state); - } - } - if (ch == "#") { - if (stream.eat("[")) { tcat = "open-attr"; return null; } - stream.eatWhile(/\w/); - return r("macro", "meta"); - } - if (ch == ":" && stream.match(":<")) { - return r("op", null); - } - if (ch.match(/\d/) || (ch == "." && stream.eat(/\d/))) { - var flp = false; - if (!stream.match(/^x[\da-f]+/i) && !stream.match(/^b[01]+/)) { - stream.eatWhile(/\d/); - if (stream.eat(".")) { flp = true; stream.eatWhile(/\d/); } - if (stream.match(/^e[+\-]?\d+/i)) { flp = true; } - } - if (flp) stream.match(/^f(?:32|64)/); - else stream.match(/^[ui](?:8|16|32|64)/); - return r("atom", "number"); - } - if (ch.match(/[()\[\]{}:;,]/)) return r(ch, null); - if (ch == "-" && stream.eat(">")) return r("->", null); - if (ch.match(operatorChar)) { - stream.eatWhile(operatorChar); - return r("op", null); - } - stream.eatWhile(/\w/); - content = stream.current(); - if (stream.match(/^::\w/)) { - stream.backUp(1); - return r("prefix", "variable-2"); - } - if (state.keywords.propertyIsEnumerable(content)) - return r(state.keywords[content], content.match(/true|false/) ? "atom" : "keyword"); - return r("name", "variable"); - } - - function tokenString(stream, state) { - var ch, escaped = false; - while (ch = stream.next()) { - if (ch == '"' && !escaped) { - state.tokenize = tokenBase; - return r("atom", "string"); - } - escaped = !escaped && ch == "\\"; - } - // Hack to not confuse the parser when a string is split in - // pieces. - return r("op", "string"); - } - - function tokenComment(depth) { - return function(stream, state) { - var lastCh = null, ch; - while (ch = stream.next()) { - if (ch == "/" && lastCh == "*") { - if (depth == 1) { - state.tokenize = tokenBase; - break; - } else { - state.tokenize = tokenComment(depth - 1); - return state.tokenize(stream, state); - } - } - if (ch == "*" && lastCh == "/") { - state.tokenize = tokenComment(depth + 1); - return state.tokenize(stream, state); - } - lastCh = ch; - } - return "comment"; - }; - } - - // Parser - - var cx = {state: null, stream: null, marked: null, cc: null}; - function pass() { - for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]); - } - function cont() { - pass.apply(null, arguments); - return true; - } - - function pushlex(type, info) { - var result = function() { - var state = cx.state; - state.lexical = {indented: state.indented, column: cx.stream.column(), - type: type, prev: state.lexical, info: info}; - }; - result.lex = true; - return result; - } - function poplex() { - var state = cx.state; - if (state.lexical.prev) { - if (state.lexical.type == ")") - state.indented = state.lexical.indented; - state.lexical = state.lexical.prev; - } - } - function typecx() { cx.state.keywords = typeKeywords; } - function valcx() { cx.state.keywords = valKeywords; } - poplex.lex = typecx.lex = valcx.lex = true; - - function commasep(comb, end) { - function more(type) { - if (type == ",") return cont(comb, more); - if (type == end) return cont(); - return cont(more); - } - return function(type) { - if (type == end) return cont(); - return pass(comb, more); - }; - } - - function stat_of(comb, tag) { - return cont(pushlex("stat", tag), comb, poplex, block); - } - function block(type) { - if (type == "}") return cont(); - if (type == "let") return stat_of(letdef1, "let"); - if (type == "fn") return stat_of(fndef); - if (type == "type") return cont(pushlex("stat"), tydef, endstatement, poplex, block); - if (type == "enum") return stat_of(enumdef); - if (type == "mod") return stat_of(mod); - if (type == "iface") return stat_of(iface); - if (type == "impl") return stat_of(impl); - if (type == "open-attr") return cont(pushlex("]"), commasep(expression, "]"), poplex); - if (type == "ignore" || type.match(/[\]\);,]/)) return cont(block); - return pass(pushlex("stat"), expression, poplex, endstatement, block); - } - function endstatement(type) { - if (type == ";") return cont(); - return pass(); - } - function expression(type) { - if (type == "atom" || type == "name") return cont(maybeop); - if (type == "{") return cont(pushlex("}"), exprbrace, poplex); - if (type.match(/[\[\(]/)) return matchBrackets(type, expression); - if (type.match(/[\]\)\};,]/)) return pass(); - if (type == "if-style") return cont(expression, expression); - if (type == "else-style" || type == "op") return cont(expression); - if (type == "for") return cont(pattern, maybetype, inop, expression, expression); - if (type == "alt") return cont(expression, altbody); - if (type == "fn") return cont(fndef); - if (type == "macro") return cont(macro); - return cont(); - } - function maybeop(type) { - if (content == ".") return cont(maybeprop); - if (content == "::<"){return cont(typarams, maybeop);} - if (type == "op" || content == ":") return cont(expression); - if (type == "(" || type == "[") return matchBrackets(type, expression); - return pass(); - } - function maybeprop() { - if (content.match(/^\w+$/)) {cx.marked = "variable"; return cont(maybeop);} - return pass(expression); - } - function exprbrace(type) { - if (type == "op") { - if (content == "|") return cont(blockvars, poplex, pushlex("}", "block"), block); - if (content == "||") return cont(poplex, pushlex("}", "block"), block); - } - if (content == "mutable" || (content.match(/^\w+$/) && cx.stream.peek() == ":" - && !cx.stream.match("::", false))) - return pass(record_of(expression)); - return pass(block); - } - function record_of(comb) { - function ro(type) { - if (content == "mutable" || content == "with") {cx.marked = "keyword"; return cont(ro);} - if (content.match(/^\w*$/)) {cx.marked = "variable"; return cont(ro);} - if (type == ":") return cont(comb, ro); - if (type == "}") return cont(); - return cont(ro); - } - return ro; - } - function blockvars(type) { - if (type == "name") {cx.marked = "def"; return cont(blockvars);} - if (type == "op" && content == "|") return cont(); - return cont(blockvars); - } - - function letdef1(type) { - if (type.match(/[\]\)\};]/)) return cont(); - if (content == "=") return cont(expression, letdef2); - if (type == ",") return cont(letdef1); - return pass(pattern, maybetype, letdef1); - } - function letdef2(type) { - if (type.match(/[\]\)\};,]/)) return pass(letdef1); - else return pass(expression, letdef2); - } - function maybetype(type) { - if (type == ":") return cont(typecx, rtype, valcx); - return pass(); - } - function inop(type) { - if (type == "name" && content == "in") {cx.marked = "keyword"; return cont();} - return pass(); - } - function fndef(type) { - if (content == "@" || content == "~") {cx.marked = "keyword"; return cont(fndef);} - if (type == "name") {cx.marked = "def"; return cont(fndef);} - if (content == "<") return cont(typarams, fndef); - if (type == "{") return pass(expression); - if (type == "(") return cont(pushlex(")"), commasep(argdef, ")"), poplex, fndef); - if (type == "->") return cont(typecx, rtype, valcx, fndef); - if (type == ";") return cont(); - return cont(fndef); - } - function tydef(type) { - if (type == "name") {cx.marked = "def"; return cont(tydef);} - if (content == "<") return cont(typarams, tydef); - if (content == "=") return cont(typecx, rtype, valcx); - return cont(tydef); - } - function enumdef(type) { - if (type == "name") {cx.marked = "def"; return cont(enumdef);} - if (content == "<") return cont(typarams, enumdef); - if (content == "=") return cont(typecx, rtype, valcx, endstatement); - if (type == "{") return cont(pushlex("}"), typecx, enumblock, valcx, poplex); - return cont(enumdef); - } - function enumblock(type) { - if (type == "}") return cont(); - if (type == "(") return cont(pushlex(")"), commasep(rtype, ")"), poplex, enumblock); - if (content.match(/^\w+$/)) cx.marked = "def"; - return cont(enumblock); - } - function mod(type) { - if (type == "name") {cx.marked = "def"; return cont(mod);} - if (type == "{") return cont(pushlex("}"), block, poplex); - return pass(); - } - function iface(type) { - if (type == "name") {cx.marked = "def"; return cont(iface);} - if (content == "<") return cont(typarams, iface); - if (type == "{") return cont(pushlex("}"), block, poplex); - return pass(); - } - function impl(type) { - if (content == "<") return cont(typarams, impl); - if (content == "of" || content == "for") {cx.marked = "keyword"; return cont(rtype, impl);} - if (type == "name") {cx.marked = "def"; return cont(impl);} - if (type == "{") return cont(pushlex("}"), block, poplex); - return pass(); - } - function typarams() { - if (content == ">") return cont(); - if (content == ",") return cont(typarams); - if (content == ":") return cont(rtype, typarams); - return pass(rtype, typarams); - } - function argdef(type) { - if (type == "name") {cx.marked = "def"; return cont(argdef);} - if (type == ":") return cont(typecx, rtype, valcx); - return pass(); - } - function rtype(type) { - if (type == "name") {cx.marked = "variable-3"; return cont(rtypemaybeparam); } - if (content == "mutable") {cx.marked = "keyword"; return cont(rtype);} - if (type == "atom") return cont(rtypemaybeparam); - if (type == "op" || type == "obj") return cont(rtype); - if (type == "fn") return cont(fntype); - if (type == "{") return cont(pushlex("{"), record_of(rtype), poplex); - return matchBrackets(type, rtype); - } - function rtypemaybeparam() { - if (content == "<") return cont(typarams); - return pass(); - } - function fntype(type) { - if (type == "(") return cont(pushlex("("), commasep(rtype, ")"), poplex, fntype); - if (type == "->") return cont(rtype); - return pass(); - } - function pattern(type) { - if (type == "name") {cx.marked = "def"; return cont(patternmaybeop);} - if (type == "atom") return cont(patternmaybeop); - if (type == "op") return cont(pattern); - if (type.match(/[\]\)\};,]/)) return pass(); - return matchBrackets(type, pattern); - } - function patternmaybeop(type) { - if (type == "op" && content == ".") return cont(); - if (content == "to") {cx.marked = "keyword"; return cont(pattern);} - else return pass(); - } - function altbody(type) { - if (type == "{") return cont(pushlex("}", "alt"), altblock1, poplex); - return pass(); - } - function altblock1(type) { - if (type == "}") return cont(); - if (type == "|") return cont(altblock1); - if (content == "when") {cx.marked = "keyword"; return cont(expression, altblock2);} - if (type.match(/[\]\);,]/)) return cont(altblock1); - return pass(pattern, altblock2); - } - function altblock2(type) { - if (type == "{") return cont(pushlex("}", "alt"), block, poplex, altblock1); - else return pass(altblock1); - } - - function macro(type) { - if (type.match(/[\[\(\{]/)) return matchBrackets(type, expression); - return pass(); - } - function matchBrackets(type, comb) { - if (type == "[") return cont(pushlex("]"), commasep(comb, "]"), poplex); - if (type == "(") return cont(pushlex(")"), commasep(comb, ")"), poplex); - if (type == "{") return cont(pushlex("}"), commasep(comb, "}"), poplex); - return cont(); - } - - function parse(state, stream, style) { - var cc = state.cc; - // Communicate our context to the combinators. - // (Less wasteful than consing up a hundred closures on every call.) - cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; - - while (true) { - var combinator = cc.length ? cc.pop() : block; - if (combinator(tcat)) { - while(cc.length && cc[cc.length - 1].lex) - cc.pop()(); - return cx.marked || style; - } - } - } - - return { - startState: function() { - return { - tokenize: tokenBase, - cc: [], - lexical: {indented: -indentUnit, column: 0, type: "top", align: false}, - keywords: valKeywords, - indented: 0 - }; - }, - - token: function(stream, state) { - if (stream.sol()) { - if (!state.lexical.hasOwnProperty("align")) - state.lexical.align = false; - state.indented = stream.indentation(); - } - if (stream.eatSpace()) return null; - tcat = content = null; - var style = state.tokenize(stream, state); - if (style == "comment") return style; - if (!state.lexical.hasOwnProperty("align")) - state.lexical.align = true; - if (tcat == "prefix") return style; - if (!content) content = stream.current(); - return parse(state, stream, style); - }, - - indent: function(state, textAfter) { - if (state.tokenize != tokenBase) return 0; - var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical, - type = lexical.type, closing = firstChar == type; - if (type == "stat") return lexical.indented + indentUnit; - if (lexical.align) return lexical.column + (closing ? 0 : 1); - return lexical.indented + (closing ? 0 : (lexical.info == "alt" ? altIndentUnit : indentUnit)); - }, - - electricChars: "{}", - blockCommentStart: "/*", - blockCommentEnd: "*/", - lineComment: "//", - fold: "brace" - }; -}); - -CodeMirror.defineMIME("text/x-rustsrc", "rust"); diff --git a/plugins/codemirror/codemirror/mode/sass/index.html b/plugins/codemirror/codemirror/mode/sass/index.html deleted file mode 100644 index 66d4677..0000000 --- a/plugins/codemirror/codemirror/mode/sass/index.html +++ /dev/null @@ -1,66 +0,0 @@ - - -CodeMirror: Sass mode - - - - - - - - - - -
    -

    Sass mode

    -
    - - -

    MIME types defined: text/x-sass.

    -
    diff --git a/plugins/codemirror/codemirror/mode/sass/sass.js b/plugins/codemirror/codemirror/mode/sass/sass.js deleted file mode 100644 index 9c9a0da..0000000 --- a/plugins/codemirror/codemirror/mode/sass/sass.js +++ /dev/null @@ -1,330 +0,0 @@ -CodeMirror.defineMode("sass", function(config) { - var tokenRegexp = function(words){ - return new RegExp("^" + words.join("|")); - }; - - var keywords = ["true", "false", "null", "auto"]; - var keywordsRegexp = new RegExp("^" + keywords.join("|")); - - var operators = ["\\(", "\\)", "=", ">", "<", "==", ">=", "<=", "\\+", "-", "\\!=", "/", "\\*", "%", "and", "or", "not"]; - var opRegexp = tokenRegexp(operators); - - var pseudoElementsRegexp = /^::?[\w\-]+/; - - var urlTokens = function(stream, state){ - var ch = stream.peek(); - - if (ch === ")"){ - stream.next(); - state.tokenizer = tokenBase; - return "operator"; - }else if (ch === "("){ - stream.next(); - stream.eatSpace(); - - return "operator"; - }else if (ch === "'" || ch === '"'){ - state.tokenizer = buildStringTokenizer(stream.next()); - return "string"; - }else{ - state.tokenizer = buildStringTokenizer(")", false); - return "string"; - } - }; - var multilineComment = function(stream, state) { - if (stream.skipTo("*/")){ - stream.next(); - stream.next(); - state.tokenizer = tokenBase; - }else { - stream.next(); - } - - return "comment"; - }; - - var buildStringTokenizer = function(quote, greedy){ - if(greedy == null){ greedy = true; } - - function stringTokenizer(stream, state){ - var nextChar = stream.next(); - var peekChar = stream.peek(); - var previousChar = stream.string.charAt(stream.pos-2); - - var endingString = ((nextChar !== "\\" && peekChar === quote) || (nextChar === quote && previousChar !== "\\")); - - /* - console.log("previousChar: " + previousChar); - console.log("nextChar: " + nextChar); - console.log("peekChar: " + peekChar); - console.log("ending: " + endingString); - */ - - if (endingString){ - if (nextChar !== quote && greedy) { stream.next(); } - state.tokenizer = tokenBase; - return "string"; - }else if (nextChar === "#" && peekChar === "{"){ - state.tokenizer = buildInterpolationTokenizer(stringTokenizer); - stream.next(); - return "operator"; - }else { - return "string"; - } - } - - return stringTokenizer; - }; - - var buildInterpolationTokenizer = function(currentTokenizer){ - return function(stream, state){ - if (stream.peek() === "}"){ - stream.next(); - state.tokenizer = currentTokenizer; - return "operator"; - }else{ - return tokenBase(stream, state); - } - }; - }; - - var indent = function(state){ - if (state.indentCount == 0){ - state.indentCount++; - var lastScopeOffset = state.scopes[0].offset; - var currentOffset = lastScopeOffset + config.indentUnit; - state.scopes.unshift({ offset:currentOffset }); - } - }; - - var dedent = function(state){ - if (state.scopes.length == 1) { return; } - - state.scopes.shift(); - }; - - var tokenBase = function(stream, state) { - var ch = stream.peek(); - - // Single line Comment - if (stream.match('//')) { - stream.skipToEnd(); - return "comment"; - } - - // Multiline Comment - if (stream.match('/*')){ - state.tokenizer = multilineComment; - return state.tokenizer(stream, state); - } - - // Interpolation - if (stream.match('#{')){ - state.tokenizer = buildInterpolationTokenizer(tokenBase); - return "operator"; - } - - if (ch === "."){ - stream.next(); - - // Match class selectors - if (stream.match(/^[\w-]+/)){ - indent(state); - return "atom"; - }else if (stream.peek() === "#"){ - indent(state); - return "atom"; - }else{ - return "operator"; - } - } - - if (ch === "#"){ - stream.next(); - - // Hex numbers - if (stream.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/)){ - return "number"; - } - - // ID selectors - if (stream.match(/^[\w-]+/)){ - indent(state); - return "atom"; - } - - if (stream.peek() === "#"){ - indent(state); - return "atom"; - } - } - - // Numbers - if (stream.match(/^-?[0-9\.]+/)){ - return "number"; - } - - // Units - if (stream.match(/^(px|em|in)\b/)){ - return "unit"; - } - - if (stream.match(keywordsRegexp)){ - return "keyword"; - } - - if (stream.match(/^url/) && stream.peek() === "("){ - state.tokenizer = urlTokens; - return "atom"; - } - - // Variables - if (ch === "$"){ - stream.next(); - stream.eatWhile(/[\w-]/); - - if (stream.peek() === ":"){ - stream.next(); - return "variable-2"; - }else{ - return "variable-3"; - } - } - - if (ch === "!"){ - stream.next(); - - if (stream.match(/^[\w]+/)){ - return "keyword"; - } - - return "operator"; - } - - if (ch === "="){ - stream.next(); - - // Match shortcut mixin definition - if (stream.match(/^[\w-]+/)){ - indent(state); - return "meta"; - }else { - return "operator"; - } - } - - if (ch === "+"){ - stream.next(); - - // Match shortcut mixin definition - if (stream.match(/^[\w-]+/)){ - return "variable-3"; - }else { - return "operator"; - } - } - - // Indent Directives - if (stream.match(/^@(else if|if|media|else|for|each|while|mixin|function)/)){ - indent(state); - return "meta"; - } - - // Other Directives - if (ch === "@"){ - stream.next(); - stream.eatWhile(/[\w-]/); - return "meta"; - } - - // Strings - if (ch === '"' || ch === "'"){ - stream.next(); - state.tokenizer = buildStringTokenizer(ch); - return "string"; - } - - // Pseudo element selectors - if (ch == ':' && stream.match(pseudoElementsRegexp)){ - return "keyword"; - } - - // atoms - if (stream.eatWhile(/[\w-&]/)){ - // matches a property definition - if (stream.peek() === ":" && !stream.match(pseudoElementsRegexp, false)) - return "property"; - else - return "atom"; - } - - if (stream.match(opRegexp)){ - return "operator"; - } - - // If we haven't returned by now, we move 1 character - // and return an error - stream.next(); - return null; - }; - - var tokenLexer = function(stream, state) { - if (stream.sol()){ - state.indentCount = 0; - } - var style = state.tokenizer(stream, state); - var current = stream.current(); - - if (current === "@return"){ - dedent(state); - } - - if (style === "atom"){ - indent(state); - } - - if (style !== null){ - var startOfToken = stream.pos - current.length; - var withCurrentIndent = startOfToken + (config.indentUnit * state.indentCount); - - var newScopes = []; - - for (var i = 0; i < state.scopes.length; i++){ - var scope = state.scopes[i]; - - if (scope.offset <= withCurrentIndent){ - newScopes.push(scope); - } - } - - state.scopes = newScopes; - } - - - return style; - }; - - return { - startState: function() { - return { - tokenizer: tokenBase, - scopes: [{offset: 0, type: 'sass'}], - definedVars: [], - definedMixins: [] - }; - }, - token: function(stream, state) { - var style = tokenLexer(stream, state); - - state.lastToken = { style: style, content: stream.current() }; - - return style; - }, - - indent: function(state) { - return state.scopes[0].offset; - } - }; -}); - -CodeMirror.defineMIME("text/x-sass", "sass"); diff --git a/plugins/codemirror/codemirror/mode/scheme/index.html b/plugins/codemirror/codemirror/mode/scheme/index.html deleted file mode 100644 index 164d5da..0000000 --- a/plugins/codemirror/codemirror/mode/scheme/index.html +++ /dev/null @@ -1,77 +0,0 @@ - - -CodeMirror: Scheme mode - - - - - - - - - -
    -

    Scheme mode

    -
    - - -

    MIME types defined: text/x-scheme.

    - -
    diff --git a/plugins/codemirror/codemirror/mode/scheme/scheme.js b/plugins/codemirror/codemirror/mode/scheme/scheme.js deleted file mode 100644 index c5990ae..0000000 --- a/plugins/codemirror/codemirror/mode/scheme/scheme.js +++ /dev/null @@ -1,232 +0,0 @@ -/** - * Author: Koh Zi Han, based on implementation by Koh Zi Chun - */ -CodeMirror.defineMode("scheme", function () { - var BUILTIN = "builtin", COMMENT = "comment", STRING = "string", - ATOM = "atom", NUMBER = "number", BRACKET = "bracket"; - var INDENT_WORD_SKIP = 2; - - function makeKeywords(str) { - var obj = {}, words = str.split(" "); - for (var i = 0; i < words.length; ++i) obj[words[i]] = true; - return obj; - } - - var keywords = makeKeywords("λ case-lambda call/cc class define-class exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt #f floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string=? string>? string? substring symbol->string symbol? #t tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?"); - var indentKeys = makeKeywords("define let letrec let* lambda"); - - function stateStack(indent, type, prev) { // represents a state stack object - this.indent = indent; - this.type = type; - this.prev = prev; - } - - function pushStack(state, indent, type) { - state.indentStack = new stateStack(indent, type, state.indentStack); - } - - function popStack(state) { - state.indentStack = state.indentStack.prev; - } - - var binaryMatcher = new RegExp(/^(?:[-+]i|[-+][01]+#*(?:\/[01]+#*)?i|[-+]?[01]+#*(?:\/[01]+#*)?@[-+]?[01]+#*(?:\/[01]+#*)?|[-+]?[01]+#*(?:\/[01]+#*)?[-+](?:[01]+#*(?:\/[01]+#*)?)?i|[-+]?[01]+#*(?:\/[01]+#*)?)(?=[()\s;"]|$)/i); - var octalMatcher = new RegExp(/^(?:[-+]i|[-+][0-7]+#*(?:\/[0-7]+#*)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?@[-+]?[0-7]+#*(?:\/[0-7]+#*)?|[-+]?[0-7]+#*(?:\/[0-7]+#*)?[-+](?:[0-7]+#*(?:\/[0-7]+#*)?)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?)(?=[()\s;"]|$)/i); - var hexMatcher = new RegExp(/^(?:[-+]i|[-+][\da-f]+#*(?:\/[\da-f]+#*)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?@[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?[-+](?:[\da-f]+#*(?:\/[\da-f]+#*)?)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?)(?=[()\s;"]|$)/i); - var decimalMatcher = new RegExp(/^(?:[-+]i|[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)i|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)@[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)?i|(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*))(?=[()\s;"]|$)/i); - - function isBinaryNumber (stream) { - return stream.match(binaryMatcher); - } - - function isOctalNumber (stream) { - return stream.match(octalMatcher); - } - - function isDecimalNumber (stream, backup) { - if (backup === true) { - stream.backUp(1); - } - return stream.match(decimalMatcher); - } - - function isHexNumber (stream) { - return stream.match(hexMatcher); - } - - return { - startState: function () { - return { - indentStack: null, - indentation: 0, - mode: false, - sExprComment: false - }; - }, - - token: function (stream, state) { - if (state.indentStack == null && stream.sol()) { - // update indentation, but only if indentStack is empty - state.indentation = stream.indentation(); - } - - // skip spaces - if (stream.eatSpace()) { - return null; - } - var returnType = null; - - switch(state.mode){ - case "string": // multi-line string parsing mode - var next, escaped = false; - while ((next = stream.next()) != null) { - if (next == "\"" && !escaped) { - - state.mode = false; - break; - } - escaped = !escaped && next == "\\"; - } - returnType = STRING; // continue on in scheme-string mode - break; - case "comment": // comment parsing mode - var next, maybeEnd = false; - while ((next = stream.next()) != null) { - if (next == "#" && maybeEnd) { - - state.mode = false; - break; - } - maybeEnd = (next == "|"); - } - returnType = COMMENT; - break; - case "s-expr-comment": // s-expr commenting mode - state.mode = false; - if(stream.peek() == "(" || stream.peek() == "["){ - // actually start scheme s-expr commenting mode - state.sExprComment = 0; - }else{ - // if not we just comment the entire of the next token - stream.eatWhile(/[^/s]/); // eat non spaces - returnType = COMMENT; - break; - } - default: // default parsing mode - var ch = stream.next(); - - if (ch == "\"") { - state.mode = "string"; - returnType = STRING; - - } else if (ch == "'") { - returnType = ATOM; - } else if (ch == '#') { - if (stream.eat("|")) { // Multi-line comment - state.mode = "comment"; // toggle to comment mode - returnType = COMMENT; - } else if (stream.eat(/[tf]/i)) { // #t/#f (atom) - returnType = ATOM; - } else if (stream.eat(';')) { // S-Expr comment - state.mode = "s-expr-comment"; - returnType = COMMENT; - } else { - var numTest = null, hasExactness = false, hasRadix = true; - if (stream.eat(/[ei]/i)) { - hasExactness = true; - } else { - stream.backUp(1); // must be radix specifier - } - if (stream.match(/^#b/i)) { - numTest = isBinaryNumber; - } else if (stream.match(/^#o/i)) { - numTest = isOctalNumber; - } else if (stream.match(/^#x/i)) { - numTest = isHexNumber; - } else if (stream.match(/^#d/i)) { - numTest = isDecimalNumber; - } else if (stream.match(/^[-+0-9.]/, false)) { - hasRadix = false; - numTest = isDecimalNumber; - // re-consume the intial # if all matches failed - } else if (!hasExactness) { - stream.eat('#'); - } - if (numTest != null) { - if (hasRadix && !hasExactness) { - // consume optional exactness after radix - stream.match(/^#[ei]/i); - } - if (numTest(stream)) - returnType = NUMBER; - } - } - } else if (/^[-+0-9.]/.test(ch) && isDecimalNumber(stream, true)) { // match non-prefixed number, must be decimal - returnType = NUMBER; - } else if (ch == ";") { // comment - stream.skipToEnd(); // rest of the line is a comment - returnType = COMMENT; - } else if (ch == "(" || ch == "[") { - var keyWord = ''; var indentTemp = stream.column(), letter; - /** - Either - (indent-word .. - (non-indent-word .. - (;something else, bracket, etc. - */ - - while ((letter = stream.eat(/[^\s\(\[\;\)\]]/)) != null) { - keyWord += letter; - } - - if (keyWord.length > 0 && indentKeys.propertyIsEnumerable(keyWord)) { // indent-word - - pushStack(state, indentTemp + INDENT_WORD_SKIP, ch); - } else { // non-indent word - // we continue eating the spaces - stream.eatSpace(); - if (stream.eol() || stream.peek() == ";") { - // nothing significant after - // we restart indentation 1 space after - pushStack(state, indentTemp + 1, ch); - } else { - pushStack(state, indentTemp + stream.current().length, ch); // else we match - } - } - stream.backUp(stream.current().length - 1); // undo all the eating - - if(typeof state.sExprComment == "number") state.sExprComment++; - - returnType = BRACKET; - } else if (ch == ")" || ch == "]") { - returnType = BRACKET; - if (state.indentStack != null && state.indentStack.type == (ch == ")" ? "(" : "[")) { - popStack(state); - - if(typeof state.sExprComment == "number"){ - if(--state.sExprComment == 0){ - returnType = COMMENT; // final closing bracket - state.sExprComment = false; // turn off s-expr commenting mode - } - } - } - } else { - stream.eatWhile(/[\w\$_\-!$%&*+\.\/:<=>?@\^~]/); - - if (keywords && keywords.propertyIsEnumerable(stream.current())) { - returnType = BUILTIN; - } else returnType = "variable"; - } - } - return (typeof state.sExprComment == "number") ? COMMENT : returnType; - }, - - indent: function (state) { - if (state.indentStack == null) return state.indentation; - return state.indentStack.indent; - }, - - lineComment: ";;" - }; -}); - -CodeMirror.defineMIME("text/x-scheme", "scheme"); diff --git a/plugins/codemirror/codemirror/mode/shell/index.html b/plugins/codemirror/codemirror/mode/shell/index.html deleted file mode 100644 index cf415e8..0000000 --- a/plugins/codemirror/codemirror/mode/shell/index.html +++ /dev/null @@ -1,66 +0,0 @@ - - -CodeMirror: Shell mode - - - - - - - - - - -
    -

    Shell mode

    - - - - - - -

    MIME types defined: text/x-sh.

    -
    diff --git a/plugins/codemirror/codemirror/mode/shell/shell.js b/plugins/codemirror/codemirror/mode/shell/shell.js deleted file mode 100644 index abfd214..0000000 --- a/plugins/codemirror/codemirror/mode/shell/shell.js +++ /dev/null @@ -1,118 +0,0 @@ -CodeMirror.defineMode('shell', function() { - - var words = {}; - function define(style, string) { - var split = string.split(' '); - for(var i = 0; i < split.length; i++) { - words[split[i]] = style; - } - }; - - // Atoms - define('atom', 'true false'); - - // Keywords - define('keyword', 'if then do else elif while until for in esac fi fin ' + - 'fil done exit set unset export function'); - - // Commands - define('builtin', 'ab awk bash beep cat cc cd chown chmod chroot clear cp ' + - 'curl cut diff echo find gawk gcc get git grep kill killall ln ls make ' + - 'mkdir openssl mv nc node npm ping ps restart rm rmdir sed service sh ' + - 'shopt shred source sort sleep ssh start stop su sudo tee telnet top ' + - 'touch vi vim wall wc wget who write yes zsh'); - - function tokenBase(stream, state) { - - var sol = stream.sol(); - var ch = stream.next(); - - if (ch === '\'' || ch === '"' || ch === '`') { - state.tokens.unshift(tokenString(ch)); - return tokenize(stream, state); - } - if (ch === '#') { - if (sol && stream.eat('!')) { - stream.skipToEnd(); - return 'meta'; // 'comment'? - } - stream.skipToEnd(); - return 'comment'; - } - if (ch === '$') { - state.tokens.unshift(tokenDollar); - return tokenize(stream, state); - } - if (ch === '+' || ch === '=') { - return 'operator'; - } - if (ch === '-') { - stream.eat('-'); - stream.eatWhile(/\w/); - return 'attribute'; - } - if (/\d/.test(ch)) { - stream.eatWhile(/\d/); - if(!/\w/.test(stream.peek())) { - return 'number'; - } - } - stream.eatWhile(/[\w-]/); - var cur = stream.current(); - if (stream.peek() === '=' && /\w+/.test(cur)) return 'def'; - return words.hasOwnProperty(cur) ? words[cur] : null; - } - - function tokenString(quote) { - return function(stream, state) { - var next, end = false, escaped = false; - while ((next = stream.next()) != null) { - if (next === quote && !escaped) { - end = true; - break; - } - if (next === '$' && !escaped && quote !== '\'') { - escaped = true; - stream.backUp(1); - state.tokens.unshift(tokenDollar); - break; - } - escaped = !escaped && next === '\\'; - } - if (end || !escaped) { - state.tokens.shift(); - } - return (quote === '`' || quote === ')' ? 'quote' : 'string'); - }; - }; - - var tokenDollar = function(stream, state) { - if (state.tokens.length > 1) stream.eat('$'); - var ch = stream.next(), hungry = /\w/; - if (ch === '{') hungry = /[^}]/; - if (ch === '(') { - state.tokens[0] = tokenString(')'); - return tokenize(stream, state); - } - if (!/\d/.test(ch)) { - stream.eatWhile(hungry); - stream.eat('}'); - } - state.tokens.shift(); - return 'def'; - }; - - function tokenize(stream, state) { - return (state.tokens[0] || tokenBase) (stream, state); - }; - - return { - startState: function() {return {tokens:[]};}, - token: function(stream, state) { - if (stream.eatSpace()) return null; - return tokenize(stream, state); - } - }; -}); - -CodeMirror.defineMIME('text/x-sh', 'shell'); diff --git a/plugins/codemirror/codemirror/mode/sieve/index.html b/plugins/codemirror/codemirror/mode/sieve/index.html deleted file mode 100644 index 9d814a9..0000000 --- a/plugins/codemirror/codemirror/mode/sieve/index.html +++ /dev/null @@ -1,93 +0,0 @@ - - -CodeMirror: Sieve (RFC5228) mode - - - - - - - - - -
    -

    Sieve (RFC5228) mode

    -
    - - -

    MIME types defined: application/sieve.

    - -
    diff --git a/plugins/codemirror/codemirror/mode/sieve/sieve.js b/plugins/codemirror/codemirror/mode/sieve/sieve.js deleted file mode 100644 index 8ca2a4c..0000000 --- a/plugins/codemirror/codemirror/mode/sieve/sieve.js +++ /dev/null @@ -1,183 +0,0 @@ -/* - * See LICENSE in this directory for the license under which this code - * is released. - */ - -CodeMirror.defineMode("sieve", function(config) { - function words(str) { - var obj = {}, words = str.split(" "); - for (var i = 0; i < words.length; ++i) obj[words[i]] = true; - return obj; - } - - var keywords = words("if elsif else stop require"); - var atoms = words("true false not"); - var indentUnit = config.indentUnit; - - function tokenBase(stream, state) { - - var ch = stream.next(); - if (ch == "/" && stream.eat("*")) { - state.tokenize = tokenCComment; - return tokenCComment(stream, state); - } - - if (ch === '#') { - stream.skipToEnd(); - return "comment"; - } - - if (ch == "\"") { - state.tokenize = tokenString(ch); - return state.tokenize(stream, state); - } - - if (ch == "(") { - state._indent.push("("); - // add virtual angel wings so that editor behaves... - // ...more sane incase of broken brackets - state._indent.push("{"); - return null; - } - - if (ch === "{") { - state._indent.push("{"); - return null; - } - - if (ch == ")") { - state._indent.pop(); - state._indent.pop(); - } - - if (ch === "}") { - state._indent.pop(); - return null; - } - - if (ch == ",") - return null; - - if (ch == ";") - return null; - - - if (/[{}\(\),;]/.test(ch)) - return null; - - // 1*DIGIT "K" / "M" / "G" - if (/\d/.test(ch)) { - stream.eatWhile(/[\d]/); - stream.eat(/[KkMmGg]/); - return "number"; - } - - // ":" (ALPHA / "_") *(ALPHA / DIGIT / "_") - if (ch == ":") { - stream.eatWhile(/[a-zA-Z_]/); - stream.eatWhile(/[a-zA-Z0-9_]/); - - return "operator"; - } - - stream.eatWhile(/\w/); - var cur = stream.current(); - - // "text:" *(SP / HTAB) (hash-comment / CRLF) - // *(multiline-literal / multiline-dotstart) - // "." CRLF - if ((cur == "text") && stream.eat(":")) - { - state.tokenize = tokenMultiLineString; - return "string"; - } - - if (keywords.propertyIsEnumerable(cur)) - return "keyword"; - - if (atoms.propertyIsEnumerable(cur)) - return "atom"; - - return null; - } - - function tokenMultiLineString(stream, state) - { - state._multiLineString = true; - // the first line is special it may contain a comment - if (!stream.sol()) { - stream.eatSpace(); - - if (stream.peek() == "#") { - stream.skipToEnd(); - return "comment"; - } - - stream.skipToEnd(); - return "string"; - } - - if ((stream.next() == ".") && (stream.eol())) - { - state._multiLineString = false; - state.tokenize = tokenBase; - } - - return "string"; - } - - function tokenCComment(stream, state) { - var maybeEnd = false, ch; - while ((ch = stream.next()) != null) { - if (maybeEnd && ch == "/") { - state.tokenize = tokenBase; - break; - } - maybeEnd = (ch == "*"); - } - return "comment"; - } - - function tokenString(quote) { - return function(stream, state) { - var escaped = false, ch; - while ((ch = stream.next()) != null) { - if (ch == quote && !escaped) - break; - escaped = !escaped && ch == "\\"; - } - if (!escaped) state.tokenize = tokenBase; - return "string"; - }; - } - - return { - startState: function(base) { - return {tokenize: tokenBase, - baseIndent: base || 0, - _indent: []}; - }, - - token: function(stream, state) { - if (stream.eatSpace()) - return null; - - return (state.tokenize || tokenBase)(stream, state);; - }, - - indent: function(state, _textAfter) { - var length = state._indent.length; - if (_textAfter && (_textAfter[0] == "}")) - length--; - - if (length <0) - length = 0; - - return length * indentUnit; - }, - - electricChars: "}" - }; -}); - -CodeMirror.defineMIME("application/sieve", "sieve"); diff --git a/plugins/codemirror/codemirror/mode/smalltalk/index.html b/plugins/codemirror/codemirror/mode/smalltalk/index.html deleted file mode 100644 index 0d2b172..0000000 --- a/plugins/codemirror/codemirror/mode/smalltalk/index.html +++ /dev/null @@ -1,68 +0,0 @@ - - -CodeMirror: Smalltalk mode - - - - - - - - - - -
    -

    Smalltalk mode

    -
    - - - -

    Simple Smalltalk mode.

    - -

    MIME types defined: text/x-stsrc.

    -
    diff --git a/plugins/codemirror/codemirror/mode/smalltalk/smalltalk.js b/plugins/codemirror/codemirror/mode/smalltalk/smalltalk.js deleted file mode 100644 index f2d4cb3..0000000 --- a/plugins/codemirror/codemirror/mode/smalltalk/smalltalk.js +++ /dev/null @@ -1,151 +0,0 @@ -CodeMirror.defineMode('smalltalk', function(config) { - - var specialChars = /[+\-\/\\*~<>=@%|&?!.,:;^]/; - var keywords = /true|false|nil|self|super|thisContext/; - - var Context = function(tokenizer, parent) { - this.next = tokenizer; - this.parent = parent; - }; - - var Token = function(name, context, eos) { - this.name = name; - this.context = context; - this.eos = eos; - }; - - var State = function() { - this.context = new Context(next, null); - this.expectVariable = true; - this.indentation = 0; - this.userIndentationDelta = 0; - }; - - State.prototype.userIndent = function(indentation) { - this.userIndentationDelta = indentation > 0 ? (indentation / config.indentUnit - this.indentation) : 0; - }; - - var next = function(stream, context, state) { - var token = new Token(null, context, false); - var aChar = stream.next(); - - if (aChar === '"') { - token = nextComment(stream, new Context(nextComment, context)); - - } else if (aChar === '\'') { - token = nextString(stream, new Context(nextString, context)); - - } else if (aChar === '#') { - if (stream.peek() === '\'') { - stream.next(); - token = nextSymbol(stream, new Context(nextSymbol, context)); - } else { - stream.eatWhile(/[^ .\[\]()]/); - token.name = 'string-2'; - } - - } else if (aChar === '$') { - if (stream.next() === '<') { - stream.eatWhile(/[^ >]/); - stream.next(); - } - token.name = 'string-2'; - - } else if (aChar === '|' && state.expectVariable) { - token.context = new Context(nextTemporaries, context); - - } else if (/[\[\]{}()]/.test(aChar)) { - token.name = 'bracket'; - token.eos = /[\[{(]/.test(aChar); - - if (aChar === '[') { - state.indentation++; - } else if (aChar === ']') { - state.indentation = Math.max(0, state.indentation - 1); - } - - } else if (specialChars.test(aChar)) { - stream.eatWhile(specialChars); - token.name = 'operator'; - token.eos = aChar !== ';'; // ; cascaded message expression - - } else if (/\d/.test(aChar)) { - stream.eatWhile(/[\w\d]/); - token.name = 'number'; - - } else if (/[\w_]/.test(aChar)) { - stream.eatWhile(/[\w\d_]/); - token.name = state.expectVariable ? (keywords.test(stream.current()) ? 'keyword' : 'variable') : null; - - } else { - token.eos = state.expectVariable; - } - - return token; - }; - - var nextComment = function(stream, context) { - stream.eatWhile(/[^"]/); - return new Token('comment', stream.eat('"') ? context.parent : context, true); - }; - - var nextString = function(stream, context) { - stream.eatWhile(/[^']/); - return new Token('string', stream.eat('\'') ? context.parent : context, false); - }; - - var nextSymbol = function(stream, context) { - stream.eatWhile(/[^']/); - return new Token('string-2', stream.eat('\'') ? context.parent : context, false); - }; - - var nextTemporaries = function(stream, context) { - var token = new Token(null, context, false); - var aChar = stream.next(); - - if (aChar === '|') { - token.context = context.parent; - token.eos = true; - - } else { - stream.eatWhile(/[^|]/); - token.name = 'variable'; - } - - return token; - }; - - return { - startState: function() { - return new State; - }, - - token: function(stream, state) { - state.userIndent(stream.indentation()); - - if (stream.eatSpace()) { - return null; - } - - var token = state.context.next(stream, state.context, state); - state.context = token.context; - state.expectVariable = token.eos; - - return token.name; - }, - - blankLine: function(state) { - state.userIndent(0); - }, - - indent: function(state, textAfter) { - var i = state.context.next === next && textAfter && textAfter.charAt(0) === ']' ? -1 : state.userIndentationDelta; - return (state.indentation + i) * config.indentUnit; - }, - - electricChars: ']' - }; - -}); - -CodeMirror.defineMIME('text/x-stsrc', {name: 'smalltalk'}); diff --git a/plugins/codemirror/codemirror/mode/smarty/index.html b/plugins/codemirror/codemirror/mode/smarty/index.html deleted file mode 100644 index d36e745..0000000 --- a/plugins/codemirror/codemirror/mode/smarty/index.html +++ /dev/null @@ -1,136 +0,0 @@ - - -CodeMirror: Smarty mode - - - - - - - - - -
    -

    Smarty mode

    -
    - - - -
    - -

    Smarty 2, custom delimiters

    -
    - - - -
    - -

    Smarty 3

    - - - - - - -

    A plain text/Smarty version 2 or 3 mode, which allows for custom delimiter tags.

    - -

    MIME types defined: text/x-smarty

    -
    diff --git a/plugins/codemirror/codemirror/mode/smarty/smarty.js b/plugins/codemirror/codemirror/mode/smarty/smarty.js deleted file mode 100644 index 826c2b9..0000000 --- a/plugins/codemirror/codemirror/mode/smarty/smarty.js +++ /dev/null @@ -1,205 +0,0 @@ -/** - * Smarty 2 and 3 mode. - */ -CodeMirror.defineMode("smarty", function(config) { - "use strict"; - - // our default settings; check to see if they're overridden - var settings = { - rightDelimiter: '}', - leftDelimiter: '{', - smartyVersion: 2 // for backward compatibility - }; - if (config.hasOwnProperty("leftDelimiter")) { - settings.leftDelimiter = config.leftDelimiter; - } - if (config.hasOwnProperty("rightDelimiter")) { - settings.rightDelimiter = config.rightDelimiter; - } - if (config.hasOwnProperty("smartyVersion") && config.smartyVersion === 3) { - settings.smartyVersion = 3; - } - - var keyFunctions = ["debug", "extends", "function", "include", "literal"]; - var last; - var regs = { - operatorChars: /[+\-*&%=<>!?]/, - validIdentifier: /[a-zA-Z0-9_]/, - stringChar: /['"]/ - }; - - var helpers = { - cont: function(style, lastType) { - last = lastType; - return style; - }, - chain: function(stream, state, parser) { - state.tokenize = parser; - return parser(stream, state); - } - }; - - - // our various parsers - var parsers = { - - // the main tokenizer - tokenizer: function(stream, state) { - if (stream.match(settings.leftDelimiter, true)) { - if (stream.eat("*")) { - return helpers.chain(stream, state, parsers.inBlock("comment", "*" + settings.rightDelimiter)); - } else { - // Smarty 3 allows { and } surrounded by whitespace to NOT slip into Smarty mode - state.depth++; - var isEol = stream.eol(); - var isFollowedByWhitespace = /\s/.test(stream.peek()); - if (settings.smartyVersion === 3 && settings.leftDelimiter === "{" && (isEol || isFollowedByWhitespace)) { - state.depth--; - return null; - } else { - state.tokenize = parsers.smarty; - last = "startTag"; - return "tag"; - } - } - } else { - stream.next(); - return null; - } - }, - - // parsing Smarty content - smarty: function(stream, state) { - if (stream.match(settings.rightDelimiter, true)) { - if (settings.smartyVersion === 3) { - state.depth--; - if (state.depth <= 0) { - state.tokenize = parsers.tokenizer; - } - } else { - state.tokenize = parsers.tokenizer; - } - return helpers.cont("tag", null); - } - - if (stream.match(settings.leftDelimiter, true)) { - state.depth++; - return helpers.cont("tag", "startTag"); - } - - var ch = stream.next(); - if (ch == "$") { - stream.eatWhile(regs.validIdentifier); - return helpers.cont("variable-2", "variable"); - } else if (ch == "|") { - return helpers.cont("operator", "pipe"); - } else if (ch == ".") { - return helpers.cont("operator", "property"); - } else if (regs.stringChar.test(ch)) { - state.tokenize = parsers.inAttribute(ch); - return helpers.cont("string", "string"); - } else if (regs.operatorChars.test(ch)) { - stream.eatWhile(regs.operatorChars); - return helpers.cont("operator", "operator"); - } else if (ch == "[" || ch == "]") { - return helpers.cont("bracket", "bracket"); - } else if (ch == "(" || ch == ")") { - return helpers.cont("bracket", "operator"); - } else if (/\d/.test(ch)) { - stream.eatWhile(/\d/); - return helpers.cont("number", "number"); - } else { - - if (state.last == "variable") { - if (ch == "@") { - stream.eatWhile(regs.validIdentifier); - return helpers.cont("property", "property"); - } else if (ch == "|") { - stream.eatWhile(regs.validIdentifier); - return helpers.cont("qualifier", "modifier"); - } - } else if (state.last == "pipe") { - stream.eatWhile(regs.validIdentifier); - return helpers.cont("qualifier", "modifier"); - } else if (state.last == "whitespace") { - stream.eatWhile(regs.validIdentifier); - return helpers.cont("attribute", "modifier"); - } if (state.last == "property") { - stream.eatWhile(regs.validIdentifier); - return helpers.cont("property", null); - } else if (/\s/.test(ch)) { - last = "whitespace"; - return null; - } - - var str = ""; - if (ch != "/") { - str += ch; - } - var c = null; - while (c = stream.eat(regs.validIdentifier)) { - str += c; - } - for (var i=0, j=keyFunctions.length; i - -CodeMirror: Smarty mixed mode - - - - - - - - - - - - - -
    -

    Smarty mixed mode

    -
    - - - -

    The Smarty mixed mode depends on the Smarty and HTML mixed modes. HTML - mixed mode itself depends on XML, JavaScript, and CSS modes.

    - -

    It takes the same options, as Smarty and HTML mixed modes.

    - -

    MIME types defined: text/x-smarty.

    -
    diff --git a/plugins/codemirror/codemirror/mode/smartymixed/smartymixed.js b/plugins/codemirror/codemirror/mode/smartymixed/smartymixed.js deleted file mode 100644 index a033ab0..0000000 --- a/plugins/codemirror/codemirror/mode/smartymixed/smartymixed.js +++ /dev/null @@ -1,175 +0,0 @@ -/** -* @file smartymixed.js -* @brief Smarty Mixed Codemirror mode (Smarty + Mixed HTML) -* @author Ruslan Osmanov -* @version 3.0 -* @date 05.07.2013 -*/ -CodeMirror.defineMode("smartymixed", function(config) { - var settings, regs, helpers, parsers, - htmlMixedMode = CodeMirror.getMode(config, "htmlmixed"), - smartyMode = CodeMirror.getMode(config, "smarty"), - - settings = { - rightDelimiter: '}', - leftDelimiter: '{' - }; - - if (config.hasOwnProperty("leftDelimiter")) { - settings.leftDelimiter = config.leftDelimiter; - } - if (config.hasOwnProperty("rightDelimiter")) { - settings.rightDelimiter = config.rightDelimiter; - } - - regs = { - smartyComment: new RegExp("^" + settings.leftDelimiter + "\\*"), - literalOpen: new RegExp(settings.leftDelimiter + "literal" + settings.rightDelimiter), - literalClose: new RegExp(settings.leftDelimiter + "\/literal" + settings.rightDelimiter), - hasLeftDelimeter: new RegExp(".*" + settings.leftDelimiter), - htmlHasLeftDelimeter: new RegExp("[^<>]*" + settings.leftDelimiter) - }; - - helpers = { - chain: function(stream, state, parser) { - state.tokenize = parser; - return parser(stream, state); - }, - - cleanChain: function(stream, state, parser) { - state.tokenize = null; - state.localState = null; - state.localMode = null; - return (typeof parser == "string") ? (parser ? parser : null) : parser(stream, state); - }, - - maybeBackup: function(stream, pat, style) { - var cur = stream.current(); - var close = cur.search(pat), - m; - if (close > - 1) stream.backUp(cur.length - close); - else if (m = cur.match(/<\/?$/)) { - stream.backUp(cur.length); - if (!stream.match(pat, false)) stream.match(cur[0]); - } - return style; - } - }; - - parsers = { - html: function(stream, state) { - if (!state.inLiteral && stream.match(regs.htmlHasLeftDelimeter, false) && state.htmlMixedState.htmlState.tagName === null) { - state.tokenize = parsers.smarty; - state.localMode = smartyMode; - state.localState = smartyMode.startState(htmlMixedMode.indent(state.htmlMixedState, "")); - return helpers.maybeBackup(stream, settings.leftDelimiter, smartyMode.token(stream, state.localState)); - } else if (!state.inLiteral && stream.match(settings.leftDelimiter, false)) { - state.tokenize = parsers.smarty; - state.localMode = smartyMode; - state.localState = smartyMode.startState(htmlMixedMode.indent(state.htmlMixedState, "")); - return helpers.maybeBackup(stream, settings.leftDelimiter, smartyMode.token(stream, state.localState)); - } - return htmlMixedMode.token(stream, state.htmlMixedState); - }, - - smarty: function(stream, state) { - if (stream.match(settings.leftDelimiter, false)) { - if (stream.match(regs.smartyComment, false)) { - return helpers.chain(stream, state, parsers.inBlock("comment", "*" + settings.rightDelimiter)); - } - } else if (stream.match(settings.rightDelimiter, false)) { - stream.eat(settings.rightDelimiter); - state.tokenize = parsers.html; - state.localMode = htmlMixedMode; - state.localState = state.htmlMixedState; - return "tag"; - } - - return helpers.maybeBackup(stream, settings.rightDelimiter, smartyMode.token(stream, state.localState)); - }, - - inBlock: function(style, terminator) { - return function(stream, state) { - while (!stream.eol()) { - if (stream.match(terminator)) { - helpers.cleanChain(stream, state, ""); - break; - } - stream.next(); - } - return style; - }; - } - }; - - return { - startState: function() { - var state = htmlMixedMode.startState(); - return { - token: parsers.html, - localMode: null, - localState: null, - htmlMixedState: state, - tokenize: null, - inLiteral: false - }; - }, - - copyState: function(state) { - var local = null, tok = (state.tokenize || state.token); - if (state.localState) { - local = CodeMirror.copyState((tok != parsers.html ? smartyMode : htmlMixedMode), state.localState); - } - return { - token: state.token, - tokenize: state.tokenize, - localMode: state.localMode, - localState: local, - htmlMixedState: CodeMirror.copyState(htmlMixedMode, state.htmlMixedState), - inLiteral: state.inLiteral - }; - }, - - token: function(stream, state) { - if (stream.match(settings.leftDelimiter, false)) { - if (!state.inLiteral && stream.match(regs.literalOpen, true)) { - state.inLiteral = true; - return "keyword"; - } else if (state.inLiteral && stream.match(regs.literalClose, true)) { - state.inLiteral = false; - return "keyword"; - } - } - if (state.inLiteral && state.localState != state.htmlMixedState) { - state.tokenize = parsers.html; - state.localMode = htmlMixedMode; - state.localState = state.htmlMixedState; - } - - var style = (state.tokenize || state.token)(stream, state); - return style; - }, - - indent: function(state, textAfter) { - if (state.localMode == smartyMode - || (state.inLiteral && !state.localMode) - || regs.hasLeftDelimeter.test(textAfter)) { - return CodeMirror.Pass; - } - return htmlMixedMode.indent(state.htmlMixedState, textAfter); - }, - - electricChars: "/{}:", - - innerMode: function(state) { - return { - state: state.localState || state.htmlMixedState, - mode: state.localMode || htmlMixedMode - }; - } - }; -}, -"htmlmixed"); - -CodeMirror.defineMIME("text/x-smarty", "smartymixed"); -// vim: et ts=2 sts=2 sw=2 diff --git a/plugins/codemirror/codemirror/mode/sparql/index.html b/plugins/codemirror/codemirror/mode/sparql/index.html deleted file mode 100644 index 7c41e17..0000000 --- a/plugins/codemirror/codemirror/mode/sparql/index.html +++ /dev/null @@ -1,54 +0,0 @@ - - -CodeMirror: SPARQL mode - - - - - - - - - - -
    -

    SPARQL mode

    -
    - - -

    MIME types defined: application/x-sparql-query.

    - -
    diff --git a/plugins/codemirror/codemirror/mode/sparql/sparql.js b/plugins/codemirror/codemirror/mode/sparql/sparql.js deleted file mode 100644 index 0329057..0000000 --- a/plugins/codemirror/codemirror/mode/sparql/sparql.js +++ /dev/null @@ -1,145 +0,0 @@ -CodeMirror.defineMode("sparql", function(config) { - var indentUnit = config.indentUnit; - var curPunc; - - function wordRegexp(words) { - return new RegExp("^(?:" + words.join("|") + ")$", "i"); - } - var ops = wordRegexp(["str", "lang", "langmatches", "datatype", "bound", "sameterm", "isiri", "isuri", - "isblank", "isliteral", "a"]); - var keywords = wordRegexp(["base", "prefix", "select", "distinct", "reduced", "construct", "describe", - "ask", "from", "named", "where", "order", "limit", "offset", "filter", "optional", - "graph", "by", "asc", "desc", "as", "having", "undef", "values", "group", - "minus", "in", "not", "service", "silent", "using", "insert", "delete", "union", - "data", "copy", "to", "move", "add", "create", "drop", "clear", "load"]); - var operatorChars = /[*+\-<>=&|]/; - - function tokenBase(stream, state) { - var ch = stream.next(); - curPunc = null; - if (ch == "$" || ch == "?") { - stream.match(/^[\w\d]*/); - return "variable-2"; - } - else if (ch == "<" && !stream.match(/^[\s\u00a0=]/, false)) { - stream.match(/^[^\s\u00a0>]*>?/); - return "atom"; - } - else if (ch == "\"" || ch == "'") { - state.tokenize = tokenLiteral(ch); - return state.tokenize(stream, state); - } - else if (/[{}\(\),\.;\[\]]/.test(ch)) { - curPunc = ch; - return null; - } - else if (ch == "#") { - stream.skipToEnd(); - return "comment"; - } - else if (operatorChars.test(ch)) { - stream.eatWhile(operatorChars); - return null; - } - else if (ch == ":") { - stream.eatWhile(/[\w\d\._\-]/); - return "atom"; - } - else { - stream.eatWhile(/[_\w\d]/); - if (stream.eat(":")) { - stream.eatWhile(/[\w\d_\-]/); - return "atom"; - } - var word = stream.current(); - if (ops.test(word)) - return null; - else if (keywords.test(word)) - return "keyword"; - else - return "variable"; - } - } - - function tokenLiteral(quote) { - return function(stream, state) { - var escaped = false, ch; - while ((ch = stream.next()) != null) { - if (ch == quote && !escaped) { - state.tokenize = tokenBase; - break; - } - escaped = !escaped && ch == "\\"; - } - return "string"; - }; - } - - function pushContext(state, type, col) { - state.context = {prev: state.context, indent: state.indent, col: col, type: type}; - } - function popContext(state) { - state.indent = state.context.indent; - state.context = state.context.prev; - } - - return { - startState: function() { - return {tokenize: tokenBase, - context: null, - indent: 0, - col: 0}; - }, - - token: function(stream, state) { - if (stream.sol()) { - if (state.context && state.context.align == null) state.context.align = false; - state.indent = stream.indentation(); - } - if (stream.eatSpace()) return null; - var style = state.tokenize(stream, state); - - if (style != "comment" && state.context && state.context.align == null && state.context.type != "pattern") { - state.context.align = true; - } - - if (curPunc == "(") pushContext(state, ")", stream.column()); - else if (curPunc == "[") pushContext(state, "]", stream.column()); - else if (curPunc == "{") pushContext(state, "}", stream.column()); - else if (/[\]\}\)]/.test(curPunc)) { - while (state.context && state.context.type == "pattern") popContext(state); - if (state.context && curPunc == state.context.type) popContext(state); - } - else if (curPunc == "." && state.context && state.context.type == "pattern") popContext(state); - else if (/atom|string|variable/.test(style) && state.context) { - if (/[\}\]]/.test(state.context.type)) - pushContext(state, "pattern", stream.column()); - else if (state.context.type == "pattern" && !state.context.align) { - state.context.align = true; - state.context.col = stream.column(); - } - } - - return style; - }, - - indent: function(state, textAfter) { - var firstChar = textAfter && textAfter.charAt(0); - var context = state.context; - if (/[\]\}]/.test(firstChar)) - while (context && context.type == "pattern") context = context.prev; - - var closing = context && firstChar == context.type; - if (!context) - return 0; - else if (context.type == "pattern") - return context.col; - else if (context.align) - return context.col + (closing ? 0 : 1); - else - return context.indent + (closing ? 0 : indentUnit); - } - }; -}); - -CodeMirror.defineMIME("application/x-sparql-query", "sparql"); diff --git a/plugins/codemirror/codemirror/mode/sql/index.html b/plugins/codemirror/codemirror/mode/sql/index.html deleted file mode 100644 index e6882d7..0000000 --- a/plugins/codemirror/codemirror/mode/sql/index.html +++ /dev/null @@ -1,75 +0,0 @@ - - -CodeMirror: SQL Mode for CodeMirror - - - - - - - - - -
    -

    SQL Mode for CodeMirror

    -
    - -
    -

    MIME types defined: - text/x-sql, - text/x-mysql, - text/x-mariadb, - text/x-cassandra, - text/x-plsql, - text/x-mssql. -

    - - -
    diff --git a/plugins/codemirror/codemirror/mode/sql/sql.js b/plugins/codemirror/codemirror/mode/sql/sql.js deleted file mode 100644 index 3be68ca..0000000 --- a/plugins/codemirror/codemirror/mode/sql/sql.js +++ /dev/null @@ -1,365 +0,0 @@ -CodeMirror.defineMode("sql", function(config, parserConfig) { - "use strict"; - - var client = parserConfig.client || {}, - atoms = parserConfig.atoms || {"false": true, "true": true, "null": true}, - builtin = parserConfig.builtin || {}, - keywords = parserConfig.keywords || {}, - operatorChars = parserConfig.operatorChars || /^[*+\-%<>!=&|~^]/, - support = parserConfig.support || {}, - hooks = parserConfig.hooks || {}, - dateSQL = parserConfig.dateSQL || {"date" : true, "time" : true, "timestamp" : true}; - - function tokenBase(stream, state) { - var ch = stream.next(); - - // call hooks from the mime type - if (hooks[ch]) { - var result = hooks[ch](stream, state); - if (result !== false) return result; - } - - if (support.hexNumber == true && - ((ch == "0" && stream.match(/^[xX][0-9a-fA-F]+/)) - || (ch == "x" || ch == "X") && stream.match(/^'[0-9a-fA-F]+'/))) { - // hex - // ref: http://dev.mysql.com/doc/refman/5.5/en/hexadecimal-literals.html - return "number"; - } else if (support.binaryNumber == true && - (((ch == "b" || ch == "B") && stream.match(/^'[01]+'/)) - || (ch == "0" && stream.match(/^b[01]+/)))) { - // bitstring - // ref: http://dev.mysql.com/doc/refman/5.5/en/bit-field-literals.html - return "number"; - } else if (ch.charCodeAt(0) > 47 && ch.charCodeAt(0) < 58) { - // numbers - // ref: http://dev.mysql.com/doc/refman/5.5/en/number-literals.html - stream.match(/^[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?/); - support.decimallessFloat == true && stream.eat('.'); - return "number"; - } else if (ch == "?" && (stream.eatSpace() || stream.eol() || stream.eat(";"))) { - // placeholders - return "variable-3"; - } else if (ch == "'" || (ch == '"' && support.doubleQuote)) { - // strings - // ref: http://dev.mysql.com/doc/refman/5.5/en/string-literals.html - state.tokenize = tokenLiteral(ch); - return state.tokenize(stream, state); - } else if ((((support.nCharCast == true && (ch == "n" || ch == "N")) - || (support.charsetCast == true && ch == "_" && stream.match(/[a-z][a-z0-9]*/i))) - && (stream.peek() == "'" || stream.peek() == '"'))) { - // charset casting: _utf8'str', N'str', n'str' - // ref: http://dev.mysql.com/doc/refman/5.5/en/string-literals.html - return "keyword"; - } else if (/^[\(\),\;\[\]]/.test(ch)) { - // no highlightning - return null; - } else if (support.commentSlashSlash && ch == "/" && stream.eat("/")) { - // 1-line comment - stream.skipToEnd(); - return "comment"; - } else if ((support.commentHash && ch == "#") - || (ch == "-" && stream.eat("-") && (!support.commentSpaceRequired || stream.eat(" ")))) { - // 1-line comments - // ref: https://kb.askmonty.org/en/comment-syntax/ - stream.skipToEnd(); - return "comment"; - } else if (ch == "/" && stream.eat("*")) { - // multi-line comments - // ref: https://kb.askmonty.org/en/comment-syntax/ - state.tokenize = tokenComment; - return state.tokenize(stream, state); - } else if (ch == ".") { - // .1 for 0.1 - if (support.zerolessFloat == true && stream.match(/^(?:\d+(?:e[+-]?\d+)?)/i)) { - return "number"; - } - // .table_name (ODBC) - // // ref: http://dev.mysql.com/doc/refman/5.6/en/identifier-qualifiers.html - if (support.ODBCdotTable == true && stream.match(/^[a-zA-Z_]+/)) { - return "variable-2"; - } - } else if (operatorChars.test(ch)) { - // operators - stream.eatWhile(operatorChars); - return null; - } else if (ch == '{' && - (stream.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/) || stream.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/))) { - // dates (weird ODBC syntax) - // ref: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-literals.html - return "number"; - } else { - stream.eatWhile(/^[_\w\d]/); - var word = stream.current().toLowerCase(); - // dates (standard SQL syntax) - // ref: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-literals.html - if (dateSQL.hasOwnProperty(word) && (stream.match(/^( )+'[^']*'/) || stream.match(/^( )+"[^"]*"/))) - return "number"; - if (atoms.hasOwnProperty(word)) return "atom"; - if (builtin.hasOwnProperty(word)) return "builtin"; - if (keywords.hasOwnProperty(word)) return "keyword"; - if (client.hasOwnProperty(word)) return "string-2"; - return null; - } - } - - // 'string', with char specified in quote escaped by '\' - function tokenLiteral(quote) { - return function(stream, state) { - var escaped = false, ch; - while ((ch = stream.next()) != null) { - if (ch == quote && !escaped) { - state.tokenize = tokenBase; - break; - } - escaped = !escaped && ch == "\\"; - } - return "string"; - }; - } - function tokenComment(stream, state) { - while (true) { - if (stream.skipTo("*")) { - stream.next(); - if (stream.eat("/")) { - state.tokenize = tokenBase; - break; - } - } else { - stream.skipToEnd(); - break; - } - } - return "comment"; - } - - function pushContext(stream, state, type) { - state.context = { - prev: state.context, - indent: stream.indentation(), - col: stream.column(), - type: type - }; - } - - function popContext(state) { - state.indent = state.context.indent; - state.context = state.context.prev; - } - - return { - startState: function() { - return {tokenize: tokenBase, context: null}; - }, - - token: function(stream, state) { - if (stream.sol()) { - if (state.context && state.context.align == null) - state.context.align = false; - } - if (stream.eatSpace()) return null; - - var style = state.tokenize(stream, state); - if (style == "comment") return style; - - if (state.context && state.context.align == null) - state.context.align = true; - - var tok = stream.current(); - if (tok == "(") - pushContext(stream, state, ")"); - else if (tok == "[") - pushContext(stream, state, "]"); - else if (state.context && state.context.type == tok) - popContext(state); - return style; - }, - - indent: function(state, textAfter) { - var cx = state.context; - if (!cx) return CodeMirror.Pass; - if (cx.align) return cx.col + (textAfter.charAt(0) == cx.type ? 0 : 1); - else return cx.indent + config.indentUnit; - }, - - blockCommentStart: "/*", - blockCommentEnd: "*/", - lineComment: support.commentSlashSlash ? "//" : support.commentHash ? "#" : null - }; -}); - -(function() { - "use strict"; - - // `identifier` - function hookIdentifier(stream) { - // MySQL/MariaDB identifiers - // ref: http://dev.mysql.com/doc/refman/5.6/en/identifier-qualifiers.html - var ch; - while ((ch = stream.next()) != null) { - if (ch == "`" && !stream.eat("`")) return "variable-2"; - } - return null; - } - - // variable token - function hookVar(stream) { - // variables - // @@prefix.varName @varName - // varName can be quoted with ` or ' or " - // ref: http://dev.mysql.com/doc/refman/5.5/en/user-variables.html - if (stream.eat("@")) { - stream.match(/^session\./); - stream.match(/^local\./); - stream.match(/^global\./); - } - - if (stream.eat("'")) { - stream.match(/^.*'/); - return "variable-2"; - } else if (stream.eat('"')) { - stream.match(/^.*"/); - return "variable-2"; - } else if (stream.eat("`")) { - stream.match(/^.*`/); - return "variable-2"; - } else if (stream.match(/^[0-9a-zA-Z$\.\_]+/)) { - return "variable-2"; - } - return null; - }; - - // short client keyword token - function hookClient(stream) { - // \N means NULL - // ref: http://dev.mysql.com/doc/refman/5.5/en/null-values.html - if (stream.eat("N")) { - return "atom"; - } - // \g, etc - // ref: http://dev.mysql.com/doc/refman/5.5/en/mysql-commands.html - return stream.match(/^[a-zA-Z.#!?]/) ? "variable-2" : null; - } - - // these keywords are used by all SQL dialects (however, a mode can still overwrite it) - var sqlKeywords = "alter and as asc between by count create delete desc distinct drop from having in insert into is join like not on or order select set table union update values where "; - - // turn a space-separated list into an array - function set(str) { - var obj = {}, words = str.split(" "); - for (var i = 0; i < words.length; ++i) obj[words[i]] = true; - return obj; - } - - // A generic SQL Mode. It's not a standard, it just try to support what is generally supported - CodeMirror.defineMIME("text/x-sql", { - name: "sql", - keywords: set(sqlKeywords + "begin"), - builtin: set("bool boolean bit blob enum long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision real date datetime year unsigned signed decimal numeric"), - atoms: set("false true null unknown"), - operatorChars: /^[*+\-%<>!=]/, - dateSQL: set("date time timestamp"), - support: set("ODBCdotTable doubleQuote binaryNumber hexNumber") - }); - - CodeMirror.defineMIME("text/x-mssql", { - name: "sql", - client: set("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"), - keywords: set(sqlKeywords + "begin trigger proc view index for add constraint key primary foreign collate clustered nonclustered"), - builtin: set("bigint numeric bit smallint decimal smallmoney int tinyint money float real char varchar text nchar nvarchar ntext binary varbinary image cursor timestamp hierarchyid uniqueidentifier sql_variant xml table "), - atoms: set("false true null unknown"), - operatorChars: /^[*+\-%<>!=]/, - dateSQL: set("date datetimeoffset datetime2 smalldatetime datetime time"), - hooks: { - "@": hookVar - } - }); - - CodeMirror.defineMIME("text/x-mysql", { - name: "sql", - client: set("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"), - keywords: set(sqlKeywords + "accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group groupby_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"), - builtin: set("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"), - atoms: set("false true null unknown"), - operatorChars: /^[*+\-%<>!=&|^]/, - dateSQL: set("date time timestamp"), - support: set("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"), - hooks: { - "@": hookVar, - "`": hookIdentifier, - "\\": hookClient - } - }); - - CodeMirror.defineMIME("text/x-mariadb", { - name: "sql", - client: set("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"), - keywords: set(sqlKeywords + "accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group groupby_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"), - builtin: set("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"), - atoms: set("false true null unknown"), - operatorChars: /^[*+\-%<>!=&|^]/, - dateSQL: set("date time timestamp"), - support: set("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"), - hooks: { - "@": hookVar, - "`": hookIdentifier, - "\\": hookClient - } - }); - - // the query language used by Apache Cassandra is called CQL, but this mime type - // is called Cassandra to avoid confusion with Contextual Query Language - CodeMirror.defineMIME("text/x-cassandra", { - name: "sql", - client: { }, - keywords: set("use select from using consistency where limit first reversed first and in insert into values using consistency ttl update set delete truncate begin batch apply create keyspace with columnfamily primary key index on drop alter type add any one quorum all local_quorum each_quorum"), - builtin: set("ascii bigint blob boolean counter decimal double float int text timestamp uuid varchar varint"), - atoms: set("false true"), - operatorChars: /^[<>=]/, - dateSQL: { }, - support: set("commentSlashSlash decimallessFloat"), - hooks: { } - }); - - // this is based on Peter Raganitsch's 'plsql' mode - CodeMirror.defineMIME("text/x-plsql", { - name: "sql", - client: set("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"), - keywords: set("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"), - builtin: set("bfile blob character clob dec float int integer mlslabel natural naturaln nchar nclob number numeric nvarchar2 real rowtype signtype smallint string varchar varchar2 abs acos add_months ascii asin atan atan2 average bfilename ceil chartorowid chr concat convert cos cosh count decode deref dual dump dup_val_on_index empty error exp false floor found glb greatest hextoraw initcap instr instrb isopen last_day least lenght lenghtb ln lower lpad ltrim lub make_ref max min mod months_between new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null nvl others power rawtohex reftohex round rowcount rowidtochar rpad rtrim sign sin sinh soundex sqlcode sqlerrm sqrt stddev substr substrb sum sysdate tan tanh to_char to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid upper user userenv variance vsize"), - operatorChars: /^[*+\-%<>!=~]/, - dateSQL: set("date time timestamp"), - support: set("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber") - }); -}()); - -/* - How Properties of Mime Types are used by SQL Mode - ================================================= - - keywords: - A list of keywords you want to be highlighted. - functions: - A list of function names you want to be highlighted. - builtin: - A list of builtin types you want to be highlighted (if you want types to be of class "builtin" instead of "keyword"). - operatorChars: - All characters that must be handled as operators. - client: - Commands parsed and executed by the client (not the server). - support: - A list of supported syntaxes which are not common, but are supported by more than 1 DBMS. - * ODBCdotTable: .tableName - * zerolessFloat: .1 - * doubleQuote - * nCharCast: N'string' - * charsetCast: _utf8'string' - * commentHash: use # char for comments - * commentSlashSlash: use // for comments - * commentSpaceRequired: require a space after -- for comments - atoms: - Keywords that must be highlighted as atoms,. Some DBMS's support more atoms than others: - UNKNOWN, INFINITY, UNDERFLOW, NaN... - dateSQL: - Used for date/time SQL standard syntax, because not all DBMS's support same temporal types. -*/ diff --git a/plugins/codemirror/codemirror/mode/stex/index.html b/plugins/codemirror/codemirror/mode/stex/index.html deleted file mode 100644 index 28b8f64..0000000 --- a/plugins/codemirror/codemirror/mode/stex/index.html +++ /dev/null @@ -1,110 +0,0 @@ - - -CodeMirror: sTeX mode - - - - - - - - - -
    -

    sTeX mode

    -
    - - -

    MIME types defined: text/x-stex.

    - -

    Parsing/Highlighting Tests: normal, verbose.

    - -
    diff --git a/plugins/codemirror/codemirror/mode/stex/stex.js b/plugins/codemirror/codemirror/mode/stex/stex.js deleted file mode 100644 index ca04c24..0000000 --- a/plugins/codemirror/codemirror/mode/stex/stex.js +++ /dev/null @@ -1,246 +0,0 @@ -/* - * Author: Constantin Jucovschi (c.jucovschi@jacobs-university.de) - * Licence: MIT - */ - -CodeMirror.defineMode("stex", function() { - "use strict"; - - function pushCommand(state, command) { - state.cmdState.push(command); - } - - function peekCommand(state) { - if (state.cmdState.length > 0) { - return state.cmdState[state.cmdState.length - 1]; - } else { - return null; - } - } - - function popCommand(state) { - var plug = state.cmdState.pop(); - if (plug) { - plug.closeBracket(); - } - } - - // returns the non-default plugin closest to the end of the list - function getMostPowerful(state) { - var context = state.cmdState; - for (var i = context.length - 1; i >= 0; i--) { - var plug = context[i]; - if (plug.name == "DEFAULT") { - continue; - } - return plug; - } - return { styleIdentifier: function() { return null; } }; - } - - function addPluginPattern(pluginName, cmdStyle, styles) { - return function () { - this.name = pluginName; - this.bracketNo = 0; - this.style = cmdStyle; - this.styles = styles; - this.argument = null; // \begin and \end have arguments that follow. These are stored in the plugin - - this.styleIdentifier = function() { - return this.styles[this.bracketNo - 1] || null; - }; - this.openBracket = function() { - this.bracketNo++; - return "bracket"; - }; - this.closeBracket = function() {}; - }; - } - - var plugins = {}; - - plugins["importmodule"] = addPluginPattern("importmodule", "tag", ["string", "builtin"]); - plugins["documentclass"] = addPluginPattern("documentclass", "tag", ["", "atom"]); - plugins["usepackage"] = addPluginPattern("usepackage", "tag", ["atom"]); - plugins["begin"] = addPluginPattern("begin", "tag", ["atom"]); - plugins["end"] = addPluginPattern("end", "tag", ["atom"]); - - plugins["DEFAULT"] = function () { - this.name = "DEFAULT"; - this.style = "tag"; - - this.styleIdentifier = this.openBracket = this.closeBracket = function() {}; - }; - - function setState(state, f) { - state.f = f; - } - - // called when in a normal (no environment) context - function normal(source, state) { - var plug; - // Do we look like '\command' ? If so, attempt to apply the plugin 'command' - if (source.match(/^\\[a-zA-Z@]+/)) { - var cmdName = source.current().slice(1); - plug = plugins[cmdName] || plugins["DEFAULT"]; - plug = new plug(); - pushCommand(state, plug); - setState(state, beginParams); - return plug.style; - } - - // escape characters - if (source.match(/^\\[$&%#{}_]/)) { - return "tag"; - } - - // white space control characters - if (source.match(/^\\[,;!\/\\]/)) { - return "tag"; - } - - // find if we're starting various math modes - if (source.match("\\[")) { - setState(state, function(source, state){ return inMathMode(source, state, "\\]"); }); - return "keyword"; - } - if (source.match("$$")) { - setState(state, function(source, state){ return inMathMode(source, state, "$$"); }); - return "keyword"; - } - if (source.match("$")) { - setState(state, function(source, state){ return inMathMode(source, state, "$"); }); - return "keyword"; - } - - var ch = source.next(); - if (ch == "%") { - // special case: % at end of its own line; stay in same state - if (!source.eol()) { - setState(state, inCComment); - } - return "comment"; - } - else if (ch == '}' || ch == ']') { - plug = peekCommand(state); - if (plug) { - plug.closeBracket(ch); - setState(state, beginParams); - } else { - return "error"; - } - return "bracket"; - } else if (ch == '{' || ch == '[') { - plug = plugins["DEFAULT"]; - plug = new plug(); - pushCommand(state, plug); - return "bracket"; - } - else if (/\d/.test(ch)) { - source.eatWhile(/[\w.%]/); - return "atom"; - } - else { - source.eatWhile(/[\w\-_]/); - plug = getMostPowerful(state); - if (plug.name == 'begin') { - plug.argument = source.current(); - } - return plug.styleIdentifier(); - } - } - - function inCComment(source, state) { - source.skipToEnd(); - setState(state, normal); - return "comment"; - } - - function inMathMode(source, state, endModeSeq) { - if (source.eatSpace()) { - return null; - } - if (source.match(endModeSeq)) { - setState(state, normal); - return "keyword"; - } - if (source.match(/^\\[a-zA-Z@]+/)) { - return "tag"; - } - if (source.match(/^[a-zA-Z]+/)) { - return "variable-2"; - } - // escape characters - if (source.match(/^\\[$&%#{}_]/)) { - return "tag"; - } - // white space control characters - if (source.match(/^\\[,;!\/]/)) { - return "tag"; - } - // special math-mode characters - if (source.match(/^[\^_&]/)) { - return "tag"; - } - // non-special characters - if (source.match(/^[+\-<>|=,\/@!*:;'"`~#?]/)) { - return null; - } - if (source.match(/^(\d+\.\d*|\d*\.\d+|\d+)/)) { - return "number"; - } - var ch = source.next(); - if (ch == "{" || ch == "}" || ch == "[" || ch == "]" || ch == "(" || ch == ")") { - return "bracket"; - } - - // eat comments here, because inCComment returns us to normal state! - if (ch == "%") { - if (!source.eol()) { - source.skipToEnd(); - } - return "comment"; - } - return "error"; - } - - function beginParams(source, state) { - var ch = source.peek(), lastPlug; - if (ch == '{' || ch == '[') { - lastPlug = peekCommand(state); - lastPlug.openBracket(ch); - source.eat(ch); - setState(state, normal); - return "bracket"; - } - if (/[ \t\r]/.test(ch)) { - source.eat(ch); - return null; - } - setState(state, normal); - popCommand(state); - - return normal(source, state); - } - - return { - startState: function() { - return { - cmdState: [], - f: normal - }; - }, - copyState: function(s) { - return { - cmdState: s.cmdState.slice(), - f: s.f - }; - }, - token: function(stream, state) { - return state.f(stream, state); - } - }; -}); - -CodeMirror.defineMIME("text/x-stex", "stex"); -CodeMirror.defineMIME("text/x-latex", "stex"); diff --git a/plugins/codemirror/codemirror/mode/stex/test.js b/plugins/codemirror/codemirror/mode/stex/test.js deleted file mode 100644 index ab629e8..0000000 --- a/plugins/codemirror/codemirror/mode/stex/test.js +++ /dev/null @@ -1,120 +0,0 @@ -(function() { - var mode = CodeMirror.getMode({tabSize: 4}, "stex"); - function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } - - MT("word", - "foo"); - - MT("twoWords", - "foo bar"); - - MT("beginEndDocument", - "[tag \\begin][bracket {][atom document][bracket }]", - "[tag \\end][bracket {][atom document][bracket }]"); - - MT("beginEndEquation", - "[tag \\begin][bracket {][atom equation][bracket }]", - " E=mc^2", - "[tag \\end][bracket {][atom equation][bracket }]"); - - MT("beginModule", - "[tag \\begin][bracket {][atom module][bracket }[[]]]"); - - MT("beginModuleId", - "[tag \\begin][bracket {][atom module][bracket }[[]id=bbt-size[bracket ]]]"); - - MT("importModule", - "[tag \\importmodule][bracket [[][string b-b-t][bracket ]]{][builtin b-b-t][bracket }]"); - - MT("importModulePath", - "[tag \\importmodule][bracket [[][tag \\KWARCslides][bracket {][string dmath/en/cardinality][bracket }]]{][builtin card][bracket }]"); - - MT("psForPDF", - "[tag \\PSforPDF][bracket [[][atom 1][bracket ]]{]#1[bracket }]"); - - MT("comment", - "[comment % foo]"); - - MT("tagComment", - "[tag \\item][comment % bar]"); - - MT("commentTag", - " [comment % \\item]"); - - MT("commentLineBreak", - "[comment %]", - "foo"); - - MT("tagErrorCurly", - "[tag \\begin][error }][bracket {]"); - - MT("tagErrorSquare", - "[tag \\item][error ]]][bracket {]"); - - MT("commentCurly", - "[comment % }]"); - - MT("tagHash", - "the [tag \\#] key"); - - MT("tagNumber", - "a [tag \\$][atom 5] stetson"); - - MT("tagPercent", - "[atom 100][tag \\%] beef"); - - MT("tagAmpersand", - "L [tag \\&] N"); - - MT("tagUnderscore", - "foo[tag \\_]bar"); - - MT("tagBracketOpen", - "[tag \\emph][bracket {][tag \\{][bracket }]"); - - MT("tagBracketClose", - "[tag \\emph][bracket {][tag \\}][bracket }]"); - - MT("tagLetterNumber", - "section [tag \\S][atom 1]"); - - MT("textTagNumber", - "para [tag \\P][atom 2]"); - - MT("thinspace", - "x[tag \\,]y"); - - MT("thickspace", - "x[tag \\;]y"); - - MT("negativeThinspace", - "x[tag \\!]y"); - - MT("periodNotSentence", - "J.\\ L.\\ is"); - - MT("periodSentence", - "X[tag \\@]. The"); - - MT("italicCorrection", - "[bracket {][tag \\em] If[tag \\/][bracket }] I"); - - MT("tagBracket", - "[tag \\newcommand][bracket {][tag \\pop][bracket }]"); - - MT("inlineMathTagFollowedByNumber", - "[keyword $][tag \\pi][number 2][keyword $]"); - - MT("inlineMath", - "[keyword $][number 3][variable-2 x][tag ^][number 2.45]-[tag \\sqrt][bracket {][tag \\$\\alpha][bracket }] = [number 2][keyword $] other text"); - - MT("displayMath", - "More [keyword $$]\t[variable-2 S][tag ^][variable-2 n][tag \\sum] [variable-2 i][keyword $$] other text"); - - MT("mathWithComment", - "[keyword $][variable-2 x] [comment % $]", - "[variable-2 y][keyword $] other text"); - - MT("lineBreakArgument", - "[tag \\\\][bracket [[][atom 1cm][bracket ]]]"); -})(); diff --git a/plugins/codemirror/codemirror/mode/tcl/index.html b/plugins/codemirror/codemirror/mode/tcl/index.html deleted file mode 100644 index 2c0d1a2..0000000 --- a/plugins/codemirror/codemirror/mode/tcl/index.html +++ /dev/null @@ -1,143 +0,0 @@ - - -CodeMirror: Tcl mode - - - - - - - - - - -
    -

    Tcl mode

    -
    - - -

    MIME types defined: text/x-tcl.

    - -
    diff --git a/plugins/codemirror/codemirror/mode/tcl/tcl.js b/plugins/codemirror/codemirror/mode/tcl/tcl.js deleted file mode 100644 index ed2c697..0000000 --- a/plugins/codemirror/codemirror/mode/tcl/tcl.js +++ /dev/null @@ -1,131 +0,0 @@ -//tcl mode by Ford_Lawnmower :: Based on Velocity mode by Steve O'Hara -CodeMirror.defineMode("tcl", function() { - function parseWords(str) { - var obj = {}, words = str.split(" "); - for (var i = 0; i < words.length; ++i) obj[words[i]] = true; - return obj; - } - var keywords = parseWords("Tcl safe after append array auto_execok auto_import auto_load " + - "auto_mkindex auto_mkindex_old auto_qualify auto_reset bgerror " + - "binary break catch cd close concat continue dde eof encoding error " + - "eval exec exit expr fblocked fconfigure fcopy file fileevent filename " + - "filename flush for foreach format gets glob global history http if " + - "incr info interp join lappend lindex linsert list llength load lrange " + - "lreplace lsearch lset lsort memory msgcat namespace open package parray " + - "pid pkg::create pkg_mkIndex proc puts pwd re_syntax read regex regexp " + - "registry regsub rename resource return scan seek set socket source split " + - "string subst switch tcl_endOfWord tcl_findLibrary tcl_startOfNextWord " + - "tcl_wordBreakAfter tcl_startOfPreviousWord tcl_wordBreakBefore tcltest " + - "tclvars tell time trace unknown unset update uplevel upvar variable " + - "vwait"); - var functions = parseWords("if elseif else and not or eq ne in ni for foreach while switch"); - var isOperatorChar = /[+\-*&%=<>!?^\/\|]/; - function chain(stream, state, f) { - state.tokenize = f; - return f(stream, state); - } - function tokenBase(stream, state) { - var beforeParams = state.beforeParams; - state.beforeParams = false; - var ch = stream.next(); - if ((ch == '"' || ch == "'") && state.inParams) - return chain(stream, state, tokenString(ch)); - else if (/[\[\]{}\(\),;\.]/.test(ch)) { - if (ch == "(" && beforeParams) state.inParams = true; - else if (ch == ")") state.inParams = false; - return null; - } - else if (/\d/.test(ch)) { - stream.eatWhile(/[\w\.]/); - return "number"; - } - else if (ch == "#" && stream.eat("*")) { - return chain(stream, state, tokenComment); - } - else if (ch == "#" && stream.match(/ *\[ *\[/)) { - return chain(stream, state, tokenUnparsed); - } - else if (ch == "#" && stream.eat("#")) { - stream.skipToEnd(); - return "comment"; - } - else if (ch == '"') { - stream.skipTo(/"/); - return "comment"; - } - else if (ch == "$") { - stream.eatWhile(/[$_a-z0-9A-Z\.{:]/); - stream.eatWhile(/}/); - state.beforeParams = true; - return "builtin"; - } - else if (isOperatorChar.test(ch)) { - stream.eatWhile(isOperatorChar); - return "comment"; - } - else { - stream.eatWhile(/[\w\$_{}]/); - var word = stream.current().toLowerCase(); - if (keywords && keywords.propertyIsEnumerable(word)) - return "keyword"; - if (functions && functions.propertyIsEnumerable(word)) { - state.beforeParams = true; - return "keyword"; - } - return null; - } - } - function tokenString(quote) { - return function(stream, state) { - var escaped = false, next, end = false; - while ((next = stream.next()) != null) { - if (next == quote && !escaped) { - end = true; - break; - } - escaped = !escaped && next == "\\"; - } - if (end) state.tokenize = tokenBase; - return "string"; - }; - } - function tokenComment(stream, state) { - var maybeEnd = false, ch; - while (ch = stream.next()) { - if (ch == "#" && maybeEnd) { - state.tokenize = tokenBase; - break; - } - maybeEnd = (ch == "*"); - } - return "comment"; - } - function tokenUnparsed(stream, state) { - var maybeEnd = 0, ch; - while (ch = stream.next()) { - if (ch == "#" && maybeEnd == 2) { - state.tokenize = tokenBase; - break; - } - if (ch == "]") - maybeEnd++; - else if (ch != " ") - maybeEnd = 0; - } - return "meta"; - } - return { - startState: function() { - return { - tokenize: tokenBase, - beforeParams: false, - inParams: false - }; - }, - token: function(stream, state) { - if (stream.eatSpace()) return null; - return state.tokenize(stream, state); - } - }; -}); -CodeMirror.defineMIME("text/x-tcl", "tcl"); diff --git a/plugins/codemirror/codemirror/mode/tiddlywiki/index.html b/plugins/codemirror/codemirror/mode/tiddlywiki/index.html deleted file mode 100644 index fc8f5d3..0000000 --- a/plugins/codemirror/codemirror/mode/tiddlywiki/index.html +++ /dev/null @@ -1,155 +0,0 @@ - - -CodeMirror: TiddlyWiki mode - - - - - - - - - - - -
    -

    TiddlyWiki mode

    - - -
    - - - -

    TiddlyWiki mode supports a single configuration.

    - -

    MIME types defined: text/x-tiddlywiki.

    -
    diff --git a/plugins/codemirror/codemirror/mode/tiddlywiki/tiddlywiki.css b/plugins/codemirror/codemirror/mode/tiddlywiki/tiddlywiki.css deleted file mode 100644 index 9a69b63..0000000 --- a/plugins/codemirror/codemirror/mode/tiddlywiki/tiddlywiki.css +++ /dev/null @@ -1,14 +0,0 @@ -span.cm-underlined { - text-decoration: underline; -} -span.cm-strikethrough { - text-decoration: line-through; -} -span.cm-brace { - color: #170; - font-weight: bold; -} -span.cm-table { - color: blue; - font-weight: bold; -} diff --git a/plugins/codemirror/codemirror/mode/tiddlywiki/tiddlywiki.js b/plugins/codemirror/codemirror/mode/tiddlywiki/tiddlywiki.js deleted file mode 100644 index 24a2478..0000000 --- a/plugins/codemirror/codemirror/mode/tiddlywiki/tiddlywiki.js +++ /dev/null @@ -1,353 +0,0 @@ -/*** - |''Name''|tiddlywiki.js| - |''Description''|Enables TiddlyWikiy syntax highlighting using CodeMirror| - |''Author''|PMario| - |''Version''|0.1.7| - |''Status''|''stable''| - |''Source''|[[GitHub|https://github.com/pmario/CodeMirror2/blob/tw-syntax/mode/tiddlywiki]]| - |''Documentation''|http://codemirror.tiddlyspace.com/| - |''License''|[[MIT License|http://www.opensource.org/licenses/mit-license.php]]| - |''CoreVersion''|2.5.0| - |''Requires''|codemirror.js| - |''Keywords''|syntax highlighting color code mirror codemirror| - ! Info - CoreVersion parameter is needed for TiddlyWiki only! -***/ -//{{{ -CodeMirror.defineMode("tiddlywiki", function () { - // Tokenizer - var textwords = {}; - - var keywords = function () { - function kw(type) { - return { type: type, style: "macro"}; - } - return { - "allTags": kw('allTags'), "closeAll": kw('closeAll'), "list": kw('list'), - "newJournal": kw('newJournal'), "newTiddler": kw('newTiddler'), - "permaview": kw('permaview'), "saveChanges": kw('saveChanges'), - "search": kw('search'), "slider": kw('slider'), "tabs": kw('tabs'), - "tag": kw('tag'), "tagging": kw('tagging'), "tags": kw('tags'), - "tiddler": kw('tiddler'), "timeline": kw('timeline'), - "today": kw('today'), "version": kw('version'), "option": kw('option'), - - "with": kw('with'), - "filter": kw('filter') - }; - }(); - - var isSpaceName = /[\w_\-]/i, - reHR = /^\-\-\-\-+$/, //
    - reWikiCommentStart = /^\/\*\*\*$/, // /*** - reWikiCommentStop = /^\*\*\*\/$/, // ***/ - reBlockQuote = /^<<<$/, - - reJsCodeStart = /^\/\/\{\{\{$/, // //{{{ js block start - reJsCodeStop = /^\/\/\}\}\}$/, // //}}} js stop - reXmlCodeStart = /^$/, // xml block start - reXmlCodeStop = /^$/, // xml stop - - reCodeBlockStart = /^\{\{\{$/, // {{{ TW text div block start - reCodeBlockStop = /^\}\}\}$/, // }}} TW text stop - - reUntilCodeStop = /.*?\}\}\}/; - - function chain(stream, state, f) { - state.tokenize = f; - return f(stream, state); - } - - // Used as scratch variables to communicate multiple values without - // consing up tons of objects. - var type, content; - - function ret(tp, style, cont) { - type = tp; - content = cont; - return style; - } - - function jsTokenBase(stream, state) { - var sol = stream.sol(), ch; - - state.block = false; // indicates the start of a code block. - - ch = stream.peek(); // don't eat, to make matching simpler - - // check start of blocks - if (sol && /[<\/\*{}\-]/.test(ch)) { - if (stream.match(reCodeBlockStart)) { - state.block = true; - return chain(stream, state, twTokenCode); - } - if (stream.match(reBlockQuote)) { - return ret('quote', 'quote'); - } - if (stream.match(reWikiCommentStart) || stream.match(reWikiCommentStop)) { - return ret('code', 'comment'); - } - if (stream.match(reJsCodeStart) || stream.match(reJsCodeStop) || stream.match(reXmlCodeStart) || stream.match(reXmlCodeStop)) { - return ret('code', 'comment'); - } - if (stream.match(reHR)) { - return ret('hr', 'hr'); - } - } // sol - ch = stream.next(); - - if (sol && /[\/\*!#;:>|]/.test(ch)) { - if (ch == "!") { // tw header - stream.skipToEnd(); - return ret("header", "header"); - } - if (ch == "*") { // tw list - stream.eatWhile('*'); - return ret("list", "comment"); - } - if (ch == "#") { // tw numbered list - stream.eatWhile('#'); - return ret("list", "comment"); - } - if (ch == ";") { // definition list, term - stream.eatWhile(';'); - return ret("list", "comment"); - } - if (ch == ":") { // definition list, description - stream.eatWhile(':'); - return ret("list", "comment"); - } - if (ch == ">") { // single line quote - stream.eatWhile(">"); - return ret("quote", "quote"); - } - if (ch == '|') { - return ret('table', 'header'); - } - } - - if (ch == '{' && stream.match(/\{\{/)) { - return chain(stream, state, twTokenCode); - } - - // rudimentary html:// file:// link matching. TW knows much more ... - if (/[hf]/i.test(ch)) { - if (/[ti]/i.test(stream.peek()) && stream.match(/\b(ttps?|tp|ile):\/\/[\-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i)) { - return ret("link", "link"); - } - } - // just a little string indicator, don't want to have the whole string covered - if (ch == '"') { - return ret('string', 'string'); - } - if (ch == '~') { // _no_ CamelCase indicator should be bold - return ret('text', 'brace'); - } - if (/[\[\]]/.test(ch)) { // check for [[..]] - if (stream.peek() == ch) { - stream.next(); - return ret('brace', 'brace'); - } - } - if (ch == "@") { // check for space link. TODO fix @@...@@ highlighting - stream.eatWhile(isSpaceName); - return ret("link", "link"); - } - if (/\d/.test(ch)) { // numbers - stream.eatWhile(/\d/); - return ret("number", "number"); - } - if (ch == "/") { // tw invisible comment - if (stream.eat("%")) { - return chain(stream, state, twTokenComment); - } - else if (stream.eat("/")) { // - return chain(stream, state, twTokenEm); - } - } - if (ch == "_") { // tw underline - if (stream.eat("_")) { - return chain(stream, state, twTokenUnderline); - } - } - // strikethrough and mdash handling - if (ch == "-") { - if (stream.eat("-")) { - // if strikethrough looks ugly, change CSS. - if (stream.peek() != ' ') - return chain(stream, state, twTokenStrike); - // mdash - if (stream.peek() == ' ') - return ret('text', 'brace'); - } - } - if (ch == "'") { // tw bold - if (stream.eat("'")) { - return chain(stream, state, twTokenStrong); - } - } - if (ch == "<") { // tw macro - if (stream.eat("<")) { - return chain(stream, state, twTokenMacro); - } - } - else { - return ret(ch); - } - - // core macro handling - stream.eatWhile(/[\w\$_]/); - var word = stream.current(), - known = textwords.propertyIsEnumerable(word) && textwords[word]; - - return known ? ret(known.type, known.style, word) : ret("text", null, word); - - } // jsTokenBase() - - // tw invisible comment - function twTokenComment(stream, state) { - var maybeEnd = false, - ch; - while (ch = stream.next()) { - if (ch == "/" && maybeEnd) { - state.tokenize = jsTokenBase; - break; - } - maybeEnd = (ch == "%"); - } - return ret("comment", "comment"); - } - - // tw strong / bold - function twTokenStrong(stream, state) { - var maybeEnd = false, - ch; - while (ch = stream.next()) { - if (ch == "'" && maybeEnd) { - state.tokenize = jsTokenBase; - break; - } - maybeEnd = (ch == "'"); - } - return ret("text", "strong"); - } - - // tw code - function twTokenCode(stream, state) { - var ch, sb = state.block; - - if (sb && stream.current()) { - return ret("code", "comment"); - } - - if (!sb && stream.match(reUntilCodeStop)) { - state.tokenize = jsTokenBase; - return ret("code", "comment"); - } - - if (sb && stream.sol() && stream.match(reCodeBlockStop)) { - state.tokenize = jsTokenBase; - return ret("code", "comment"); - } - - ch = stream.next(); - return (sb) ? ret("code", "comment") : ret("code", "comment"); - } - - // tw em / italic - function twTokenEm(stream, state) { - var maybeEnd = false, - ch; - while (ch = stream.next()) { - if (ch == "/" && maybeEnd) { - state.tokenize = jsTokenBase; - break; - } - maybeEnd = (ch == "/"); - } - return ret("text", "em"); - } - - // tw underlined text - function twTokenUnderline(stream, state) { - var maybeEnd = false, - ch; - while (ch = stream.next()) { - if (ch == "_" && maybeEnd) { - state.tokenize = jsTokenBase; - break; - } - maybeEnd = (ch == "_"); - } - return ret("text", "underlined"); - } - - // tw strike through text looks ugly - // change CSS if needed - function twTokenStrike(stream, state) { - var maybeEnd = false, ch; - - while (ch = stream.next()) { - if (ch == "-" && maybeEnd) { - state.tokenize = jsTokenBase; - break; - } - maybeEnd = (ch == "-"); - } - return ret("text", "strikethrough"); - } - - // macro - function twTokenMacro(stream, state) { - var ch, word, known; - - if (stream.current() == '<<') { - return ret('brace', 'macro'); - } - - ch = stream.next(); - if (!ch) { - state.tokenize = jsTokenBase; - return ret(ch); - } - if (ch == ">") { - if (stream.peek() == '>') { - stream.next(); - state.tokenize = jsTokenBase; - return ret("brace", "macro"); - } - } - - stream.eatWhile(/[\w\$_]/); - word = stream.current(); - known = keywords.propertyIsEnumerable(word) && keywords[word]; - - if (known) { - return ret(known.type, known.style, word); - } - else { - return ret("macro", null, word); - } - } - - // Interface - return { - startState: function () { - return { - tokenize: jsTokenBase, - indented: 0, - level: 0 - }; - }, - - token: function (stream, state) { - if (stream.eatSpace()) return null; - var style = state.tokenize(stream, state); - return style; - }, - - electricChars: "" - }; -}); - -CodeMirror.defineMIME("text/x-tiddlywiki", "tiddlywiki"); -//}}} diff --git a/plugins/codemirror/codemirror/mode/tiki/index.html b/plugins/codemirror/codemirror/mode/tiki/index.html deleted file mode 100644 index 5315dbf..0000000 --- a/plugins/codemirror/codemirror/mode/tiki/index.html +++ /dev/null @@ -1,95 +0,0 @@ - - -CodeMirror: Tiki wiki mode - - - - - - - - - - -
    -

    Tiki wiki mode

    - - -
    - - - -
    diff --git a/plugins/codemirror/codemirror/mode/tiki/tiki.css b/plugins/codemirror/codemirror/mode/tiki/tiki.css deleted file mode 100644 index 0dbc3ea..0000000 --- a/plugins/codemirror/codemirror/mode/tiki/tiki.css +++ /dev/null @@ -1,26 +0,0 @@ -.cm-tw-syntaxerror { - color: #FFF; - background-color: #900; -} - -.cm-tw-deleted { - text-decoration: line-through; -} - -.cm-tw-header5 { - font-weight: bold; -} -.cm-tw-listitem:first-child { /*Added first child to fix duplicate padding when highlighting*/ - padding-left: 10px; -} - -.cm-tw-box { - border-top-width: 0px ! important; - border-style: solid; - border-width: 1px; - border-color: inherit; -} - -.cm-tw-underline { - text-decoration: underline; -} \ No newline at end of file diff --git a/plugins/codemirror/codemirror/mode/tiki/tiki.js b/plugins/codemirror/codemirror/mode/tiki/tiki.js deleted file mode 100644 index e789163..0000000 --- a/plugins/codemirror/codemirror/mode/tiki/tiki.js +++ /dev/null @@ -1,308 +0,0 @@ -CodeMirror.defineMode('tiki', function(config) { - function inBlock(style, terminator, returnTokenizer) { - return function(stream, state) { - while (!stream.eol()) { - if (stream.match(terminator)) { - state.tokenize = inText; - break; - } - stream.next(); - } - - if (returnTokenizer) state.tokenize = returnTokenizer; - - return style; - }; - } - - function inLine(style) { - return function(stream, state) { - while(!stream.eol()) { - stream.next(); - } - state.tokenize = inText; - return style; - }; - } - - function inText(stream, state) { - function chain(parser) { - state.tokenize = parser; - return parser(stream, state); - } - - var sol = stream.sol(); - var ch = stream.next(); - - //non start of line - switch (ch) { //switch is generally much faster than if, so it is used here - case "{": //plugin - stream.eat("/"); - stream.eatSpace(); - var tagName = ""; - var c; - while ((c = stream.eat(/[^\s\u00a0=\"\'\/?(}]/))) tagName += c; - state.tokenize = inPlugin; - return "tag"; - break; - case "_": //bold - if (stream.eat("_")) { - return chain(inBlock("strong", "__", inText)); - } - break; - case "'": //italics - if (stream.eat("'")) { - // Italic text - return chain(inBlock("em", "''", inText)); - } - break; - case "(":// Wiki Link - if (stream.eat("(")) { - return chain(inBlock("variable-2", "))", inText)); - } - break; - case "[":// Weblink - return chain(inBlock("variable-3", "]", inText)); - break; - case "|": //table - if (stream.eat("|")) { - return chain(inBlock("comment", "||")); - } - break; - case "-": - if (stream.eat("=")) {//titleBar - return chain(inBlock("header string", "=-", inText)); - } else if (stream.eat("-")) {//deleted - return chain(inBlock("error tw-deleted", "--", inText)); - } - break; - case "=": //underline - if (stream.match("==")) { - return chain(inBlock("tw-underline", "===", inText)); - } - break; - case ":": - if (stream.eat(":")) { - return chain(inBlock("comment", "::")); - } - break; - case "^": //box - return chain(inBlock("tw-box", "^")); - break; - case "~": //np - if (stream.match("np~")) { - return chain(inBlock("meta", "~/np~")); - } - break; - } - - //start of line types - if (sol) { - switch (ch) { - case "!": //header at start of line - if (stream.match('!!!!!')) { - return chain(inLine("header string")); - } else if (stream.match('!!!!')) { - return chain(inLine("header string")); - } else if (stream.match('!!!')) { - return chain(inLine("header string")); - } else if (stream.match('!!')) { - return chain(inLine("header string")); - } else { - return chain(inLine("header string")); - } - break; - case "*": //unordered list line item, or
  • at start of line - case "#": //ordered list line item, or
  • at start of line - case "+": //ordered list line item, or
  • at start of line - return chain(inLine("tw-listitem bracket")); - break; - } - } - - //stream.eatWhile(/[&{]/); was eating up plugins, turned off to act less like html and more like tiki - return null; - } - - var indentUnit = config.indentUnit; - - // Return variables for tokenizers - var pluginName, type; - function inPlugin(stream, state) { - var ch = stream.next(); - var peek = stream.peek(); - - if (ch == "}") { - state.tokenize = inText; - //type = ch == ")" ? "endPlugin" : "selfclosePlugin"; inPlugin - return "tag"; - } else if (ch == "(" || ch == ")") { - return "bracket"; - } else if (ch == "=") { - type = "equals"; - - if (peek == ">") { - ch = stream.next(); - peek = stream.peek(); - } - - //here we detect values directly after equal character with no quotes - if (!/[\'\"]/.test(peek)) { - state.tokenize = inAttributeNoQuote(); - } - //end detect values - - return "operator"; - } else if (/[\'\"]/.test(ch)) { - state.tokenize = inAttribute(ch); - return state.tokenize(stream, state); - } else { - stream.eatWhile(/[^\s\u00a0=\"\'\/?]/); - return "keyword"; - } - } - - function inAttribute(quote) { - return function(stream, state) { - while (!stream.eol()) { - if (stream.next() == quote) { - state.tokenize = inPlugin; - break; - } - } - return "string"; - }; - } - - function inAttributeNoQuote() { - return function(stream, state) { - while (!stream.eol()) { - var ch = stream.next(); - var peek = stream.peek(); - if (ch == " " || ch == "," || /[ )}]/.test(peek)) { - state.tokenize = inPlugin; - break; - } - } - return "string"; -}; - } - -var curState, setStyle; -function pass() { - for (var i = arguments.length - 1; i >= 0; i--) curState.cc.push(arguments[i]); -} - -function cont() { - pass.apply(null, arguments); - return true; -} - -function pushContext(pluginName, startOfLine) { - var noIndent = curState.context && curState.context.noIndent; - curState.context = { - prev: curState.context, - pluginName: pluginName, - indent: curState.indented, - startOfLine: startOfLine, - noIndent: noIndent - }; -} - -function popContext() { - if (curState.context) curState.context = curState.context.prev; -} - -function element(type) { - if (type == "openPlugin") {curState.pluginName = pluginName; return cont(attributes, endplugin(curState.startOfLine));} - else if (type == "closePlugin") { - var err = false; - if (curState.context) { - err = curState.context.pluginName != pluginName; - popContext(); - } else { - err = true; - } - if (err) setStyle = "error"; - return cont(endcloseplugin(err)); - } - else if (type == "string") { - if (!curState.context || curState.context.name != "!cdata") pushContext("!cdata"); - if (curState.tokenize == inText) popContext(); - return cont(); - } - else return cont(); -} - -function endplugin(startOfLine) { - return function(type) { - if ( - type == "selfclosePlugin" || - type == "endPlugin" - ) - return cont(); - if (type == "endPlugin") {pushContext(curState.pluginName, startOfLine); return cont();} - return cont(); - }; -} - -function endcloseplugin(err) { - return function(type) { - if (err) setStyle = "error"; - if (type == "endPlugin") return cont(); - return pass(); - }; -} - -function attributes(type) { - if (type == "keyword") {setStyle = "attribute"; return cont(attributes);} - if (type == "equals") return cont(attvalue, attributes); - return pass(); -} -function attvalue(type) { - if (type == "keyword") {setStyle = "string"; return cont();} - if (type == "string") return cont(attvaluemaybe); - return pass(); -} -function attvaluemaybe(type) { - if (type == "string") return cont(attvaluemaybe); - else return pass(); -} -return { - startState: function() { - return {tokenize: inText, cc: [], indented: 0, startOfLine: true, pluginName: null, context: null}; - }, - token: function(stream, state) { - if (stream.sol()) { - state.startOfLine = true; - state.indented = stream.indentation(); - } - if (stream.eatSpace()) return null; - - setStyle = type = pluginName = null; - var style = state.tokenize(stream, state); - if ((style || type) && style != "comment") { - curState = state; - while (true) { - var comb = state.cc.pop() || element; - if (comb(type || style)) break; - } - } - state.startOfLine = false; - return setStyle || style; - }, - indent: function(state, textAfter) { - var context = state.context; - if (context && context.noIndent) return 0; - if (context && /^{\//.test(textAfter)) - context = context.prev; - while (context && !context.startOfLine) - context = context.prev; - if (context) return context.indent + indentUnit; - else return 0; - }, - electricChars: "/" - }; -}); - -CodeMirror.defineMIME("text/tiki", "tiki"); diff --git a/plugins/codemirror/codemirror/mode/toml/index.html b/plugins/codemirror/codemirror/mode/toml/index.html deleted file mode 100644 index c59b4cc..0000000 --- a/plugins/codemirror/codemirror/mode/toml/index.html +++ /dev/null @@ -1,73 +0,0 @@ - - -CodeMirror: TOML Mode - - - - - - - - - -
    -

    TOML Mode

    -
    - -

    The TOML Mode

    -

    Created by Forbes Lindesay.

    -

    MIME type defined: text/x-toml.

    -
    diff --git a/plugins/codemirror/codemirror/mode/toml/toml.js b/plugins/codemirror/codemirror/mode/toml/toml.js deleted file mode 100644 index 1d163f1..0000000 --- a/plugins/codemirror/codemirror/mode/toml/toml.js +++ /dev/null @@ -1,71 +0,0 @@ -CodeMirror.defineMode("toml", function () { - return { - startState: function () { - return { - inString: false, - stringType: "", - lhs: true, - inArray: 0 - }; - }, - token: function (stream, state) { - //check for state changes - if (!state.inString && ((stream.peek() == '"') || (stream.peek() == "'"))) { - state.stringType = stream.peek(); - stream.next(); // Skip quote - state.inString = true; // Update state - } - if (stream.sol() && state.inArray === 0) { - state.lhs = true; - } - //return state - if (state.inString) { - while (state.inString && !stream.eol()) { - if (stream.peek() === state.stringType) { - stream.next(); // Skip quote - state.inString = false; // Clear flag - } else if (stream.peek() === '\\') { - stream.next(); - stream.next(); - } else { - stream.match(/^.[^\\\"\']*/); - } - } - return state.lhs ? "property string" : "string"; // Token style - } else if (state.inArray && stream.peek() === ']') { - stream.next(); - state.inArray--; - return 'bracket'; - } else if (state.lhs && stream.peek() === '[' && stream.skipTo(']')) { - stream.next();//skip closing ] - return "atom"; - } else if (stream.peek() === "#") { - stream.skipToEnd(); - return "comment"; - } else if (stream.eatSpace()) { - return null; - } else if (state.lhs && stream.eatWhile(function (c) { return c != '=' && c != ' '; })) { - return "property"; - } else if (state.lhs && stream.peek() === "=") { - stream.next(); - state.lhs = false; - return null; - } else if (!state.lhs && stream.match(/^\d\d\d\d[\d\-\:\.T]*Z/)) { - return 'atom'; //date - } else if (!state.lhs && (stream.match('true') || stream.match('false'))) { - return 'atom'; - } else if (!state.lhs && stream.peek() === '[') { - state.inArray++; - stream.next(); - return 'bracket'; - } else if (!state.lhs && stream.match(/^\-?\d+(?:\.\d+)?/)) { - return 'number'; - } else if (!stream.eatSpace()) { - stream.next(); - } - return null; - } - }; -}); - -CodeMirror.defineMIME('text/x-toml', 'toml'); diff --git a/plugins/codemirror/codemirror/mode/turtle/index.html b/plugins/codemirror/codemirror/mode/turtle/index.html deleted file mode 100644 index 74b5f89..0000000 --- a/plugins/codemirror/codemirror/mode/turtle/index.html +++ /dev/null @@ -1,51 +0,0 @@ - - -CodeMirror: Turtle mode - - - - - - - - - -
    -

    Turtle mode

    -
    - - -

    MIME types defined: text/turtle.

    - -
    diff --git a/plugins/codemirror/codemirror/mode/turtle/turtle.js b/plugins/codemirror/codemirror/mode/turtle/turtle.js deleted file mode 100644 index e118bfb..0000000 --- a/plugins/codemirror/codemirror/mode/turtle/turtle.js +++ /dev/null @@ -1,145 +0,0 @@ -CodeMirror.defineMode("turtle", function(config) { - var indentUnit = config.indentUnit; - var curPunc; - - function wordRegexp(words) { - return new RegExp("^(?:" + words.join("|") + ")$", "i"); - } - var ops = wordRegexp([]); - var keywords = wordRegexp(["@prefix", "@base", "a"]); - var operatorChars = /[*+\-<>=&|]/; - - function tokenBase(stream, state) { - var ch = stream.next(); - curPunc = null; - if (ch == "<" && !stream.match(/^[\s\u00a0=]/, false)) { - stream.match(/^[^\s\u00a0>]*>?/); - return "atom"; - } - else if (ch == "\"" || ch == "'") { - state.tokenize = tokenLiteral(ch); - return state.tokenize(stream, state); - } - else if (/[{}\(\),\.;\[\]]/.test(ch)) { - curPunc = ch; - return null; - } - else if (ch == "#") { - stream.skipToEnd(); - return "comment"; - } - else if (operatorChars.test(ch)) { - stream.eatWhile(operatorChars); - return null; - } - else if (ch == ":") { - return "operator"; - } else { - stream.eatWhile(/[_\w\d]/); - if(stream.peek() == ":") { - return "variable-3"; - } else { - var word = stream.current(); - - if(keywords.test(word)) { - return "meta"; - } - - if(ch >= "A" && ch <= "Z") { - return "comment"; - } else { - return "keyword"; - } - } - var word = stream.current(); - if (ops.test(word)) - return null; - else if (keywords.test(word)) - return "meta"; - else - return "variable"; - } - } - - function tokenLiteral(quote) { - return function(stream, state) { - var escaped = false, ch; - while ((ch = stream.next()) != null) { - if (ch == quote && !escaped) { - state.tokenize = tokenBase; - break; - } - escaped = !escaped && ch == "\\"; - } - return "string"; - }; - } - - function pushContext(state, type, col) { - state.context = {prev: state.context, indent: state.indent, col: col, type: type}; - } - function popContext(state) { - state.indent = state.context.indent; - state.context = state.context.prev; - } - - return { - startState: function() { - return {tokenize: tokenBase, - context: null, - indent: 0, - col: 0}; - }, - - token: function(stream, state) { - if (stream.sol()) { - if (state.context && state.context.align == null) state.context.align = false; - state.indent = stream.indentation(); - } - if (stream.eatSpace()) return null; - var style = state.tokenize(stream, state); - - if (style != "comment" && state.context && state.context.align == null && state.context.type != "pattern") { - state.context.align = true; - } - - if (curPunc == "(") pushContext(state, ")", stream.column()); - else if (curPunc == "[") pushContext(state, "]", stream.column()); - else if (curPunc == "{") pushContext(state, "}", stream.column()); - else if (/[\]\}\)]/.test(curPunc)) { - while (state.context && state.context.type == "pattern") popContext(state); - if (state.context && curPunc == state.context.type) popContext(state); - } - else if (curPunc == "." && state.context && state.context.type == "pattern") popContext(state); - else if (/atom|string|variable/.test(style) && state.context) { - if (/[\}\]]/.test(state.context.type)) - pushContext(state, "pattern", stream.column()); - else if (state.context.type == "pattern" && !state.context.align) { - state.context.align = true; - state.context.col = stream.column(); - } - } - - return style; - }, - - indent: function(state, textAfter) { - var firstChar = textAfter && textAfter.charAt(0); - var context = state.context; - if (/[\]\}]/.test(firstChar)) - while (context && context.type == "pattern") context = context.prev; - - var closing = context && firstChar == context.type; - if (!context) - return 0; - else if (context.type == "pattern") - return context.col; - else if (context.align) - return context.col + (closing ? 0 : 1); - else - return context.indent + (closing ? 0 : indentUnit); - } - }; -}); - -CodeMirror.defineMIME("text/turtle", "turtle"); diff --git a/plugins/codemirror/codemirror/mode/vb/index.html b/plugins/codemirror/codemirror/mode/vb/index.html deleted file mode 100644 index 42c3e52..0000000 --- a/plugins/codemirror/codemirror/mode/vb/index.html +++ /dev/null @@ -1,103 +0,0 @@ - - -CodeMirror: VB.NET mode - - - - - - - - - - - -
    -

    VB.NET mode

    - - - -
    - -
    -
    
    -  

    MIME type defined: text/x-vb.

    - -
    diff --git a/plugins/codemirror/codemirror/mode/vb/vb.js b/plugins/codemirror/codemirror/mode/vb/vb.js deleted file mode 100644 index 27b2271..0000000 --- a/plugins/codemirror/codemirror/mode/vb/vb.js +++ /dev/null @@ -1,259 +0,0 @@ -CodeMirror.defineMode("vb", function(conf, parserConf) { - var ERRORCLASS = 'error'; - - function wordRegexp(words) { - return new RegExp("^((" + words.join(")|(") + "))\\b", "i"); - } - - var singleOperators = new RegExp("^[\\+\\-\\*/%&\\\\|\\^~<>!]"); - var singleDelimiters = new RegExp('^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]'); - var doubleOperators = new RegExp("^((==)|(<>)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))"); - var doubleDelimiters = new RegExp("^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"); - var tripleDelimiters = new RegExp("^((//=)|(>>=)|(<<=)|(\\*\\*=))"); - var identifiers = new RegExp("^[_A-Za-z][_A-Za-z0-9]*"); - - var openingKeywords = ['class','module', 'sub','enum','select','while','if','function', 'get','set','property', 'try']; - var middleKeywords = ['else','elseif','case', 'catch']; - var endKeywords = ['next','loop']; - - var wordOperators = wordRegexp(['and', 'or', 'not', 'xor', 'in']); - var commonkeywords = ['as', 'dim', 'break', 'continue','optional', 'then', 'until', - 'goto', 'byval','byref','new','handles','property', 'return', - 'const','private', 'protected', 'friend', 'public', 'shared', 'static', 'true','false']; - var commontypes = ['integer','string','double','decimal','boolean','short','char', 'float','single']; - - var keywords = wordRegexp(commonkeywords); - var types = wordRegexp(commontypes); - var stringPrefixes = '"'; - - var opening = wordRegexp(openingKeywords); - var middle = wordRegexp(middleKeywords); - var closing = wordRegexp(endKeywords); - var doubleClosing = wordRegexp(['end']); - var doOpening = wordRegexp(['do']); - - var indentInfo = null; - - - - - function indent(_stream, state) { - state.currentIndent++; - } - - function dedent(_stream, state) { - state.currentIndent--; - } - // tokenizers - function tokenBase(stream, state) { - if (stream.eatSpace()) { - return null; - } - - var ch = stream.peek(); - - // Handle Comments - if (ch === "'") { - stream.skipToEnd(); - return 'comment'; - } - - - // Handle Number Literals - if (stream.match(/^((&H)|(&O))?[0-9\.a-f]/i, false)) { - var floatLiteral = false; - // Floats - if (stream.match(/^\d*\.\d+F?/i)) { floatLiteral = true; } - else if (stream.match(/^\d+\.\d*F?/)) { floatLiteral = true; } - else if (stream.match(/^\.\d+F?/)) { floatLiteral = true; } - - if (floatLiteral) { - // Float literals may be "imaginary" - stream.eat(/J/i); - return 'number'; - } - // Integers - var intLiteral = false; - // Hex - if (stream.match(/^&H[0-9a-f]+/i)) { intLiteral = true; } - // Octal - else if (stream.match(/^&O[0-7]+/i)) { intLiteral = true; } - // Decimal - else if (stream.match(/^[1-9]\d*F?/)) { - // Decimal literals may be "imaginary" - stream.eat(/J/i); - // TODO - Can you have imaginary longs? - intLiteral = true; - } - // Zero by itself with no other piece of number. - else if (stream.match(/^0(?![\dx])/i)) { intLiteral = true; } - if (intLiteral) { - // Integer literals may be "long" - stream.eat(/L/i); - return 'number'; - } - } - - // Handle Strings - if (stream.match(stringPrefixes)) { - state.tokenize = tokenStringFactory(stream.current()); - return state.tokenize(stream, state); - } - - // Handle operators and Delimiters - if (stream.match(tripleDelimiters) || stream.match(doubleDelimiters)) { - return null; - } - if (stream.match(doubleOperators) - || stream.match(singleOperators) - || stream.match(wordOperators)) { - return 'operator'; - } - if (stream.match(singleDelimiters)) { - return null; - } - if (stream.match(doOpening)) { - indent(stream,state); - state.doInCurrentLine = true; - return 'keyword'; - } - if (stream.match(opening)) { - if (! state.doInCurrentLine) - indent(stream,state); - else - state.doInCurrentLine = false; - return 'keyword'; - } - if (stream.match(middle)) { - return 'keyword'; - } - - if (stream.match(doubleClosing)) { - dedent(stream,state); - dedent(stream,state); - return 'keyword'; - } - if (stream.match(closing)) { - dedent(stream,state); - return 'keyword'; - } - - if (stream.match(types)) { - return 'keyword'; - } - - if (stream.match(keywords)) { - return 'keyword'; - } - - if (stream.match(identifiers)) { - return 'variable'; - } - - // Handle non-detected items - stream.next(); - return ERRORCLASS; - } - - function tokenStringFactory(delimiter) { - var singleline = delimiter.length == 1; - var OUTCLASS = 'string'; - - return function(stream, state) { - while (!stream.eol()) { - stream.eatWhile(/[^'"]/); - if (stream.match(delimiter)) { - state.tokenize = tokenBase; - return OUTCLASS; - } else { - stream.eat(/['"]/); - } - } - if (singleline) { - if (parserConf.singleLineStringErrors) { - return ERRORCLASS; - } else { - state.tokenize = tokenBase; - } - } - return OUTCLASS; - }; - } - - - function tokenLexer(stream, state) { - var style = state.tokenize(stream, state); - var current = stream.current(); - - // Handle '.' connected identifiers - if (current === '.') { - style = state.tokenize(stream, state); - current = stream.current(); - if (style === 'variable') { - return 'variable'; - } else { - return ERRORCLASS; - } - } - - - var delimiter_index = '[({'.indexOf(current); - if (delimiter_index !== -1) { - indent(stream, state ); - } - if (indentInfo === 'dedent') { - if (dedent(stream, state)) { - return ERRORCLASS; - } - } - delimiter_index = '])}'.indexOf(current); - if (delimiter_index !== -1) { - if (dedent(stream, state)) { - return ERRORCLASS; - } - } - - return style; - } - - var external = { - electricChars:"dDpPtTfFeE ", - startState: function() { - return { - tokenize: tokenBase, - lastToken: null, - currentIndent: 0, - nextLineIndent: 0, - doInCurrentLine: false - - - }; - }, - - token: function(stream, state) { - if (stream.sol()) { - state.currentIndent += state.nextLineIndent; - state.nextLineIndent = 0; - state.doInCurrentLine = 0; - } - var style = tokenLexer(stream, state); - - state.lastToken = {style:style, content: stream.current()}; - - - - return style; - }, - - indent: function(state, textAfter) { - var trueText = textAfter.replace(/^\s+|\s+$/g, '') ; - if (trueText.match(closing) || trueText.match(doubleClosing) || trueText.match(middle)) return conf.indentUnit*(state.currentIndent-1); - if(state.currentIndent < 0) return 0; - return state.currentIndent * conf.indentUnit; - } - - }; - return external; -}); - -CodeMirror.defineMIME("text/x-vb", "vb"); diff --git a/plugins/codemirror/codemirror/mode/vbscript/index.html b/plugins/codemirror/codemirror/mode/vbscript/index.html deleted file mode 100644 index 9b506b7..0000000 --- a/plugins/codemirror/codemirror/mode/vbscript/index.html +++ /dev/null @@ -1,55 +0,0 @@ - - -CodeMirror: VBScript mode - - - - - - - - - -
    -

    VBScript mode

    - - -
    - - - -

    MIME types defined: text/vbscript.

    -
    diff --git a/plugins/codemirror/codemirror/mode/vbscript/vbscript.js b/plugins/codemirror/codemirror/mode/vbscript/vbscript.js deleted file mode 100644 index 0a97fb6..0000000 --- a/plugins/codemirror/codemirror/mode/vbscript/vbscript.js +++ /dev/null @@ -1,334 +0,0 @@ -/* -For extra ASP classic objects, initialize CodeMirror instance with this option: - isASP: true - -E.G.: - var editor = CodeMirror.fromTextArea(document.getElementById("code"), { - lineNumbers: true, - isASP: true - }); -*/ -CodeMirror.defineMode("vbscript", function(conf, parserConf) { - var ERRORCLASS = 'error'; - - function wordRegexp(words) { - return new RegExp("^((" + words.join(")|(") + "))\\b", "i"); - } - - var singleOperators = new RegExp("^[\\+\\-\\*/&\\\\\\^<>=]"); - var doubleOperators = new RegExp("^((<>)|(<=)|(>=))"); - var singleDelimiters = new RegExp('^[\\.,]'); - var brakets = new RegExp('^[\\(\\)]'); - var identifiers = new RegExp("^[A-Za-z][_A-Za-z0-9]*"); - - var openingKeywords = ['class','sub','select','while','if','function', 'property', 'with', 'for']; - var middleKeywords = ['else','elseif','case']; - var endKeywords = ['next','loop','wend']; - - var wordOperators = wordRegexp(['and', 'or', 'not', 'xor', 'is', 'mod', 'eqv', 'imp']); - var commonkeywords = ['dim', 'redim', 'then', 'until', 'randomize', - 'byval','byref','new','property', 'exit', 'in', - 'const','private', 'public', - 'get','set','let', 'stop', 'on error resume next', 'on error goto 0', 'option explicit', 'call', 'me']; - - //This list was from: http://msdn.microsoft.com/en-us/library/f8tbc79x(v=vs.84).aspx - var atomWords = ['true', 'false', 'nothing', 'empty', 'null']; - //This list was from: http://msdn.microsoft.com/en-us/library/3ca8tfek(v=vs.84).aspx - var builtinFuncsWords = ['abs', 'array', 'asc', 'atn', 'cbool', 'cbyte', 'ccur', 'cdate', 'cdbl', 'chr', 'cint', 'clng', 'cos', 'csng', 'cstr', 'date', 'dateadd', 'datediff', 'datepart', - 'dateserial', 'datevalue', 'day', 'escape', 'eval', 'execute', 'exp', 'filter', 'formatcurrency', 'formatdatetime', 'formatnumber', 'formatpercent', 'getlocale', 'getobject', - 'getref', 'hex', 'hour', 'inputbox', 'instr', 'instrrev', 'int', 'fix', 'isarray', 'isdate', 'isempty', 'isnull', 'isnumeric', 'isobject', 'join', 'lbound', 'lcase', 'left', - 'len', 'loadpicture', 'log', 'ltrim', 'rtrim', 'trim', 'maths', 'mid', 'minute', 'month', 'monthname', 'msgbox', 'now', 'oct', 'replace', 'rgb', 'right', 'rnd', 'round', - 'scriptengine', 'scriptenginebuildversion', 'scriptenginemajorversion', 'scriptengineminorversion', 'second', 'setlocale', 'sgn', 'sin', 'space', 'split', 'sqr', 'strcomp', - 'string', 'strreverse', 'tan', 'time', 'timer', 'timeserial', 'timevalue', 'typename', 'ubound', 'ucase', 'unescape', 'vartype', 'weekday', 'weekdayname', 'year']; - - //This list was from: http://msdn.microsoft.com/en-us/library/ydz4cfk3(v=vs.84).aspx - var builtinConsts = ['vbBlack', 'vbRed', 'vbGreen', 'vbYellow', 'vbBlue', 'vbMagenta', 'vbCyan', 'vbWhite', 'vbBinaryCompare', 'vbTextCompare', - 'vbSunday', 'vbMonday', 'vbTuesday', 'vbWednesday', 'vbThursday', 'vbFriday', 'vbSaturday', 'vbUseSystemDayOfWeek', 'vbFirstJan1', 'vbFirstFourDays', 'vbFirstFullWeek', - 'vbGeneralDate', 'vbLongDate', 'vbShortDate', 'vbLongTime', 'vbShortTime', 'vbObjectError', - 'vbOKOnly', 'vbOKCancel', 'vbAbortRetryIgnore', 'vbYesNoCancel', 'vbYesNo', 'vbRetryCancel', 'vbCritical', 'vbQuestion', 'vbExclamation', 'vbInformation', 'vbDefaultButton1', 'vbDefaultButton2', - 'vbDefaultButton3', 'vbDefaultButton4', 'vbApplicationModal', 'vbSystemModal', 'vbOK', 'vbCancel', 'vbAbort', 'vbRetry', 'vbIgnore', 'vbYes', 'vbNo', - 'vbCr', 'VbCrLf', 'vbFormFeed', 'vbLf', 'vbNewLine', 'vbNullChar', 'vbNullString', 'vbTab', 'vbVerticalTab', 'vbUseDefault', 'vbTrue', 'vbFalse', - 'vbEmpty', 'vbNull', 'vbInteger', 'vbLong', 'vbSingle', 'vbDouble', 'vbCurrency', 'vbDate', 'vbString', 'vbObject', 'vbError', 'vbBoolean', 'vbVariant', 'vbDataObject', 'vbDecimal', 'vbByte', 'vbArray']; - //This list was from: http://msdn.microsoft.com/en-us/library/hkc375ea(v=vs.84).aspx - var builtinObjsWords = ['WScript', 'err', 'debug', 'RegExp']; - var knownProperties = ['description', 'firstindex', 'global', 'helpcontext', 'helpfile', 'ignorecase', 'length', 'number', 'pattern', 'source', 'value', 'count']; - var knownMethods = ['clear', 'execute', 'raise', 'replace', 'test', 'write', 'writeline', 'close', 'open', 'state', 'eof', 'update', 'addnew', 'end', 'createobject', 'quit']; - - var aspBuiltinObjsWords = ['server', 'response', 'request', 'session', 'application']; - var aspKnownProperties = ['buffer', 'cachecontrol', 'charset', 'contenttype', 'expires', 'expiresabsolute', 'isclientconnected', 'pics', 'status', //response - 'clientcertificate', 'cookies', 'form', 'querystring', 'servervariables', 'totalbytes', //request - 'contents', 'staticobjects', //application - 'codepage', 'lcid', 'sessionid', 'timeout', //session - 'scripttimeout']; //server - var aspKnownMethods = ['addheader', 'appendtolog', 'binarywrite', 'end', 'flush', 'redirect', //response - 'binaryread', //request - 'remove', 'removeall', 'lock', 'unlock', //application - 'abandon', //session - 'getlasterror', 'htmlencode', 'mappath', 'transfer', 'urlencode']; //server - - var knownWords = knownMethods.concat(knownProperties); - - builtinObjsWords = builtinObjsWords.concat(builtinConsts); - - if (conf.isASP){ - builtinObjsWords = builtinObjsWords.concat(aspBuiltinObjsWords); - knownWords = knownWords.concat(aspKnownMethods, aspKnownProperties); - }; - - var keywords = wordRegexp(commonkeywords); - var atoms = wordRegexp(atomWords); - var builtinFuncs = wordRegexp(builtinFuncsWords); - var builtinObjs = wordRegexp(builtinObjsWords); - var known = wordRegexp(knownWords); - var stringPrefixes = '"'; - - var opening = wordRegexp(openingKeywords); - var middle = wordRegexp(middleKeywords); - var closing = wordRegexp(endKeywords); - var doubleClosing = wordRegexp(['end']); - var doOpening = wordRegexp(['do']); - var noIndentWords = wordRegexp(['on error resume next', 'exit']); - var comment = wordRegexp(['rem']); - - - function indent(_stream, state) { - state.currentIndent++; - } - - function dedent(_stream, state) { - state.currentIndent--; - } - // tokenizers - function tokenBase(stream, state) { - if (stream.eatSpace()) { - return 'space'; - //return null; - } - - var ch = stream.peek(); - - // Handle Comments - if (ch === "'") { - stream.skipToEnd(); - return 'comment'; - } - if (stream.match(comment)){ - stream.skipToEnd(); - return 'comment'; - } - - - // Handle Number Literals - if (stream.match(/^((&H)|(&O))?[0-9\.]/i, false) && !stream.match(/^((&H)|(&O))?[0-9\.]+[a-z_]/i, false)) { - var floatLiteral = false; - // Floats - if (stream.match(/^\d*\.\d+/i)) { floatLiteral = true; } - else if (stream.match(/^\d+\.\d*/)) { floatLiteral = true; } - else if (stream.match(/^\.\d+/)) { floatLiteral = true; } - - if (floatLiteral) { - // Float literals may be "imaginary" - stream.eat(/J/i); - return 'number'; - } - // Integers - var intLiteral = false; - // Hex - if (stream.match(/^&H[0-9a-f]+/i)) { intLiteral = true; } - // Octal - else if (stream.match(/^&O[0-7]+/i)) { intLiteral = true; } - // Decimal - else if (stream.match(/^[1-9]\d*F?/)) { - // Decimal literals may be "imaginary" - stream.eat(/J/i); - // TODO - Can you have imaginary longs? - intLiteral = true; - } - // Zero by itself with no other piece of number. - else if (stream.match(/^0(?![\dx])/i)) { intLiteral = true; } - if (intLiteral) { - // Integer literals may be "long" - stream.eat(/L/i); - return 'number'; - } - } - - // Handle Strings - if (stream.match(stringPrefixes)) { - state.tokenize = tokenStringFactory(stream.current()); - return state.tokenize(stream, state); - } - - // Handle operators and Delimiters - if (stream.match(doubleOperators) - || stream.match(singleOperators) - || stream.match(wordOperators)) { - return 'operator'; - } - if (stream.match(singleDelimiters)) { - return null; - } - - if (stream.match(brakets)) { - return "bracket"; - } - - if (stream.match(noIndentWords)) { - state.doInCurrentLine = true; - - return 'keyword'; - } - - if (stream.match(doOpening)) { - indent(stream,state); - state.doInCurrentLine = true; - - return 'keyword'; - } - if (stream.match(opening)) { - if (! state.doInCurrentLine) - indent(stream,state); - else - state.doInCurrentLine = false; - - return 'keyword'; - } - if (stream.match(middle)) { - return 'keyword'; - } - - - if (stream.match(doubleClosing)) { - dedent(stream,state); - dedent(stream,state); - - return 'keyword'; - } - if (stream.match(closing)) { - if (! state.doInCurrentLine) - dedent(stream,state); - else - state.doInCurrentLine = false; - - return 'keyword'; - } - - if (stream.match(keywords)) { - return 'keyword'; - } - - if (stream.match(atoms)) { - return 'atom'; - } - - if (stream.match(known)) { - return 'variable-2'; - } - - if (stream.match(builtinFuncs)) { - return 'builtin'; - } - - if (stream.match(builtinObjs)){ - return 'variable-2'; - } - - if (stream.match(identifiers)) { - return 'variable'; - } - - // Handle non-detected items - stream.next(); - return ERRORCLASS; - } - - function tokenStringFactory(delimiter) { - var singleline = delimiter.length == 1; - var OUTCLASS = 'string'; - - return function(stream, state) { - while (!stream.eol()) { - stream.eatWhile(/[^'"]/); - if (stream.match(delimiter)) { - state.tokenize = tokenBase; - return OUTCLASS; - } else { - stream.eat(/['"]/); - } - } - if (singleline) { - if (parserConf.singleLineStringErrors) { - return ERRORCLASS; - } else { - state.tokenize = tokenBase; - } - } - return OUTCLASS; - }; - } - - - function tokenLexer(stream, state) { - var style = state.tokenize(stream, state); - var current = stream.current(); - - // Handle '.' connected identifiers - if (current === '.') { - style = state.tokenize(stream, state); - - current = stream.current(); - if (style.substr(0, 8) === 'variable' || style==='builtin' || style==='keyword'){//|| knownWords.indexOf(current.substring(1)) > -1) { - if (style === 'builtin' || style === 'keyword') style='variable'; - if (knownWords.indexOf(current.substr(1)) > -1) style='variable-2'; - - return style; - } else { - return ERRORCLASS; - } - } - - return style; - } - - var external = { - electricChars:"dDpPtTfFeE ", - startState: function() { - return { - tokenize: tokenBase, - lastToken: null, - currentIndent: 0, - nextLineIndent: 0, - doInCurrentLine: false, - ignoreKeyword: false - - - }; - }, - - token: function(stream, state) { - if (stream.sol()) { - state.currentIndent += state.nextLineIndent; - state.nextLineIndent = 0; - state.doInCurrentLine = 0; - } - var style = tokenLexer(stream, state); - - state.lastToken = {style:style, content: stream.current()}; - - if (style==='space') style=null; - - return style; - }, - - indent: function(state, textAfter) { - var trueText = textAfter.replace(/^\s+|\s+$/g, '') ; - if (trueText.match(closing) || trueText.match(doubleClosing) || trueText.match(middle)) return conf.indentUnit*(state.currentIndent-1); - if(state.currentIndent < 0) return 0; - return state.currentIndent * conf.indentUnit; - } - - }; - return external; -}); - -CodeMirror.defineMIME("text/vbscript", "vbscript"); diff --git a/plugins/codemirror/codemirror/mode/velocity/index.html b/plugins/codemirror/codemirror/mode/velocity/index.html deleted file mode 100644 index 023542d..0000000 --- a/plugins/codemirror/codemirror/mode/velocity/index.html +++ /dev/null @@ -1,119 +0,0 @@ - - -CodeMirror: Velocity mode - - - - - - - - - - -
    -

    Velocity mode

    -
    - - -

    MIME types defined: text/velocity.

    - -
    diff --git a/plugins/codemirror/codemirror/mode/velocity/velocity.js b/plugins/codemirror/codemirror/mode/velocity/velocity.js deleted file mode 100644 index 968d879..0000000 --- a/plugins/codemirror/codemirror/mode/velocity/velocity.js +++ /dev/null @@ -1,186 +0,0 @@ -CodeMirror.defineMode("velocity", function() { - function parseWords(str) { - var obj = {}, words = str.split(" "); - for (var i = 0; i < words.length; ++i) obj[words[i]] = true; - return obj; - } - - var keywords = parseWords("#end #else #break #stop #[[ #]] " + - "#{end} #{else} #{break} #{stop}"); - var functions = parseWords("#if #elseif #foreach #set #include #parse #macro #define #evaluate " + - "#{if} #{elseif} #{foreach} #{set} #{include} #{parse} #{macro} #{define} #{evaluate}"); - var specials = parseWords("$foreach.count $foreach.hasNext $foreach.first $foreach.last $foreach.topmost $foreach.parent.count $foreach.parent.hasNext $foreach.parent.first $foreach.parent.last $foreach.parent $velocityCount $!bodyContent $bodyContent"); - var isOperatorChar = /[+\-*&%=<>!?:\/|]/; - - function chain(stream, state, f) { - state.tokenize = f; - return f(stream, state); - } - function tokenBase(stream, state) { - var beforeParams = state.beforeParams; - state.beforeParams = false; - var ch = stream.next(); - // start of unparsed string? - if ((ch == "'") && state.inParams) { - state.lastTokenWasBuiltin = false; - return chain(stream, state, tokenString(ch)); - } - // start of parsed string? - else if ((ch == '"')) { - state.lastTokenWasBuiltin = false; - if (state.inString) { - state.inString = false; - return "string"; - } - else if (state.inParams) - return chain(stream, state, tokenString(ch)); - } - // is it one of the special signs []{}().,;? Seperator? - else if (/[\[\]{}\(\),;\.]/.test(ch)) { - if (ch == "(" && beforeParams) - state.inParams = true; - else if (ch == ")") { - state.inParams = false; - state.lastTokenWasBuiltin = true; - } - return null; - } - // start of a number value? - else if (/\d/.test(ch)) { - state.lastTokenWasBuiltin = false; - stream.eatWhile(/[\w\.]/); - return "number"; - } - // multi line comment? - else if (ch == "#" && stream.eat("*")) { - state.lastTokenWasBuiltin = false; - return chain(stream, state, tokenComment); - } - // unparsed content? - else if (ch == "#" && stream.match(/ *\[ *\[/)) { - state.lastTokenWasBuiltin = false; - return chain(stream, state, tokenUnparsed); - } - // single line comment? - else if (ch == "#" && stream.eat("#")) { - state.lastTokenWasBuiltin = false; - stream.skipToEnd(); - return "comment"; - } - // variable? - else if (ch == "$") { - stream.eatWhile(/[\w\d\$_\.{}]/); - // is it one of the specials? - if (specials && specials.propertyIsEnumerable(stream.current())) { - return "keyword"; - } - else { - state.lastTokenWasBuiltin = true; - state.beforeParams = true; - return "builtin"; - } - } - // is it a operator? - else if (isOperatorChar.test(ch)) { - state.lastTokenWasBuiltin = false; - stream.eatWhile(isOperatorChar); - return "operator"; - } - else { - // get the whole word - stream.eatWhile(/[\w\$_{}@]/); - var word = stream.current(); - // is it one of the listed keywords? - if (keywords && keywords.propertyIsEnumerable(word)) - return "keyword"; - // is it one of the listed functions? - if (functions && functions.propertyIsEnumerable(word) || - (stream.current().match(/^#@?[a-z0-9_]+ *$/i) && stream.peek()=="(") && - !(functions && functions.propertyIsEnumerable(word.toLowerCase()))) { - state.beforeParams = true; - state.lastTokenWasBuiltin = false; - return "keyword"; - } - if (state.inString) { - state.lastTokenWasBuiltin = false; - return "string"; - } - if (stream.pos > word.length && stream.string.charAt(stream.pos-word.length-1)=="." && state.lastTokenWasBuiltin) - return "builtin"; - // default: just a "word" - state.lastTokenWasBuiltin = false; - return null; - } - } - - function tokenString(quote) { - return function(stream, state) { - var escaped = false, next, end = false; - while ((next = stream.next()) != null) { - if ((next == quote) && !escaped) { - end = true; - break; - } - if (quote=='"' && stream.peek() == '$' && !escaped) { - state.inString = true; - end = true; - break; - } - escaped = !escaped && next == "\\"; - } - if (end) state.tokenize = tokenBase; - return "string"; - }; - } - - function tokenComment(stream, state) { - var maybeEnd = false, ch; - while (ch = stream.next()) { - if (ch == "#" && maybeEnd) { - state.tokenize = tokenBase; - break; - } - maybeEnd = (ch == "*"); - } - return "comment"; - } - - function tokenUnparsed(stream, state) { - var maybeEnd = 0, ch; - while (ch = stream.next()) { - if (ch == "#" && maybeEnd == 2) { - state.tokenize = tokenBase; - break; - } - if (ch == "]") - maybeEnd++; - else if (ch != " ") - maybeEnd = 0; - } - return "meta"; - } - // Interface - - return { - startState: function() { - return { - tokenize: tokenBase, - beforeParams: false, - inParams: false, - inString: false, - lastTokenWasBuiltin: false - }; - }, - - token: function(stream, state) { - if (stream.eatSpace()) return null; - return state.tokenize(stream, state); - }, - blockCommentStart: "#*", - blockCommentEnd: "*#", - lineComment: "##", - fold: "velocity" - }; -}); - -CodeMirror.defineMIME("text/velocity", "velocity"); diff --git a/plugins/codemirror/codemirror/mode/verilog/index.html b/plugins/codemirror/codemirror/mode/verilog/index.html deleted file mode 100644 index cc71056..0000000 --- a/plugins/codemirror/codemirror/mode/verilog/index.html +++ /dev/null @@ -1,132 +0,0 @@ - - -CodeMirror: Verilog mode - - - - - - - - - -
    -

    Verilog mode

    -
    - - - -

    Simple mode that tries to handle Verilog-like languages as well as it - can. Takes one configuration parameters: keywords, an - object whose property names are the keywords in the language.

    - -

    MIME types defined: text/x-verilog (Verilog code).

    -
    diff --git a/plugins/codemirror/codemirror/mode/verilog/verilog.js b/plugins/codemirror/codemirror/mode/verilog/verilog.js deleted file mode 100644 index 708de23..0000000 --- a/plugins/codemirror/codemirror/mode/verilog/verilog.js +++ /dev/null @@ -1,182 +0,0 @@ -CodeMirror.defineMode("verilog", function(config, parserConfig) { - var indentUnit = config.indentUnit, - keywords = parserConfig.keywords || {}, - blockKeywords = parserConfig.blockKeywords || {}, - atoms = parserConfig.atoms || {}, - hooks = parserConfig.hooks || {}, - multiLineStrings = parserConfig.multiLineStrings; - var isOperatorChar = /[&|~> - -CodeMirror: XML mode - - - - - - - - - -
    -

    XML mode

    -
    - -

    The XML mode supports two configuration parameters:

    -
    -
    htmlMode (boolean)
    -
    This switches the mode to parse HTML instead of XML. This - means attributes do not have to be quoted, and some elements - (such as br) do not require a closing tag.
    -
    alignCDATA (boolean)
    -
    Setting this to true will force the opening tag of CDATA - blocks to not be indented.
    -
    - -

    MIME types defined: application/xml, text/html.

    -
    diff --git a/plugins/codemirror/codemirror/mode/xml/xml.js b/plugins/codemirror/codemirror/mode/xml/xml.js deleted file mode 100644 index 4f49e07..0000000 --- a/plugins/codemirror/codemirror/mode/xml/xml.js +++ /dev/null @@ -1,345 +0,0 @@ -CodeMirror.defineMode("xml", function(config, parserConfig) { - var indentUnit = config.indentUnit; - var multilineTagIndentFactor = parserConfig.multilineTagIndentFactor || 1; - var multilineTagIndentPastTag = parserConfig.multilineTagIndentPastTag || true; - - var Kludges = parserConfig.htmlMode ? { - autoSelfClosers: {'area': true, 'base': true, 'br': true, 'col': true, 'command': true, - 'embed': true, 'frame': true, 'hr': true, 'img': true, 'input': true, - 'keygen': true, 'link': true, 'meta': true, 'param': true, 'source': true, - 'track': true, 'wbr': true}, - implicitlyClosed: {'dd': true, 'li': true, 'optgroup': true, 'option': true, 'p': true, - 'rp': true, 'rt': true, 'tbody': true, 'td': true, 'tfoot': true, - 'th': true, 'tr': true}, - contextGrabbers: { - 'dd': {'dd': true, 'dt': true}, - 'dt': {'dd': true, 'dt': true}, - 'li': {'li': true}, - 'option': {'option': true, 'optgroup': true}, - 'optgroup': {'optgroup': true}, - 'p': {'address': true, 'article': true, 'aside': true, 'blockquote': true, 'dir': true, - 'div': true, 'dl': true, 'fieldset': true, 'footer': true, 'form': true, - 'h1': true, 'h2': true, 'h3': true, 'h4': true, 'h5': true, 'h6': true, - 'header': true, 'hgroup': true, 'hr': true, 'menu': true, 'nav': true, 'ol': true, - 'p': true, 'pre': true, 'section': true, 'table': true, 'ul': true}, - 'rp': {'rp': true, 'rt': true}, - 'rt': {'rp': true, 'rt': true}, - 'tbody': {'tbody': true, 'tfoot': true}, - 'td': {'td': true, 'th': true}, - 'tfoot': {'tbody': true}, - 'th': {'td': true, 'th': true}, - 'thead': {'tbody': true, 'tfoot': true}, - 'tr': {'tr': true} - }, - doNotIndent: {"pre": true}, - allowUnquoted: true, - allowMissing: true - } : { - autoSelfClosers: {}, - implicitlyClosed: {}, - contextGrabbers: {}, - doNotIndent: {}, - allowUnquoted: false, - allowMissing: false - }; - var alignCDATA = parserConfig.alignCDATA; - - // Return variables for tokenizers - var tagName, type; - - function inText(stream, state) { - function chain(parser) { - state.tokenize = parser; - return parser(stream, state); - } - - var ch = stream.next(); - if (ch == "<") { - if (stream.eat("!")) { - if (stream.eat("[")) { - if (stream.match("CDATA[")) return chain(inBlock("atom", "]]>")); - else return null; - } else if (stream.match("--")) { - return chain(inBlock("comment", "-->")); - } else if (stream.match("DOCTYPE", true, true)) { - stream.eatWhile(/[\w\._\-]/); - return chain(doctype(1)); - } else { - return null; - } - } else if (stream.eat("?")) { - stream.eatWhile(/[\w\._\-]/); - state.tokenize = inBlock("meta", "?>"); - return "meta"; - } else { - var isClose = stream.eat("/"); - tagName = ""; - var c; - while ((c = stream.eat(/[^\s\u00a0=<>\"\'\/?]/))) tagName += c; - if (!tagName) return "tag error"; - type = isClose ? "closeTag" : "openTag"; - state.tokenize = inTag; - return "tag"; - } - } else if (ch == "&") { - var ok; - if (stream.eat("#")) { - if (stream.eat("x")) { - ok = stream.eatWhile(/[a-fA-F\d]/) && stream.eat(";"); - } else { - ok = stream.eatWhile(/[\d]/) && stream.eat(";"); - } - } else { - ok = stream.eatWhile(/[\w\.\-:]/) && stream.eat(";"); - } - return ok ? "atom" : "error"; - } else { - stream.eatWhile(/[^&<]/); - return null; - } - } - - function inTag(stream, state) { - var ch = stream.next(); - if (ch == ">" || (ch == "/" && stream.eat(">"))) { - state.tokenize = inText; - type = ch == ">" ? "endTag" : "selfcloseTag"; - return "tag"; - } else if (ch == "=") { - type = "equals"; - return null; - } else if (ch == "<") { - state.tokenize = inText; - var next = state.tokenize(stream, state); - return next ? next + " error" : "error"; - } else if (/[\'\"]/.test(ch)) { - state.tokenize = inAttribute(ch); - state.stringStartCol = stream.column(); - return state.tokenize(stream, state); - } else { - stream.eatWhile(/[^\s\u00a0=<>\"\']/); - return "word"; - } - } - - function inAttribute(quote) { - var closure = function(stream, state) { - while (!stream.eol()) { - if (stream.next() == quote) { - state.tokenize = inTag; - break; - } - } - return "string"; - }; - closure.isInAttribute = true; - return closure; - } - - function inBlock(style, terminator) { - return function(stream, state) { - while (!stream.eol()) { - if (stream.match(terminator)) { - state.tokenize = inText; - break; - } - stream.next(); - } - return style; - }; - } - function doctype(depth) { - return function(stream, state) { - var ch; - while ((ch = stream.next()) != null) { - if (ch == "<") { - state.tokenize = doctype(depth + 1); - return state.tokenize(stream, state); - } else if (ch == ">") { - if (depth == 1) { - state.tokenize = inText; - break; - } else { - state.tokenize = doctype(depth - 1); - return state.tokenize(stream, state); - } - } - } - return "meta"; - }; - } - - var curState, curStream, setStyle; - function pass() { - for (var i = arguments.length - 1; i >= 0; i--) curState.cc.push(arguments[i]); - } - function cont() { - pass.apply(null, arguments); - return true; - } - - function pushContext(tagName, startOfLine) { - var noIndent = Kludges.doNotIndent.hasOwnProperty(tagName) || (curState.context && curState.context.noIndent); - curState.context = { - prev: curState.context, - tagName: tagName, - indent: curState.indented, - startOfLine: startOfLine, - noIndent: noIndent - }; - } - function popContext() { - if (curState.context) curState.context = curState.context.prev; - } - - function element(type) { - if (type == "openTag") { - curState.tagName = tagName; - curState.tagStart = curStream.column(); - return cont(attributes, endtag(curState.startOfLine)); - } else if (type == "closeTag") { - var err = false; - if (curState.context) { - if (curState.context.tagName != tagName) { - if (Kludges.implicitlyClosed.hasOwnProperty(curState.context.tagName.toLowerCase())) { - popContext(); - } - err = !curState.context || curState.context.tagName != tagName; - } - } else { - err = true; - } - if (err) setStyle = "error"; - return cont(endclosetag(err)); - } - return cont(); - } - function endtag(startOfLine) { - return function(type) { - var tagName = curState.tagName; - curState.tagName = curState.tagStart = null; - if (type == "selfcloseTag" || - (type == "endTag" && Kludges.autoSelfClosers.hasOwnProperty(tagName.toLowerCase()))) { - maybePopContext(tagName.toLowerCase()); - return cont(); - } - if (type == "endTag") { - maybePopContext(tagName.toLowerCase()); - pushContext(tagName, startOfLine); - return cont(); - } - return cont(); - }; - } - function endclosetag(err) { - return function(type) { - if (err) setStyle = "error"; - if (type == "endTag") { popContext(); return cont(); } - setStyle = "error"; - return cont(arguments.callee); - }; - } - function maybePopContext(nextTagName) { - var parentTagName; - while (true) { - if (!curState.context) { - return; - } - parentTagName = curState.context.tagName.toLowerCase(); - if (!Kludges.contextGrabbers.hasOwnProperty(parentTagName) || - !Kludges.contextGrabbers[parentTagName].hasOwnProperty(nextTagName)) { - return; - } - popContext(); - } - } - - function attributes(type) { - if (type == "word") {setStyle = "attribute"; return cont(attribute, attributes);} - if (type == "endTag" || type == "selfcloseTag") return pass(); - setStyle = "error"; - return cont(attributes); - } - function attribute(type) { - if (type == "equals") return cont(attvalue, attributes); - if (!Kludges.allowMissing) setStyle = "error"; - else if (type == "word") {setStyle = "attribute"; return cont(attribute, attributes);} - return (type == "endTag" || type == "selfcloseTag") ? pass() : cont(); - } - function attvalue(type) { - if (type == "string") return cont(attvaluemaybe); - if (type == "word" && Kludges.allowUnquoted) {setStyle = "string"; return cont();} - setStyle = "error"; - return (type == "endTag" || type == "selfCloseTag") ? pass() : cont(); - } - function attvaluemaybe(type) { - if (type == "string") return cont(attvaluemaybe); - else return pass(); - } - - return { - startState: function() { - return {tokenize: inText, cc: [], indented: 0, startOfLine: true, tagName: null, tagStart: null, context: null}; - }, - - token: function(stream, state) { - if (!state.tagName && stream.sol()) { - state.startOfLine = true; - state.indented = stream.indentation(); - } - if (stream.eatSpace()) return null; - - setStyle = type = tagName = null; - var style = state.tokenize(stream, state); - state.type = type; - if ((style || type) && style != "comment") { - curState = state; curStream = stream; - while (true) { - var comb = state.cc.pop() || element; - if (comb(type || style)) break; - } - } - state.startOfLine = false; - if (setStyle) - style = setStyle == "error" ? style + " error" : setStyle; - return style; - }, - - indent: function(state, textAfter, fullLine) { - var context = state.context; - // Indent multi-line strings (e.g. css). - if (state.tokenize.isInAttribute) { - return state.stringStartCol + 1; - } - if ((state.tokenize != inTag && state.tokenize != inText) || - context && context.noIndent) - return fullLine ? fullLine.match(/^(\s*)/)[0].length : 0; - // Indent the starts of attribute names. - if (state.tagName) { - if (multilineTagIndentPastTag) - return state.tagStart + state.tagName.length + 2; - else - return state.tagStart + indentUnit * multilineTagIndentFactor; - } - if (alignCDATA && /", - - configuration: parserConfig.htmlMode ? "html" : "xml", - helperType: parserConfig.htmlMode ? "html" : "xml" - }; -}); - -CodeMirror.defineMIME("text/xml", "xml"); -CodeMirror.defineMIME("application/xml", "xml"); -if (!CodeMirror.mimeModes.hasOwnProperty("text/html")) - CodeMirror.defineMIME("text/html", {name: "xml", htmlMode: true}); diff --git a/plugins/codemirror/codemirror/mode/xquery/index.html b/plugins/codemirror/codemirror/mode/xquery/index.html deleted file mode 100644 index 3baf5e3..0000000 --- a/plugins/codemirror/codemirror/mode/xquery/index.html +++ /dev/null @@ -1,210 +0,0 @@ - - -CodeMirror: XQuery mode - - - - - - - - - - -
    -

    XQuery mode

    - - -
    - -
    - - - -

    MIME types defined: application/xquery.

    - -

    Development of the CodeMirror XQuery mode was sponsored by - MarkLogic and developed by - Mike Brevoort. -

    - -
    diff --git a/plugins/codemirror/codemirror/mode/xquery/test.js b/plugins/codemirror/codemirror/mode/xquery/test.js deleted file mode 100644 index 41719dd..0000000 --- a/plugins/codemirror/codemirror/mode/xquery/test.js +++ /dev/null @@ -1,64 +0,0 @@ -// Don't take these too seriously -- the expected results appear to be -// based on the results of actual runs without any serious manual -// verification. If a change you made causes them to fail, the test is -// as likely to wrong as the code. - -(function() { - var mode = CodeMirror.getMode({tabSize: 4}, "xquery"); - function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } - - MT("eviltest", - "[keyword xquery] [keyword version] [variable "1][keyword .][atom 0][keyword -][variable ml"][def&variable ;] [comment (: this is : a \"comment\" :)]", - " [keyword let] [variable $let] [keyword :=] [variable <x] [variable attr][keyword =][variable "value">"test"<func>][def&variable ;function]() [variable $var] {[keyword function]()} {[variable $var]}[variable <][keyword /][variable func><][keyword /][variable x>]", - " [keyword let] [variable $joe][keyword :=][atom 1]", - " [keyword return] [keyword element] [variable element] {", - " [keyword attribute] [variable attribute] { [atom 1] },", - " [keyword element] [variable test] { [variable 'a'] }, [keyword attribute] [variable foo] { [variable "bar"] },", - " [def&variable fn:doc]()[[ [variable foo][keyword /][variable @bar] [keyword eq] [variable $let] ]],", - " [keyword //][variable x] } [comment (: a more 'evil' test :)]", - " [comment (: Modified Blakeley example (: with nested comment :) ... :)]", - " [keyword declare] [keyword private] [keyword function] [def&variable local:declare]() {()}[variable ;]", - " [keyword declare] [keyword private] [keyword function] [def&variable local:private]() {()}[variable ;]", - " [keyword declare] [keyword private] [keyword function] [def&variable local:function]() {()}[variable ;]", - " [keyword declare] [keyword private] [keyword function] [def&variable local:local]() {()}[variable ;]", - " [keyword let] [variable $let] [keyword :=] [variable <let>let] [variable $let] [keyword :=] [variable "let"<][keyword /let][variable >]", - " [keyword return] [keyword element] [variable element] {", - " [keyword attribute] [variable attribute] { [keyword try] { [def&variable xdmp:version]() } [keyword catch]([variable $e]) { [def&variable xdmp:log]([variable $e]) } },", - " [keyword attribute] [variable fn:doc] { [variable "bar"] [variable castable] [keyword as] [atom xs:string] },", - " [keyword element] [variable text] { [keyword text] { [variable "text"] } },", - " [def&variable fn:doc]()[[ [qualifier child::][variable eq][keyword /]([variable @bar] [keyword |] [qualifier attribute::][variable attribute]) [keyword eq] [variable $let] ]],", - " [keyword //][variable fn:doc]", - " }"); - - MT("testEmptySequenceKeyword", - "[string \"foo\"] [keyword instance] [keyword of] [keyword empty-sequence]()"); - - MT("testMultiAttr", - "[tag

    ][variable hello] [variable world][tag

    ]"); - - MT("test namespaced variable", - "[keyword declare] [keyword namespace] [variable e] [keyword =] [string \"http://example.com/ANamespace\"][variable ;declare] [keyword variable] [variable $e:exampleComThisVarIsNotRecognized] [keyword as] [keyword element]([keyword *]) [variable external;]"); - - MT("test EQName variable", - "[keyword declare] [keyword variable] [variable $\"http://www.example.com/ns/my\":var] [keyword :=] [atom 12][variable ;]", - "[tag ]{[variable $\"http://www.example.com/ns/my\":var]}[tag ]"); - - MT("test EQName function", - "[keyword declare] [keyword function] [def&variable \"http://www.example.com/ns/my\":fn] ([variable $a] [keyword as] [atom xs:integer]) [keyword as] [atom xs:integer] {", - " [variable $a] [keyword +] [atom 2]", - "}[variable ;]", - "[tag ]{[def&variable \"http://www.example.com/ns/my\":fn]([atom 12])}[tag ]"); - - MT("test EQName function with single quotes", - "[keyword declare] [keyword function] [def&variable 'http://www.example.com/ns/my':fn] ([variable $a] [keyword as] [atom xs:integer]) [keyword as] [atom xs:integer] {", - " [variable $a] [keyword +] [atom 2]", - "}[variable ;]", - "[tag ]{[def&variable 'http://www.example.com/ns/my':fn]([atom 12])}[tag ]"); - - MT("testProcessingInstructions", - "[def&variable data]([comment&meta ]) [keyword instance] [keyword of] [atom xs:string]"); - - MT("testQuoteEscapeDouble", - "[keyword let] [variable $rootfolder] [keyword :=] [string \"c:\\builds\\winnt\\HEAD\\qa\\scripts\\\"]", - "[keyword let] [variable $keysfolder] [keyword :=] [def&variable concat]([variable $rootfolder], [string \"keys\\\"])"); -})(); diff --git a/plugins/codemirror/codemirror/mode/xquery/xquery.js b/plugins/codemirror/codemirror/mode/xquery/xquery.js deleted file mode 100644 index be17984..0000000 --- a/plugins/codemirror/codemirror/mode/xquery/xquery.js +++ /dev/null @@ -1,432 +0,0 @@ -CodeMirror.defineMode("xquery", function() { - - // The keywords object is set to the result of this self executing - // function. Each keyword is a property of the keywords object whose - // value is {type: atype, style: astyle} - var keywords = function(){ - // conveinence functions used to build keywords object - function kw(type) {return {type: type, style: "keyword"};} - var A = kw("keyword a") - , B = kw("keyword b") - , C = kw("keyword c") - , operator = kw("operator") - , atom = {type: "atom", style: "atom"} - , punctuation = {type: "punctuation", style: null} - , qualifier = {type: "axis_specifier", style: "qualifier"}; - - // kwObj is what is return from this function at the end - var kwObj = { - 'if': A, 'switch': A, 'while': A, 'for': A, - 'else': B, 'then': B, 'try': B, 'finally': B, 'catch': B, - 'element': C, 'attribute': C, 'let': C, 'implements': C, 'import': C, 'module': C, 'namespace': C, - 'return': C, 'super': C, 'this': C, 'throws': C, 'where': C, 'private': C, - ',': punctuation, - 'null': atom, 'fn:false()': atom, 'fn:true()': atom - }; - - // a list of 'basic' keywords. For each add a property to kwObj with the value of - // {type: basic[i], style: "keyword"} e.g. 'after' --> {type: "after", style: "keyword"} - var basic = ['after','ancestor','ancestor-or-self','and','as','ascending','assert','attribute','before', - 'by','case','cast','child','comment','declare','default','define','descendant','descendant-or-self', - 'descending','document','document-node','element','else','eq','every','except','external','following', - 'following-sibling','follows','for','function','if','import','in','instance','intersect','item', - 'let','module','namespace','node','node','of','only','or','order','parent','precedes','preceding', - 'preceding-sibling','processing-instruction','ref','return','returns','satisfies','schema','schema-element', - 'self','some','sortby','stable','text','then','to','treat','typeswitch','union','variable','version','where', - 'xquery', 'empty-sequence']; - for(var i=0, l=basic.length; i < l; i++) { kwObj[basic[i]] = kw(basic[i]);}; - - // a list of types. For each add a property to kwObj with the value of - // {type: "atom", style: "atom"} - var types = ['xs:string', 'xs:float', 'xs:decimal', 'xs:double', 'xs:integer', 'xs:boolean', 'xs:date', 'xs:dateTime', - 'xs:time', 'xs:duration', 'xs:dayTimeDuration', 'xs:time', 'xs:yearMonthDuration', 'numeric', 'xs:hexBinary', - 'xs:base64Binary', 'xs:anyURI', 'xs:QName', 'xs:byte','xs:boolean','xs:anyURI','xf:yearMonthDuration']; - for(var i=0, l=types.length; i < l; i++) { kwObj[types[i]] = atom;}; - - // each operator will add a property to kwObj with value of {type: "operator", style: "keyword"} - var operators = ['eq', 'ne', 'lt', 'le', 'gt', 'ge', ':=', '=', '>', '>=', '<', '<=', '.', '|', '?', 'and', 'or', 'div', 'idiv', 'mod', '*', '/', '+', '-']; - for(var i=0, l=operators.length; i < l; i++) { kwObj[operators[i]] = operator;}; - - // each axis_specifiers will add a property to kwObj with value of {type: "axis_specifier", style: "qualifier"} - var axis_specifiers = ["self::", "attribute::", "child::", "descendant::", "descendant-or-self::", "parent::", - "ancestor::", "ancestor-or-self::", "following::", "preceding::", "following-sibling::", "preceding-sibling::"]; - for(var i=0, l=axis_specifiers.length; i < l; i++) { kwObj[axis_specifiers[i]] = qualifier; }; - - return kwObj; - }(); - - // Used as scratch variables to communicate multiple values without - // consing up tons of objects. - var type, content; - - function ret(tp, style, cont) { - type = tp; content = cont; - return style; - } - - function chain(stream, state, f) { - state.tokenize = f; - return f(stream, state); - } - - // the primary mode tokenizer - function tokenBase(stream, state) { - var ch = stream.next(), - mightBeFunction = false, - isEQName = isEQNameAhead(stream); - - // an XML tag (if not in some sub, chained tokenizer) - if (ch == "<") { - if(stream.match("!--", true)) - return chain(stream, state, tokenXMLComment); - - if(stream.match("![CDATA", false)) { - state.tokenize = tokenCDATA; - return ret("tag", "tag"); - } - - if(stream.match("?", false)) { - return chain(stream, state, tokenPreProcessing); - } - - var isclose = stream.eat("/"); - stream.eatSpace(); - var tagName = "", c; - while ((c = stream.eat(/[^\s\u00a0=<>\"\'\/?]/))) tagName += c; - - return chain(stream, state, tokenTag(tagName, isclose)); - } - // start code block - else if(ch == "{") { - pushStateStack(state,{ type: "codeblock"}); - return ret("", null); - } - // end code block - else if(ch == "}") { - popStateStack(state); - return ret("", null); - } - // if we're in an XML block - else if(isInXmlBlock(state)) { - if(ch == ">") - return ret("tag", "tag"); - else if(ch == "/" && stream.eat(">")) { - popStateStack(state); - return ret("tag", "tag"); - } - else - return ret("word", "variable"); - } - // if a number - else if (/\d/.test(ch)) { - stream.match(/^\d*(?:\.\d*)?(?:E[+\-]?\d+)?/); - return ret("number", "atom"); - } - // comment start - else if (ch === "(" && stream.eat(":")) { - pushStateStack(state, { type: "comment"}); - return chain(stream, state, tokenComment); - } - // quoted string - else if ( !isEQName && (ch === '"' || ch === "'")) - return chain(stream, state, tokenString(ch)); - // variable - else if(ch === "$") { - return chain(stream, state, tokenVariable); - } - // assignment - else if(ch ===":" && stream.eat("=")) { - return ret("operator", "keyword"); - } - // open paren - else if(ch === "(") { - pushStateStack(state, { type: "paren"}); - return ret("", null); - } - // close paren - else if(ch === ")") { - popStateStack(state); - return ret("", null); - } - // open paren - else if(ch === "[") { - pushStateStack(state, { type: "bracket"}); - return ret("", null); - } - // close paren - else if(ch === "]") { - popStateStack(state); - return ret("", null); - } - else { - var known = keywords.propertyIsEnumerable(ch) && keywords[ch]; - - // if there's a EQName ahead, consume the rest of the string portion, it's likely a function - if(isEQName && ch === '\"') while(stream.next() !== '"'){} - if(isEQName && ch === '\'') while(stream.next() !== '\''){} - - // gobble up a word if the character is not known - if(!known) stream.eatWhile(/[\w\$_-]/); - - // gobble a colon in the case that is a lib func type call fn:doc - var foundColon = stream.eat(":"); - - // if there's not a second colon, gobble another word. Otherwise, it's probably an axis specifier - // which should get matched as a keyword - if(!stream.eat(":") && foundColon) { - stream.eatWhile(/[\w\$_-]/); - } - // if the next non whitespace character is an open paren, this is probably a function (if not a keyword of other sort) - if(stream.match(/^[ \t]*\(/, false)) { - mightBeFunction = true; - } - // is the word a keyword? - var word = stream.current(); - known = keywords.propertyIsEnumerable(word) && keywords[word]; - - // if we think it's a function call but not yet known, - // set style to variable for now for lack of something better - if(mightBeFunction && !known) known = {type: "function_call", style: "variable def"}; - - // if the previous word was element, attribute, axis specifier, this word should be the name of that - if(isInXmlConstructor(state)) { - popStateStack(state); - return ret("word", "variable", word); - } - // as previously checked, if the word is element,attribute, axis specifier, call it an "xmlconstructor" and - // push the stack so we know to look for it on the next word - if(word == "element" || word == "attribute" || known.type == "axis_specifier") pushStateStack(state, {type: "xmlconstructor"}); - - // if the word is known, return the details of that else just call this a generic 'word' - return known ? ret(known.type, known.style, word) : - ret("word", "variable", word); - } - } - - // handle comments, including nested - function tokenComment(stream, state) { - var maybeEnd = false, maybeNested = false, nestedCount = 0, ch; - while (ch = stream.next()) { - if (ch == ")" && maybeEnd) { - if(nestedCount > 0) - nestedCount--; - else { - popStateStack(state); - break; - } - } - else if(ch == ":" && maybeNested) { - nestedCount++; - } - maybeEnd = (ch == ":"); - maybeNested = (ch == "("); - } - - return ret("comment", "comment"); - } - - // tokenizer for string literals - // optionally pass a tokenizer function to set state.tokenize back to when finished - function tokenString(quote, f) { - return function(stream, state) { - var ch; - - if(isInString(state) && stream.current() == quote) { - popStateStack(state); - if(f) state.tokenize = f; - return ret("string", "string"); - } - - pushStateStack(state, { type: "string", name: quote, tokenize: tokenString(quote, f) }); - - // if we're in a string and in an XML block, allow an embedded code block - if(stream.match("{", false) && isInXmlAttributeBlock(state)) { - state.tokenize = tokenBase; - return ret("string", "string"); - } - - - while (ch = stream.next()) { - if (ch == quote) { - popStateStack(state); - if(f) state.tokenize = f; - break; - } - else { - // if we're in a string and in an XML block, allow an embedded code block in an attribute - if(stream.match("{", false) && isInXmlAttributeBlock(state)) { - state.tokenize = tokenBase; - return ret("string", "string"); - } - - } - } - - return ret("string", "string"); - }; - } - - // tokenizer for variables - function tokenVariable(stream, state) { - var isVariableChar = /[\w\$_-]/; - - // a variable may start with a quoted EQName so if the next character is quote, consume to the next quote - if(stream.eat("\"")) { - while(stream.next() !== '\"'){}; - stream.eat(":"); - } else { - stream.eatWhile(isVariableChar); - if(!stream.match(":=", false)) stream.eat(":"); - } - stream.eatWhile(isVariableChar); - state.tokenize = tokenBase; - return ret("variable", "variable"); - } - - // tokenizer for XML tags - function tokenTag(name, isclose) { - return function(stream, state) { - stream.eatSpace(); - if(isclose && stream.eat(">")) { - popStateStack(state); - state.tokenize = tokenBase; - return ret("tag", "tag"); - } - // self closing tag without attributes? - if(!stream.eat("/")) - pushStateStack(state, { type: "tag", name: name, tokenize: tokenBase}); - if(!stream.eat(">")) { - state.tokenize = tokenAttribute; - return ret("tag", "tag"); - } - else { - state.tokenize = tokenBase; - } - return ret("tag", "tag"); - }; - } - - // tokenizer for XML attributes - function tokenAttribute(stream, state) { - var ch = stream.next(); - - if(ch == "/" && stream.eat(">")) { - if(isInXmlAttributeBlock(state)) popStateStack(state); - if(isInXmlBlock(state)) popStateStack(state); - return ret("tag", "tag"); - } - if(ch == ">") { - if(isInXmlAttributeBlock(state)) popStateStack(state); - return ret("tag", "tag"); - } - if(ch == "=") - return ret("", null); - // quoted string - if (ch == '"' || ch == "'") - return chain(stream, state, tokenString(ch, tokenAttribute)); - - if(!isInXmlAttributeBlock(state)) - pushStateStack(state, { type: "attribute", tokenize: tokenAttribute}); - - stream.eat(/[a-zA-Z_:]/); - stream.eatWhile(/[-a-zA-Z0-9_:.]/); - stream.eatSpace(); - - // the case where the attribute has not value and the tag was closed - if(stream.match(">", false) || stream.match("/", false)) { - popStateStack(state); - state.tokenize = tokenBase; - } - - return ret("attribute", "attribute"); - } - - // handle comments, including nested - function tokenXMLComment(stream, state) { - var ch; - while (ch = stream.next()) { - if (ch == "-" && stream.match("->", true)) { - state.tokenize = tokenBase; - return ret("comment", "comment"); - } - } - } - - - // handle CDATA - function tokenCDATA(stream, state) { - var ch; - while (ch = stream.next()) { - if (ch == "]" && stream.match("]", true)) { - state.tokenize = tokenBase; - return ret("comment", "comment"); - } - } - } - - // handle preprocessing instructions - function tokenPreProcessing(stream, state) { - var ch; - while (ch = stream.next()) { - if (ch == "?" && stream.match(">", true)) { - state.tokenize = tokenBase; - return ret("comment", "comment meta"); - } - } - } - - - // functions to test the current context of the state - function isInXmlBlock(state) { return isIn(state, "tag"); } - function isInXmlAttributeBlock(state) { return isIn(state, "attribute"); } - function isInXmlConstructor(state) { return isIn(state, "xmlconstructor"); } - function isInString(state) { return isIn(state, "string"); } - - function isEQNameAhead(stream) { - // assume we've already eaten a quote (") - if(stream.current() === '"') - return stream.match(/^[^\"]+\"\:/, false); - else if(stream.current() === '\'') - return stream.match(/^[^\"]+\'\:/, false); - else - return false; - } - - function isIn(state, type) { - return (state.stack.length && state.stack[state.stack.length - 1].type == type); - } - - function pushStateStack(state, newState) { - state.stack.push(newState); - } - - function popStateStack(state) { - state.stack.pop(); - var reinstateTokenize = state.stack.length && state.stack[state.stack.length-1].tokenize; - state.tokenize = reinstateTokenize || tokenBase; - } - - // the interface for the mode API - return { - startState: function() { - return { - tokenize: tokenBase, - cc: [], - stack: [] - }; - }, - - token: function(stream, state) { - if (stream.eatSpace()) return null; - var style = state.tokenize(stream, state); - return style; - }, - - blockCommentStart: "(:", - blockCommentEnd: ":)" - - }; - -}); - -CodeMirror.defineMIME("application/xquery", "xquery"); diff --git a/plugins/codemirror/codemirror/mode/yaml/index.html b/plugins/codemirror/codemirror/mode/yaml/index.html deleted file mode 100644 index bbb40a3..0000000 --- a/plugins/codemirror/codemirror/mode/yaml/index.html +++ /dev/null @@ -1,80 +0,0 @@ - - -CodeMirror: YAML mode - - - - - - - - - -
    -

    YAML mode

    -
    - - -

    MIME types defined: text/x-yaml.

    - -
    diff --git a/plugins/codemirror/codemirror/mode/yaml/yaml.js b/plugins/codemirror/codemirror/mode/yaml/yaml.js deleted file mode 100644 index efacd7d..0000000 --- a/plugins/codemirror/codemirror/mode/yaml/yaml.js +++ /dev/null @@ -1,97 +0,0 @@ -CodeMirror.defineMode("yaml", function() { - - var cons = ['true', 'false', 'on', 'off', 'yes', 'no']; - var keywordRegex = new RegExp("\\b(("+cons.join(")|(")+"))$", 'i'); - - return { - token: function(stream, state) { - var ch = stream.peek(); - var esc = state.escaped; - state.escaped = false; - /* comments */ - if (ch == "#" && (stream.pos == 0 || /\s/.test(stream.string.charAt(stream.pos - 1)))) { - stream.skipToEnd(); return "comment"; - } - if (state.literal && stream.indentation() > state.keyCol) { - stream.skipToEnd(); return "string"; - } else if (state.literal) { state.literal = false; } - if (stream.sol()) { - state.keyCol = 0; - state.pair = false; - state.pairStart = false; - /* document start */ - if(stream.match(/---/)) { return "def"; } - /* document end */ - if (stream.match(/\.\.\./)) { return "def"; } - /* array list item */ - if (stream.match(/\s*-\s+/)) { return 'meta'; } - } - /* inline pairs/lists */ - if (stream.match(/^(\{|\}|\[|\])/)) { - if (ch == '{') - state.inlinePairs++; - else if (ch == '}') - state.inlinePairs--; - else if (ch == '[') - state.inlineList++; - else - state.inlineList--; - return 'meta'; - } - - /* list seperator */ - if (state.inlineList > 0 && !esc && ch == ',') { - stream.next(); - return 'meta'; - } - /* pairs seperator */ - if (state.inlinePairs > 0 && !esc && ch == ',') { - state.keyCol = 0; - state.pair = false; - state.pairStart = false; - stream.next(); - return 'meta'; - } - - /* start of value of a pair */ - if (state.pairStart) { - /* block literals */ - if (stream.match(/^\s*(\||\>)\s*/)) { state.literal = true; return 'meta'; }; - /* references */ - if (stream.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i)) { return 'variable-2'; } - /* numbers */ - if (state.inlinePairs == 0 && stream.match(/^\s*-?[0-9\.\,]+\s?$/)) { return 'number'; } - if (state.inlinePairs > 0 && stream.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/)) { return 'number'; } - /* keywords */ - if (stream.match(keywordRegex)) { return 'keyword'; } - } - - /* pairs (associative arrays) -> key */ - if (!state.pair && stream.match(/^\s*\S+(?=\s*:($|\s))/i)) { - state.pair = true; - state.keyCol = stream.indentation(); - return "atom"; - } - if (state.pair && stream.match(/^:\s*/)) { state.pairStart = true; return 'meta'; } - - /* nothing found, continue */ - state.pairStart = false; - state.escaped = (ch == '\\'); - stream.next(); - return null; - }, - startState: function() { - return { - pair: false, - pairStart: false, - keyCol: 0, - inlinePairs: 0, - inlineList: 0, - literal: false, - escaped: false - }; - } - }; -}); - -CodeMirror.defineMIME("text/x-yaml", "yaml"); diff --git a/plugins/codemirror/codemirror/mode/z80/index.html b/plugins/codemirror/codemirror/mode/z80/index.html deleted file mode 100644 index b63c962..0000000 --- a/plugins/codemirror/codemirror/mode/z80/index.html +++ /dev/null @@ -1,52 +0,0 @@ - - -CodeMirror: Z80 assembly mode - - - - - - - - - -
    -

    Z80 assembly mode

    - - -
    - - - -

    MIME type defined: text/x-z80.

    -
    diff --git a/plugins/codemirror/codemirror/mode/z80/z80.js b/plugins/codemirror/codemirror/mode/z80/z80.js deleted file mode 100644 index ff43d32..0000000 --- a/plugins/codemirror/codemirror/mode/z80/z80.js +++ /dev/null @@ -1,85 +0,0 @@ -CodeMirror.defineMode('z80', function() { - var keywords1 = /^(exx?|(ld|cp|in)([di]r?)?|pop|push|ad[cd]|cpl|daa|dec|inc|neg|sbc|sub|and|bit|[cs]cf|x?or|res|set|r[lr]c?a?|r[lr]d|s[lr]a|srl|djnz|nop|rst|[de]i|halt|im|ot[di]r|out[di]?)\b/i; - var keywords2 = /^(call|j[pr]|ret[in]?)\b/i; - var keywords3 = /^b_?(call|jump)\b/i; - var variables1 = /^(af?|bc?|c|de?|e|hl?|l|i[xy]?|r|sp)\b/i; - var variables2 = /^(n?[zc]|p[oe]?|m)\b/i; - var errors = /^([hl][xy]|i[xy][hl]|slia|sll)\b/i; - var numbers = /^([\da-f]+h|[0-7]+o|[01]+b|\d+)\b/i; - - return { - startState: function() { - return {context: 0}; - }, - token: function(stream, state) { - if (!stream.column()) - state.context = 0; - - if (stream.eatSpace()) - return null; - - var w; - - if (stream.eatWhile(/\w/)) { - w = stream.current(); - - if (stream.indentation()) { - if (state.context == 1 && variables1.test(w)) - return 'variable-2'; - - if (state.context == 2 && variables2.test(w)) - return 'variable-3'; - - if (keywords1.test(w)) { - state.context = 1; - return 'keyword'; - } else if (keywords2.test(w)) { - state.context = 2; - return 'keyword'; - } else if (keywords3.test(w)) { - state.context = 3; - return 'keyword'; - } - - if (errors.test(w)) - return 'error'; - } else if (numbers.test(w)) { - return 'number'; - } else { - return null; - } - } else if (stream.eat(';')) { - stream.skipToEnd(); - return 'comment'; - } else if (stream.eat('"')) { - while (w = stream.next()) { - if (w == '"') - break; - - if (w == '\\') - stream.next(); - } - return 'string'; - } else if (stream.eat('\'')) { - if (stream.match(/\\?.'/)) - return 'number'; - } else if (stream.eat('.') || stream.sol() && stream.eat('#')) { - state.context = 4; - - if (stream.eatWhile(/\w/)) - return 'def'; - } else if (stream.eat('$')) { - if (stream.eatWhile(/[\da-f]/i)) - return 'number'; - } else if (stream.eat('%')) { - if (stream.eatWhile(/[01]/)) - return 'number'; - } else { - stream.next(); - } - return null; - } - }; -}); - -CodeMirror.defineMIME("text/x-z80", "z80"); diff --git a/plugins/codemirror/codemirror/package.json b/plugins/codemirror/codemirror/package.json deleted file mode 100644 index 6c5a122..0000000 --- a/plugins/codemirror/codemirror/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "codemirror", - "version":"3.20.0", - "main": "lib/codemirror.js", - "description": "In-browser code editing made bearable", - "licenses": [{"type": "MIT", - "url": "http://codemirror.net/LICENSE"}], - "directories": {"lib": "./lib"}, - "scripts": {"test": "node ./test/run.js"}, - "devDependencies": {"node-static": "0.6.0"}, - "bugs": "http://github.com/marijnh/CodeMirror/issues", - "keywords": ["JavaScript", "CodeMirror", "Editor"], - "homepage": "http://codemirror.net", - "maintainers":[{"name": "Marijn Haverbeke", - "email": "marijnh@gmail.com", - "web": "http://marijnhaverbeke.nl"}], - "repository": {"type": "git", - "url": "http://marijnhaverbeke.nl/git/codemirror"} -} diff --git a/plugins/codemirror/codemirror/theme/3024-day.css b/plugins/codemirror/codemirror/theme/3024-day.css deleted file mode 100644 index cbb9a4f..0000000 --- a/plugins/codemirror/codemirror/theme/3024-day.css +++ /dev/null @@ -1,34 +0,0 @@ -/* - - Name: 3024 day - Author: Jan T. Sott (http://github.com/idleberg) - - CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror) - Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) - -*/ - -.cm-s-3024-day.CodeMirror {background: #f7f7f7; color: #3a3432;} -.cm-s-3024-day div.CodeMirror-selected {background: #d6d5d4 !important;} -.cm-s-3024-day .CodeMirror-gutters {background: #f7f7f7; border-right: 0px;} -.cm-s-3024-day .CodeMirror-linenumber {color: #807d7c;} -.cm-s-3024-day .CodeMirror-cursor {border-left: 1px solid #5c5855 !important;} - -.cm-s-3024-day span.cm-comment {color: #cdab53;} -.cm-s-3024-day span.cm-atom {color: #a16a94;} -.cm-s-3024-day span.cm-number {color: #a16a94;} - -.cm-s-3024-day span.cm-property, .cm-s-3024-day span.cm-attribute {color: #01a252;} -.cm-s-3024-day span.cm-keyword {color: #db2d20;} -.cm-s-3024-day span.cm-string {color: #fded02;} - -.cm-s-3024-day span.cm-variable {color: #01a252;} -.cm-s-3024-day span.cm-variable-2 {color: #01a0e4;} -.cm-s-3024-day span.cm-def {color: #e8bbd0;} -.cm-s-3024-day span.cm-bracket {color: #3a3432;} -.cm-s-3024-day span.cm-tag {color: #db2d20;} -.cm-s-3024-day span.cm-link {color: #a16a94;} -.cm-s-3024-day span.cm-error {background: #db2d20; color: #5c5855;} - -.cm-s-3024-day .CodeMirror-activeline-background {background: #e8f2ff !important;} -.cm-s-3024-day .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} diff --git a/plugins/codemirror/codemirror/theme/3024-night.css b/plugins/codemirror/codemirror/theme/3024-night.css deleted file mode 100644 index 2c62e22..0000000 --- a/plugins/codemirror/codemirror/theme/3024-night.css +++ /dev/null @@ -1,34 +0,0 @@ -/* - - Name: 3024 night - Author: Jan T. Sott (http://github.com/idleberg) - - CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror) - Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) - -*/ - -.cm-s-3024-night.CodeMirror {background: #090300; color: #d6d5d4;} -.cm-s-3024-night div.CodeMirror-selected {background: #3a3432 !important;} -.cm-s-3024-night .CodeMirror-gutters {background: #090300; border-right: 0px;} -.cm-s-3024-night .CodeMirror-linenumber {color: #5c5855;} -.cm-s-3024-night .CodeMirror-cursor {border-left: 1px solid #807d7c !important;} - -.cm-s-3024-night span.cm-comment {color: #cdab53;} -.cm-s-3024-night span.cm-atom {color: #a16a94;} -.cm-s-3024-night span.cm-number {color: #a16a94;} - -.cm-s-3024-night span.cm-property, .cm-s-3024-night span.cm-attribute {color: #01a252;} -.cm-s-3024-night span.cm-keyword {color: #db2d20;} -.cm-s-3024-night span.cm-string {color: #fded02;} - -.cm-s-3024-night span.cm-variable {color: #01a252;} -.cm-s-3024-night span.cm-variable-2 {color: #01a0e4;} -.cm-s-3024-night span.cm-def {color: #e8bbd0;} -.cm-s-3024-night span.cm-bracket {color: #d6d5d4;} -.cm-s-3024-night span.cm-tag {color: #db2d20;} -.cm-s-3024-night span.cm-link {color: #a16a94;} -.cm-s-3024-night span.cm-error {background: #db2d20; color: #807d7c;} - -.cm-s-3024-night .CodeMirror-activeline-background {background: #2F2F2F !important;} -.cm-s-3024-night .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} diff --git a/plugins/codemirror/codemirror/theme/ambiance-mobile.css b/plugins/codemirror/codemirror/theme/ambiance-mobile.css deleted file mode 100644 index 88d332e..0000000 --- a/plugins/codemirror/codemirror/theme/ambiance-mobile.css +++ /dev/null @@ -1,5 +0,0 @@ -.cm-s-ambiance.CodeMirror { - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} diff --git a/plugins/codemirror/codemirror/theme/ambiance.css b/plugins/codemirror/codemirror/theme/ambiance.css deleted file mode 100644 index 3a54b2a..0000000 --- a/plugins/codemirror/codemirror/theme/ambiance.css +++ /dev/null @@ -1,75 +0,0 @@ -/* ambiance theme for codemirror */ - -/* Color scheme */ - -.cm-s-ambiance .cm-keyword { color: #cda869; } -.cm-s-ambiance .cm-atom { color: #CF7EA9; } -.cm-s-ambiance .cm-number { color: #78CF8A; } -.cm-s-ambiance .cm-def { color: #aac6e3; } -.cm-s-ambiance .cm-variable { color: #ffb795; } -.cm-s-ambiance .cm-variable-2 { color: #eed1b3; } -.cm-s-ambiance .cm-variable-3 { color: #faded3; } -.cm-s-ambiance .cm-property { color: #eed1b3; } -.cm-s-ambiance .cm-operator {color: #fa8d6a;} -.cm-s-ambiance .cm-comment { color: #555; font-style:italic; } -.cm-s-ambiance .cm-string { color: #8f9d6a; } -.cm-s-ambiance .cm-string-2 { color: #9d937c; } -.cm-s-ambiance .cm-meta { color: #D2A8A1; } -.cm-s-ambiance .cm-qualifier { color: yellow; } -.cm-s-ambiance .cm-builtin { color: #9999cc; } -.cm-s-ambiance .cm-bracket { color: #24C2C7; } -.cm-s-ambiance .cm-tag { color: #fee4ff } -.cm-s-ambiance .cm-attribute { color: #9B859D; } -.cm-s-ambiance .cm-header {color: blue;} -.cm-s-ambiance .cm-quote { color: #24C2C7; } -.cm-s-ambiance .cm-hr { color: pink; } -.cm-s-ambiance .cm-link { color: #F4C20B; } -.cm-s-ambiance .cm-special { color: #FF9D00; } -.cm-s-ambiance .cm-error { color: #AF2018; } - -.cm-s-ambiance .CodeMirror-matchingbracket { color: #0f0; } -.cm-s-ambiance .CodeMirror-nonmatchingbracket { color: #f22; } - -.cm-s-ambiance .CodeMirror-selected { - background: rgba(255, 255, 255, 0.15); -} -.cm-s-ambiance.CodeMirror-focused .CodeMirror-selected { - background: rgba(255, 255, 255, 0.10); -} - -/* Editor styling */ - -.cm-s-ambiance.CodeMirror { - line-height: 1.40em; - font-family: Monaco, Menlo,"Andale Mono","lucida console","Courier New",monospace !important; - color: #E6E1DC; - background-color: #202020; - -webkit-box-shadow: inset 0 0 10px black; - -moz-box-shadow: inset 0 0 10px black; - box-shadow: inset 0 0 10px black; -} - -.cm-s-ambiance .CodeMirror-gutters { - background: #3D3D3D; - border-right: 1px solid #4D4D4D; - box-shadow: 0 10px 20px black; -} - -.cm-s-ambiance .CodeMirror-linenumber { - text-shadow: 0px 1px 1px #4d4d4d; - color: #222; - padding: 0 5px; -} - -.cm-s-ambiance .CodeMirror-lines .CodeMirror-cursor { - border-left: 1px solid #7991E8; -} - -.cm-s-ambiance .CodeMirror-activeline-background { - background: none repeat scroll 0% 0% rgba(255, 255, 255, 0.031); -} - -.cm-s-ambiance.CodeMirror, -.cm-s-ambiance .CodeMirror-gutters { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAQAAAAHUWYVAABFFUlEQVQYGbzBCeDVU/74/6fj9HIcx/FRHx9JCFmzMyGRURhLZIkUsoeRfUjS2FNDtr6WkMhO9sm+S8maJfu+Jcsg+/o/c+Z4z/t97/vezy3z+z8ekGlnYICG/o7gdk+wmSHZ1z4pJItqapjoKXWahm8NmV6eOTbWUOp6/6a/XIg6GQqmenJ2lDHyvCFZ2cBDbmtHA043VFhHwXxClWmeYAdLhV00Bd85go8VmaFCkbVkzlQENzfBDZ5gtN7HwF0KDrTwJ0dypSOzpaKCMwQHKTIreYIxlmhXTzTWkVm+LTynZhiSBT3RZQ7aGfjGEd3qyXQ1FDymqbKxpspERQN2MiRjNZlFFQXfCNFm9nM1zpAsoYjmtRTc5ajwuaXc5xrWskT97RaKzAGe5ARHhVUsDbjKklziiX5WROcJwSNCNI+9w1Jwv4Zb2r7lCMZ4oq5C0EdTx+2GzNuKpJ+iFf38JEWkHJn9DNF7mmBDITrWEg0VWL3pHU20tSZnuqWu+R3BtYa8XxV1HO7GyD32UkOpL/yDloINFTmvtId+nmAjxRw40VMwVKiwrKLE4bK5UOVntYwhOcSSXKrJHKPJedocpGjVz/ZMIbnYUPB10/eKCrs5apqpgVmWzBYWpmtKHecJPjaUuEgRDDaU0oZghCJ6zNMQ5ZhDYx05r5v2muQdM0EILtXUsaKiQX9WMEUotagQzFbUNN6NUPC2nm5pxEWGCjMc3GdJHjSU2kORLK/JGSrkfGEIjncU/CYUnOipoYemwj8tST9NsJmB7TUVXtbUtXATJVZXBMvYeTXJfobgJUPmGMP/yFaWonaa6BcFO3nqcIqCozSZoZoSr1g4zJOzuyGnxTEX3lUEJ7WcZgme8ddaWvWJo2AJR9DZU3CUIbhCSG6ybSwN6qtJVnCU2svDTP2ZInOw2cBTrqtQahtNZn9NcJ4l2NaSmSkkP1noZWnVwkLmdUPOwLZEwy2Z3S3R+4rIG9hcbpPXHFVWcQdZkn2FOta3cKWQnNRC5g1LsJah4GCzSVsKnCOY5OAFRTBekyyryeyilhFKva75r4Mc0aWanGEaThcy31s439KKxTzJYY5WTHPU1FtIHjQU3Oip4xlNzj/lBw23dYZVliQa7WAXf4shetcQfatI+jWRDBPmyNeW6A1P5kdDgyYJlba0BIM8BZu1JfrFwItyjcAMR3K0BWOIrtMEXyhyrlVEx3ui5dUBjmB/Q3CXW85R4mBD0s7B+4q5tKUjOlb9qqmhi5AZ6GFIC5HXtOobdYGlVdMVbNJ8toNTFcHxnoL+muBagcctjWnbNMuR00uI7nQESwg5q2qqrKWIfrNUmeQocY6HuyxJV02wj36w00yhpmUFenv4p6fUkZYqLyuinx2RGOjhCXYyJF84oiU00YMOOhhquNdfbOB7gU88pY4xJO8LVdp6/q2voeB4R04vIdhSE40xZObx1HGGJ/ja0LBthFInKaLPPFzuCaYaoj8JjPME8yoyxo6zlBqkiUZYgq00OYMswbWO5NGmq+xhipxHLRW29ARjNKXO0wRnear8XSg4XFPLKEPUS1GqvyLwiuBUoa7zpZ0l5xxFwWmWZC1H5h5FwU8eQ7K+g8UcVY6TMQreVQT/8uQ8Z+ALIXnSEa2pYZQneE9RZbSBNYXfWYJzW/h/4j4Dp1tYVcFIC5019Vyi4ThPqSFCzjGWaHQTBU8q6vrVwgxP9Lkm840imWKpcLCjYTtrKuwvsKSnrvHCXGkSMk9p6lhckfRpIeis+N2PiszT+mFLspyGleUhDwcLrZqmyeylxwjBcKHEapqkmyangyLZRVOijwOtCY5SsG5zL0OwlCJ4y5KznF3EUNDDrinwiyLZRzOXtlBbK5ITHFGLp8Q0R6ab6mS7enI2cFrxOyHvOCFaT1HThS1krjCwqWeurCkk+willhCC+RSZnRXBiZaC5RXRIZYKp2lyfrHwiKPKR0JDzrdU2EFgpidawlFDR6FgXUMNa+g1FY3bUQh2cLCwosRdnuQTS/S+JVrGLeWIvtQUvONJxlqSQYYKpwoN2kaocLjdVsis4Mk80ESF2YpSkzwldjHkjFCUutI/r+EHDU8oCs6yzL3PhWiEooZdFMkymlas4AcI3KmoMMNSQ3tHzjGWCrcJJdYyZC7QFGwjRL9p+MrRkAGWzIaWCn9W0F3TsK01c2ZvQw0byvxuQU0r1lM0qJO7wW0kRIMdDTtXEdzi4VIh+EoIHm0mWtAtpCixlabgn83fKTI7anJe9ST7WIK1DMGpQmYeA58ImV6ezOGOzK2Kgq01pd60cKWiUi9Lievb/0vIDPHQ05Kzt4ddPckQBQtoaurjyHnek/nKzpQLrVgKPjIkh2v4uyezpv+Xoo7fPFXaGFp1vaLKxQ4uUpQQS5VuQs7BCq4xRJv7fwpVvvFEB3j+620haOuocqMhWd6TTPAEx+mdFNGHdranFe95WrWmIvlY4F1Dle2ECgc6cto7SryuqGGGha0tFQ5V53migUKmg6XKAo4qS3mik+0OZpAhOLeZKicacgaYcyx5hypYQE02ZA4xi/pNhOQxR4klNKyqacj+mpxnLTnnGSo85++3ZCZq6lrZkXlGEX3o+C9FieccJbZWVFjC0Yo1FZnJhoYMFoI1hEZ9r6hwg75HwzBNhbZCdJEfJwTPGzJvaKImw1yYX1HDAmpXR+ZJQ/SmgqMNVQb5vgamGwLtt7VwvP7Qk1xpiM5x5Cyv93E06MZmgs0Nya2azIKOYKCGBQQW97RmhKNKF02JZqHEJ4o58qp7X5EcZmc56trXEqzjCBZ1MFGR87Ql2tSTs6CGxS05PTzRQorkbw7aKoKXFDXsYW42VJih/q+FP2BdTzDTwVqOYB13liM50vG7wy28qagyuIXMeQI/Oqq8bcn5wJI50xH00CRntyfpL1T4hydYpoXgNiFzoIUTDZnLNRzh4TBHwbYGDvZkxmlyJloyr6tRihpeUG94GnKtIznREF0tzJG/OOr73JBcrSh1k6WuTprgLU+mnSGnv6Zge0NNz+kTDdH8nuAuTdJDCNb21LCiIuqlYbqGzT3RAoZofQfjFazkqeNWdYaGvYTM001EW2oKPvVk1ldUGSgUtHFwjKM1h9jnFcmy5lChoLNaQMGGDsYbKixlaMBmmsx1QjCfflwTfO/gckW0ruZ3jugKR3R5W9hGUWqCgxuFgsuaCHorotGKzGaeZB9DMsaTnKCpMtwTvOzhYk0rdrArKCqcaWmVk1+F372ur1YkKxgatI8Qfe1gIX9wE9FgS8ESmuABIXnRUbCapcKe+nO7slClSZFzpV/LkLncEb1qiO42fS3R855Su2mCLh62t1SYZZYVmKwIHjREF2uihTzB20JOkz7dkxzYQnK0UOU494wh+VWRc6Un2kpTaVgLDFEkJ/uhzRcI0YKGgpGWOlocBU/a4fKoJ/pEaNV6jip3+Es9VXY078rGnmAdf7t9ylPXS34RBSuYPs1UecZTU78WanhBCHpZ5sAoTz0LGZKjPf9TRypqWEiTvOFglL1fCEY3wY/++rbk7C8bWebA6p6om6PgOL2kp44TFJlVNBXae2rqqdZztOJpT87GQsE9jqCPIe9VReZuQ/CIgacsyZdCpIScSYqcZk8r+nsyCzhyfhOqHGOIvrLknC8wTpFcaYiGC/RU1NRbUeUpocQOnkRpGOrIOcNRx+1uA0UrzhSSt+VyS3SJpnFWkzNDqOFGIWcfR86DnmARTQ1HKIL33ExPiemeOhYSSjzlSUZZuE4TveoJLnBUOFof6KiysCbnAEcZgcUNTDOwkqWu3RWtmGpZwlHhJENdZ3miGz0lJlsKnjbwqSHQjpxnFDlTLLwqJPMZMjd7KrzkSG7VsxXBZE+F8YZkb01Oe00yyRK9psh5SYh29ySPKBo2ylNht7ZkZnsKenjKNJu9PNEyZpaCHv4Kt6RQsLvAVp7M9kIimmCUwGeWqLMmGuIotYMmWNpSahkhZw9FqZsVnKJhsjAHvtHMsTM9fCI06Dx/u3vfUXCqfsKRc4oFY2jMsoo/7DJDwZ1CsIKnJu+J9ldkpmiCxQx1rWjI+T9FwcWWzOuaYH0Hj7klNRVWEQpmaqosakiGNTFHdjS/qnUdmf0NJW5xsL0HhimCCZZSRzmSPTXJQ4aaztAwtZnoabebJ+htCaZ7Cm535ByoqXKbX1WRc4Eh2MkRXWzImVc96Cj4VdOKVxR84VdQsIUM8Psoou2byVHyZFuq7O8otbSQ2UAoeEWTudATLGSpZzVLlXVkPU2Jc+27lsw2jmg5T5VhbeE3BT083K9WsTTkFU/Osi0rC5lRlpwRHUiesNS0sOvmqGML1aRbPAxTJD9ZKtxuob+hhl8cwYGWpJ8nub7t5p6coYbMovZ1BTdaKn1jYD6h4GFDNFyT/Kqe1XCXphXHOKLZmuRSRdBPEfVUXQzJm5YGPGGJdvAEr7hHNdGZnuBvrpciGmopOLf5N0uVMy0FfYToJk90uUCbJupaVpO53UJXR2bVpoU00V2KOo4zMFrBd0Jtz2pa0clT5Q5L8IpQ177mWQejPMEJhuQjS10ref6HHjdEhy1P1EYR7GtO0uSsKJQYLiTnG1rVScj5lyazpqWGl5uBbRWl7m6ixGOOnEsMJR7z8J0n6KMnCdxhiNYQCoZ6CmYLnO8omC3MkW3bktlPmEt/VQQHejL3+dOE5FlPdK/Mq8hZxxJtLyRrepLThYKbLZxkSb5W52vYxNOaOxUF0yxMUPwBTYqCzy01XayYK0sJyWBLqX0MwU5CzoymRzV0EjjeUeLgDpTo6ij42ZAzvD01dHUUTPLU96MdLbBME8nFBn7zJCMtJcZokn8YoqU0FS5WFKyniHobguMcmW8N0XkWZjkyN3hqOMtS08r+/xTBwpZSZ3qiVRX8SzMHHjfUNFjgHEPmY9PL3ykEzxkSre/1ZD6z/NuznuB0RcE1TWTm9zRgfUWVJiG6yrzgmWPXC8EAR4Wxhlad0ZbgQyEz3pG5RVEwwDJH2mgKpjcTiCOzn1lfUWANFbZ2BA8balnEweJC9J0iuaeZoI+ippFCztEKVvckR2iice1JvhVytrQwUAZpgsubCPaU7xUe9vWnaOpaSBEspalykhC9bUlOMpT42ZHca6hyrqKmw/wMR8H5ZmdFoBVJb03O4UL0tSNnvIeRmkrLWqrs78gcrEn2tpcboh0UPOW3UUR9PMk4T4nnNKWmCjlrefhCwxRNztfmIQVdDElvS4m1/WuOujoZCs5XVOjtKPGokJzsYCtFYoWonSPT21DheU/wWhM19FcElwqNGOsp9Q8N/cwXaiND1MmeL1Q5XROtYYgGeFq1aTMsoMmcrKjQrOFQTQ1fmBYhmW6o8Jkjc7iDJRTBIo5kgJD5yMEYA3srCg7VFKwiVJkmRCc5ohGOKhsYMn/XBLdo5taZjlb9YAlGWRimqbCsoY7HFAXLa5I1HPRxMMsQDHFkWtRNniqT9UEeNjcE7RUlrCJ4R2CSJuqlKHWvJXjAUNcITYkenuBRB84TbeepcqTj3zZyFJzgYQdHnqfgI0ddUwS6GqWpsKWhjq9cV0vBAEMN2znq+EBfIWT+pClYw5xsTlJU6GeIBsjGmmANTzJZiIYpgrM0Oa8ZMjd7NP87jxhqGOhJlnQtjuQpB+8aEE00wZFznSJPyHxgH3HkPOsJFvYk8zqCHzTs1BYOa4J3PFU+UVRZxlHDM4YavlNUuMoRveiZA2d7grMNc2g+RbSCEKzmgYsUmWmazFJyoiOZ4KnyhKOGRzWJa0+moyV4TVHDzn51Awtqaphfk/lRQ08FX1iiqxTB/kLwd0VynKfEvI6cd4XMV5bMhZ7gZUWVzYQ6Nm2BYzxJbw3bGthEUUMfgbGeorae6DxHtJoZ6alhZ0+ytiVoK1R4z5PTrOECT/SugseEOlb1MMNR4VRNcJy+V1Hg9ONClSZFZjdHlc6W6FBLdJja2MC5hhpu0DBYEY1TFGwiFAxRRCsYkiM9JRb0JNMVkW6CZYT/2EiTGWmo8k+h4FhDNE7BvppoTSFnmCV5xZKzvcCdDo7VVPnIU+I+Rc68juApC90MwcFCsJ5hDqxgScYKreruyQwTqrzoqDCmhWi4IbhB0Yrt3RGa6GfDv52rKXWhh28dyZaWUvcZeMTBaZoSGyiCtRU5J8iviioHaErs7Jkj61syVzTTgOcUOQ8buFBTYWdL5g3T4qlpe0+wvD63heAXRfCCIed9RbCsp2CiI7raUOYOTU13N8PNHvpaGvayo4a3LLT1lDrVEPT2zLUlheB1R+ZTRfKWJ+dcocLJfi11vyJ51lLqJ0WD7tRwryezjiV5W28uJO9qykzX8JDe2lHl/9oyBwa2UMfOngpXCixvKdXTk3wrsKmiVYdZIqsoWEERjbcUNDuiaQomGoIbFdEHmsyWnuR+IeriKDVLnlawlyNHKwKlSU631PKep8J4Q+ayjkSLKYLhalNHlYvttb6fHm0p6OApsZ4l2VfdqZkjuysy6ysKLlckf1KUutCTs39bmCgEyyoasIWlVaMF7mgmWtBT8Kol5xpH9IGllo8cJdopcvZ2sImlDmMIbtDk3KIpeNiS08lQw11NFPTwVFlPP6pJ2gvRfI7gQUfmNAtf6Gs0wQxDsKGlVBdF8rCa3jzdwMaGHOsItrZk7hAyOzpK9VS06j5F49b0VNGOOfKs3lDToMsMBe9ZWtHFEgxTJLs7qrygKZjUnmCYoeAqeU6jqWuLJup4WghOdvCYJnrSkSzoyRkm5M2StQwVltPkfCAk58tET/CSg+8MUecmotMEnhBKfWBIZsg2ihruMJQaoIm+tkTLKEqspMh00w95gvFCQRtDwTT1gVDDSEVdlwqZfxoQRbK0g+tbiBZxzKlpnpypejdDwTaeOvorMk/IJE10h9CqRe28hhLbe0pMsdSwv4ZbhKivo2BjDWfL8UKJgeavwlwb5KlwhyE4u4XkGE2ytZCznKLCDZZq42VzT8HLCrpruFbIfOIINmh/qCdZ1ZBc65kLHR1Bkyf5zn6pN3SvGKIlFNGplhrO9QSXanLOMQTLCa0YJCRrCZm/CZmrLTm7WzCK4GJDiWUdFeYx1LCFg3NMd0XmCuF3Y5rITLDUsYS9zoHVzwnJoYpSTQoObyEzr4cFBNqYTopoaU/wkyLZ2lPhX/5Y95ulxGTV7KjhWrOZgl8MyUUafjYraNjNU1N3IWcjT5WzWqjwtoarHSUObGYO3GCJZpsBlnJGPd6ZYLyl1GdCA2625IwwJDP8GUKymbzuyPlZlvTUsaUh5zFDhRWFzPKKZLAlWdcQbObgF9tOqOsmB1dqcqYJmWstFbZRRI9poolmqiLnU0POvxScpah2iSL5UJNzgScY5+AuIbpO0YD3NCW+dLMszFSdFCWGqG6eVq2uYVNDdICGD6W7EPRWZEY5gpsE9rUkS3mijzzJnm6UpUFXG1hCUeVoS5WfNcFpblELL2qqrCvMvRfd45oalvKU2tiQ6ePJOVMRXase9iTtLJztPxJKLWpo2CRDcJwn2sWSLKIO1WQWNTCvpVUvOZhgSC40JD0dOctaSqzkCRbXsKlb11Oip6PCJ0IwSJM31j3akRxlP7Rwn6aGaUL0qiLnJkvB3xWZ2+Q1TfCwpQH3G0o92UzmX4o/oJNQMMSQc547wVHhdk+VCw01DFYEnTxzZKAm74QmeNNR1w6WzEhNK15VJzuCdxQ53dRUDws5KvwgBMOEgpcVNe0hZI6RXT1Jd0cyj5nsaEAHgVmGaJIlWdsc5Ui2ElrRR6jrRAttNMEAIWrTDFubkZaok7/AkzfIwfuWVq0jHzuCK4QabtLUMVPB3kJ0oyHTSVFlqMALilJf2Rf8k5aaHtMfayocLBS8L89oKoxpJvnAkDPa0qp5DAUTHKWmCcnthlou8iCKaFFLHWcINd1nyIwXqrSxMNmSs6KmoL2QrKuWtlQ5V0120xQ5vRyZS1rgFkWwhiOwiuQbR0OOVhQM9iS3tiXp4RawRPMp5tDletOOBL95MpM01dZTBM9pkn5qF010rIeHFcFZhmSGpYpTsI6nwhqe5C9ynhlpp5ophuRb6WcJFldkVnVEwwxVfrVkvnWUuNLCg5bgboFHPDlDPDmnK7hUrWiIbjadDclujlZcaokOFup4Ri1kacV6jmrrK1hN9bGwpKEBQ4Q6DvIUXOmo6U5LqQM6EPyiKNjVkPnJkDPNEaxhiFay5ExW1NXVUGqcpYYdPcGiCq7z/TSlbhL4pplWXKd7NZO5QQFrefhRQW/NHOsqcIglc4UhWklR8K0QzbAw08CBDnpbgqXdeD/QUsM4RZXDFBW6WJKe/mFPdH0LtBgiq57wFLzlyQzz82qYx5D5WJP5yVJDW01BfyHnS6HKO/reZqId1WGa4Hkh2kWodJ8i6KoIPlAj2hPt76CzXsVR6koPRzWTfKqIentatYpQw2me4AA3y1Kind3SwoOKZDcFXTwl9tWU6mfgRk9d71sKtlNwrjnYw5tC5n5LdKiGry3JKNlHEd3oaMCFHrazBPMp/uNJ+V7IudcSbeOIdjUEdwl0VHCOZo5t6YluEuaC9mQeMgSfOyKnYGFHcIeQ84yQWbuJYJpZw5CzglDH7gKnWqqM9ZTaXcN0TeYhR84eQtJT76JJ1lREe7WnnvsMmRc9FQ7SBBM9mV3lCUdmHk/S2RAMt0QjFNFqQpWjDPQ01DXWUdDBkXziKPjGEP3VP+zIWU2t7im41FOloyWzn/L6dkUy3VLDaZ6appgDLHPjJEsyvJngWEPUyVBiAaHCTEXwrLvSEbV1e1gKJniicWorC1MUrVjB3uDhJE/wgSOzk1DXpk0k73qCM8xw2UvD5kJmDUfOomqMpWCkJRlvKXGmoeBm18USjVIk04SClxTB6YrgLAPLWYK9HLUt5cmc0vYES8GnTeRc6skZbQkWdxRsIcyBRzx1DbTk9FbU0caTPOgJHhJKnOGIVhQqvKmo0llRw9sabrZkDtdg3PqaKi9oatjY8B+G371paMg6+mZFNNtQ04mWBq3rYLOmtWWQp8KJnpy9DdFensyjdqZ+yY40VJlH8wcdLzC8PZnvHMFUTZUrDTkLyQaGus5X5LzpYAf3i+e/ZlhqGqWhh6Ou6xTR9Z6oi5AZZtp7Mj2EEm8oSpxiYZCHU/1fbGdNNNRRoZMhmilEb2gqHOEJDtXkHK/JnG6IrvbPCwV3NhONVdS1thBMs1T4QOBcTWa2IzhMk2nW5Kyn9tXUtpv9RsG2msxk+ZsQzRQacJncpgke0+T8y5Fzj8BiGo7XlJjaTIlpQs7KFjpqGnKuoyEPeIKnFMkZHvopgh81ySxNFWvJWcKRs70j2FOT012IllEEO1n4pD1513Yg2ssQPOThOkvyrqHUdEXOSEsihmBbTbKX1kLBPWqWkLOqJbjB3GBIZmoa8qWl4CG/iZ7oiA72ZL7TJNeZUY7kFQftDcHHluBzRbCegzMtrRjVQpX2lgoPKKLJAkcbMl01XK2p7yhL8pCBbQ3BN2avJgKvttcrWDK3CiUOVxQ8ZP+pqXKyIxnmBymCg5vJjNfkPK4+c8cIfK8ocVt7kmfd/I5SR1hKvCzUtb+lhgc00ZaO6CyhIQP1Uv4yIZjload72PXX0OIJvnFU+0Zf6MhsJwTfW0r0UwQfW4LNLZl5HK261JCZ4qnBaAreVAS3WrjV0LBnNDUNNDToCEeFfwgcb4gOEqLRhirWkexrCEYKVV711DLYEE1XBEsp5tpTGjorkomKYF9FDXv7fR3BGwbettSxnyL53MBPjsxDZjMh+VUW9NRxq1DhVk+FSxQcaGjV9Pawv6eGByw5qzoy7xk4RsOShqjJwWKe/1pEEfzkobeD/dQJmpqedcyBTy2sr4nGNRH0c0SPWTLrqAc0OQcb/gemKgqucQT7ySWKCn2EUotoCvpZct7RO2sy/QW0IWcXd7pQRQyZVwT2USRO87uhjioTLKV2brpMUcMQRbKH/N2T+UlTpaMls6cmc6CCNy3JdYYSUzzJQ4oSD3oKLncULOiJvjBEC2oqnCJkJluCYy2ZQ5so9YYlZ1VLlQU1mXEW1jZERwj/MUSRc24TdexlqLKfQBtDTScJUV8FszXBEY5ktpD5Ur9hYB4Nb1iikw3JoYpkKX+RodRKFt53MMuRnKSpY31PwYaGaILh3wxJGz9TkTPEETxoCWZrgvOlmyMzxFEwVJE5xZKzvyJ4WxEc16Gd4Xe3Weq4XH2jKRikqOkGQ87hQnC7wBmGYLAnesX3M+S87eFATauuN+Qcrh7xIxXJbUIdMw3JGE3ylCWzrieaqCn4zhGM19TQ3z1oH1AX+pWEqIc7wNGAkULBo/ZxRaV9NNyh4Br3rCHZzbzmSfawBL0dNRwpW1kK9mxPXR9povcdrGSZK9c2k0xwFGzjuniCtRSZCZ6ccZ7gaktmgAOtKbG/JnOkJrjcQTdFMsxRQ2cLY3WTIrlCw1eWKn8R6pvt4GFDso3QoL4a3nLk3G6JrtME3dSenpx7PNFTmga0EaJTLQ061sEeQoWXhSo9LTXsaSjoJQRXeZLtDclbCrYzfzHHeaKjHCVOUkQHO3JeEepr56mhiyaYYKjjNU+Fed1wS5VlhWSqI/hYUdDOkaxiKehoyOnrCV5yBHtbWFqTHCCwtpDcYolesVR5yUzTZBb3RNMd0d6WP+SvhuBmRcGxnuQzT95IC285cr41cLGQ6aJJhmi4TMGempxeimBRQw1tFKV+8jd6KuzoSTqqDxzRtpZkurvKEHxlqXKRIjjfUNNXQsNOsRScoWFLT+YeRZVD3GRN0MdQcKqQjHDMrdGGVu3iYJpQx3WGUvfbmxwFfR20WBq0oYY7LMFhhgYtr8jpaEnaOzjawWWaTP8mMr0t/EPDPoqcnxTBI5o58L7uoWnMrpoqPwgVrlAUWE+V+TQl9rawoyP6QGAlQw2TPRX+YSkxyBC8Z6jhHkXBgQL7WII3DVFnRfCrBfxewv9D6xsyjys4VkhWb9pUU627JllV0YDNHMku/ldNMMXDEo4aFnAkk4U6frNEU4XgZUPmEKHUl44KrzmYamjAbh0JFvGnaTLPu1s9jPCwjFpYiN7z1DTOk/nc07CfDFzmCf7i+bfNHXhDtLeBXzTBT5rkMvWOIxpl4EMh2LGJBu2syDnAEx2naEhHDWMMzPZEhygyS1mS5RTJr5ZkoKbEUoYqr2kqdDUE8ztK7OaIntJkFrIECwv8LJTaVx5XJE86go8dFeZ3FN3rjabCAYpoYEeC9zzJVULBbmZhDyd7ko09ydpNZ3nm2Kee4FPPXHnYEF1nqOFEC08LUVcDvYXkJHW8gTaKCk9YGOeIJhqiE4ToPEepdp7IWFjdwnWaufGMwJJCMtUTTBBK9BGCOy2tGGrJTHIwyEOzp6aPzNMOtlZkDvcEWpP5SVNhfkvDxhmSazTJXYrM9U1E0xwFVwqZQwzJxw6+kGGGUj2FglGGmnb1/G51udRSMNlTw6GGnCcUwVcOpmsqTHa06o72sw1RL02p9z0VbnMLOaIX3QKaYKSCFQzBKEUNHTSc48k53RH9wxGMtpQa5KjjW0W0n6XCCCG4yxNNdhQ4R4l1Ff+2sSd6UFHiIEOyqqFgT01mEUMD+joy75jPhOA+oVVLm309FR4yVOlp4RhLiScNmSmaYF5Pw0STrOIoWMSR2UkRXOMp+M4SHW8o8Zoi6OZgjKOaFar8zZDzkWzvKOjkKBjmCXby8JahhjXULY4KlzgKLvAwxVGhvyd4zxB1d9T0piazmKLCVZY5sKiD0y2ZSYrkUEPUbIk+dlQ4SJHTR50k1DPaUWIdTZW9NJwnJMOECgd7ou/MnppMJ02O1VT4Wsh85MnZzcFTngpXGKo84qmwgKbCL/orR/SzJ2crA+t6Mp94KvxJUeIbT3CQu1uIdlQEOzlKfS3UMcrTiFmOuroocrZrT2AcmamOKg8YomeEKm/rlT2sociMaybaUlFhuqHCM2qIJ+rg4EcDFymiDSxzaHdPcpE62pD5kyM5SBMoA1PaUtfIthS85ig1VPiPPYXgYEMNk4Qq7TXBgo7oT57gPUdwgCHzhIVFPFU6OYJzHAX9m5oNrVjeE61miDrqQ4VSa1oiURTsKHC0IfjNwU2WzK6eqK8jWln4g15TVBnqmDteCJ501PGAocJhhqjZdtBEB6lnhLreFJKxmlKbeGrqLiSThVIbCdGzloasa6lpMQXHCME2boLpJgT7yWaemu6wBONbqGNVRS0PKIL7LckbjmQtR7K8I5qtqel+T/ChJTNIKLjdUMNIRyvOEko9YYl2cwQveBikCNawJKcLBbc7+JM92mysNvd/Fqp8a0k6CNEe7cnZrxlW0wQXaXjaktnRwNOGZKYiONwS7a1JVheq3WgJHlQUGKHKmp4KAxXR/ULURcNgoa4zhKSLpZR3kxRRb0NmD0OFn+UCS7CzI1nbP6+o4x47QZE5xRCt3ZagnYcvmpYQktXdk5YKXTzBC57kKEe0VVuiSYqapssMS3C9p2CKkHOg8B8Pa8p5atrIw3qezIWanMGa5HRDNF6RM9wcacl0N+Q8Z8hsIkSnaIIdHRUOEebAPy1zbCkhM062FCJtif7PU+UtoVXzWKqM1PxXO8cfdruhFQ/a6x3JKYagvVDhQEtNiyiiSQ7OsuRsZUku0CRNDs4Sog6KKjsZgk2bYJqijgsEenoKeniinRXBn/U3lgpPdyDZynQx8IiioMnCep5Ky8mjGs6Wty0l1hUQTcNWswS3WRp2kCNZwJG8omG8JphPUaFbC8lEfabwP7VtM9yoaNCAjpR41VNhrD9LkbN722v0CoZMByFzhaW+MyzRYEWFDQwN2M4/JiT76PuljT3VU/A36eaIThb+R9oZGOAJ9tewkgGvqOMNRWYjT/Cwu99Q8LqDE4TgbLWxJ1jaDDAERsFOFrobgjUsBScaguXU8kKm2RL19tRypSHnHNlHiIZqgufs4opgQdVdwxBNNFBR6kVFqb8ogimOzB6a6HTzrlDHEpYaxjiiA4TMQobkDg2vejjfwJGWmnbVFAw3H3hq2NyQfG7hz4aC+w3BbwbesG0swYayvpAs6++Ri1Vfzx93mFChvyN5xVHTS+0p9aqCAxyZ6ZacZyw5+7uuQkFPR9DDk9NOiE7X1PCYJVjVUqq7JlrHwWALF5nfHNGjApdpqgzx5OwilDhCiDYTgnc9waGW4BdLNNUQvOtpzDOWHDH8D7TR/A/85KljEQu3NREc4Pl/6B1Hhc8Umb5CsKMmGC9EPcxoT2amwHNCmeOEnOPbklnMkbOgIvO5UMOpQrS9UGVdt6iH/fURjhI/WOpaW9OKLYRod6HCUEdOX000wpDZQ6hwg6LgZfOqo1RfT/CrJzjekXOGhpc1VW71ZLbXyyp+93ILbC1kPtIEYx0FIx1VDrLoVzXRKRYWk809yYlC9ImcrinxtabKnzRJk3lAU1OLEN1j2zrYzr2myHRXJFf4h4QKT1qSTzTB5+ZNTzTRkAxX8FcLV2uS8eoQQ2aAkFzvCM72sJIcJET3WPjRk5wi32uSS9rfZajpWEvj9hW42F4o5NytSXYy8IKHay10VYdrcl4SkqscrXpMwyGOgtkajheSxdQqmpxP1L3t4R5PqasFnrQEjytq6qgp9Y09Qx9o4S1FzhUCn1kyHSzBWLemoSGvOqLNhZyBjmCaAUYpMgt4Ck7wBBMMwWKWgjsUwTaGVsxWC1mYoKiyqqeGKYqonSIRQ3KIkHO0pmAxTdBHkbOvfllfr+AA+7gnc50huVKYK393FOyg7rbPO/izI7hE4CnHHHnJ0ogNPRUGeUpsrZZTBJcrovUcJe51BPsr6GkJdhCCsZ6aTtMEb2pqWkqeVtDXE/QVggsU/Nl86d9RMF3DxvZTA58agu810RWawCiSzzXBeU3MMW9oyJUedvNEvQyNu1f10BSMddR1vaLCYpYa/mGocLSiYDcLbQz8aMn5iyF4xBNMs1P0QEOV7o5gaWGuzSeLue4tt3ro7y4Tgm4G/mopdZgl6q0o6KzJWE3mMksNr3r+a6CbT8g5wZNzT9O7fi/zpaOmnz3BRoqos+tv9zMbdpxsqDBOEewtJLt7cg5wtKKbvldpSzRRCD43VFheCI7yZLppggMVBS/KMAdHODJvOwq2NQSbKKKPLdFWQs7Fqo+mpl01JXYRgq8dnGLhTiFzqmWsUMdpllZdbKlyvSdYxhI9YghOtxR8LgSLWHK62mGGVoxzBE8LNWzqH9CUesQzFy5RQzTc56mhi6fgXEWwpKfE5Z7M05ZgZUPmo6auiv8YKzDYwWBLMErIbKHJvOwIrvEdhOBcQ9JdU1NHQ7CXn2XIDFBKU2WAgcX9UAUzDXWd5alwuyJ41Z9rjKLCL4aCp4WarhPm2rH+SaHUYE001JDZ2ZAzXPjdMpZWvC9wmqIB2lLhQ01D5jO06hghWMndbM7yRJMsoCj1vYbnFQVrW9jak3OlEJ3s/96+p33dEPRV5GxiqaGjIthUU6FFEZyqCa5qJrpBdzSw95IUnOPIrCUUjRZQFrbw5PR0R1qiYx3cb6nrWUMrBmmiBQxVHtTew5ICP/ip6g4hed/Akob/32wvBHsIOX83cI8hGeNeNPCIkPmXe8fPKx84OMSRM1MTdXSwjCZ4S30jVGhvqTRak/OVhgGazHuOCud5onEO1lJr6ecVyaOK6H7zqlBlIaHE0oroCgfvGJIdPcmfLNGLjpz7hZwZQpUbFME0A1cIJa7VNORkgfsMBatbKgwwJM9bSvQXeNOvbIjelg6WWvo5kvbKaJJNHexkKNHL9xRyFlH8Ti2riB5wVPhUk7nGkJnoCe428LR/wRGdYIlmWebCyxou1rCk4g/ShugBDX0V0ZQWkh0dOVsagkM0yV6OoLd5ye+pRlsCr0n+KiQrGuq5yJDzrTAXHtLUMduTDBVKrSm3eHL+6ijxhFDX9Z5gVU/wliHYTMiMFpKLNMEywu80wd3meoFmt6VbRMPenhrOc6DVe4pgXU8DnnHakLOIIrlF4FZPIw6R+zxBP0dyq6OOZ4Q5sLKCcz084ok+VsMMyQhNZmmBgX5xIXOEJTmi7VsGTvMTNdHHhpzdbE8Du2oKxgvBqQKdDDnTFOylCFaxR1syz2iqrOI/FEpNc3C6f11/7+ASS6l2inq2ciTrCCzgyemrCL5SVPjQkdPZUmGy2c9Sw9FtR1sS30RmsKPCS4rkIC/2U0MduwucYolGaPjKEyhzmiPYXagyWbYz8LWBDdzRimAXzxx4z8K9hpzlhLq+NiQ97HuKorMUfK/OVvC2JfiHUPCQI/q7J2gjK+tTDNxkCc4TMssqCs4TGtLVwQihyoAWgj9bosU80XGW6Ac9TJGziaUh5+hnFcHOnlaM1iRn29NaqGENTTTSUHCH2tWTeV0osUhH6psuVLjRUmGWhm6OZEshGeNowABHcJ2Bpy2ZszRcKkRXd2QuKVEeXnbfaEq825FguqfgfE2whlChSRMdron+LATTPQ2Z369t4B9C5gs/ylzv+CMmepIDPclFQl13W0rspPd1JOcbghGOEutqCv5qacURQl3dDKyvyJlqKXGPgcM9FfawJAMVmdcspcYKOZc4GjDYkFlK05olNMHyHn4zFNykyOxt99RkHlfwmiHo60l2EKI+mhreEKp080Tbug08BVPcgoqC5zWt+NLDTZ7oNSF51N1qie7Va3uCCwyZbkINf/NED6jzOsBdZjFN8oqG3wxVunqCSYYKf3EdhJyf9YWGf7tRU2oH3VHgPr1fe5J9hOgHd7xQ0y7qBwXr23aGErP0cm64JVjZwsOGqL+mhNgZmhJLW2oY4UhedsyBgzrCKrq7BmcpNVhR6jBPq64Vgi+kn6XE68pp8J5/+0wRHGOpsKenQn9DZntPzjRLZpDAdD2fnSgkG9tmIXnUwQ6WVighs7Yi2MxQ0N3CqYaCXkJ0oyOztMDJjmSSpcpvlrk0RMMOjmArQ04PRV1DO1FwhCVaUVPpKUM03JK5SxPsIWRu8/CGHi8UHChiqGFDTbSRJWeYUDDcH6vJWUxR4k1FXbMUwV6e4AJFXS8oMqsZKqzvYQ9DDQdZckY4aGsIhtlubbd2r3j4QBMoTamdPZk7O/Bf62lacZwneNjQoGcdVU7zJOd7ghsUHOkosagic6cnWc8+4gg285R6zZP5s1/LUbCKIznTwK36PkdwlOrl4U1LwfdCCa+IrvFkmgw1PCAUXKWo0sURXWcI2muKJlgyFzhynCY4RBOsqCjoI1R5zREco0n2Vt09BQtYSizgKNHfUmUrQ5UOCh51BFcLmY7umhYqXKQomOop8bUnWNNQcIiBcYaC6xzMNOS8JQQfeqKBmmglB+97ok/lfk3ygaHSyZaCRTzRxQo6GzLfa2jWBPepw+UmT7SQEJyiyRkhBLMVOfcoMjcK0eZChfUNzFAUzCsEN5vP/X1uP/n/aoMX+K+nw/Hjr/9xOo7j7Pju61tLcgvJpTWXNbfN5jLpi6VfCOviTktKlFusQixdEKWmEBUKNaIpjZRSSOXSgzaaKLdabrm1/9nZ+/f+vd/vz/v9+Xy+zZ7PRorYoZqyLrCwQdEAixxVOEXNNnjX2nUSRlkqGmWowk8lxR50JPy9Bo6qJXaXwNvREBvnThPEPrewryLhcAnj5WE15Fqi8W7R1sAuEu86S4ENikItFN4xkv9Af4nXSnUVcLiA9xzesFpivRRVeFKtsMRaKBhuSbjOELnAUtlSQUpXgdfB4Z1oSbnFEetbQ0IrAe+Y+pqnDcEJFj6S8LDZzZHwY4e3XONNlARraomNEt2bkvGsosA3ioyHm+6jCMbI59wqt4eeara28IzEmyPgoRaUOEDhTVdEJhmCoTWfC0p8aNkCp0oYqih2iqGi4yXeMkOsn4LdLLnmKfh/YogjNsPebeFGR4m9BJHLzB61XQ3BtpISfS2FugsK9FAtLWX1dCRcrCnUp44CNzuCowUZmxSRgYaE6Za0W2u/E7CVXCiI/UOR8aAm1+OSyE3mOUcwyc1zBBeoX1kiKy0Zfxck1Gsyulti11i83QTBF5Kg3pDQThFMVHiPSlK+0cSedng/VaS8bOZbtsBcTcZAR8JP5KeqQ1OYKAi20njdNNRpgnsU//K+JnaXJaGTomr7aYIphoRn9aeShJWKEq9LcozSF7QleEfDI5LYm5bgVkFkRwVDBCVu0DDIkGupo8TZBq+/pMQURYErJQmPKGKjNDkWOLx7Jd5QizdUweIaKrlP7SwJDhZvONjLkOsBBX9UpGxnydhXkfBLQ8IxgojQbLFnJf81JytSljclYYyEFyx0kVBvKWOFJmONpshGAcsduQY5giVNCV51eOdJYo/pLhbvM0uDHSevNKRcrKZIqnCtJeEsO95RoqcgGK4ocZcho1tTYtcZvH41pNQ7vA0WrhIfOSraIIntIAi+NXWCErdbkvrWwjRLrt0NKUdL6KSOscTOdMSOUtBHwL6OLA0vNSdynaWQEnCpIvKaIrJJEbvHkmuNhn6OjM8VkSGSqn1uYJCGHnq9I3aLhNME3t6GjIkO7xrNFumpyTNX/NrwX7CrIRiqqWijI9JO4d1iieykyfiposQIQ8YjjsjlBh6oHWbwRjgYJQn2NgSnNycmJAk3NiXhx44Sxykihxm8ybUwT1OVKySc7vi3OXVkdBJ4AyXBeksDXG0IhgtYY0lY5ahCD0ehborIk5aUWRJviMA7Xt5kyRjonrXENkm8yYqgs8VzgrJmClK20uMM3jRJ0FiQICQF9hdETlLQWRIb5ki6WDfWRPobvO6a4GP5mcOrNzDFELtTkONLh9dXE8xypEg7z8A9jkhrQ6Fhjlg/QVktJXxt4WXzT/03Q8IaQWSqIuEvloQ2mqC9Jfi7wRul4RX3pSPlzpoVlmCtI2jvKHCFhjcM3sN6lqF6HxnKelLjXWbwrpR4xzuCrTUZx2qq9oAh8p6ixCUGr78g8oyjRAtB5CZFwi80VerVpI0h+IeBxa6Zg6kWvpDHaioYYuEsRbDC3eOmC2JvGYLeioxGknL2UATNJN6hmtj1DlpLvDVmocYbrGCVJKOrg4X6DgddLA203BKMFngdJJFtFd7vJLm6KEpc5yjQrkk7M80SGe34X24nSex1Ra5Omgb71JKyg8SrU3i/kARKwWpH0kOGhKkObyfd0ZGjvyXlAkVZ4xRbYJ2irFMkFY1SwyWxr2oo4zlNiV+7zmaweFpT4kR3kaDAFW6xpSqzJay05FtYR4HmZhc9UxKbbfF2V8RG1MBmSaE+kmC6JnaRXK9gsiXhJHl/U0qM0WTcbyhwkYIvFGwjSbjfwhiJt8ZSQU+Bd5+marPMOkVkD0muxYLIfEuhh60x/J92itguihJSEMySVPQnTewnEm+620rTQEMsOfo4/kP/0ARvWjitlpSX7GxBgcMEsd3EEeYWvdytd+Saawi6aCIj1CkGb6Aj9rwhx16Cf3vAwFy5pyLhVonXzy51FDpdEblbkdJbUcEPDEFzQ8qNmhzzLTmmKWKbFCXeEuRabp6rxbvAtLF442QjQ+wEA9eL1xSR7Q0JXzlSHjJ4exq89yR0laScJ/FW6z4a73pFMEfDiRZvuvijIt86RaSFOl01riV2mD1UEvxGk/Geg5aWwGki1zgKPG9J2U8PEg8qYvMsZeytiTRXBMslCU8JSlxi8EabjwUldlDNLfzTUmCgxWsjqWCOHavYAqsknKFIO0yQ61VL5AVFxk6WhEaCAkdJgt9aSkzXlKNX2jEa79waYuc7gq0N3GDJGCBhoiTXUEPsdknCUE1CK0fwsiaylSF2uiDyO4XX3pFhNd7R4itFGc0k/ElBZwWvq+GC6szVeEoS/MZ+qylwpKNKv9Z469UOjqCjwlusicyTxG6VpNxcQ8IncoR4RhLbR+NdpGGmJWOcIzJGUuKPGpQg8rrG21dOMqQssJQ4RxH5jaUqnZuQ0F4Q+cjxLwPtpZbIAk3QTJHQWBE5S1BokoVtDd6lhqr9UpHSUxMcIYl9pojsb8h4SBOsMQcqvOWC2E8EVehqiJ1hrrAEbQxeK0NGZ0Gkq+guSRgniM23bIHVkqwx4hiHd7smaOyglyIyQuM978j4VS08J/A2G1KeMBRo4fBaSNhKUEZfQewVQ/C1I+MgfbEleEzCUw7mKXI0M3hd1EESVji8x5uQ41nxs1q4RMJCCXs7Iq9acpxn22oSDnQ/sJTxsCbHIYZiLyhY05TY0ZLIOQrGaSJDDN4t8pVaIrsqqFdEegtizc1iTew5Q4ayBDMUsQMkXocaYkc0hZua412siZ1rSXlR460zRJ5SlHGe5j801RLMlJTxtaOM3Q1pvxJ45zUlWFD7rsAbpfEm1JHxG0eh8w2R7QQVzBUw28FhFp5QZzq8t2rx2joqulYTWSuJdTYfWwqMFMcovFmSyJPNyLhE4E10pHzYjOC3huArRa571ZsGajQpQx38SBP5pyZB6lMU3khDnp0MBV51BE9o2E+TY5Ml2E8S7C0o6w1xvCZjf0HkVEHCzFoyNmqC+9wdcqN+Tp7jSDheE9ws8Y5V0NJCn2bk2tqSY4okdrEhx1iDN8cSudwepWmAGXKcJXK65H9to8jYQRH7SBF01ESUJdd0TayVInaWhLkOjlXE5irKGOnI6GSWGCJa482zBI9rCr0jyTVcEuzriC1vcr6mwFGSiqy5zMwxBH/TJHwjSPhL8+01kaaSUuMFKTcLEvaUePcrSmwn8DZrgikWb7CGPxkSjhQwrRk57tctmxLsb9sZvL9LSlyuSLlWkqOjwduo8b6Uv1DkmudIeFF2dHCgxVtk8dpIvHpBxhEOdhKk7OLIUSdJ+cSRY57B+0DgGUUlNfpthTfGkauzxrvTsUUaCVhlKeteTXCoJDCa2NOKhOmC4G1H8JBd4OBZReSRGkqcb/CO1PyLJTLB4j1q8JYaIutEjSLX8YKM+a6phdMsdLFUoV5RTm9JSkuDN8WcIon0NZMNZWh1q8C7SJEwV5HxrmnnTrf3KoJBlmCYI2ilSLlfEvlE4011NNgjgthzEua0oKK7JLE7HZHlEl60BLMVFewg4EWNt0ThrVNEVkkiTwpKXSWJzdRENgvKGq4IhjsiezgSFtsfCUq8qki5S1LRQeYQQ4nemmCkImWMw3tFUoUBZk4NOeZYEp4XRKTGa6wJjrWNHBVJR4m3FCnbuD6aak2WsMTh3SZImGCIPKNgsDpVwnsa70K31lCFJZYcwwSMFcQulGTsZuEaSdBXkPGZhu0FsdUO73RHjq8MPGGIfaGIbVTk6iuI3GFgucHrIQkmWSJdBd7BBu+uOryWAhY7+Lki9rK5wtEQzWwvtbqGhIMFwWRJsElsY4m9IIg9L6lCX0VklaPAYkfkZEGDnOWowlBJjtMUkcGK4Lg6EtoZInMUBVYLgn0UsdmCyCz7gIGHFfk+k1QwTh5We7A9x+IdJ6CvIkEagms0hR50eH9UnTQJ+2oiKyVlLFUE+8gBGu8MQ3CppUHesnjTHN4QB/UGPhCTHLFPHMFrCqa73gqObUJGa03wgbhHkrCfpEpzNLE7JDS25FMKhlhKKWKfCgqstLCPu1zBXy0J2ztwjtixBu8UTRn9LVtkmCN2iyFhtME70JHRQ1KVZXqKI/KNIKYMCYs1GUMEKbM1bKOI9LDXC7zbHS+bt+1MTWS9odA9DtrYtpbImQJ2VHh/lisEwaHqUk1kjKTAKknkBEXkbkdMGwq0dnhzLJF3NJH3JVwrqOB4Sca2hti75nmJN0WzxS6UxDYoEpxpa4htVlRjkYE7DZGzJVU72uC9IyhQL4i8YfGWSYLLNcHXloyz7QhNifmKSE9JgfGmuyLhc403Xm9vqcp6gXe3xuuv8F6VJNxkyTHEkHG2g0aKXL0MsXc1bGfgas2//dCONXiNLCX+5mB7eZIl1kHh7ajwpikyzlUUWOVOsjSQlsS+M0R+pPje/dzBXRZGO0rMtgQrLLG9VSu9n6CMXS3BhwYmSoIBhsjNBmZbgusE9BCPCP5triU4VhNbJfE+swSP27aayE8tuTpYYjtrYjMVGZdp2NpS1s6aBnKSHDsbKuplKbHM4a0wMFd/5/DmGyKrJSUaW4IBrqUhx0vyfzTBBLPIUcnZdrAkNsKR0sWRspumSns6Ch0v/qqIbBYUWKvPU/CFoyrDJGwSNFhbA/MlzKqjrO80hRbpKx0Jewsi/STftwGSlKc1JZyAzx05dhLEdnfQvhZOqiHWWEAHC7+30FuRcZUgaO5gpaIK+xsiHRUsqaPElTV40xQZQ107Q9BZE1nryDVGU9ZSQ47bmhBpLcYpUt7S+xuK/FiT8qKjwXYw5ypS2iuCv7q1gtgjhuBuB8LCFY5cUuCNtsQOFcT+4Ih9JX+k8Ea6v0iCIRZOtCT0Et00JW5UeC85Cg0ScK0k411HcG1zKtre3SeITBRk7WfwDhEvaYLTHP9le0m8By0JDwn4TlLW/aJOvGHxdjYUes+ScZigCkYQdNdEOhkiezgShqkx8ueKjI8lDfK2oNiOFvrZH1hS+tk7NV7nOmLHicGWEgubkXKdwdtZknCLJXaCpkrjZBtLZFsDP9CdxWsSr05Sxl6CMmoFbCOgryX40uDtamB7SVmXW4Ihlgpmq+00tBKUUa83WbjLUNkzDmY7cow1JDygyPGlhgGKYKz4vcV7QBNbJIgM11TUqZaMdwTeSguH6rOaw1JRKzaaGyxVm2EJ/uCIrVWUcZUkcp2grMsEjK+DMwS59jQk3Kd6SEq1d0S6uVmO4Bc1lDXTUcHjluCXEq+1OlBDj1pi9zgiXxnKuE0SqTXwhqbETW6RggMEnGl/q49UT2iCzgJvRwVXS2K/d6+ZkyUl7jawSVLit46EwxVljDZwoSQ20sDBihztHfk2yA8NVZghiXwrYHQdfKAOtzsayjhY9bY0yE2CWEeJ9xfzO423xhL5syS2TFJofO2pboHob0nY4GiAgRrvGQEDa/FWSsoaaYl0syRsEt3kWoH3B01shCXhTUWe9w3Bt44SC9QCh3eShQctwbaK2ApLroGCMlZrYqvlY3qYhM0aXpFkPOuoqJ3Dm6fxXrGwVF9gCWZagjPqznfkuMKQ8DPTQRO8ZqG1hPGKEm9IgpGW4DZDgTNriTxvFiq+Lz+0cKfp4wj6OCK9JSnzNSn9LFU7UhKZZMnYwcJ8s8yRsECScK4j5UOB95HFO0CzhY4xJxuCix0lDlEUeMdS6EZBkTsUkZ4K74dugyTXS7aNgL8aqjDfkCE0ZbwkCXpaWCKhl8P7VD5jxykivSyxyZrYERbe168LYu9ZYh86IkscgVLE7tWPKmJv11CgoyJltMEbrohtVAQfO4ImltiHEroYEs7RxAarVpY8AwXMcMReFOTYWe5iiLRQxJ5Q8DtJ8LQhWOhIeFESPGsILhbNDRljNbHzNRlTFbk2S3L0NOS6V1KFJYKUbSTcIIhM0wQ/s2TM0SRMNcQmSap3jCH4yhJZKSkwyRHpYYgsFeQ4U7xoCB7VVOExhXepo9ABBsYbvGWKXPME3lyH95YioZ0gssQRWWbI+FaSMkXijZXwgiTlYdPdkNLaETxlyDVIwqeaEus0aTcYcg0RVOkpR3CSJqIddK+90JCxzsDVloyrFd5ZAr4TBKfaWa6boEA7C7s6EpYaeFPjveooY72mjIccLHJ9HUwVlDhKkmutJDJBwnp1rvulJZggKDRfbXAkvC/4l3ozQOG9a8lxjx0i7nV4jSXc7vhe3OwIxjgSHjdEhhsif9YkPGlus3iLFDnWOFhtCZbJg0UbQcIaR67JjthoCyMEZRwhiXWyxO5QxI6w5NhT4U1WsJvDO60J34fW9hwzwlKij6ZAW9ne4L0s8C6XeBMEkd/LQy1VucBRot6QMlbivaBhoBgjqGiCJNhsqVp/S2SsG6DIONCR0dXhvWbJ+MRRZJkkuEjgDXJjFQW6SSL7GXK8Z2CZg7cVsbWGoKmEpzQ5elpiy8Ryg7dMkLLUEauzeO86CuwlSOlgYLojZWeJ9xM3S1PWfEfKl5ISLQ0MEKR8YOB2QfCxJBjrKPCN4f9MkaSsqoVXJBmP7EpFZ9UQfOoOFwSzBN4MQ8LsGrymlipcJQhmy0GaQjPqCHaXRwuCZwRbqK2Fg9wlClZqYicrIgMdZfxTQ0c7TBIbrChxmuzoKG8XRaSrIhhiyNFJkrC7oIAWMEOQa5aBekPCRknCo4IKPrYkvCDI8aYmY7WFtprgekcJZ3oLIqssCSMtFbQTJKwXYy3BY5oCh2iKPCpJOE+zRdpYgi6O2KmOAgvVCYaU4ySRek1sgyFhJ403QFHiVEmJHwtybO1gs8Hr5+BETQX3War0qZngYGgtVZtoqd6vFSk/UwdZElYqyjrF4HXUeFspIi9IGKf4j92pKGAdCYMVsbcV3kRF0N+R8LUd5PCsIGWoxDtBkCI0nKofdJQxT+LtZflvuc8Q3CjwWkq8KwUpHzkK/NmSsclCL0nseQdj5FRH5CNHSgtLiW80Of5HU9Hhlsga9bnBq3fEVltKfO5IaSTmGjjc4J0otcP7QsJUSQM8pEj5/wCuUuC2DWz8AAAAAElFTkSuQmCC"); -} diff --git a/plugins/codemirror/codemirror/theme/base16-dark.css b/plugins/codemirror/codemirror/theme/base16-dark.css deleted file mode 100644 index 3b7b21c..0000000 --- a/plugins/codemirror/codemirror/theme/base16-dark.css +++ /dev/null @@ -1,34 +0,0 @@ -/* - - Name: Base16 Default Dark - Author: Chris Kempson (http://chriskempson.com) - - CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-chrome-devtools) - Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) - -*/ - -.cm-s-base16-dark.CodeMirror {background: #151515; color: #e0e0e0;} -.cm-s-base16-dark div.CodeMirror-selected {background: #202020 !important;} -.cm-s-base16-dark .CodeMirror-gutters {background: #151515; border-right: 0px;} -.cm-s-base16-dark .CodeMirror-linenumber {color: #505050;} -.cm-s-base16-dark .CodeMirror-cursor {border-left: 1px solid #b0b0b0 !important;} - -.cm-s-base16-dark span.cm-comment {color: #8f5536;} -.cm-s-base16-dark span.cm-atom {color: #aa759f;} -.cm-s-base16-dark span.cm-number {color: #aa759f;} - -.cm-s-base16-dark span.cm-property, .cm-s-base16-dark span.cm-attribute {color: #90a959;} -.cm-s-base16-dark span.cm-keyword {color: #ac4142;} -.cm-s-base16-dark span.cm-string {color: #f4bf75;} - -.cm-s-base16-dark span.cm-variable {color: #90a959;} -.cm-s-base16-dark span.cm-variable-2 {color: #6a9fb5;} -.cm-s-base16-dark span.cm-def {color: #d28445;} -.cm-s-base16-dark span.cm-bracket {color: #e0e0e0;} -.cm-s-base16-dark span.cm-tag {color: #ac4142;} -.cm-s-base16-dark span.cm-link {color: #aa759f;} -.cm-s-base16-dark span.cm-error {background: #ac4142; color: #b0b0b0;} - -.cm-s-base16-dark .CodeMirror-activeline-background {background: #2F2F2F !important;} -.cm-s-base16-dark .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} diff --git a/plugins/codemirror/codemirror/theme/base16-light.css b/plugins/codemirror/codemirror/theme/base16-light.css deleted file mode 100644 index 5aa4b53..0000000 --- a/plugins/codemirror/codemirror/theme/base16-light.css +++ /dev/null @@ -1,34 +0,0 @@ -/* - - Name: Base16 Default Light - Author: Chris Kempson (http://chriskempson.com) - - CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-chrome-devtools) - Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) - -*/ - -.cm-s-base16-light.CodeMirror {background: #f5f5f5; color: #202020;} -.cm-s-base16-light div.CodeMirror-selected {background: #e0e0e0 !important;} -.cm-s-base16-light .CodeMirror-gutters {background: #f5f5f5; border-right: 0px;} -.cm-s-base16-light .CodeMirror-linenumber {color: #b0b0b0;} -.cm-s-base16-light .CodeMirror-cursor {border-left: 1px solid #505050 !important;} - -.cm-s-base16-light span.cm-comment {color: #8f5536;} -.cm-s-base16-light span.cm-atom {color: #aa759f;} -.cm-s-base16-light span.cm-number {color: #aa759f;} - -.cm-s-base16-light span.cm-property, .cm-s-base16-light span.cm-attribute {color: #90a959;} -.cm-s-base16-light span.cm-keyword {color: #ac4142;} -.cm-s-base16-light span.cm-string {color: #f4bf75;} - -.cm-s-base16-light span.cm-variable {color: #90a959;} -.cm-s-base16-light span.cm-variable-2 {color: #6a9fb5;} -.cm-s-base16-light span.cm-def {color: #d28445;} -.cm-s-base16-light span.cm-bracket {color: #202020;} -.cm-s-base16-light span.cm-tag {color: #ac4142;} -.cm-s-base16-light span.cm-link {color: #aa759f;} -.cm-s-base16-light span.cm-error {background: #ac4142; color: #505050;} - -.cm-s-base16-light .CodeMirror-activeline-background {background: #DDDCDC !important;} -.cm-s-base16-light .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} diff --git a/plugins/codemirror/codemirror/theme/blackboard.css b/plugins/codemirror/codemirror/theme/blackboard.css deleted file mode 100644 index 8b76084..0000000 --- a/plugins/codemirror/codemirror/theme/blackboard.css +++ /dev/null @@ -1,28 +0,0 @@ -/* Port of TextMate's Blackboard theme */ - -.cm-s-blackboard.CodeMirror { background: #0C1021; color: #F8F8F8; } -.cm-s-blackboard .CodeMirror-selected { background: #253B76 !important; } -.cm-s-blackboard .CodeMirror-gutters { background: #0C1021; border-right: 0; } -.cm-s-blackboard .CodeMirror-linenumber { color: #888; } -.cm-s-blackboard .CodeMirror-cursor { border-left: 1px solid #A7A7A7 !important; } - -.cm-s-blackboard .cm-keyword { color: #FBDE2D; } -.cm-s-blackboard .cm-atom { color: #D8FA3C; } -.cm-s-blackboard .cm-number { color: #D8FA3C; } -.cm-s-blackboard .cm-def { color: #8DA6CE; } -.cm-s-blackboard .cm-variable { color: #FF6400; } -.cm-s-blackboard .cm-operator { color: #FBDE2D;} -.cm-s-blackboard .cm-comment { color: #AEAEAE; } -.cm-s-blackboard .cm-string { color: #61CE3C; } -.cm-s-blackboard .cm-string-2 { color: #61CE3C; } -.cm-s-blackboard .cm-meta { color: #D8FA3C; } -.cm-s-blackboard .cm-builtin { color: #8DA6CE; } -.cm-s-blackboard .cm-tag { color: #8DA6CE; } -.cm-s-blackboard .cm-attribute { color: #8DA6CE; } -.cm-s-blackboard .cm-header { color: #FF6400; } -.cm-s-blackboard .cm-hr { color: #AEAEAE; } -.cm-s-blackboard .cm-link { color: #8DA6CE; } -.cm-s-blackboard .cm-error { background: #9D1E15; color: #F8F8F8; } - -.cm-s-blackboard .CodeMirror-activeline-background {background: #3C3636 !important;} -.cm-s-blackboard .CodeMirror-matchingbracket {outline:1px solid grey;color:white !important} \ No newline at end of file diff --git a/plugins/codemirror/codemirror/theme/cobalt.css b/plugins/codemirror/codemirror/theme/cobalt.css deleted file mode 100644 index b4a9177..0000000 --- a/plugins/codemirror/codemirror/theme/cobalt.css +++ /dev/null @@ -1,21 +0,0 @@ -.cm-s-cobalt.CodeMirror { background: #002240; color: white; } -.cm-s-cobalt div.CodeMirror-selected { background: #b36539 !important; } -.cm-s-cobalt .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; } -.cm-s-cobalt .CodeMirror-linenumber { color: #d0d0d0; } -.cm-s-cobalt .CodeMirror-cursor { border-left: 1px solid white !important; } - -.cm-s-cobalt span.cm-comment { color: #08f; } -.cm-s-cobalt span.cm-atom { color: #845dc4; } -.cm-s-cobalt span.cm-number, .cm-s-cobalt span.cm-attribute { color: #ff80e1; } -.cm-s-cobalt span.cm-keyword { color: #ffee80; } -.cm-s-cobalt span.cm-string { color: #3ad900; } -.cm-s-cobalt span.cm-meta { color: #ff9d00; } -.cm-s-cobalt span.cm-variable-2, .cm-s-cobalt span.cm-tag { color: #9effff; } -.cm-s-cobalt span.cm-variable-3, .cm-s-cobalt span.cm-def { color: white; } -.cm-s-cobalt span.cm-bracket { color: #d8d8d8; } -.cm-s-cobalt span.cm-builtin, .cm-s-cobalt span.cm-special { color: #ff9e59; } -.cm-s-cobalt span.cm-link { color: #845dc4; } -.cm-s-cobalt span.cm-error { color: #9d1e15; } - -.cm-s-cobalt .CodeMirror-activeline-background {background: #002D57 !important;} -.cm-s-cobalt .CodeMirror-matchingbracket {outline:1px solid grey;color:white !important} diff --git a/plugins/codemirror/codemirror/theme/eclipse.css b/plugins/codemirror/codemirror/theme/eclipse.css deleted file mode 100644 index 317218e..0000000 --- a/plugins/codemirror/codemirror/theme/eclipse.css +++ /dev/null @@ -1,23 +0,0 @@ -.cm-s-eclipse span.cm-meta {color: #FF1717;} -.cm-s-eclipse span.cm-keyword { line-height: 1em; font-weight: bold; color: #7F0055; } -.cm-s-eclipse span.cm-atom {color: #219;} -.cm-s-eclipse span.cm-number {color: #164;} -.cm-s-eclipse span.cm-def {color: #00f;} -.cm-s-eclipse span.cm-variable {color: black;} -.cm-s-eclipse span.cm-variable-2 {color: #0000C0;} -.cm-s-eclipse span.cm-variable-3 {color: #0000C0;} -.cm-s-eclipse span.cm-property {color: black;} -.cm-s-eclipse span.cm-operator {color: black;} -.cm-s-eclipse span.cm-comment {color: #3F7F5F;} -.cm-s-eclipse span.cm-string {color: #2A00FF;} -.cm-s-eclipse span.cm-string-2 {color: #f50;} -.cm-s-eclipse span.cm-qualifier {color: #555;} -.cm-s-eclipse span.cm-builtin {color: #30a;} -.cm-s-eclipse span.cm-bracket {color: #cc7;} -.cm-s-eclipse span.cm-tag {color: #170;} -.cm-s-eclipse span.cm-attribute {color: #00c;} -.cm-s-eclipse span.cm-link {color: #219;} -.cm-s-eclipse span.cm-error {color: #f00;} - -.cm-s-eclipse .CodeMirror-activeline-background {background: #e8f2ff !important;} -.cm-s-eclipse .CodeMirror-matchingbracket {outline:1px solid grey; color:black !important;} diff --git a/plugins/codemirror/codemirror/theme/elegant.css b/plugins/codemirror/codemirror/theme/elegant.css deleted file mode 100644 index dd7df7b..0000000 --- a/plugins/codemirror/codemirror/theme/elegant.css +++ /dev/null @@ -1,13 +0,0 @@ -.cm-s-elegant span.cm-number, .cm-s-elegant span.cm-string, .cm-s-elegant span.cm-atom {color: #762;} -.cm-s-elegant span.cm-comment {color: #262; font-style: italic; line-height: 1em;} -.cm-s-elegant span.cm-meta {color: #555; font-style: italic; line-height: 1em;} -.cm-s-elegant span.cm-variable {color: black;} -.cm-s-elegant span.cm-variable-2 {color: #b11;} -.cm-s-elegant span.cm-qualifier {color: #555;} -.cm-s-elegant span.cm-keyword {color: #730;} -.cm-s-elegant span.cm-builtin {color: #30a;} -.cm-s-elegant span.cm-link {color: #762;} -.cm-s-elegant span.cm-error {background-color: #fdd;} - -.cm-s-elegant .CodeMirror-activeline-background {background: #e8f2ff !important;} -.cm-s-elegant .CodeMirror-matchingbracket {outline:1px solid grey; color:black !important;} diff --git a/plugins/codemirror/codemirror/theme/erlang-dark.css b/plugins/codemirror/codemirror/theme/erlang-dark.css deleted file mode 100644 index db56b10..0000000 --- a/plugins/codemirror/codemirror/theme/erlang-dark.css +++ /dev/null @@ -1,30 +0,0 @@ -.cm-s-erlang-dark.CodeMirror { background: #002240; color: white; } -.cm-s-erlang-dark div.CodeMirror-selected { background: #b36539 !important; } -.cm-s-erlang-dark .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; } -.cm-s-erlang-dark .CodeMirror-linenumber { color: #d0d0d0; } -.cm-s-erlang-dark .CodeMirror-cursor { border-left: 1px solid white !important; } - -.cm-s-erlang-dark span.cm-atom { color: #f133f1; } -.cm-s-erlang-dark span.cm-attribute { color: #ff80e1; } -.cm-s-erlang-dark span.cm-bracket { color: #ff9d00; } -.cm-s-erlang-dark span.cm-builtin { color: #eaa; } -.cm-s-erlang-dark span.cm-comment { color: #77f; } -.cm-s-erlang-dark span.cm-def { color: #e7a; } -.cm-s-erlang-dark span.cm-keyword { color: #ffee80; } -.cm-s-erlang-dark span.cm-meta { color: #50fefe; } -.cm-s-erlang-dark span.cm-number { color: #ffd0d0; } -.cm-s-erlang-dark span.cm-operator { color: #d55; } -.cm-s-erlang-dark span.cm-property { color: #ccc; } -.cm-s-erlang-dark span.cm-qualifier { color: #ccc; } -.cm-s-erlang-dark span.cm-quote { color: #ccc; } -.cm-s-erlang-dark span.cm-special { color: #ffbbbb; } -.cm-s-erlang-dark span.cm-string { color: #3ad900; } -.cm-s-erlang-dark span.cm-string-2 { color: #ccc; } -.cm-s-erlang-dark span.cm-tag { color: #9effff; } -.cm-s-erlang-dark span.cm-variable { color: #50fe50; } -.cm-s-erlang-dark span.cm-variable-2 { color: #e0e; } -.cm-s-erlang-dark span.cm-variable-3 { color: #ccc; } -.cm-s-erlang-dark span.cm-error { color: #9d1e15; } - -.cm-s-erlang-dark .CodeMirror-activeline-background {background: #013461 !important;} -.cm-s-erlang-dark .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;} diff --git a/plugins/codemirror/codemirror/theme/lesser-dark.css b/plugins/codemirror/codemirror/theme/lesser-dark.css deleted file mode 100644 index c325596..0000000 --- a/plugins/codemirror/codemirror/theme/lesser-dark.css +++ /dev/null @@ -1,47 +0,0 @@ -/* -http://lesscss.org/ dark theme -Ported to CodeMirror by Peter Kroon -*/ -.cm-s-lesser-dark { - line-height: 1.3em; -} -.cm-s-lesser-dark { - font-family: 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', 'Monaco', Courier, monospace !important; -} - -.cm-s-lesser-dark.CodeMirror { background: #262626; color: #EBEFE7; text-shadow: 0 -1px 1px #262626; } -.cm-s-lesser-dark div.CodeMirror-selected {background: #45443B !important;} /* 33322B*/ -.cm-s-lesser-dark .CodeMirror-cursor { border-left: 1px solid white !important; } -.cm-s-lesser-dark pre { padding: 0 8px; }/*editable code holder*/ - -.cm-s-lesser-dark.CodeMirror span.CodeMirror-matchingbracket { color: #7EFC7E; }/*65FC65*/ - -.cm-s-lesser-dark .CodeMirror-gutters { background: #262626; border-right:1px solid #aaa; } -.cm-s-lesser-dark .CodeMirror-linenumber { color: #777; } - -.cm-s-lesser-dark span.cm-keyword { color: #599eff; } -.cm-s-lesser-dark span.cm-atom { color: #C2B470; } -.cm-s-lesser-dark span.cm-number { color: #B35E4D; } -.cm-s-lesser-dark span.cm-def {color: white;} -.cm-s-lesser-dark span.cm-variable { color:#D9BF8C; } -.cm-s-lesser-dark span.cm-variable-2 { color: #669199; } -.cm-s-lesser-dark span.cm-variable-3 { color: white; } -.cm-s-lesser-dark span.cm-property {color: #92A75C;} -.cm-s-lesser-dark span.cm-operator {color: #92A75C;} -.cm-s-lesser-dark span.cm-comment { color: #666; } -.cm-s-lesser-dark span.cm-string { color: #BCD279; } -.cm-s-lesser-dark span.cm-string-2 {color: #f50;} -.cm-s-lesser-dark span.cm-meta { color: #738C73; } -.cm-s-lesser-dark span.cm-qualifier {color: #555;} -.cm-s-lesser-dark span.cm-builtin { color: #ff9e59; } -.cm-s-lesser-dark span.cm-bracket { color: #EBEFE7; } -.cm-s-lesser-dark span.cm-tag { color: #669199; } -.cm-s-lesser-dark span.cm-attribute {color: #00c;} -.cm-s-lesser-dark span.cm-header {color: #a0a;} -.cm-s-lesser-dark span.cm-quote {color: #090;} -.cm-s-lesser-dark span.cm-hr {color: #999;} -.cm-s-lesser-dark span.cm-link {color: #00c;} -.cm-s-lesser-dark span.cm-error { color: #9d1e15; } - -.cm-s-lesser-dark .CodeMirror-activeline-background {background: #3C3A3A !important;} -.cm-s-lesser-dark .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;} diff --git a/plugins/codemirror/codemirror/theme/mbo.css b/plugins/codemirror/codemirror/theme/mbo.css deleted file mode 100644 index 93fe3ee..0000000 --- a/plugins/codemirror/codemirror/theme/mbo.css +++ /dev/null @@ -1,37 +0,0 @@ -/* Based on mbonaci's Brackets mbo theme */ - -.cm-s-mbo.CodeMirror {background: #2c2c2c; color: #ffffe9;} -.cm-s-mbo div.CodeMirror-selected {background: #716C62 !important;} -.cm-s-mbo .CodeMirror-gutters {background: #4e4e4e; border-right: 0px;} -.cm-s-mbo .CodeMirror-linenumber {color: #dadada;} -.cm-s-mbo .CodeMirror-cursor {border-left: 1px solid #ffffec !important;} - -.cm-s-mbo span.cm-comment {color: #95958a;} -.cm-s-mbo span.cm-atom {color: #00a8c6;} -.cm-s-mbo span.cm-number {color: #00a8c6;} - -.cm-s-mbo span.cm-property, .cm-s-mbo span.cm-attribute {color: #9ddfe9;} -.cm-s-mbo span.cm-keyword {color: #ffb928;} -.cm-s-mbo span.cm-string {color: #ffcf6c;} - -.cm-s-mbo span.cm-variable {color: #ffffec;} -.cm-s-mbo span.cm-variable-2 {color: #00a8c6;} -.cm-s-mbo span.cm-def {color: #ffffec;} -.cm-s-mbo span.cm-bracket {color: #fffffc; font-weight: bold;} -.cm-s-mbo span.cm-tag {color: #9ddfe9;} -.cm-s-mbo span.cm-link {color: #f54b07;} -.cm-s-mbo span.cm-error {background: #636363; color: #ffffec;} - -.cm-s-mbo .CodeMirror-activeline-background {background: #494b41 !important;} -.cm-s-mbo .CodeMirror-matchingbracket { - text-decoration: underline; - color: #f5e107 !important; - } - -.cm-s-mbo .CodeMirror-matchingtag {background: #4e4e4e;} - -div.CodeMirror span.CodeMirror-searching { - background-color: none; - background: none; - box-shadow: 0 0 0 1px #ffffec; -} diff --git a/plugins/codemirror/codemirror/theme/mdn-like.css b/plugins/codemirror/codemirror/theme/mdn-like.css deleted file mode 100644 index 1e20b9e..0000000 --- a/plugins/codemirror/codemirror/theme/mdn-like.css +++ /dev/null @@ -1,44 +0,0 @@ -/* - MDN-LIKE Theme - Mozilla - Ported to CodeMirror by Peter Kroon - Report bugs/issues here: https://github.com/marijnh/CodeMirror/issues - GitHub: @peterkroon - - The mdn-like theme is inspired on the displayed code examples at: https://developer.mozilla.org/en-US/docs/Web/CSS/animation - -*/ -.cm-s-mdn-like.CodeMirror { color: #999; background-color: #fff; } -.cm-s-mdn-like .CodeMirror-selected { background: #cfc !important; } - -.cm-s-mdn-like .CodeMirror-gutters { background: #f8f8f8; border-left: 6px solid rgba(0,83,159,0.65); color: #333; } -.cm-s-mdn-like .CodeMirror-linenumber { color: #aaa; margin-left: 3px; } -div.cm-s-mdn-like .CodeMirror-cursor { border-left: 2px solid #222; } - -.cm-s-mdn-like .cm-keyword { color: #6262FF; } -.cm-s-mdn-like .cm-atom { color: #F90; } -.cm-s-mdn-like .cm-number { color: #ca7841; } -.cm-s-mdn-like .cm-def { color: #8DA6CE; } -.cm-s-mdn-like span.cm-variable-2, .cm-s-mdn-like span.cm-tag { color: #690; } -.cm-s-mdn-like span.cm-variable-3, .cm-s-mdn-like span.cm-def { color: #07a; } - -.cm-s-mdn-like .cm-variable { color: #07a; } -.cm-s-mdn-like .cm-property { color: #905; } -.cm-s-mdn-like .cm-qualifier { color: #690; } - -.cm-s-mdn-like .cm-operator { color: #cda869; } -.cm-s-mdn-like .cm-comment { color:#777; font-weight:normal; } -.cm-s-mdn-like .cm-string { color:#07a; font-style:italic; } -.cm-s-mdn-like .cm-string-2 { color:#bd6b18; } /*?*/ -.cm-s-mdn-like .cm-meta { color: #000; } /*?*/ -.cm-s-mdn-like .cm-builtin { color: #9B7536; } /*?*/ -.cm-s-mdn-like .cm-tag { color: #997643; } -.cm-s-mdn-like .cm-attribute { color: #d6bb6d; } /*?*/ -.cm-s-mdn-like .cm-header { color: #FF6400; } -.cm-s-mdn-like .cm-hr { color: #AEAEAE; } -.cm-s-mdn-like .cm-link { color:#ad9361; font-style:italic; text-decoration:none; } -.cm-s-mdn-like .cm-error { border-bottom: 1px solid red; } - -div.cm-s-mdn-like .CodeMirror-activeline-background {background: #efefff;} -div.cm-s-mdn-like span.CodeMirror-matchingbracket {outline:1px solid grey; color: inherit;} - -.cm-s-mdn-like.CodeMirror { background-image: url(data:image/png;base64,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); } diff --git a/plugins/codemirror/codemirror/theme/midnight.css b/plugins/codemirror/codemirror/theme/midnight.css deleted file mode 100644 index 6612632..0000000 --- a/plugins/codemirror/codemirror/theme/midnight.css +++ /dev/null @@ -1,43 +0,0 @@ -/* Based on the theme at http://bonsaiden.github.com/JavaScript-Garden */ - -/**/ -.cm-s-midnight span.CodeMirror-matchhighlight { background: #494949 } -.cm-s-midnight.CodeMirror-focused span.CodeMirror-matchhighlight { background: #314D67 !important; } - -/**/ -.cm-s-midnight .CodeMirror-activeline-background {background: #253540 !important;} - -.cm-s-midnight.CodeMirror { - background: #0F192A; - color: #D1EDFF; -} - -.cm-s-midnight.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;} - -.cm-s-midnight div.CodeMirror-selected {background: #314D67 !important;} -.cm-s-midnight .CodeMirror-gutters {background: #0F192A; border-right: 1px solid;} -.cm-s-midnight .CodeMirror-linenumber {color: #D0D0D0;} -.cm-s-midnight .CodeMirror-cursor { - border-left: 1px solid #F8F8F0 !important; -} - -.cm-s-midnight span.cm-comment {color: #428BDD;} -.cm-s-midnight span.cm-atom {color: #AE81FF;} -.cm-s-midnight span.cm-number {color: #D1EDFF;} - -.cm-s-midnight span.cm-property, .cm-s-midnight span.cm-attribute {color: #A6E22E;} -.cm-s-midnight span.cm-keyword {color: #E83737;} -.cm-s-midnight span.cm-string {color: #1DC116;} - -.cm-s-midnight span.cm-variable {color: #FFAA3E;} -.cm-s-midnight span.cm-variable-2 {color: #FFAA3E;} -.cm-s-midnight span.cm-def {color: #4DD;} -.cm-s-midnight span.cm-bracket {color: #D1EDFF;} -.cm-s-midnight span.cm-tag {color: #449;} -.cm-s-midnight span.cm-link {color: #AE81FF;} -.cm-s-midnight span.cm-error {background: #F92672; color: #F8F8F0;} - -.cm-s-midnight .CodeMirror-matchingbracket { - text-decoration: underline; - color: white !important; -} diff --git a/plugins/codemirror/codemirror/theme/monokai.css b/plugins/codemirror/codemirror/theme/monokai.css deleted file mode 100644 index 7ac601a..0000000 --- a/plugins/codemirror/codemirror/theme/monokai.css +++ /dev/null @@ -1,29 +0,0 @@ -/* Based on Sublime Text's Monokai theme */ - -.cm-s-monokai.CodeMirror {background: #272822; color: #f8f8f2;} -.cm-s-monokai div.CodeMirror-selected {background: #49483E !important;} -.cm-s-monokai .CodeMirror-gutters {background: #272822; border-right: 0px;} -.cm-s-monokai .CodeMirror-linenumber {color: #d0d0d0;} -.cm-s-monokai .CodeMirror-cursor {border-left: 1px solid #f8f8f0 !important;} - -.cm-s-monokai span.cm-comment {color: #75715e;} -.cm-s-monokai span.cm-atom {color: #ae81ff;} -.cm-s-monokai span.cm-number {color: #ae81ff;} - -.cm-s-monokai span.cm-property, .cm-s-monokai span.cm-attribute {color: #a6e22e;} -.cm-s-monokai span.cm-keyword {color: #f92672;} -.cm-s-monokai span.cm-string {color: #e6db74;} - -.cm-s-monokai span.cm-variable {color: #a6e22e;} -.cm-s-monokai span.cm-variable-2 {color: #9effff;} -.cm-s-monokai span.cm-def {color: #fd971f;} -.cm-s-monokai span.cm-bracket {color: #f8f8f2;} -.cm-s-monokai span.cm-tag {color: #f92672;} -.cm-s-monokai span.cm-link {color: #ae81ff;} -.cm-s-monokai span.cm-error {background: #f92672; color: #f8f8f0;} - -.cm-s-monokai .CodeMirror-activeline-background {background: #373831 !important;} -.cm-s-monokai .CodeMirror-matchingbracket { - text-decoration: underline; - color: white !important; -} diff --git a/plugins/codemirror/codemirror/theme/neat.css b/plugins/codemirror/codemirror/theme/neat.css deleted file mode 100644 index 115083b..0000000 --- a/plugins/codemirror/codemirror/theme/neat.css +++ /dev/null @@ -1,12 +0,0 @@ -.cm-s-neat span.cm-comment { color: #a86; } -.cm-s-neat span.cm-keyword { line-height: 1em; font-weight: bold; color: blue; } -.cm-s-neat span.cm-string { color: #a22; } -.cm-s-neat span.cm-builtin { line-height: 1em; font-weight: bold; color: #077; } -.cm-s-neat span.cm-special { line-height: 1em; font-weight: bold; color: #0aa; } -.cm-s-neat span.cm-variable { color: black; } -.cm-s-neat span.cm-number, .cm-s-neat span.cm-atom { color: #3a3; } -.cm-s-neat span.cm-meta {color: #555;} -.cm-s-neat span.cm-link { color: #3a3; } - -.cm-s-neat .CodeMirror-activeline-background {background: #e8f2ff !important;} -.cm-s-neat .CodeMirror-matchingbracket {outline:1px solid grey; color:black !important;} diff --git a/plugins/codemirror/codemirror/theme/night.css b/plugins/codemirror/codemirror/theme/night.css deleted file mode 100644 index 016e55e..0000000 --- a/plugins/codemirror/codemirror/theme/night.css +++ /dev/null @@ -1,24 +0,0 @@ -/* Loosely based on the Midnight Textmate theme */ - -.cm-s-night.CodeMirror { background: #0a001f; color: #f8f8f8; } -.cm-s-night div.CodeMirror-selected { background: #447 !important; } -.cm-s-night .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; } -.cm-s-night .CodeMirror-linenumber { color: #f8f8f8; } -.cm-s-night .CodeMirror-cursor { border-left: 1px solid white !important; } - -.cm-s-night span.cm-comment { color: #6900a1; } -.cm-s-night span.cm-atom { color: #845dc4; } -.cm-s-night span.cm-number, .cm-s-night span.cm-attribute { color: #ffd500; } -.cm-s-night span.cm-keyword { color: #599eff; } -.cm-s-night span.cm-string { color: #37f14a; } -.cm-s-night span.cm-meta { color: #7678e2; } -.cm-s-night span.cm-variable-2, .cm-s-night span.cm-tag { color: #99b2ff; } -.cm-s-night span.cm-variable-3, .cm-s-night span.cm-def { color: white; } -.cm-s-night span.cm-bracket { color: #8da6ce; } -.cm-s-night span.cm-comment { color: #6900a1; } -.cm-s-night span.cm-builtin, .cm-s-night span.cm-special { color: #ff9e59; } -.cm-s-night span.cm-link { color: #845dc4; } -.cm-s-night span.cm-error { color: #9d1e15; } - -.cm-s-night .CodeMirror-activeline-background {background: #1C005A !important;} -.cm-s-night .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;} diff --git a/plugins/codemirror/codemirror/theme/paraiso-dark.css b/plugins/codemirror/codemirror/theme/paraiso-dark.css deleted file mode 100644 index ddefc55..0000000 --- a/plugins/codemirror/codemirror/theme/paraiso-dark.css +++ /dev/null @@ -1,34 +0,0 @@ -/* - - Name: Paraíso (Dark) - Author: Jan T. Sott - - Color scheme by Jan T. Sott (https://github.com/idleberg/Paraiso-CodeMirror) - Inspired by the art of Rubens LP (http://www.rubenslp.com.br) - -*/ - -.cm-s-paraiso-dark.CodeMirror {background: #2f1e2e; color: #b9b6b0;} -.cm-s-paraiso-dark div.CodeMirror-selected {background: #41323f !important;} -.cm-s-paraiso-dark .CodeMirror-gutters {background: #2f1e2e; border-right: 0px;} -.cm-s-paraiso-dark .CodeMirror-linenumber {color: #776e71;} -.cm-s-paraiso-dark .CodeMirror-cursor {border-left: 1px solid #8d8687 !important;} - -.cm-s-paraiso-dark span.cm-comment {color: #e96ba8;} -.cm-s-paraiso-dark span.cm-atom {color: #815ba4;} -.cm-s-paraiso-dark span.cm-number {color: #815ba4;} - -.cm-s-paraiso-dark span.cm-property, .cm-s-paraiso-dark span.cm-attribute {color: #48b685;} -.cm-s-paraiso-dark span.cm-keyword {color: #ef6155;} -.cm-s-paraiso-dark span.cm-string {color: #fec418;} - -.cm-s-paraiso-dark span.cm-variable {color: #48b685;} -.cm-s-paraiso-dark span.cm-variable-2 {color: #06b6ef;} -.cm-s-paraiso-dark span.cm-def {color: #f99b15;} -.cm-s-paraiso-dark span.cm-bracket {color: #b9b6b0;} -.cm-s-paraiso-dark span.cm-tag {color: #ef6155;} -.cm-s-paraiso-dark span.cm-link {color: #815ba4;} -.cm-s-paraiso-dark span.cm-error {background: #ef6155; color: #8d8687;} - -.cm-s-paraiso-dark .CodeMirror-activeline-background {background: #4D344A !important;} -.cm-s-paraiso-dark .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} diff --git a/plugins/codemirror/codemirror/theme/paraiso-light.css b/plugins/codemirror/codemirror/theme/paraiso-light.css deleted file mode 100644 index 8afb14b..0000000 --- a/plugins/codemirror/codemirror/theme/paraiso-light.css +++ /dev/null @@ -1,34 +0,0 @@ -/* - - Name: Paraíso (Light) - Author: Jan T. Sott - - Color scheme by Jan T. Sott (https://github.com/idleberg/Paraiso-CodeMirror) - Inspired by the art of Rubens LP (http://www.rubenslp.com.br) - -*/ - -.cm-s-paraiso-light.CodeMirror {background: #e7e9db; color: #41323f;} -.cm-s-paraiso-light div.CodeMirror-selected {background: #b9b6b0 !important;} -.cm-s-paraiso-light .CodeMirror-gutters {background: #e7e9db; border-right: 0px;} -.cm-s-paraiso-light .CodeMirror-linenumber {color: #8d8687;} -.cm-s-paraiso-light .CodeMirror-cursor {border-left: 1px solid #776e71 !important;} - -.cm-s-paraiso-light span.cm-comment {color: #e96ba8;} -.cm-s-paraiso-light span.cm-atom {color: #815ba4;} -.cm-s-paraiso-light span.cm-number {color: #815ba4;} - -.cm-s-paraiso-light span.cm-property, .cm-s-paraiso-light span.cm-attribute {color: #48b685;} -.cm-s-paraiso-light span.cm-keyword {color: #ef6155;} -.cm-s-paraiso-light span.cm-string {color: #fec418;} - -.cm-s-paraiso-light span.cm-variable {color: #48b685;} -.cm-s-paraiso-light span.cm-variable-2 {color: #06b6ef;} -.cm-s-paraiso-light span.cm-def {color: #f99b15;} -.cm-s-paraiso-light span.cm-bracket {color: #41323f;} -.cm-s-paraiso-light span.cm-tag {color: #ef6155;} -.cm-s-paraiso-light span.cm-link {color: #815ba4;} -.cm-s-paraiso-light span.cm-error {background: #ef6155; color: #776e71;} - -.cm-s-paraiso-light .CodeMirror-activeline-background {background: #CFD1C4 !important;} -.cm-s-paraiso-light .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} diff --git a/plugins/codemirror/codemirror/theme/rubyblue.css b/plugins/codemirror/codemirror/theme/rubyblue.css deleted file mode 100644 index b556139..0000000 --- a/plugins/codemirror/codemirror/theme/rubyblue.css +++ /dev/null @@ -1,23 +0,0 @@ -.cm-s-rubyblue { font-family: Trebuchet, Verdana, sans-serif; } /* - customized editor font - */ - -.cm-s-rubyblue.CodeMirror { background: #112435; color: white; } -.cm-s-rubyblue div.CodeMirror-selected { background: #38566F !important; } -.cm-s-rubyblue .CodeMirror-gutters { background: #1F4661; border-right: 7px solid #3E7087; } -.cm-s-rubyblue .CodeMirror-linenumber { color: white; } -.cm-s-rubyblue .CodeMirror-cursor { border-left: 1px solid white !important; } - -.cm-s-rubyblue span.cm-comment { color: #999; font-style:italic; line-height: 1em; } -.cm-s-rubyblue span.cm-atom { color: #F4C20B; } -.cm-s-rubyblue span.cm-number, .cm-s-rubyblue span.cm-attribute { color: #82C6E0; } -.cm-s-rubyblue span.cm-keyword { color: #F0F; } -.cm-s-rubyblue span.cm-string { color: #F08047; } -.cm-s-rubyblue span.cm-meta { color: #F0F; } -.cm-s-rubyblue span.cm-variable-2, .cm-s-rubyblue span.cm-tag { color: #7BD827; } -.cm-s-rubyblue span.cm-variable-3, .cm-s-rubyblue span.cm-def { color: white; } -.cm-s-rubyblue span.cm-bracket { color: #F0F; } -.cm-s-rubyblue span.cm-link { color: #F4C20B; } -.cm-s-rubyblue span.CodeMirror-matchingbracket { color:#F0F !important; } -.cm-s-rubyblue span.cm-builtin, .cm-s-rubyblue span.cm-special { color: #FF9D00; } -.cm-s-rubyblue span.cm-error { color: #AF2018; } - -.cm-s-rubyblue .CodeMirror-activeline-background {background: #173047 !important;} diff --git a/plugins/codemirror/codemirror/theme/solarized.css b/plugins/codemirror/codemirror/theme/solarized.css deleted file mode 100644 index af30d62..0000000 --- a/plugins/codemirror/codemirror/theme/solarized.css +++ /dev/null @@ -1,180 +0,0 @@ -/* -Solarized theme for code-mirror -http://ethanschoonover.com/solarized -*/ - -/* -Solarized color pallet -http://ethanschoonover.com/solarized/img/solarized-palette.png -*/ - -.solarized.base03 { color: #002b36; } -.solarized.base02 { color: #073642; } -.solarized.base01 { color: #586e75; } -.solarized.base00 { color: #657b83; } -.solarized.base0 { color: #839496; } -.solarized.base1 { color: #93a1a1; } -.solarized.base2 { color: #eee8d5; } -.solarized.base3 { color: #fdf6e3; } -.solarized.solar-yellow { color: #b58900; } -.solarized.solar-orange { color: #cb4b16; } -.solarized.solar-red { color: #dc322f; } -.solarized.solar-magenta { color: #d33682; } -.solarized.solar-violet { color: #6c71c4; } -.solarized.solar-blue { color: #268bd2; } -.solarized.solar-cyan { color: #2aa198; } -.solarized.solar-green { color: #859900; } - -/* Color scheme for code-mirror */ - -.cm-s-solarized { - line-height: 1.45em; - font-family: Menlo,Monaco,"Andale Mono","lucida console","Courier New",monospace !important; - color-profile: sRGB; - rendering-intent: auto; -} -.cm-s-solarized.cm-s-dark { - color: #839496; - background-color: #002b36; - text-shadow: #002b36 0 1px; -} -.cm-s-solarized.cm-s-light { - background-color: #fdf6e3; - color: #657b83; - text-shadow: #eee8d5 0 1px; -} - -.cm-s-solarized .CodeMirror-widget { - text-shadow: none; -} - - -.cm-s-solarized .cm-keyword { color: #cb4b16 } -.cm-s-solarized .cm-atom { color: #d33682; } -.cm-s-solarized .cm-number { color: #d33682; } -.cm-s-solarized .cm-def { color: #2aa198; } - -.cm-s-solarized .cm-variable { color: #268bd2; } -.cm-s-solarized .cm-variable-2 { color: #b58900; } -.cm-s-solarized .cm-variable-3 { color: #6c71c4; } - -.cm-s-solarized .cm-property { color: #2aa198; } -.cm-s-solarized .cm-operator {color: #6c71c4;} - -.cm-s-solarized .cm-comment { color: #586e75; font-style:italic; } - -.cm-s-solarized .cm-string { color: #859900; } -.cm-s-solarized .cm-string-2 { color: #b58900; } - -.cm-s-solarized .cm-meta { color: #859900; } -.cm-s-solarized .cm-qualifier { color: #b58900; } -.cm-s-solarized .cm-builtin { color: #d33682; } -.cm-s-solarized .cm-bracket { color: #cb4b16; } -.cm-s-solarized .CodeMirror-matchingbracket { color: #859900; } -.cm-s-solarized .CodeMirror-nonmatchingbracket { color: #dc322f; } -.cm-s-solarized .cm-tag { color: #93a1a1 } -.cm-s-solarized .cm-attribute { color: #2aa198; } -.cm-s-solarized .cm-header { color: #586e75; } -.cm-s-solarized .cm-quote { color: #93a1a1; } -.cm-s-solarized .cm-hr { - color: transparent; - border-top: 1px solid #586e75; - display: block; -} -.cm-s-solarized .cm-link { color: #93a1a1; cursor: pointer; } -.cm-s-solarized .cm-special { color: #6c71c4; } -.cm-s-solarized .cm-em { - color: #999; - text-decoration: underline; - text-decoration-style: dotted; -} -.cm-s-solarized .cm-strong { color: #eee; } -.cm-s-solarized .cm-tab:before { - content: "➤"; /*visualize tab character*/ - color: #586e75; -} -.cm-s-solarized .cm-error, -.cm-s-solarized .cm-invalidchar { - color: #586e75; - border-bottom: 1px dotted #dc322f; -} - -.cm-s-solarized.cm-s-dark .CodeMirror-selected { - background: #073642; -} - -.cm-s-solarized.cm-s-light .CodeMirror-selected { - background: #eee8d5; -} - -/* Editor styling */ - - - -/* Little shadow on the view-port of the buffer view */ -.cm-s-solarized.CodeMirror { - -moz-box-shadow: inset 7px 0 12px -6px #000; - -webkit-box-shadow: inset 7px 0 12px -6px #000; - box-shadow: inset 7px 0 12px -6px #000; -} - -/* Gutter border and some shadow from it */ -.cm-s-solarized .CodeMirror-gutters { - padding: 0 15px 0 10px; - box-shadow: 0 10px 20px black; - border-right: 1px solid; -} - -/* Gutter colors and line number styling based of color scheme (dark / light) */ - -/* Dark */ -.cm-s-solarized.cm-s-dark .CodeMirror-gutters { - background-color: #073642; - border-color: #00232c; -} - -.cm-s-solarized.cm-s-dark .CodeMirror-linenumber { - text-shadow: #021014 0 -1px; -} - -/* Light */ -.cm-s-solarized.cm-s-light .CodeMirror-gutters { - background-color: #eee8d5; - border-color: #eee8d5; -} - -/* Common */ -.cm-s-solarized .CodeMirror-linenumber { - color: #586e75; -} - -.cm-s-solarized .CodeMirror-gutter .CodeMirror-gutter-text { - color: #586e75; -} - -.cm-s-solarized .CodeMirror-lines { - padding-left: 5px; -} - -.cm-s-solarized .CodeMirror-lines .CodeMirror-cursor { - border-left: 1px solid #819090; -} - -/* -Active line. Negative margin compensates left padding of the text in the -view-port -*/ -.cm-s-solarized.cm-s-dark .CodeMirror-activeline-background { - background: rgba(255, 255, 255, 0.10); -} -.cm-s-solarized.cm-s-light .CodeMirror-activeline-background { - background: rgba(0, 0, 0, 0.10); -} - -/* -View-port and gutter both get little noise background to give it a real feel. -*/ -.cm-s-solarized.CodeMirror, -.cm-s-solarized .CodeMirror-gutters { - background-image: url("data:image/png;base64,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"); -} diff --git a/plugins/codemirror/codemirror/theme/the-matrix.css b/plugins/codemirror/codemirror/theme/the-matrix.css deleted file mode 100644 index 9e60b7b..0000000 --- a/plugins/codemirror/codemirror/theme/the-matrix.css +++ /dev/null @@ -1,26 +0,0 @@ -.cm-s-the-matrix.CodeMirror { background: #000000; color: #00FF00; } -.cm-s-the-matrix span.CodeMirror-selected { background: #a8f !important; } -.cm-s-the-matrix .CodeMirror-gutters { background: #060; border-right: 2px solid #00FF00; } -.cm-s-the-matrix .CodeMirror-linenumber { color: #FFFFFF; } -.cm-s-the-matrix .CodeMirror-cursor { border-left: 1px solid #00FF00 !important; } - -.cm-s-the-matrix span.cm-keyword {color: #008803; font-weight: bold;} -.cm-s-the-matrix span.cm-atom {color: #3FF;} -.cm-s-the-matrix span.cm-number {color: #FFB94F;} -.cm-s-the-matrix span.cm-def {color: #99C;} -.cm-s-the-matrix span.cm-variable {color: #F6C;} -.cm-s-the-matrix span.cm-variable-2 {color: #C6F;} -.cm-s-the-matrix span.cm-variable-3 {color: #96F;} -.cm-s-the-matrix span.cm-property {color: #62FFA0;} -.cm-s-the-matrix span.cm-operator {color: #999} -.cm-s-the-matrix span.cm-comment {color: #CCCCCC;} -.cm-s-the-matrix span.cm-string {color: #39C;} -.cm-s-the-matrix span.cm-meta {color: #C9F;} -.cm-s-the-matrix span.cm-qualifier {color: #FFF700;} -.cm-s-the-matrix span.cm-builtin {color: #30a;} -.cm-s-the-matrix span.cm-bracket {color: #cc7;} -.cm-s-the-matrix span.cm-tag {color: #FFBD40;} -.cm-s-the-matrix span.cm-attribute {color: #FFF700;} -.cm-s-the-matrix span.cm-error {color: #FF0000;} - -.cm-s-the-matrix .CodeMirror-activeline-background {background: #040;} diff --git a/plugins/codemirror/codemirror/theme/tomorrow-night-eighties.css b/plugins/codemirror/codemirror/theme/tomorrow-night-eighties.css deleted file mode 100644 index 85c2a4a..0000000 --- a/plugins/codemirror/codemirror/theme/tomorrow-night-eighties.css +++ /dev/null @@ -1,34 +0,0 @@ -/* - - Name: Tomorrow Night - Eighties - Author: Chris Kempson - - CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror) - Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) - -*/ - -.cm-s-tomorrow-night-eighties.CodeMirror {background: #000000; color: #CCCCCC;} -.cm-s-tomorrow-night-eighties div.CodeMirror-selected {background: #2D2D2D !important;} -.cm-s-tomorrow-night-eighties .CodeMirror-gutters {background: #000000; border-right: 0px;} -.cm-s-tomorrow-night-eighties .CodeMirror-linenumber {color: #515151;} -.cm-s-tomorrow-night-eighties .CodeMirror-cursor {border-left: 1px solid #6A6A6A !important;} - -.cm-s-tomorrow-night-eighties span.cm-comment {color: #d27b53;} -.cm-s-tomorrow-night-eighties span.cm-atom {color: #a16a94;} -.cm-s-tomorrow-night-eighties span.cm-number {color: #a16a94;} - -.cm-s-tomorrow-night-eighties span.cm-property, .cm-s-tomorrow-night-eighties span.cm-attribute {color: #99cc99;} -.cm-s-tomorrow-night-eighties span.cm-keyword {color: #f2777a;} -.cm-s-tomorrow-night-eighties span.cm-string {color: #ffcc66;} - -.cm-s-tomorrow-night-eighties span.cm-variable {color: #99cc99;} -.cm-s-tomorrow-night-eighties span.cm-variable-2 {color: #6699cc;} -.cm-s-tomorrow-night-eighties span.cm-def {color: #f99157;} -.cm-s-tomorrow-night-eighties span.cm-bracket {color: #CCCCCC;} -.cm-s-tomorrow-night-eighties span.cm-tag {color: #f2777a;} -.cm-s-tomorrow-night-eighties span.cm-link {color: #a16a94;} -.cm-s-tomorrow-night-eighties span.cm-error {background: #f2777a; color: #6A6A6A;} - -.cm-s-tomorrow-night-eighties .CodeMirror-activeline-background {background: #343600 !important;} -.cm-s-tomorrow-night-eighties .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} diff --git a/plugins/codemirror/codemirror/theme/twilight.css b/plugins/codemirror/codemirror/theme/twilight.css deleted file mode 100644 index 19d6aba..0000000 --- a/plugins/codemirror/codemirror/theme/twilight.css +++ /dev/null @@ -1,28 +0,0 @@ -.cm-s-twilight.CodeMirror { background: #141414; color: #f7f7f7; } /**/ -.cm-s-twilight .CodeMirror-selected { background: #323232 !important; } /**/ - -.cm-s-twilight .CodeMirror-gutters { background: #222; border-right: 1px solid #aaa; } -.cm-s-twilight .CodeMirror-linenumber { color: #aaa; } -.cm-s-twilight .CodeMirror-cursor { border-left: 1px solid white !important; } - -.cm-s-twilight .cm-keyword { color: #f9ee98; } /**/ -.cm-s-twilight .cm-atom { color: #FC0; } -.cm-s-twilight .cm-number { color: #ca7841; } /**/ -.cm-s-twilight .cm-def { color: #8DA6CE; } -.cm-s-twilight span.cm-variable-2, .cm-s-twilight span.cm-tag { color: #607392; } /**/ -.cm-s-twilight span.cm-variable-3, .cm-s-twilight span.cm-def { color: #607392; } /**/ -.cm-s-twilight .cm-operator { color: #cda869; } /**/ -.cm-s-twilight .cm-comment { color:#777; font-style:italic; font-weight:normal; } /**/ -.cm-s-twilight .cm-string { color:#8f9d6a; font-style:italic; } /**/ -.cm-s-twilight .cm-string-2 { color:#bd6b18 } /*?*/ -.cm-s-twilight .cm-meta { background-color:#141414; color:#f7f7f7; } /*?*/ -.cm-s-twilight .cm-builtin { color: #cda869; } /*?*/ -.cm-s-twilight .cm-tag { color: #997643; } /**/ -.cm-s-twilight .cm-attribute { color: #d6bb6d; } /*?*/ -.cm-s-twilight .cm-header { color: #FF6400; } -.cm-s-twilight .cm-hr { color: #AEAEAE; } -.cm-s-twilight .cm-link { color:#ad9361; font-style:italic; text-decoration:none; } /**/ -.cm-s-twilight .cm-error { border-bottom: 1px solid red; } - -.cm-s-twilight .CodeMirror-activeline-background {background: #27282E !important;} -.cm-s-twilight .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;} diff --git a/plugins/codemirror/codemirror/theme/vibrant-ink.css b/plugins/codemirror/codemirror/theme/vibrant-ink.css deleted file mode 100644 index 0206225..0000000 --- a/plugins/codemirror/codemirror/theme/vibrant-ink.css +++ /dev/null @@ -1,30 +0,0 @@ -/* Taken from the popular Visual Studio Vibrant Ink Schema */ - -.cm-s-vibrant-ink.CodeMirror { background: black; color: white; } -.cm-s-vibrant-ink .CodeMirror-selected { background: #35493c !important; } - -.cm-s-vibrant-ink .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; } -.cm-s-vibrant-ink .CodeMirror-linenumber { color: #d0d0d0; } -.cm-s-vibrant-ink .CodeMirror-cursor { border-left: 1px solid white !important; } - -.cm-s-vibrant-ink .cm-keyword { color: #CC7832; } -.cm-s-vibrant-ink .cm-atom { color: #FC0; } -.cm-s-vibrant-ink .cm-number { color: #FFEE98; } -.cm-s-vibrant-ink .cm-def { color: #8DA6CE; } -.cm-s-vibrant-ink span.cm-variable-2, .cm-s-vibrant span.cm-tag { color: #FFC66D } -.cm-s-vibrant-ink span.cm-variable-3, .cm-s-vibrant span.cm-def { color: #FFC66D } -.cm-s-vibrant-ink .cm-operator { color: #888; } -.cm-s-vibrant-ink .cm-comment { color: gray; font-weight: bold; } -.cm-s-vibrant-ink .cm-string { color: #A5C25C } -.cm-s-vibrant-ink .cm-string-2 { color: red } -.cm-s-vibrant-ink .cm-meta { color: #D8FA3C; } -.cm-s-vibrant-ink .cm-builtin { color: #8DA6CE; } -.cm-s-vibrant-ink .cm-tag { color: #8DA6CE; } -.cm-s-vibrant-ink .cm-attribute { color: #8DA6CE; } -.cm-s-vibrant-ink .cm-header { color: #FF6400; } -.cm-s-vibrant-ink .cm-hr { color: #AEAEAE; } -.cm-s-vibrant-ink .cm-link { color: blue; } -.cm-s-vibrant-ink .cm-error { border-bottom: 1px solid red; } - -.cm-s-vibrant-ink .CodeMirror-activeline-background {background: #27282E !important;} -.cm-s-vibrant-ink .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;} diff --git a/plugins/codemirror/codemirror/theme/xq-dark.css b/plugins/codemirror/codemirror/theme/xq-dark.css deleted file mode 100644 index 4a0b213..0000000 --- a/plugins/codemirror/codemirror/theme/xq-dark.css +++ /dev/null @@ -1,49 +0,0 @@ -/* -Copyright (C) 2011 by MarkLogic Corporation -Author: Mike Brevoort - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ -.cm-s-xq-dark.CodeMirror { background: #0a001f; color: #f8f8f8; } -.cm-s-xq-dark .CodeMirror-selected { background: #27007A !important; } -.cm-s-xq-dark .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; } -.cm-s-xq-dark .CodeMirror-linenumber { color: #f8f8f8; } -.cm-s-xq-dark .CodeMirror-cursor { border-left: 1px solid white !important; } - -.cm-s-xq-dark span.cm-keyword {color: #FFBD40;} -.cm-s-xq-dark span.cm-atom {color: #6C8CD5;} -.cm-s-xq-dark span.cm-number {color: #164;} -.cm-s-xq-dark span.cm-def {color: #FFF; text-decoration:underline;} -.cm-s-xq-dark span.cm-variable {color: #FFF;} -.cm-s-xq-dark span.cm-variable-2 {color: #EEE;} -.cm-s-xq-dark span.cm-variable-3 {color: #DDD;} -.cm-s-xq-dark span.cm-property {} -.cm-s-xq-dark span.cm-operator {} -.cm-s-xq-dark span.cm-comment {color: gray;} -.cm-s-xq-dark span.cm-string {color: #9FEE00;} -.cm-s-xq-dark span.cm-meta {color: yellow;} -.cm-s-xq-dark span.cm-qualifier {color: #FFF700;} -.cm-s-xq-dark span.cm-builtin {color: #30a;} -.cm-s-xq-dark span.cm-bracket {color: #cc7;} -.cm-s-xq-dark span.cm-tag {color: #FFBD40;} -.cm-s-xq-dark span.cm-attribute {color: #FFF700;} -.cm-s-xq-dark span.cm-error {color: #f00;} - -.cm-s-xq-dark .CodeMirror-activeline-background {background: #27282E !important;} -.cm-s-xq-dark .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;} \ No newline at end of file diff --git a/plugins/codemirror/codemirror/theme/xq-light.css b/plugins/codemirror/codemirror/theme/xq-light.css deleted file mode 100644 index 20b5c79..0000000 --- a/plugins/codemirror/codemirror/theme/xq-light.css +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright (C) 2011 by MarkLogic Corporation -Author: Mike Brevoort - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ -.cm-s-xq-light span.cm-keyword {line-height: 1em; font-weight: bold; color: #5A5CAD; } -.cm-s-xq-light span.cm-atom {color: #6C8CD5;} -.cm-s-xq-light span.cm-number {color: #164;} -.cm-s-xq-light span.cm-def {text-decoration:underline;} -.cm-s-xq-light span.cm-variable {color: black; } -.cm-s-xq-light span.cm-variable-2 {color:black;} -.cm-s-xq-light span.cm-variable-3 {color: black; } -.cm-s-xq-light span.cm-property {} -.cm-s-xq-light span.cm-operator {} -.cm-s-xq-light span.cm-comment {color: #0080FF; font-style: italic;} -.cm-s-xq-light span.cm-string {color: red;} -.cm-s-xq-light span.cm-meta {color: yellow;} -.cm-s-xq-light span.cm-qualifier {color: grey} -.cm-s-xq-light span.cm-builtin {color: #7EA656;} -.cm-s-xq-light span.cm-bracket {color: #cc7;} -.cm-s-xq-light span.cm-tag {color: #3F7F7F;} -.cm-s-xq-light span.cm-attribute {color: #7F007F;} -.cm-s-xq-light span.cm-error {color: #f00;} - -.cm-s-xq-light .CodeMirror-activeline-background {background: #e8f2ff !important;} -.cm-s-xq-light .CodeMirror-matchingbracket {outline:1px solid grey;color:black !important;background:yellow;} \ No newline at end of file diff --git a/plugins/codemirror/install/codemirror.manifest.xml b/plugins/codemirror/install/codemirror.manifest.xml deleted file mode 100644 index e51e637..0000000 --- a/plugins/codemirror/install/codemirror.manifest.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - plugins/codemirror/codemirror.plugin.php - active - 15 - CodeMirror - CodeMirror is a JavaScript component that provides a code editor in the browser. - 1.0.0 - Awilum - http://monstra.org/ - diff --git a/plugins/markdown/README.md b/plugins/markdown/README.md deleted file mode 100644 index 7b745f3..0000000 --- a/plugins/markdown/README.md +++ /dev/null @@ -1,4 +0,0 @@ -Markdown -====================== - -Markdown Syntax Documentation: [http://daringfireball.net/projects/markdown/syntax](http://daringfireball.net/projects/markdown/syntax) \ No newline at end of file diff --git a/plugins/markdown/install/markdown.manifest.xml b/plugins/markdown/install/markdown.manifest.xml deleted file mode 100644 index c158c93..0000000 --- a/plugins/markdown/install/markdown.manifest.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - plugins/markdown/markdown.plugin.php - active - 10 - Markdown - Markdown markup language plugin for Monstra - 1.0.0 - Awilum - http://monstra.org/ - \ No newline at end of file diff --git a/plugins/markdown/markdown.plugin.php b/plugins/markdown/markdown.plugin.php deleted file mode 100644 index ffc7baf..0000000 --- a/plugins/markdown/markdown.plugin.php +++ /dev/null @@ -1,33 +0,0 @@ - -All rights reserved. - -Based on Markdown -Copyright (c) 2003-2006 John Gruber - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -* Neither the name "Markdown" nor the names of its contributors may - be used to endorse or promote products derived from this software - without specific prior written permission. - -This software is provided by the copyright holders and contributors "as -is" and any express or implied warranties, including, but not limited -to, the implied warranties of merchantability and fitness for a -particular purpose are disclaimed. In no event shall the copyright owner -or contributors be liable for any direct, indirect, incidental, special, -exemplary, or consequential damages (including, but not limited to, -procurement of substitute goods or services; loss of use, data, or -profits; or business interruption) however caused and on any theory of -liability, whether in contract, strict liability, or tort (including -negligence or otherwise) arising in any way out of the use of this -software, even if advised of the possibility of such damage. diff --git a/plugins/markdown/php-markdown/Michelf/Markdown.php b/plugins/markdown/php-markdown/Michelf/Markdown.php deleted file mode 100644 index ca048c8..0000000 --- a/plugins/markdown/php-markdown/Michelf/Markdown.php +++ /dev/null @@ -1,3174 +0,0 @@ - -# -# Original Markdown -# Copyright (c) 2004-2006 John Gruber -# -# -namespace Michelf; - -# -# Markdown Parser Class -# - -class Markdown -{ - ### Version ### - - const MARKDOWNLIB_VERSION = "1.3"; - - ### Simple Function Interface ### - - public static function defaultTransform($text) - { - # - # Initialize the parser and return the result of its transform method. - # This will work fine for derived classes too. - # - # Take parser class on which this function was called. - $parser_class = \get_called_class(); - - # try to take parser from the static parser list - static $parser_list; - $parser =& $parser_list[$parser_class]; - - # create the parser it not already set - if (!$parser) - $parser = new $parser_class; - - # Transform text using parser. - - return $parser->transform($text); - } - - ### Configuration Variables ### - - # Change to ">" for HTML output. - public $empty_element_suffix = " />"; - public $tab_width = 4; - - # Change to `true` to disallow markup or entities. - public $no_markup = false; - public $no_entities = false; - - # Predefined urls and titles for reference links and images. - public $predef_urls = array(); - public $predef_titles = array(); - - ### Parser Implementation ### - - # Regex to match balanced [brackets]. - # Needed to insert a maximum bracked depth while converting to PHP. - protected $nested_brackets_depth = 6; - protected $nested_brackets_re; - - protected $nested_url_parenthesis_depth = 4; - protected $nested_url_parenthesis_re; - - # Table of hash values for escaped characters: - protected $escape_chars = '\`*_{}[]()>#+-.!'; - protected $escape_chars_re; - - public function __construct() - { - # - # Constructor function. Initialize appropriate member variables. - # - $this->_initDetab(); - $this->prepareItalicsAndBold(); - - $this->nested_brackets_re = - str_repeat('(?>[^\[\]]+|\[', $this->nested_brackets_depth). - str_repeat('\])*', $this->nested_brackets_depth); - - $this->nested_url_parenthesis_re = - str_repeat('(?>[^()\s]+|\(', $this->nested_url_parenthesis_depth). - str_repeat('(?>\)))*', $this->nested_url_parenthesis_depth); - - $this->escape_chars_re = '['.preg_quote($this->escape_chars).']'; - - # Sort document, block, and span gamut in ascendent priority order. - asort($this->document_gamut); - asort($this->block_gamut); - asort($this->span_gamut); - } - - # Internal hashes used during transformation. - protected $urls = array(); - protected $titles = array(); - protected $html_hashes = array(); - - # Status flag to avoid invalid nesting. - protected $in_anchor = false; - - protected function setup() - { - # - # Called before the transformation process starts to setup parser - # states. - # - # Clear global hashes. - $this->urls = $this->predef_urls; - $this->titles = $this->predef_titles; - $this->html_hashes = array(); - - $this->in_anchor = false; - } - - protected function teardown() - { - # - # Called after the transformation process to clear any variable - # which may be taking up memory unnecessarly. - # - $this->urls = array(); - $this->titles = array(); - $this->html_hashes = array(); - } - - public function transform($text) - { - # - # Main function. Performs some preprocessing on the input text - # and pass it through the document gamut. - # - $this->setup(); - - # Remove UTF-8 BOM and marker character in input, if present. - $text = preg_replace('{^\xEF\xBB\xBF|\x1A}', '', $text); - - # Standardize line endings: - # DOS to Unix and Mac to Unix - $text = preg_replace('{\r\n?}', "\n", $text); - - # Make sure $text ends with a couple of newlines: - $text .= "\n\n"; - - # Convert all tabs to spaces. - $text = $this->detab($text); - - # Turn block-level HTML blocks into hash entries - $text = $this->hashHTMLBlocks($text); - - # Strip any lines consisting only of spaces and tabs. - # This makes subsequent regexen easier to write, because we can - # match consecutive blank lines with /\n+/ instead of something - # contorted like /[ ]*\n+/ . - $text = preg_replace('/^[ ]+$/m', '', $text); - - # Run document gamut methods. - foreach ($this->document_gamut as $method => $priority) { - $text = $this->$method($text); - } - - $this->teardown(); - - return $text . "\n"; - } - - protected $document_gamut = array( - # Strip link definitions, store in hashes. - "stripLinkDefinitions" => 20, - - "runBasicBlockGamut" => 30, - ); - - protected function stripLinkDefinitions($text) - { - # - # Strips link definitions from text, stores the URLs and titles in - # hash references. - # - $less_than_tab = $this->tab_width - 1; - - # Link defs are in the form: ^[id]: url "optional title" - $text = preg_replace_callback('{ - ^[ ]{0,'.$less_than_tab.'}\[(.+)\][ ]?: # id = $1 - [ ]* - \n? # maybe *one* newline - [ ]* - (?: - <(.+?)> # url = $2 - | - (\S+?) # url = $3 - ) - [ ]* - \n? # maybe one newline - [ ]* - (?: - (?<=\s) # lookbehind for whitespace - ["(] - (.*?) # title = $4 - [")] - [ ]* - )? # title is optional - (?:\n+|\Z) - }xm', - array(&$this, '_stripLinkDefinitions_callback'), - $text); - - return $text; - } - protected function _stripLinkDefinitions_callback($matches) - { - $link_id = strtolower($matches[1]); - $url = $matches[2] == '' ? $matches[3] : $matches[2]; - $this->urls[$link_id] = $url; - $this->titles[$link_id] =& $matches[4]; - - return ''; # String that will replace the block - } - - protected function hashHTMLBlocks($text) - { - if ($this->no_markup) return $text; - - $less_than_tab = $this->tab_width - 1; - - # Hashify HTML blocks: - # We only want to do this for block-level HTML tags, such as headers, - # lists, and tables. That's because we still want to wrap

    s around - # "paragraphs" that are wrapped in non-block-level tags, such as anchors, - # phrase emphasis, and spans. The list of tags we're looking for is - # hard-coded: - # - # * List "a" is made of tags which can be both inline or block-level. - # These will be treated block-level when the start tag is alone on - # its line, otherwise they're not matched here and will be taken as - # inline later. - # * List "b" is made of tags which are always block-level; - # - $block_tags_a_re = 'ins|del'; - $block_tags_b_re = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|'. - 'script|noscript|form|fieldset|iframe|math|svg|'. - 'article|section|nav|aside|hgroup|header|footer|'. - 'figure'; - - # Regular expression for the content of a block tag. - $nested_tags_level = 4; - $attr = ' - (?> # optional tag attributes - \s # starts with whitespace - (?> - [^>"/]+ # text outside quotes - | - /+(?!>) # slash not followed by ">" - | - "[^"]*" # text inside double quotes (tolerate ">") - | - \'[^\']*\' # text inside single quotes (tolerate ">") - )* - )? - '; - $content = - str_repeat(' - (?> - [^<]+ # content without tag - | - <\2 # nested opening tag - '.$attr.' # attributes - (?> - /> - | - >', $nested_tags_level). # end of opening tag - '.*?'. # last level nested tag content - str_repeat(' - # closing nested tag - ) - | - <(?!/\2\s*> # other tags with a different name - ) - )*', - $nested_tags_level); - $content2 = str_replace('\2', '\3', $content); - - # First, look for nested blocks, e.g.: - #

    - #
    - # tags for inner block must be indented. - #
    - #
    - # - # The outermost tags must start at the left margin for this to match, and - # the inner nested divs must be indented. - # We need to do this before the next, more liberal match, because the next - # match will start at the first `
    ` and stop at the first `
    `. - $text = preg_replace_callback('{(?> - (?> - (?<=\n\n) # Starting after a blank line - | # or - \A\n? # the beginning of the doc - ) - ( # save in $1 - - # Match from `\n` to `\n`, handling nested tags - # in between. - - [ ]{0,'.$less_than_tab.'} - <('.$block_tags_b_re.')# start tag = $2 - '.$attr.'> # attributes followed by > and \n - '.$content.' # content, support nesting - # the matching end tag - [ ]* # trailing spaces/tabs - (?=\n+|\Z) # followed by a newline or end of document - - | # Special version for tags of group a. - - [ ]{0,'.$less_than_tab.'} - <('.$block_tags_a_re.')# start tag = $3 - '.$attr.'>[ ]*\n # attributes followed by > - '.$content2.' # content, support nesting - # the matching end tag - [ ]* # trailing spaces/tabs - (?=\n+|\Z) # followed by a newline or end of document - - | # Special case just for
    . It was easier to make a special - # case than to make the other regex more complicated. - - [ ]{0,'.$less_than_tab.'} - <(hr) # start tag = $2 - '.$attr.' # attributes - /?> # the matching end tag - [ ]* - (?=\n{2,}|\Z) # followed by a blank line or end of document - - | # Special case for standalone HTML comments: - - [ ]{0,'.$less_than_tab.'} - (?s: - - ) - [ ]* - (?=\n{2,}|\Z) # followed by a blank line or end of document - - | # PHP and ASP-style processor instructions ( - ) - [ ]* - (?=\n{2,}|\Z) # followed by a blank line or end of document - - ) - )}Sxmi', - array(&$this, '_hashHTMLBlocks_callback'), - $text); - - return $text; - } - protected function _hashHTMLBlocks_callback($matches) - { - $text = $matches[1]; - $key = $this->hashBlock($text); - - return "\n\n$key\n\n"; - } - - protected function hashPart($text, $boundary = 'X') - { - # - # Called whenever a tag must be hashed when a function insert an atomic - # element in the text stream. Passing $text to through this function gives - # a unique text-token which will be reverted back when calling unhash. - # - # The $boundary argument specify what character should be used to surround - # the token. By convension, "B" is used for block elements that needs not - # to be wrapped into paragraph tags at the end, ":" is used for elements - # that are word separators and "X" is used in the general case. - # - # Swap back any tag hash found in $text so we do not have to `unhash` - # multiple times at the end. - $text = $this->unhash($text); - - # Then hash the block. - static $i = 0; - $key = "$boundary\x1A" . ++$i . $boundary; - $this->html_hashes[$key] = $text; - - return $key; # String that will replace the tag. - } - - protected function hashBlock($text) - { - # - # Shortcut function for hashPart with block-level boundaries. - # - - return $this->hashPart($text, 'B'); - } - - protected $block_gamut = array( - # - # These are all the transformations that form block-level - # tags like paragraphs, headers, and list items. - # - "doHeaders" => 10, - "doHorizontalRules" => 20, - - "doLists" => 40, - "doCodeBlocks" => 50, - "doBlockQuotes" => 60, - ); - - protected function runBlockGamut($text) - { - # - # Run block gamut tranformations. - # - # We need to escape raw HTML in Markdown source before doing anything - # else. This need to be done for each block, and not only at the - # begining in the Markdown function since hashed blocks can be part of - # list items and could have been indented. Indented blocks would have - # been seen as a code block in a previous pass of hashHTMLBlocks. - $text = $this->hashHTMLBlocks($text); - - return $this->runBasicBlockGamut($text); - } - - protected function runBasicBlockGamut($text) - { - # - # Run block gamut tranformations, without hashing HTML blocks. This is - # useful when HTML blocks are known to be already hashed, like in the first - # whole-document pass. - # - foreach ($this->block_gamut as $method => $priority) { - $text = $this->$method($text); - } - - # Finally form paragraph and restore hashed blocks. - $text = $this->formParagraphs($text); - - return $text; - } - - protected function doHorizontalRules($text) - { - # Do Horizontal Rules: - return preg_replace( - '{ - ^[ ]{0,3} # Leading space - ([-*_]) # $1: First marker - (?> # Repeated marker group - [ ]{0,2} # Zero, one, or two spaces. - \1 # Marker character - ){2,} # Group repeated at least twice - [ ]* # Tailing spaces - $ # End of line. - }mx', - "\n".$this->hashBlock("empty_element_suffix")."\n", - $text); - } - - protected $span_gamut = array( - # - # These are all the transformations that occur *within* block-level - # tags like paragraphs, headers, and list items. - # - # Process character escapes, code spans, and inline HTML - # in one shot. - "parseSpan" => -30, - - # Process anchor and image tags. Images must come first, - # because ![foo][f] looks like an anchor. - "doImages" => 10, - "doAnchors" => 20, - - # Make links out of things like `` - # Must come after doAnchors, because you can use < and > - # delimiters in inline links like [this](). - "doAutoLinks" => 30, - "encodeAmpsAndAngles" => 40, - - "doItalicsAndBold" => 50, - "doHardBreaks" => 60, - ); - - protected function runSpanGamut($text) - { - # - # Run span gamut tranformations. - # - foreach ($this->span_gamut as $method => $priority) { - $text = $this->$method($text); - } - - return $text; - } - - protected function doHardBreaks($text) - { - # Do hard breaks: - return preg_replace_callback('/ {2,}\n/', - array(&$this, '_doHardBreaks_callback'), $text); - } - protected function _doHardBreaks_callback($matches) - { - return $this->hashPart("empty_element_suffix\n"); - } - - protected function doAnchors($text) - { - # - # Turn Markdown link shortcuts into XHTML tags. - # - if ($this->in_anchor) return $text; - $this->in_anchor = true; - - # - # First, handle reference-style links: [link text] [id] - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - \[ - ('.$this->nested_brackets_re.') # link text = $2 - \] - - [ ]? # one optional space - (?:\n[ ]*)? # one optional newline followed by spaces - - \[ - (.*?) # id = $3 - \] - ) - }xs', - array(&$this, '_doAnchors_reference_callback'), $text); - - # - # Next, inline-style links: [link text](url "optional title") - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - \[ - ('.$this->nested_brackets_re.') # link text = $2 - \] - \( # literal paren - [ \n]* - (?: - <(.+?)> # href = $3 - | - ('.$this->nested_url_parenthesis_re.') # href = $4 - ) - [ \n]* - ( # $5 - ([\'"]) # quote char = $6 - (.*?) # Title = $7 - \6 # matching quote - [ \n]* # ignore any spaces/tabs between closing quote and ) - )? # title is optional - \) - ) - }xs', - array(&$this, '_doAnchors_inline_callback'), $text); - - # - # Last, handle reference-style shortcuts: [link text] - # These must come last in case you've also got [link text][1] - # or [link text](/foo) - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - \[ - ([^\[\]]+) # link text = $2; can\'t contain [ or ] - \] - ) - }xs', - array(&$this, '_doAnchors_reference_callback'), $text); - - $this->in_anchor = false; - - return $text; - } - protected function _doAnchors_reference_callback($matches) - { - $whole_match = $matches[1]; - $link_text = $matches[2]; - $link_id =& $matches[3]; - - if ($link_id == "") { - # for shortcut links like [this][] or [this]. - $link_id = $link_text; - } - - # lower-case and turn embedded newlines into spaces - $link_id = strtolower($link_id); - $link_id = preg_replace('{[ ]?\n}', ' ', $link_id); - - if (isset($this->urls[$link_id])) { - $url = $this->urls[$link_id]; - $url = $this->encodeAttribute($url); - - $result = "titles[$link_id] ) ) { - $title = $this->titles[$link_id]; - $title = $this->encodeAttribute($title); - $result .= " title=\"$title\""; - } - - $link_text = $this->runSpanGamut($link_text); - $result .= ">$link_text"; - $result = $this->hashPart($result); - } else { - $result = $whole_match; - } - - return $result; - } - protected function _doAnchors_inline_callback($matches) - { - $whole_match = $matches[1]; - $link_text = $this->runSpanGamut($matches[2]); - $url = $matches[3] == '' ? $matches[4] : $matches[3]; - $title =& $matches[7]; - - $url = $this->encodeAttribute($url); - - $result = "encodeAttribute($title); - $result .= " title=\"$title\""; - } - - $link_text = $this->runSpanGamut($link_text); - $result .= ">$link_text"; - - return $this->hashPart($result); - } - - protected function doImages($text) - { - # - # Turn Markdown image shortcuts into tags. - # - # - # First, handle reference-style labeled images: ![alt text][id] - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - !\[ - ('.$this->nested_brackets_re.') # alt text = $2 - \] - - [ ]? # one optional space - (?:\n[ ]*)? # one optional newline followed by spaces - - \[ - (.*?) # id = $3 - \] - - ) - }xs', - array(&$this, '_doImages_reference_callback'), $text); - - # - # Next, handle inline images: ![alt text](url "optional title") - # Don't forget: encode * and _ - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - !\[ - ('.$this->nested_brackets_re.') # alt text = $2 - \] - \s? # One optional whitespace character - \( # literal paren - [ \n]* - (?: - <(\S*)> # src url = $3 - | - ('.$this->nested_url_parenthesis_re.') # src url = $4 - ) - [ \n]* - ( # $5 - ([\'"]) # quote char = $6 - (.*?) # title = $7 - \6 # matching quote - [ \n]* - )? # title is optional - \) - ) - }xs', - array(&$this, '_doImages_inline_callback'), $text); - - return $text; - } - protected function _doImages_reference_callback($matches) - { - $whole_match = $matches[1]; - $alt_text = $matches[2]; - $link_id = strtolower($matches[3]); - - if ($link_id == "") { - $link_id = strtolower($alt_text); # for shortcut links like ![this][]. - } - - $alt_text = $this->encodeAttribute($alt_text); - if (isset($this->urls[$link_id])) { - $url = $this->encodeAttribute($this->urls[$link_id]); - $result = "\"$alt_text\"";titles[$link_id])) { - $title = $this->titles[$link_id]; - $title = $this->encodeAttribute($title); - $result .= " title=\"$title\""; - } - $result .= $this->empty_element_suffix; - $result = $this->hashPart($result); - } else { - # If there's no such link ID, leave intact: - $result = $whole_match; - } - - return $result; - } - protected function _doImages_inline_callback($matches) - { - $whole_match = $matches[1]; - $alt_text = $matches[2]; - $url = $matches[3] == '' ? $matches[4] : $matches[3]; - $title =& $matches[7]; - - $alt_text = $this->encodeAttribute($alt_text); - $url = $this->encodeAttribute($url); - $result = "\"$alt_text\"";encodeAttribute($title); - $result .= " title=\"$title\""; # $title already quoted - } - $result .= $this->empty_element_suffix; - - return $this->hashPart($result); - } - - - protected function doHeaders($text) - { - # Setext-style headers: - # Header 1 - # ======== - # - # Header 2 - # -------- - # - $text = preg_replace_callback('{ ^(.+?)[ ]*\n(=+|-+)[ ]*\n+ }mx', - array(&$this, '_doHeaders_callback_setext'), $text); - - # atx-style headers: - # # Header 1 - # ## Header 2 - # ## Header 2 with closing hashes ## - # ... - # ###### Header 6 - # - $text = preg_replace_callback('{ - ^(\#{1,6}) # $1 = string of #\'s - [ ]* - (.+?) # $2 = Header text - [ ]* - \#* # optional closing #\'s (not counted) - \n+ - }xm', - array(&$this, '_doHeaders_callback_atx'), $text); - - return $text; - } - protected function _doHeaders_callback_setext($matches) - { - # Terrible hack to check we haven't found an empty list item. - if ($matches[2] == '-' && preg_match('{^-(?: |$)}', $matches[1])) - - return $matches[0]; - - $level = $matches[2]{0} == '=' ? 1 : 2; - $block = "".$this->runSpanGamut($matches[1]).""; - - return "\n" . $this->hashBlock($block) . "\n\n"; - } - protected function _doHeaders_callback_atx($matches) - { - $level = strlen($matches[1]); - $block = "".$this->runSpanGamut($matches[2]).""; - - return "\n" . $this->hashBlock($block) . "\n\n"; - } - - - protected function doLists($text) - { - # - # Form HTML ordered (numbered) and unordered (bulleted) lists. - # - $less_than_tab = $this->tab_width - 1; - - # Re-usable patterns to match list item bullets and number markers: - $marker_ul_re = '[*+-]'; - $marker_ol_re = '\d+[\.]'; - $marker_any_re = "(?:$marker_ul_re|$marker_ol_re)"; - - $markers_relist = array( - $marker_ul_re => $marker_ol_re, - $marker_ol_re => $marker_ul_re, - ); - - foreach ($markers_relist as $marker_re => $other_marker_re) { - # Re-usable pattern to match any entirel ul or ol list: - $whole_list_re = ' - ( # $1 = whole list - ( # $2 - ([ ]{0,'.$less_than_tab.'}) # $3 = number of spaces - ('.$marker_re.') # $4 = first list item marker - [ ]+ - ) - (?s:.+?) - ( # $5 - \z - | - \n{2,} - (?=\S) - (?! # Negative lookahead for another list item marker - [ ]* - '.$marker_re.'[ ]+ - ) - | - (?= # Lookahead for another kind of list - \n - \3 # Must have the same indentation - '.$other_marker_re.'[ ]+ - ) - ) - ) - '; // mx - - # We use a different prefix before nested lists than top-level lists. - # See extended comment in _ProcessListItems(). - - if ($this->list_level) { - $text = preg_replace_callback('{ - ^ - '.$whole_list_re.' - }mx', - array(&$this, '_doLists_callback'), $text); - } else { - $text = preg_replace_callback('{ - (?:(?<=\n)\n|\A\n?) # Must eat the newline - '.$whole_list_re.' - }mx', - array(&$this, '_doLists_callback'), $text); - } - } - - return $text; - } - protected function _doLists_callback($matches) - { - # Re-usable patterns to match list item bullets and number markers: - $marker_ul_re = '[*+-]'; - $marker_ol_re = '\d+[\.]'; - $marker_any_re = "(?:$marker_ul_re|$marker_ol_re)"; - - $list = $matches[1]; - $list_type = preg_match("/$marker_ul_re/", $matches[4]) ? "ul" : "ol"; - - $marker_any_re = ( $list_type == "ul" ? $marker_ul_re : $marker_ol_re ); - - $list .= "\n"; - $result = $this->processListItems($list, $marker_any_re); - - $result = $this->hashBlock("<$list_type>\n" . $result . ""); - - return "\n". $result ."\n\n"; - } - - protected $list_level = 0; - - protected function processListItems($list_str, $marker_any_re) - { - # - # Process the contents of a single ordered or unordered list, splitting it - # into individual list items. - # - # The $this->list_level global keeps track of when we're inside a list. - # Each time we enter a list, we increment it; when we leave a list, - # we decrement. If it's zero, we're not in a list anymore. - # - # We do this because when we're not inside a list, we want to treat - # something like this: - # - # I recommend upgrading to version - # 8. Oops, now this line is treated - # as a sub-list. - # - # As a single paragraph, despite the fact that the second line starts - # with a digit-period-space sequence. - # - # Whereas when we're inside a list (or sub-list), that line will be - # treated as the start of a sub-list. What a kludge, huh? This is - # an aspect of Markdown's syntax that's hard to parse perfectly - # without resorting to mind-reading. Perhaps the solution is to - # change the syntax rules such that sub-lists must start with a - # starting cardinal number; e.g. "1." or "a.". - - $this->list_level++; - - # trim trailing blank lines: - $list_str = preg_replace("/\n{2,}\\z/", "\n", $list_str); - - $list_str = preg_replace_callback('{ - (\n)? # leading line = $1 - (^[ ]*) # leading whitespace = $2 - ('.$marker_any_re.' # list marker and space = $3 - (?:[ ]+|(?=\n)) # space only required if item is not empty - ) - ((?s:.*?)) # list item text = $4 - (?:(\n+(?=\n))|\n) # tailing blank line = $5 - (?= \n* (\z | \2 ('.$marker_any_re.') (?:[ ]+|(?=\n)))) - }xm', - array(&$this, '_processListItems_callback'), $list_str); - - $this->list_level--; - - return $list_str; - } - protected function _processListItems_callback($matches) - { - $item = $matches[4]; - $leading_line =& $matches[1]; - $leading_space =& $matches[2]; - $marker_space = $matches[3]; - $tailing_blank_line =& $matches[5]; - - if ($leading_line || $tailing_blank_line || - preg_match('/\n{2,}/', $item)) - { - # Replace marker with the appropriate whitespace indentation - $item = $leading_space . str_repeat(' ', strlen($marker_space)) . $item; - $item = $this->runBlockGamut($this->outdent($item)."\n"); - } else { - # Recursion for sub-lists: - $item = $this->doLists($this->outdent($item)); - $item = preg_replace('/\n+$/', '', $item); - $item = $this->runSpanGamut($item); - } - - return "
  • " . $item . "
  • \n"; - } - - protected function doCodeBlocks($text) - { - # - # Process Markdown `
    ` blocks.
    -    #
    -        $text = preg_replace_callback('{
    -                (?:\n\n|\A\n?)
    -                (	            # $1 = the code block -- one or more lines, starting with a space/tab
    -                  (?>
    -                    [ ]{'.$this->tab_width.'}  # Lines must start with a tab or a tab-width of spaces
    -                    .*\n+
    -                  )+
    -                )
    -                ((?=^[ ]{0,'.$this->tab_width.'}\S)|\Z)	# Lookahead for non-space at line-start, or end of doc
    -            }xm',
    -            array(&$this, '_doCodeBlocks_callback'), $text);
    -
    -        return $text;
    -    }
    -    protected function _doCodeBlocks_callback($matches)
    -    {
    -        $codeblock = $matches[1];
    -
    -        $codeblock = $this->outdent($codeblock);
    -        $codeblock = htmlspecialchars($codeblock, ENT_NOQUOTES);
    -
    -        # trim leading newlines and trailing newlines
    -        $codeblock = preg_replace('/\A\n+|\n+\z/', '', $codeblock);
    -
    -        $codeblock = "
    $codeblock\n
    "; - - return "\n\n".$this->hashBlock($codeblock)."\n\n"; - } - - protected function makeCodeSpan($code) - { - # - # Create a code span markup for $code. Called from handleSpanToken. - # - $code = htmlspecialchars(trim($code), ENT_NOQUOTES); - - return $this->hashPart("$code"); - } - - protected $em_relist = array( - '' => '(?:(? '(?<=\S|^)(? '(?<=\S|^)(? '(?:(? '(?<=\S|^)(? '(?<=\S|^)(? '(?:(? '(?<=\S|^)(? '(?<=\S|^)(?em_relist as $em => $em_re) { - foreach ($this->strong_relist as $strong => $strong_re) { - # Construct list of allowed token expressions. - $token_relist = array(); - if (isset($this->em_strong_relist["$em$strong"])) { - $token_relist[] = $this->em_strong_relist["$em$strong"]; - } - $token_relist[] = $em_re; - $token_relist[] = $strong_re; - - # Construct master expression from list. - $token_re = '{('. implode('|', $token_relist) .')}'; - $this->em_strong_prepared_relist["$em$strong"] = $token_re; - } - } - } - - protected function doItalicsAndBold($text) - { - $token_stack = array(''); - $text_stack = array(''); - $em = ''; - $strong = ''; - $tree_char_em = false; - - while (1) { - # - # Get prepared regular expression for seraching emphasis tokens - # in current context. - # - $token_re = $this->em_strong_prepared_relist["$em$strong"]; - - # - # Each loop iteration search for the next emphasis token. - # Each token is then passed to handleSpanToken. - # - $parts = preg_split($token_re, $text, 2, PREG_SPLIT_DELIM_CAPTURE); - $text_stack[0] .= $parts[0]; - $token =& $parts[1]; - $text =& $parts[2]; - - if (empty($token)) { - # Reached end of text span: empty stack without emitting. - # any more emphasis. - while ($token_stack[0]) { - $text_stack[1] .= array_shift($token_stack); - $text_stack[0] .= array_shift($text_stack); - } - break; - } - - $token_len = strlen($token); - if ($tree_char_em) { - # Reached closing marker while inside a three-char emphasis. - if ($token_len == 3) { - # Three-char closing marker, close em and strong. - array_shift($token_stack); - $span = array_shift($text_stack); - $span = $this->runSpanGamut($span); - $span = "$span"; - $text_stack[0] .= $this->hashPart($span); - $em = ''; - $strong = ''; - } else { - # Other closing marker: close one em or strong and - # change current token state to match the other - $token_stack[0] = str_repeat($token{0}, 3-$token_len); - $tag = $token_len == 2 ? "strong" : "em"; - $span = $text_stack[0]; - $span = $this->runSpanGamut($span); - $span = "<$tag>$span"; - $text_stack[0] = $this->hashPart($span); - $$tag = ''; # $$tag stands for $em or $strong - } - $tree_char_em = false; - } elseif ($token_len == 3) { - if ($em) { - # Reached closing marker for both em and strong. - # Closing strong marker: - for ($i = 0; $i < 2; ++$i) { - $shifted_token = array_shift($token_stack); - $tag = strlen($shifted_token) == 2 ? "strong" : "em"; - $span = array_shift($text_stack); - $span = $this->runSpanGamut($span); - $span = "<$tag>$span"; - $text_stack[0] .= $this->hashPart($span); - $$tag = ''; # $$tag stands for $em or $strong - } - } else { - # Reached opening three-char emphasis marker. Push on token - # stack; will be handled by the special condition above. - $em = $token{0}; - $strong = "$em$em"; - array_unshift($token_stack, $token); - array_unshift($text_stack, ''); - $tree_char_em = true; - } - } elseif ($token_len == 2) { - if ($strong) { - # Unwind any dangling emphasis marker: - if (strlen($token_stack[0]) == 1) { - $text_stack[1] .= array_shift($token_stack); - $text_stack[0] .= array_shift($text_stack); - } - # Closing strong marker: - array_shift($token_stack); - $span = array_shift($text_stack); - $span = $this->runSpanGamut($span); - $span = "$span"; - $text_stack[0] .= $this->hashPart($span); - $strong = ''; - } else { - array_unshift($token_stack, $token); - array_unshift($text_stack, ''); - $strong = $token; - } - } else { - # Here $token_len == 1 - if ($em) { - if (strlen($token_stack[0]) == 1) { - # Closing emphasis marker: - array_shift($token_stack); - $span = array_shift($text_stack); - $span = $this->runSpanGamut($span); - $span = "$span"; - $text_stack[0] .= $this->hashPart($span); - $em = ''; - } else { - $text_stack[0] .= $token; - } - } else { - array_unshift($token_stack, $token); - array_unshift($text_stack, ''); - $em = $token; - } - } - } - - return $text_stack[0]; - } - - protected function doBlockQuotes($text) - { - $text = preg_replace_callback('/ - ( # Wrap whole match in $1 - (?> - ^[ ]*>[ ]? # ">" at the start of a line - .+\n # rest of the first line - (.+\n)* # subsequent consecutive lines - \n* # blanks - )+ - ) - /xm', - array(&$this, '_doBlockQuotes_callback'), $text); - - return $text; - } - protected function _doBlockQuotes_callback($matches) - { - $bq = $matches[1]; - # trim one level of quoting - trim whitespace-only lines - $bq = preg_replace('/^[ ]*>[ ]?|^[ ]+$/m', '', $bq); - $bq = $this->runBlockGamut($bq); # recurse - - $bq = preg_replace('/^/m', " ", $bq); - # These leading spaces cause problem with
     content,
    -        # so we need to fix that:
    -        $bq = preg_replace_callback('{(\s*
    .+?
    )}sx', - array(&$this, '_doBlockQuotes_callback2'), $bq); - - return "\n". $this->hashBlock("
    \n$bq\n
    ")."\n\n"; - } - protected function _doBlockQuotes_callback2($matches) - { - $pre = $matches[1]; - $pre = preg_replace('/^ /m', '', $pre); - - return $pre; - } - - protected function formParagraphs($text) - { - # - # Params: - # $text - string to process with html

    tags - # - # Strip leading and trailing lines: - $text = preg_replace('/\A\n+|\n+\z/', '', $text); - - $grafs = preg_split('/\n{2,}/', $text, -1, PREG_SPLIT_NO_EMPTY); - - # - # Wrap

    tags and unhashify HTML blocks - # - foreach ($grafs as $key => $value) { - if (!preg_match('/^B\x1A[0-9]+B$/', $value)) { - # Is a paragraph. - $value = $this->runSpanGamut($value); - $value = preg_replace('/^([ ]*)/', "

    ", $value); - $value .= "

    "; - $grafs[$key] = $this->unhash($value); - } else { - # Is a block. - # Modify elements of @grafs in-place... - $graf = $value; - $block = $this->html_hashes[$graf]; - $graf = $block; -// if (preg_match('{ -// \A -// ( # $1 =
    tag -//
    ]* -// \b -// markdown\s*=\s* ([\'"]) # $2 = attr quote char -// 1 -// \2 -// [^>]* -// > -// ) -// ( # $3 = contents -// .* -// ) -// (
    ) # $4 = closing tag -// \z -// }xs', $block, $matches)) -// { -// list(, $div_open, , $div_content, $div_close) = $matches; -// -// # We can't call Markdown(), because that resets the hash; -// # that initialization code should be pulled into its own sub, though. -// $div_content = $this->hashHTMLBlocks($div_content); -// -// # Run document gamut methods on the content. -// foreach ($this->document_gamut as $method => $priority) { -// $div_content = $this->$method($div_content); -// } -// -// $div_open = preg_replace( -// '{\smarkdown\s*=\s*([\'"]).+?\1}', '', $div_open); -// -// $graf = $div_open . "\n" . $div_content . "\n" . $div_close; -// } - $grafs[$key] = $graf; - } - } - - return implode("\n\n", $grafs); - } - - protected function encodeAttribute($text) - { - # - # Encode text for a double-quoted HTML attribute. This function - # is *not* suitable for attributes enclosed in single quotes. - # - $text = $this->encodeAmpsAndAngles($text); - $text = str_replace('"', '"', $text); - - return $text; - } - - protected function encodeAmpsAndAngles($text) - { - # - # Smart processing for ampersands and angle brackets that need to - # be encoded. Valid character entities are left alone unless the - # no-entities mode is set. - # - if ($this->no_entities) { - $text = str_replace('&', '&', $text); - } else { - # Ampersand-encoding based entirely on Nat Irons's Amputator - # MT plugin: - $text = preg_replace('/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/', - '&', $text);; - } - # Encode remaining <'s - $text = str_replace('<', '<', $text); - - return $text; - } - - protected function doAutoLinks($text) - { - $text = preg_replace_callback('{<((https?|ftp|dict):[^\'">\s]+)>}i', - array(&$this, '_doAutoLinks_url_callback'), $text); - - # Email addresses: - $text = preg_replace_callback('{ - < - (?:mailto:)? - ( - (?: - [-!#$%&\'*+/=?^_`.{|}~\w\x80-\xFF]+ - | - ".*?" - ) - \@ - (?: - [-a-z0-9\x80-\xFF]+(\.[-a-z0-9\x80-\xFF]+)*\.[a-z]+ - | - \[[\d.a-fA-F:]+\] # IPv4 & IPv6 - ) - ) - > - }xi', - array(&$this, '_doAutoLinks_email_callback'), $text); - - return $text; - } - protected function _doAutoLinks_url_callback($matches) - { - $url = $this->encodeAttribute($matches[1]); - $link = "$url"; - - return $this->hashPart($link); - } - protected function _doAutoLinks_email_callback($matches) - { - $address = $matches[1]; - $link = $this->encodeEmailAddress($address); - - return $this->hashPart($link); - } - - protected function encodeEmailAddress($addr) - { - # - # Input: an email address, e.g. "foo@example.com" - # - # Output: the email address as a mailto link, with each character - # of the address encoded as either a decimal or hex entity, in - # the hopes of foiling most address harvesting spam bots. E.g.: - # - #

    foo@exampl - # e.com

    - # - # Based by a filter by Matthew Wickline, posted to BBEdit-Talk. - # With some optimizations by Milian Wolff. - # - $addr = "mailto:" . $addr; - $chars = preg_split('/(? $char) { - $ord = ord($char); - # Ignore non-ascii chars. - if ($ord < 128) { - $r = ($seed * (1 + $key)) % 100; # Pseudo-random function. - # roughly 10% raw, 45% hex, 45% dec - # '@' *must* be encoded. I insist. - if ($r > 90 && $char != '@') /* do nothing */; - else if ($r < 45) $chars[$key] = '&#x'.dechex($ord).';'; - else $chars[$key] = '&#'.$ord.';'; - } - } - - $addr = implode('', $chars); - $text = implode('', array_slice($chars, 7)); # text without `mailto:` - $addr = "$text"; - - return $addr; - } - - protected function parseSpan($str) - { - # - # Take the string $str and parse it into tokens, hashing embeded HTML, - # escaped characters and handling code spans. - # - $output = ''; - - $span_re = '{ - ( - \\\\'.$this->escape_chars_re.' - | - (?no_markup ? '' : ' - | - # comment - | - <\?.*?\?> | <%.*?%> # processing instruction - | - <[!$]?[-a-zA-Z0-9:_]+ # regular tags - (?> - \s - (?>[^"\'>]+|"[^"]*"|\'[^\']*\')* - )? - > - | - <[-a-zA-Z0-9:_]+\s*/> # xml-style empty tag - | - # closing tag - ').' - ) - }xs'; - - while (1) { - # - # Each loop iteration seach for either the next tag, the next - # openning code span marker, or the next escaped character. - # Each token is then passed to handleSpanToken. - # - $parts = preg_split($span_re, $str, 2, PREG_SPLIT_DELIM_CAPTURE); - - # Create token from text preceding tag. - if ($parts[0] != "") { - $output .= $parts[0]; - } - - # Check if we reach the end. - if (isset($parts[1])) { - $output .= $this->handleSpanToken($parts[1], $parts[2]); - $str = $parts[2]; - } else { - break; - } - } - - return $output; - } - - protected function handleSpanToken($token, &$str) - { - # - # Handle $token provided by parseSpan by determining its nature and - # returning the corresponding value that should replace it. - # - switch ($token{0}) { - case "\\": - return $this->hashPart("&#". ord($token{1}). ";"); - case "`": - # Search for end marker in remaining text. - if (preg_match('/^(.*?[^`])'.preg_quote($token).'(?!`)(.*)$/sm', - $str, $matches)) - { - $str = $matches[2]; - $codespan = $this->makeCodeSpan($matches[1]); - - return $this->hashPart($codespan); - } - - return $token; // return as text since no ending marker found. - default: - return $this->hashPart($token); - } - } - - protected function outdent($text) - { - # - # Remove one level of line-leading tabs or spaces - # - - return preg_replace('/^(\t|[ ]{1,'.$this->tab_width.'})/m', '', $text); - } - - # String length function for detab. `_initDetab` will create a function to - # hanlde UTF-8 if the default function does not exist. - protected $utf8_strlen = 'mb_strlen'; - - protected function detab($text) - { - # - # Replace tabs with the appropriate amount of space. - # - # For each line we separate the line in blocks delemited by - # tab characters. Then we reconstruct every line by adding the - # appropriate number of space between each blocks. - - $text = preg_replace_callback('/^.*\t.*$/m', - array(&$this, '_detab_callback'), $text); - - return $text; - } - protected function _detab_callback($matches) - { - $line = $matches[0]; - $strlen = $this->utf8_strlen; # strlen function for UTF-8. - - # Split in blocks. - $blocks = explode("\t", $line); - # Add each blocks to the line. - $line = $blocks[0]; - unset($blocks[0]); # Do not add first block twice. - foreach ($blocks as $block) { - # Calculate amount of space, insert spaces, insert block. - $amount = $this->tab_width - - $strlen($line, 'UTF-8') % $this->tab_width; - $line .= str_repeat(" ", $amount) . $block; - } - - return $line; - } - protected function _initDetab() - { - # - # Check for the availability of the function in the `utf8_strlen` property - # (initially `mb_strlen`). If the function is not available, create a - # function that will loosely count the number of UTF-8 characters with a - # regular expression. - # - if (function_exists($this->utf8_strlen)) return; - $this->utf8_strlen = create_function('$text', 'return preg_match_all( - "/[\\\\x00-\\\\xBF]|[\\\\xC0-\\\\xFF][\\\\x80-\\\\xBF]*/", - $text, $m);'); - } - - protected function unhash($text) - { - # - # Swap back in all the tags hashed by _HashHTMLBlocks. - # - - return preg_replace_callback('/(.)\x1A[0-9]+\1/', - array(&$this, '_unhash_callback'), $text); - } - protected function _unhash_callback($matches) - { - return $this->html_hashes[$matches[0]]; - } - -} - -# -# Temporary Markdown Extra Parser Implementation Class -# -# NOTE: DON'T USE THIS CLASS -# Currently the implementation of of Extra resides here in this temporary class. -# This makes it easier to propagate the changes between the three different -# packaging styles of PHP Markdown. When this issue is resolved, this -# MarkdownExtra_TmpImpl class here will disappear and \Michelf\MarkdownExtra -# will contain the code. So please use \Michelf\MarkdownExtra and ignore this -# one. -# - -class _MarkdownExtra_TmpImpl extends \Michelf\Markdown -{ - ### Configuration Variables ### - - # Prefix for footnote ids. - public $fn_id_prefix = ""; - - # Optional title attribute for footnote links and backlinks. - public $fn_link_title = ""; - public $fn_backlink_title = ""; - - # Optional class attribute for footnote links and backlinks. - public $fn_link_class = "footnote-ref"; - public $fn_backlink_class = "footnote-backref"; - - # Class name for table cell alignment (%% replaced left/center/right) - # For instance: 'go-%%' becomes 'go-left' or 'go-right' or 'go-center' - # If empty, the align attribute is used instead of a class name. - public $table_align_class_tmpl = ''; - - # Optional class prefix for fenced code block. - public $code_class_prefix = ""; - # Class attribute for code blocks goes on the `code` tag; - # setting this to true will put attributes on the `pre` tag instead. - public $code_attr_on_pre = false; - - # Predefined abbreviations. - public $predef_abbr = array(); - - - ### Parser Implementation ### - - public function __construct() - { - # - # Constructor function. Initialize the parser object. - # - # Add extra escapable characters before parent constructor - # initialize the table. - $this->escape_chars .= ':|'; - - # Insert extra document, block, and span transformations. - # Parent constructor will do the sorting. - $this->document_gamut += array( - "doFencedCodeBlocks" => 5, - "stripFootnotes" => 15, - "stripAbbreviations" => 25, - "appendFootnotes" => 50, - ); - $this->block_gamut += array( - "doFencedCodeBlocks" => 5, - "doTables" => 15, - "doDefLists" => 45, - ); - $this->span_gamut += array( - "doFootnotes" => 5, - "doAbbreviations" => 70, - ); - - parent::__construct(); - } - - - # Extra variables used during extra transformations. - protected $footnotes = array(); - protected $footnotes_ordered = array(); - protected $footnotes_ref_count = array(); - protected $footnotes_numbers = array(); - protected $abbr_desciptions = array(); - protected $abbr_word_re = ''; - - # Give the current footnote number. - protected $footnote_counter = 1; - - - protected function setup() - { - # - # Setting up Extra-specific variables. - # - parent::setup(); - - $this->footnotes = array(); - $this->footnotes_ordered = array(); - $this->footnotes_ref_count = array(); - $this->footnotes_numbers = array(); - $this->abbr_desciptions = array(); - $this->abbr_word_re = ''; - $this->footnote_counter = 1; - - foreach ($this->predef_abbr as $abbr_word => $abbr_desc) { - if ($this->abbr_word_re) - $this->abbr_word_re .= '|'; - $this->abbr_word_re .= preg_quote($abbr_word); - $this->abbr_desciptions[$abbr_word] = trim($abbr_desc); - } - } - - protected function teardown() - { - # - # Clearing Extra-specific variables. - # - $this->footnotes = array(); - $this->footnotes_ordered = array(); - $this->footnotes_ref_count = array(); - $this->footnotes_numbers = array(); - $this->abbr_desciptions = array(); - $this->abbr_word_re = ''; - - parent::teardown(); - } - - - ### Extra Attribute Parser ### - - # Expression to use to catch attributes (includes the braces) - protected $id_class_attr_catch_re = '\{((?:[ ]*[#.][-_:a-zA-Z0-9]+){1,})[ ]*\}'; - # Expression to use when parsing in a context when no capture is desired - protected $id_class_attr_nocatch_re = '\{(?:[ ]*[#.][-_:a-zA-Z0-9]+){1,}[ ]*\}'; - - protected function doExtraAttributes($tag_name, $attr) - { - # - # Parse attributes caught by the $this->id_class_attr_catch_re expression - # and return the HTML-formatted list of attributes. - # - # Currently supported attributes are .class and #id. - # - if (empty($attr)) return ""; - - # Split on components - preg_match_all('/[#.][-_:a-zA-Z0-9]+/', $attr, $matches); - $elements = $matches[0]; - - # handle classes and ids (only first id taken into account) - $classes = array(); - $id = false; - foreach ($elements as $element) { - if ($element{0} == '.') { - $classes[] = substr($element, 1); - } elseif ($element{0} == '#') { - if ($id === false) $id = substr($element, 1); - } - } - - # compose attributes as string - $attr_str = ""; - if (!empty($id)) { - $attr_str .= ' id="'.$id.'"'; - } - if (!empty($classes)) { - $attr_str .= ' class="'.implode(" ", $classes).'"'; - } - - return $attr_str; - } - - - protected function stripLinkDefinitions($text) - { - # - # Strips link definitions from text, stores the URLs and titles in - # hash references. - # - $less_than_tab = $this->tab_width - 1; - - # Link defs are in the form: ^[id]: url "optional title" - $text = preg_replace_callback('{ - ^[ ]{0,'.$less_than_tab.'}\[(.+)\][ ]?: # id = $1 - [ ]* - \n? # maybe *one* newline - [ ]* - (?: - <(.+?)> # url = $2 - | - (\S+?) # url = $3 - ) - [ ]* - \n? # maybe one newline - [ ]* - (?: - (?<=\s) # lookbehind for whitespace - ["(] - (.*?) # title = $4 - [")] - [ ]* - )? # title is optional - (?:[ ]* '.$this->id_class_attr_catch_re.' )? # $5 = extra id & class attr - (?:\n+|\Z) - }xm', - array(&$this, '_stripLinkDefinitions_callback'), - $text); - - return $text; - } - protected function _stripLinkDefinitions_callback($matches) - { - $link_id = strtolower($matches[1]); - $url = $matches[2] == '' ? $matches[3] : $matches[2]; - $this->urls[$link_id] = $url; - $this->titles[$link_id] =& $matches[4]; - $this->ref_attr[$link_id] = $this->doExtraAttributes("", $dummy =& $matches[5]); - - return ''; # String that will replace the block - } - - - ### HTML Block Parser ### - - # Tags that are always treated as block tags: - protected $block_tags_re = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|form|fieldset|iframe|hr|legend|article|section|nav|aside|hgroup|header|footer|figcaption'; - - # Tags treated as block tags only if the opening tag is alone on its line: - protected $context_block_tags_re = 'script|noscript|ins|del|iframe|object|source|track|param|math|svg|canvas|audio|video'; - - # Tags where markdown="1" default to span mode: - protected $contain_span_tags_re = 'p|h[1-6]|li|dd|dt|td|th|legend|address'; - - # Tags which must not have their contents modified, no matter where - # they appear: - protected $clean_tags_re = 'script|math|svg'; - - # Tags that do not need to be closed. - protected $auto_close_tags_re = 'hr|img|param|source|track'; - - - protected function hashHTMLBlocks($text) - { - # - # Hashify HTML Blocks and "clean tags". - # - # We only want to do this for block-level HTML tags, such as headers, - # lists, and tables. That's because we still want to wrap

    s around - # "paragraphs" that are wrapped in non-block-level tags, such as anchors, - # phrase emphasis, and spans. The list of tags we're looking for is - # hard-coded. - # - # This works by calling _HashHTMLBlocks_InMarkdown, which then calls - # _HashHTMLBlocks_InHTML when it encounter block tags. When the markdown="1" - # attribute is found within a tag, _HashHTMLBlocks_InHTML calls back - # _HashHTMLBlocks_InMarkdown to handle the Markdown syntax within the tag. - # These two functions are calling each other. It's recursive! - # - if ($this->no_markup) return $text; - - # - # Call the HTML-in-Markdown hasher. - # - list($text, ) = $this->_hashHTMLBlocks_inMarkdown($text); - - return $text; - } - protected function _hashHTMLBlocks_inMarkdown($text, $indent = 0, - $enclosing_tag_re = '', $span = false) - { - # - # Parse markdown text, calling _HashHTMLBlocks_InHTML for block tags. - # - # * $indent is the number of space to be ignored when checking for code - # blocks. This is important because if we don't take the indent into - # account, something like this (which looks right) won't work as expected: - # - #

    - #
    - # Hello World. <-- Is this a Markdown code block or text? - #
    <-- Is this a Markdown code block or a real tag? - #
    - # - # If you don't like this, just don't indent the tag on which - # you apply the markdown="1" attribute. - # - # * If $enclosing_tag_re is not empty, stops at the first unmatched closing - # tag with that name. Nested tags supported. - # - # * If $span is true, text inside must treated as span. So any double - # newline will be replaced by a single newline so that it does not create - # paragraphs. - # - # Returns an array of that form: ( processed text , remaining text ) - # - if ($text === '') return array('', ''); - - # Regex to check for the presense of newlines around a block tag. - $newline_before_re = '/(?:^\n?|\n\n)*$/'; - $newline_after_re = - '{ - ^ # Start of text following the tag. - (?>[ ]*)? # Optional comment. - [ ]*\n # Must be followed by newline. - }xs'; - - # Regex to match any tag. - $block_tag_re = - '{ - ( # $2: Capture whole tag. - # Tag name. - '.$this->block_tags_re.' | - '.$this->context_block_tags_re.' | - '.$this->clean_tags_re.' | - (?!\s)'.$enclosing_tag_re.' - ) - (?: - (?=[\s"\'/a-zA-Z0-9]) # Allowed characters after tag name. - (?> - ".*?" | # Double quotes (can contain `>`) - \'.*?\' | # Single quotes (can contain `>`) - .+? # Anything but quotes and `>`. - )*? - )? - > # End of tag. - | - # HTML Comment - | - <\?.*?\?> | <%.*?%> # Processing instruction - | - # CData Block - | - # Code span marker - `+ - '. ( !$span ? ' # If not in span. - | - # Indented code block - (?: ^[ ]*\n | ^ | \n[ ]*\n ) - [ ]{'.($indent+4).'}[^\n]* \n - (?> - (?: [ ]{'.($indent+4).'}[^\n]* | [ ]* ) \n - )* - | - # Fenced code block marker - (?<= ^ | \n ) - [ ]{0,'.($indent+3).'}~{3,} - [ ]* - (?: - \.?[-_:a-zA-Z0-9]+ # standalone class name - | - '.$this->id_class_attr_nocatch_re.' # extra attributes - )? - [ ]* - \n - ' : '' ). ' # End (if not is span). - ) - }xs'; - - $depth = 0; # Current depth inside the tag tree. - $parsed = ""; # Parsed text that will be returned. - - # - # Loop through every tag until we find the closing tag of the parent - # or loop until reaching the end of text if no parent tag specified. - # - do { - # - # Split the text using the first $tag_match pattern found. - # Text before pattern will be first in the array, text after - # pattern will be at the end, and between will be any catches made - # by the pattern. - # - $parts = preg_split($block_tag_re, $text, 2, - PREG_SPLIT_DELIM_CAPTURE); - - # If in Markdown span mode, add a empty-string span-level hash - # after each newline to prevent triggering any block element. - if ($span) { - $void = $this->hashPart("", ':'); - $newline = "$void\n"; - $parts[0] = $void . str_replace("\n", $newline, $parts[0]) . $void; - } - - $parsed .= $parts[0]; # Text before current tag. - - # If end of $text has been reached. Stop loop. - if (count($parts) < 3) { - $text = ""; - break; - } - - $tag = $parts[1]; # Tag to handle. - $text = $parts[2]; # Remaining text after current tag. - $tag_re = preg_quote($tag); # For use in a regular expression. - - # - # Check for: Code span marker - # - if ($tag{0} == "`") { - # Find corresponding end marker. - $tag_re = preg_quote($tag); - if (preg_match('{^(?>.+?|\n(?!\n))*?(?.*\n)*?[ ]{'.($fence_indent).'}'.$fence_re.'[ ]*(?:\n|$)}', $text, - $matches)) - { - # End marker found: pass text unchanged until marker. - $parsed .= $tag . $matches[0]; - $text = substr($text, strlen($matches[0])); - } else { - # No end marker: just skip it. - $parsed .= $tag; - } - } - # - # Check for: Indented code block. - # - else if ($tag{0} == "\n" || $tag{0} == " ") { - # Indented code block: pass it unchanged, will be handled - # later. - $parsed .= $tag; - } - # - # Check for: Opening Block level tag or - # Opening Context Block tag (like ins and del) - # used as a block tag (tag is alone on it's line). - # - else if (preg_match('{^<(?:'.$this->block_tags_re.')\b}', $tag) || - ( preg_match('{^<(?:'.$this->context_block_tags_re.')\b}', $tag) && - preg_match($newline_before_re, $parsed) && - preg_match($newline_after_re, $text) ) - ) - { - # Need to parse tag and following text using the HTML parser. - list($block_text, $text) = - $this->_hashHTMLBlocks_inHTML($tag . $text, "hashBlock", true); - - # Make sure it stays outside of any paragraph by adding newlines. - $parsed .= "\n\n$block_text\n\n"; - } - # - # Check for: Clean tag (like script, math) - # HTML Comments, processing instructions. - # - else if (preg_match('{^<(?:'.$this->clean_tags_re.')\b}', $tag) || - $tag{1} == '!' || $tag{1} == '?') - { - # Need to parse tag and following text using the HTML parser. - # (don't check for markdown attribute) - list($block_text, $text) = - $this->_hashHTMLBlocks_inHTML($tag . $text, "hashClean", false); - - $parsed .= $block_text; - } - # - # Check for: Tag with same name as enclosing tag. - # - else if ($enclosing_tag_re !== '' && - # Same name as enclosing tag. - preg_match('{^= 0); - - return array($parsed, $text); - } - protected function _hashHTMLBlocks_inHTML($text, $hash_method, $md_attr) - { - # - # Parse HTML, calling _HashHTMLBlocks_InMarkdown for block tags. - # - # * Calls $hash_method to convert any blocks. - # * Stops when the first opening tag closes. - # * $md_attr indicate if the use of the `markdown="1"` attribute is allowed. - # (it is not inside clean tags) - # - # Returns an array of that form: ( processed text , remaining text ) - # - if ($text === '') return array('', ''); - - # Regex to match `markdown` attribute inside of a tag. - $markdown_attr_re = ' - { - \s* # Eat whitespace before the `markdown` attribute - markdown - \s*=\s* - (?> - (["\']) # $1: quote delimiter - (.*?) # $2: attribute value - \1 # matching delimiter - | - ([^\s>]*) # $3: unquoted attribute value - ) - () # $4: make $3 always defined (avoid warnings) - }xs'; - - # Regex to match any tag. - $tag_re = '{ - ( # $2: Capture whole tag. - - ".*?" | # Double quotes (can contain `>`) - \'.*?\' | # Single quotes (can contain `>`) - .+? # Anything but quotes and `>`. - )*? - )? - > # End of tag. - | - # HTML Comment - | - <\?.*?\?> | <%.*?%> # Processing instruction - | - # CData Block - ) - }xs'; - - $original_text = $text; # Save original text in case of faliure. - - $depth = 0; # Current depth inside the tag tree. - $block_text = ""; # Temporary text holder for current text. - $parsed = ""; # Parsed text that will be returned. - - # - # Get the name of the starting tag. - # (This pattern makes $base_tag_name_re safe without quoting.) - # - if (preg_match('/^<([\w:$]*)\b/', $text, $matches)) - $base_tag_name_re = $matches[1]; - - # - # Loop through every tag until we find the corresponding closing tag. - # - do { - # - # Split the text using the first $tag_match pattern found. - # Text before pattern will be first in the array, text after - # pattern will be at the end, and between will be any catches made - # by the pattern. - # - $parts = preg_split($tag_re, $text, 2, PREG_SPLIT_DELIM_CAPTURE); - - if (count($parts) < 3) { - # - # End of $text reached with unbalenced tag(s). - # In that case, we return original text unchanged and pass the - # first character as filtered to prevent an infinite loop in the - # parent function. - # - - return array($original_text{0}, substr($original_text, 1)); - } - - $block_text .= $parts[0]; # Text before current tag. - $tag = $parts[1]; # Tag to handle. - $text = $parts[2]; # Remaining text after current tag. - - # - # Check for: Auto-close tag (like
    ) - # Comments and Processing Instructions. - # - if (preg_match('{^auto_close_tags_re.')\b}', $tag) || - $tag{1} == '!' || $tag{1} == '?') - { - # Just add the tag to the block as if it was text. - $block_text .= $tag; - } else { - # - # Increase/decrease nested tag count. Only do so if - # the tag's name match base tag's. - # - if (preg_match('{^mode = $attr_m[2] . $attr_m[3]; - $span_mode = $this->mode == 'span' || $this->mode != 'block' && - preg_match('{^<(?:'.$this->contain_span_tags_re.')\b}', $tag); - - # Calculate indent before tag. - if (preg_match('/(?:^|\n)( *?)(?! ).*?$/', $block_text, $matches)) { - $strlen = $this->utf8_strlen; - $indent = $strlen($matches[1], 'UTF-8'); - } else { - $indent = 0; - } - - # End preceding block with this tag. - $block_text .= $tag; - $parsed .= $this->$hash_method($block_text); - - # Get enclosing tag name for the ParseMarkdown function. - # (This pattern makes $tag_name_re safe without quoting.) - preg_match('/^<([\w:$]*)\b/', $tag, $matches); - $tag_name_re = $matches[1]; - - # Parse the content using the HTML-in-Markdown parser. - list ($block_text, $text) - = $this->_hashHTMLBlocks_inMarkdown($text, $indent, - $tag_name_re, $span_mode); - - # Outdent markdown text. - if ($indent > 0) { - $block_text = preg_replace("/^[ ]{1,$indent}/m", "", - $block_text); - } - - # Append tag content to parsed text. - if (!$span_mode) $parsed .= "\n\n$block_text\n\n"; - else $parsed .= "$block_text"; - - # Start over with a new block. - $block_text = ""; - } else $block_text .= $tag; - } - - } while ($depth > 0); - - # - # Hash last block text that wasn't processed inside the loop. - # - $parsed .= $this->$hash_method($block_text); - - return array($parsed, $text); - } - - - protected function hashClean($text) - { - # - # Called whenever a tag must be hashed when a function inserts a "clean" tag - # in $text, it passes through this function and is automaticaly escaped, - # blocking invalid nested overlap. - # - - return $this->hashPart($text, 'C'); - } - - - protected function doAnchors($text) - { - # - # Turn Markdown link shortcuts into XHTML tags. - # - if ($this->in_anchor) return $text; - $this->in_anchor = true; - - # - # First, handle reference-style links: [link text] [id] - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - \[ - ('.$this->nested_brackets_re.') # link text = $2 - \] - - [ ]? # one optional space - (?:\n[ ]*)? # one optional newline followed by spaces - - \[ - (.*?) # id = $3 - \] - ) - }xs', - array(&$this, '_doAnchors_reference_callback'), $text); - - # - # Next, inline-style links: [link text](url "optional title") - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - \[ - ('.$this->nested_brackets_re.') # link text = $2 - \] - \( # literal paren - [ \n]* - (?: - <(.+?)> # href = $3 - | - ('.$this->nested_url_parenthesis_re.') # href = $4 - ) - [ \n]* - ( # $5 - ([\'"]) # quote char = $6 - (.*?) # Title = $7 - \6 # matching quote - [ \n]* # ignore any spaces/tabs between closing quote and ) - )? # title is optional - \) - (?:[ ]? '.$this->id_class_attr_catch_re.' )? # $8 = id/class attributes - ) - }xs', - array(&$this, '_doAnchors_inline_callback'), $text); - - # - # Last, handle reference-style shortcuts: [link text] - # These must come last in case you've also got [link text][1] - # or [link text](/foo) - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - \[ - ([^\[\]]+) # link text = $2; can\'t contain [ or ] - \] - ) - }xs', - array(&$this, '_doAnchors_reference_callback'), $text); - - $this->in_anchor = false; - - return $text; - } - protected function _doAnchors_reference_callback($matches) - { - $whole_match = $matches[1]; - $link_text = $matches[2]; - $link_id =& $matches[3]; - - if ($link_id == "") { - # for shortcut links like [this][] or [this]. - $link_id = $link_text; - } - - # lower-case and turn embedded newlines into spaces - $link_id = strtolower($link_id); - $link_id = preg_replace('{[ ]?\n}', ' ', $link_id); - - if (isset($this->urls[$link_id])) { - $url = $this->urls[$link_id]; - $url = $this->encodeAttribute($url); - - $result = "titles[$link_id] ) ) { - $title = $this->titles[$link_id]; - $title = $this->encodeAttribute($title); - $result .= " title=\"$title\""; - } - if (isset($this->ref_attr[$link_id])) - $result .= $this->ref_attr[$link_id]; - - $link_text = $this->runSpanGamut($link_text); - $result .= ">$link_text"; - $result = $this->hashPart($result); - } else { - $result = $whole_match; - } - - return $result; - } - protected function _doAnchors_inline_callback($matches) - { - $whole_match = $matches[1]; - $link_text = $this->runSpanGamut($matches[2]); - $url = $matches[3] == '' ? $matches[4] : $matches[3]; - $title =& $matches[7]; - $attr = $this->doExtraAttributes("a", $dummy =& $matches[8]); - - $url = $this->encodeAttribute($url); - - $result = "encodeAttribute($title); - $result .= " title=\"$title\""; - } - $result .= $attr; - - $link_text = $this->runSpanGamut($link_text); - $result .= ">$link_text"; - - return $this->hashPart($result); - } - - protected function doImages($text) - { - # - # Turn Markdown image shortcuts into tags. - # - # - # First, handle reference-style labeled images: ![alt text][id] - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - !\[ - ('.$this->nested_brackets_re.') # alt text = $2 - \] - - [ ]? # one optional space - (?:\n[ ]*)? # one optional newline followed by spaces - - \[ - (.*?) # id = $3 - \] - - ) - }xs', - array(&$this, '_doImages_reference_callback'), $text); - - # - # Next, handle inline images: ![alt text](url "optional title") - # Don't forget: encode * and _ - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - !\[ - ('.$this->nested_brackets_re.') # alt text = $2 - \] - \s? # One optional whitespace character - \( # literal paren - [ \n]* - (?: - <(\S*)> # src url = $3 - | - ('.$this->nested_url_parenthesis_re.') # src url = $4 - ) - [ \n]* - ( # $5 - ([\'"]) # quote char = $6 - (.*?) # title = $7 - \6 # matching quote - [ \n]* - )? # title is optional - \) - (?:[ ]? '.$this->id_class_attr_catch_re.' )? # $8 = id/class attributes - ) - }xs', - array(&$this, '_doImages_inline_callback'), $text); - - return $text; - } - protected function _doImages_reference_callback($matches) - { - $whole_match = $matches[1]; - $alt_text = $matches[2]; - $link_id = strtolower($matches[3]); - - if ($link_id == "") { - $link_id = strtolower($alt_text); # for shortcut links like ![this][]. - } - - $alt_text = $this->encodeAttribute($alt_text); - if (isset($this->urls[$link_id])) { - $url = $this->encodeAttribute($this->urls[$link_id]); - $result = "\"$alt_text\"";titles[$link_id])) { - $title = $this->titles[$link_id]; - $title = $this->encodeAttribute($title); - $result .= " title=\"$title\""; - } - if (isset($this->ref_attr[$link_id])) - $result .= $this->ref_attr[$link_id]; - $result .= $this->empty_element_suffix; - $result = $this->hashPart($result); - } else { - # If there's no such link ID, leave intact: - $result = $whole_match; - } - - return $result; - } - protected function _doImages_inline_callback($matches) - { - $whole_match = $matches[1]; - $alt_text = $matches[2]; - $url = $matches[3] == '' ? $matches[4] : $matches[3]; - $title =& $matches[7]; - $attr = $this->doExtraAttributes("img", $dummy =& $matches[8]); - - $alt_text = $this->encodeAttribute($alt_text); - $url = $this->encodeAttribute($url); - $result = "\"$alt_text\"";encodeAttribute($title); - $result .= " title=\"$title\""; # $title already quoted - } - $result .= $attr; - $result .= $this->empty_element_suffix; - - return $this->hashPart($result); - } - - - protected function doHeaders($text) - { - # - # Redefined to add id and class attribute support. - # - # Setext-style headers: - # Header 1 {#header1} - # ======== - # - # Header 2 {#header2 .class1 .class2} - # -------- - # - $text = preg_replace_callback( - '{ - (^.+?) # $1: Header text - (?:[ ]+ '.$this->id_class_attr_catch_re.' )? # $3 = id/class attributes - [ ]*\n(=+|-+)[ ]*\n+ # $3: Header footer - }mx', - array(&$this, '_doHeaders_callback_setext'), $text); - - # atx-style headers: - # # Header 1 {#header1} - # ## Header 2 {#header2} - # ## Header 2 with closing hashes ## {#header3.class1.class2} - # ... - # ###### Header 6 {.class2} - # - $text = preg_replace_callback('{ - ^(\#{1,6}) # $1 = string of #\'s - [ ]* - (.+?) # $2 = Header text - [ ]* - \#* # optional closing #\'s (not counted) - (?:[ ]+ '.$this->id_class_attr_catch_re.' )? # $3 = id/class attributes - [ ]* - \n+ - }xm', - array(&$this, '_doHeaders_callback_atx'), $text); - - return $text; - } - protected function _doHeaders_callback_setext($matches) - { - if ($matches[3] == '-' && preg_match('{^- }', $matches[1])) - - return $matches[0]; - $level = $matches[3]{0} == '=' ? 1 : 2; - $attr = $this->doExtraAttributes("h$level", $dummy =& $matches[2]); - $block = "".$this->runSpanGamut($matches[1]).""; - - return "\n" . $this->hashBlock($block) . "\n\n"; - } - protected function _doHeaders_callback_atx($matches) - { - $level = strlen($matches[1]); - $attr = $this->doExtraAttributes("h$level", $dummy =& $matches[3]); - $block = "".$this->runSpanGamut($matches[2]).""; - - return "\n" . $this->hashBlock($block) . "\n\n"; - } - - protected function doTables($text) - { - # - # Form HTML tables. - # - $less_than_tab = $this->tab_width - 1; - # - # Find tables with leading pipe. - # - # | Header 1 | Header 2 - # | -------- | -------- - # | Cell 1 | Cell 2 - # | Cell 3 | Cell 4 - # - $text = preg_replace_callback(' - { - ^ # Start of a line - [ ]{0,'.$less_than_tab.'} # Allowed whitespace. - [|] # Optional leading pipe (present) - (.+) \n # $1: Header row (at least one pipe) - - [ ]{0,'.$less_than_tab.'} # Allowed whitespace. - [|] ([ ]*[-:]+[-| :]*) \n # $2: Header underline - - ( # $3: Cells - (?> - [ ]* # Allowed whitespace. - [|] .* \n # Row content. - )* - ) - (?=\n|\Z) # Stop at final double newline. - }xm', - array(&$this, '_doTable_leadingPipe_callback'), $text); - - # - # Find tables without leading pipe. - # - # Header 1 | Header 2 - # -------- | -------- - # Cell 1 | Cell 2 - # Cell 3 | Cell 4 - # - $text = preg_replace_callback(' - { - ^ # Start of a line - [ ]{0,'.$less_than_tab.'} # Allowed whitespace. - (\S.*[|].*) \n # $1: Header row (at least one pipe) - - [ ]{0,'.$less_than_tab.'} # Allowed whitespace. - ([-:]+[ ]*[|][-| :]*) \n # $2: Header underline - - ( # $3: Cells - (?> - .* [|] .* \n # Row content - )* - ) - (?=\n|\Z) # Stop at final double newline. - }xm', - array(&$this, '_DoTable_callback'), $text); - - return $text; - } - protected function _doTable_leadingPipe_callback($matches) - { - $head = $matches[1]; - $underline = $matches[2]; - $content = $matches[3]; - - # Remove leading pipe for each row. - $content = preg_replace('/^ *[|]/m', '', $content); - - return $this->_doTable_callback(array($matches[0], $head, $underline, $content)); - } - protected function _doTable_makeAlignAttr($alignname) - { - if (empty($this->table_align_class_tmpl)) - return " align=\"$alignname\""; - - $classname = str_replace('%%', $alignname, $this->table_align_class_tmpl); - - return " class=\"$classname\""; - } - protected function _doTable_callback($matches) - { - $head = $matches[1]; - $underline = $matches[2]; - $content = $matches[3]; - - # Remove any tailing pipes for each line. - $head = preg_replace('/[|] *$/m', '', $head); - $underline = preg_replace('/[|] *$/m', '', $underline); - $content = preg_replace('/[|] *$/m', '', $content); - - # Reading alignement from header underline. - $separators = preg_split('/ *[|] */', $underline); - foreach ($separators as $n => $s) { - if (preg_match('/^ *-+: *$/', $s)) - $attr[$n] = $this->_doTable_makeAlignAttr('right'); - else if (preg_match('/^ *:-+: *$/', $s)) - $attr[$n] = $this->_doTable_makeAlignAttr('center'); - else if (preg_match('/^ *:-+ *$/', $s)) - $attr[$n] = $this->_doTable_makeAlignAttr('left'); - else - $attr[$n] = ''; - } - - # Parsing span elements, including code spans, character escapes, - # and inline HTML tags, so that pipes inside those gets ignored. - $head = $this->parseSpan($head); - $headers = preg_split('/ *[|] */', $head); - $col_count = count($headers); - $attr = array_pad($attr, $col_count, ''); - - # Write column headers. - $text = "\n"; - $text .= "\n"; - $text .= "\n"; - foreach ($headers as $n => $header) - $text .= " ".$this->runSpanGamut(trim($header))."\n"; - $text .= "\n"; - $text .= "\n"; - - # Split content by row. - $rows = explode("\n", trim($content, "\n")); - - $text .= "\n"; - foreach ($rows as $row) { - # Parsing span elements, including code spans, character escapes, - # and inline HTML tags, so that pipes inside those gets ignored. - $row = $this->parseSpan($row); - - # Split row by cell. - $row_cells = preg_split('/ *[|] */', $row, $col_count); - $row_cells = array_pad($row_cells, $col_count, ''); - - $text .= "\n"; - foreach ($row_cells as $n => $cell) - $text .= " ".$this->runSpanGamut(trim($cell))."\n"; - $text .= "\n"; - } - $text .= "\n"; - $text .= "
    "; - - return $this->hashBlock($text) . "\n"; - } - - protected function doDefLists($text) - { - # - # Form HTML definition lists. - # - $less_than_tab = $this->tab_width - 1; - - # Re-usable pattern to match any entire dl list: - $whole_list_re = '(?> - ( # $1 = whole list - ( # $2 - [ ]{0,'.$less_than_tab.'} - ((?>.*\S.*\n)+) # $3 = defined term - \n? - [ ]{0,'.$less_than_tab.'}:[ ]+ # colon starting definition - ) - (?s:.+?) - ( # $4 - \z - | - \n{2,} - (?=\S) - (?! # Negative lookahead for another term - [ ]{0,'.$less_than_tab.'} - (?: \S.*\n )+? # defined term - \n? - [ ]{0,'.$less_than_tab.'}:[ ]+ # colon starting definition - ) - (?! # Negative lookahead for another definition - [ ]{0,'.$less_than_tab.'}:[ ]+ # colon starting definition - ) - ) - ) - )'; // mx - - $text = preg_replace_callback('{ - (?>\A\n?|(?<=\n\n)) - '.$whole_list_re.' - }mx', - array(&$this, '_doDefLists_callback'), $text); - - return $text; - } - protected function _doDefLists_callback($matches) - { - # Re-usable patterns to match list item bullets and number markers: - $list = $matches[1]; - - # Turn double returns into triple returns, so that we can make a - # paragraph for the last item in a list, if necessary: - $result = trim($this->processDefListItems($list)); - $result = "
    \n" . $result . "\n
    "; - - return $this->hashBlock($result) . "\n\n"; - } - - protected function processDefListItems($list_str) - { - # - # Process the contents of a single definition list, splitting it - # into individual term and definition list items. - # - $less_than_tab = $this->tab_width - 1; - - # trim trailing blank lines: - $list_str = preg_replace("/\n{2,}\\z/", "\n", $list_str); - - # Process definition terms. - $list_str = preg_replace_callback('{ - (?>\A\n?|\n\n+) # leading line - ( # definition terms = $1 - [ ]{0,'.$less_than_tab.'} # leading whitespace - (?!\:[ ]|[ ]) # negative lookahead for a definition - # mark (colon) or more whitespace. - (?> \S.* \n)+? # actual term (not whitespace). - ) - (?=\n?[ ]{0,3}:[ ]) # lookahead for following line feed - # with a definition mark. - }xm', - array(&$this, '_processDefListItems_callback_dt'), $list_str); - - # Process actual definitions. - $list_str = preg_replace_callback('{ - \n(\n+)? # leading line = $1 - ( # marker space = $2 - [ ]{0,'.$less_than_tab.'} # whitespace before colon - \:[ ]+ # definition mark (colon) - ) - ((?s:.+?)) # definition text = $3 - (?= \n+ # stop at next definition mark, - (?: # next term or end of text - [ ]{0,'.$less_than_tab.'} \:[ ] | -
    | \z - ) - ) - }xm', - array(&$this, '_processDefListItems_callback_dd'), $list_str); - - return $list_str; - } - protected function _processDefListItems_callback_dt($matches) - { - $terms = explode("\n", trim($matches[1])); - $text = ''; - foreach ($terms as $term) { - $term = $this->runSpanGamut(trim($term)); - $text .= "\n
    " . $term . "
    "; - } - - return $text . "\n"; - } - protected function _processDefListItems_callback_dd($matches) - { - $leading_line = $matches[1]; - $marker_space = $matches[2]; - $def = $matches[3]; - - if ($leading_line || preg_match('/\n{2,}/', $def)) { - # Replace marker with the appropriate whitespace indentation - $def = str_repeat(' ', strlen($marker_space)) . $def; - $def = $this->runBlockGamut($this->outdent($def . "\n\n")); - $def = "\n". $def ."\n"; - } else { - $def = rtrim($def); - $def = $this->runSpanGamut($this->outdent($def)); - } - - return "\n
    " . $def . "
    \n"; - } - - protected function doFencedCodeBlocks($text) - { - # - # Adding the fenced code block syntax to regular Markdown: - # - # ~~~ - # Code block - # ~~~ - # - $less_than_tab = $this->tab_width; - - $text = preg_replace_callback('{ - (?:\n|\A) - # 1: Opening marker - ( - ~{3,} # Marker: three tilde or more. - ) - [ ]* - (?: - \.?([-_:a-zA-Z0-9]+) # 2: standalone class name - | - '.$this->id_class_attr_catch_re.' # 3: Extra attributes - )? - [ ]* \n # Whitespace and newline following marker. - - # 4: Content - ( - (?> - (?!\1 [ ]* \n) # Not a closing marker. - .*\n+ - )+ - ) - - # Closing marker. - \1 [ ]* \n - }xm', - array(&$this, '_doFencedCodeBlocks_callback'), $text); - - return $text; - } - protected function _doFencedCodeBlocks_callback($matches) - { - $classname =& $matches[2]; - $attrs =& $matches[3]; - $codeblock = $matches[4]; - $codeblock = htmlspecialchars($codeblock, ENT_NOQUOTES); - $codeblock = preg_replace_callback('/^\n+/', - array(&$this, '_doFencedCodeBlocks_newlines'), $codeblock); - - if ($classname != "") { - if ($classname{0} == '.') - $classname = substr($classname, 1); - $attr_str = ' class="'.$this->code_class_prefix.$classname.'"'; - } else { - $attr_str = $this->doExtraAttributes($this->code_attr_on_pre ? "pre" : "code", $attrs); - } - $pre_attr_str = $this->code_attr_on_pre ? $attr_str : ''; - $code_attr_str = $this->code_attr_on_pre ? '' : $attr_str; - $codeblock = "$codeblock
    "; - - return "\n\n".$this->hashBlock($codeblock)."\n\n"; - } - protected function _doFencedCodeBlocks_newlines($matches) - { - return str_repeat("empty_element_suffix", - strlen($matches[0])); - } - - # - # Redefining emphasis markers so that emphasis by underscore does not - # work in the middle of a word. - # - protected $em_relist = array( - '' => '(?:(? '(?<=\S|^)(? '(?<=\S|^)(? '(?:(? '(?<=\S|^)(? '(?<=\S|^)(? '(?:(? '(?<=\S|^)(? '(?<=\S|^)(? tags - # - # Strip leading and trailing lines: - $text = preg_replace('/\A\n+|\n+\z/', '', $text); - - $grafs = preg_split('/\n{2,}/', $text, -1, PREG_SPLIT_NO_EMPTY); - - # - # Wrap

    tags and unhashify HTML blocks - # - foreach ($grafs as $key => $value) { - $value = trim($this->runSpanGamut($value)); - - # Check if this should be enclosed in a paragraph. - # Clean tag hashes & block tag hashes are left alone. - $is_p = !preg_match('/^B\x1A[0-9]+B|^C\x1A[0-9]+C$/', $value); - - if ($is_p) { - $value = "

    $value

    "; - } - $grafs[$key] = $value; - } - - # Join grafs in one text, then unhash HTML tags. - $text = implode("\n\n", $grafs); - - # Finish by removing any tag hashes still present in $text. - $text = $this->unhash($text); - - return $text; - } - - ### Footnotes - - protected function stripFootnotes($text) - { - # - # Strips link definitions from text, stores the URLs and titles in - # hash references. - # - $less_than_tab = $this->tab_width - 1; - - # Link defs are in the form: [^id]: url "optional title" - $text = preg_replace_callback('{ - ^[ ]{0,'.$less_than_tab.'}\[\^(.+?)\][ ]?: # note_id = $1 - [ ]* - \n? # maybe *one* newline - ( # text = $2 (no blank lines allowed) - (?: - .+ # actual text - | - \n # newlines but - (?!\[\^.+?\]:\s)# negative lookahead for footnote marker. - (?!\n+[ ]{0,3}\S)# ensure line is not blank and followed - # by non-indented content - )* - ) - }xm', - array(&$this, '_stripFootnotes_callback'), - $text); - - return $text; - } - protected function _stripFootnotes_callback($matches) - { - $note_id = $this->fn_id_prefix . $matches[1]; - $this->footnotes[$note_id] = $this->outdent($matches[2]); - - return ''; # String that will replace the block - } - - protected function doFootnotes($text) - { - # - # Replace footnote references in $text [^id] with a special text-token - # which will be replaced by the actual footnote marker in appendFootnotes. - # - if (!$this->in_anchor) { - $text = preg_replace('{\[\^(.+?)\]}', "F\x1Afn:\\1\x1A:", $text); - } - - return $text; - } - - protected function appendFootnotes($text) - { - # - # Append footnote list to text. - # - $text = preg_replace_callback('{F\x1Afn:(.*?)\x1A:}', - array(&$this, '_appendFootnotes_callback'), $text); - - if (!empty($this->footnotes_ordered)) { - $text .= "\n\n"; - $text .= "
    \n"; - $text .= "empty_element_suffix ."\n"; - $text .= "
      \n\n"; - - $attr = " rev=\"footnote\""; - if ($this->fn_backlink_class != "") { - $class = $this->fn_backlink_class; - $class = $this->encodeAttribute($class); - $attr .= " class=\"$class\""; - } - if ($this->fn_backlink_title != "") { - $title = $this->fn_backlink_title; - $title = $this->encodeAttribute($title); - $attr .= " title=\"$title\""; - } - $num = 0; - - while (!empty($this->footnotes_ordered)) { - $footnote = reset($this->footnotes_ordered); - $note_id = key($this->footnotes_ordered); - unset($this->footnotes_ordered[$note_id]); - $ref_count = $this->footnotes_ref_count[$note_id]; - unset($this->footnotes_ref_count[$note_id]); - unset($this->footnotes[$note_id]); - - $footnote .= "\n"; # Need to append newline before parsing. - $footnote = $this->runBlockGamut("$footnote\n"); - $footnote = preg_replace_callback('{F\x1Afn:(.*?)\x1A:}', - array(&$this, '_appendFootnotes_callback'), $footnote); - - $attr = str_replace("%%", ++$num, $attr); - $note_id = $this->encodeAttribute($note_id); - - # Prepare backlink, multiple backlinks if multiple references - $backlink = ""; - for ($ref_num = 2; $ref_num <= $ref_count; ++$ref_num) { - $backlink .= " "; - } - # Add backlink to last paragraph; create new paragraph if needed. - if (preg_match('{

      $}', $footnote)) { - $footnote = substr($footnote, 0, -4) . " $backlink

      "; - } else { - $footnote .= "\n\n

      $backlink

      "; - } - - $text .= "
    1. \n"; - $text .= $footnote . "\n"; - $text .= "
    2. \n\n"; - } - - $text .= "
    \n"; - $text .= "
    "; - } - - return $text; - } - protected function _appendFootnotes_callback($matches) - { - $node_id = $this->fn_id_prefix . $matches[1]; - - # Create footnote marker only if it has a corresponding footnote *and* - # the footnote hasn't been used by another marker. - if (isset($this->footnotes[$node_id])) { - $num =& $this->footnotes_numbers[$node_id]; - if (!isset($num)) { - # Transfer footnote content to the ordered list and give it its - # number - $this->footnotes_ordered[$node_id] = $this->footnotes[$node_id]; - $this->footnotes_ref_count[$node_id] = 1; - $num = $this->footnote_counter++; - $ref_count_mark = ''; - } else { - $ref_count_mark = $this->footnotes_ref_count[$node_id] += 1; - } - - $attr = ""; - if ($this->fn_link_class != "") { - $class = $this->fn_link_class; - $class = $this->encodeAttribute($class); - $attr .= " class=\"$class\""; - } - if ($this->fn_link_title != "") { - $title = $this->fn_link_title; - $title = $this->encodeAttribute($title); - $attr .= " title=\"$title\""; - } - - $attr = str_replace("%%", $num, $attr); - $node_id = $this->encodeAttribute($node_id); - - return - "". - "$num". - ""; - } - - return "[^".$matches[1]."]"; - } - - - ### Abbreviations ### - - protected function stripAbbreviations($text) - { - # - # Strips abbreviations from text, stores titles in hash references. - # - $less_than_tab = $this->tab_width - 1; - - # Link defs are in the form: [id]*: url "optional title" - $text = preg_replace_callback('{ - ^[ ]{0,'.$less_than_tab.'}\*\[(.+?)\][ ]?: # abbr_id = $1 - (.*) # text = $2 (no blank lines allowed) - }xm', - array(&$this, '_stripAbbreviations_callback'), - $text); - - return $text; - } - protected function _stripAbbreviations_callback($matches) - { - $abbr_word = $matches[1]; - $abbr_desc = $matches[2]; - if ($this->abbr_word_re) - $this->abbr_word_re .= '|'; - $this->abbr_word_re .= preg_quote($abbr_word); - $this->abbr_desciptions[$abbr_word] = trim($abbr_desc); - - return ''; # String that will replace the block - } - - - protected function doAbbreviations($text) - { - # - # Find defined abbreviations in text and wrap them in elements. - # - if ($this->abbr_word_re) { - // cannot use the /x modifier because abbr_word_re may - // contain significant spaces: - $text = preg_replace_callback('{'. - '(?abbr_word_re.')'. - '(?![\w\x1A])'. - '}', - array(&$this, '_doAbbreviations_callback'), $text); - } - - return $text; - } - protected function _doAbbreviations_callback($matches) - { - $abbr = $matches[0]; - if (isset($this->abbr_desciptions[$abbr])) { - $desc = $this->abbr_desciptions[$abbr]; - if (empty($desc)) { - return $this->hashPart("$abbr"); - } else { - $desc = $this->encodeAttribute($desc); - - return $this->hashPart("$abbr"); - } - } else { - return $matches[0]; - } - } - -} diff --git a/plugins/markdown/php-markdown/Michelf/MarkdownExtra.php b/plugins/markdown/php-markdown/Michelf/MarkdownExtra.php deleted file mode 100644 index e7a3bea..0000000 --- a/plugins/markdown/php-markdown/Michelf/MarkdownExtra.php +++ /dev/null @@ -1,36 +0,0 @@ - -# -# Original Markdown -# Copyright (c) 2004-2006 John Gruber -# -# -namespace Michelf; - -# Just force Michelf/Markdown.php to load. This is needed to load -# the temporary implementation class. See below for details. -\Michelf\Markdown::MARKDOWNLIB_VERSION; - -# -# Markdown Extra Parser Class -# -# Note: Currently the implementation resides in the temporary class -# \Michelf\MarkdownExtra_TmpImpl (in the same file as \Michelf\Markdown). -# This makes it easier to propagate the changes between the three different -# packaging styles of PHP Markdown. Once this issue is resolved, the -# _MarkdownExtra_TmpImpl will disappear and this one will contain the code. -# - -class MarkdownExtra extends \Michelf\_MarkdownExtra_TmpImpl -{ - ### Parser Implementation ### - - # Temporarily, the implemenation is in the _MarkdownExtra_TmpImpl class. - # See note above. - -} diff --git a/plugins/markdown/php-markdown/Readme.md b/plugins/markdown/php-markdown/Readme.md deleted file mode 100644 index 8ee5fae..0000000 --- a/plugins/markdown/php-markdown/Readme.md +++ /dev/null @@ -1,259 +0,0 @@ -PHP Markdown -============ - -PHP Markdown Lib 1.3 - 11 Apr 2013 - -by Michel Fortin - - -based on Markdown by John Gruber - - - -Introduction ------------- - -This is a library package that includes the PHP Markdown parser and its -sibling PHP Markdown Extra which additional features. - -Markdown is a text-to-HTML conversion tool for web writers. Markdown -allows you to write using an easy-to-read, easy-to-write plain text -format, then convert it to structurally valid XHTML (or HTML). - -"Markdown" is two things: a plain text markup syntax, and a software -tool, written in Perl, that converts the plain text markup to HTML. -PHP Markdown is a port to PHP of the original Markdown program by -John Gruber. - -PHP Markdown can work as a plug-in for WordPress, as a modifier for -the Smarty templating engine, or as a replacement for Textile -formatting in any software that supports Textile. - -Full documentation of Markdown's syntax is available on John's -Markdown page: - - -Requirement ------------ - -This library package requires PHP 5.3 or later. - -Note: The older plugin/library hybrid package for PHP Markdown and -PHP Markdown Extra is still maintained and will work with PHP 4.0.5 and later. - -Before PHP 5.3.7, pcre.backtrack_limit defaults to 100 000, which is too small -in many situations. You might need to set it to higher values. Later PHP -releases defaults to 1 000 000, which is usually fine. - - -Usage ------ - -This library package is meant to be used with class autoloading. For autoloading -to work, your project needs have setup a PSR-0-compatible autoloader. See the -included Readme.php file for a minimal autoloader setup. (If you don't want to -use autoloading you can do a classic `require_once` to manually include the -files prior use instead.) - -With class autoloading in place, putting the 'Michelf' folder in your -include path should be enough for this to work: - - use \Michelf\Markdown; - $my_html = Markdown::defaultTransform($my_text); - -Markdown Extra syntax is also available the same way: - - use \Michelf\MarkdownExtra; - $my_html = MarkdownExtra::defaultTransform($my_text); - -If you wish to use PHP Markdown with another text filter function -built to parse HTML, you should filter the text *after* the `transform` -function call. This is an example with [PHP SmartyPants][psp]: - - use \Michelf\Markdown, \Michelf\SmartyPants; - $my_html = Markdown::defaultTransform($my_text); - $my_html = SmartyPants::defaultTransform($my_html); - -All these examples are using the static `defaultTransform` static function -found inside the parser class. If you want to customize the parser -configuration, you can also instantiate it directly and change some -configuration variables: - - use \Michelf\MarkdownExtra; - $parser = new MarkdownExtra; - $parser->fn_id_prefix = "post22-"; - $my_html = $parser->transform($my_text); - - -Usage ------ - -This library package is meant to be used with class autoloading. For autoloading -to work, your project needs have setup a PSR-0-compatible autoloader. See the -included Readme.php file for a minimal autoloader setup. (If you don't want to -use autoloading you can do a classic `require_once` to manually include the -files prior use instead.) - -With class autoloading in place, putting the 'Michelf' folder in your -include path should be enough for this to work: - - use \Michelf\Markdown; - $my_html = Markdown::defaultTransform($my_text); - -Markdown Extra syntax is also available the same way: - - use \Michelf\MarkdownExtra; - $my_html = MarkdownExtra::defaultTransform($my_text); - -If you wish to use PHP Markdown with another text filter function -built to parse HTML, you should filter the text *after* the `transform` -function call. This is an example with [PHP SmartyPants][psp]: - - use \Michelf\Markdown, \Michelf\SmartyPants; - $my_html = Markdown::defaultTransform($my_text); - $my_html = SmartyPants::defaultTransform($my_html); - -All these examples are using the static `defaultTransform` static function -found inside the parser class. If you want to customize the parser -configuration, you can also instantiate it directly and change some -configuration variables: - - use \Michelf\MarkdownExtra; - $parser = new MarkdownExtra; - $parser->fn_id_prefix = "post22-"; - $my_html = $parser->transform($my_text); - -To learn more, see the full list of [configuration variables]. - - [configuration variables]: http://michelf.ca/project/php-markdown/configuration/ - - -Public API and Versionning Policy ---------------------------------- - -Version numbers are of the form *major*.*minor*.*patch*. - -The public API of PHP Markdown consist of the two parser classes `Markdown` -and `MarkdownExtra`, their constructors, the `transform` and `defaultTransform` -functions and their configuration variables. The public API is stable for -a given major version number. It might get additions when the minor version -number increments. - -**Protected members are not considered public API.** This is unconventionnal -and deserves an explanation. Incrementing the major version number every time -the underlying implementation of something changes is going to give nonsential -version numbers for the vast majority of people who just use the parser. -Protected members are meant to create parser subclasses that behave in -different ways. Very few people create parser subclasses. I don't want to -discourage it by making everything private, but at the same time I can't -guarenty any stable hook between versions if you use protected members. - -**Syntax changes** will increment the minor number for new features, and the -patch number for small corrections. A *new feature* is something that needs a -change in the syntax documentation. Note that since PHP Markdown Lib includes -two parsers, a syntax change for either of them will increment the minor -number. Also note that there is nothigng perfectly backward-compatible with the -Markdown syntax: all inputs are always valid, so new features always replace -something that was previously legal, although generally non-sensial to do. - - -Bugs ----- - -To file bug reports please send email to: - - -Please include with your report: (1) the example input; (2) the output you -expected; (3) the output PHP Markdown actually produced. - -If you have a problem where Markdown gives you an empty result, first check -that the backtrack limit is not too low by running `php --info | grep pcre`. -See Installation and Requirement above for details. - - -Version History ---------------- - -PHP Markdown Lib 1.3 (11 Apr 2013): - -This is the first release of PHP Markdown Lib. This package requires PHP -version 4.3 or later and is designed to work with PSR-0 autoloading and, -optionally with Composer. Here is a list of the changes since -PHP Markdown Extra 1.2.6: - -* Plugin interface for Wordpress and other systems is no longer present in - the Lib package. The classic package is still available if you need it: - - -* Added `public` and `protected` protection attributes, plus a section about - what is "public API" and what isn't in the Readme file. - -* Changed HTML output for footnotes: now instead of adding `rel` and `rev` - attributes, footnotes links have the class name `footnote-ref` and - backlinks `footnote-backref`. - -* Fixed some regular expressions to make PCRE not shout warnings about POSIX - collation classes (dependent on your version of PCRE). - -* Added optional class and id attributes to images and links using the same - syntax as for headers: - - [link](url){#id .class} - ![img](url){#id .class} - - It work too for reference-style links and images. In this case you need - to put those attributes at the reference definition: - - [link][linkref] or [linkref] - ![img][linkref] - - [linkref]: url "optional title" {#id .class} - -* Fixed a PHP notice message triggered when some table column separator - markers are missing on the separator line below column headers. - -* Fixed a small mistake that could cause the parser to retain an invalid - state related to parsing links across multiple runs. This was never - observed (that I know of), but it's still worth fixing. - - -Copyright and License ---------------------- - -PHP Markdown Lib -Copyright (c) 2004-2013 Michel Fortin - -All rights reserved. - -Based on Markdown -Copyright (c) 2003-2005 John Gruber - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the - distribution. - -* Neither the name "Markdown" nor the names of its contributors may - be used to endorse or promote products derived from this software - without specific prior written permission. - -This software is provided by the copyright holders and contributors "as -is" and any express or implied warranties, including, but not limited -to, the implied warranties of merchantability and fitness for a -particular purpose are disclaimed. In no event shall the copyright owner -or contributors be liable for any direct, indirect, incidental, special, -exemplary, or consequential damages (including, but not limited to, -procurement of substitute goods or services; loss of use, data, or -profits; or business interruption) however caused and on any theory of -liability, whether in contract, strict liability, or tort (including -negligence or otherwise) arising in any way out of the use of this -software, even if advised of the possibility of such damage. diff --git a/plugins/markdown/php-markdown/Readme.php b/plugins/markdown/php-markdown/Readme.php deleted file mode 100644 index ef4395c..0000000 --- a/plugins/markdown/php-markdown/Readme.php +++ /dev/null @@ -1,31 +0,0 @@ - - - - - PHP Markdown Lib - Readme - - - - - diff --git a/plugins/markdown/php-markdown/composer.json b/plugins/markdown/php-markdown/composer.json deleted file mode 100644 index 670fc96..0000000 --- a/plugins/markdown/php-markdown/composer.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "michelf/php-markdown", - "type": "library", - "description": "PHP Markdown", - "homepage": "http://michelf.ca/projects/php-markdown/", - "keywords": ["markdown"], - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Michel Fortin", - "email": "michel.fortin@michelf.ca", - "homepage": "http://michelf.ca/", - "role": "Developer" - }, - { - "name": "John Gruber", - "homepage": "http://daringfireball.net/" - } - ], - "require": { - "php": ">=5.3.0" - }, - "autoload": { - "psr-0": { "Michelf": "" } - }, - "extra": { - "branch-alias": { - "dev-lib": "1.3.x-dev" - } - } -} diff --git a/plugins/markitup/install/markitup.manifest.xml b/plugins/markitup/install/markitup.manifest.xml deleted file mode 100644 index b8fde15..0000000 --- a/plugins/markitup/install/markitup.manifest.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - plugins/markitup/markitup.plugin.php - active - 15 - MarkItUp! - MarkItUp! universal markup jQuery editor - 1.0.0 - Awilum - http://monstra.org/ - diff --git a/plugins/markitup/markitup.plugin.php b/plugins/markitup/markitup.plugin.php deleted file mode 100644 index b34a450..0000000 --- a/plugins/markitup/markitup.plugin.php +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - '); - - echo (''); - } - -} diff --git a/plugins/markitup/markitup/.htaccess b/plugins/markitup/markitup/.htaccess deleted file mode 100644 index b9f48ac..0000000 --- a/plugins/markitup/markitup/.htaccess +++ /dev/null @@ -1,2 +0,0 @@ -Options -Indexes -Allow from all \ No newline at end of file diff --git a/plugins/markitup/markitup/jquery.markitup.js b/plugins/markitup/markitup/jquery.markitup.js deleted file mode 100644 index b7e2d03..0000000 --- a/plugins/markitup/markitup/jquery.markitup.js +++ /dev/null @@ -1,665 +0,0 @@ -// ---------------------------------------------------------------------------- -// markItUp! Universal MarkUp Engine, JQuery plugin -// v 1.1.x -// Dual licensed under the MIT and GPL licenses. -// ---------------------------------------------------------------------------- -// Copyright (C) 2007-2012 Jay Salvat -// http://markitup.jaysalvat.com/ -// ---------------------------------------------------------------------------- -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// ---------------------------------------------------------------------------- -(function($) { - $.fn.markItUp = function(settings, extraSettings) { - var method, params, options, ctrlKey, shiftKey, altKey; ctrlKey = shiftKey = altKey = false; - - if (typeof settings == 'string') { - method = settings; - params = extraSettings; - } - - options = { id: '', - nameSpace: '', - root: '', - previewHandler: false, - previewInWindow: '', // 'width=800, height=600, resizable=yes, scrollbars=yes' - previewInElement: '', - previewAutoRefresh: true, - previewPosition: 'after', - previewTemplatePath: '~/templates/preview.html', - previewParser: false, - previewParserPath: '', - previewParserVar: 'data', - resizeHandle: true, - beforeInsert: '', - afterInsert: '', - onEnter: {}, - onShiftEnter: {}, - onCtrlEnter: {}, - onTab: {}, - markupSet: [ { /* set */ } ] - }; - $.extend(options, settings, extraSettings); - - // compute markItUp! path - if (!options.root) { - $('script').each(function(a, tag) { - miuScript = $(tag).get(0).src.match(/(.*)jquery\.markitup(\.pack)?\.js$/); - if (miuScript !== null) { - options.root = miuScript[1]; - } - }); - } - - // Quick patch to keep compatibility with jQuery 1.9 - var uaMatch = function(ua) { - ua = ua.toLowerCase(); - - var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || - /(webkit)[ \/]([\w.]+)/.exec(ua) || - /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || - /(msie) ([\w.]+)/.exec(ua) || - ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || - []; - - return { - browser: match[ 1 ] || "", - version: match[ 2 ] || "0" - }; - }; - var matched = uaMatch( navigator.userAgent ); - var browser = {}; - - if (matched.browser) { - browser[matched.browser] = true; - browser.version = matched.version; - } - if (browser.chrome) { - browser.webkit = true; - } else if (browser.webkit) { - browser.safari = true; - } - - return this.each(function() { - var $$, textarea, levels, scrollPosition, caretPosition, caretOffset, - clicked, hash, header, footer, previewWindow, template, iFrame, abort; - $$ = $(this); - textarea = this; - levels = []; - abort = false; - scrollPosition = caretPosition = 0; - caretOffset = -1; - - options.previewParserPath = localize(options.previewParserPath); - options.previewTemplatePath = localize(options.previewTemplatePath); - - if (method) { - switch(method) { - case 'remove': - remove(); - break; - case 'insert': - markup(params); - break; - default: - $.error('Method ' + method + ' does not exist on jQuery.markItUp'); - } - return; - } - - // apply the computed path to ~/ - function localize(data, inText) { - if (inText) { - return data.replace(/("|')~\//g, "$1"+options.root); - } - return data.replace(/^~\//, options.root); - } - - // init and build editor - function init() { - id = ''; nameSpace = ''; - if (options.id) { - id = 'id="'+options.id+'"'; - } else if ($$.attr("id")) { - id = 'id="markItUp'+($$.attr("id").substr(0, 1).toUpperCase())+($$.attr("id").substr(1))+'"'; - - } - if (options.nameSpace) { - nameSpace = 'class="'+options.nameSpace+'"'; - } - $$.wrap('
    '); - $$.wrap('
    '); - $$.wrap('
    '); - $$.addClass("markItUpEditor"); - - // add the header before the textarea - header = $('
    ').insertBefore($$); - $(dropMenus(options.markupSet)).appendTo(header); - - // add the footer after the textarea - footer = $('
    ').insertAfter($$); - - // add the resize handle after textarea - if (options.resizeHandle === true && browser.safari !== true) { - resizeHandle = $('
    ') - .insertAfter($$) - .bind("mousedown.markItUp", function(e) { - var h = $$.height(), y = e.clientY, mouseMove, mouseUp; - mouseMove = function(e) { - $$.css("height", Math.max(20, e.clientY+h-y)+"px"); - return false; - }; - mouseUp = function(e) { - $("html").unbind("mousemove.markItUp", mouseMove).unbind("mouseup.markItUp", mouseUp); - return false; - }; - $("html").bind("mousemove.markItUp", mouseMove).bind("mouseup.markItUp", mouseUp); - }); - footer.append(resizeHandle); - } - - // listen key events - $$.bind('keydown.markItUp', keyPressed).bind('keyup', keyPressed); - - // bind an event to catch external calls - $$.bind("insertion.markItUp", function(e, settings) { - if (settings.target !== false) { - get(); - } - if (textarea === $.markItUp.focused) { - markup(settings); - } - }); - - // remember the last focus - $$.bind('focus.markItUp', function() { - $.markItUp.focused = this; - }); - - if (options.previewInElement) { - refreshPreview(); - } - } - - // recursively build header with dropMenus from markupset - function dropMenus(markupSet) { - var ul = $('
      '), i = 0; - $('li:hover > ul', ul).css('display', 'block'); - $.each(markupSet, function() { - var button = this, t = '', title, li, j; - title = (button.key) ? (button.name||'')+' [Ctrl+'+button.key+']' : (button.name||''); - key = (button.key) ? 'accesskey="'+button.key+'"' : ''; - if (button.separator) { - li = $('
    • '+(button.separator||'')+'
    • ').appendTo(ul); - } else { - i++; - for (j = levels.length -1; j >= 0; j--) { - t += levels[j]+"-"; - } - li = $('
    • '+(button.name||'')+'
    • ') - .bind("contextmenu.markItUp", function() { // prevent contextmenu on mac and allow ctrl+click - return false; - }).bind('click.markItUp', function(e) { - e.preventDefault(); - }).bind("focusin.markItUp", function(){ - $$.focus(); - }).bind('mouseup', function() { - if (button.call) { - eval(button.call)(); - } - setTimeout(function() { markup(button) },1); - return false; - }).bind('mouseenter.markItUp', function() { - $('> ul', this).show(); - $(document).one('click', function() { // close dropmenu if click outside - $('ul ul', header).hide(); - } - ); - }).bind('mouseleave.markItUp', function() { - $('> ul', this).hide(); - }).appendTo(ul); - if (button.dropMenu) { - levels.push(i); - $(li).addClass('markItUpDropMenu').append(dropMenus(button.dropMenu)); - } - } - }); - levels.pop(); - return ul; - } - - // markItUp! markups - function magicMarkups(string) { - if (string) { - string = string.toString(); - string = string.replace(/\(\!\(([\s\S]*?)\)\!\)/g, - function(x, a) { - var b = a.split('|!|'); - if (altKey === true) { - return (b[1] !== undefined) ? b[1] : b[0]; - } else { - return (b[1] === undefined) ? "" : b[0]; - } - } - ); - // [![prompt]!], [![prompt:!:value]!] - string = string.replace(/\[\!\[([\s\S]*?)\]\!\]/g, - function(x, a) { - var b = a.split(':!:'); - if (abort === true) { - return false; - } - value = prompt(b[0], (b[1]) ? b[1] : ''); - if (value === null) { - abort = true; - } - return value; - } - ); - return string; - } - return ""; - } - - // prepare action - function prepare(action) { - if ($.isFunction(action)) { - action = action(hash); - } - return magicMarkups(action); - } - - // build block to insert - function build(string) { - var openWith = prepare(clicked.openWith); - var placeHolder = prepare(clicked.placeHolder); - var replaceWith = prepare(clicked.replaceWith); - var closeWith = prepare(clicked.closeWith); - var openBlockWith = prepare(clicked.openBlockWith); - var closeBlockWith = prepare(clicked.closeBlockWith); - var multiline = clicked.multiline; - - if (replaceWith !== "") { - block = openWith + replaceWith + closeWith; - } else if (selection === '' && placeHolder !== '') { - block = openWith + placeHolder + closeWith; - } else { - string = string || selection; - - var lines = [string], blocks = []; - - if (multiline === true) { - lines = string.split(/\r?\n/); - } - - for (var l = 0; l < lines.length; l++) { - line = lines[l]; - var trailingSpaces; - if (trailingSpaces = line.match(/ *$/)) { - blocks.push(openWith + line.replace(/ *$/g, '') + closeWith + trailingSpaces); - } else { - blocks.push(openWith + line + closeWith); - } - } - - block = blocks.join("\n"); - } - - block = openBlockWith + block + closeBlockWith; - - return { block:block, - openBlockWith:openBlockWith, - openWith:openWith, - replaceWith:replaceWith, - placeHolder:placeHolder, - closeWith:closeWith, - closeBlockWith:closeBlockWith - }; - } - - // define markup to insert - function markup(button) { - var len, j, n, i; - hash = clicked = button; - get(); - $.extend(hash, { line:"", - root:options.root, - textarea:textarea, - selection:(selection||''), - caretPosition:caretPosition, - ctrlKey:ctrlKey, - shiftKey:shiftKey, - altKey:altKey - } - ); - // callbacks before insertion - prepare(options.beforeInsert); - prepare(clicked.beforeInsert); - if ((ctrlKey === true && shiftKey === true) || button.multiline === true) { - prepare(clicked.beforeMultiInsert); - } - $.extend(hash, { line:1 }); - - if ((ctrlKey === true && shiftKey === true)) { - lines = selection.split(/\r?\n/); - for (j = 0, n = lines.length, i = 0; i < n; i++) { - if ($.trim(lines[i]) !== '') { - $.extend(hash, { line:++j, selection:lines[i] } ); - lines[i] = build(lines[i]).block; - } else { - lines[i] = ""; - } - } - - string = { block:lines.join('\n')}; - start = caretPosition; - len = string.block.length + ((browser.opera) ? n-1 : 0); - } else if (ctrlKey === true) { - string = build(selection); - start = caretPosition + string.openWith.length; - len = string.block.length - string.openWith.length - string.closeWith.length; - len = len - (string.block.match(/ $/) ? 1 : 0); - len -= fixIeBug(string.block); - } else if (shiftKey === true) { - string = build(selection); - start = caretPosition; - len = string.block.length; - len -= fixIeBug(string.block); - } else { - string = build(selection); - start = caretPosition + string.block.length ; - len = 0; - start -= fixIeBug(string.block); - } - if ((selection === '' && string.replaceWith === '')) { - caretOffset += fixOperaBug(string.block); - - start = caretPosition + string.openBlockWith.length + string.openWith.length; - len = string.block.length - string.openBlockWith.length - string.openWith.length - string.closeWith.length - string.closeBlockWith.length; - - caretOffset = $$.val().substring(caretPosition, $$.val().length).length; - caretOffset -= fixOperaBug($$.val().substring(0, caretPosition)); - } - $.extend(hash, { caretPosition:caretPosition, scrollPosition:scrollPosition } ); - - if (string.block !== selection && abort === false) { - insert(string.block); - set(start, len); - } else { - caretOffset = -1; - } - get(); - - $.extend(hash, { line:'', selection:selection }); - - // callbacks after insertion - if ((ctrlKey === true && shiftKey === true) || button.multiline === true) { - prepare(clicked.afterMultiInsert); - } - prepare(clicked.afterInsert); - prepare(options.afterInsert); - - // refresh preview if opened - if (previewWindow && options.previewAutoRefresh) { - refreshPreview(); - } - - // reinit keyevent - shiftKey = altKey = ctrlKey = abort = false; - } - - // Substract linefeed in Opera - function fixOperaBug(string) { - if (browser.opera) { - return string.length - string.replace(/\n*/g, '').length; - } - return 0; - } - // Substract linefeed in IE - function fixIeBug(string) { - if (browser.msie) { - return string.length - string.replace(/\r*/g, '').length; - } - return 0; - } - - // add markup - function insert(block) { - if (document.selection) { - var newSelection = document.selection.createRange(); - newSelection.text = block; - } else { - textarea.value = textarea.value.substring(0, caretPosition) + block + textarea.value.substring(caretPosition + selection.length, textarea.value.length); - } - } - - // set a selection - function set(start, len) { - if (textarea.createTextRange){ - // quick fix to make it work on Opera 9.5 - if (browser.opera && browser.version >= 9.5 && len == 0) { - return false; - } - range = textarea.createTextRange(); - range.collapse(true); - range.moveStart('character', start); - range.moveEnd('character', len); - range.select(); - } else if (textarea.setSelectionRange ){ - textarea.setSelectionRange(start, start + len); - } - textarea.scrollTop = scrollPosition; - textarea.focus(); - } - - // get the selection - function get() { - textarea.focus(); - - scrollPosition = textarea.scrollTop; - if (document.selection) { - selection = document.selection.createRange().text; - if (browser.msie) { // ie - var range = document.selection.createRange(), rangeCopy = range.duplicate(); - rangeCopy.moveToElementText(textarea); - caretPosition = -1; - while(rangeCopy.inRange(range)) { - rangeCopy.moveStart('character'); - caretPosition ++; - } - } else { // opera - caretPosition = textarea.selectionStart; - } - } else { // gecko & webkit - caretPosition = textarea.selectionStart; - - selection = textarea.value.substring(caretPosition, textarea.selectionEnd); - } - return selection; - } - - // open preview window - function preview() { - if (typeof options.previewHandler === 'function') { - previewWindow = true; - } else if (options.previewInElement) { - previewWindow = $(options.previewInElement); - } else if (!previewWindow || previewWindow.closed) { - if (options.previewInWindow) { - previewWindow = window.open('', 'preview', options.previewInWindow); - $(window).unload(function() { - previewWindow.close(); - }); - } else { - iFrame = $(''); - if (options.previewPosition == 'after') { - iFrame.insertAfter(footer); - } else { - iFrame.insertBefore(header); - } - previewWindow = iFrame[iFrame.length - 1].contentWindow || frame[iFrame.length - 1]; - } - } else if (altKey === true) { - if (iFrame) { - iFrame.remove(); - } else { - previewWindow.close(); - } - previewWindow = iFrame = false; - } - if (!options.previewAutoRefresh) { - refreshPreview(); - } - if (options.previewInWindow) { - previewWindow.focus(); - } - } - - // refresh Preview window - function refreshPreview() { - renderPreview(); - } - - function renderPreview() { - var phtml; - if (options.previewHandler && typeof options.previewHandler === 'function') { - options.previewHandler( $$.val() ); - } else if (options.previewParser && typeof options.previewParser === 'function') { - var data = options.previewParser( $$.val() ); - writeInPreview(localize(data, 1) ); - } else if (options.previewParserPath !== '') { - $.ajax({ - type: 'POST', - dataType: 'text', - global: false, - url: options.previewParserPath, - data: options.previewParserVar+'='+encodeURIComponent($$.val()), - success: function(data) { - writeInPreview( localize(data, 1) ); - } - }); - } else { - if (!template) { - $.ajax({ - url: options.previewTemplatePath, - dataType: 'text', - global: false, - success: function(data) { - writeInPreview( localize(data, 1).replace(//g, $$.val()) ); - } - }); - } - } - return false; - } - - function writeInPreview(data) { - if (options.previewInElement) { - $(options.previewInElement).html(data); - } else if (previewWindow && previewWindow.document) { - try { - sp = previewWindow.document.documentElement.scrollTop - } catch(e) { - sp = 0; - } - previewWindow.document.open(); - previewWindow.document.write(data); - previewWindow.document.close(); - previewWindow.document.documentElement.scrollTop = sp; - } - } - - // set keys pressed - function keyPressed(e) { - shiftKey = e.shiftKey; - altKey = e.altKey; - ctrlKey = (!(e.altKey && e.ctrlKey)) ? (e.ctrlKey || e.metaKey) : false; - - if (e.type === 'keydown') { - if (ctrlKey === true) { - li = $('a[accesskey="'+((e.keyCode == 13) ? '\\n' : String.fromCharCode(e.keyCode))+'"]', header).parent('li'); - if (li.length !== 0) { - ctrlKey = false; - setTimeout(function() { - li.triggerHandler('mouseup'); - },1); - return false; - } - } - if (e.keyCode === 13 || e.keyCode === 10) { // Enter key - if (ctrlKey === true) { // Enter + Ctrl - ctrlKey = false; - markup(options.onCtrlEnter); - return options.onCtrlEnter.keepDefault; - } else if (shiftKey === true) { // Enter + Shift - shiftKey = false; - markup(options.onShiftEnter); - return options.onShiftEnter.keepDefault; - } else { // only Enter - markup(options.onEnter); - return options.onEnter.keepDefault; - } - } - if (e.keyCode === 9) { // Tab key - if (shiftKey == true || ctrlKey == true || altKey == true) { - return false; - } - if (caretOffset !== -1) { - get(); - caretOffset = $$.val().length - caretOffset; - set(caretOffset, 0); - caretOffset = -1; - return false; - } else { - markup(options.onTab); - return options.onTab.keepDefault; - } - } - } - } - - function remove() { - $$.unbind(".markItUp").removeClass('markItUpEditor'); - $$.parent('div').parent('div.markItUp').parent('div').replaceWith($$); - $$.data('markItUp', null); - } - - init(); - }); - }; - - $.fn.markItUpRemove = function() { - return this.each(function() { - $(this).markItUp('remove'); - } - ); - }; - - $.markItUp = function(settings) { - var options = { target:false }; - $.extend(options, settings); - if (options.target) { - return $(options.target).each(function() { - $(this).focus(); - $(this).trigger('insertion', [options]); - }); - } else { - $('textarea').trigger('insertion', [options]); - } - }; -})(jQuery); diff --git a/plugins/markitup/markitup/sets/html/images/bold.png b/plugins/markitup/markitup/sets/html/images/bold.png deleted file mode 100644 index 61edec015eebba0fa8717d3c4a31f1548305f0d4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 244 zcmVYH zpcg1lC_i8FzuRr#f{5RW=#hDTH!T-I$5+?I4{;Qpr zM|Y-wz3+cVumWuXwg0;R#S73BxYYw~h8ivNU-Q2}J(>dBdWZk|V9!YxsQl-D&!vDO uZIfWKUU$FRe))dMe&PMR{hSI6^aB80%0x4n#{7@~0000lx{oilS z(|a)S;FT}$mF{};A0($$b4LiPX5Hp{5mBpNelOVa>c8*Ir}xzIZ%8A_N&7E+b`K;M zzU29Lpj-rsW}W)GY+=iuf2`R42B_fKZ?vFB#k5|?KS1mJ&;`Bj7Q&rauHa)p^$t<$fo|zv6Mwm z|GPBbg@-{~N&UO6;Tr#UIkNuW=EC}9hYNEB&VZB-zrb%%cJr85$31W?91fE$KUZx1 z|NEAn|NpLS|NnJ);s4WFI)8RLvE&jJtvj5V?|uVn{y)*@|Nk<<|NmPR{=e?D{|^+u zN0b4(9a;YUJG=HjGI(Dn{vRYxoC{o-AAgyX^#4Cl(~nYy|L=hKVLJ1Fp!gG_3^)`f z*>Eyh<@d8Ph5xTASpVNmX8ga$hvm<97v?IWllS2;nF^qd_d(7Exrijqga81-w&fL_ Smh*W40000YMJ-Cp!#ejkJ!h8h- z36WQ;UcCx9J5y^CH=E-nzDt}|jM8^l>IKDq7ROwEa!Is;zoI2VN%=g>o6O_|`VGHt zaK~QpG--@$sE(FeXk9AM`&=tTP2Z_JWB+!UP3K>~ZOJ;h`NG><9mg(mU7e%8@U}?D zu}d6Rr?@ZV{^XLpgX8K9_J{f+=cnp1s_D+LoNCA$FCZRQ(IVfv#rWw$X1xZWD;Ydp L{an^LB{Ts5QwUH_ diff --git a/plugins/markitup/markitup/sets/html/images/h2.png b/plugins/markitup/markitup/sets/html/images/h2.png deleted file mode 100644 index b19e9f018e679382d8230d2883278a67311ab835..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 240 zcmV71Y zu?>ST6a~O1QP5aKRuoa;B68=>l||zUDWai3!V_cyCSZbWzyxoDOuzzZ6S{zfK~NSsDTKOFe<2LW4t;KxBqj(XHA`7Q}`J qe&Q17=@MX4O-;3yEC^!7Nqhh`DLO#OEx6?X000071Y zv5CVl00q#``M||F5LJQ$t5T=Vl}Mw?VBDlI*b`&|O`r*~K_>Vcc!DhQ=eUc4cgTCd zM_9|smCFXq+sMRNh7cZ}Zo*;JLR5)SK-hh8yA=+Lu0$0%2=F~%Z)V5gs`)wQlw%&A zL4fNmPwFxbvqqu{^uj;WcYCX5!rQ1sRGz=G!Q6nh{}wXdk|I$#o@Mfn+Dj9@gbQ9$ pi5wU-MuZ%19wdL5P$p@Isg`L&Y1uJ002ovPDHLkV1jgaWzzrv diff --git a/plugins/markitup/markitup/sets/html/images/h4.png b/plugins/markitup/markitup/sets/html/images/h4.png deleted file mode 100644 index e58ed162a620dafccdcd60529a8da44000520ae0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 227 zcmV<90382`P)71Y zp$&yF6a~qbjM zJZ7DUqGzXmbf={`o3j?&CQU>U*r{vnXvSu*_bT9)G!liUQxr8T;+7b+j~s dOC=Dz#2=IHILg_7#%cfn002ovPDHLkV1lhwS%d%p diff --git a/plugins/markitup/markitup/sets/html/images/h5.png b/plugins/markitup/markitup/sets/html/images/h5.png deleted file mode 100644 index 7fb9ec68d77e06f221eb4a92da80c25cb16b84ab..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 239 zcmV%%7cOE#1OY=Js@$n_CDN!e7&k5q)&!YA6KDc&kO^*sOprxxjucTsM(|Z1 z?r|U3Mb^A>B;o2}le2Qo(NByThnJ8J5^Z$|(C002ovPDHLkV1oZQTq^(o diff --git a/plugins/markitup/markitup/sets/html/images/h6.png b/plugins/markitup/markitup/sets/html/images/h6.png deleted file mode 100644 index 513fe86aaa16035a199c462aabcaea8307b24593..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 241 zcmV71Y zv5CVl00q!bT)2oam^-2>;tF-@TnRU-48~0ggFV4bpb0#|ZJ-JM2ALp>{5dWsbC418 z9`F{{edWq!1LkdHWZ3cK2K!^KIILQTA~Fc@t)tDR#lJ;2q6q8-xVt4@-84VO6jMn3 z<4bNbGP%1qxo&ZoH4=sAMK&1$&9zqbjl-x&6pkMj}eh{Ezyoj~Mu!Uy|L z&L0@(cs-JH`N!{bKvOnZ;NSiK%yQaJYAk=tqZ`~C&oiI@zm3si>0X|g|F<7(K2X?n zx?Z_PEW&2PkM*s$nT**l|Cjn-=r!BqgUHx3v IIVCg!05pm`Jpcdz diff --git a/plugins/markitup/markitup/sets/html/images/link.png b/plugins/markitup/markitup/sets/html/images/link.png deleted file mode 100644 index 31da1cf4632093f6e04ea632f79467b7ee0a85f8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 283 zcmV+$0p$LPP)YH z7$m@sJFB$y-Ms%b4|B|OBx>%?```L5tJIDgDs9B((>3w`i~o23AN=2Vulmr;A8L+xy=4x~3*rff}>Df!F<%FWKL-e}>0}J7<5&{+{y1 h>%P5#8Z*Pt008>Ka5aD9_^to|002ovPDHLkV1jiUnce^Z diff --git a/plugins/markitup/markitup/sets/html/images/list-bullet.png b/plugins/markitup/markitup/sets/html/images/list-bullet.png deleted file mode 100644 index 42850d7aac828a9e4e5c2923a2594ba3453a4912..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 270 zcmV+p0rCEcP)lExddlCwe;NM#`NQ!0_iu(@ zzkY$~pFe+s*=yIXWu%G=1_?-+`KX|C)5`}TJ$K0qL?toS0vRC|`8Sdr;6RLvi^~QE z)D%#FA>$uEe!$tcZrwrzVnD~Of|A9LAGlUt8>)e5n}4Ywe%ieU)_Ir63`BLF0s{qZ za7sK13`8R%qikS6O@XC45RIG~L8%j%N*Un>+_~{(0!TBIW;l25+*BYnl`h@~0RPp9 UVn`qimjD0&07*qoM6N<$g2Yg5&Hw-a diff --git a/plugins/markitup/markitup/sets/html/images/list-item.png b/plugins/markitup/markitup/sets/html/images/list-item.png deleted file mode 100644 index da2259a41e8fd4777b5270b883d4186d33f91df4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 146 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k)AG&Ar-fh6C_v2;d6mj2=#{jF)yPTbQ@)C&1Dj7rZ|~WEUteFJGT*-5Na3-(ecgeZ+wCSNFe~ni{G_ZR?-^Z(Q^Af6c0=0~Cnm z%O3wPUHbTc@#4qiy8xuwI`0zsu>jHxbAgeOQMR_W_J0)>mH%>ba{tA}#s3Ql3H|5c u;rY+b&iNkl!cH(!MNklC%CQl6JGANpYWWp0glsN?yleW@&Cl*Py?X0+V?%*ZP!bL z0g9!M1kJmitt#C5{(s%>kN-g$LE?73&vx5&JtJ%Y49Mp{6!e((@(f5Lh;Q5ZY`1O4 zQ{oK(+u8%PwG(OpP_s=Ni3T9sYSa33w{;7t1^{gYX#}xBnynj2Gytp#YAZ;ybpxpe zG$U-as(-rMvYu1}fHqn|ZMCcg8c_R~Gy~`Y01BC>dL%&am;e9(07*qoM6N<$f(oUI AfB*mh diff --git a/plugins/markitup/markitup/sets/html/images/picture.png b/plugins/markitup/markitup/sets/html/images/picture.png deleted file mode 100644 index 703fb3c2d90172d6789fc09e24c0c7f7cdfca57d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 553 zcmV+^0@nSBP)_;`hbl;!rvgKv(U;yEKL4E zK(Gje6+z7x`PghW*||G&#v*3PZh{CIrkk1PocEpgNC<)JtQcVVX(rfHhV^6CK{_GrmE zlVdyNNfQ^8{iB?38x@AaU1COf`D_xeB0UL(17jkLKw-9+tnHANe$ccnoOi@&%G5-i z?~P%qr5dUO9snp{j9|kqrR0Fa(p~0qGLd6C2^;&zYXl;S7*5N~=9gAi=7~I*&++cB@ReG)@#52y$6M2xk(?(M^7B zZBxlM85%aE;yB(PVtcDjy)s2?}%iP3m6liR2^Xd2%dZef-@Ohwv5D?(;>{9O_nmOd8y+^kBmDSKWoN)w+;Vpn%cbxwK25;JvuNB0<00000NkvXXu0mjf#i;za diff --git a/plugins/markitup/markitup/sets/html/images/preview.png b/plugins/markitup/markitup/sets/html/images/preview.png deleted file mode 100644 index b29c73aebc14ef8b3da9865ede256c5b4ff1b3c5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 468 zcmV;_0W1EAP)gNI$1iHu`9Vg<9)ic)7` ztjJpMDQhpfYWhz*o~D8u-@Y)-_A3)#Fc^7mMjY)OLN{SLT7W3b(hpnY8i5-Tn=04iS@!a=49}G1BpcyjAj%04|oFwB*g^fxwel00000< KMNUMnLSTZzj@C;6 diff --git a/plugins/markitup/markitup/sets/html/images/stroke.png b/plugins/markitup/markitup/sets/html/images/stroke.png deleted file mode 100644 index c910b5966fba19beea6655b4a6749501980a2775..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 212 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!60wlNoGJgf6W_!9ghG?8mPFSF>A*eHB=G{j{H|4-iN^7R>w2k)`27M-}; z`9J%=??3XZkMV>$R%ZUJm+1MQ|2h7VJu}ZV1zopr0BrtPG5`Po diff --git a/plugins/markitup/markitup/sets/html/set.js b/plugins/markitup/markitup/sets/html/set.js deleted file mode 100644 index 755afbf..0000000 --- a/plugins/markitup/markitup/sets/html/set.js +++ /dev/null @@ -1,77 +0,0 @@ -// ---------------------------------------------------------------------------- -// markItUp! -// ---------------------------------------------------------------------------- -// Copyright (C) 2008 Jay Salvat -// http://markitup.jaysalvat.com/ -// ---------------------------------------------------------------------------- -// Html tags -// http://en.wikipedia.org/wiki/html -// ---------------------------------------------------------------------------- -// Basic set. Feel free to add more tags -// ---------------------------------------------------------------------------- -mySettings = { - onShiftEnter: {keepDefault:false, replaceWith:'
      \n'}, - onCtrlEnter: {keepDefault:false, openWith:'\n

      ', closeWith:'

      \n'}, - onTab: {keepDefault:false, openWith:' '}, - markupSet: [ - {name:'Heading 1', key:'1', openWith:'', closeWith:'', placeHolder:'Your title here...' }, - {name:'Heading 2', key:'2', openWith:'', closeWith:'', placeHolder:'Your title here...' }, - {name:'Heading 3', key:'3', openWith:'', closeWith:'', placeHolder:'Your title here...' }, - {name:'Heading 4', key:'4', openWith:'', closeWith:'', placeHolder:'Your title here...' }, - {name:'Heading 5', key:'5', openWith:'', closeWith:'', placeHolder:'Your title here...' }, - {name:'Heading 6', key:'6', openWith:'', closeWith:'', placeHolder:'Your title here...' }, - {name:'Paragraph', openWith:'', closeWith:'

      ' }, - {separator:'---------------' }, - {name:'Bold', key:'B', openWith:'(!(|!|)!)', closeWith:'(!(|!|)!)' }, - {name:'Italic', key:'I', openWith:'(!(|!|)!)', closeWith:'(!(|!|)!)' }, - {name:'Stroke through', key:'S', openWith:'', closeWith:'' }, - {separator:'---------------' }, - {name:'Ul', openWith:'
        \n', closeWith:'
      \n' }, - {name:'Ol', openWith:'
        \n', closeWith:'
      \n' }, - {name:'Li', openWith:'
    • ', closeWith:'
    • ' }, - {separator:'---------------' }, - {name:'Picture', key:'P', replaceWith:'[![Alternative text]!]' }, - {name:'Link', key:'L', openWith:'', closeWith:'', placeHolder:'Your text to link...' }, - {name:'Colors', className:'palette', dropMenu: [ - {name:'Yellow', openWith:'', closeWith:'', className:"col1-1" }, - {name:'Yellow', openWith:'', closeWith:'', className:"col1-2" }, - {name:'Yellow', openWith:'', closeWith:'', className:"col1-3" }, - - {name:'Orange', openWith:'', closeWith:'', className:"col2-1" }, - {name:'Orange', openWith:'', closeWith:'', className:"col2-2" }, - {name:'Orange', openWith:'', closeWith:'', className:"col2-3" }, - - {name:'Brown', openWith:'', closeWith:'', className:"col3-1" }, - {name:'Brown', openWith:'', closeWith:'', className:"col3-2" }, - {name:'Brown', openWith:'', closeWith:'', className:"col3-3" }, - - {name:'Green', openWith:'', closeWith:'', className:"col4-1" }, - {name:'Green', openWith:'', closeWith:'', className:"col4-2" }, - {name:'Green', openWith:'', closeWith:'', className:"col4-3" }, - - {name:'Blue', openWith:'', closeWith:'', className:"col5-1" }, - {name:'Blue', openWith:'', closeWith:'', className:"col5-2" }, - {name:'Blue', openWith:'', closeWith:'', className:"col5-3" }, - - {name:'Purple', openWith:'', closeWith:'', className:"col6-1" }, - {name:'Purple', openWith:'', closeWith:'', className:"col6-2" }, - {name:'Purple', openWith:'', closeWith:'', className:"col6-3" }, - - {name:'Red', openWith:'', closeWith:'', className:"col7-1" }, - {name:'Red', openWith:'', closeWith:'', className:"col7-2" }, - {name:'Red', openWith:'', closeWith:'', className:"col7-3" }, - - {name:'Gray', openWith:'', closeWith:'', className:"col8-1" }, - {name:'Gray', openWith:'', closeWith:'', className:"col8-2" }, - {name:'Gray', openWith:'', closeWith:'', className:"col8-3" }, - - {name:'Gray', openWith:'', closeWith:'', className:"col9-1" }, - {name:'Gray', openWith:'', closeWith:'', className:"col9-2" }, - {name:'Gray', openWith:'', closeWith:'', className:"col9-3" } - ] - }, - {separator:'---------------' }, - {name:'Clean', className:'clean', replaceWith:function(markitup) { return markitup.selection.replace(/<(.*?)>/g, "") } }, - {name:'Preview', className:'preview', call:'preview' } - ] -} \ No newline at end of file diff --git a/plugins/markitup/markitup/sets/html/style.css b/plugins/markitup/markitup/sets/html/style.css deleted file mode 100644 index f614365..0000000 --- a/plugins/markitup/markitup/sets/html/style.css +++ /dev/null @@ -1,174 +0,0 @@ -/* ------------------------------------------------------------------- -// markItUp! -// By Jay Salvat - http://markitup.jaysalvat.com/ -// ------------------------------------------------------------------*/ -.markItUp .markItUpButton1 a { - background-image:url(images/h1.png); -} -.markItUp .markItUpButton2 a { - background-image:url(images/h2.png); -} -.markItUp .markItUpButton3 a { - background-image:url(images/h3.png); -} -.markItUp .markItUpButton4 a { - background-image:url(images/h4.png); -} -.markItUp .markItUpButton5 a { - background-image:url(images/h5.png); -} -.markItUp .markItUpButton6 a { - background-image:url(images/h6.png); -} -.markItUp .markItUpButton7 a { - background-image:url(images/paragraph.png); -} - -.markItUp .markItUpButton8 a { - background-image:url(images/bold.png); -} -.markItUp .markItUpButton9 a { - background-image:url(images/italic.png); -} -.markItUp .markItUpButton10 a { - background-image:url(images/stroke.png); -} - -.markItUp .markItUpButton11 a { - background-image:url(images/list-bullet.png); -} -.markItUp .markItUpButton12 a { - background-image:url(images/list-numeric.png); -} -.markItUp .markItUpButton13 a { - background-image:url(images/list-item.png); -} - -.markItUp .markItUpButton14 a { - background-image:url(images/picture.png); -} -.markItUp .markItUpButton15 a { - background-image:url(images/link.png); -} -.markItUp .markItUpButton16 a { - background-image:url(images/colors.png); -} - -.markItUp .clean a { - background-image:url(images/clean.png); -} -.markItUp .preview a { - background-image:url(images/preview.png); -} - - -.markItUp .palette a { - background-image:url(images/colors.png); -} - .markItUp .palette ul { - width:81px; - padding:1px; - } - .markItUp .palette li { - border:1px solid white; - width:25px; height:25px; - overflow:hidden; - padding:0px; margin:0px; - float:left; - } - .markItUp .palette ul a { - width:25px; height:25px; - } - .markItUp .palette ul a:hover { - background-color:none; - } - - .markItUp .palette .col1-1 a { - background:#FCE94F; - } - .markItUp .palette .col1-2 a { - background:#EDD400; - } - .markItUp .palette .col1-3 a { - background:#C4A000; - } - - .markItUp .palette .col2-1 a { - background:#FCAF3E; - } - .markItUp .palette .col2-2 a { - background:#F57900; - } - .markItUp .palette .col2-3 a { - background:#CE5C00; - } - - .markItUp .palette .col3-1 a { - background:#E9B96E; - } - .markItUp .palette .col3-2 a { - background:#C17D11; - } - .markItUp .palette .col3-3 a { - background:#8F5902; - } - - .markItUp .palette .col4-1 a { - background:#8AE234; - } - .markItUp .palette .col4-2 a { - background:#73D216; - } - .markItUp .palette .col4-3 a { - background:#4E9A06; - } - - .markItUp .palette .col5-1 a { - background:#729FCF; - } - .markItUp .palette .col5-2 a { - background:#3465A4; - } - .markItUp .palette .col5-3 a { - background:#204A87; - } - - .markItUp .palette .col6-1 a { - background:#AD7FA8; - } - .markItUp .palette .col6-2 a { - background:#75507B; - } - .markItUp .palette .col6-3 a { - background:#5C3566; - } - - .markItUp .palette .col7-1 a { - background:#EF2929; - } - .markItUp .palette .col7-2 a { - background:#CC0000; - } - .markItUp .palette .col7-3 a { - background:#A40000; - } - - .markItUp .palette .col8-1 a { - background:#FFFFFF; - } - .markItUp .palette .col8-2 a { - background:#D3D7CF; - } - .markItUp .palette .col8-3 a { - background:#BABDB6; - } - - .markItUp .palette .col9-1 a { - background:#888A85; - } - .markItUp .palette .col9-2 a { - background:#555753; - } - .markItUp .palette .col9-3 a { - background:#000000; - } diff --git a/plugins/markitup/markitup/skins/simple/images/handle.png b/plugins/markitup/markitup/skins/simple/images/handle.png deleted file mode 100644 index cd6f335d44978e35e74a99357f74328fc04a3d40..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 125 zcmeAS@N?(olHy`uVBq!ia0vp^qCm{X!3-p&yHzIwDb4_&5ZC|z|8Ll_|NHmvCnsH6 z2oz*23GxeOaCmkj4aiaQba4#fh)zyONJ(K}GMU7A#z}qV42MfIRNBfo4w$g)E@Ked W!r;!o?W+n ul{ - display:block; -} -.markItUpHeader ul .markItUpDropMenu { - background:transparent url(images/menu.png) no-repeat 115% 50%; - margin-right:5px; -} -.markItUpHeader ul .markItUpDropMenu li { - margin-right:0px; -} -/* next rows of buttons */ -.markItUpHeader ul ul { - display:none; - position:absolute; - top:18px; left:0px; - background:#FFF; - border:1px solid #000; -} -.markItUpHeader ul ul li { - float:none; - border-bottom:1px solid #000; -} -.markItUpHeader ul ul .markItUpDropMenu { - background:#FFF url(images/submenu.png) no-repeat 100% 50%; -} -.markItUpHeader ul .markItUpSeparator { - margin:0 10px; - width:1px; - height:16px; - overflow:hidden; - background-color:#CCC; -} -.markItUpHeader ul ul .markItUpSeparator { - width:auto; height:1px; - margin:0px; -} -/* next rows of buttons */ -.markItUpHeader ul ul ul { - position:absolute; - top:-1px; left:150px; -} -.markItUpHeader ul ul ul li { - float:none; -} -.markItUpHeader ul a { - display:block; - width:16px; height:16px; - text-indent:-10000px; - background-repeat:no-repeat; - padding:3px; - margin:0px; -} -.markItUpHeader ul ul a { - display:block; - padding-left:0px; - text-indent:0; - width:120px; - padding:5px 5px 5px 25px; - background-position:2px 50%; -} -.markItUpHeader ul ul a:hover { - color:#FFF; - background-color:#000; -} diff --git a/plugins/markitup/markitup/templates/preview.css b/plugins/markitup/markitup/templates/preview.css deleted file mode 100644 index ff237e1..0000000 --- a/plugins/markitup/markitup/templates/preview.css +++ /dev/null @@ -1,2 +0,0 @@ -/* preview style examples */ -body { background-color:#fff; font:100% "Helvetica Neue", Helvetica, Arial, sans-serif; } \ No newline at end of file diff --git a/plugins/markitup/markitup/templates/preview.html b/plugins/markitup/markitup/templates/preview.html deleted file mode 100644 index b8b3702..0000000 --- a/plugins/markitup/markitup/templates/preview.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - -markItUp! preview template - - - - - - diff --git a/plugins/sandbox/install/sandbox.install.php b/plugins/sandbox/install/sandbox.install.php deleted file mode 100644 index c1b0047..0000000 --- a/plugins/sandbox/install/sandbox.install.php +++ /dev/null @@ -1,5 +0,0 @@ - - - plugins/sandbox/sandbox.plugin.php - active - 15 - Sandbox - Sandbox plugin for Monstra - 1.0.0 - Awilum - http://monstra.org/ - \ No newline at end of file diff --git a/plugins/sandbox/install/sandbox.uninstall.php b/plugins/sandbox/install/sandbox.uninstall.php deleted file mode 100644 index f7a8083..0000000 --- a/plugins/sandbox/install/sandbox.uninstall.php +++ /dev/null @@ -1,5 +0,0 @@ - array( - 'Sandbox' => 'Sandbox', - 'Sandbox plugin for Monstra' => 'Sandbox plugin pro Monstra', - 'Sandbox template' => 'Sandbox téma', - 'Save' => 'Uložit', - ) - ); diff --git a/plugins/sandbox/languages/de.lang.php b/plugins/sandbox/languages/de.lang.php deleted file mode 100644 index ef1ebdd..0000000 --- a/plugins/sandbox/languages/de.lang.php +++ /dev/null @@ -1,10 +0,0 @@ - array( - 'Sandbox' => 'Sandbox', - 'Sandbox plugin for Monstra' => 'Sandbox Plugin für Monstra', - 'Sandbox template' => 'Sandbox Template', - 'Save' => 'Speichern', - ) - ); diff --git a/plugins/sandbox/languages/en.lang.php b/plugins/sandbox/languages/en.lang.php deleted file mode 100644 index cd11228..0000000 --- a/plugins/sandbox/languages/en.lang.php +++ /dev/null @@ -1,10 +0,0 @@ - array( - 'Sandbox' => 'Sandbox', - 'Sandbox plugin for Monstra' => 'Sandbox plugin for Monstra', - 'Sandbox template' => 'Sandbox template', - 'Save' => 'Save', - ) - ); diff --git a/plugins/sandbox/languages/es.lang.php b/plugins/sandbox/languages/es.lang.php deleted file mode 100644 index 7ead573..0000000 --- a/plugins/sandbox/languages/es.lang.php +++ /dev/null @@ -1,10 +0,0 @@ - array( - 'Sandbox' => 'Sandbox', - 'Sandbox plugin for Monstra' => 'Sandbox plugin for Monstra', - 'Sandbox template' => 'Plantilla sandbox', - 'Save' => 'Guardar', - ) - ); diff --git a/plugins/sandbox/languages/fa.lang.php b/plugins/sandbox/languages/fa.lang.php deleted file mode 100644 index f2dd21c..0000000 --- a/plugins/sandbox/languages/fa.lang.php +++ /dev/null @@ -1,10 +0,0 @@ - array( - 'Sandbox' => 'سندباکس', - 'Sandbox plugin for Monstra' => 'پلاگین سندباکس برای مونسترا', - 'Sandbox template' => 'قالب سندباکس', - 'Save' => 'ذخیره', - ) - ); diff --git a/plugins/sandbox/languages/fr.lang.php b/plugins/sandbox/languages/fr.lang.php deleted file mode 100644 index aec0b0c..0000000 --- a/plugins/sandbox/languages/fr.lang.php +++ /dev/null @@ -1,10 +0,0 @@ - array( - 'Sandbox' => 'Sandbox', - 'Sandbox plugin for Monstra' => 'Plugin Sandbox pour Monstra', - 'Sandbox template' => 'Modèle Sandbox', - 'Save' => 'Enregistrer', - ) - ); \ No newline at end of file diff --git a/plugins/sandbox/languages/id.lang.php b/plugins/sandbox/languages/id.lang.php deleted file mode 100644 index 699cbc2..0000000 --- a/plugins/sandbox/languages/id.lang.php +++ /dev/null @@ -1,10 +0,0 @@ - array( - 'Sandbox' => 'Sandbox', - 'Sandbox plugin for Monstra' => 'Plugin Sandbox untuk Monstra', - 'Sandbox template' => 'Template Sandbox', - 'Save' => 'Simpan', - ) - ); diff --git a/plugins/sandbox/languages/it.lang.php b/plugins/sandbox/languages/it.lang.php deleted file mode 100644 index ff5729a..0000000 --- a/plugins/sandbox/languages/it.lang.php +++ /dev/null @@ -1,10 +0,0 @@ - array( - 'Sandbox' => 'Sandbox', - 'Sandbox plugin for Monstra' => 'Plugin Sandbox per Monstra', - 'Sandbox template' => 'Modello Sandbox', - 'Save' => 'Salva', - ) - ); diff --git a/plugins/sandbox/languages/ka-ge.lang.php b/plugins/sandbox/languages/ka-ge.lang.php deleted file mode 100644 index b839568..0000000 --- a/plugins/sandbox/languages/ka-ge.lang.php +++ /dev/null @@ -1,10 +0,0 @@ - array( - 'Sandbox' => 'Sandbox', - 'Sandbox plugin for Monstra' => 'Sandbox-ის პლáƒáƒ’ინი Monstra-თვის', - 'Sandbox template' => 'Sandbox-ის ნიმუში', - 'Save' => 'შენáƒáƒ®áƒ•áƒ', - ) - ); diff --git a/plugins/sandbox/languages/lt.lang.php b/plugins/sandbox/languages/lt.lang.php deleted file mode 100644 index 817a5a3..0000000 --- a/plugins/sandbox/languages/lt.lang.php +++ /dev/null @@ -1,10 +0,0 @@ - array( - 'Sandbox' => 'Sandbox', - 'Sandbox plugin for Monstra' => 'Sandbox papildinys', - 'Sandbox template' => 'Sandbox Å¡ablonas', - 'Save' => 'IÅ¡saugoti', - ) - ); diff --git a/plugins/sandbox/languages/nl.lang.php b/plugins/sandbox/languages/nl.lang.php deleted file mode 100644 index 134c38a..0000000 --- a/plugins/sandbox/languages/nl.lang.php +++ /dev/null @@ -1,10 +0,0 @@ - array( - 'Sandbox' => 'Sandbox', - 'Sandbox plugin for Monstra' => 'Sandbox Plugin voor Monstra', - 'Sandbox template' => 'Sandbox Template', - 'Save' => 'Opslaan', - ) - ); diff --git a/plugins/sandbox/languages/pl.lang.php b/plugins/sandbox/languages/pl.lang.php deleted file mode 100644 index d194ee5..0000000 --- a/plugins/sandbox/languages/pl.lang.php +++ /dev/null @@ -1,10 +0,0 @@ - array( - 'Sandbox' => 'Sandbox', - 'Sandbox plugin for Monstra' => 'Wtyczka Sandbox dla systemu Monstra', - 'Sandbox template' => 'Szablon Sandbox', - 'Save' => 'Zapisz', - ) - ); diff --git a/plugins/sandbox/languages/pt-br.lang.php b/plugins/sandbox/languages/pt-br.lang.php deleted file mode 100644 index 7cecfa9..0000000 --- a/plugins/sandbox/languages/pt-br.lang.php +++ /dev/null @@ -1,10 +0,0 @@ - array( - 'Sandbox' => 'Caixa de Areia', - 'Sandbox plugin for Monstra' => 'Plugin Caixa de Areia para o Monstra CMS', - 'Sandbox template' => 'Template da caixa de areia', - 'Save' => 'Salvar', - ) - ); diff --git a/plugins/sandbox/languages/ru.lang.php b/plugins/sandbox/languages/ru.lang.php deleted file mode 100644 index cc22cfd..0000000 --- a/plugins/sandbox/languages/ru.lang.php +++ /dev/null @@ -1,10 +0,0 @@ - array( - 'Sandbox' => 'ПеÑочница', - 'Sandbox plugin for Monstra' => 'Плагин пеÑочница Ð´Ð»Ñ Monstra', - 'Sandbox template' => 'Шаблон пеÑочницы', - 'Save' => 'Сохранить', - ) - ); diff --git a/plugins/sandbox/languages/sk.lang.php b/plugins/sandbox/languages/sk.lang.php deleted file mode 100644 index 1dcc9e6..0000000 --- a/plugins/sandbox/languages/sk.lang.php +++ /dev/null @@ -1,10 +0,0 @@ - array( - 'Sandbox' => 'Sandbox', - 'Sandbox plugin for Monstra' => 'Sandbox plugin pre Monstra', - 'Sandbox template' => 'Sandbox téma', - 'Save' => 'UložiÅ¥', - ) - ); diff --git a/plugins/sandbox/languages/sr.lang.php b/plugins/sandbox/languages/sr.lang.php deleted file mode 100644 index 6fd5ff5..0000000 --- a/plugins/sandbox/languages/sr.lang.php +++ /dev/null @@ -1,10 +0,0 @@ - array( - 'Sandbox' => 'Sandbox', - 'Sandbox plugin for Monstra' => 'Sandbox dodatak za Monstra', - 'Sandbox template' => 'Sandbox Å¡ablon', - 'Save' => 'SaÄuvaj', - ) - ); diff --git a/plugins/sandbox/languages/tr.lang.php b/plugins/sandbox/languages/tr.lang.php deleted file mode 100644 index 3c2fc4a..0000000 --- a/plugins/sandbox/languages/tr.lang.php +++ /dev/null @@ -1,10 +0,0 @@ - array( - 'Sandbox' => 'Deneme', - 'Sandbox plugin for Monstra' => 'Monstra için deneme/test eklentisi', - 'Sandbox template' => 'Deneme ÅŸablonu', - 'Save' => 'Kaydet', - ) - ); diff --git a/plugins/sandbox/languages/uk.lang.php b/plugins/sandbox/languages/uk.lang.php deleted file mode 100644 index b368ca9..0000000 --- a/plugins/sandbox/languages/uk.lang.php +++ /dev/null @@ -1,10 +0,0 @@ - array( - 'Sandbox' => 'ПіÑочницÑ', - 'Sandbox plugin for Monstra' => 'Плагін піÑÐ¾Ñ‡Ð½Ð¸Ñ†Ñ Ð´Ð»Ñ Monstra', - 'Sandbox template' => 'Шаблон піÑочниці', - 'Save' => 'Зберегти', - ) - ); diff --git a/plugins/sandbox/languages/zh-cn.lang.php b/plugins/sandbox/languages/zh-cn.lang.php deleted file mode 100644 index 9e4618f..0000000 --- a/plugins/sandbox/languages/zh-cn.lang.php +++ /dev/null @@ -1,10 +0,0 @@ - array( - 'Sandbox' => '沙盒', - 'Sandbox plugin for Monstra' => 'Monstra 沙盒æ’ä»¶', - 'Sandbox template' => '沙盒模æ¿', - 'Save' => 'ä¿å­˜', - ) - ); diff --git a/plugins/sandbox/sandbox.admin.php b/plugins/sandbox/sandbox.admin.php deleted file mode 100644 index 7e06756..0000000 --- a/plugins/sandbox/sandbox.admin.php +++ /dev/null @@ -1,93 +0,0 @@ -display(); - } - - } - - /** - * Form Component Save - */ - public static function formComponentSave() - { - if (Request::post('sandbox_component_save')) { - if (Security::check(Request::post('csrf'))) { - Option::update('sandbox_template', Request::post('sandbox_form_template')); - Request::redirect('index.php?id=themes'); - } - } - } - - /** - * Form Component - */ - public static function formComponent() - { - $_templates = Themes::getTemplates(); - foreach ($_templates as $template) { - $templates[basename($template, '.template.php')] = basename($template, '.template.php'); - } - - echo ( - '
      '. - Form::open(). - Form::hidden('csrf', Security::token()). - Form::label('sandbox_form_template', __('Sandbox template', 'sandbox')). - Form::select('sandbox_form_template', $templates, Option::get('sandbox_template'), array('class' => 'form-control')). - Html::br(). - Form::submit('sandbox_component_save', __('Save', 'sandbox'), array('class' => 'btn btn-default')). - Form::close(). - '
      ' - ); - } - -} diff --git a/plugins/sandbox/sandbox.plugin.php b/plugins/sandbox/sandbox.plugin.php deleted file mode 100644 index 2afa6e8..0000000 --- a/plugins/sandbox/sandbox.plugin.php +++ /dev/null @@ -1,82 +0,0 @@ - input { - position: absolute; - top: 0; - right: 0; - margin: 0; - opacity: 0; - filter: alpha(opacity=0); - transform: translate(-300px, 0) scale(4); - font-size: 23px; - direction: ltr; - cursor: pointer; -} -.fileinput { - margin-bottom: 9px; - display: inline-block; -} -.fileinput .uneditable-input { - display: inline-block; - margin-bottom: 0px; - vertical-align: middle; - cursor: text; -} -.fileinput .thumbnail { - overflow: hidden; - display: inline-block; - margin-bottom: 5px; - vertical-align: middle; - text-align: center; -} -.fileinput .thumbnail > img { - max-height: 100%; -} -.fileinput .btn { - vertical-align: middle; -} -.fileinput-exists .fileinput-new, -.fileinput-new .fileinput-exists { - display: none; -} -.fileinput-inline .fileinput-controls { - display: inline; -} -.fileinput .uneditable-input { - white-space: normal; -} -.fileinput-new .input-group .btn-file { - border-radius: 0 4px 4px 0; -} -.fileinput-new .input-group .btn-file.btn-xs, -.fileinput-new .input-group .btn-file.btn-sm { - border-radius: 0 3px 3px 0; -} -.fileinput-new .input-group .btn-file.btn-lg { - border-radius: 0 6px 6px 0; -} -.form-group.has-warning .fileinput .uneditable-input { - color: #c09853; - border-color: #faebcc; -} -.form-group.has-warning .fileinput .fileinput-preview { - color: #c09853; -} -.form-group.has-warning .fileinput .thumbnail { - border-color: #faebcc; -} -.form-group.has-error .fileinput .uneditable-input { - color: #b94a48; - border-color: #ebccd1; -} -.form-group.has-error .fileinput .fileinput-preview { - color: #b94a48; -} -.form-group.has-error .fileinput .thumbnail { - border-color: #ebccd1; -} -.form-group.has-success .fileinput .uneditable-input { - color: #468847; - border-color: #d6e9c6; -} -.form-group.has-success .fileinput .fileinput-preview { - color: #468847; -} -.form-group.has-success .fileinput .thumbnail { - border-color: #d6e9c6; -} \ No newline at end of file diff --git a/public/assets/css/bootstrap.css b/public/assets/css/bootstrap.css deleted file mode 100644 index 7f36651..0000000 --- a/public/assets/css/bootstrap.css +++ /dev/null @@ -1,5785 +0,0 @@ -/*! - * Bootstrap v3.1.1 (http://getbootstrap.com) - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ - -/*! normalize.css v3.0.0 | MIT License | git.io/normalize */ -html { - font-family: sans-serif; - -webkit-text-size-adjust: 100%; - -ms-text-size-adjust: 100%; -} -body { - margin: 0; -} -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -main, -nav, -section, -summary { - display: block; -} -audio, -canvas, -progress, -video { - display: inline-block; - vertical-align: baseline; -} -audio:not([controls]) { - display: none; - height: 0; -} -[hidden], -template { - display: none; -} -a { - background: transparent; -} -a:active, -a:hover { - outline: 0; -} -abbr[title] { - border-bottom: 1px dotted; -} -b, -strong { - font-weight: bold; -} -dfn { - font-style: italic; -} -h1 { - margin: .67em 0; - font-size: 2em; -} -mark { - color: #000; - background: #ff0; -} -small { - font-size: 80%; -} -sub, -sup { - position: relative; - font-size: 75%; - line-height: 0; - vertical-align: baseline; -} -sup { - top: -.5em; -} -sub { - bottom: -.25em; -} -img { - border: 0; -} -svg:not(:root) { - overflow: hidden; -} -figure { - margin: 1em 40px; -} -hr { - height: 0; - -moz-box-sizing: content-box; - box-sizing: content-box; -} -pre { - overflow: auto; -} -code, -kbd, -pre, -samp { - font-family: monospace, monospace; - font-size: 1em; -} -button, -input, -optgroup, -select, -textarea { - margin: 0; - font: inherit; - color: inherit; -} -button { - overflow: visible; -} -button, -select { - text-transform: none; -} -button, -html input[type="button"], -input[type="reset"], -input[type="submit"] { - -webkit-appearance: button; - cursor: pointer; -} -button[disabled], -html input[disabled] { - cursor: default; -} -button::-moz-focus-inner, -input::-moz-focus-inner { - padding: 0; - border: 0; -} -input { - line-height: normal; -} -input[type="checkbox"], -input[type="radio"] { - box-sizing: border-box; - padding: 0; -} -input[type="number"]::-webkit-inner-spin-button, -input[type="number"]::-webkit-outer-spin-button { - height: auto; -} -input[type="search"] { - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - box-sizing: content-box; - -webkit-appearance: textfield; -} -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} -fieldset { - padding: .35em .625em .75em; - margin: 0 2px; - border: 1px solid #c0c0c0; -} -legend { - padding: 0; - border: 0; -} -textarea { - overflow: auto; -} -optgroup { - font-weight: bold; -} -table { - border-spacing: 0; - border-collapse: collapse; -} -td, -th { - padding: 0; -} -@media print { - * { - color: #000 !important; - text-shadow: none !important; - background: transparent !important; - box-shadow: none !important; - } - a, - a:visited { - text-decoration: underline; - } - a[href]:after { - content: " (" attr(href) ")"; - } - abbr[title]:after { - content: " (" attr(title) ")"; - } - a[href^="javascript:"]:after, - a[href^="#"]:after { - content: ""; - } - pre, - blockquote { - border: 1px solid #999; - - page-break-inside: avoid; - } - thead { - display: table-header-group; - } - tr, - img { - page-break-inside: avoid; - } - img { - max-width: 100% !important; - } - p, - h2, - h3 { - orphans: 3; - widows: 3; - } - h2, - h3 { - page-break-after: avoid; - } - select { - background: #fff !important; - } - .navbar { - display: none; - } - .table td, - .table th { - background-color: #fff !important; - } - .btn > .caret, - .dropup > .btn > .caret { - border-top-color: #000 !important; - } - .label { - border: 1px solid #000; - } - .table { - border-collapse: collapse !important; - } - .table-bordered th, - .table-bordered td { - border: 1px solid #ddd !important; - } -} -* { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -*:before, -*:after { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -html { - font-size: 62.5%; - - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -} -body { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 14px; - line-height: 1.42857143; - color: #333; - background-color: #fff; -} -input, -button, -select, -textarea { - font-family: inherit; - font-size: inherit; - line-height: inherit; -} -a { - color: #428bca; - text-decoration: none; -} -a:hover, -a:focus { - color: #2a6496; - text-decoration: underline; -} -a:focus { - outline: thin dotted; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} -figure { - margin: 0; -} -img { - vertical-align: middle; -} -.img-responsive, -.thumbnail > img, -.thumbnail a > img, -.carousel-inner > .item > img, -.carousel-inner > .item > a > img { - display: block; - max-width: 100%; - height: auto; -} -.img-rounded { - border-radius: 6px; -} -.img-thumbnail { - display: inline-block; - max-width: 100%; - height: auto; - padding: 4px; - line-height: 1.42857143; - background-color: #fff; - border: 1px solid #ddd; - border-radius: 4px; - -webkit-transition: all .2s ease-in-out; - transition: all .2s ease-in-out; -} -.img-circle { - border-radius: 50%; -} -hr { - margin-top: 20px; - margin-bottom: 20px; - border: 0; - border-top: 1px solid #eee; -} -.sr-only { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - margin: -1px; - overflow: hidden; - clip: rect(0, 0, 0, 0); - border: 0; -} -h1, -h2, -h3, -h4, -h5, -h6, -.h1, -.h2, -.h3, -.h4, -.h5, -.h6 { - font-family: inherit; - font-weight: 500; - line-height: 1.1; - color: inherit; -} -h1 small, -h2 small, -h3 small, -h4 small, -h5 small, -h6 small, -.h1 small, -.h2 small, -.h3 small, -.h4 small, -.h5 small, -.h6 small, -h1 .small, -h2 .small, -h3 .small, -h4 .small, -h5 .small, -h6 .small, -.h1 .small, -.h2 .small, -.h3 .small, -.h4 .small, -.h5 .small, -.h6 .small { - font-weight: normal; - line-height: 1; - color: #999; -} -h1, -.h1, -h2, -.h2, -h3, -.h3 { - margin-top: 20px; - margin-bottom: 10px; -} -h1 small, -.h1 small, -h2 small, -.h2 small, -h3 small, -.h3 small, -h1 .small, -.h1 .small, -h2 .small, -.h2 .small, -h3 .small, -.h3 .small { - font-size: 65%; -} -h4, -.h4, -h5, -.h5, -h6, -.h6 { - margin-top: 10px; - margin-bottom: 10px; -} -h4 small, -.h4 small, -h5 small, -.h5 small, -h6 small, -.h6 small, -h4 .small, -.h4 .small, -h5 .small, -.h5 .small, -h6 .small, -.h6 .small { - font-size: 75%; -} -h1, -.h1 { - font-size: 36px; -} -h2, -.h2 { - font-size: 30px; -} -h3, -.h3 { - font-size: 24px; -} -h4, -.h4 { - font-size: 18px; -} -h5, -.h5 { - font-size: 14px; -} -h6, -.h6 { - font-size: 12px; -} -p { - margin: 0 0 10px; -} -.lead { - margin-bottom: 20px; - font-size: 16px; - font-weight: 200; - line-height: 1.4; -} -@media (min-width: 768px) { - .lead { - font-size: 21px; - } -} -small, -.small { - font-size: 85%; -} -cite { - font-style: normal; -} -.text-left { - text-align: left; -} -.text-right { - text-align: right; -} -.text-center { - text-align: center; -} -.text-justify { - text-align: justify; -} -.text-muted { - color: #999; -} -.text-primary { - color: #428bca; -} -a.text-primary:hover { - color: #3071a9; -} -.text-success { - color: #3c763d; -} -a.text-success:hover { - color: #2b542c; -} -.text-info { - color: #31708f; -} -a.text-info:hover { - color: #245269; -} -.text-warning { - color: #8a6d3b; -} -a.text-warning:hover { - color: #66512c; -} -.text-danger { - color: #a94442; -} -a.text-danger:hover { - color: #843534; -} -.bg-primary { - color: #fff; - background-color: #428bca; -} -a.bg-primary:hover { - background-color: #3071a9; -} -.bg-success { - background-color: #dff0d8; -} -a.bg-success:hover { - background-color: #c1e2b3; -} -.bg-info { - background-color: #d9edf7; -} -a.bg-info:hover { - background-color: #afd9ee; -} -.bg-warning { - background-color: #fcf8e3; -} -a.bg-warning:hover { - background-color: #f7ecb5; -} -.bg-danger { - background-color: #f2dede; -} -a.bg-danger:hover { - background-color: #e4b9b9; -} -.page-header { - padding-bottom: 9px; - margin: 40px 0 20px; - border-bottom: 1px solid #eee; -} -ul, -ol { - margin-top: 0; - margin-bottom: 10px; -} -ul ul, -ol ul, -ul ol, -ol ol { - margin-bottom: 0; -} -.list-unstyled { - padding-left: 0; - list-style: none; -} -.list-inline { - padding-left: 0; - margin-left: -5px; - list-style: none; -} -.list-inline > li { - display: inline-block; - padding-right: 5px; - padding-left: 5px; -} -dl { - margin-top: 0; - margin-bottom: 20px; -} -dt, -dd { - line-height: 1.42857143; -} -dt { - font-weight: bold; -} -dd { - margin-left: 0; -} -@media (min-width: 768px) { - .dl-horizontal dt { - float: left; - width: 160px; - overflow: hidden; - clear: left; - text-align: right; - text-overflow: ellipsis; - white-space: nowrap; - } - .dl-horizontal dd { - margin-left: 180px; - } -} -abbr[title], -abbr[data-original-title] { - cursor: help; - border-bottom: 1px dotted #999; -} -.initialism { - font-size: 90%; - text-transform: uppercase; -} -blockquote { - padding: 10px 20px; - margin: 0 0 20px; - font-size: 17.5px; - border-left: 5px solid #eee; -} -blockquote p:last-child, -blockquote ul:last-child, -blockquote ol:last-child { - margin-bottom: 0; -} -blockquote footer, -blockquote small, -blockquote .small { - display: block; - font-size: 80%; - line-height: 1.42857143; - color: #999; -} -blockquote footer:before, -blockquote small:before, -blockquote .small:before { - content: '\2014 \00A0'; -} -.blockquote-reverse, -blockquote.pull-right { - padding-right: 15px; - padding-left: 0; - text-align: right; - border-right: 5px solid #eee; - border-left: 0; -} -.blockquote-reverse footer:before, -blockquote.pull-right footer:before, -.blockquote-reverse small:before, -blockquote.pull-right small:before, -.blockquote-reverse .small:before, -blockquote.pull-right .small:before { - content: ''; -} -.blockquote-reverse footer:after, -blockquote.pull-right footer:after, -.blockquote-reverse small:after, -blockquote.pull-right small:after, -.blockquote-reverse .small:after, -blockquote.pull-right .small:after { - content: '\00A0 \2014'; -} -blockquote:before, -blockquote:after { - content: ""; -} -address { - margin-bottom: 20px; - font-style: normal; - line-height: 1.42857143; -} -code, -kbd, -pre, -samp { - font-family: Menlo, Monaco, Consolas, "Courier New", monospace; -} -code { - padding: 2px 4px; - font-size: 90%; - color: #c7254e; - white-space: nowrap; - background-color: #f9f2f4; - border-radius: 4px; -} -kbd { - padding: 2px 4px; - font-size: 90%; - color: #fff; - background-color: #333; - border-radius: 3px; - box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); -} -pre { - display: block; - padding: 9.5px; - margin: 0 0 10px; - font-size: 13px; - line-height: 1.42857143; - color: #333; - word-break: break-all; - word-wrap: break-word; - background-color: #f5f5f5; - border: 1px solid #ccc; - border-radius: 4px; -} -pre code { - padding: 0; - font-size: inherit; - color: inherit; - white-space: pre-wrap; - background-color: transparent; - border-radius: 0; -} -.pre-scrollable { - max-height: 340px; - overflow-y: scroll; -} -.container { - padding-right: 15px; - padding-left: 15px; - margin-right: auto; - margin-left: auto; -} -@media (min-width: 768px) { - .container { - width: 750px; - } -} -@media (min-width: 992px) { - .container { - width: 970px; - } -} -@media (min-width: 1200px) { - .container { - width: 1170px; - } -} -.container-fluid { - padding-right: 15px; - padding-left: 15px; - margin-right: auto; - margin-left: auto; -} -.row { - margin-right: -15px; - margin-left: -15px; -} -.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 { - position: relative; - min-height: 1px; - padding-right: 15px; - padding-left: 15px; -} -.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 { - float: left; -} -.col-xs-12 { - width: 100%; -} -.col-xs-11 { - width: 91.66666667%; -} -.col-xs-10 { - width: 83.33333333%; -} -.col-xs-9 { - width: 75%; -} -.col-xs-8 { - width: 66.66666667%; -} -.col-xs-7 { - width: 58.33333333%; -} -.col-xs-6 { - width: 50%; -} -.col-xs-5 { - width: 41.66666667%; -} -.col-xs-4 { - width: 33.33333333%; -} -.col-xs-3 { - width: 25%; -} -.col-xs-2 { - width: 16.66666667%; -} -.col-xs-1 { - width: 8.33333333%; -} -.col-xs-pull-12 { - right: 100%; -} -.col-xs-pull-11 { - right: 91.66666667%; -} -.col-xs-pull-10 { - right: 83.33333333%; -} -.col-xs-pull-9 { - right: 75%; -} -.col-xs-pull-8 { - right: 66.66666667%; -} -.col-xs-pull-7 { - right: 58.33333333%; -} -.col-xs-pull-6 { - right: 50%; -} -.col-xs-pull-5 { - right: 41.66666667%; -} -.col-xs-pull-4 { - right: 33.33333333%; -} -.col-xs-pull-3 { - right: 25%; -} -.col-xs-pull-2 { - right: 16.66666667%; -} -.col-xs-pull-1 { - right: 8.33333333%; -} -.col-xs-pull-0 { - right: 0; -} -.col-xs-push-12 { - left: 100%; -} -.col-xs-push-11 { - left: 91.66666667%; -} -.col-xs-push-10 { - left: 83.33333333%; -} -.col-xs-push-9 { - left: 75%; -} -.col-xs-push-8 { - left: 66.66666667%; -} -.col-xs-push-7 { - left: 58.33333333%; -} -.col-xs-push-6 { - left: 50%; -} -.col-xs-push-5 { - left: 41.66666667%; -} -.col-xs-push-4 { - left: 33.33333333%; -} -.col-xs-push-3 { - left: 25%; -} -.col-xs-push-2 { - left: 16.66666667%; -} -.col-xs-push-1 { - left: 8.33333333%; -} -.col-xs-push-0 { - left: 0; -} -.col-xs-offset-12 { - margin-left: 100%; -} -.col-xs-offset-11 { - margin-left: 91.66666667%; -} -.col-xs-offset-10 { - margin-left: 83.33333333%; -} -.col-xs-offset-9 { - margin-left: 75%; -} -.col-xs-offset-8 { - margin-left: 66.66666667%; -} -.col-xs-offset-7 { - margin-left: 58.33333333%; -} -.col-xs-offset-6 { - margin-left: 50%; -} -.col-xs-offset-5 { - margin-left: 41.66666667%; -} -.col-xs-offset-4 { - margin-left: 33.33333333%; -} -.col-xs-offset-3 { - margin-left: 25%; -} -.col-xs-offset-2 { - margin-left: 16.66666667%; -} -.col-xs-offset-1 { - margin-left: 8.33333333%; -} -.col-xs-offset-0 { - margin-left: 0; -} -@media (min-width: 768px) { - .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 { - float: left; - } - .col-sm-12 { - width: 100%; - } - .col-sm-11 { - width: 91.66666667%; - } - .col-sm-10 { - width: 83.33333333%; - } - .col-sm-9 { - width: 75%; - } - .col-sm-8 { - width: 66.66666667%; - } - .col-sm-7 { - width: 58.33333333%; - } - .col-sm-6 { - width: 50%; - } - .col-sm-5 { - width: 41.66666667%; - } - .col-sm-4 { - width: 33.33333333%; - } - .col-sm-3 { - width: 25%; - } - .col-sm-2 { - width: 16.66666667%; - } - .col-sm-1 { - width: 8.33333333%; - } - .col-sm-pull-12 { - right: 100%; - } - .col-sm-pull-11 { - right: 91.66666667%; - } - .col-sm-pull-10 { - right: 83.33333333%; - } - .col-sm-pull-9 { - right: 75%; - } - .col-sm-pull-8 { - right: 66.66666667%; - } - .col-sm-pull-7 { - right: 58.33333333%; - } - .col-sm-pull-6 { - right: 50%; - } - .col-sm-pull-5 { - right: 41.66666667%; - } - .col-sm-pull-4 { - right: 33.33333333%; - } - .col-sm-pull-3 { - right: 25%; - } - .col-sm-pull-2 { - right: 16.66666667%; - } - .col-sm-pull-1 { - right: 8.33333333%; - } - .col-sm-pull-0 { - right: 0; - } - .col-sm-push-12 { - left: 100%; - } - .col-sm-push-11 { - left: 91.66666667%; - } - .col-sm-push-10 { - left: 83.33333333%; - } - .col-sm-push-9 { - left: 75%; - } - .col-sm-push-8 { - left: 66.66666667%; - } - .col-sm-push-7 { - left: 58.33333333%; - } - .col-sm-push-6 { - left: 50%; - } - .col-sm-push-5 { - left: 41.66666667%; - } - .col-sm-push-4 { - left: 33.33333333%; - } - .col-sm-push-3 { - left: 25%; - } - .col-sm-push-2 { - left: 16.66666667%; - } - .col-sm-push-1 { - left: 8.33333333%; - } - .col-sm-push-0 { - left: 0; - } - .col-sm-offset-12 { - margin-left: 100%; - } - .col-sm-offset-11 { - margin-left: 91.66666667%; - } - .col-sm-offset-10 { - margin-left: 83.33333333%; - } - .col-sm-offset-9 { - margin-left: 75%; - } - .col-sm-offset-8 { - margin-left: 66.66666667%; - } - .col-sm-offset-7 { - margin-left: 58.33333333%; - } - .col-sm-offset-6 { - margin-left: 50%; - } - .col-sm-offset-5 { - margin-left: 41.66666667%; - } - .col-sm-offset-4 { - margin-left: 33.33333333%; - } - .col-sm-offset-3 { - margin-left: 25%; - } - .col-sm-offset-2 { - margin-left: 16.66666667%; - } - .col-sm-offset-1 { - margin-left: 8.33333333%; - } - .col-sm-offset-0 { - margin-left: 0; - } -} -@media (min-width: 992px) { - .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 { - float: left; - } - .col-md-12 { - width: 100%; - } - .col-md-11 { - width: 91.66666667%; - } - .col-md-10 { - width: 83.33333333%; - } - .col-md-9 { - width: 75%; - } - .col-md-8 { - width: 66.66666667%; - } - .col-md-7 { - width: 58.33333333%; - } - .col-md-6 { - width: 50%; - } - .col-md-5 { - width: 41.66666667%; - } - .col-md-4 { - width: 33.33333333%; - } - .col-md-3 { - width: 25%; - } - .col-md-2 { - width: 16.66666667%; - } - .col-md-1 { - width: 8.33333333%; - } - .col-md-pull-12 { - right: 100%; - } - .col-md-pull-11 { - right: 91.66666667%; - } - .col-md-pull-10 { - right: 83.33333333%; - } - .col-md-pull-9 { - right: 75%; - } - .col-md-pull-8 { - right: 66.66666667%; - } - .col-md-pull-7 { - right: 58.33333333%; - } - .col-md-pull-6 { - right: 50%; - } - .col-md-pull-5 { - right: 41.66666667%; - } - .col-md-pull-4 { - right: 33.33333333%; - } - .col-md-pull-3 { - right: 25%; - } - .col-md-pull-2 { - right: 16.66666667%; - } - .col-md-pull-1 { - right: 8.33333333%; - } - .col-md-pull-0 { - right: 0; - } - .col-md-push-12 { - left: 100%; - } - .col-md-push-11 { - left: 91.66666667%; - } - .col-md-push-10 { - left: 83.33333333%; - } - .col-md-push-9 { - left: 75%; - } - .col-md-push-8 { - left: 66.66666667%; - } - .col-md-push-7 { - left: 58.33333333%; - } - .col-md-push-6 { - left: 50%; - } - .col-md-push-5 { - left: 41.66666667%; - } - .col-md-push-4 { - left: 33.33333333%; - } - .col-md-push-3 { - left: 25%; - } - .col-md-push-2 { - left: 16.66666667%; - } - .col-md-push-1 { - left: 8.33333333%; - } - .col-md-push-0 { - left: 0; - } - .col-md-offset-12 { - margin-left: 100%; - } - .col-md-offset-11 { - margin-left: 91.66666667%; - } - .col-md-offset-10 { - margin-left: 83.33333333%; - } - .col-md-offset-9 { - margin-left: 75%; - } - .col-md-offset-8 { - margin-left: 66.66666667%; - } - .col-md-offset-7 { - margin-left: 58.33333333%; - } - .col-md-offset-6 { - margin-left: 50%; - } - .col-md-offset-5 { - margin-left: 41.66666667%; - } - .col-md-offset-4 { - margin-left: 33.33333333%; - } - .col-md-offset-3 { - margin-left: 25%; - } - .col-md-offset-2 { - margin-left: 16.66666667%; - } - .col-md-offset-1 { - margin-left: 8.33333333%; - } - .col-md-offset-0 { - margin-left: 0; - } -} -@media (min-width: 1200px) { - .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 { - float: left; - } - .col-lg-12 { - width: 100%; - } - .col-lg-11 { - width: 91.66666667%; - } - .col-lg-10 { - width: 83.33333333%; - } - .col-lg-9 { - width: 75%; - } - .col-lg-8 { - width: 66.66666667%; - } - .col-lg-7 { - width: 58.33333333%; - } - .col-lg-6 { - width: 50%; - } - .col-lg-5 { - width: 41.66666667%; - } - .col-lg-4 { - width: 33.33333333%; - } - .col-lg-3 { - width: 25%; - } - .col-lg-2 { - width: 16.66666667%; - } - .col-lg-1 { - width: 8.33333333%; - } - .col-lg-pull-12 { - right: 100%; - } - .col-lg-pull-11 { - right: 91.66666667%; - } - .col-lg-pull-10 { - right: 83.33333333%; - } - .col-lg-pull-9 { - right: 75%; - } - .col-lg-pull-8 { - right: 66.66666667%; - } - .col-lg-pull-7 { - right: 58.33333333%; - } - .col-lg-pull-6 { - right: 50%; - } - .col-lg-pull-5 { - right: 41.66666667%; - } - .col-lg-pull-4 { - right: 33.33333333%; - } - .col-lg-pull-3 { - right: 25%; - } - .col-lg-pull-2 { - right: 16.66666667%; - } - .col-lg-pull-1 { - right: 8.33333333%; - } - .col-lg-pull-0 { - right: 0; - } - .col-lg-push-12 { - left: 100%; - } - .col-lg-push-11 { - left: 91.66666667%; - } - .col-lg-push-10 { - left: 83.33333333%; - } - .col-lg-push-9 { - left: 75%; - } - .col-lg-push-8 { - left: 66.66666667%; - } - .col-lg-push-7 { - left: 58.33333333%; - } - .col-lg-push-6 { - left: 50%; - } - .col-lg-push-5 { - left: 41.66666667%; - } - .col-lg-push-4 { - left: 33.33333333%; - } - .col-lg-push-3 { - left: 25%; - } - .col-lg-push-2 { - left: 16.66666667%; - } - .col-lg-push-1 { - left: 8.33333333%; - } - .col-lg-push-0 { - left: 0; - } - .col-lg-offset-12 { - margin-left: 100%; - } - .col-lg-offset-11 { - margin-left: 91.66666667%; - } - .col-lg-offset-10 { - margin-left: 83.33333333%; - } - .col-lg-offset-9 { - margin-left: 75%; - } - .col-lg-offset-8 { - margin-left: 66.66666667%; - } - .col-lg-offset-7 { - margin-left: 58.33333333%; - } - .col-lg-offset-6 { - margin-left: 50%; - } - .col-lg-offset-5 { - margin-left: 41.66666667%; - } - .col-lg-offset-4 { - margin-left: 33.33333333%; - } - .col-lg-offset-3 { - margin-left: 25%; - } - .col-lg-offset-2 { - margin-left: 16.66666667%; - } - .col-lg-offset-1 { - margin-left: 8.33333333%; - } - .col-lg-offset-0 { - margin-left: 0; - } -} -table { - max-width: 100%; - background-color: transparent; -} -th { - text-align: left; -} -.table { - width: 100%; - margin-bottom: 20px; -} -.table > thead > tr > th, -.table > tbody > tr > th, -.table > tfoot > tr > th, -.table > thead > tr > td, -.table > tbody > tr > td, -.table > tfoot > tr > td { - padding: 8px; - line-height: 1.42857143; - vertical-align: top; - border-top: 1px solid #ddd; -} -.table > thead > tr > th { - vertical-align: bottom; - border-bottom: 2px solid #ddd; -} -.table > caption + thead > tr:first-child > th, -.table > colgroup + thead > tr:first-child > th, -.table > thead:first-child > tr:first-child > th, -.table > caption + thead > tr:first-child > td, -.table > colgroup + thead > tr:first-child > td, -.table > thead:first-child > tr:first-child > td { - border-top: 0; -} -.table > tbody + tbody { - border-top: 2px solid #ddd; -} -.table .table { - background-color: #fff; -} -.table-condensed > thead > tr > th, -.table-condensed > tbody > tr > th, -.table-condensed > tfoot > tr > th, -.table-condensed > thead > tr > td, -.table-condensed > tbody > tr > td, -.table-condensed > tfoot > tr > td { - padding: 5px; -} -.table-bordered { - border: 1px solid #ddd; -} -.table-bordered > thead > tr > th, -.table-bordered > tbody > tr > th, -.table-bordered > tfoot > tr > th, -.table-bordered > thead > tr > td, -.table-bordered > tbody > tr > td, -.table-bordered > tfoot > tr > td { - border: 1px solid #ddd; -} -.table-bordered > thead > tr > th, -.table-bordered > thead > tr > td { - border-bottom-width: 2px; -} -.table-striped > tbody > tr:nth-child(odd) > td, -.table-striped > tbody > tr:nth-child(odd) > th { - background-color: #f9f9f9; -} -.table-hover > tbody > tr:hover > td, -.table-hover > tbody > tr:hover > th { - background-color: #f5f5f5; -} -table col[class*="col-"] { - position: static; - display: table-column; - float: none; -} -table td[class*="col-"], -table th[class*="col-"] { - position: static; - display: table-cell; - float: none; -} -.table > thead > tr > td.active, -.table > tbody > tr > td.active, -.table > tfoot > tr > td.active, -.table > thead > tr > th.active, -.table > tbody > tr > th.active, -.table > tfoot > tr > th.active, -.table > thead > tr.active > td, -.table > tbody > tr.active > td, -.table > tfoot > tr.active > td, -.table > thead > tr.active > th, -.table > tbody > tr.active > th, -.table > tfoot > tr.active > th { - background-color: #f5f5f5; -} -.table-hover > tbody > tr > td.active:hover, -.table-hover > tbody > tr > th.active:hover, -.table-hover > tbody > tr.active:hover > td, -.table-hover > tbody > tr.active:hover > th { - background-color: #e8e8e8; -} -.table > thead > tr > td.success, -.table > tbody > tr > td.success, -.table > tfoot > tr > td.success, -.table > thead > tr > th.success, -.table > tbody > tr > th.success, -.table > tfoot > tr > th.success, -.table > thead > tr.success > td, -.table > tbody > tr.success > td, -.table > tfoot > tr.success > td, -.table > thead > tr.success > th, -.table > tbody > tr.success > th, -.table > tfoot > tr.success > th { - background-color: #dff0d8; -} -.table-hover > tbody > tr > td.success:hover, -.table-hover > tbody > tr > th.success:hover, -.table-hover > tbody > tr.success:hover > td, -.table-hover > tbody > tr.success:hover > th { - background-color: #d0e9c6; -} -.table > thead > tr > td.info, -.table > tbody > tr > td.info, -.table > tfoot > tr > td.info, -.table > thead > tr > th.info, -.table > tbody > tr > th.info, -.table > tfoot > tr > th.info, -.table > thead > tr.info > td, -.table > tbody > tr.info > td, -.table > tfoot > tr.info > td, -.table > thead > tr.info > th, -.table > tbody > tr.info > th, -.table > tfoot > tr.info > th { - background-color: #d9edf7; -} -.table-hover > tbody > tr > td.info:hover, -.table-hover > tbody > tr > th.info:hover, -.table-hover > tbody > tr.info:hover > td, -.table-hover > tbody > tr.info:hover > th { - background-color: #c4e3f3; -} -.table > thead > tr > td.warning, -.table > tbody > tr > td.warning, -.table > tfoot > tr > td.warning, -.table > thead > tr > th.warning, -.table > tbody > tr > th.warning, -.table > tfoot > tr > th.warning, -.table > thead > tr.warning > td, -.table > tbody > tr.warning > td, -.table > tfoot > tr.warning > td, -.table > thead > tr.warning > th, -.table > tbody > tr.warning > th, -.table > tfoot > tr.warning > th { - background-color: #fcf8e3; -} -.table-hover > tbody > tr > td.warning:hover, -.table-hover > tbody > tr > th.warning:hover, -.table-hover > tbody > tr.warning:hover > td, -.table-hover > tbody > tr.warning:hover > th { - background-color: #faf2cc; -} -.table > thead > tr > td.danger, -.table > tbody > tr > td.danger, -.table > tfoot > tr > td.danger, -.table > thead > tr > th.danger, -.table > tbody > tr > th.danger, -.table > tfoot > tr > th.danger, -.table > thead > tr.danger > td, -.table > tbody > tr.danger > td, -.table > tfoot > tr.danger > td, -.table > thead > tr.danger > th, -.table > tbody > tr.danger > th, -.table > tfoot > tr.danger > th { - background-color: #f2dede; -} -.table-hover > tbody > tr > td.danger:hover, -.table-hover > tbody > tr > th.danger:hover, -.table-hover > tbody > tr.danger:hover > td, -.table-hover > tbody > tr.danger:hover > th { - background-color: #ebcccc; -} -@media (max-width: 767px) { - .table-responsive { - width: 100%; - margin-bottom: 15px; - overflow-x: scroll; - overflow-y: hidden; - -webkit-overflow-scrolling: touch; - -ms-overflow-style: -ms-autohiding-scrollbar; - border: 1px solid #ddd; - } - .table-responsive > .table { - margin-bottom: 0; - } - .table-responsive > .table > thead > tr > th, - .table-responsive > .table > tbody > tr > th, - .table-responsive > .table > tfoot > tr > th, - .table-responsive > .table > thead > tr > td, - .table-responsive > .table > tbody > tr > td, - .table-responsive > .table > tfoot > tr > td { - white-space: nowrap; - } - .table-responsive > .table-bordered { - border: 0; - } - .table-responsive > .table-bordered > thead > tr > th:first-child, - .table-responsive > .table-bordered > tbody > tr > th:first-child, - .table-responsive > .table-bordered > tfoot > tr > th:first-child, - .table-responsive > .table-bordered > thead > tr > td:first-child, - .table-responsive > .table-bordered > tbody > tr > td:first-child, - .table-responsive > .table-bordered > tfoot > tr > td:first-child { - border-left: 0; - } - .table-responsive > .table-bordered > thead > tr > th:last-child, - .table-responsive > .table-bordered > tbody > tr > th:last-child, - .table-responsive > .table-bordered > tfoot > tr > th:last-child, - .table-responsive > .table-bordered > thead > tr > td:last-child, - .table-responsive > .table-bordered > tbody > tr > td:last-child, - .table-responsive > .table-bordered > tfoot > tr > td:last-child { - border-right: 0; - } - .table-responsive > .table-bordered > tbody > tr:last-child > th, - .table-responsive > .table-bordered > tfoot > tr:last-child > th, - .table-responsive > .table-bordered > tbody > tr:last-child > td, - .table-responsive > .table-bordered > tfoot > tr:last-child > td { - border-bottom: 0; - } -} -fieldset { - min-width: 0; - padding: 0; - margin: 0; - border: 0; -} -legend { - display: block; - width: 100%; - padding: 0; - margin-bottom: 20px; - font-size: 21px; - line-height: inherit; - color: #333; - border: 0; - border-bottom: 1px solid #e5e5e5; -} -label { - display: inline-block; - margin-bottom: 5px; - font-weight: bold; -} -input[type="search"] { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -input[type="radio"], -input[type="checkbox"] { - margin: 4px 0 0; - margin-top: 1px \9; - /* IE8-9 */ - line-height: normal; -} -input[type="file"] { - display: block; -} -input[type="range"] { - display: block; - width: 100%; -} -select[multiple], -select[size] { - height: auto; -} -input[type="file"]:focus, -input[type="radio"]:focus, -input[type="checkbox"]:focus { - outline: thin dotted; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} -output { - display: block; - padding-top: 7px; - font-size: 14px; - line-height: 1.42857143; - color: #555; -} -.form-control { - display: block; - width: 100%; - height: 34px; - padding: 6px 12px; - font-size: 14px; - line-height: 1.42857143; - color: #555; - background-color: #fff; - background-image: none; - border: 1px solid #ccc; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); - -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; - transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; -} -.form-control:focus { - border-color: #66afe9; - outline: 0; - -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6); - box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6); -} -.form-control::-moz-placeholder { - color: #999; - opacity: 1; -} -.form-control:-ms-input-placeholder { - color: #999; -} -.form-control::-webkit-input-placeholder { - color: #999; -} -.form-control[disabled], -.form-control[readonly], -fieldset[disabled] .form-control { - cursor: not-allowed; - background-color: #eee; - opacity: 1; -} -textarea.form-control { - height: auto; -} -input[type="search"] { - -webkit-appearance: none; -} -input[type="date"] { - line-height: 34px; -} -.form-group { - margin-bottom: 15px; -} -.radio, -.checkbox { - display: block; - min-height: 20px; - padding-left: 20px; - margin-top: 10px; - margin-bottom: 10px; -} -.radio label, -.checkbox label { - display: inline; - font-weight: normal; - cursor: pointer; -} -.radio input[type="radio"], -.radio-inline input[type="radio"], -.checkbox input[type="checkbox"], -.checkbox-inline input[type="checkbox"] { - float: left; - margin-left: -20px; -} -.radio + .radio, -.checkbox + .checkbox { - margin-top: -5px; -} -.radio-inline, -.checkbox-inline { - display: inline-block; - padding-left: 20px; - margin-bottom: 0; - font-weight: normal; - vertical-align: middle; - cursor: pointer; -} -.radio-inline + .radio-inline, -.checkbox-inline + .checkbox-inline { - margin-top: 0; - margin-left: 10px; -} -input[type="radio"][disabled], -input[type="checkbox"][disabled], -.radio[disabled], -.radio-inline[disabled], -.checkbox[disabled], -.checkbox-inline[disabled], -fieldset[disabled] input[type="radio"], -fieldset[disabled] input[type="checkbox"], -fieldset[disabled] .radio, -fieldset[disabled] .radio-inline, -fieldset[disabled] .checkbox, -fieldset[disabled] .checkbox-inline { - cursor: not-allowed; -} -.input-sm { - height: 30px; - padding: 5px 10px; - font-size: 12px; - line-height: 1.5; - border-radius: 3px; -} -select.input-sm { - height: 30px; - line-height: 30px; -} -textarea.input-sm, -select[multiple].input-sm { - height: auto; -} -.input-lg { - height: 46px; - padding: 10px 16px; - font-size: 18px; - line-height: 1.33; - border-radius: 6px; -} -select.input-lg { - height: 46px; - line-height: 46px; -} -textarea.input-lg, -select[multiple].input-lg { - height: auto; -} -.has-feedback { - position: relative; -} -.has-feedback .form-control { - padding-right: 42.5px; -} -.has-feedback .form-control-feedback { - position: absolute; - top: 25px; - right: 0; - display: block; - width: 34px; - height: 34px; - line-height: 34px; - text-align: center; -} -.has-success .help-block, -.has-success .control-label, -.has-success .radio, -.has-success .checkbox, -.has-success .radio-inline, -.has-success .checkbox-inline { - color: #3c763d; -} -.has-success .form-control { - border-color: #3c763d; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); -} -.has-success .form-control:focus { - border-color: #2b542c; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168; -} -.has-success .input-group-addon { - color: #3c763d; - background-color: #dff0d8; - border-color: #3c763d; -} -.has-success .form-control-feedback { - color: #3c763d; -} -.has-warning .help-block, -.has-warning .control-label, -.has-warning .radio, -.has-warning .checkbox, -.has-warning .radio-inline, -.has-warning .checkbox-inline { - color: #8a6d3b; -} -.has-warning .form-control { - border-color: #8a6d3b; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); -} -.has-warning .form-control:focus { - border-color: #66512c; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b; -} -.has-warning .input-group-addon { - color: #8a6d3b; - background-color: #fcf8e3; - border-color: #8a6d3b; -} -.has-warning .form-control-feedback { - color: #8a6d3b; -} -.has-error .help-block, -.has-error .control-label, -.has-error .radio, -.has-error .checkbox, -.has-error .radio-inline, -.has-error .checkbox-inline { - color: #a94442; -} -.has-error .form-control { - border-color: #a94442; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); -} -.has-error .form-control:focus { - border-color: #843534; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483; -} -.has-error .input-group-addon { - color: #a94442; - background-color: #f2dede; - border-color: #a94442; -} -.has-error .form-control-feedback { - color: #a94442; -} -.form-control-static { - margin-bottom: 0; -} -.help-block { - display: block; - margin-top: 5px; - margin-bottom: 10px; - color: #737373; -} -@media (min-width: 768px) { - .form-inline .form-group { - display: inline-block; - margin-bottom: 0; - vertical-align: middle; - } - .form-inline .form-control { - display: inline-block; - width: auto; - vertical-align: middle; - } - .form-inline .input-group > .form-control { - width: 100%; - } - .form-inline .control-label { - margin-bottom: 0; - vertical-align: middle; - } - .form-inline .radio, - .form-inline .checkbox { - display: inline-block; - padding-left: 0; - margin-top: 0; - margin-bottom: 0; - vertical-align: middle; - } - .form-inline .radio input[type="radio"], - .form-inline .checkbox input[type="checkbox"] { - float: none; - margin-left: 0; - } - .form-inline .has-feedback .form-control-feedback { - top: 0; - } -} -.form-horizontal .control-label, -.form-horizontal .radio, -.form-horizontal .checkbox, -.form-horizontal .radio-inline, -.form-horizontal .checkbox-inline { - padding-top: 7px; - margin-top: 0; - margin-bottom: 0; -} -.form-horizontal .radio, -.form-horizontal .checkbox { - min-height: 27px; -} -.form-horizontal .form-group { - margin-right: -15px; - margin-left: -15px; -} -.form-horizontal .form-control-static { - padding-top: 7px; -} -@media (min-width: 768px) { - .form-horizontal .control-label { - text-align: right; - } -} -.form-horizontal .has-feedback .form-control-feedback { - top: 0; - right: 15px; -} -.btn { - display: inline-block; - padding: 6px 12px; - margin-bottom: 0; - font-size: 14px; - font-weight: normal; - line-height: 1.42857143; - text-align: center; - white-space: nowrap; - vertical-align: middle; - cursor: pointer; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - background-image: none; - border: 1px solid transparent; - border-radius: 4px; -} -.btn:focus, -.btn:active:focus, -.btn.active:focus { - outline: thin dotted; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} -.btn:hover, -.btn:focus { - color: #333; - text-decoration: none; -} -.btn:active, -.btn.active { - background-image: none; - outline: 0; - -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); - box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); -} -.btn.disabled, -.btn[disabled], -fieldset[disabled] .btn { - pointer-events: none; - cursor: not-allowed; - filter: alpha(opacity=65); - -webkit-box-shadow: none; - box-shadow: none; - opacity: .65; -} -.btn-default { - color: #333; - background-color: #fff; - border-color: #ccc; -} -.btn-default:hover, -.btn-default:focus, -.btn-default:active, -.btn-default.active, -.open .dropdown-toggle.btn-default { - color: #333; - background-color: #ebebeb; - border-color: #adadad; -} -.btn-default:active, -.btn-default.active, -.open .dropdown-toggle.btn-default { - background-image: none; -} -.btn-default.disabled, -.btn-default[disabled], -fieldset[disabled] .btn-default, -.btn-default.disabled:hover, -.btn-default[disabled]:hover, -fieldset[disabled] .btn-default:hover, -.btn-default.disabled:focus, -.btn-default[disabled]:focus, -fieldset[disabled] .btn-default:focus, -.btn-default.disabled:active, -.btn-default[disabled]:active, -fieldset[disabled] .btn-default:active, -.btn-default.disabled.active, -.btn-default[disabled].active, -fieldset[disabled] .btn-default.active { - background-color: #fff; - border-color: #ccc; -} -.btn-default .badge { - color: #fff; - background-color: #333; -} -.btn-primary { - color: #fff; - background-color: #428bca; - border-color: #357ebd; -} -.btn-primary:hover, -.btn-primary:focus, -.btn-primary:active, -.btn-primary.active, -.open .dropdown-toggle.btn-primary { - color: #fff; - background-color: #3276b1; - border-color: #285e8e; -} -.btn-primary:active, -.btn-primary.active, -.open .dropdown-toggle.btn-primary { - background-image: none; -} -.btn-primary.disabled, -.btn-primary[disabled], -fieldset[disabled] .btn-primary, -.btn-primary.disabled:hover, -.btn-primary[disabled]:hover, -fieldset[disabled] .btn-primary:hover, -.btn-primary.disabled:focus, -.btn-primary[disabled]:focus, -fieldset[disabled] .btn-primary:focus, -.btn-primary.disabled:active, -.btn-primary[disabled]:active, -fieldset[disabled] .btn-primary:active, -.btn-primary.disabled.active, -.btn-primary[disabled].active, -fieldset[disabled] .btn-primary.active { - background-color: #428bca; - border-color: #357ebd; -} -.btn-primary .badge { - color: #428bca; - background-color: #fff; -} -.btn-success { - color: #fff; - background-color: #5cb85c; - border-color: #4cae4c; -} -.btn-success:hover, -.btn-success:focus, -.btn-success:active, -.btn-success.active, -.open .dropdown-toggle.btn-success { - color: #fff; - background-color: #47a447; - border-color: #398439; -} -.btn-success:active, -.btn-success.active, -.open .dropdown-toggle.btn-success { - background-image: none; -} -.btn-success.disabled, -.btn-success[disabled], -fieldset[disabled] .btn-success, -.btn-success.disabled:hover, -.btn-success[disabled]:hover, -fieldset[disabled] .btn-success:hover, -.btn-success.disabled:focus, -.btn-success[disabled]:focus, -fieldset[disabled] .btn-success:focus, -.btn-success.disabled:active, -.btn-success[disabled]:active, -fieldset[disabled] .btn-success:active, -.btn-success.disabled.active, -.btn-success[disabled].active, -fieldset[disabled] .btn-success.active { - background-color: #5cb85c; - border-color: #4cae4c; -} -.btn-success .badge { - color: #5cb85c; - background-color: #fff; -} -.btn-info { - color: #fff; - background-color: #5bc0de; - border-color: #46b8da; -} -.btn-info:hover, -.btn-info:focus, -.btn-info:active, -.btn-info.active, -.open .dropdown-toggle.btn-info { - color: #fff; - background-color: #39b3d7; - border-color: #269abc; -} -.btn-info:active, -.btn-info.active, -.open .dropdown-toggle.btn-info { - background-image: none; -} -.btn-info.disabled, -.btn-info[disabled], -fieldset[disabled] .btn-info, -.btn-info.disabled:hover, -.btn-info[disabled]:hover, -fieldset[disabled] .btn-info:hover, -.btn-info.disabled:focus, -.btn-info[disabled]:focus, -fieldset[disabled] .btn-info:focus, -.btn-info.disabled:active, -.btn-info[disabled]:active, -fieldset[disabled] .btn-info:active, -.btn-info.disabled.active, -.btn-info[disabled].active, -fieldset[disabled] .btn-info.active { - background-color: #5bc0de; - border-color: #46b8da; -} -.btn-info .badge { - color: #5bc0de; - background-color: #fff; -} -.btn-warning { - color: #fff; - background-color: #f0ad4e; - border-color: #eea236; -} -.btn-warning:hover, -.btn-warning:focus, -.btn-warning:active, -.btn-warning.active, -.open .dropdown-toggle.btn-warning { - color: #fff; - background-color: #ed9c28; - border-color: #d58512; -} -.btn-warning:active, -.btn-warning.active, -.open .dropdown-toggle.btn-warning { - background-image: none; -} -.btn-warning.disabled, -.btn-warning[disabled], -fieldset[disabled] .btn-warning, -.btn-warning.disabled:hover, -.btn-warning[disabled]:hover, -fieldset[disabled] .btn-warning:hover, -.btn-warning.disabled:focus, -.btn-warning[disabled]:focus, -fieldset[disabled] .btn-warning:focus, -.btn-warning.disabled:active, -.btn-warning[disabled]:active, -fieldset[disabled] .btn-warning:active, -.btn-warning.disabled.active, -.btn-warning[disabled].active, -fieldset[disabled] .btn-warning.active { - background-color: #f0ad4e; - border-color: #eea236; -} -.btn-warning .badge { - color: #f0ad4e; - background-color: #fff; -} -.btn-danger { - color: #fff; - background-color: #d9534f; - border-color: #d43f3a; -} -.btn-danger:hover, -.btn-danger:focus, -.btn-danger:active, -.btn-danger.active, -.open .dropdown-toggle.btn-danger { - color: #fff; - background-color: #d2322d; - border-color: #ac2925; -} -.btn-danger:active, -.btn-danger.active, -.open .dropdown-toggle.btn-danger { - background-image: none; -} -.btn-danger.disabled, -.btn-danger[disabled], -fieldset[disabled] .btn-danger, -.btn-danger.disabled:hover, -.btn-danger[disabled]:hover, -fieldset[disabled] .btn-danger:hover, -.btn-danger.disabled:focus, -.btn-danger[disabled]:focus, -fieldset[disabled] .btn-danger:focus, -.btn-danger.disabled:active, -.btn-danger[disabled]:active, -fieldset[disabled] .btn-danger:active, -.btn-danger.disabled.active, -.btn-danger[disabled].active, -fieldset[disabled] .btn-danger.active { - background-color: #d9534f; - border-color: #d43f3a; -} -.btn-danger .badge { - color: #d9534f; - background-color: #fff; -} -.btn-link { - font-weight: normal; - color: #428bca; - cursor: pointer; - border-radius: 0; -} -.btn-link, -.btn-link:active, -.btn-link[disabled], -fieldset[disabled] .btn-link { - background-color: transparent; - -webkit-box-shadow: none; - box-shadow: none; -} -.btn-link, -.btn-link:hover, -.btn-link:focus, -.btn-link:active { - border-color: transparent; -} -.btn-link:hover, -.btn-link:focus { - color: #2a6496; - text-decoration: underline; - background-color: transparent; -} -.btn-link[disabled]:hover, -fieldset[disabled] .btn-link:hover, -.btn-link[disabled]:focus, -fieldset[disabled] .btn-link:focus { - color: #999; - text-decoration: none; -} -.btn-lg, -.btn-group-lg > .btn { - padding: 10px 16px; - font-size: 18px; - line-height: 1.33; - border-radius: 6px; -} -.btn-sm, -.btn-group-sm > .btn { - padding: 5px 10px; - font-size: 12px; - line-height: 1.5; - border-radius: 3px; -} -.btn-xs, -.btn-group-xs > .btn { - padding: 1px 5px; - font-size: 12px; - line-height: 1.5; - border-radius: 3px; -} -.btn-block { - display: block; - width: 100%; - padding-right: 0; - padding-left: 0; -} -.btn-block + .btn-block { - margin-top: 5px; -} -input[type="submit"].btn-block, -input[type="reset"].btn-block, -input[type="button"].btn-block { - width: 100%; -} -.fade { - opacity: 0; - -webkit-transition: opacity .15s linear; - transition: opacity .15s linear; -} -.fade.in { - opacity: 1; -} -.collapse { - display: none; -} -.collapse.in { - display: block; -} -.collapsing { - position: relative; - height: 0; - overflow: hidden; - -webkit-transition: height .35s ease; - transition: height .35s ease; -} -@font-face { - font-family: 'Glyphicons Halflings'; - - src: url('../fonts/glyphicons-halflings-regular.eot'); - src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg'); -} -.glyphicon { - position: relative; - top: 1px; - display: inline-block; - font-family: 'Glyphicons Halflings'; - font-style: normal; - font-weight: normal; - line-height: 1; - - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} -.glyphicon-asterisk:before { - content: "\2a"; -} -.glyphicon-plus:before { - content: "\2b"; -} -.glyphicon-euro:before { - content: "\20ac"; -} -.glyphicon-minus:before { - content: "\2212"; -} -.glyphicon-cloud:before { - content: "\2601"; -} -.glyphicon-envelope:before { - content: "\2709"; -} -.glyphicon-pencil:before { - content: "\270f"; -} -.glyphicon-glass:before { - content: "\e001"; -} -.glyphicon-music:before { - content: "\e002"; -} -.glyphicon-search:before { - content: "\e003"; -} -.glyphicon-heart:before { - content: "\e005"; -} -.glyphicon-star:before { - content: "\e006"; -} -.glyphicon-star-empty:before { - content: "\e007"; -} -.glyphicon-user:before { - content: "\e008"; -} -.glyphicon-film:before { - content: "\e009"; -} -.glyphicon-th-large:before { - content: "\e010"; -} -.glyphicon-th:before { - content: "\e011"; -} -.glyphicon-th-list:before { - content: "\e012"; -} -.glyphicon-ok:before { - content: "\e013"; -} -.glyphicon-remove:before { - content: "\e014"; -} -.glyphicon-zoom-in:before { - content: "\e015"; -} -.glyphicon-zoom-out:before { - content: "\e016"; -} -.glyphicon-off:before { - content: "\e017"; -} -.glyphicon-signal:before { - content: "\e018"; -} -.glyphicon-cog:before { - content: "\e019"; -} -.glyphicon-trash:before { - content: "\e020"; -} -.glyphicon-home:before { - content: "\e021"; -} -.glyphicon-file:before { - content: "\e022"; -} -.glyphicon-time:before { - content: "\e023"; -} -.glyphicon-road:before { - content: "\e024"; -} -.glyphicon-download-alt:before { - content: "\e025"; -} -.glyphicon-download:before { - content: "\e026"; -} -.glyphicon-upload:before { - content: "\e027"; -} -.glyphicon-inbox:before { - content: "\e028"; -} -.glyphicon-play-circle:before { - content: "\e029"; -} -.glyphicon-repeat:before { - content: "\e030"; -} -.glyphicon-refresh:before { - content: "\e031"; -} -.glyphicon-list-alt:before { - content: "\e032"; -} -.glyphicon-lock:before { - content: "\e033"; -} -.glyphicon-flag:before { - content: "\e034"; -} -.glyphicon-headphones:before { - content: "\e035"; -} -.glyphicon-volume-off:before { - content: "\e036"; -} -.glyphicon-volume-down:before { - content: "\e037"; -} -.glyphicon-volume-up:before { - content: "\e038"; -} -.glyphicon-qrcode:before { - content: "\e039"; -} -.glyphicon-barcode:before { - content: "\e040"; -} -.glyphicon-tag:before { - content: "\e041"; -} -.glyphicon-tags:before { - content: "\e042"; -} -.glyphicon-book:before { - content: "\e043"; -} -.glyphicon-bookmark:before { - content: "\e044"; -} -.glyphicon-print:before { - content: "\e045"; -} -.glyphicon-camera:before { - content: "\e046"; -} -.glyphicon-font:before { - content: "\e047"; -} -.glyphicon-bold:before { - content: "\e048"; -} -.glyphicon-italic:before { - content: "\e049"; -} -.glyphicon-text-height:before { - content: "\e050"; -} -.glyphicon-text-width:before { - content: "\e051"; -} -.glyphicon-align-left:before { - content: "\e052"; -} -.glyphicon-align-center:before { - content: "\e053"; -} -.glyphicon-align-right:before { - content: "\e054"; -} -.glyphicon-align-justify:before { - content: "\e055"; -} -.glyphicon-list:before { - content: "\e056"; -} -.glyphicon-indent-left:before { - content: "\e057"; -} -.glyphicon-indent-right:before { - content: "\e058"; -} -.glyphicon-facetime-video:before { - content: "\e059"; -} -.glyphicon-picture:before { - content: "\e060"; -} -.glyphicon-map-marker:before { - content: "\e062"; -} -.glyphicon-adjust:before { - content: "\e063"; -} -.glyphicon-tint:before { - content: "\e064"; -} -.glyphicon-edit:before { - content: "\e065"; -} -.glyphicon-share:before { - content: "\e066"; -} -.glyphicon-check:before { - content: "\e067"; -} -.glyphicon-move:before { - content: "\e068"; -} -.glyphicon-step-backward:before { - content: "\e069"; -} -.glyphicon-fast-backward:before { - content: "\e070"; -} -.glyphicon-backward:before { - content: "\e071"; -} -.glyphicon-play:before { - content: "\e072"; -} -.glyphicon-pause:before { - content: "\e073"; -} -.glyphicon-stop:before { - content: "\e074"; -} -.glyphicon-forward:before { - content: "\e075"; -} -.glyphicon-fast-forward:before { - content: "\e076"; -} -.glyphicon-step-forward:before { - content: "\e077"; -} -.glyphicon-eject:before { - content: "\e078"; -} -.glyphicon-chevron-left:before { - content: "\e079"; -} -.glyphicon-chevron-right:before { - content: "\e080"; -} -.glyphicon-plus-sign:before { - content: "\e081"; -} -.glyphicon-minus-sign:before { - content: "\e082"; -} -.glyphicon-remove-sign:before { - content: "\e083"; -} -.glyphicon-ok-sign:before { - content: "\e084"; -} -.glyphicon-question-sign:before { - content: "\e085"; -} -.glyphicon-info-sign:before { - content: "\e086"; -} -.glyphicon-screenshot:before { - content: "\e087"; -} -.glyphicon-remove-circle:before { - content: "\e088"; -} -.glyphicon-ok-circle:before { - content: "\e089"; -} -.glyphicon-ban-circle:before { - content: "\e090"; -} -.glyphicon-arrow-left:before { - content: "\e091"; -} -.glyphicon-arrow-right:before { - content: "\e092"; -} -.glyphicon-arrow-up:before { - content: "\e093"; -} -.glyphicon-arrow-down:before { - content: "\e094"; -} -.glyphicon-share-alt:before { - content: "\e095"; -} -.glyphicon-resize-full:before { - content: "\e096"; -} -.glyphicon-resize-small:before { - content: "\e097"; -} -.glyphicon-exclamation-sign:before { - content: "\e101"; -} -.glyphicon-gift:before { - content: "\e102"; -} -.glyphicon-leaf:before { - content: "\e103"; -} -.glyphicon-fire:before { - content: "\e104"; -} -.glyphicon-eye-open:before { - content: "\e105"; -} -.glyphicon-eye-close:before { - content: "\e106"; -} -.glyphicon-warning-sign:before { - content: "\e107"; -} -.glyphicon-plane:before { - content: "\e108"; -} -.glyphicon-calendar:before { - content: "\e109"; -} -.glyphicon-random:before { - content: "\e110"; -} -.glyphicon-comment:before { - content: "\e111"; -} -.glyphicon-magnet:before { - content: "\e112"; -} -.glyphicon-chevron-up:before { - content: "\e113"; -} -.glyphicon-chevron-down:before { - content: "\e114"; -} -.glyphicon-retweet:before { - content: "\e115"; -} -.glyphicon-shopping-cart:before { - content: "\e116"; -} -.glyphicon-folder-close:before { - content: "\e117"; -} -.glyphicon-folder-open:before { - content: "\e118"; -} -.glyphicon-resize-vertical:before { - content: "\e119"; -} -.glyphicon-resize-horizontal:before { - content: "\e120"; -} -.glyphicon-hdd:before { - content: "\e121"; -} -.glyphicon-bullhorn:before { - content: "\e122"; -} -.glyphicon-bell:before { - content: "\e123"; -} -.glyphicon-certificate:before { - content: "\e124"; -} -.glyphicon-thumbs-up:before { - content: "\e125"; -} -.glyphicon-thumbs-down:before { - content: "\e126"; -} -.glyphicon-hand-right:before { - content: "\e127"; -} -.glyphicon-hand-left:before { - content: "\e128"; -} -.glyphicon-hand-up:before { - content: "\e129"; -} -.glyphicon-hand-down:before { - content: "\e130"; -} -.glyphicon-circle-arrow-right:before { - content: "\e131"; -} -.glyphicon-circle-arrow-left:before { - content: "\e132"; -} -.glyphicon-circle-arrow-up:before { - content: "\e133"; -} -.glyphicon-circle-arrow-down:before { - content: "\e134"; -} -.glyphicon-globe:before { - content: "\e135"; -} -.glyphicon-wrench:before { - content: "\e136"; -} -.glyphicon-tasks:before { - content: "\e137"; -} -.glyphicon-filter:before { - content: "\e138"; -} -.glyphicon-briefcase:before { - content: "\e139"; -} -.glyphicon-fullscreen:before { - content: "\e140"; -} -.glyphicon-dashboard:before { - content: "\e141"; -} -.glyphicon-paperclip:before { - content: "\e142"; -} -.glyphicon-heart-empty:before { - content: "\e143"; -} -.glyphicon-link:before { - content: "\e144"; -} -.glyphicon-phone:before { - content: "\e145"; -} -.glyphicon-pushpin:before { - content: "\e146"; -} -.glyphicon-usd:before { - content: "\e148"; -} -.glyphicon-gbp:before { - content: "\e149"; -} -.glyphicon-sort:before { - content: "\e150"; -} -.glyphicon-sort-by-alphabet:before { - content: "\e151"; -} -.glyphicon-sort-by-alphabet-alt:before { - content: "\e152"; -} -.glyphicon-sort-by-order:before { - content: "\e153"; -} -.glyphicon-sort-by-order-alt:before { - content: "\e154"; -} -.glyphicon-sort-by-attributes:before { - content: "\e155"; -} -.glyphicon-sort-by-attributes-alt:before { - content: "\e156"; -} -.glyphicon-unchecked:before { - content: "\e157"; -} -.glyphicon-expand:before { - content: "\e158"; -} -.glyphicon-collapse-down:before { - content: "\e159"; -} -.glyphicon-collapse-up:before { - content: "\e160"; -} -.glyphicon-log-in:before { - content: "\e161"; -} -.glyphicon-flash:before { - content: "\e162"; -} -.glyphicon-log-out:before { - content: "\e163"; -} -.glyphicon-new-window:before { - content: "\e164"; -} -.glyphicon-record:before { - content: "\e165"; -} -.glyphicon-save:before { - content: "\e166"; -} -.glyphicon-open:before { - content: "\e167"; -} -.glyphicon-saved:before { - content: "\e168"; -} -.glyphicon-import:before { - content: "\e169"; -} -.glyphicon-export:before { - content: "\e170"; -} -.glyphicon-send:before { - content: "\e171"; -} -.glyphicon-floppy-disk:before { - content: "\e172"; -} -.glyphicon-floppy-saved:before { - content: "\e173"; -} -.glyphicon-floppy-remove:before { - content: "\e174"; -} -.glyphicon-floppy-save:before { - content: "\e175"; -} -.glyphicon-floppy-open:before { - content: "\e176"; -} -.glyphicon-credit-card:before { - content: "\e177"; -} -.glyphicon-transfer:before { - content: "\e178"; -} -.glyphicon-cutlery:before { - content: "\e179"; -} -.glyphicon-header:before { - content: "\e180"; -} -.glyphicon-compressed:before { - content: "\e181"; -} -.glyphicon-earphone:before { - content: "\e182"; -} -.glyphicon-phone-alt:before { - content: "\e183"; -} -.glyphicon-tower:before { - content: "\e184"; -} -.glyphicon-stats:before { - content: "\e185"; -} -.glyphicon-sd-video:before { - content: "\e186"; -} -.glyphicon-hd-video:before { - content: "\e187"; -} -.glyphicon-subtitles:before { - content: "\e188"; -} -.glyphicon-sound-stereo:before { - content: "\e189"; -} -.glyphicon-sound-dolby:before { - content: "\e190"; -} -.glyphicon-sound-5-1:before { - content: "\e191"; -} -.glyphicon-sound-6-1:before { - content: "\e192"; -} -.glyphicon-sound-7-1:before { - content: "\e193"; -} -.glyphicon-copyright-mark:before { - content: "\e194"; -} -.glyphicon-registration-mark:before { - content: "\e195"; -} -.glyphicon-cloud-download:before { - content: "\e197"; -} -.glyphicon-cloud-upload:before { - content: "\e198"; -} -.glyphicon-tree-conifer:before { - content: "\e199"; -} -.glyphicon-tree-deciduous:before { - content: "\e200"; -} -.caret { - display: inline-block; - width: 0; - height: 0; - margin-left: 2px; - vertical-align: middle; - border-top: 4px solid; - border-right: 4px solid transparent; - border-left: 4px solid transparent; -} -.dropdown { - position: relative; -} -.dropdown-toggle:focus { - outline: 0; -} -.dropdown-menu { - position: absolute; - top: 100%; - left: 0; - z-index: 1000; - display: none; - float: left; - min-width: 160px; - padding: 5px 0; - margin: 2px 0 0; - font-size: 14px; - list-style: none; - background-color: #fff; - background-clip: padding-box; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, .15); - border-radius: 4px; - -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175); - box-shadow: 0 6px 12px rgba(0, 0, 0, .175); -} -.dropdown-menu.pull-right { - right: 0; - left: auto; -} -.dropdown-menu .divider { - height: 1px; - margin: 9px 0; - overflow: hidden; - background-color: #e5e5e5; -} -.dropdown-menu > li > a { - display: block; - padding: 3px 20px; - clear: both; - font-weight: normal; - line-height: 1.42857143; - color: #333; - white-space: nowrap; -} -.dropdown-menu > li > a:hover, -.dropdown-menu > li > a:focus { - color: #262626; - text-decoration: none; - background-color: #f5f5f5; -} -.dropdown-menu > .active > a, -.dropdown-menu > .active > a:hover, -.dropdown-menu > .active > a:focus { - color: #fff; - text-decoration: none; - background-color: #428bca; - outline: 0; -} -.dropdown-menu > .disabled > a, -.dropdown-menu > .disabled > a:hover, -.dropdown-menu > .disabled > a:focus { - color: #999; -} -.dropdown-menu > .disabled > a:hover, -.dropdown-menu > .disabled > a:focus { - text-decoration: none; - cursor: not-allowed; - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); -} -.open > .dropdown-menu { - display: block; -} -.open > a { - outline: 0; -} -.dropdown-menu-right { - right: 0; - left: auto; -} -.dropdown-menu-left { - right: auto; - left: 0; -} -.dropdown-header { - display: block; - padding: 3px 20px; - font-size: 12px; - line-height: 1.42857143; - color: #999; -} -.dropdown-backdrop { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 990; -} -.pull-right > .dropdown-menu { - right: 0; - left: auto; -} -.dropup .caret, -.navbar-fixed-bottom .dropdown .caret { - content: ""; - border-top: 0; - border-bottom: 4px solid; -} -.dropup .dropdown-menu, -.navbar-fixed-bottom .dropdown .dropdown-menu { - top: auto; - bottom: 100%; - margin-bottom: 1px; -} -@media (min-width: 768px) { - .navbar-right .dropdown-menu { - right: 0; - left: auto; - } - .navbar-right .dropdown-menu-left { - right: auto; - left: 0; - } -} -.btn-group, -.btn-group-vertical { - position: relative; - display: inline-block; - vertical-align: middle; -} -.btn-group > .btn, -.btn-group-vertical > .btn { - position: relative; - float: left; -} -.btn-group > .btn:hover, -.btn-group-vertical > .btn:hover, -.btn-group > .btn:focus, -.btn-group-vertical > .btn:focus, -.btn-group > .btn:active, -.btn-group-vertical > .btn:active, -.btn-group > .btn.active, -.btn-group-vertical > .btn.active { - z-index: 2; -} -.btn-group > .btn:focus, -.btn-group-vertical > .btn:focus { - outline: none; -} -.btn-group .btn + .btn, -.btn-group .btn + .btn-group, -.btn-group .btn-group + .btn, -.btn-group .btn-group + .btn-group { - margin-left: -1px; -} -.btn-toolbar { - margin-left: -5px; -} -.btn-toolbar .btn-group, -.btn-toolbar .input-group { - float: left; -} -.btn-toolbar > .btn, -.btn-toolbar > .btn-group, -.btn-toolbar > .input-group { - margin-left: 5px; -} -.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { - border-radius: 0; -} -.btn-group > .btn:first-child { - margin-left: 0; -} -.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) { - border-top-right-radius: 0; - border-bottom-right-radius: 0; -} -.btn-group > .btn:last-child:not(:first-child), -.btn-group > .dropdown-toggle:not(:first-child) { - border-top-left-radius: 0; - border-bottom-left-radius: 0; -} -.btn-group > .btn-group { - float: left; -} -.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { - border-radius: 0; -} -.btn-group > .btn-group:first-child > .btn:last-child, -.btn-group > .btn-group:first-child > .dropdown-toggle { - border-top-right-radius: 0; - border-bottom-right-radius: 0; -} -.btn-group > .btn-group:last-child > .btn:first-child { - border-top-left-radius: 0; - border-bottom-left-radius: 0; -} -.btn-group .dropdown-toggle:active, -.btn-group.open .dropdown-toggle { - outline: 0; -} -.btn-group > .btn + .dropdown-toggle { - padding-right: 8px; - padding-left: 8px; -} -.btn-group > .btn-lg + .dropdown-toggle { - padding-right: 12px; - padding-left: 12px; -} -.btn-group.open .dropdown-toggle { - -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); - box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); -} -.btn-group.open .dropdown-toggle.btn-link { - -webkit-box-shadow: none; - box-shadow: none; -} -.btn .caret { - margin-left: 0; -} -.btn-lg .caret { - border-width: 5px 5px 0; - border-bottom-width: 0; -} -.dropup .btn-lg .caret { - border-width: 0 5px 5px; -} -.btn-group-vertical > .btn, -.btn-group-vertical > .btn-group, -.btn-group-vertical > .btn-group > .btn { - display: block; - float: none; - width: 100%; - max-width: 100%; -} -.btn-group-vertical > .btn-group > .btn { - float: none; -} -.btn-group-vertical > .btn + .btn, -.btn-group-vertical > .btn + .btn-group, -.btn-group-vertical > .btn-group + .btn, -.btn-group-vertical > .btn-group + .btn-group { - margin-top: -1px; - margin-left: 0; -} -.btn-group-vertical > .btn:not(:first-child):not(:last-child) { - border-radius: 0; -} -.btn-group-vertical > .btn:first-child:not(:last-child) { - border-top-right-radius: 4px; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} -.btn-group-vertical > .btn:last-child:not(:first-child) { - border-top-left-radius: 0; - border-top-right-radius: 0; - border-bottom-left-radius: 4px; -} -.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { - border-radius: 0; -} -.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child, -.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle { - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} -.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { - border-top-left-radius: 0; - border-top-right-radius: 0; -} -.btn-group-justified { - display: table; - width: 100%; - table-layout: fixed; - border-collapse: separate; -} -.btn-group-justified > .btn, -.btn-group-justified > .btn-group { - display: table-cell; - float: none; - width: 1%; -} -.btn-group-justified > .btn-group .btn { - width: 100%; -} -[data-toggle="buttons"] > .btn > input[type="radio"], -[data-toggle="buttons"] > .btn > input[type="checkbox"] { - display: none; -} -.input-group { - position: relative; - display: table; - border-collapse: separate; -} -.input-group[class*="col-"] { - float: none; - padding-right: 0; - padding-left: 0; -} -.input-group .form-control { - position: relative; - z-index: 2; - float: left; - width: 100%; - margin-bottom: 0; -} -.input-group-lg > .form-control, -.input-group-lg > .input-group-addon, -.input-group-lg > .input-group-btn > .btn { - height: 46px; - padding: 10px 16px; - font-size: 18px; - line-height: 1.33; - border-radius: 6px; -} -select.input-group-lg > .form-control, -select.input-group-lg > .input-group-addon, -select.input-group-lg > .input-group-btn > .btn { - height: 46px; - line-height: 46px; -} -textarea.input-group-lg > .form-control, -textarea.input-group-lg > .input-group-addon, -textarea.input-group-lg > .input-group-btn > .btn, -select[multiple].input-group-lg > .form-control, -select[multiple].input-group-lg > .input-group-addon, -select[multiple].input-group-lg > .input-group-btn > .btn { - height: auto; -} -.input-group-sm > .form-control, -.input-group-sm > .input-group-addon, -.input-group-sm > .input-group-btn > .btn { - height: 30px; - padding: 5px 10px; - font-size: 12px; - line-height: 1.5; - border-radius: 3px; -} -select.input-group-sm > .form-control, -select.input-group-sm > .input-group-addon, -select.input-group-sm > .input-group-btn > .btn { - height: 30px; - line-height: 30px; -} -textarea.input-group-sm > .form-control, -textarea.input-group-sm > .input-group-addon, -textarea.input-group-sm > .input-group-btn > .btn, -select[multiple].input-group-sm > .form-control, -select[multiple].input-group-sm > .input-group-addon, -select[multiple].input-group-sm > .input-group-btn > .btn { - height: auto; -} -.input-group-addon, -.input-group-btn, -.input-group .form-control { - display: table-cell; -} -.input-group-addon:not(:first-child):not(:last-child), -.input-group-btn:not(:first-child):not(:last-child), -.input-group .form-control:not(:first-child):not(:last-child) { - border-radius: 0; -} -.input-group-addon, -.input-group-btn { - width: 1%; - white-space: nowrap; - vertical-align: middle; -} -.input-group-addon { - padding: 6px 12px; - font-size: 14px; - font-weight: normal; - line-height: 1; - color: #555; - text-align: center; - background-color: #eee; - border: 1px solid #ccc; - border-radius: 4px; -} -.input-group-addon.input-sm { - padding: 5px 10px; - font-size: 12px; - border-radius: 3px; -} -.input-group-addon.input-lg { - padding: 10px 16px; - font-size: 18px; - border-radius: 6px; -} -.input-group-addon input[type="radio"], -.input-group-addon input[type="checkbox"] { - margin-top: 0; -} -.input-group .form-control:first-child, -.input-group-addon:first-child, -.input-group-btn:first-child > .btn, -.input-group-btn:first-child > .btn-group > .btn, -.input-group-btn:first-child > .dropdown-toggle, -.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle), -.input-group-btn:last-child > .btn-group:not(:last-child) > .btn { - border-top-right-radius: 0; - border-bottom-right-radius: 0; -} -.input-group-addon:first-child { - border-right: 0; -} -.input-group .form-control:last-child, -.input-group-addon:last-child, -.input-group-btn:last-child > .btn, -.input-group-btn:last-child > .btn-group > .btn, -.input-group-btn:last-child > .dropdown-toggle, -.input-group-btn:first-child > .btn:not(:first-child), -.input-group-btn:first-child > .btn-group:not(:first-child) > .btn { - border-top-left-radius: 0; - border-bottom-left-radius: 0; -} -.input-group-addon:last-child { - border-left: 0; -} -.input-group-btn { - position: relative; - font-size: 0; - white-space: nowrap; -} -.input-group-btn > .btn { - position: relative; -} -.input-group-btn > .btn + .btn { - margin-left: -1px; -} -.input-group-btn > .btn:hover, -.input-group-btn > .btn:focus, -.input-group-btn > .btn:active { - z-index: 2; -} -.input-group-btn:first-child > .btn, -.input-group-btn:first-child > .btn-group { - margin-right: -1px; -} -.input-group-btn:last-child > .btn, -.input-group-btn:last-child > .btn-group { - margin-left: -1px; -} -.nav { - padding-left: 0; - margin-bottom: 0; - list-style: none; -} -.nav > li { - position: relative; - display: block; -} -.nav > li > a { - position: relative; - display: block; - padding: 10px 15px; -} -.nav > li > a:hover, -.nav > li > a:focus { - text-decoration: none; - background-color: #eee; -} -.nav > li.disabled > a { - color: #999; -} -.nav > li.disabled > a:hover, -.nav > li.disabled > a:focus { - color: #999; - text-decoration: none; - cursor: not-allowed; - background-color: transparent; -} -.nav .open > a, -.nav .open > a:hover, -.nav .open > a:focus { - background-color: #eee; - border-color: #428bca; -} -.nav .nav-divider { - height: 1px; - margin: 9px 0; - overflow: hidden; - background-color: #e5e5e5; -} -.nav > li > a > img { - max-width: none; -} -.nav-tabs { - border-bottom: 1px solid #ddd; -} -.nav-tabs > li { - float: left; - margin-bottom: -1px; -} -.nav-tabs > li > a { - margin-right: 2px; - line-height: 1.42857143; - border: 1px solid transparent; - border-radius: 4px 4px 0 0; -} -.nav-tabs > li > a:hover { - border-color: #eee #eee #ddd; -} -.nav-tabs > li.active > a, -.nav-tabs > li.active > a:hover, -.nav-tabs > li.active > a:focus { - color: #555; - cursor: default; - background-color: #fff; - border: 1px solid #ddd; - border-bottom-color: transparent; -} -.nav-tabs.nav-justified { - width: 100%; - border-bottom: 0; -} -.nav-tabs.nav-justified > li { - float: none; -} -.nav-tabs.nav-justified > li > a { - margin-bottom: 5px; - text-align: center; -} -.nav-tabs.nav-justified > .dropdown .dropdown-menu { - top: auto; - left: auto; -} -@media (min-width: 768px) { - .nav-tabs.nav-justified > li { - display: table-cell; - width: 1%; - } - .nav-tabs.nav-justified > li > a { - margin-bottom: 0; - } -} -.nav-tabs.nav-justified > li > a { - margin-right: 0; - border-radius: 4px; -} -.nav-tabs.nav-justified > .active > a, -.nav-tabs.nav-justified > .active > a:hover, -.nav-tabs.nav-justified > .active > a:focus { - border: 1px solid #ddd; -} -@media (min-width: 768px) { - .nav-tabs.nav-justified > li > a { - border-bottom: 1px solid #ddd; - border-radius: 4px 4px 0 0; - } - .nav-tabs.nav-justified > .active > a, - .nav-tabs.nav-justified > .active > a:hover, - .nav-tabs.nav-justified > .active > a:focus { - border-bottom-color: #fff; - } -} -.nav-pills > li { - float: left; -} -.nav-pills > li > a { - border-radius: 4px; -} -.nav-pills > li + li { - margin-left: 2px; -} -.nav-pills > li.active > a, -.nav-pills > li.active > a:hover, -.nav-pills > li.active > a:focus { - color: #fff; - background-color: #428bca; -} -.nav-stacked > li { - float: none; -} -.nav-stacked > li + li { - margin-top: 2px; - margin-left: 0; -} -.nav-justified { - width: 100%; -} -.nav-justified > li { - float: none; -} -.nav-justified > li > a { - margin-bottom: 5px; - text-align: center; -} -.nav-justified > .dropdown .dropdown-menu { - top: auto; - left: auto; -} -@media (min-width: 768px) { - .nav-justified > li { - display: table-cell; - width: 1%; - } - .nav-justified > li > a { - margin-bottom: 0; - } -} -.nav-tabs-justified { - border-bottom: 0; -} -.nav-tabs-justified > li > a { - margin-right: 0; - border-radius: 4px; -} -.nav-tabs-justified > .active > a, -.nav-tabs-justified > .active > a:hover, -.nav-tabs-justified > .active > a:focus { - border: 1px solid #ddd; -} -@media (min-width: 768px) { - .nav-tabs-justified > li > a { - border-bottom: 1px solid #ddd; - border-radius: 4px 4px 0 0; - } - .nav-tabs-justified > .active > a, - .nav-tabs-justified > .active > a:hover, - .nav-tabs-justified > .active > a:focus { - border-bottom-color: #fff; - } -} -.tab-content > .tab-pane { - display: none; -} -.tab-content > .active { - display: block; -} -.nav-tabs .dropdown-menu { - margin-top: -1px; - border-top-left-radius: 0; - border-top-right-radius: 0; -} -.navbar { - position: relative; - min-height: 50px; - margin-bottom: 20px; - border: 1px solid transparent; -} -@media (min-width: 768px) { - .navbar { - border-radius: 4px; - } -} -@media (min-width: 768px) { - .navbar-header { - float: left; - } -} -.navbar-collapse { - max-height: 340px; - padding-right: 15px; - padding-left: 15px; - overflow-x: visible; - -webkit-overflow-scrolling: touch; - border-top: 1px solid transparent; - box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); -} -.navbar-collapse.in { - overflow-y: auto; -} -@media (min-width: 768px) { - .navbar-collapse { - width: auto; - border-top: 0; - box-shadow: none; - } - .navbar-collapse.collapse { - display: block !important; - height: auto !important; - padding-bottom: 0; - overflow: visible !important; - } - .navbar-collapse.in { - overflow-y: visible; - } - .navbar-fixed-top .navbar-collapse, - .navbar-static-top .navbar-collapse, - .navbar-fixed-bottom .navbar-collapse { - padding-right: 0; - padding-left: 0; - } -} -.container > .navbar-header, -.container-fluid > .navbar-header, -.container > .navbar-collapse, -.container-fluid > .navbar-collapse { - margin-right: -15px; - margin-left: -15px; -} -@media (min-width: 768px) { - .container > .navbar-header, - .container-fluid > .navbar-header, - .container > .navbar-collapse, - .container-fluid > .navbar-collapse { - margin-right: 0; - margin-left: 0; - } -} -.navbar-static-top { - z-index: 1000; - border-width: 0 0 1px; -} -@media (min-width: 768px) { - .navbar-static-top { - border-radius: 0; - } -} -.navbar-fixed-top, -.navbar-fixed-bottom { - position: fixed; - right: 0; - left: 0; - z-index: 1030; -} -@media (min-width: 768px) { - .navbar-fixed-top, - .navbar-fixed-bottom { - border-radius: 0; - } -} -.navbar-fixed-top { - top: 0; - border-width: 0 0 1px; -} -.navbar-fixed-bottom { - bottom: 0; - margin-bottom: 0; - border-width: 1px 0 0; -} -.navbar-brand { - float: left; - height: 50px; - padding: 15px 15px; - font-size: 18px; - line-height: 20px; -} -.navbar-brand:hover, -.navbar-brand:focus { - text-decoration: none; -} -@media (min-width: 768px) { - .navbar > .container .navbar-brand, - .navbar > .container-fluid .navbar-brand { - margin-left: -15px; - } -} -.navbar-toggle { - position: relative; - float: right; - padding: 9px 10px; - margin-top: 8px; - margin-right: 15px; - margin-bottom: 8px; - background-color: transparent; - background-image: none; - border: 1px solid transparent; - border-radius: 4px; -} -.navbar-toggle:focus { - outline: none; -} -.navbar-toggle .icon-bar { - display: block; - width: 22px; - height: 2px; - border-radius: 1px; -} -.navbar-toggle .icon-bar + .icon-bar { - margin-top: 4px; -} -@media (min-width: 768px) { - .navbar-toggle { - display: none; - } -} -.navbar-nav { - margin: 7.5px -15px; -} -.navbar-nav > li > a { - padding-top: 10px; - padding-bottom: 10px; - line-height: 20px; -} -@media (max-width: 767px) { - .navbar-nav .open .dropdown-menu { - position: static; - float: none; - width: auto; - margin-top: 0; - background-color: transparent; - border: 0; - box-shadow: none; - } - .navbar-nav .open .dropdown-menu > li > a, - .navbar-nav .open .dropdown-menu .dropdown-header { - padding: 5px 15px 5px 25px; - } - .navbar-nav .open .dropdown-menu > li > a { - line-height: 20px; - } - .navbar-nav .open .dropdown-menu > li > a:hover, - .navbar-nav .open .dropdown-menu > li > a:focus { - background-image: none; - } -} -@media (min-width: 768px) { - .navbar-nav { - float: left; - margin: 0; - } - .navbar-nav > li { - float: left; - } - .navbar-nav > li > a { - padding-top: 15px; - padding-bottom: 15px; - } - .navbar-nav.navbar-right:last-child { - margin-right: -15px; - } -} -@media (min-width: 768px) { - .navbar-left { - float: left !important; - } - .navbar-right { - float: right !important; - } -} -.navbar-form { - padding: 10px 15px; - margin-top: 8px; - margin-right: -15px; - margin-bottom: 8px; - margin-left: -15px; - border-top: 1px solid transparent; - border-bottom: 1px solid transparent; - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1); -} -@media (min-width: 768px) { - .navbar-form .form-group { - display: inline-block; - margin-bottom: 0; - vertical-align: middle; - } - .navbar-form .form-control { - display: inline-block; - width: auto; - vertical-align: middle; - } - .navbar-form .input-group > .form-control { - width: 100%; - } - .navbar-form .control-label { - margin-bottom: 0; - vertical-align: middle; - } - .navbar-form .radio, - .navbar-form .checkbox { - display: inline-block; - padding-left: 0; - margin-top: 0; - margin-bottom: 0; - vertical-align: middle; - } - .navbar-form .radio input[type="radio"], - .navbar-form .checkbox input[type="checkbox"] { - float: none; - margin-left: 0; - } - .navbar-form .has-feedback .form-control-feedback { - top: 0; - } -} -@media (max-width: 767px) { - .navbar-form .form-group { - margin-bottom: 5px; - } -} -@media (min-width: 768px) { - .navbar-form { - width: auto; - padding-top: 0; - padding-bottom: 0; - margin-right: 0; - margin-left: 0; - border: 0; - -webkit-box-shadow: none; - box-shadow: none; - } - .navbar-form.navbar-right:last-child { - margin-right: -15px; - } -} -.navbar-nav > li > .dropdown-menu { - margin-top: 0; - border-top-left-radius: 0; - border-top-right-radius: 0; -} -.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu { - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} -.navbar-btn { - margin-top: 8px; - margin-bottom: 8px; -} -.navbar-btn.btn-sm { - margin-top: 10px; - margin-bottom: 10px; -} -.navbar-btn.btn-xs { - margin-top: 14px; - margin-bottom: 14px; -} -.navbar-text { - margin-top: 15px; - margin-bottom: 15px; -} -@media (min-width: 768px) { - .navbar-text { - float: left; - margin-right: 15px; - margin-left: 15px; - } - .navbar-text.navbar-right:last-child { - margin-right: 0; - } -} -.navbar-default { - background-color: #f8f8f8; - border-color: #e7e7e7; -} -.navbar-default .navbar-brand { - color: #777; -} -.navbar-default .navbar-brand:hover, -.navbar-default .navbar-brand:focus { - color: #5e5e5e; - background-color: transparent; -} -.navbar-default .navbar-text { - color: #777; -} -.navbar-default .navbar-nav > li > a { - color: #777; -} -.navbar-default .navbar-nav > li > a:hover, -.navbar-default .navbar-nav > li > a:focus { - color: #333; - background-color: transparent; -} -.navbar-default .navbar-nav > .active > a, -.navbar-default .navbar-nav > .active > a:hover, -.navbar-default .navbar-nav > .active > a:focus { - color: #555; - background-color: #e7e7e7; -} -.navbar-default .navbar-nav > .disabled > a, -.navbar-default .navbar-nav > .disabled > a:hover, -.navbar-default .navbar-nav > .disabled > a:focus { - color: #ccc; - background-color: transparent; -} -.navbar-default .navbar-toggle { - border-color: #ddd; -} -.navbar-default .navbar-toggle:hover, -.navbar-default .navbar-toggle:focus { - background-color: #ddd; -} -.navbar-default .navbar-toggle .icon-bar { - background-color: #888; -} -.navbar-default .navbar-collapse, -.navbar-default .navbar-form { - border-color: #e7e7e7; -} -.navbar-default .navbar-nav > .open > a, -.navbar-default .navbar-nav > .open > a:hover, -.navbar-default .navbar-nav > .open > a:focus { - color: #555; - background-color: #e7e7e7; -} -@media (max-width: 767px) { - .navbar-default .navbar-nav .open .dropdown-menu > li > a { - color: #777; - } - .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, - .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus { - color: #333; - background-color: transparent; - } - .navbar-default .navbar-nav .open .dropdown-menu > .active > a, - .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover, - .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus { - color: #555; - background-color: #e7e7e7; - } - .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a, - .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover, - .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus { - color: #ccc; - background-color: transparent; - } -} -.navbar-default .navbar-link { - color: #777; -} -.navbar-default .navbar-link:hover { - color: #333; -} -.navbar-inverse { - background-color: #222; - border-color: #080808; -} -.navbar-inverse .navbar-brand { - color: #999; -} -.navbar-inverse .navbar-brand:hover, -.navbar-inverse .navbar-brand:focus { - color: #fff; - background-color: transparent; -} -.navbar-inverse .navbar-text { - color: #999; -} -.navbar-inverse .navbar-nav > li > a { - color: #999; -} -.navbar-inverse .navbar-nav > li > a:hover, -.navbar-inverse .navbar-nav > li > a:focus { - color: #fff; - background-color: transparent; -} -.navbar-inverse .navbar-nav > .active > a, -.navbar-inverse .navbar-nav > .active > a:hover, -.navbar-inverse .navbar-nav > .active > a:focus { - color: #fff; - background-color: #080808; -} -.navbar-inverse .navbar-nav > .disabled > a, -.navbar-inverse .navbar-nav > .disabled > a:hover, -.navbar-inverse .navbar-nav > .disabled > a:focus { - color: #444; - background-color: transparent; -} -.navbar-inverse .navbar-toggle { - border-color: #333; -} -.navbar-inverse .navbar-toggle:hover, -.navbar-inverse .navbar-toggle:focus { - background-color: #333; -} -.navbar-inverse .navbar-toggle .icon-bar { - background-color: #fff; -} -.navbar-inverse .navbar-collapse, -.navbar-inverse .navbar-form { - border-color: #101010; -} -.navbar-inverse .navbar-nav > .open > a, -.navbar-inverse .navbar-nav > .open > a:hover, -.navbar-inverse .navbar-nav > .open > a:focus { - color: #fff; - background-color: #080808; -} -@media (max-width: 767px) { - .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header { - border-color: #080808; - } - .navbar-inverse .navbar-nav .open .dropdown-menu .divider { - background-color: #080808; - } - .navbar-inverse .navbar-nav .open .dropdown-menu > li > a { - color: #999; - } - .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover, - .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus { - color: #fff; - background-color: transparent; - } - .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a, - .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover, - .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus { - color: #fff; - background-color: #080808; - } - .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a, - .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover, - .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus { - color: #444; - background-color: transparent; - } -} -.navbar-inverse .navbar-link { - color: #999; -} -.navbar-inverse .navbar-link:hover { - color: #fff; -} -.breadcrumb { - padding: 8px 15px; - margin-bottom: 20px; - list-style: none; - background-color: #f5f5f5; - border-radius: 4px; -} -.breadcrumb > li { - display: inline-block; -} -.breadcrumb > li + li:before { - padding: 0 5px; - color: #ccc; - content: "/\00a0"; -} -.breadcrumb > .active { - color: #999; -} -.pagination { - display: inline-block; - padding-left: 0; - margin: 20px 0; - border-radius: 4px; -} -.pagination > li { - display: inline; -} -.pagination > li > a, -.pagination > li > span { - position: relative; - float: left; - padding: 6px 12px; - margin-left: -1px; - line-height: 1.42857143; - color: #428bca; - text-decoration: none; - background-color: #fff; - border: 1px solid #ddd; -} -.pagination > li:first-child > a, -.pagination > li:first-child > span { - margin-left: 0; - border-top-left-radius: 4px; - border-bottom-left-radius: 4px; -} -.pagination > li:last-child > a, -.pagination > li:last-child > span { - border-top-right-radius: 4px; - border-bottom-right-radius: 4px; -} -.pagination > li > a:hover, -.pagination > li > span:hover, -.pagination > li > a:focus, -.pagination > li > span:focus { - color: #2a6496; - background-color: #eee; - border-color: #ddd; -} -.pagination > .active > a, -.pagination > .active > span, -.pagination > .active > a:hover, -.pagination > .active > span:hover, -.pagination > .active > a:focus, -.pagination > .active > span:focus { - z-index: 2; - color: #fff; - cursor: default; - background-color: #428bca; - border-color: #428bca; -} -.pagination > .disabled > span, -.pagination > .disabled > span:hover, -.pagination > .disabled > span:focus, -.pagination > .disabled > a, -.pagination > .disabled > a:hover, -.pagination > .disabled > a:focus { - color: #999; - cursor: not-allowed; - background-color: #fff; - border-color: #ddd; -} -.pagination-lg > li > a, -.pagination-lg > li > span { - padding: 10px 16px; - font-size: 18px; -} -.pagination-lg > li:first-child > a, -.pagination-lg > li:first-child > span { - border-top-left-radius: 6px; - border-bottom-left-radius: 6px; -} -.pagination-lg > li:last-child > a, -.pagination-lg > li:last-child > span { - border-top-right-radius: 6px; - border-bottom-right-radius: 6px; -} -.pagination-sm > li > a, -.pagination-sm > li > span { - padding: 5px 10px; - font-size: 12px; -} -.pagination-sm > li:first-child > a, -.pagination-sm > li:first-child > span { - border-top-left-radius: 3px; - border-bottom-left-radius: 3px; -} -.pagination-sm > li:last-child > a, -.pagination-sm > li:last-child > span { - border-top-right-radius: 3px; - border-bottom-right-radius: 3px; -} -.pager { - padding-left: 0; - margin: 20px 0; - text-align: center; - list-style: none; -} -.pager li { - display: inline; -} -.pager li > a, -.pager li > span { - display: inline-block; - padding: 5px 14px; - background-color: #fff; - border: 1px solid #ddd; - border-radius: 15px; -} -.pager li > a:hover, -.pager li > a:focus { - text-decoration: none; - background-color: #eee; -} -.pager .next > a, -.pager .next > span { - float: right; -} -.pager .previous > a, -.pager .previous > span { - float: left; -} -.pager .disabled > a, -.pager .disabled > a:hover, -.pager .disabled > a:focus, -.pager .disabled > span { - color: #999; - cursor: not-allowed; - background-color: #fff; -} -.label { - display: inline; - padding: .2em .6em .3em; - font-size: 75%; - font-weight: bold; - line-height: 1; - color: #fff; - text-align: center; - white-space: nowrap; - vertical-align: baseline; - border-radius: .25em; -} -.label[href]:hover, -.label[href]:focus { - color: #fff; - text-decoration: none; - cursor: pointer; -} -.label:empty { - display: none; -} -.btn .label { - position: relative; - top: -1px; -} -.label-default { - background-color: #999; -} -.label-default[href]:hover, -.label-default[href]:focus { - background-color: #808080; -} -.label-primary { - background-color: #428bca; -} -.label-primary[href]:hover, -.label-primary[href]:focus { - background-color: #3071a9; -} -.label-success { - background-color: #5cb85c; -} -.label-success[href]:hover, -.label-success[href]:focus { - background-color: #449d44; -} -.label-info { - background-color: #5bc0de; -} -.label-info[href]:hover, -.label-info[href]:focus { - background-color: #31b0d5; -} -.label-warning { - background-color: #f0ad4e; -} -.label-warning[href]:hover, -.label-warning[href]:focus { - background-color: #ec971f; -} -.label-danger { - background-color: #d9534f; -} -.label-danger[href]:hover, -.label-danger[href]:focus { - background-color: #c9302c; -} -.badge { - display: inline-block; - min-width: 10px; - padding: 3px 7px; - font-size: 12px; - font-weight: bold; - line-height: 1; - color: #fff; - text-align: center; - white-space: nowrap; - vertical-align: baseline; - background-color: #999; - border-radius: 10px; -} -.badge:empty { - display: none; -} -.btn .badge { - position: relative; - top: -1px; -} -.btn-xs .badge { - top: 0; - padding: 1px 5px; -} -a.badge:hover, -a.badge:focus { - color: #fff; - text-decoration: none; - cursor: pointer; -} -a.list-group-item.active > .badge, -.nav-pills > .active > a > .badge { - color: #428bca; - background-color: #fff; -} -.nav-pills > li > a > .badge { - margin-left: 3px; -} -.jumbotron { - padding: 30px; - margin-bottom: 30px; - color: inherit; - background-color: #eee; -} -.jumbotron h1, -.jumbotron .h1 { - color: inherit; -} -.jumbotron p { - margin-bottom: 15px; - font-size: 21px; - font-weight: 200; -} -.container .jumbotron { - border-radius: 6px; -} -.jumbotron .container { - max-width: 100%; -} -@media screen and (min-width: 768px) { - .jumbotron { - padding-top: 48px; - padding-bottom: 48px; - } - .container .jumbotron { - padding-right: 60px; - padding-left: 60px; - } - .jumbotron h1, - .jumbotron .h1 { - font-size: 63px; - } -} -.thumbnail { - display: block; - padding: 4px; - margin-bottom: 20px; - line-height: 1.42857143; - background-color: #fff; - border: 1px solid #ddd; - border-radius: 4px; - -webkit-transition: all .2s ease-in-out; - transition: all .2s ease-in-out; -} -.thumbnail > img, -.thumbnail a > img { - margin-right: auto; - margin-left: auto; -} -a.thumbnail:hover, -a.thumbnail:focus, -a.thumbnail.active { - border-color: #428bca; -} -.thumbnail .caption { - padding: 9px; - color: #333; -} -.alert { - padding: 15px; - margin-bottom: 20px; - border: 1px solid transparent; - border-radius: 4px; -} -.alert h4 { - margin-top: 0; - color: inherit; -} -.alert .alert-link { - font-weight: bold; -} -.alert > p, -.alert > ul { - margin-bottom: 0; -} -.alert > p + p { - margin-top: 5px; -} -.alert-dismissable { - padding-right: 35px; -} -.alert-dismissable .close { - position: relative; - top: -2px; - right: -21px; - color: inherit; -} -.alert-success { - color: #3c763d; - background-color: #dff0d8; - border-color: #d6e9c6; -} -.alert-success hr { - border-top-color: #c9e2b3; -} -.alert-success .alert-link { - color: #2b542c; -} -.alert-info { - color: #31708f; - background-color: #d9edf7; - border-color: #bce8f1; -} -.alert-info hr { - border-top-color: #a6e1ec; -} -.alert-info .alert-link { - color: #245269; -} -.alert-warning { - color: #8a6d3b; - background-color: #fcf8e3; - border-color: #faebcc; -} -.alert-warning hr { - border-top-color: #f7e1b5; -} -.alert-warning .alert-link { - color: #66512c; -} -.alert-danger { - color: #a94442; - background-color: #f2dede; - border-color: #ebccd1; -} -.alert-danger hr { - border-top-color: #e4b9c0; -} -.alert-danger .alert-link { - color: #843534; -} -@-webkit-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} -@keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} -.progress { - height: 20px; - margin-bottom: 20px; - overflow: hidden; - background-color: #f5f5f5; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); -} -.progress-bar { - float: left; - width: 0; - height: 100%; - font-size: 12px; - line-height: 20px; - color: #fff; - text-align: center; - background-color: #428bca; - -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); - box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); - -webkit-transition: width .6s ease; - transition: width .6s ease; -} -.progress-striped .progress-bar { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-size: 40px 40px; -} -.progress.active .progress-bar { - -webkit-animation: progress-bar-stripes 2s linear infinite; - animation: progress-bar-stripes 2s linear infinite; -} -.progress-bar-success { - background-color: #5cb85c; -} -.progress-striped .progress-bar-success { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); -} -.progress-bar-info { - background-color: #5bc0de; -} -.progress-striped .progress-bar-info { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); -} -.progress-bar-warning { - background-color: #f0ad4e; -} -.progress-striped .progress-bar-warning { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); -} -.progress-bar-danger { - background-color: #d9534f; -} -.progress-striped .progress-bar-danger { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); -} -.media, -.media-body { - overflow: hidden; - zoom: 1; -} -.media, -.media .media { - margin-top: 15px; -} -.media:first-child { - margin-top: 0; -} -.media-object { - display: block; -} -.media-heading { - margin: 0 0 5px; -} -.media > .pull-left { - margin-right: 10px; -} -.media > .pull-right { - margin-left: 10px; -} -.media-list { - padding-left: 0; - list-style: none; -} -.list-group { - padding-left: 0; - margin-bottom: 20px; -} -.list-group-item { - position: relative; - display: block; - padding: 10px 15px; - margin-bottom: -1px; - background-color: #fff; - border: 1px solid #ddd; -} -.list-group-item:first-child { - border-top-left-radius: 4px; - border-top-right-radius: 4px; -} -.list-group-item:last-child { - margin-bottom: 0; - border-bottom-right-radius: 4px; - border-bottom-left-radius: 4px; -} -.list-group-item > .badge { - float: right; -} -.list-group-item > .badge + .badge { - margin-right: 5px; -} -a.list-group-item { - color: #555; -} -a.list-group-item .list-group-item-heading { - color: #333; -} -a.list-group-item:hover, -a.list-group-item:focus { - text-decoration: none; - background-color: #f5f5f5; -} -a.list-group-item.active, -a.list-group-item.active:hover, -a.list-group-item.active:focus { - z-index: 2; - color: #fff; - background-color: #428bca; - border-color: #428bca; -} -a.list-group-item.active .list-group-item-heading, -a.list-group-item.active:hover .list-group-item-heading, -a.list-group-item.active:focus .list-group-item-heading { - color: inherit; -} -a.list-group-item.active .list-group-item-text, -a.list-group-item.active:hover .list-group-item-text, -a.list-group-item.active:focus .list-group-item-text { - color: #e1edf7; -} -.list-group-item-success { - color: #3c763d; - background-color: #dff0d8; -} -a.list-group-item-success { - color: #3c763d; -} -a.list-group-item-success .list-group-item-heading { - color: inherit; -} -a.list-group-item-success:hover, -a.list-group-item-success:focus { - color: #3c763d; - background-color: #d0e9c6; -} -a.list-group-item-success.active, -a.list-group-item-success.active:hover, -a.list-group-item-success.active:focus { - color: #fff; - background-color: #3c763d; - border-color: #3c763d; -} -.list-group-item-info { - color: #31708f; - background-color: #d9edf7; -} -a.list-group-item-info { - color: #31708f; -} -a.list-group-item-info .list-group-item-heading { - color: inherit; -} -a.list-group-item-info:hover, -a.list-group-item-info:focus { - color: #31708f; - background-color: #c4e3f3; -} -a.list-group-item-info.active, -a.list-group-item-info.active:hover, -a.list-group-item-info.active:focus { - color: #fff; - background-color: #31708f; - border-color: #31708f; -} -.list-group-item-warning { - color: #8a6d3b; - background-color: #fcf8e3; -} -a.list-group-item-warning { - color: #8a6d3b; -} -a.list-group-item-warning .list-group-item-heading { - color: inherit; -} -a.list-group-item-warning:hover, -a.list-group-item-warning:focus { - color: #8a6d3b; - background-color: #faf2cc; -} -a.list-group-item-warning.active, -a.list-group-item-warning.active:hover, -a.list-group-item-warning.active:focus { - color: #fff; - background-color: #8a6d3b; - border-color: #8a6d3b; -} -.list-group-item-danger { - color: #a94442; - background-color: #f2dede; -} -a.list-group-item-danger { - color: #a94442; -} -a.list-group-item-danger .list-group-item-heading { - color: inherit; -} -a.list-group-item-danger:hover, -a.list-group-item-danger:focus { - color: #a94442; - background-color: #ebcccc; -} -a.list-group-item-danger.active, -a.list-group-item-danger.active:hover, -a.list-group-item-danger.active:focus { - color: #fff; - background-color: #a94442; - border-color: #a94442; -} -.list-group-item-heading { - margin-top: 0; - margin-bottom: 5px; -} -.list-group-item-text { - margin-bottom: 0; - line-height: 1.3; -} -.panel { - margin-bottom: 20px; - background-color: #fff; - border: 1px solid transparent; - border-radius: 4px; - -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05); - box-shadow: 0 1px 1px rgba(0, 0, 0, .05); -} -.panel-body { - padding: 15px; -} -.panel-heading { - padding: 10px 15px; - border-bottom: 1px solid transparent; - border-top-left-radius: 3px; - border-top-right-radius: 3px; -} -.panel-heading > .dropdown .dropdown-toggle { - color: inherit; -} -.panel-title { - margin-top: 0; - margin-bottom: 0; - font-size: 16px; - color: inherit; -} -.panel-title > a { - color: inherit; -} -.panel-footer { - padding: 10px 15px; - background-color: #f5f5f5; - border-top: 1px solid #ddd; - border-bottom-right-radius: 3px; - border-bottom-left-radius: 3px; -} -.panel > .list-group { - margin-bottom: 0; -} -.panel > .list-group .list-group-item { - border-width: 1px 0; - border-radius: 0; -} -.panel > .list-group:first-child .list-group-item:first-child { - border-top: 0; - border-top-left-radius: 3px; - border-top-right-radius: 3px; -} -.panel > .list-group:last-child .list-group-item:last-child { - border-bottom: 0; - border-bottom-right-radius: 3px; - border-bottom-left-radius: 3px; -} -.panel-heading + .list-group .list-group-item:first-child { - border-top-width: 0; -} -.panel > .table, -.panel > .table-responsive > .table { - margin-bottom: 0; -} -.panel > .table:first-child, -.panel > .table-responsive:first-child > .table:first-child { - border-top-left-radius: 3px; - border-top-right-radius: 3px; -} -.panel > .table:first-child > thead:first-child > tr:first-child td:first-child, -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child, -.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child, -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child, -.panel > .table:first-child > thead:first-child > tr:first-child th:first-child, -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child, -.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child, -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child { - border-top-left-radius: 3px; -} -.panel > .table:first-child > thead:first-child > tr:first-child td:last-child, -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child, -.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child, -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child, -.panel > .table:first-child > thead:first-child > tr:first-child th:last-child, -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child, -.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child, -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child { - border-top-right-radius: 3px; -} -.panel > .table:last-child, -.panel > .table-responsive:last-child > .table:last-child { - border-bottom-right-radius: 3px; - border-bottom-left-radius: 3px; -} -.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child, -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child, -.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child, -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child, -.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child, -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child, -.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child, -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child { - border-bottom-left-radius: 3px; -} -.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child, -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child, -.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child, -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child, -.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child, -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child, -.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child, -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child { - border-bottom-right-radius: 3px; -} -.panel > .panel-body + .table, -.panel > .panel-body + .table-responsive { - border-top: 1px solid #ddd; -} -.panel > .table > tbody:first-child > tr:first-child th, -.panel > .table > tbody:first-child > tr:first-child td { - border-top: 0; -} -.panel > .table-bordered, -.panel > .table-responsive > .table-bordered { - border: 0; -} -.panel > .table-bordered > thead > tr > th:first-child, -.panel > .table-responsive > .table-bordered > thead > tr > th:first-child, -.panel > .table-bordered > tbody > tr > th:first-child, -.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child, -.panel > .table-bordered > tfoot > tr > th:first-child, -.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child, -.panel > .table-bordered > thead > tr > td:first-child, -.panel > .table-responsive > .table-bordered > thead > tr > td:first-child, -.panel > .table-bordered > tbody > tr > td:first-child, -.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child, -.panel > .table-bordered > tfoot > tr > td:first-child, -.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child { - border-left: 0; -} -.panel > .table-bordered > thead > tr > th:last-child, -.panel > .table-responsive > .table-bordered > thead > tr > th:last-child, -.panel > .table-bordered > tbody > tr > th:last-child, -.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child, -.panel > .table-bordered > tfoot > tr > th:last-child, -.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child, -.panel > .table-bordered > thead > tr > td:last-child, -.panel > .table-responsive > .table-bordered > thead > tr > td:last-child, -.panel > .table-bordered > tbody > tr > td:last-child, -.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child, -.panel > .table-bordered > tfoot > tr > td:last-child, -.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child { - border-right: 0; -} -.panel > .table-bordered > thead > tr:first-child > td, -.panel > .table-responsive > .table-bordered > thead > tr:first-child > td, -.panel > .table-bordered > tbody > tr:first-child > td, -.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td, -.panel > .table-bordered > thead > tr:first-child > th, -.panel > .table-responsive > .table-bordered > thead > tr:first-child > th, -.panel > .table-bordered > tbody > tr:first-child > th, -.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th { - border-bottom: 0; -} -.panel > .table-bordered > tbody > tr:last-child > td, -.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td, -.panel > .table-bordered > tfoot > tr:last-child > td, -.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td, -.panel > .table-bordered > tbody > tr:last-child > th, -.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th, -.panel > .table-bordered > tfoot > tr:last-child > th, -.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th { - border-bottom: 0; -} -.panel > .table-responsive { - margin-bottom: 0; - border: 0; -} -.panel-group { - margin-bottom: 20px; -} -.panel-group .panel { - margin-bottom: 0; - overflow: hidden; - border-radius: 4px; -} -.panel-group .panel + .panel { - margin-top: 5px; -} -.panel-group .panel-heading { - border-bottom: 0; -} -.panel-group .panel-heading + .panel-collapse .panel-body { - border-top: 1px solid #ddd; -} -.panel-group .panel-footer { - border-top: 0; -} -.panel-group .panel-footer + .panel-collapse .panel-body { - border-bottom: 1px solid #ddd; -} -.panel-default { - border-color: #ddd; -} -.panel-default > .panel-heading { - color: #333; - background-color: #f5f5f5; - border-color: #ddd; -} -.panel-default > .panel-heading + .panel-collapse .panel-body { - border-top-color: #ddd; -} -.panel-default > .panel-footer + .panel-collapse .panel-body { - border-bottom-color: #ddd; -} -.panel-primary { - border-color: #428bca; -} -.panel-primary > .panel-heading { - color: #fff; - background-color: #428bca; - border-color: #428bca; -} -.panel-primary > .panel-heading + .panel-collapse .panel-body { - border-top-color: #428bca; -} -.panel-primary > .panel-footer + .panel-collapse .panel-body { - border-bottom-color: #428bca; -} -.panel-success { - border-color: #d6e9c6; -} -.panel-success > .panel-heading { - color: #3c763d; - background-color: #dff0d8; - border-color: #d6e9c6; -} -.panel-success > .panel-heading + .panel-collapse .panel-body { - border-top-color: #d6e9c6; -} -.panel-success > .panel-footer + .panel-collapse .panel-body { - border-bottom-color: #d6e9c6; -} -.panel-info { - border-color: #bce8f1; -} -.panel-info > .panel-heading { - color: #31708f; - background-color: #d9edf7; - border-color: #bce8f1; -} -.panel-info > .panel-heading + .panel-collapse .panel-body { - border-top-color: #bce8f1; -} -.panel-info > .panel-footer + .panel-collapse .panel-body { - border-bottom-color: #bce8f1; -} -.panel-warning { - border-color: #faebcc; -} -.panel-warning > .panel-heading { - color: #8a6d3b; - background-color: #fcf8e3; - border-color: #faebcc; -} -.panel-warning > .panel-heading + .panel-collapse .panel-body { - border-top-color: #faebcc; -} -.panel-warning > .panel-footer + .panel-collapse .panel-body { - border-bottom-color: #faebcc; -} -.panel-danger { - border-color: #ebccd1; -} -.panel-danger > .panel-heading { - color: #a94442; - background-color: #f2dede; - border-color: #ebccd1; -} -.panel-danger > .panel-heading + .panel-collapse .panel-body { - border-top-color: #ebccd1; -} -.panel-danger > .panel-footer + .panel-collapse .panel-body { - border-bottom-color: #ebccd1; -} -.well { - min-height: 20px; - padding: 19px; - margin-bottom: 20px; - background-color: #f5f5f5; - border: 1px solid #e3e3e3; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); -} -.well blockquote { - border-color: #ddd; - border-color: rgba(0, 0, 0, .15); -} -.well-lg { - padding: 24px; - border-radius: 6px; -} -.well-sm { - padding: 9px; - border-radius: 3px; -} -.close { - float: right; - font-size: 21px; - font-weight: bold; - line-height: 1; - color: #000; - text-shadow: 0 1px 0 #fff; - filter: alpha(opacity=20); - opacity: .2; -} -.close:hover, -.close:focus { - color: #000; - text-decoration: none; - cursor: pointer; - filter: alpha(opacity=50); - opacity: .5; -} -button.close { - -webkit-appearance: none; - padding: 0; - cursor: pointer; - background: transparent; - border: 0; -} -.modal-open { - overflow: hidden; -} -.modal { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 1050; - display: none; - overflow: auto; - overflow-y: scroll; - -webkit-overflow-scrolling: touch; - outline: 0; -} -.modal.fade .modal-dialog { - -webkit-transition: -webkit-transform .3s ease-out; - -moz-transition: -moz-transform .3s ease-out; - -o-transition: -o-transform .3s ease-out; - transition: transform .3s ease-out; - -webkit-transform: translate(0, -25%); - -ms-transform: translate(0, -25%); - transform: translate(0, -25%); -} -.modal.in .modal-dialog { - -webkit-transform: translate(0, 0); - -ms-transform: translate(0, 0); - transform: translate(0, 0); -} -.modal-dialog { - position: relative; - width: auto; - margin: 10px; -} -.modal-content { - position: relative; - background-color: #fff; - background-clip: padding-box; - border: 1px solid #999; - border: 1px solid rgba(0, 0, 0, .2); - border-radius: 6px; - outline: none; - -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5); - box-shadow: 0 3px 9px rgba(0, 0, 0, .5); -} -.modal-backdrop { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 1040; - background-color: #000; -} -.modal-backdrop.fade { - filter: alpha(opacity=0); - opacity: 0; -} -.modal-backdrop.in { - filter: alpha(opacity=50); - opacity: .5; -} -.modal-header { - min-height: 16.42857143px; - padding: 15px; - border-bottom: 1px solid #e5e5e5; -} -.modal-header .close { - margin-top: -2px; -} -.modal-title { - margin: 0; - line-height: 1.42857143; -} -.modal-body { - position: relative; - padding: 20px; -} -.modal-footer { - padding: 19px 20px 20px; - margin-top: 15px; - text-align: right; - border-top: 1px solid #e5e5e5; -} -.modal-footer .btn + .btn { - margin-bottom: 0; - margin-left: 5px; -} -.modal-footer .btn-group .btn + .btn { - margin-left: -1px; -} -.modal-footer .btn-block + .btn-block { - margin-left: 0; -} -@media (min-width: 768px) { - .modal-dialog { - width: 600px; - margin: 30px auto; - } - .modal-content { - -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5); - box-shadow: 0 5px 15px rgba(0, 0, 0, .5); - } - .modal-sm { - width: 300px; - } -} -@media (min-width: 992px) { - .modal-lg { - width: 900px; - } -} -.tooltip { - position: absolute; - z-index: 1030; - display: block; - font-size: 12px; - line-height: 1.4; - visibility: visible; - filter: alpha(opacity=0); - opacity: 0; -} -.tooltip.in { - filter: alpha(opacity=90); - opacity: .9; -} -.tooltip.top { - padding: 5px 0; - margin-top: -3px; -} -.tooltip.right { - padding: 0 5px; - margin-left: 3px; -} -.tooltip.bottom { - padding: 5px 0; - margin-top: 3px; -} -.tooltip.left { - padding: 0 5px; - margin-left: -3px; -} -.tooltip-inner { - max-width: 200px; - padding: 3px 8px; - color: #fff; - text-align: center; - text-decoration: none; - background-color: #000; - border-radius: 4px; -} -.tooltip-arrow { - position: absolute; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} -.tooltip.top .tooltip-arrow { - bottom: 0; - left: 50%; - margin-left: -5px; - border-width: 5px 5px 0; - border-top-color: #000; -} -.tooltip.top-left .tooltip-arrow { - bottom: 0; - left: 5px; - border-width: 5px 5px 0; - border-top-color: #000; -} -.tooltip.top-right .tooltip-arrow { - right: 5px; - bottom: 0; - border-width: 5px 5px 0; - border-top-color: #000; -} -.tooltip.right .tooltip-arrow { - top: 50%; - left: 0; - margin-top: -5px; - border-width: 5px 5px 5px 0; - border-right-color: #000; -} -.tooltip.left .tooltip-arrow { - top: 50%; - right: 0; - margin-top: -5px; - border-width: 5px 0 5px 5px; - border-left-color: #000; -} -.tooltip.bottom .tooltip-arrow { - top: 0; - left: 50%; - margin-left: -5px; - border-width: 0 5px 5px; - border-bottom-color: #000; -} -.tooltip.bottom-left .tooltip-arrow { - top: 0; - left: 5px; - border-width: 0 5px 5px; - border-bottom-color: #000; -} -.tooltip.bottom-right .tooltip-arrow { - top: 0; - right: 5px; - border-width: 0 5px 5px; - border-bottom-color: #000; -} -.popover { - position: absolute; - top: 0; - left: 0; - z-index: 1010; - display: none; - max-width: 276px; - padding: 1px; - text-align: left; - white-space: normal; - background-color: #fff; - background-clip: padding-box; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, .2); - border-radius: 6px; - -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2); - box-shadow: 0 5px 10px rgba(0, 0, 0, .2); -} -.popover.top { - margin-top: -10px; -} -.popover.right { - margin-left: 10px; -} -.popover.bottom { - margin-top: 10px; -} -.popover.left { - margin-left: -10px; -} -.popover-title { - padding: 8px 14px; - margin: 0; - font-size: 14px; - font-weight: normal; - line-height: 18px; - background-color: #f7f7f7; - border-bottom: 1px solid #ebebeb; - border-radius: 5px 5px 0 0; -} -.popover-content { - padding: 9px 14px; -} -.popover > .arrow, -.popover > .arrow:after { - position: absolute; - display: block; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} -.popover > .arrow { - border-width: 11px; -} -.popover > .arrow:after { - content: ""; - border-width: 10px; -} -.popover.top > .arrow { - bottom: -11px; - left: 50%; - margin-left: -11px; - border-top-color: #999; - border-top-color: rgba(0, 0, 0, .25); - border-bottom-width: 0; -} -.popover.top > .arrow:after { - bottom: 1px; - margin-left: -10px; - content: " "; - border-top-color: #fff; - border-bottom-width: 0; -} -.popover.right > .arrow { - top: 50%; - left: -11px; - margin-top: -11px; - border-right-color: #999; - border-right-color: rgba(0, 0, 0, .25); - border-left-width: 0; -} -.popover.right > .arrow:after { - bottom: -10px; - left: 1px; - content: " "; - border-right-color: #fff; - border-left-width: 0; -} -.popover.bottom > .arrow { - top: -11px; - left: 50%; - margin-left: -11px; - border-top-width: 0; - border-bottom-color: #999; - border-bottom-color: rgba(0, 0, 0, .25); -} -.popover.bottom > .arrow:after { - top: 1px; - margin-left: -10px; - content: " "; - border-top-width: 0; - border-bottom-color: #fff; -} -.popover.left > .arrow { - top: 50%; - right: -11px; - margin-top: -11px; - border-right-width: 0; - border-left-color: #999; - border-left-color: rgba(0, 0, 0, .25); -} -.popover.left > .arrow:after { - right: 1px; - bottom: -10px; - content: " "; - border-right-width: 0; - border-left-color: #fff; -} -.carousel { - position: relative; -} -.carousel-inner { - position: relative; - width: 100%; - overflow: hidden; -} -.carousel-inner > .item { - position: relative; - display: none; - -webkit-transition: .6s ease-in-out left; - transition: .6s ease-in-out left; -} -.carousel-inner > .item > img, -.carousel-inner > .item > a > img { - line-height: 1; -} -.carousel-inner > .active, -.carousel-inner > .next, -.carousel-inner > .prev { - display: block; -} -.carousel-inner > .active { - left: 0; -} -.carousel-inner > .next, -.carousel-inner > .prev { - position: absolute; - top: 0; - width: 100%; -} -.carousel-inner > .next { - left: 100%; -} -.carousel-inner > .prev { - left: -100%; -} -.carousel-inner > .next.left, -.carousel-inner > .prev.right { - left: 0; -} -.carousel-inner > .active.left { - left: -100%; -} -.carousel-inner > .active.right { - left: 100%; -} -.carousel-control { - position: absolute; - top: 0; - bottom: 0; - left: 0; - width: 15%; - font-size: 20px; - color: #fff; - text-align: center; - text-shadow: 0 1px 2px rgba(0, 0, 0, .6); - filter: alpha(opacity=50); - opacity: .5; -} -.carousel-control.left { - background-image: -webkit-linear-gradient(left, color-stop(rgba(0, 0, 0, .5) 0%), color-stop(rgba(0, 0, 0, .0001) 100%)); - background-image: linear-gradient(to right, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1); - background-repeat: repeat-x; -} -.carousel-control.right { - right: 0; - left: auto; - background-image: -webkit-linear-gradient(left, color-stop(rgba(0, 0, 0, .0001) 0%), color-stop(rgba(0, 0, 0, .5) 100%)); - background-image: linear-gradient(to right, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1); - background-repeat: repeat-x; -} -.carousel-control:hover, -.carousel-control:focus { - color: #fff; - text-decoration: none; - filter: alpha(opacity=90); - outline: none; - opacity: .9; -} -.carousel-control .icon-prev, -.carousel-control .icon-next, -.carousel-control .glyphicon-chevron-left, -.carousel-control .glyphicon-chevron-right { - position: absolute; - top: 50%; - z-index: 5; - display: inline-block; -} -.carousel-control .icon-prev, -.carousel-control .glyphicon-chevron-left { - left: 50%; -} -.carousel-control .icon-next, -.carousel-control .glyphicon-chevron-right { - right: 50%; -} -.carousel-control .icon-prev, -.carousel-control .icon-next { - width: 20px; - height: 20px; - margin-top: -10px; - margin-left: -10px; - font-family: serif; -} -.carousel-control .icon-prev:before { - content: '\2039'; -} -.carousel-control .icon-next:before { - content: '\203a'; -} -.carousel-indicators { - position: absolute; - bottom: 10px; - left: 50%; - z-index: 15; - width: 60%; - padding-left: 0; - margin-left: -30%; - text-align: center; - list-style: none; -} -.carousel-indicators li { - display: inline-block; - width: 10px; - height: 10px; - margin: 1px; - text-indent: -999px; - cursor: pointer; - background-color: #000 \9; - background-color: rgba(0, 0, 0, 0); - border: 1px solid #fff; - border-radius: 10px; -} -.carousel-indicators .active { - width: 12px; - height: 12px; - margin: 0; - background-color: #fff; -} -.carousel-caption { - position: absolute; - right: 15%; - bottom: 20px; - left: 15%; - z-index: 10; - padding-top: 20px; - padding-bottom: 20px; - color: #fff; - text-align: center; - text-shadow: 0 1px 2px rgba(0, 0, 0, .6); -} -.carousel-caption .btn { - text-shadow: none; -} -@media screen and (min-width: 768px) { - .carousel-control .glyphicon-chevron-left, - .carousel-control .glyphicon-chevron-right, - .carousel-control .icon-prev, - .carousel-control .icon-next { - width: 30px; - height: 30px; - margin-top: -15px; - margin-left: -15px; - font-size: 30px; - } - .carousel-caption { - right: 20%; - left: 20%; - padding-bottom: 30px; - } - .carousel-indicators { - bottom: 20px; - } -} -.clearfix:before, -.clearfix:after, -.container:before, -.container:after, -.container-fluid:before, -.container-fluid:after, -.row:before, -.row:after, -.form-horizontal .form-group:before, -.form-horizontal .form-group:after, -.btn-toolbar:before, -.btn-toolbar:after, -.btn-group-vertical > .btn-group:before, -.btn-group-vertical > .btn-group:after, -.nav:before, -.nav:after, -.navbar:before, -.navbar:after, -.navbar-header:before, -.navbar-header:after, -.navbar-collapse:before, -.navbar-collapse:after, -.pager:before, -.pager:after, -.panel-body:before, -.panel-body:after, -.modal-footer:before, -.modal-footer:after { - display: table; - content: " "; -} -.clearfix:after, -.container:after, -.container-fluid:after, -.row:after, -.form-horizontal .form-group:after, -.btn-toolbar:after, -.btn-group-vertical > .btn-group:after, -.nav:after, -.navbar:after, -.navbar-header:after, -.navbar-collapse:after, -.pager:after, -.panel-body:after, -.modal-footer:after { - clear: both; -} -.center-block { - display: block; - margin-right: auto; - margin-left: auto; -} -.pull-right { - float: right !important; -} -.pull-left { - float: left !important; -} -.hide { - display: none !important; -} -.show { - display: block !important; -} -.invisible { - visibility: hidden; -} -.text-hide { - font: 0/0 a; - color: transparent; - text-shadow: none; - background-color: transparent; - border: 0; -} -.hidden { - display: none !important; - visibility: hidden !important; -} -.affix { - position: fixed; -} -@-ms-viewport { - width: device-width; -} -.visible-xs, -.visible-sm, -.visible-md, -.visible-lg { - display: none !important; -} -@media (max-width: 767px) { - .visible-xs { - display: block !important; - } - table.visible-xs { - display: table; - } - tr.visible-xs { - display: table-row !important; - } - th.visible-xs, - td.visible-xs { - display: table-cell !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .visible-sm { - display: block !important; - } - table.visible-sm { - display: table; - } - tr.visible-sm { - display: table-row !important; - } - th.visible-sm, - td.visible-sm { - display: table-cell !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .visible-md { - display: block !important; - } - table.visible-md { - display: table; - } - tr.visible-md { - display: table-row !important; - } - th.visible-md, - td.visible-md { - display: table-cell !important; - } -} -@media (min-width: 1200px) { - .visible-lg { - display: block !important; - } - table.visible-lg { - display: table; - } - tr.visible-lg { - display: table-row !important; - } - th.visible-lg, - td.visible-lg { - display: table-cell !important; - } -} -@media (max-width: 767px) { - .hidden-xs { - display: none !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .hidden-sm { - display: none !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .hidden-md { - display: none !important; - } -} -@media (min-width: 1200px) { - .hidden-lg { - display: none !important; - } -} -.visible-print { - display: none !important; -} -@media print { - .visible-print { - display: block !important; - } - table.visible-print { - display: table; - } - tr.visible-print { - display: table-row !important; - } - th.visible-print, - td.visible-print { - display: table-cell !important; - } -} -@media print { - .hidden-print { - display: none !important; - } -} -/*# sourceMappingURL=bootstrap.css.map */ diff --git a/public/assets/css/bootstrap.css.map b/public/assets/css/bootstrap.css.map deleted file mode 100644 index 6bc5a2d..0000000 --- a/public/assets/css/bootstrap.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["less/normalize.less","less/print.less","less/scaffolding.less","less/mixins.less","less/variables.less","less/thumbnails.less","less/carousel.less","less/type.less","less/code.less","less/grid.less","less/tables.less","less/forms.less","less/buttons.less","less/button-groups.less","less/component-animations.less","less/glyphicons.less","less/dropdowns.less","less/input-groups.less","less/navs.less","less/navbar.less","less/utilities.less","less/breadcrumbs.less","less/pagination.less","less/pager.less","less/labels.less","less/badges.less","less/jumbotron.less","less/alerts.less","less/progress-bars.less","less/media.less","less/list-group.less","less/panels.less","less/wells.less","less/close.less","less/modals.less","less/tooltip.less","less/popovers.less","less/responsive-utilities.less"],"names":[],"mappings":"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","sourcesContent":["/*! normalize.css v3.0.0 | MIT License | git.io/normalize */\n\n//\n// 1. Set default font family to sans-serif.\n// 2. Prevent iOS text size adjust after orientation change, without disabling\n// user zoom.\n//\n\nhtml {\n font-family: sans-serif; // 1\n -ms-text-size-adjust: 100%; // 2\n -webkit-text-size-adjust: 100%; // 2\n}\n\n//\n// Remove default margin.\n//\n\nbody {\n margin: 0;\n}\n\n// HTML5 display definitions\n// ==========================================================================\n\n//\n// Correct `block` display not defined in IE 8/9.\n//\n\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nnav,\nsection,\nsummary {\n display: block;\n}\n\n//\n// 1. Correct `inline-block` display not defined in IE 8/9.\n// 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.\n//\n\naudio,\ncanvas,\nprogress,\nvideo {\n display: inline-block; // 1\n vertical-align: baseline; // 2\n}\n\n//\n// Prevent modern browsers from displaying `audio` without controls.\n// Remove excess height in iOS 5 devices.\n//\n\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n\n//\n// Address `[hidden]` styling not present in IE 8/9.\n// Hide the `template` element in IE, Safari, and Firefox < 22.\n//\n\n[hidden],\ntemplate {\n display: none;\n}\n\n// Links\n// ==========================================================================\n\n//\n// Remove the gray background color from active links in IE 10.\n//\n\na {\n background: transparent;\n}\n\n//\n// Improve readability when focused and also mouse hovered in all browsers.\n//\n\na:active,\na:hover {\n outline: 0;\n}\n\n// Text-level semantics\n// ==========================================================================\n\n//\n// Address styling not present in IE 8/9, Safari 5, and Chrome.\n//\n\nabbr[title] {\n border-bottom: 1px dotted;\n}\n\n//\n// Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.\n//\n\nb,\nstrong {\n font-weight: bold;\n}\n\n//\n// Address styling not present in Safari 5 and Chrome.\n//\n\ndfn {\n font-style: italic;\n}\n\n//\n// Address variable `h1` font-size and margin within `section` and `article`\n// contexts in Firefox 4+, Safari 5, and Chrome.\n//\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n//\n// Address styling not present in IE 8/9.\n//\n\nmark {\n background: #ff0;\n color: #000;\n}\n\n//\n// Address inconsistent and variable font size in all browsers.\n//\n\nsmall {\n font-size: 80%;\n}\n\n//\n// Prevent `sub` and `sup` affecting `line-height` in all browsers.\n//\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsup {\n top: -0.5em;\n}\n\nsub {\n bottom: -0.25em;\n}\n\n// Embedded content\n// ==========================================================================\n\n//\n// Remove border when inside `a` element in IE 8/9.\n//\n\nimg {\n border: 0;\n}\n\n//\n// Correct overflow displayed oddly in IE 9.\n//\n\nsvg:not(:root) {\n overflow: hidden;\n}\n\n// Grouping content\n// ==========================================================================\n\n//\n// Address margin not present in IE 8/9 and Safari 5.\n//\n\nfigure {\n margin: 1em 40px;\n}\n\n//\n// Address differences between Firefox and other browsers.\n//\n\nhr {\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n height: 0;\n}\n\n//\n// Contain overflow in all browsers.\n//\n\npre {\n overflow: auto;\n}\n\n//\n// Address odd `em`-unit font size rendering in all browsers.\n//\n\ncode,\nkbd,\npre,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\n\n// Forms\n// ==========================================================================\n\n//\n// Known limitation: by default, Chrome and Safari on OS X allow very limited\n// styling of `select`, unless a `border` property is set.\n//\n\n//\n// 1. Correct color not being inherited.\n// Known issue: affects color of disabled elements.\n// 2. Correct font properties not being inherited.\n// 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.\n//\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n color: inherit; // 1\n font: inherit; // 2\n margin: 0; // 3\n}\n\n//\n// Address `overflow` set to `hidden` in IE 8/9/10.\n//\n\nbutton {\n overflow: visible;\n}\n\n//\n// Address inconsistent `text-transform` inheritance for `button` and `select`.\n// All other form control elements do not inherit `text-transform` values.\n// Correct `button` style inheritance in Firefox, IE 8+, and Opera\n// Correct `select` style inheritance in Firefox.\n//\n\nbutton,\nselect {\n text-transform: none;\n}\n\n//\n// 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`\n// and `video` controls.\n// 2. Correct inability to style clickable `input` types in iOS.\n// 3. Improve usability and consistency of cursor style between image-type\n// `input` and others.\n//\n\nbutton,\nhtml input[type=\"button\"], // 1\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n -webkit-appearance: button; // 2\n cursor: pointer; // 3\n}\n\n//\n// Re-set default cursor for disabled elements.\n//\n\nbutton[disabled],\nhtml input[disabled] {\n cursor: default;\n}\n\n//\n// Remove inner padding and border in Firefox 4+.\n//\n\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\n\n//\n// Address Firefox 4+ setting `line-height` on `input` using `!important` in\n// the UA stylesheet.\n//\n\ninput {\n line-height: normal;\n}\n\n//\n// It's recommended that you don't attempt to style these elements.\n// Firefox's implementation doesn't respect box-sizing, padding, or width.\n//\n// 1. Address box sizing set to `content-box` in IE 8/9/10.\n// 2. Remove excess padding in IE 8/9/10.\n//\n\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n box-sizing: border-box; // 1\n padding: 0; // 2\n}\n\n//\n// Fix the cursor style for Chrome's increment/decrement buttons. For certain\n// `font-size` values of the `input`, it causes the cursor style of the\n// decrement button to change from `default` to `text`.\n//\n\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n//\n// 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.\n// 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome\n// (include `-moz` to future-proof).\n//\n\ninput[type=\"search\"] {\n -webkit-appearance: textfield; // 1\n -moz-box-sizing: content-box;\n -webkit-box-sizing: content-box; // 2\n box-sizing: content-box;\n}\n\n//\n// Remove inner padding and search cancel button in Safari and Chrome on OS X.\n// Safari (but not Chrome) clips the cancel button when the search input has\n// padding (and `textfield` appearance).\n//\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n//\n// Define consistent border, margin, and padding.\n//\n\nfieldset {\n border: 1px solid #c0c0c0;\n margin: 0 2px;\n padding: 0.35em 0.625em 0.75em;\n}\n\n//\n// 1. Correct `color` not being inherited in IE 8/9.\n// 2. Remove padding so people aren't caught out if they zero out fieldsets.\n//\n\nlegend {\n border: 0; // 1\n padding: 0; // 2\n}\n\n//\n// Remove default vertical scrollbar in IE 8/9.\n//\n\ntextarea {\n overflow: auto;\n}\n\n//\n// Don't inherit the `font-weight` (applied by a rule above).\n// NOTE: the default cannot safely be changed in Chrome and Safari on OS X.\n//\n\noptgroup {\n font-weight: bold;\n}\n\n// Tables\n// ==========================================================================\n\n//\n// Remove most spacing between table cells.\n//\n\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\n\ntd,\nth {\n padding: 0;\n}","//\n// Basic print styles\n// --------------------------------------------------\n// Source: https://github.com/h5bp/html5-boilerplate/blob/master/css/main.css\n\n@media print {\n\n * {\n text-shadow: none !important;\n color: #000 !important; // Black prints faster: h5bp.com/s\n background: transparent !important;\n box-shadow: none !important;\n }\n\n a,\n a:visited {\n text-decoration: underline;\n }\n\n a[href]:after {\n content: \" (\" attr(href) \")\";\n }\n\n abbr[title]:after {\n content: \" (\" attr(title) \")\";\n }\n\n // Don't show links for images, or javascript/internal links\n a[href^=\"javascript:\"]:after,\n a[href^=\"#\"]:after {\n content: \"\";\n }\n\n pre,\n blockquote {\n border: 1px solid #999;\n page-break-inside: avoid;\n }\n\n thead {\n display: table-header-group; // h5bp.com/t\n }\n\n tr,\n img {\n page-break-inside: avoid;\n }\n\n img {\n max-width: 100% !important;\n }\n\n p,\n h2,\n h3 {\n orphans: 3;\n widows: 3;\n }\n\n h2,\n h3 {\n page-break-after: avoid;\n }\n\n // Chrome (OSX) fix for https://github.com/twbs/bootstrap/issues/11245\n // Once fixed, we can just straight up remove this.\n select {\n background: #fff !important;\n }\n\n // Bootstrap components\n .navbar {\n display: none;\n }\n .table {\n td,\n th {\n background-color: #fff !important;\n }\n }\n .btn,\n .dropup > .btn {\n > .caret {\n border-top-color: #000 !important;\n }\n }\n .label {\n border: 1px solid #000;\n }\n\n .table {\n border-collapse: collapse !important;\n }\n .table-bordered {\n th,\n td {\n border: 1px solid #ddd !important;\n }\n }\n\n}\n","//\n// Scaffolding\n// --------------------------------------------------\n\n\n// Reset the box-sizing\n//\n// Heads up! This reset may cause conflicts with some third-party widgets.\n// For recommendations on resolving such conflicts, see\n// http://getbootstrap.com/getting-started/#third-box-sizing\n* {\n .box-sizing(border-box);\n}\n*:before,\n*:after {\n .box-sizing(border-box);\n}\n\n\n// Body reset\n\nhtml {\n font-size: 62.5%;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n}\n\nbody {\n font-family: @font-family-base;\n font-size: @font-size-base;\n line-height: @line-height-base;\n color: @text-color;\n background-color: @body-bg;\n}\n\n// Reset fonts for relevant elements\ninput,\nbutton,\nselect,\ntextarea {\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n}\n\n\n// Links\n\na {\n color: @link-color;\n text-decoration: none;\n\n &:hover,\n &:focus {\n color: @link-hover-color;\n text-decoration: underline;\n }\n\n &:focus {\n .tab-focus();\n }\n}\n\n\n// Figures\n//\n// We reset this here because previously Normalize had no `figure` margins. This\n// ensures we don't break anyone's use of the element.\n\nfigure {\n margin: 0;\n}\n\n\n// Images\n\nimg {\n vertical-align: middle;\n}\n\n// Responsive images (ensure images don't scale beyond their parents)\n.img-responsive {\n .img-responsive();\n}\n\n// Rounded corners\n.img-rounded {\n border-radius: @border-radius-large;\n}\n\n// Image thumbnails\n//\n// Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`.\n.img-thumbnail {\n padding: @thumbnail-padding;\n line-height: @line-height-base;\n background-color: @thumbnail-bg;\n border: 1px solid @thumbnail-border;\n border-radius: @thumbnail-border-radius;\n .transition(all .2s ease-in-out);\n\n // Keep them at most 100% wide\n .img-responsive(inline-block);\n}\n\n// Perfect circle\n.img-circle {\n border-radius: 50%; // set radius in percents\n}\n\n\n// Horizontal rules\n\nhr {\n margin-top: @line-height-computed;\n margin-bottom: @line-height-computed;\n border: 0;\n border-top: 1px solid @hr-border;\n}\n\n\n// Only display content to screen readers\n//\n// See: http://a11yproject.com/posts/how-to-hide-content/\n\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0,0,0,0);\n border: 0;\n}\n","//\n// Mixins\n// --------------------------------------------------\n\n\n// Utilities\n// -------------------------\n\n// Clearfix\n// Source: http://nicolasgallagher.com/micro-clearfix-hack/\n//\n// For modern browsers\n// 1. The space content is one way to avoid an Opera bug when the\n// contenteditable attribute is included anywhere else in the document.\n// Otherwise it causes space to appear at the top and bottom of elements\n// that are clearfixed.\n// 2. The use of `table` rather than `block` is only necessary if using\n// `:before` to contain the top-margins of child elements.\n.clearfix() {\n &:before,\n &:after {\n content: \" \"; // 1\n display: table; // 2\n }\n &:after {\n clear: both;\n }\n}\n\n// WebKit-style focus\n.tab-focus() {\n // Default\n outline: thin dotted;\n // WebKit\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\n\n// Center-align a block level element\n.center-block() {\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n\n// Sizing shortcuts\n.size(@width; @height) {\n width: @width;\n height: @height;\n}\n.square(@size) {\n .size(@size; @size);\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n &::-moz-placeholder { color: @color; // Firefox\n opacity: 1; } // See https://github.com/twbs/bootstrap/pull/11526\n &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n &::-webkit-input-placeholder { color: @color; } // Safari and Chrome\n}\n\n// Text overflow\n// Requires inline-block or block for proper styling\n.text-overflow() {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n// CSS image replacement\n//\n// Heads up! v3 launched with with only `.hide-text()`, but per our pattern for\n// mixins being reused as classes with the same name, this doesn't hold up. As\n// of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`. Note\n// that we cannot chain the mixins together in Less, so they are repeated.\n//\n// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757\n\n// Deprecated as of v3.0.1 (will be removed in v4)\n.hide-text() {\n font: ~\"0/0\" a;\n color: transparent;\n text-shadow: none;\n background-color: transparent;\n border: 0;\n}\n// New mixin to use as of v3.0.1\n.text-hide() {\n .hide-text();\n}\n\n\n\n// CSS3 PROPERTIES\n// --------------------------------------------------\n\n// Single side border-radius\n.border-top-radius(@radius) {\n border-top-right-radius: @radius;\n border-top-left-radius: @radius;\n}\n.border-right-radius(@radius) {\n border-bottom-right-radius: @radius;\n border-top-right-radius: @radius;\n}\n.border-bottom-radius(@radius) {\n border-bottom-right-radius: @radius;\n border-bottom-left-radius: @radius;\n}\n.border-left-radius(@radius) {\n border-bottom-left-radius: @radius;\n border-top-left-radius: @radius;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support the\n// standard `box-shadow` property.\n.box-shadow(@shadow) {\n -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n box-shadow: @shadow;\n}\n\n// Transitions\n.transition(@transition) {\n -webkit-transition: @transition;\n transition: @transition;\n}\n.transition-property(@transition-property) {\n -webkit-transition-property: @transition-property;\n transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n -webkit-transition-delay: @transition-delay;\n transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n -webkit-transition-duration: @transition-duration;\n transition-duration: @transition-duration;\n}\n.transition-transform(@transition) {\n -webkit-transition: -webkit-transform @transition;\n -moz-transition: -moz-transform @transition;\n -o-transition: -o-transform @transition;\n transition: transform @transition;\n}\n\n// Transformations\n.rotate(@degrees) {\n -webkit-transform: rotate(@degrees);\n -ms-transform: rotate(@degrees); // IE9 only\n transform: rotate(@degrees);\n}\n.scale(@ratio; @ratio-y...) {\n -webkit-transform: scale(@ratio, @ratio-y);\n -ms-transform: scale(@ratio, @ratio-y); // IE9 only\n transform: scale(@ratio, @ratio-y);\n}\n.translate(@x; @y) {\n -webkit-transform: translate(@x, @y);\n -ms-transform: translate(@x, @y); // IE9 only\n transform: translate(@x, @y);\n}\n.skew(@x; @y) {\n -webkit-transform: skew(@x, @y);\n -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n transform: skew(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n -webkit-transform: translate3d(@x, @y, @z);\n transform: translate3d(@x, @y, @z);\n}\n\n.rotateX(@degrees) {\n -webkit-transform: rotateX(@degrees);\n -ms-transform: rotateX(@degrees); // IE9 only\n transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n -webkit-transform: rotateY(@degrees);\n -ms-transform: rotateY(@degrees); // IE9 only\n transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n -webkit-perspective: @perspective;\n -moz-perspective: @perspective;\n perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n -webkit-perspective-origin: @perspective;\n -moz-perspective-origin: @perspective;\n perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n -webkit-transform-origin: @origin;\n -moz-transform-origin: @origin;\n -ms-transform-origin: @origin; // IE9 only\n transform-origin: @origin;\n}\n\n// Animations\n.animation(@animation) {\n -webkit-animation: @animation;\n animation: @animation;\n}\n.animation-name(@name) {\n -webkit-animation-name: @name;\n animation-name: @name;\n}\n.animation-duration(@duration) {\n -webkit-animation-duration: @duration;\n animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n -webkit-animation-timing-function: @timing-function;\n animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n -webkit-animation-delay: @delay;\n animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n -webkit-animation-iteration-count: @iteration-count;\n animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n -webkit-animation-direction: @direction;\n animation-direction: @direction;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n.backface-visibility(@visibility){\n -webkit-backface-visibility: @visibility;\n -moz-backface-visibility: @visibility;\n backface-visibility: @visibility;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n -webkit-box-sizing: @boxmodel;\n -moz-box-sizing: @boxmodel;\n box-sizing: @boxmodel;\n}\n\n// User select\n// For selecting text on the page\n.user-select(@select) {\n -webkit-user-select: @select;\n -moz-user-select: @select;\n -ms-user-select: @select; // IE10+\n user-select: @select;\n}\n\n// Resize anything\n.resizable(@direction) {\n resize: @direction; // Options: horizontal, vertical, both\n overflow: auto; // Safari fix\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n -webkit-column-count: @column-count;\n -moz-column-count: @column-count;\n column-count: @column-count;\n -webkit-column-gap: @column-gap;\n -moz-column-gap: @column-gap;\n column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n word-wrap: break-word;\n -webkit-hyphens: @mode;\n -moz-hyphens: @mode;\n -ms-hyphens: @mode; // IE10+\n -o-hyphens: @mode;\n hyphens: @mode;\n}\n\n// Opacity\n.opacity(@opacity) {\n opacity: @opacity;\n // IE8 filter\n @opacity-ie: (@opacity * 100);\n filter: ~\"alpha(opacity=@{opacity-ie})\";\n}\n\n\n\n// GRADIENTS\n// --------------------------------------------------\n\n#gradient {\n\n // Horizontal gradient, from left to right\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(left, color-stop(@start-color @start-percent), color-stop(@end-color @end-percent)); // Safari 5.1-6, Chrome 10+\n background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n // Vertical gradient, from top to bottom\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n background-repeat: repeat-x;\n background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n }\n .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .radial(@inner-color: #555; @outer-color: #333) {\n background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n background-image: radial-gradient(circle, @inner-color, @outer-color);\n background-repeat: no-repeat;\n }\n .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n }\n}\n\n// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the IE filter for IE9 and below.\n.reset-filter() {\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n\n\n\n// Retina images\n//\n// Short retina mixin for setting background-image and -size\n\n.img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {\n background-image: url(\"@{file-1x}\");\n\n @media\n only screen and (-webkit-min-device-pixel-ratio: 2),\n only screen and ( min--moz-device-pixel-ratio: 2),\n only screen and ( -o-min-device-pixel-ratio: 2/1),\n only screen and ( min-device-pixel-ratio: 2),\n only screen and ( min-resolution: 192dpi),\n only screen and ( min-resolution: 2dppx) {\n background-image: url(\"@{file-2x}\");\n background-size: @width-1x @height-1x;\n }\n}\n\n\n// Responsive image\n//\n// Keep images from scaling beyond the width of their parents.\n\n.img-responsive(@display: block) {\n display: @display;\n max-width: 100%; // Part 1: Set a maximum relative to the parent\n height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching\n}\n\n\n// COMPONENT MIXINS\n// --------------------------------------------------\n\n// Horizontal dividers\n// -------------------------\n// Dividers (basically an hr) within dropdowns and nav lists\n.nav-divider(@color: #e5e5e5) {\n height: 1px;\n margin: ((@line-height-computed / 2) - 1) 0;\n overflow: hidden;\n background-color: @color;\n}\n\n// Panels\n// -------------------------\n.panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) {\n border-color: @border;\n\n & > .panel-heading {\n color: @heading-text-color;\n background-color: @heading-bg-color;\n border-color: @heading-border;\n\n + .panel-collapse .panel-body {\n border-top-color: @border;\n }\n }\n & > .panel-footer {\n + .panel-collapse .panel-body {\n border-bottom-color: @border;\n }\n }\n}\n\n// Alerts\n// -------------------------\n.alert-variant(@background; @border; @text-color) {\n background-color: @background;\n border-color: @border;\n color: @text-color;\n\n hr {\n border-top-color: darken(@border, 5%);\n }\n .alert-link {\n color: darken(@text-color, 10%);\n }\n}\n\n// Tables\n// -------------------------\n.table-row-variant(@state; @background) {\n // Exact selectors below required to override `.table-striped` and prevent\n // inheritance to nested tables.\n .table > thead > tr,\n .table > tbody > tr,\n .table > tfoot > tr {\n > td.@{state},\n > th.@{state},\n &.@{state} > td,\n &.@{state} > th {\n background-color: @background;\n }\n }\n\n // Hover states for `.table-hover`\n // Note: this is not available for cells or rows within `thead` or `tfoot`.\n .table-hover > tbody > tr {\n > td.@{state}:hover,\n > th.@{state}:hover,\n &.@{state}:hover > td,\n &.@{state}:hover > th {\n background-color: darken(@background, 5%);\n }\n }\n}\n\n// List Groups\n// -------------------------\n.list-group-item-variant(@state; @background; @color) {\n .list-group-item-@{state} {\n color: @color;\n background-color: @background;\n\n a& {\n color: @color;\n\n .list-group-item-heading { color: inherit; }\n\n &:hover,\n &:focus {\n color: @color;\n background-color: darken(@background, 5%);\n }\n &.active,\n &.active:hover,\n &.active:focus {\n color: #fff;\n background-color: @color;\n border-color: @color;\n }\n }\n }\n}\n\n// Button variants\n// -------------------------\n// Easily pump out default styles, as well as :hover, :focus, :active,\n// and disabled options for all buttons\n.button-variant(@color; @background; @border) {\n color: @color;\n background-color: @background;\n border-color: @border;\n\n &:hover,\n &:focus,\n &:active,\n &.active,\n .open .dropdown-toggle& {\n color: @color;\n background-color: darken(@background, 8%);\n border-color: darken(@border, 12%);\n }\n &:active,\n &.active,\n .open .dropdown-toggle& {\n background-image: none;\n }\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n &,\n &:hover,\n &:focus,\n &:active,\n &.active {\n background-color: @background;\n border-color: @border;\n }\n }\n\n .badge {\n color: @background;\n background-color: @color;\n }\n}\n\n// Button sizes\n// -------------------------\n.button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n padding: @padding-vertical @padding-horizontal;\n font-size: @font-size;\n line-height: @line-height;\n border-radius: @border-radius;\n}\n\n// Pagination\n// -------------------------\n.pagination-size(@padding-vertical; @padding-horizontal; @font-size; @border-radius) {\n > li {\n > a,\n > span {\n padding: @padding-vertical @padding-horizontal;\n font-size: @font-size;\n }\n &:first-child {\n > a,\n > span {\n .border-left-radius(@border-radius);\n }\n }\n &:last-child {\n > a,\n > span {\n .border-right-radius(@border-radius);\n }\n }\n }\n}\n\n// Labels\n// -------------------------\n.label-variant(@color) {\n background-color: @color;\n &[href] {\n &:hover,\n &:focus {\n background-color: darken(@color, 10%);\n }\n }\n}\n\n// Contextual backgrounds\n// -------------------------\n.bg-variant(@color) {\n background-color: @color;\n a&:hover {\n background-color: darken(@color, 10%);\n }\n}\n\n// Typography\n// -------------------------\n.text-emphasis-variant(@color) {\n color: @color;\n a&:hover {\n color: darken(@color, 10%);\n }\n}\n\n// Navbar vertical align\n// -------------------------\n// Vertically center elements in the navbar.\n// Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.\n.navbar-vertical-align(@element-height) {\n margin-top: ((@navbar-height - @element-height) / 2);\n margin-bottom: ((@navbar-height - @element-height) / 2);\n}\n\n// Progress bars\n// -------------------------\n.progress-bar-variant(@color) {\n background-color: @color;\n .progress-striped & {\n #gradient > .striped();\n }\n}\n\n// Responsive utilities\n// -------------------------\n// More easily include all the states for responsive-utilities.less.\n.responsive-visibility() {\n display: block !important;\n table& { display: table; }\n tr& { display: table-row !important; }\n th&,\n td& { display: table-cell !important; }\n}\n\n.responsive-invisibility() {\n display: none !important;\n}\n\n\n// Grid System\n// -----------\n\n// Centered container element\n.container-fixed() {\n margin-right: auto;\n margin-left: auto;\n padding-left: (@grid-gutter-width / 2);\n padding-right: (@grid-gutter-width / 2);\n &:extend(.clearfix all);\n}\n\n// Creates a wrapper for a series of columns\n.make-row(@gutter: @grid-gutter-width) {\n margin-left: (@gutter / -2);\n margin-right: (@gutter / -2);\n &:extend(.clearfix all);\n}\n\n// Generate the extra small columns\n.make-xs-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n float: left;\n width: percentage((@columns / @grid-columns));\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n}\n.make-xs-column-offset(@columns) {\n @media (min-width: @screen-xs-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-xs-column-push(@columns) {\n @media (min-width: @screen-xs-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-xs-column-pull(@columns) {\n @media (min-width: @screen-xs-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n\n\n// Generate the small columns\n.make-sm-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-sm-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-offset(@columns) {\n @media (min-width: @screen-sm-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-push(@columns) {\n @media (min-width: @screen-sm-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-pull(@columns) {\n @media (min-width: @screen-sm-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n\n\n// Generate the medium columns\n.make-md-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-md-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-offset(@columns) {\n @media (min-width: @screen-md-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-push(@columns) {\n @media (min-width: @screen-md-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-pull(@columns) {\n @media (min-width: @screen-md-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n\n\n// Generate the large columns\n.make-lg-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-lg-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-offset(@columns) {\n @media (min-width: @screen-lg-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-push(@columns) {\n @media (min-width: @screen-lg-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-pull(@columns) {\n @media (min-width: @screen-lg-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n\n\n// Framework grid generation\n//\n// Used only by Bootstrap to generate the correct number of grid classes given\n// any value of `@grid-columns`.\n\n.make-grid-columns() {\n // Common styles for all sizes of grid columns, widths 1-12\n .col(@index) when (@index = 1) { // initial\n @item: ~\".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}\";\n .col((@index + 1), @item);\n }\n .col(@index, @list) when (@index =< @grid-columns) { // general; \"=<\" isn't a typo\n @item: ~\".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}\";\n .col((@index + 1), ~\"@{list}, @{item}\");\n }\n .col(@index, @list) when (@index > @grid-columns) { // terminal\n @{list} {\n position: relative;\n // Prevent columns from collapsing when empty\n min-height: 1px;\n // Inner gutter via padding\n padding-left: (@grid-gutter-width / 2);\n padding-right: (@grid-gutter-width / 2);\n }\n }\n .col(1); // kickstart it\n}\n\n.float-grid-columns(@class) {\n .col(@index) when (@index = 1) { // initial\n @item: ~\".col-@{class}-@{index}\";\n .col((@index + 1), @item);\n }\n .col(@index, @list) when (@index =< @grid-columns) { // general\n @item: ~\".col-@{class}-@{index}\";\n .col((@index + 1), ~\"@{list}, @{item}\");\n }\n .col(@index, @list) when (@index > @grid-columns) { // terminal\n @{list} {\n float: left;\n }\n }\n .col(1); // kickstart it\n}\n\n.calc-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) {\n .col-@{class}-@{index} {\n width: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = push) {\n .col-@{class}-push-@{index} {\n left: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = pull) {\n .col-@{class}-pull-@{index} {\n right: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = offset) {\n .col-@{class}-offset-@{index} {\n margin-left: percentage((@index / @grid-columns));\n }\n}\n\n// Basic looping in LESS\n.loop-grid-columns(@index, @class, @type) when (@index >= 0) {\n .calc-grid-column(@index, @class, @type);\n // next iteration\n .loop-grid-columns((@index - 1), @class, @type);\n}\n\n// Create grid for specific class\n.make-grid(@class) {\n .float-grid-columns(@class);\n .loop-grid-columns(@grid-columns, @class, width);\n .loop-grid-columns(@grid-columns, @class, pull);\n .loop-grid-columns(@grid-columns, @class, push);\n .loop-grid-columns(@grid-columns, @class, offset);\n}\n\n// Form validation states\n//\n// Used in forms.less to generate the form validation CSS for warnings, errors,\n// and successes.\n\n.form-control-validation(@text-color: #555; @border-color: #ccc; @background-color: #f5f5f5) {\n // Color the label and help text\n .help-block,\n .control-label,\n .radio,\n .checkbox,\n .radio-inline,\n .checkbox-inline {\n color: @text-color;\n }\n // Set the border and box shadow on specific inputs to match\n .form-control {\n border-color: @border-color;\n .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work\n &:focus {\n border-color: darken(@border-color, 10%);\n @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@border-color, 20%);\n .box-shadow(@shadow);\n }\n }\n // Set validation states also for addons\n .input-group-addon {\n color: @text-color;\n border-color: @border-color;\n background-color: @background-color;\n }\n // Optional feedback icon\n .form-control-feedback {\n color: @text-color;\n }\n}\n\n// Form control focus state\n//\n// Generate a customized focus state and for any input with the specified color,\n// which defaults to the `@input-focus-border` variable.\n//\n// We highly encourage you to not customize the default value, but instead use\n// this to tweak colors on an as-needed basis. This aesthetic change is based on\n// WebKit's default styles, but applicable to a wider range of browsers. Its\n// usability and accessibility should be taken into account with any change.\n//\n// Example usage: change the default blue border and shadow to white for better\n// contrast against a dark gray background.\n\n.form-control-focus(@color: @input-border-focus) {\n @color-rgba: rgba(red(@color), green(@color), blue(@color), .6);\n &:focus {\n border-color: @color;\n outline: 0;\n .box-shadow(~\"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}\");\n }\n}\n\n// Form control sizing\n//\n// Relative text size, padding, and border-radii changes for form controls. For\n// horizontal sizing, wrap controls in the predefined grid classes. `` background color\n@input-bg: #fff;\n//** `` background color\n@input-bg-disabled: @gray-lighter;\n\n//** Text color for ``s\n@input-color: @gray;\n//** `` border color\n@input-border: #ccc;\n//** `` border radius\n@input-border-radius: @border-radius-base;\n//** Border color for inputs on focus\n@input-border-focus: #66afe9;\n\n//** Placeholder text color\n@input-color-placeholder: @gray-light;\n\n//** Default `.form-control` height\n@input-height-base: (@line-height-computed + (@padding-base-vertical * 2) + 2);\n//** Large `.form-control` height\n@input-height-large: (ceil(@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + 2);\n//** Small `.form-control` height\n@input-height-small: (floor(@font-size-small * @line-height-small) + (@padding-small-vertical * 2) + 2);\n\n@legend-color: @gray-dark;\n@legend-border-color: #e5e5e5;\n\n//** Background color for textual input addons\n@input-group-addon-bg: @gray-lighter;\n//** Border color for textual input addons\n@input-group-addon-border-color: @input-border;\n\n\n//== Dropdowns\n//\n//## Dropdown menu container and contents.\n\n//** Background for the dropdown menu.\n@dropdown-bg: #fff;\n//** Dropdown menu `border-color`.\n@dropdown-border: rgba(0,0,0,.15);\n//** Dropdown menu `border-color` **for IE8**.\n@dropdown-fallback-border: #ccc;\n//** Divider color for between dropdown items.\n@dropdown-divider-bg: #e5e5e5;\n\n//** Dropdown link text color.\n@dropdown-link-color: @gray-dark;\n//** Hover color for dropdown links.\n@dropdown-link-hover-color: darken(@gray-dark, 5%);\n//** Hover background for dropdown links.\n@dropdown-link-hover-bg: #f5f5f5;\n\n//** Active dropdown menu item text color.\n@dropdown-link-active-color: @component-active-color;\n//** Active dropdown menu item background color.\n@dropdown-link-active-bg: @component-active-bg;\n\n//** Disabled dropdown menu item background color.\n@dropdown-link-disabled-color: @gray-light;\n\n//** Text color for headers within dropdown menus.\n@dropdown-header-color: @gray-light;\n\n// Note: Deprecated @dropdown-caret-color as of v3.1.0\n@dropdown-caret-color: #000;\n\n\n//-- Z-index master list\n//\n// Warning: Avoid customizing these values. They're used for a bird's eye view\n// of components dependent on the z-axis and are designed to all work together.\n//\n// Note: These variables are not generated into the Customizer.\n\n@zindex-navbar: 1000;\n@zindex-dropdown: 1000;\n@zindex-popover: 1010;\n@zindex-tooltip: 1030;\n@zindex-navbar-fixed: 1030;\n@zindex-modal-background: 1040;\n@zindex-modal: 1050;\n\n\n//== Media queries breakpoints\n//\n//## Define the breakpoints at which your layout will change, adapting to different screen sizes.\n\n// Extra small screen / phone\n// Note: Deprecated @screen-xs and @screen-phone as of v3.0.1\n@screen-xs: 480px;\n@screen-xs-min: @screen-xs;\n@screen-phone: @screen-xs-min;\n\n// Small screen / tablet\n// Note: Deprecated @screen-sm and @screen-tablet as of v3.0.1\n@screen-sm: 768px;\n@screen-sm-min: @screen-sm;\n@screen-tablet: @screen-sm-min;\n\n// Medium screen / desktop\n// Note: Deprecated @screen-md and @screen-desktop as of v3.0.1\n@screen-md: 992px;\n@screen-md-min: @screen-md;\n@screen-desktop: @screen-md-min;\n\n// Large screen / wide desktop\n// Note: Deprecated @screen-lg and @screen-lg-desktop as of v3.0.1\n@screen-lg: 1200px;\n@screen-lg-min: @screen-lg;\n@screen-lg-desktop: @screen-lg-min;\n\n// So media queries don't overlap when required, provide a maximum\n@screen-xs-max: (@screen-sm-min - 1);\n@screen-sm-max: (@screen-md-min - 1);\n@screen-md-max: (@screen-lg-min - 1);\n\n\n//== Grid system\n//\n//## Define your custom responsive grid.\n\n//** Number of columns in the grid.\n@grid-columns: 12;\n//** Padding between columns. Gets divided in half for the left and right.\n@grid-gutter-width: 30px;\n// Navbar collapse\n//** Point at which the navbar becomes uncollapsed.\n@grid-float-breakpoint: @screen-sm-min;\n//** Point at which the navbar begins collapsing.\n@grid-float-breakpoint-max: (@grid-float-breakpoint - 1);\n\n\n//== Container sizes\n//\n//## Define the maximum width of `.container` for different screen sizes.\n\n// Small screen / tablet\n@container-tablet: ((720px + @grid-gutter-width));\n//** For `@screen-sm-min` and up.\n@container-sm: @container-tablet;\n\n// Medium screen / desktop\n@container-desktop: ((940px + @grid-gutter-width));\n//** For `@screen-md-min` and up.\n@container-md: @container-desktop;\n\n// Large screen / wide desktop\n@container-large-desktop: ((1140px + @grid-gutter-width));\n//** For `@screen-lg-min` and up.\n@container-lg: @container-large-desktop;\n\n\n//== Navbar\n//\n//##\n\n// Basics of a navbar\n@navbar-height: 50px;\n@navbar-margin-bottom: @line-height-computed;\n@navbar-border-radius: @border-radius-base;\n@navbar-padding-horizontal: floor((@grid-gutter-width / 2));\n@navbar-padding-vertical: ((@navbar-height - @line-height-computed) / 2);\n@navbar-collapse-max-height: 340px;\n\n@navbar-default-color: #777;\n@navbar-default-bg: #f8f8f8;\n@navbar-default-border: darken(@navbar-default-bg, 6.5%);\n\n// Navbar links\n@navbar-default-link-color: #777;\n@navbar-default-link-hover-color: #333;\n@navbar-default-link-hover-bg: transparent;\n@navbar-default-link-active-color: #555;\n@navbar-default-link-active-bg: darken(@navbar-default-bg, 6.5%);\n@navbar-default-link-disabled-color: #ccc;\n@navbar-default-link-disabled-bg: transparent;\n\n// Navbar brand label\n@navbar-default-brand-color: @navbar-default-link-color;\n@navbar-default-brand-hover-color: darken(@navbar-default-brand-color, 10%);\n@navbar-default-brand-hover-bg: transparent;\n\n// Navbar toggle\n@navbar-default-toggle-hover-bg: #ddd;\n@navbar-default-toggle-icon-bar-bg: #888;\n@navbar-default-toggle-border-color: #ddd;\n\n\n// Inverted navbar\n// Reset inverted navbar basics\n@navbar-inverse-color: @gray-light;\n@navbar-inverse-bg: #222;\n@navbar-inverse-border: darken(@navbar-inverse-bg, 10%);\n\n// Inverted navbar links\n@navbar-inverse-link-color: @gray-light;\n@navbar-inverse-link-hover-color: #fff;\n@navbar-inverse-link-hover-bg: transparent;\n@navbar-inverse-link-active-color: @navbar-inverse-link-hover-color;\n@navbar-inverse-link-active-bg: darken(@navbar-inverse-bg, 10%);\n@navbar-inverse-link-disabled-color: #444;\n@navbar-inverse-link-disabled-bg: transparent;\n\n// Inverted navbar brand label\n@navbar-inverse-brand-color: @navbar-inverse-link-color;\n@navbar-inverse-brand-hover-color: #fff;\n@navbar-inverse-brand-hover-bg: transparent;\n\n// Inverted navbar toggle\n@navbar-inverse-toggle-hover-bg: #333;\n@navbar-inverse-toggle-icon-bar-bg: #fff;\n@navbar-inverse-toggle-border-color: #333;\n\n\n//== Navs\n//\n//##\n\n//=== Shared nav styles\n@nav-link-padding: 10px 15px;\n@nav-link-hover-bg: @gray-lighter;\n\n@nav-disabled-link-color: @gray-light;\n@nav-disabled-link-hover-color: @gray-light;\n\n@nav-open-link-hover-color: #fff;\n\n//== Tabs\n@nav-tabs-border-color: #ddd;\n\n@nav-tabs-link-hover-border-color: @gray-lighter;\n\n@nav-tabs-active-link-hover-bg: @body-bg;\n@nav-tabs-active-link-hover-color: @gray;\n@nav-tabs-active-link-hover-border-color: #ddd;\n\n@nav-tabs-justified-link-border-color: #ddd;\n@nav-tabs-justified-active-link-border-color: @body-bg;\n\n//== Pills\n@nav-pills-border-radius: @border-radius-base;\n@nav-pills-active-link-hover-bg: @component-active-bg;\n@nav-pills-active-link-hover-color: @component-active-color;\n\n\n//== Pagination\n//\n//##\n\n@pagination-color: @link-color;\n@pagination-bg: #fff;\n@pagination-border: #ddd;\n\n@pagination-hover-color: @link-hover-color;\n@pagination-hover-bg: @gray-lighter;\n@pagination-hover-border: #ddd;\n\n@pagination-active-color: #fff;\n@pagination-active-bg: @brand-primary;\n@pagination-active-border: @brand-primary;\n\n@pagination-disabled-color: @gray-light;\n@pagination-disabled-bg: #fff;\n@pagination-disabled-border: #ddd;\n\n\n//== Pager\n//\n//##\n\n@pager-bg: @pagination-bg;\n@pager-border: @pagination-border;\n@pager-border-radius: 15px;\n\n@pager-hover-bg: @pagination-hover-bg;\n\n@pager-active-bg: @pagination-active-bg;\n@pager-active-color: @pagination-active-color;\n\n@pager-disabled-color: @pagination-disabled-color;\n\n\n//== Jumbotron\n//\n//##\n\n@jumbotron-padding: 30px;\n@jumbotron-color: inherit;\n@jumbotron-bg: @gray-lighter;\n@jumbotron-heading-color: inherit;\n@jumbotron-font-size: ceil((@font-size-base * 1.5));\n\n\n//== Form states and alerts\n//\n//## Define colors for form feedback states and, by default, alerts.\n\n@state-success-text: #3c763d;\n@state-success-bg: #dff0d8;\n@state-success-border: darken(spin(@state-success-bg, -10), 5%);\n\n@state-info-text: #31708f;\n@state-info-bg: #d9edf7;\n@state-info-border: darken(spin(@state-info-bg, -10), 7%);\n\n@state-warning-text: #8a6d3b;\n@state-warning-bg: #fcf8e3;\n@state-warning-border: darken(spin(@state-warning-bg, -10), 5%);\n\n@state-danger-text: #a94442;\n@state-danger-bg: #f2dede;\n@state-danger-border: darken(spin(@state-danger-bg, -10), 5%);\n\n\n//== Tooltips\n//\n//##\n\n//** Tooltip max width\n@tooltip-max-width: 200px;\n//** Tooltip text color\n@tooltip-color: #fff;\n//** Tooltip background color\n@tooltip-bg: #000;\n@tooltip-opacity: .9;\n\n//** Tooltip arrow width\n@tooltip-arrow-width: 5px;\n//** Tooltip arrow color\n@tooltip-arrow-color: @tooltip-bg;\n\n\n//== Popovers\n//\n//##\n\n//** Popover body background color\n@popover-bg: #fff;\n//** Popover maximum width\n@popover-max-width: 276px;\n//** Popover border color\n@popover-border-color: rgba(0,0,0,.2);\n//** Popover fallback border color\n@popover-fallback-border-color: #ccc;\n\n//** Popover title background color\n@popover-title-bg: darken(@popover-bg, 3%);\n\n//** Popover arrow width\n@popover-arrow-width: 10px;\n//** Popover arrow color\n@popover-arrow-color: #fff;\n\n//** Popover outer arrow width\n@popover-arrow-outer-width: (@popover-arrow-width + 1);\n//** Popover outer arrow color\n@popover-arrow-outer-color: fadein(@popover-border-color, 5%);\n//** Popover outer arrow fallback color\n@popover-arrow-outer-fallback-color: darken(@popover-fallback-border-color, 20%);\n\n\n//== Labels\n//\n//##\n\n//** Default label background color\n@label-default-bg: @gray-light;\n//** Primary label background color\n@label-primary-bg: @brand-primary;\n//** Success label background color\n@label-success-bg: @brand-success;\n//** Info label background color\n@label-info-bg: @brand-info;\n//** Warning label background color\n@label-warning-bg: @brand-warning;\n//** Danger label background color\n@label-danger-bg: @brand-danger;\n\n//** Default label text color\n@label-color: #fff;\n//** Default text color of a linked label\n@label-link-hover-color: #fff;\n\n\n//== Modals\n//\n//##\n\n//** Padding applied to the modal body\n@modal-inner-padding: 20px;\n\n//** Padding applied to the modal title\n@modal-title-padding: 15px;\n//** Modal title line-height\n@modal-title-line-height: @line-height-base;\n\n//** Background color of modal content area\n@modal-content-bg: #fff;\n//** Modal content border color\n@modal-content-border-color: rgba(0,0,0,.2);\n//** Modal content border color **for IE8**\n@modal-content-fallback-border-color: #999;\n\n//** Modal backdrop background color\n@modal-backdrop-bg: #000;\n//** Modal backdrop opacity\n@modal-backdrop-opacity: .5;\n//** Modal header border color\n@modal-header-border-color: #e5e5e5;\n//** Modal footer border color\n@modal-footer-border-color: @modal-header-border-color;\n\n@modal-lg: 900px;\n@modal-md: 600px;\n@modal-sm: 300px;\n\n\n//== Alerts\n//\n//## Define alert colors, border radius, and padding.\n\n@alert-padding: 15px;\n@alert-border-radius: @border-radius-base;\n@alert-link-font-weight: bold;\n\n@alert-success-bg: @state-success-bg;\n@alert-success-text: @state-success-text;\n@alert-success-border: @state-success-border;\n\n@alert-info-bg: @state-info-bg;\n@alert-info-text: @state-info-text;\n@alert-info-border: @state-info-border;\n\n@alert-warning-bg: @state-warning-bg;\n@alert-warning-text: @state-warning-text;\n@alert-warning-border: @state-warning-border;\n\n@alert-danger-bg: @state-danger-bg;\n@alert-danger-text: @state-danger-text;\n@alert-danger-border: @state-danger-border;\n\n\n//== Progress bars\n//\n//##\n\n//** Background color of the whole progress component\n@progress-bg: #f5f5f5;\n//** Progress bar text color\n@progress-bar-color: #fff;\n\n//** Default progress bar color\n@progress-bar-bg: @brand-primary;\n//** Success progress bar color\n@progress-bar-success-bg: @brand-success;\n//** Warning progress bar color\n@progress-bar-warning-bg: @brand-warning;\n//** Danger progress bar color\n@progress-bar-danger-bg: @brand-danger;\n//** Info progress bar color\n@progress-bar-info-bg: @brand-info;\n\n\n//== List group\n//\n//##\n\n//** Background color on `.list-group-item`\n@list-group-bg: #fff;\n//** `.list-group-item` border color\n@list-group-border: #ddd;\n//** List group border radius\n@list-group-border-radius: @border-radius-base;\n\n//** Background color of single list elements on hover\n@list-group-hover-bg: #f5f5f5;\n//** Text color of active list elements\n@list-group-active-color: @component-active-color;\n//** Background color of active list elements\n@list-group-active-bg: @component-active-bg;\n//** Border color of active list elements\n@list-group-active-border: @list-group-active-bg;\n@list-group-active-text-color: lighten(@list-group-active-bg, 40%);\n\n@list-group-link-color: #555;\n@list-group-link-heading-color: #333;\n\n\n//== Panels\n//\n//##\n\n@panel-bg: #fff;\n@panel-body-padding: 15px;\n@panel-border-radius: @border-radius-base;\n\n//** Border color for elements within panels\n@panel-inner-border: #ddd;\n@panel-footer-bg: #f5f5f5;\n\n@panel-default-text: @gray-dark;\n@panel-default-border: #ddd;\n@panel-default-heading-bg: #f5f5f5;\n\n@panel-primary-text: #fff;\n@panel-primary-border: @brand-primary;\n@panel-primary-heading-bg: @brand-primary;\n\n@panel-success-text: @state-success-text;\n@panel-success-border: @state-success-border;\n@panel-success-heading-bg: @state-success-bg;\n\n@panel-info-text: @state-info-text;\n@panel-info-border: @state-info-border;\n@panel-info-heading-bg: @state-info-bg;\n\n@panel-warning-text: @state-warning-text;\n@panel-warning-border: @state-warning-border;\n@panel-warning-heading-bg: @state-warning-bg;\n\n@panel-danger-text: @state-danger-text;\n@panel-danger-border: @state-danger-border;\n@panel-danger-heading-bg: @state-danger-bg;\n\n\n//== Thumbnails\n//\n//##\n\n//** Padding around the thumbnail image\n@thumbnail-padding: 4px;\n//** Thumbnail background color\n@thumbnail-bg: @body-bg;\n//** Thumbnail border color\n@thumbnail-border: #ddd;\n//** Thumbnail border radius\n@thumbnail-border-radius: @border-radius-base;\n\n//** Custom text color for thumbnail captions\n@thumbnail-caption-color: @text-color;\n//** Padding around the thumbnail caption\n@thumbnail-caption-padding: 9px;\n\n\n//== Wells\n//\n//##\n\n@well-bg: #f5f5f5;\n@well-border: darken(@well-bg, 7%);\n\n\n//== Badges\n//\n//##\n\n@badge-color: #fff;\n//** Linked badge text color on hover\n@badge-link-hover-color: #fff;\n@badge-bg: @gray-light;\n\n//** Badge text color in active nav link\n@badge-active-color: @link-color;\n//** Badge background color in active nav link\n@badge-active-bg: #fff;\n\n@badge-font-weight: bold;\n@badge-line-height: 1;\n@badge-border-radius: 10px;\n\n\n//== Breadcrumbs\n//\n//##\n\n@breadcrumb-padding-vertical: 8px;\n@breadcrumb-padding-horizontal: 15px;\n//** Breadcrumb background color\n@breadcrumb-bg: #f5f5f5;\n//** Breadcrumb text color\n@breadcrumb-color: #ccc;\n//** Text color of current page in the breadcrumb\n@breadcrumb-active-color: @gray-light;\n//** Textual separator for between breadcrumb elements\n@breadcrumb-separator: \"/\";\n\n\n//== Carousel\n//\n//##\n\n@carousel-text-shadow: 0 1px 2px rgba(0,0,0,.6);\n\n@carousel-control-color: #fff;\n@carousel-control-width: 15%;\n@carousel-control-opacity: .5;\n@carousel-control-font-size: 20px;\n\n@carousel-indicator-active-bg: #fff;\n@carousel-indicator-border-color: #fff;\n\n@carousel-caption-color: #fff;\n\n\n//== Close\n//\n//##\n\n@close-font-weight: bold;\n@close-color: #000;\n@close-text-shadow: 0 1px 0 #fff;\n\n\n//== Code\n//\n//##\n\n@code-color: #c7254e;\n@code-bg: #f9f2f4;\n\n@kbd-color: #fff;\n@kbd-bg: #333;\n\n@pre-bg: #f5f5f5;\n@pre-color: @gray-dark;\n@pre-border-color: #ccc;\n@pre-scrollable-max-height: 340px;\n\n\n//== Type\n//\n//##\n\n//** Text muted color\n@text-muted: @gray-light;\n//** Abbreviations and acronyms border color\n@abbr-border-color: @gray-light;\n//** Headings small color\n@headings-small-color: @gray-light;\n//** Blockquote small color\n@blockquote-small-color: @gray-light;\n//** Blockquote font size\n@blockquote-font-size: (@font-size-base * 1.25);\n//** Blockquote border color\n@blockquote-border-color: @gray-lighter;\n//** Page header border color\n@page-header-border-color: @gray-lighter;\n\n\n//== Miscellaneous\n//\n//##\n\n//** Horizontal line color.\n@hr-border: @gray-lighter;\n\n//** Horizontal offset for forms and lists.\n@component-offset-horizontal: 180px;\n","//\n// Thumbnails\n// --------------------------------------------------\n\n\n// Mixin and adjust the regular image class\n.thumbnail {\n display: block;\n padding: @thumbnail-padding;\n margin-bottom: @line-height-computed;\n line-height: @line-height-base;\n background-color: @thumbnail-bg;\n border: 1px solid @thumbnail-border;\n border-radius: @thumbnail-border-radius;\n .transition(all .2s ease-in-out);\n\n > img,\n a > img {\n &:extend(.img-responsive);\n margin-left: auto;\n margin-right: auto;\n }\n\n // Add a hover state for linked versions only\n a&:hover,\n a&:focus,\n a&.active {\n border-color: @link-color;\n }\n\n // Image captions\n .caption {\n padding: @thumbnail-caption-padding;\n color: @thumbnail-caption-color;\n }\n}\n","//\n// Carousel\n// --------------------------------------------------\n\n\n// Wrapper for the slide container and indicators\n.carousel {\n position: relative;\n}\n\n.carousel-inner {\n position: relative;\n overflow: hidden;\n width: 100%;\n\n > .item {\n display: none;\n position: relative;\n .transition(.6s ease-in-out left);\n\n // Account for jankitude on images\n > img,\n > a > img {\n &:extend(.img-responsive);\n line-height: 1;\n }\n }\n\n > .active,\n > .next,\n > .prev { display: block; }\n\n > .active {\n left: 0;\n }\n\n > .next,\n > .prev {\n position: absolute;\n top: 0;\n width: 100%;\n }\n\n > .next {\n left: 100%;\n }\n > .prev {\n left: -100%;\n }\n > .next.left,\n > .prev.right {\n left: 0;\n }\n\n > .active.left {\n left: -100%;\n }\n > .active.right {\n left: 100%;\n }\n\n}\n\n// Left/right controls for nav\n// ---------------------------\n\n.carousel-control {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: @carousel-control-width;\n .opacity(@carousel-control-opacity);\n font-size: @carousel-control-font-size;\n color: @carousel-control-color;\n text-align: center;\n text-shadow: @carousel-text-shadow;\n // We can't have this transition here because WebKit cancels the carousel\n // animation if you trip this while in the middle of another animation.\n\n // Set gradients for backgrounds\n &.left {\n #gradient > .horizontal(@start-color: rgba(0,0,0,.5); @end-color: rgba(0,0,0,.0001));\n }\n &.right {\n left: auto;\n right: 0;\n #gradient > .horizontal(@start-color: rgba(0,0,0,.0001); @end-color: rgba(0,0,0,.5));\n }\n\n // Hover/focus state\n &:hover,\n &:focus {\n outline: none;\n color: @carousel-control-color;\n text-decoration: none;\n .opacity(.9);\n }\n\n // Toggles\n .icon-prev,\n .icon-next,\n .glyphicon-chevron-left,\n .glyphicon-chevron-right {\n position: absolute;\n top: 50%;\n z-index: 5;\n display: inline-block;\n }\n .icon-prev,\n .glyphicon-chevron-left {\n left: 50%;\n }\n .icon-next,\n .glyphicon-chevron-right {\n right: 50%;\n }\n .icon-prev,\n .icon-next {\n width: 20px;\n height: 20px;\n margin-top: -10px;\n margin-left: -10px;\n font-family: serif;\n }\n\n .icon-prev {\n &:before {\n content: '\\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039)\n }\n }\n .icon-next {\n &:before {\n content: '\\203a';// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A)\n }\n }\n}\n\n// Optional indicator pips\n//\n// Add an unordered list with the following class and add a list item for each\n// slide your carousel holds.\n\n.carousel-indicators {\n position: absolute;\n bottom: 10px;\n left: 50%;\n z-index: 15;\n width: 60%;\n margin-left: -30%;\n padding-left: 0;\n list-style: none;\n text-align: center;\n\n li {\n display: inline-block;\n width: 10px;\n height: 10px;\n margin: 1px;\n text-indent: -999px;\n border: 1px solid @carousel-indicator-border-color;\n border-radius: 10px;\n cursor: pointer;\n\n // IE8-9 hack for event handling\n //\n // Internet Explorer 8-9 does not support clicks on elements without a set\n // `background-color`. We cannot use `filter` since that's not viewed as a\n // background color by the browser. Thus, a hack is needed.\n //\n // For IE8, we set solid black as it doesn't support `rgba()`. For IE9, we\n // set alpha transparency for the best results possible.\n background-color: #000 \\9; // IE8\n background-color: rgba(0,0,0,0); // IE9\n }\n .active {\n margin: 0;\n width: 12px;\n height: 12px;\n background-color: @carousel-indicator-active-bg;\n }\n}\n\n// Optional captions\n// -----------------------------\n// Hidden by default for smaller viewports\n.carousel-caption {\n position: absolute;\n left: 15%;\n right: 15%;\n bottom: 20px;\n z-index: 10;\n padding-top: 20px;\n padding-bottom: 20px;\n color: @carousel-caption-color;\n text-align: center;\n text-shadow: @carousel-text-shadow;\n & .btn {\n text-shadow: none; // No shadow for button elements in carousel-caption\n }\n}\n\n\n// Scale up controls for tablets and up\n@media screen and (min-width: @screen-sm-min) {\n\n // Scale up the controls a smidge\n .carousel-control {\n .glyphicon-chevron-left,\n .glyphicon-chevron-right,\n .icon-prev,\n .icon-next {\n width: 30px;\n height: 30px;\n margin-top: -15px;\n margin-left: -15px;\n font-size: 30px;\n }\n }\n\n // Show and left align the captions\n .carousel-caption {\n left: 20%;\n right: 20%;\n padding-bottom: 30px;\n }\n\n // Move up the indicators\n .carousel-indicators {\n bottom: 20px;\n }\n}\n","//\n// Typography\n// --------------------------------------------------\n\n\n// Headings\n// -------------------------\n\nh1, h2, h3, h4, h5, h6,\n.h1, .h2, .h3, .h4, .h5, .h6 {\n font-family: @headings-font-family;\n font-weight: @headings-font-weight;\n line-height: @headings-line-height;\n color: @headings-color;\n\n small,\n .small {\n font-weight: normal;\n line-height: 1;\n color: @headings-small-color;\n }\n}\n\nh1, .h1,\nh2, .h2,\nh3, .h3 {\n margin-top: @line-height-computed;\n margin-bottom: (@line-height-computed / 2);\n\n small,\n .small {\n font-size: 65%;\n }\n}\nh4, .h4,\nh5, .h5,\nh6, .h6 {\n margin-top: (@line-height-computed / 2);\n margin-bottom: (@line-height-computed / 2);\n\n small,\n .small {\n font-size: 75%;\n }\n}\n\nh1, .h1 { font-size: @font-size-h1; }\nh2, .h2 { font-size: @font-size-h2; }\nh3, .h3 { font-size: @font-size-h3; }\nh4, .h4 { font-size: @font-size-h4; }\nh5, .h5 { font-size: @font-size-h5; }\nh6, .h6 { font-size: @font-size-h6; }\n\n\n// Body text\n// -------------------------\n\np {\n margin: 0 0 (@line-height-computed / 2);\n}\n\n.lead {\n margin-bottom: @line-height-computed;\n font-size: floor((@font-size-base * 1.15));\n font-weight: 200;\n line-height: 1.4;\n\n @media (min-width: @screen-sm-min) {\n font-size: (@font-size-base * 1.5);\n }\n}\n\n\n// Emphasis & misc\n// -------------------------\n\n// Ex: 14px base font * 85% = about 12px\nsmall,\n.small { font-size: 85%; }\n\n// Undo browser default styling\ncite { font-style: normal; }\n\n// Alignment\n.text-left { text-align: left; }\n.text-right { text-align: right; }\n.text-center { text-align: center; }\n.text-justify { text-align: justify; }\n\n// Contextual colors\n.text-muted {\n color: @text-muted;\n}\n.text-primary {\n .text-emphasis-variant(@brand-primary);\n}\n.text-success {\n .text-emphasis-variant(@state-success-text);\n}\n.text-info {\n .text-emphasis-variant(@state-info-text);\n}\n.text-warning {\n .text-emphasis-variant(@state-warning-text);\n}\n.text-danger {\n .text-emphasis-variant(@state-danger-text);\n}\n\n// Contextual backgrounds\n// For now we'll leave these alongside the text classes until v4 when we can\n// safely shift things around (per SemVer rules).\n.bg-primary {\n // Given the contrast here, this is the only class to have its color inverted\n // automatically.\n color: #fff;\n .bg-variant(@brand-primary);\n}\n.bg-success {\n .bg-variant(@state-success-bg);\n}\n.bg-info {\n .bg-variant(@state-info-bg);\n}\n.bg-warning {\n .bg-variant(@state-warning-bg);\n}\n.bg-danger {\n .bg-variant(@state-danger-bg);\n}\n\n\n// Page header\n// -------------------------\n\n.page-header {\n padding-bottom: ((@line-height-computed / 2) - 1);\n margin: (@line-height-computed * 2) 0 @line-height-computed;\n border-bottom: 1px solid @page-header-border-color;\n}\n\n\n// Lists\n// --------------------------------------------------\n\n// Unordered and Ordered lists\nul,\nol {\n margin-top: 0;\n margin-bottom: (@line-height-computed / 2);\n ul,\n ol {\n margin-bottom: 0;\n }\n}\n\n// List options\n\n// Unstyled keeps list items block level, just removes default browser padding and list-style\n.list-unstyled {\n padding-left: 0;\n list-style: none;\n}\n\n// Inline turns list items into inline-block\n.list-inline {\n .list-unstyled();\n margin-left: -5px;\n\n > li {\n display: inline-block;\n padding-left: 5px;\n padding-right: 5px;\n }\n}\n\n// Description Lists\ndl {\n margin-top: 0; // Remove browser default\n margin-bottom: @line-height-computed;\n}\ndt,\ndd {\n line-height: @line-height-base;\n}\ndt {\n font-weight: bold;\n}\ndd {\n margin-left: 0; // Undo browser default\n}\n\n// Horizontal description lists\n//\n// Defaults to being stacked without any of the below styles applied, until the\n// grid breakpoint is reached (default of ~768px).\n\n@media (min-width: @grid-float-breakpoint) {\n .dl-horizontal {\n dt {\n float: left;\n width: (@component-offset-horizontal - 20);\n clear: left;\n text-align: right;\n .text-overflow();\n }\n dd {\n margin-left: @component-offset-horizontal;\n &:extend(.clearfix all); // Clear the floated `dt` if an empty `dd` is present\n }\n }\n}\n\n// MISC\n// ----\n\n// Abbreviations and acronyms\nabbr[title],\n// Add data-* attribute to help out our tooltip plugin, per https://github.com/twbs/bootstrap/issues/5257\nabbr[data-original-title] {\n cursor: help;\n border-bottom: 1px dotted @abbr-border-color;\n}\n.initialism {\n font-size: 90%;\n text-transform: uppercase;\n}\n\n// Blockquotes\nblockquote {\n padding: (@line-height-computed / 2) @line-height-computed;\n margin: 0 0 @line-height-computed;\n font-size: @blockquote-font-size;\n border-left: 5px solid @blockquote-border-color;\n\n p,\n ul,\n ol {\n &:last-child {\n margin-bottom: 0;\n }\n }\n\n // Note: Deprecated small and .small as of v3.1.0\n // Context: https://github.com/twbs/bootstrap/issues/11660\n footer,\n small,\n .small {\n display: block;\n font-size: 80%; // back to default font-size\n line-height: @line-height-base;\n color: @blockquote-small-color;\n\n &:before {\n content: '\\2014 \\00A0'; // em dash, nbsp\n }\n }\n}\n\n// Opposite alignment of blockquote\n//\n// Heads up: `blockquote.pull-right` has been deprecated as of v3.1.0.\n.blockquote-reverse,\nblockquote.pull-right {\n padding-right: 15px;\n padding-left: 0;\n border-right: 5px solid @blockquote-border-color;\n border-left: 0;\n text-align: right;\n\n // Account for citation\n footer,\n small,\n .small {\n &:before { content: ''; }\n &:after {\n content: '\\00A0 \\2014'; // nbsp, em dash\n }\n }\n}\n\n// Quotes\nblockquote:before,\nblockquote:after {\n content: \"\";\n}\n\n// Addresses\naddress {\n margin-bottom: @line-height-computed;\n font-style: normal;\n line-height: @line-height-base;\n}\n","//\n// Code (inline and block)\n// --------------------------------------------------\n\n\n// Inline and block code styles\ncode,\nkbd,\npre,\nsamp {\n font-family: @font-family-monospace;\n}\n\n// Inline code\ncode {\n padding: 2px 4px;\n font-size: 90%;\n color: @code-color;\n background-color: @code-bg;\n white-space: nowrap;\n border-radius: @border-radius-base;\n}\n\n// User input typically entered via keyboard\nkbd {\n padding: 2px 4px;\n font-size: 90%;\n color: @kbd-color;\n background-color: @kbd-bg;\n border-radius: @border-radius-small;\n box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);\n}\n\n// Blocks of code\npre {\n display: block;\n padding: ((@line-height-computed - 1) / 2);\n margin: 0 0 (@line-height-computed / 2);\n font-size: (@font-size-base - 1); // 14px to 13px\n line-height: @line-height-base;\n word-break: break-all;\n word-wrap: break-word;\n color: @pre-color;\n background-color: @pre-bg;\n border: 1px solid @pre-border-color;\n border-radius: @border-radius-base;\n\n // Account for some code outputs that place code tags in pre tags\n code {\n padding: 0;\n font-size: inherit;\n color: inherit;\n white-space: pre-wrap;\n background-color: transparent;\n border-radius: 0;\n }\n}\n\n// Enable scrollable blocks of code\n.pre-scrollable {\n max-height: @pre-scrollable-max-height;\n overflow-y: scroll;\n}\n","//\n// Grid system\n// --------------------------------------------------\n\n\n// Container widths\n//\n// Set the container width, and override it for fixed navbars in media queries.\n\n.container {\n .container-fixed();\n\n @media (min-width: @screen-sm-min) {\n width: @container-sm;\n }\n @media (min-width: @screen-md-min) {\n width: @container-md;\n }\n @media (min-width: @screen-lg-min) {\n width: @container-lg;\n }\n}\n\n\n// Fluid container\n//\n// Utilizes the mixin meant for fixed width containers, but without any defined\n// width for fluid, full width layouts.\n\n.container-fluid {\n .container-fixed();\n}\n\n\n// Row\n//\n// Rows contain and clear the floats of your columns.\n\n.row {\n .make-row();\n}\n\n\n// Columns\n//\n// Common styles for small and large grid columns\n\n.make-grid-columns();\n\n\n// Extra small grid\n//\n// Columns, offsets, pushes, and pulls for extra small devices like\n// smartphones.\n\n.make-grid(xs);\n\n\n// Small grid\n//\n// Columns, offsets, pushes, and pulls for the small device range, from phones\n// to tablets.\n\n@media (min-width: @screen-sm-min) {\n .make-grid(sm);\n}\n\n\n// Medium grid\n//\n// Columns, offsets, pushes, and pulls for the desktop device range.\n\n@media (min-width: @screen-md-min) {\n .make-grid(md);\n}\n\n\n// Large grid\n//\n// Columns, offsets, pushes, and pulls for the large desktop device range.\n\n@media (min-width: @screen-lg-min) {\n .make-grid(lg);\n}\n","//\n// Tables\n// --------------------------------------------------\n\n\ntable {\n max-width: 100%;\n background-color: @table-bg;\n}\nth {\n text-align: left;\n}\n\n\n// Baseline styles\n\n.table {\n width: 100%;\n margin-bottom: @line-height-computed;\n // Cells\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n padding: @table-cell-padding;\n line-height: @line-height-base;\n vertical-align: top;\n border-top: 1px solid @table-border-color;\n }\n }\n }\n // Bottom align for column headings\n > thead > tr > th {\n vertical-align: bottom;\n border-bottom: 2px solid @table-border-color;\n }\n // Remove top border from thead by default\n > caption + thead,\n > colgroup + thead,\n > thead:first-child {\n > tr:first-child {\n > th,\n > td {\n border-top: 0;\n }\n }\n }\n // Account for multiple tbody instances\n > tbody + tbody {\n border-top: 2px solid @table-border-color;\n }\n\n // Nesting\n .table {\n background-color: @body-bg;\n }\n}\n\n\n// Condensed table w/ half padding\n\n.table-condensed {\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n padding: @table-condensed-cell-padding;\n }\n }\n }\n}\n\n\n// Bordered version\n//\n// Add borders all around the table and between all the columns.\n\n.table-bordered {\n border: 1px solid @table-border-color;\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n border: 1px solid @table-border-color;\n }\n }\n }\n > thead > tr {\n > th,\n > td {\n border-bottom-width: 2px;\n }\n }\n}\n\n\n// Zebra-striping\n//\n// Default zebra-stripe styles (alternating gray and transparent backgrounds)\n\n.table-striped {\n > tbody > tr:nth-child(odd) {\n > td,\n > th {\n background-color: @table-bg-accent;\n }\n }\n}\n\n\n// Hover effect\n//\n// Placed here since it has to come after the potential zebra striping\n\n.table-hover {\n > tbody > tr:hover {\n > td,\n > th {\n background-color: @table-bg-hover;\n }\n }\n}\n\n\n// Table cell sizing\n//\n// Reset default table behavior\n\ntable col[class*=\"col-\"] {\n position: static; // Prevent border hiding in Firefox and IE9/10 (see https://github.com/twbs/bootstrap/issues/11623)\n float: none;\n display: table-column;\n}\ntable {\n td,\n th {\n &[class*=\"col-\"] {\n position: static; // Prevent border hiding in Firefox and IE9/10 (see https://github.com/twbs/bootstrap/issues/11623)\n float: none;\n display: table-cell;\n }\n }\n}\n\n\n// Table backgrounds\n//\n// Exact selectors below required to override `.table-striped` and prevent\n// inheritance to nested tables.\n\n// Generate the contextual variants\n.table-row-variant(active; @table-bg-active);\n.table-row-variant(success; @state-success-bg);\n.table-row-variant(info; @state-info-bg);\n.table-row-variant(warning; @state-warning-bg);\n.table-row-variant(danger; @state-danger-bg);\n\n\n// Responsive tables\n//\n// Wrap your tables in `.table-responsive` and we'll make them mobile friendly\n// by enabling horizontal scrolling. Only applies <768px. Everything above that\n// will display normally.\n\n@media (max-width: @screen-xs-max) {\n .table-responsive {\n width: 100%;\n margin-bottom: (@line-height-computed * 0.75);\n overflow-y: hidden;\n overflow-x: scroll;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n border: 1px solid @table-border-color;\n -webkit-overflow-scrolling: touch;\n\n // Tighten up spacing\n > .table {\n margin-bottom: 0;\n\n // Ensure the content doesn't wrap\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n white-space: nowrap;\n }\n }\n }\n }\n\n // Special overrides for the bordered tables\n > .table-bordered {\n border: 0;\n\n // Nuke the appropriate borders so that the parent can handle them\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th:first-child,\n > td:first-child {\n border-left: 0;\n }\n > th:last-child,\n > td:last-child {\n border-right: 0;\n }\n }\n }\n\n // Only nuke the last row's bottom-border in `tbody` and `tfoot` since\n // chances are there will be only one `tr` in a `thead` and that would\n // remove the border altogether.\n > tbody,\n > tfoot {\n > tr:last-child {\n > th,\n > td {\n border-bottom: 0;\n }\n }\n }\n\n }\n }\n}\n","//\n// Forms\n// --------------------------------------------------\n\n\n// Normalize non-controls\n//\n// Restyle and baseline non-control form elements.\n\nfieldset {\n padding: 0;\n margin: 0;\n border: 0;\n // Chrome and Firefox set a `min-width: -webkit-min-content;` on fieldsets,\n // so we reset that to ensure it behaves more like a standard block element.\n // See https://github.com/twbs/bootstrap/issues/12359.\n min-width: 0;\n}\n\nlegend {\n display: block;\n width: 100%;\n padding: 0;\n margin-bottom: @line-height-computed;\n font-size: (@font-size-base * 1.5);\n line-height: inherit;\n color: @legend-color;\n border: 0;\n border-bottom: 1px solid @legend-border-color;\n}\n\nlabel {\n display: inline-block;\n margin-bottom: 5px;\n font-weight: bold;\n}\n\n\n// Normalize form controls\n//\n// While most of our form styles require extra classes, some basic normalization\n// is required to ensure optimum display with or without those classes to better\n// address browser inconsistencies.\n\n// Override content-box in Normalize (* isn't specific enough)\ninput[type=\"search\"] {\n .box-sizing(border-box);\n}\n\n// Position radios and checkboxes better\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n margin: 4px 0 0;\n margin-top: 1px \\9; /* IE8-9 */\n line-height: normal;\n}\n\n// Set the height of file controls to match text inputs\ninput[type=\"file\"] {\n display: block;\n}\n\n// Make range inputs behave like textual form controls\ninput[type=\"range\"] {\n display: block;\n width: 100%;\n}\n\n// Make multiple select elements height not fixed\nselect[multiple],\nselect[size] {\n height: auto;\n}\n\n// Focus for file, radio, and checkbox\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n .tab-focus();\n}\n\n// Adjust output element\noutput {\n display: block;\n padding-top: (@padding-base-vertical + 1);\n font-size: @font-size-base;\n line-height: @line-height-base;\n color: @input-color;\n}\n\n\n// Common form controls\n//\n// Shared size and type resets for form controls. Apply `.form-control` to any\n// of the following form controls:\n//\n// select\n// textarea\n// input[type=\"text\"]\n// input[type=\"password\"]\n// input[type=\"datetime\"]\n// input[type=\"datetime-local\"]\n// input[type=\"date\"]\n// input[type=\"month\"]\n// input[type=\"time\"]\n// input[type=\"week\"]\n// input[type=\"number\"]\n// input[type=\"email\"]\n// input[type=\"url\"]\n// input[type=\"search\"]\n// input[type=\"tel\"]\n// input[type=\"color\"]\n\n.form-control {\n display: block;\n width: 100%;\n height: @input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)\n padding: @padding-base-vertical @padding-base-horizontal;\n font-size: @font-size-base;\n line-height: @line-height-base;\n color: @input-color;\n background-color: @input-bg;\n background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n border: 1px solid @input-border;\n border-radius: @input-border-radius;\n .box-shadow(inset 0 1px 1px rgba(0,0,0,.075));\n .transition(~\"border-color ease-in-out .15s, box-shadow ease-in-out .15s\");\n\n // Customize the `:focus` state to imitate native WebKit styles.\n .form-control-focus();\n\n // Placeholder\n .placeholder();\n\n // Disabled and read-only inputs\n //\n // HTML5 says that controls under a fieldset > legend:first-child won't be\n // disabled if the fieldset is disabled. Due to implementation difficulty, we\n // don't honor that edge case; we style them as disabled anyway.\n &[disabled],\n &[readonly],\n fieldset[disabled] & {\n cursor: not-allowed;\n background-color: @input-bg-disabled;\n opacity: 1; // iOS fix for unreadable disabled content\n }\n\n // Reset height for `textarea`s\n textarea& {\n height: auto;\n }\n}\n\n\n// Search inputs in iOS\n//\n// This overrides the extra rounded corners on search inputs in iOS so that our\n// `.form-control` class can properly style them. Note that this cannot simply\n// be added to `.form-control` as it's not specific enough. For details, see\n// https://github.com/twbs/bootstrap/issues/11586.\n\ninput[type=\"search\"] {\n -webkit-appearance: none;\n}\n\n\n// Special styles for iOS date input\n//\n// In Mobile Safari, date inputs require a pixel line-height that matches the\n// given height of the input.\n\ninput[type=\"date\"] {\n line-height: @input-height-base;\n}\n\n\n// Form groups\n//\n// Designed to help with the organization and spacing of vertical forms. For\n// horizontal forms, use the predefined grid classes.\n\n.form-group {\n margin-bottom: 15px;\n}\n\n\n// Checkboxes and radios\n//\n// Indent the labels to position radios/checkboxes as hanging controls.\n\n.radio,\n.checkbox {\n display: block;\n min-height: @line-height-computed; // clear the floating input if there is no label text\n margin-top: 10px;\n margin-bottom: 10px;\n padding-left: 20px;\n label {\n display: inline;\n font-weight: normal;\n cursor: pointer;\n }\n}\n.radio input[type=\"radio\"],\n.radio-inline input[type=\"radio\"],\n.checkbox input[type=\"checkbox\"],\n.checkbox-inline input[type=\"checkbox\"] {\n float: left;\n margin-left: -20px;\n}\n.radio + .radio,\n.checkbox + .checkbox {\n margin-top: -5px; // Move up sibling radios or checkboxes for tighter spacing\n}\n\n// Radios and checkboxes on same line\n.radio-inline,\n.checkbox-inline {\n display: inline-block;\n padding-left: 20px;\n margin-bottom: 0;\n vertical-align: middle;\n font-weight: normal;\n cursor: pointer;\n}\n.radio-inline + .radio-inline,\n.checkbox-inline + .checkbox-inline {\n margin-top: 0;\n margin-left: 10px; // space out consecutive inline controls\n}\n\n// Apply same disabled cursor tweak as for inputs\n//\n// Note: Neither radios nor checkboxes can be readonly.\ninput[type=\"radio\"],\ninput[type=\"checkbox\"],\n.radio,\n.radio-inline,\n.checkbox,\n.checkbox-inline {\n &[disabled],\n fieldset[disabled] & {\n cursor: not-allowed;\n }\n}\n\n\n// Form control sizing\n//\n// Build on `.form-control` with modifier classes to decrease or increase the\n// height and font-size of form controls.\n\n.input-sm {\n .input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);\n}\n\n.input-lg {\n .input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);\n}\n\n\n// Form control feedback states\n//\n// Apply contextual and semantic states to individual form controls.\n\n.has-feedback {\n // Enable absolute positioning\n position: relative;\n\n // Ensure icons don't overlap text\n .form-control {\n padding-right: (@input-height-base * 1.25);\n }\n\n // Feedback icon (requires .glyphicon classes)\n .form-control-feedback {\n position: absolute;\n top: (@line-height-computed + 5); // Height of the `label` and its margin\n right: 0;\n display: block;\n width: @input-height-base;\n height: @input-height-base;\n line-height: @input-height-base;\n text-align: center;\n }\n}\n\n// Feedback states\n.has-success {\n .form-control-validation(@state-success-text; @state-success-text; @state-success-bg);\n}\n.has-warning {\n .form-control-validation(@state-warning-text; @state-warning-text; @state-warning-bg);\n}\n.has-error {\n .form-control-validation(@state-danger-text; @state-danger-text; @state-danger-bg);\n}\n\n\n// Static form control text\n//\n// Apply class to a `p` element to make any string of text align with labels in\n// a horizontal form layout.\n\n.form-control-static {\n margin-bottom: 0; // Remove default margin from `p`\n}\n\n\n// Help text\n//\n// Apply to any element you wish to create light text for placement immediately\n// below a form control. Use for general help, formatting, or instructional text.\n\n.help-block {\n display: block; // account for any element using help-block\n margin-top: 5px;\n margin-bottom: 10px;\n color: lighten(@text-color, 25%); // lighten the text some for contrast\n}\n\n\n\n// Inline forms\n//\n// Make forms appear inline(-block) by adding the `.form-inline` class. Inline\n// forms begin stacked on extra small (mobile) devices and then go inline when\n// viewports reach <768px.\n//\n// Requires wrapping inputs and labels with `.form-group` for proper display of\n// default HTML form controls and our custom form controls (e.g., input groups).\n//\n// Heads up! This is mixin-ed into `.navbar-form` in navbars.less.\n\n.form-inline {\n\n // Kick in the inline\n @media (min-width: @screen-sm-min) {\n // Inline-block all the things for \"inline\"\n .form-group {\n display: inline-block;\n margin-bottom: 0;\n vertical-align: middle;\n }\n\n // In navbar-form, allow folks to *not* use `.form-group`\n .form-control {\n display: inline-block;\n width: auto; // Prevent labels from stacking above inputs in `.form-group`\n vertical-align: middle;\n }\n // Input groups need that 100% width though\n .input-group > .form-control {\n width: 100%;\n }\n\n .control-label {\n margin-bottom: 0;\n vertical-align: middle;\n }\n\n // Remove default margin on radios/checkboxes that were used for stacking, and\n // then undo the floating of radios and checkboxes to match (which also avoids\n // a bug in WebKit: https://github.com/twbs/bootstrap/issues/1969).\n .radio,\n .checkbox {\n display: inline-block;\n margin-top: 0;\n margin-bottom: 0;\n padding-left: 0;\n vertical-align: middle;\n }\n .radio input[type=\"radio\"],\n .checkbox input[type=\"checkbox\"] {\n float: none;\n margin-left: 0;\n }\n\n // Validation states\n //\n // Reposition the icon because it's now within a grid column and columns have\n // `position: relative;` on them. Also accounts for the grid gutter padding.\n .has-feedback .form-control-feedback {\n top: 0;\n }\n }\n}\n\n\n// Horizontal forms\n//\n// Horizontal forms are built on grid classes and allow you to create forms with\n// labels on the left and inputs on the right.\n\n.form-horizontal {\n\n // Consistent vertical alignment of labels, radios, and checkboxes\n .control-label,\n .radio,\n .checkbox,\n .radio-inline,\n .checkbox-inline {\n margin-top: 0;\n margin-bottom: 0;\n padding-top: (@padding-base-vertical + 1); // Default padding plus a border\n }\n // Account for padding we're adding to ensure the alignment and of help text\n // and other content below items\n .radio,\n .checkbox {\n min-height: (@line-height-computed + (@padding-base-vertical + 1));\n }\n\n // Make form groups behave like rows\n .form-group {\n .make-row();\n }\n\n .form-control-static {\n padding-top: (@padding-base-vertical + 1);\n }\n\n // Only right align form labels here when the columns stop stacking\n @media (min-width: @screen-sm-min) {\n .control-label {\n text-align: right;\n }\n }\n\n // Validation states\n //\n // Reposition the icon because it's now within a grid column and columns have\n // `position: relative;` on them. Also accounts for the grid gutter padding.\n .has-feedback .form-control-feedback {\n top: 0;\n right: (@grid-gutter-width / 2);\n }\n}\n","//\n// Buttons\n// --------------------------------------------------\n\n\n// Base styles\n// --------------------------------------------------\n\n.btn {\n display: inline-block;\n margin-bottom: 0; // For input.btn\n font-weight: @btn-font-weight;\n text-align: center;\n vertical-align: middle;\n cursor: pointer;\n background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n border: 1px solid transparent;\n white-space: nowrap;\n .button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @border-radius-base);\n .user-select(none);\n\n &,\n &:active,\n &.active {\n &:focus {\n .tab-focus();\n }\n }\n\n &:hover,\n &:focus {\n color: @btn-default-color;\n text-decoration: none;\n }\n\n &:active,\n &.active {\n outline: 0;\n background-image: none;\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n }\n\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n cursor: not-allowed;\n pointer-events: none; // Future-proof disabling of clicks\n .opacity(.65);\n .box-shadow(none);\n }\n}\n\n\n// Alternate buttons\n// --------------------------------------------------\n\n.btn-default {\n .button-variant(@btn-default-color; @btn-default-bg; @btn-default-border);\n}\n.btn-primary {\n .button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border);\n}\n// Success appears as green\n.btn-success {\n .button-variant(@btn-success-color; @btn-success-bg; @btn-success-border);\n}\n// Info appears as blue-green\n.btn-info {\n .button-variant(@btn-info-color; @btn-info-bg; @btn-info-border);\n}\n// Warning appears as orange\n.btn-warning {\n .button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border);\n}\n// Danger and error appear as red\n.btn-danger {\n .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border);\n}\n\n\n// Link buttons\n// -------------------------\n\n// Make a button look and behave like a link\n.btn-link {\n color: @link-color;\n font-weight: normal;\n cursor: pointer;\n border-radius: 0;\n\n &,\n &:active,\n &[disabled],\n fieldset[disabled] & {\n background-color: transparent;\n .box-shadow(none);\n }\n &,\n &:hover,\n &:focus,\n &:active {\n border-color: transparent;\n }\n &:hover,\n &:focus {\n color: @link-hover-color;\n text-decoration: underline;\n background-color: transparent;\n }\n &[disabled],\n fieldset[disabled] & {\n &:hover,\n &:focus {\n color: @btn-link-disabled-color;\n text-decoration: none;\n }\n }\n}\n\n\n// Button Sizes\n// --------------------------------------------------\n\n.btn-lg {\n // line-height: ensure even-numbered height of button next to large input\n .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);\n}\n.btn-sm {\n // line-height: ensure proper height of button next to small input\n .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);\n}\n.btn-xs {\n .button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @border-radius-small);\n}\n\n\n// Block button\n// --------------------------------------------------\n\n.btn-block {\n display: block;\n width: 100%;\n padding-left: 0;\n padding-right: 0;\n}\n\n// Vertically space out multiple block buttons\n.btn-block + .btn-block {\n margin-top: 5px;\n}\n\n// Specificity overrides\ninput[type=\"submit\"],\ninput[type=\"reset\"],\ninput[type=\"button\"] {\n &.btn-block {\n width: 100%;\n }\n}\n","//\n// Button groups\n// --------------------------------------------------\n\n// Make the div behave like a button\n.btn-group,\n.btn-group-vertical {\n position: relative;\n display: inline-block;\n vertical-align: middle; // match .btn alignment given font-size hack above\n > .btn {\n position: relative;\n float: left;\n // Bring the \"active\" button to the front\n &:hover,\n &:focus,\n &:active,\n &.active {\n z-index: 2;\n }\n &:focus {\n // Remove focus outline when dropdown JS adds it after closing the menu\n outline: none;\n }\n }\n}\n\n// Prevent double borders when buttons are next to each other\n.btn-group {\n .btn + .btn,\n .btn + .btn-group,\n .btn-group + .btn,\n .btn-group + .btn-group {\n margin-left: -1px;\n }\n}\n\n// Optional: Group multiple button groups together for a toolbar\n.btn-toolbar {\n margin-left: -5px; // Offset the first child's margin\n &:extend(.clearfix all);\n\n .btn-group,\n .input-group {\n float: left;\n }\n > .btn,\n > .btn-group,\n > .input-group {\n margin-left: 5px;\n }\n}\n\n.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {\n border-radius: 0;\n}\n\n// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match\n.btn-group > .btn:first-child {\n margin-left: 0;\n &:not(:last-child):not(.dropdown-toggle) {\n .border-right-radius(0);\n }\n}\n// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it\n.btn-group > .btn:last-child:not(:first-child),\n.btn-group > .dropdown-toggle:not(:first-child) {\n .border-left-radius(0);\n}\n\n// Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)\n.btn-group > .btn-group {\n float: left;\n}\n.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group > .btn-group:first-child {\n > .btn:last-child,\n > .dropdown-toggle {\n .border-right-radius(0);\n }\n}\n.btn-group > .btn-group:last-child > .btn:first-child {\n .border-left-radius(0);\n}\n\n// On active and open, don't show outline\n.btn-group .dropdown-toggle:active,\n.btn-group.open .dropdown-toggle {\n outline: 0;\n}\n\n\n// Sizing\n//\n// Remix the default button sizing classes into new ones for easier manipulation.\n\n.btn-group-xs > .btn { &:extend(.btn-xs); }\n.btn-group-sm > .btn { &:extend(.btn-sm); }\n.btn-group-lg > .btn { &:extend(.btn-lg); }\n\n\n// Split button dropdowns\n// ----------------------\n\n// Give the line between buttons some depth\n.btn-group > .btn + .dropdown-toggle {\n padding-left: 8px;\n padding-right: 8px;\n}\n.btn-group > .btn-lg + .dropdown-toggle {\n padding-left: 12px;\n padding-right: 12px;\n}\n\n// The clickable button for toggling the menu\n// Remove the gradient and set the same inset shadow as the :active state\n.btn-group.open .dropdown-toggle {\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n\n // Show no shadow for `.btn-link` since it has no other button styles.\n &.btn-link {\n .box-shadow(none);\n }\n}\n\n\n// Reposition the caret\n.btn .caret {\n margin-left: 0;\n}\n// Carets in other button sizes\n.btn-lg .caret {\n border-width: @caret-width-large @caret-width-large 0;\n border-bottom-width: 0;\n}\n// Upside down carets for .dropup\n.dropup .btn-lg .caret {\n border-width: 0 @caret-width-large @caret-width-large;\n}\n\n\n// Vertical button groups\n// ----------------------\n\n.btn-group-vertical {\n > .btn,\n > .btn-group,\n > .btn-group > .btn {\n display: block;\n float: none;\n width: 100%;\n max-width: 100%;\n }\n\n // Clear floats so dropdown menus can be properly placed\n > .btn-group {\n &:extend(.clearfix all);\n > .btn {\n float: none;\n }\n }\n\n > .btn + .btn,\n > .btn + .btn-group,\n > .btn-group + .btn,\n > .btn-group + .btn-group {\n margin-top: -1px;\n margin-left: 0;\n }\n}\n\n.btn-group-vertical > .btn {\n &:not(:first-child):not(:last-child) {\n border-radius: 0;\n }\n &:first-child:not(:last-child) {\n border-top-right-radius: @border-radius-base;\n .border-bottom-radius(0);\n }\n &:last-child:not(:first-child) {\n border-bottom-left-radius: @border-radius-base;\n .border-top-radius(0);\n }\n}\n.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group-vertical > .btn-group:first-child:not(:last-child) {\n > .btn:last-child,\n > .dropdown-toggle {\n .border-bottom-radius(0);\n }\n}\n.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {\n .border-top-radius(0);\n}\n\n\n\n// Justified button groups\n// ----------------------\n\n.btn-group-justified {\n display: table;\n width: 100%;\n table-layout: fixed;\n border-collapse: separate;\n > .btn,\n > .btn-group {\n float: none;\n display: table-cell;\n width: 1%;\n }\n > .btn-group .btn {\n width: 100%;\n }\n}\n\n\n// Checkbox and radio options\n[data-toggle=\"buttons\"] > .btn > input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn > input[type=\"checkbox\"] {\n display: none;\n}\n","//\n// Component animations\n// --------------------------------------------------\n\n// Heads up!\n//\n// We don't use the `.opacity()` mixin here since it causes a bug with text\n// fields in IE7-8. Source: https://github.com/twitter/bootstrap/pull/3552.\n\n.fade {\n opacity: 0;\n .transition(opacity .15s linear);\n &.in {\n opacity: 1;\n }\n}\n\n.collapse {\n display: none;\n &.in {\n display: block;\n }\n}\n.collapsing {\n position: relative;\n height: 0;\n overflow: hidden;\n .transition(height .35s ease);\n}\n","//\n// Glyphicons for Bootstrap\n//\n// Since icons are fonts, they can be placed anywhere text is placed and are\n// thus automatically sized to match the surrounding child. To use, create an\n// inline element with the appropriate classes, like so:\n//\n// Star\n\n// Import the fonts\n@font-face {\n font-family: 'Glyphicons Halflings';\n src: ~\"url('@{icon-font-path}@{icon-font-name}.eot')\";\n src: ~\"url('@{icon-font-path}@{icon-font-name}.eot?#iefix') format('embedded-opentype')\",\n ~\"url('@{icon-font-path}@{icon-font-name}.woff') format('woff')\",\n ~\"url('@{icon-font-path}@{icon-font-name}.ttf') format('truetype')\",\n ~\"url('@{icon-font-path}@{icon-font-name}.svg#@{icon-font-svg-id}') format('svg')\";\n}\n\n// Catchall baseclass\n.glyphicon {\n position: relative;\n top: 1px;\n display: inline-block;\n font-family: 'Glyphicons Halflings';\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n// Individual icons\n.glyphicon-asterisk { &:before { content: \"\\2a\"; } }\n.glyphicon-plus { &:before { content: \"\\2b\"; } }\n.glyphicon-euro { &:before { content: \"\\20ac\"; } }\n.glyphicon-minus { &:before { content: \"\\2212\"; } }\n.glyphicon-cloud { &:before { content: \"\\2601\"; } }\n.glyphicon-envelope { &:before { content: \"\\2709\"; } }\n.glyphicon-pencil { &:before { content: \"\\270f\"; } }\n.glyphicon-glass { &:before { content: \"\\e001\"; } }\n.glyphicon-music { &:before { content: \"\\e002\"; } }\n.glyphicon-search { &:before { content: \"\\e003\"; } }\n.glyphicon-heart { &:before { content: \"\\e005\"; } }\n.glyphicon-star { &:before { content: \"\\e006\"; } }\n.glyphicon-star-empty { &:before { content: \"\\e007\"; } }\n.glyphicon-user { &:before { content: \"\\e008\"; } }\n.glyphicon-film { &:before { content: \"\\e009\"; } }\n.glyphicon-th-large { &:before { content: \"\\e010\"; } }\n.glyphicon-th { &:before { content: \"\\e011\"; } }\n.glyphicon-th-list { &:before { content: \"\\e012\"; } }\n.glyphicon-ok { &:before { content: \"\\e013\"; } }\n.glyphicon-remove { &:before { content: \"\\e014\"; } }\n.glyphicon-zoom-in { &:before { content: \"\\e015\"; } }\n.glyphicon-zoom-out { &:before { content: \"\\e016\"; } }\n.glyphicon-off { &:before { content: \"\\e017\"; } }\n.glyphicon-signal { &:before { content: \"\\e018\"; } }\n.glyphicon-cog { &:before { content: \"\\e019\"; } }\n.glyphicon-trash { &:before { content: \"\\e020\"; } }\n.glyphicon-home { &:before { content: \"\\e021\"; } }\n.glyphicon-file { &:before { content: \"\\e022\"; } }\n.glyphicon-time { &:before { content: \"\\e023\"; } }\n.glyphicon-road { &:before { content: \"\\e024\"; } }\n.glyphicon-download-alt { &:before { content: \"\\e025\"; } }\n.glyphicon-download { &:before { content: \"\\e026\"; } }\n.glyphicon-upload { &:before { content: \"\\e027\"; } }\n.glyphicon-inbox { &:before { content: \"\\e028\"; } }\n.glyphicon-play-circle { &:before { content: \"\\e029\"; } }\n.glyphicon-repeat { &:before { content: \"\\e030\"; } }\n.glyphicon-refresh { &:before { content: \"\\e031\"; } }\n.glyphicon-list-alt { &:before { content: \"\\e032\"; } }\n.glyphicon-lock { &:before { content: \"\\e033\"; } }\n.glyphicon-flag { &:before { content: \"\\e034\"; } }\n.glyphicon-headphones { &:before { content: \"\\e035\"; } }\n.glyphicon-volume-off { &:before { content: \"\\e036\"; } }\n.glyphicon-volume-down { &:before { content: \"\\e037\"; } }\n.glyphicon-volume-up { &:before { content: \"\\e038\"; } }\n.glyphicon-qrcode { &:before { content: \"\\e039\"; } }\n.glyphicon-barcode { &:before { content: \"\\e040\"; } }\n.glyphicon-tag { &:before { content: \"\\e041\"; } }\n.glyphicon-tags { &:before { content: \"\\e042\"; } }\n.glyphicon-book { &:before { content: \"\\e043\"; } }\n.glyphicon-bookmark { &:before { content: \"\\e044\"; } }\n.glyphicon-print { &:before { content: \"\\e045\"; } }\n.glyphicon-camera { &:before { content: \"\\e046\"; } }\n.glyphicon-font { &:before { content: \"\\e047\"; } }\n.glyphicon-bold { &:before { content: \"\\e048\"; } }\n.glyphicon-italic { &:before { content: \"\\e049\"; } }\n.glyphicon-text-height { &:before { content: \"\\e050\"; } }\n.glyphicon-text-width { &:before { content: \"\\e051\"; } }\n.glyphicon-align-left { &:before { content: \"\\e052\"; } }\n.glyphicon-align-center { &:before { content: \"\\e053\"; } }\n.glyphicon-align-right { &:before { content: \"\\e054\"; } }\n.glyphicon-align-justify { &:before { content: \"\\e055\"; } }\n.glyphicon-list { &:before { content: \"\\e056\"; } }\n.glyphicon-indent-left { &:before { content: \"\\e057\"; } }\n.glyphicon-indent-right { &:before { content: \"\\e058\"; } }\n.glyphicon-facetime-video { &:before { content: \"\\e059\"; } }\n.glyphicon-picture { &:before { content: \"\\e060\"; } }\n.glyphicon-map-marker { &:before { content: \"\\e062\"; } }\n.glyphicon-adjust { &:before { content: \"\\e063\"; } }\n.glyphicon-tint { &:before { content: \"\\e064\"; } }\n.glyphicon-edit { &:before { content: \"\\e065\"; } }\n.glyphicon-share { &:before { content: \"\\e066\"; } }\n.glyphicon-check { &:before { content: \"\\e067\"; } }\n.glyphicon-move { &:before { content: \"\\e068\"; } }\n.glyphicon-step-backward { &:before { content: \"\\e069\"; } }\n.glyphicon-fast-backward { &:before { content: \"\\e070\"; } }\n.glyphicon-backward { &:before { content: \"\\e071\"; } }\n.glyphicon-play { &:before { content: \"\\e072\"; } }\n.glyphicon-pause { &:before { content: \"\\e073\"; } }\n.glyphicon-stop { &:before { content: \"\\e074\"; } }\n.glyphicon-forward { &:before { content: \"\\e075\"; } }\n.glyphicon-fast-forward { &:before { content: \"\\e076\"; } }\n.glyphicon-step-forward { &:before { content: \"\\e077\"; } }\n.glyphicon-eject { &:before { content: \"\\e078\"; } }\n.glyphicon-chevron-left { &:before { content: \"\\e079\"; } }\n.glyphicon-chevron-right { &:before { content: \"\\e080\"; } }\n.glyphicon-plus-sign { &:before { content: \"\\e081\"; } }\n.glyphicon-minus-sign { &:before { content: \"\\e082\"; } }\n.glyphicon-remove-sign { &:before { content: \"\\e083\"; } }\n.glyphicon-ok-sign { &:before { content: \"\\e084\"; } }\n.glyphicon-question-sign { &:before { content: \"\\e085\"; } }\n.glyphicon-info-sign { &:before { content: \"\\e086\"; } }\n.glyphicon-screenshot { &:before { content: \"\\e087\"; } }\n.glyphicon-remove-circle { &:before { content: \"\\e088\"; } }\n.glyphicon-ok-circle { &:before { content: \"\\e089\"; } }\n.glyphicon-ban-circle { &:before { content: \"\\e090\"; } }\n.glyphicon-arrow-left { &:before { content: \"\\e091\"; } }\n.glyphicon-arrow-right { &:before { content: \"\\e092\"; } }\n.glyphicon-arrow-up { &:before { content: \"\\e093\"; } }\n.glyphicon-arrow-down { &:before { content: \"\\e094\"; } }\n.glyphicon-share-alt { &:before { content: \"\\e095\"; } }\n.glyphicon-resize-full { &:before { content: \"\\e096\"; } }\n.glyphicon-resize-small { &:before { content: \"\\e097\"; } }\n.glyphicon-exclamation-sign { &:before { content: \"\\e101\"; } }\n.glyphicon-gift { &:before { content: \"\\e102\"; } }\n.glyphicon-leaf { &:before { content: \"\\e103\"; } }\n.glyphicon-fire { &:before { content: \"\\e104\"; } }\n.glyphicon-eye-open { &:before { content: \"\\e105\"; } }\n.glyphicon-eye-close { &:before { content: \"\\e106\"; } }\n.glyphicon-warning-sign { &:before { content: \"\\e107\"; } }\n.glyphicon-plane { &:before { content: \"\\e108\"; } }\n.glyphicon-calendar { &:before { content: \"\\e109\"; } }\n.glyphicon-random { &:before { content: \"\\e110\"; } }\n.glyphicon-comment { &:before { content: \"\\e111\"; } }\n.glyphicon-magnet { &:before { content: \"\\e112\"; } }\n.glyphicon-chevron-up { &:before { content: \"\\e113\"; } }\n.glyphicon-chevron-down { &:before { content: \"\\e114\"; } }\n.glyphicon-retweet { &:before { content: \"\\e115\"; } }\n.glyphicon-shopping-cart { &:before { content: \"\\e116\"; } }\n.glyphicon-folder-close { &:before { content: \"\\e117\"; } }\n.glyphicon-folder-open { &:before { content: \"\\e118\"; } }\n.glyphicon-resize-vertical { &:before { content: \"\\e119\"; } }\n.glyphicon-resize-horizontal { &:before { content: \"\\e120\"; } }\n.glyphicon-hdd { &:before { content: \"\\e121\"; } }\n.glyphicon-bullhorn { &:before { content: \"\\e122\"; } }\n.glyphicon-bell { &:before { content: \"\\e123\"; } }\n.glyphicon-certificate { &:before { content: \"\\e124\"; } }\n.glyphicon-thumbs-up { &:before { content: \"\\e125\"; } }\n.glyphicon-thumbs-down { &:before { content: \"\\e126\"; } }\n.glyphicon-hand-right { &:before { content: \"\\e127\"; } }\n.glyphicon-hand-left { &:before { content: \"\\e128\"; } }\n.glyphicon-hand-up { &:before { content: \"\\e129\"; } }\n.glyphicon-hand-down { &:before { content: \"\\e130\"; } }\n.glyphicon-circle-arrow-right { &:before { content: \"\\e131\"; } }\n.glyphicon-circle-arrow-left { &:before { content: \"\\e132\"; } }\n.glyphicon-circle-arrow-up { &:before { content: \"\\e133\"; } }\n.glyphicon-circle-arrow-down { &:before { content: \"\\e134\"; } }\n.glyphicon-globe { &:before { content: \"\\e135\"; } }\n.glyphicon-wrench { &:before { content: \"\\e136\"; } }\n.glyphicon-tasks { &:before { content: \"\\e137\"; } }\n.glyphicon-filter { &:before { content: \"\\e138\"; } }\n.glyphicon-briefcase { &:before { content: \"\\e139\"; } }\n.glyphicon-fullscreen { &:before { content: \"\\e140\"; } }\n.glyphicon-dashboard { &:before { content: \"\\e141\"; } }\n.glyphicon-paperclip { &:before { content: \"\\e142\"; } }\n.glyphicon-heart-empty { &:before { content: \"\\e143\"; } }\n.glyphicon-link { &:before { content: \"\\e144\"; } }\n.glyphicon-phone { &:before { content: \"\\e145\"; } }\n.glyphicon-pushpin { &:before { content: \"\\e146\"; } }\n.glyphicon-usd { &:before { content: \"\\e148\"; } }\n.glyphicon-gbp { &:before { content: \"\\e149\"; } }\n.glyphicon-sort { &:before { content: \"\\e150\"; } }\n.glyphicon-sort-by-alphabet { &:before { content: \"\\e151\"; } }\n.glyphicon-sort-by-alphabet-alt { &:before { content: \"\\e152\"; } }\n.glyphicon-sort-by-order { &:before { content: \"\\e153\"; } }\n.glyphicon-sort-by-order-alt { &:before { content: \"\\e154\"; } }\n.glyphicon-sort-by-attributes { &:before { content: \"\\e155\"; } }\n.glyphicon-sort-by-attributes-alt { &:before { content: \"\\e156\"; } }\n.glyphicon-unchecked { &:before { content: \"\\e157\"; } }\n.glyphicon-expand { &:before { content: \"\\e158\"; } }\n.glyphicon-collapse-down { &:before { content: \"\\e159\"; } }\n.glyphicon-collapse-up { &:before { content: \"\\e160\"; } }\n.glyphicon-log-in { &:before { content: \"\\e161\"; } }\n.glyphicon-flash { &:before { content: \"\\e162\"; } }\n.glyphicon-log-out { &:before { content: \"\\e163\"; } }\n.glyphicon-new-window { &:before { content: \"\\e164\"; } }\n.glyphicon-record { &:before { content: \"\\e165\"; } }\n.glyphicon-save { &:before { content: \"\\e166\"; } }\n.glyphicon-open { &:before { content: \"\\e167\"; } }\n.glyphicon-saved { &:before { content: \"\\e168\"; } }\n.glyphicon-import { &:before { content: \"\\e169\"; } }\n.glyphicon-export { &:before { content: \"\\e170\"; } }\n.glyphicon-send { &:before { content: \"\\e171\"; } }\n.glyphicon-floppy-disk { &:before { content: \"\\e172\"; } }\n.glyphicon-floppy-saved { &:before { content: \"\\e173\"; } }\n.glyphicon-floppy-remove { &:before { content: \"\\e174\"; } }\n.glyphicon-floppy-save { &:before { content: \"\\e175\"; } }\n.glyphicon-floppy-open { &:before { content: \"\\e176\"; } }\n.glyphicon-credit-card { &:before { content: \"\\e177\"; } }\n.glyphicon-transfer { &:before { content: \"\\e178\"; } }\n.glyphicon-cutlery { &:before { content: \"\\e179\"; } }\n.glyphicon-header { &:before { content: \"\\e180\"; } }\n.glyphicon-compressed { &:before { content: \"\\e181\"; } }\n.glyphicon-earphone { &:before { content: \"\\e182\"; } }\n.glyphicon-phone-alt { &:before { content: \"\\e183\"; } }\n.glyphicon-tower { &:before { content: \"\\e184\"; } }\n.glyphicon-stats { &:before { content: \"\\e185\"; } }\n.glyphicon-sd-video { &:before { content: \"\\e186\"; } }\n.glyphicon-hd-video { &:before { content: \"\\e187\"; } }\n.glyphicon-subtitles { &:before { content: \"\\e188\"; } }\n.glyphicon-sound-stereo { &:before { content: \"\\e189\"; } }\n.glyphicon-sound-dolby { &:before { content: \"\\e190\"; } }\n.glyphicon-sound-5-1 { &:before { content: \"\\e191\"; } }\n.glyphicon-sound-6-1 { &:before { content: \"\\e192\"; } }\n.glyphicon-sound-7-1 { &:before { content: \"\\e193\"; } }\n.glyphicon-copyright-mark { &:before { content: \"\\e194\"; } }\n.glyphicon-registration-mark { &:before { content: \"\\e195\"; } }\n.glyphicon-cloud-download { &:before { content: \"\\e197\"; } }\n.glyphicon-cloud-upload { &:before { content: \"\\e198\"; } }\n.glyphicon-tree-conifer { &:before { content: \"\\e199\"; } }\n.glyphicon-tree-deciduous { &:before { content: \"\\e200\"; } }\n","//\n// Dropdown menus\n// --------------------------------------------------\n\n\n// Dropdown arrow/caret\n.caret {\n display: inline-block;\n width: 0;\n height: 0;\n margin-left: 2px;\n vertical-align: middle;\n border-top: @caret-width-base solid;\n border-right: @caret-width-base solid transparent;\n border-left: @caret-width-base solid transparent;\n}\n\n// The dropdown wrapper (div)\n.dropdown {\n position: relative;\n}\n\n// Prevent the focus on the dropdown toggle when closing dropdowns\n.dropdown-toggle:focus {\n outline: 0;\n}\n\n// The dropdown menu (ul)\n.dropdown-menu {\n position: absolute;\n top: 100%;\n left: 0;\n z-index: @zindex-dropdown;\n display: none; // none by default, but block on \"open\" of the menu\n float: left;\n min-width: 160px;\n padding: 5px 0;\n margin: 2px 0 0; // override default ul\n list-style: none;\n font-size: @font-size-base;\n background-color: @dropdown-bg;\n border: 1px solid @dropdown-fallback-border; // IE8 fallback\n border: 1px solid @dropdown-border;\n border-radius: @border-radius-base;\n .box-shadow(0 6px 12px rgba(0,0,0,.175));\n background-clip: padding-box;\n\n // Aligns the dropdown menu to right\n //\n // Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]`\n &.pull-right {\n right: 0;\n left: auto;\n }\n\n // Dividers (basically an hr) within the dropdown\n .divider {\n .nav-divider(@dropdown-divider-bg);\n }\n\n // Links within the dropdown menu\n > li > a {\n display: block;\n padding: 3px 20px;\n clear: both;\n font-weight: normal;\n line-height: @line-height-base;\n color: @dropdown-link-color;\n white-space: nowrap; // prevent links from randomly breaking onto new lines\n }\n}\n\n// Hover/Focus state\n.dropdown-menu > li > a {\n &:hover,\n &:focus {\n text-decoration: none;\n color: @dropdown-link-hover-color;\n background-color: @dropdown-link-hover-bg;\n }\n}\n\n// Active state\n.dropdown-menu > .active > a {\n &,\n &:hover,\n &:focus {\n color: @dropdown-link-active-color;\n text-decoration: none;\n outline: 0;\n background-color: @dropdown-link-active-bg;\n }\n}\n\n// Disabled state\n//\n// Gray out text and ensure the hover/focus state remains gray\n\n.dropdown-menu > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @dropdown-link-disabled-color;\n }\n}\n// Nuke hover/focus effects\n.dropdown-menu > .disabled > a {\n &:hover,\n &:focus {\n text-decoration: none;\n background-color: transparent;\n background-image: none; // Remove CSS gradient\n .reset-filter();\n cursor: not-allowed;\n }\n}\n\n// Open state for the dropdown\n.open {\n // Show the menu\n > .dropdown-menu {\n display: block;\n }\n\n // Remove the outline when :focus is triggered\n > a {\n outline: 0;\n }\n}\n\n// Menu positioning\n//\n// Add extra class to `.dropdown-menu` to flip the alignment of the dropdown\n// menu with the parent.\n.dropdown-menu-right {\n left: auto; // Reset the default from `.dropdown-menu`\n right: 0;\n}\n// With v3, we enabled auto-flipping if you have a dropdown within a right\n// aligned nav component. To enable the undoing of that, we provide an override\n// to restore the default dropdown menu alignment.\n//\n// This is only for left-aligning a dropdown menu within a `.navbar-right` or\n// `.pull-right` nav component.\n.dropdown-menu-left {\n left: 0;\n right: auto;\n}\n\n// Dropdown section headers\n.dropdown-header {\n display: block;\n padding: 3px 20px;\n font-size: @font-size-small;\n line-height: @line-height-base;\n color: @dropdown-header-color;\n}\n\n// Backdrop to catch body clicks on mobile, etc.\n.dropdown-backdrop {\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n z-index: (@zindex-dropdown - 10);\n}\n\n// Right aligned dropdowns\n.pull-right > .dropdown-menu {\n right: 0;\n left: auto;\n}\n\n// Allow for dropdowns to go bottom up (aka, dropup-menu)\n//\n// Just add .dropup after the standard .dropdown class and you're set, bro.\n// TODO: abstract this so that the navbar fixed styles are not placed here?\n\n.dropup,\n.navbar-fixed-bottom .dropdown {\n // Reverse the caret\n .caret {\n border-top: 0;\n border-bottom: @caret-width-base solid;\n content: \"\";\n }\n // Different positioning for bottom up menu\n .dropdown-menu {\n top: auto;\n bottom: 100%;\n margin-bottom: 1px;\n }\n}\n\n\n// Component alignment\n//\n// Reiterate per navbar.less and the modified component alignment there.\n\n@media (min-width: @grid-float-breakpoint) {\n .navbar-right {\n .dropdown-menu {\n .dropdown-menu-right();\n }\n // Necessary for overrides of the default right aligned menu.\n // Will remove come v4 in all likelihood.\n .dropdown-menu-left {\n .dropdown-menu-left();\n }\n }\n}\n\n","//\n// Input groups\n// --------------------------------------------------\n\n// Base styles\n// -------------------------\n.input-group {\n position: relative; // For dropdowns\n display: table;\n border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table\n\n // Undo padding and float of grid classes\n &[class*=\"col-\"] {\n float: none;\n padding-left: 0;\n padding-right: 0;\n }\n\n .form-control {\n // Ensure that the input is always above the *appended* addon button for\n // proper border colors.\n position: relative;\n z-index: 2;\n\n // IE9 fubars the placeholder attribute in text inputs and the arrows on\n // select elements in input groups. To fix it, we float the input. Details:\n // https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855\n float: left;\n\n width: 100%;\n margin-bottom: 0;\n }\n}\n\n// Sizing options\n//\n// Remix the default form control sizing classes into new ones for easier\n// manipulation.\n\n.input-group-lg > .form-control,\n.input-group-lg > .input-group-addon,\n.input-group-lg > .input-group-btn > .btn { .input-lg(); }\n.input-group-sm > .form-control,\n.input-group-sm > .input-group-addon,\n.input-group-sm > .input-group-btn > .btn { .input-sm(); }\n\n\n// Display as table-cell\n// -------------------------\n.input-group-addon,\n.input-group-btn,\n.input-group .form-control {\n display: table-cell;\n\n &:not(:first-child):not(:last-child) {\n border-radius: 0;\n }\n}\n// Addon and addon wrapper for buttons\n.input-group-addon,\n.input-group-btn {\n width: 1%;\n white-space: nowrap;\n vertical-align: middle; // Match the inputs\n}\n\n// Text input groups\n// -------------------------\n.input-group-addon {\n padding: @padding-base-vertical @padding-base-horizontal;\n font-size: @font-size-base;\n font-weight: normal;\n line-height: 1;\n color: @input-color;\n text-align: center;\n background-color: @input-group-addon-bg;\n border: 1px solid @input-group-addon-border-color;\n border-radius: @border-radius-base;\n\n // Sizing\n &.input-sm {\n padding: @padding-small-vertical @padding-small-horizontal;\n font-size: @font-size-small;\n border-radius: @border-radius-small;\n }\n &.input-lg {\n padding: @padding-large-vertical @padding-large-horizontal;\n font-size: @font-size-large;\n border-radius: @border-radius-large;\n }\n\n // Nuke default margins from checkboxes and radios to vertically center within.\n input[type=\"radio\"],\n input[type=\"checkbox\"] {\n margin-top: 0;\n }\n}\n\n// Reset rounded corners\n.input-group .form-control:first-child,\n.input-group-addon:first-child,\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group > .btn,\n.input-group-btn:first-child > .dropdown-toggle,\n.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),\n.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {\n .border-right-radius(0);\n}\n.input-group-addon:first-child {\n border-right: 0;\n}\n.input-group .form-control:last-child,\n.input-group-addon:last-child,\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group > .btn,\n.input-group-btn:last-child > .dropdown-toggle,\n.input-group-btn:first-child > .btn:not(:first-child),\n.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {\n .border-left-radius(0);\n}\n.input-group-addon:last-child {\n border-left: 0;\n}\n\n// Button input groups\n// -------------------------\n.input-group-btn {\n position: relative;\n // Jankily prevent input button groups from wrapping with `white-space` and\n // `font-size` in combination with `inline-block` on buttons.\n font-size: 0;\n white-space: nowrap;\n\n // Negative margin for spacing, position for bringing hovered/focused/actived\n // element above the siblings.\n > .btn {\n position: relative;\n + .btn {\n margin-left: -1px;\n }\n // Bring the \"active\" button to the front\n &:hover,\n &:focus,\n &:active {\n z-index: 2;\n }\n }\n\n // Negative margin to only have a 1px border between the two\n &:first-child {\n > .btn,\n > .btn-group {\n margin-right: -1px;\n }\n }\n &:last-child {\n > .btn,\n > .btn-group {\n margin-left: -1px;\n }\n }\n}\n","//\n// Navs\n// --------------------------------------------------\n\n\n// Base class\n// --------------------------------------------------\n\n.nav {\n margin-bottom: 0;\n padding-left: 0; // Override default ul/ol\n list-style: none;\n &:extend(.clearfix all);\n\n > li {\n position: relative;\n display: block;\n\n > a {\n position: relative;\n display: block;\n padding: @nav-link-padding;\n &:hover,\n &:focus {\n text-decoration: none;\n background-color: @nav-link-hover-bg;\n }\n }\n\n // Disabled state sets text to gray and nukes hover/tab effects\n &.disabled > a {\n color: @nav-disabled-link-color;\n\n &:hover,\n &:focus {\n color: @nav-disabled-link-hover-color;\n text-decoration: none;\n background-color: transparent;\n cursor: not-allowed;\n }\n }\n }\n\n // Open dropdowns\n .open > a {\n &,\n &:hover,\n &:focus {\n background-color: @nav-link-hover-bg;\n border-color: @link-color;\n }\n }\n\n // Nav dividers (deprecated with v3.0.1)\n //\n // This should have been removed in v3 with the dropping of `.nav-list`, but\n // we missed it. We don't currently support this anywhere, but in the interest\n // of maintaining backward compatibility in case you use it, it's deprecated.\n .nav-divider {\n .nav-divider();\n }\n\n // Prevent IE8 from misplacing imgs\n //\n // See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989\n > li > a > img {\n max-width: none;\n }\n}\n\n\n// Tabs\n// -------------------------\n\n// Give the tabs something to sit on\n.nav-tabs {\n border-bottom: 1px solid @nav-tabs-border-color;\n > li {\n float: left;\n // Make the list-items overlay the bottom border\n margin-bottom: -1px;\n\n // Actual tabs (as links)\n > a {\n margin-right: 2px;\n line-height: @line-height-base;\n border: 1px solid transparent;\n border-radius: @border-radius-base @border-radius-base 0 0;\n &:hover {\n border-color: @nav-tabs-link-hover-border-color @nav-tabs-link-hover-border-color @nav-tabs-border-color;\n }\n }\n\n // Active state, and its :hover to override normal :hover\n &.active > a {\n &,\n &:hover,\n &:focus {\n color: @nav-tabs-active-link-hover-color;\n background-color: @nav-tabs-active-link-hover-bg;\n border: 1px solid @nav-tabs-active-link-hover-border-color;\n border-bottom-color: transparent;\n cursor: default;\n }\n }\n }\n // pulling this in mainly for less shorthand\n &.nav-justified {\n .nav-justified();\n .nav-tabs-justified();\n }\n}\n\n\n// Pills\n// -------------------------\n.nav-pills {\n > li {\n float: left;\n\n // Links rendered as pills\n > a {\n border-radius: @nav-pills-border-radius;\n }\n + li {\n margin-left: 2px;\n }\n\n // Active state\n &.active > a {\n &,\n &:hover,\n &:focus {\n color: @nav-pills-active-link-hover-color;\n background-color: @nav-pills-active-link-hover-bg;\n }\n }\n }\n}\n\n\n// Stacked pills\n.nav-stacked {\n > li {\n float: none;\n + li {\n margin-top: 2px;\n margin-left: 0; // no need for this gap between nav items\n }\n }\n}\n\n\n// Nav variations\n// --------------------------------------------------\n\n// Justified nav links\n// -------------------------\n\n.nav-justified {\n width: 100%;\n\n > li {\n float: none;\n > a {\n text-align: center;\n margin-bottom: 5px;\n }\n }\n\n > .dropdown .dropdown-menu {\n top: auto;\n left: auto;\n }\n\n @media (min-width: @screen-sm-min) {\n > li {\n display: table-cell;\n width: 1%;\n > a {\n margin-bottom: 0;\n }\n }\n }\n}\n\n// Move borders to anchors instead of bottom of list\n//\n// Mixin for adding on top the shared `.nav-justified` styles for our tabs\n.nav-tabs-justified {\n border-bottom: 0;\n\n > li > a {\n // Override margin from .nav-tabs\n margin-right: 0;\n border-radius: @border-radius-base;\n }\n\n > .active > a,\n > .active > a:hover,\n > .active > a:focus {\n border: 1px solid @nav-tabs-justified-link-border-color;\n }\n\n @media (min-width: @screen-sm-min) {\n > li > a {\n border-bottom: 1px solid @nav-tabs-justified-link-border-color;\n border-radius: @border-radius-base @border-radius-base 0 0;\n }\n > .active > a,\n > .active > a:hover,\n > .active > a:focus {\n border-bottom-color: @nav-tabs-justified-active-link-border-color;\n }\n }\n}\n\n\n// Tabbable tabs\n// -------------------------\n\n// Hide tabbable panes to start, show them when `.active`\n.tab-content {\n > .tab-pane {\n display: none;\n }\n > .active {\n display: block;\n }\n}\n\n\n// Dropdowns\n// -------------------------\n\n// Specific dropdowns\n.nav-tabs .dropdown-menu {\n // make dropdown border overlap tab border\n margin-top: -1px;\n // Remove the top rounded corners here since there is a hard edge above the menu\n .border-top-radius(0);\n}\n","//\n// Navbars\n// --------------------------------------------------\n\n\n// Wrapper and base class\n//\n// Provide a static navbar from which we expand to create full-width, fixed, and\n// other navbar variations.\n\n.navbar {\n position: relative;\n min-height: @navbar-height; // Ensure a navbar always shows (e.g., without a .navbar-brand in collapsed mode)\n margin-bottom: @navbar-margin-bottom;\n border: 1px solid transparent;\n\n // Prevent floats from breaking the navbar\n &:extend(.clearfix all);\n\n @media (min-width: @grid-float-breakpoint) {\n border-radius: @navbar-border-radius;\n }\n}\n\n\n// Navbar heading\n//\n// Groups `.navbar-brand` and `.navbar-toggle` into a single component for easy\n// styling of responsive aspects.\n\n.navbar-header {\n &:extend(.clearfix all);\n\n @media (min-width: @grid-float-breakpoint) {\n float: left;\n }\n}\n\n\n// Navbar collapse (body)\n//\n// Group your navbar content into this for easy collapsing and expanding across\n// various device sizes. By default, this content is collapsed when <768px, but\n// will expand past that for a horizontal display.\n//\n// To start (on mobile devices) the navbar links, forms, and buttons are stacked\n// vertically and include a `max-height` to overflow in case you have too much\n// content for the user's viewport.\n\n.navbar-collapse {\n max-height: @navbar-collapse-max-height;\n overflow-x: visible;\n padding-right: @navbar-padding-horizontal;\n padding-left: @navbar-padding-horizontal;\n border-top: 1px solid transparent;\n box-shadow: inset 0 1px 0 rgba(255,255,255,.1);\n &:extend(.clearfix all);\n -webkit-overflow-scrolling: touch;\n\n &.in {\n overflow-y: auto;\n }\n\n @media (min-width: @grid-float-breakpoint) {\n width: auto;\n border-top: 0;\n box-shadow: none;\n\n &.collapse {\n display: block !important;\n height: auto !important;\n padding-bottom: 0; // Override default setting\n overflow: visible !important;\n }\n\n &.in {\n overflow-y: visible;\n }\n\n // Undo the collapse side padding for navbars with containers to ensure\n // alignment of right-aligned contents.\n .navbar-fixed-top &,\n .navbar-static-top &,\n .navbar-fixed-bottom & {\n padding-left: 0;\n padding-right: 0;\n }\n }\n}\n\n\n// Both navbar header and collapse\n//\n// When a container is present, change the behavior of the header and collapse.\n\n.container,\n.container-fluid {\n > .navbar-header,\n > .navbar-collapse {\n margin-right: -@navbar-padding-horizontal;\n margin-left: -@navbar-padding-horizontal;\n\n @media (min-width: @grid-float-breakpoint) {\n margin-right: 0;\n margin-left: 0;\n }\n }\n}\n\n\n//\n// Navbar alignment options\n//\n// Display the navbar across the entirety of the page or fixed it to the top or\n// bottom of the page.\n\n// Static top (unfixed, but 100% wide) navbar\n.navbar-static-top {\n z-index: @zindex-navbar;\n border-width: 0 0 1px;\n\n @media (min-width: @grid-float-breakpoint) {\n border-radius: 0;\n }\n}\n\n// Fix the top/bottom navbars when screen real estate supports it\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n position: fixed;\n right: 0;\n left: 0;\n z-index: @zindex-navbar-fixed;\n\n // Undo the rounded corners\n @media (min-width: @grid-float-breakpoint) {\n border-radius: 0;\n }\n}\n.navbar-fixed-top {\n top: 0;\n border-width: 0 0 1px;\n}\n.navbar-fixed-bottom {\n bottom: 0;\n margin-bottom: 0; // override .navbar defaults\n border-width: 1px 0 0;\n}\n\n\n// Brand/project name\n\n.navbar-brand {\n float: left;\n padding: @navbar-padding-vertical @navbar-padding-horizontal;\n font-size: @font-size-large;\n line-height: @line-height-computed;\n height: @navbar-height;\n\n &:hover,\n &:focus {\n text-decoration: none;\n }\n\n @media (min-width: @grid-float-breakpoint) {\n .navbar > .container &,\n .navbar > .container-fluid & {\n margin-left: -@navbar-padding-horizontal;\n }\n }\n}\n\n\n// Navbar toggle\n//\n// Custom button for toggling the `.navbar-collapse`, powered by the collapse\n// JavaScript plugin.\n\n.navbar-toggle {\n position: relative;\n float: right;\n margin-right: @navbar-padding-horizontal;\n padding: 9px 10px;\n .navbar-vertical-align(34px);\n background-color: transparent;\n background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n border: 1px solid transparent;\n border-radius: @border-radius-base;\n\n // We remove the `outline` here, but later compensate by attaching `:hover`\n // styles to `:focus`.\n &:focus {\n outline: none;\n }\n\n // Bars\n .icon-bar {\n display: block;\n width: 22px;\n height: 2px;\n border-radius: 1px;\n }\n .icon-bar + .icon-bar {\n margin-top: 4px;\n }\n\n @media (min-width: @grid-float-breakpoint) {\n display: none;\n }\n}\n\n\n// Navbar nav links\n//\n// Builds on top of the `.nav` components with its own modifier class to make\n// the nav the full height of the horizontal nav (above 768px).\n\n.navbar-nav {\n margin: (@navbar-padding-vertical / 2) -@navbar-padding-horizontal;\n\n > li > a {\n padding-top: 10px;\n padding-bottom: 10px;\n line-height: @line-height-computed;\n }\n\n @media (max-width: @grid-float-breakpoint-max) {\n // Dropdowns get custom display when collapsed\n .open .dropdown-menu {\n position: static;\n float: none;\n width: auto;\n margin-top: 0;\n background-color: transparent;\n border: 0;\n box-shadow: none;\n > li > a,\n .dropdown-header {\n padding: 5px 15px 5px 25px;\n }\n > li > a {\n line-height: @line-height-computed;\n &:hover,\n &:focus {\n background-image: none;\n }\n }\n }\n }\n\n // Uncollapse the nav\n @media (min-width: @grid-float-breakpoint) {\n float: left;\n margin: 0;\n\n > li {\n float: left;\n > a {\n padding-top: @navbar-padding-vertical;\n padding-bottom: @navbar-padding-vertical;\n }\n }\n\n &.navbar-right:last-child {\n margin-right: -@navbar-padding-horizontal;\n }\n }\n}\n\n\n// Component alignment\n//\n// Repurpose the pull utilities as their own navbar utilities to avoid specificity\n// issues with parents and chaining. Only do this when the navbar is uncollapsed\n// though so that navbar contents properly stack and align in mobile.\n\n@media (min-width: @grid-float-breakpoint) {\n .navbar-left { .pull-left(); }\n .navbar-right { .pull-right(); }\n}\n\n\n// Navbar form\n//\n// Extension of the `.form-inline` with some extra flavor for optimum display in\n// our navbars.\n\n.navbar-form {\n margin-left: -@navbar-padding-horizontal;\n margin-right: -@navbar-padding-horizontal;\n padding: 10px @navbar-padding-horizontal;\n border-top: 1px solid transparent;\n border-bottom: 1px solid transparent;\n @shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);\n .box-shadow(@shadow);\n\n // Mixin behavior for optimum display\n .form-inline();\n\n .form-group {\n @media (max-width: @grid-float-breakpoint-max) {\n margin-bottom: 5px;\n }\n }\n\n // Vertically center in expanded, horizontal navbar\n .navbar-vertical-align(@input-height-base);\n\n // Undo 100% width for pull classes\n @media (min-width: @grid-float-breakpoint) {\n width: auto;\n border: 0;\n margin-left: 0;\n margin-right: 0;\n padding-top: 0;\n padding-bottom: 0;\n .box-shadow(none);\n\n // Outdent the form if last child to line up with content down the page\n &.navbar-right:last-child {\n margin-right: -@navbar-padding-horizontal;\n }\n }\n}\n\n\n// Dropdown menus\n\n// Menu position and menu carets\n.navbar-nav > li > .dropdown-menu {\n margin-top: 0;\n .border-top-radius(0);\n}\n// Menu position and menu caret support for dropups via extra dropup class\n.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {\n .border-bottom-radius(0);\n}\n\n\n// Buttons in navbars\n//\n// Vertically center a button within a navbar (when *not* in a form).\n\n.navbar-btn {\n .navbar-vertical-align(@input-height-base);\n\n &.btn-sm {\n .navbar-vertical-align(@input-height-small);\n }\n &.btn-xs {\n .navbar-vertical-align(22);\n }\n}\n\n\n// Text in navbars\n//\n// Add a class to make any element properly align itself vertically within the navbars.\n\n.navbar-text {\n .navbar-vertical-align(@line-height-computed);\n\n @media (min-width: @grid-float-breakpoint) {\n float: left;\n margin-left: @navbar-padding-horizontal;\n margin-right: @navbar-padding-horizontal;\n\n // Outdent the form if last child to line up with content down the page\n &.navbar-right:last-child {\n margin-right: 0;\n }\n }\n}\n\n// Alternate navbars\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n background-color: @navbar-default-bg;\n border-color: @navbar-default-border;\n\n .navbar-brand {\n color: @navbar-default-brand-color;\n &:hover,\n &:focus {\n color: @navbar-default-brand-hover-color;\n background-color: @navbar-default-brand-hover-bg;\n }\n }\n\n .navbar-text {\n color: @navbar-default-color;\n }\n\n .navbar-nav {\n > li > a {\n color: @navbar-default-link-color;\n\n &:hover,\n &:focus {\n color: @navbar-default-link-hover-color;\n background-color: @navbar-default-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-active-color;\n background-color: @navbar-default-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-disabled-color;\n background-color: @navbar-default-link-disabled-bg;\n }\n }\n }\n\n .navbar-toggle {\n border-color: @navbar-default-toggle-border-color;\n &:hover,\n &:focus {\n background-color: @navbar-default-toggle-hover-bg;\n }\n .icon-bar {\n background-color: @navbar-default-toggle-icon-bar-bg;\n }\n }\n\n .navbar-collapse,\n .navbar-form {\n border-color: @navbar-default-border;\n }\n\n // Dropdown menu items\n .navbar-nav {\n // Remove background color from open dropdown\n > .open > a {\n &,\n &:hover,\n &:focus {\n background-color: @navbar-default-link-active-bg;\n color: @navbar-default-link-active-color;\n }\n }\n\n @media (max-width: @grid-float-breakpoint-max) {\n // Dropdowns get custom display when collapsed\n .open .dropdown-menu {\n > li > a {\n color: @navbar-default-link-color;\n &:hover,\n &:focus {\n color: @navbar-default-link-hover-color;\n background-color: @navbar-default-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-active-color;\n background-color: @navbar-default-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-disabled-color;\n background-color: @navbar-default-link-disabled-bg;\n }\n }\n }\n }\n }\n\n\n // Links in navbars\n //\n // Add a class to ensure links outside the navbar nav are colored correctly.\n\n .navbar-link {\n color: @navbar-default-link-color;\n &:hover {\n color: @navbar-default-link-hover-color;\n }\n }\n\n}\n\n// Inverse navbar\n\n.navbar-inverse {\n background-color: @navbar-inverse-bg;\n border-color: @navbar-inverse-border;\n\n .navbar-brand {\n color: @navbar-inverse-brand-color;\n &:hover,\n &:focus {\n color: @navbar-inverse-brand-hover-color;\n background-color: @navbar-inverse-brand-hover-bg;\n }\n }\n\n .navbar-text {\n color: @navbar-inverse-color;\n }\n\n .navbar-nav {\n > li > a {\n color: @navbar-inverse-link-color;\n\n &:hover,\n &:focus {\n color: @navbar-inverse-link-hover-color;\n background-color: @navbar-inverse-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-active-color;\n background-color: @navbar-inverse-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-disabled-color;\n background-color: @navbar-inverse-link-disabled-bg;\n }\n }\n }\n\n // Darken the responsive nav toggle\n .navbar-toggle {\n border-color: @navbar-inverse-toggle-border-color;\n &:hover,\n &:focus {\n background-color: @navbar-inverse-toggle-hover-bg;\n }\n .icon-bar {\n background-color: @navbar-inverse-toggle-icon-bar-bg;\n }\n }\n\n .navbar-collapse,\n .navbar-form {\n border-color: darken(@navbar-inverse-bg, 7%);\n }\n\n // Dropdowns\n .navbar-nav {\n > .open > a {\n &,\n &:hover,\n &:focus {\n background-color: @navbar-inverse-link-active-bg;\n color: @navbar-inverse-link-active-color;\n }\n }\n\n @media (max-width: @grid-float-breakpoint-max) {\n // Dropdowns get custom display\n .open .dropdown-menu {\n > .dropdown-header {\n border-color: @navbar-inverse-border;\n }\n .divider {\n background-color: @navbar-inverse-border;\n }\n > li > a {\n color: @navbar-inverse-link-color;\n &:hover,\n &:focus {\n color: @navbar-inverse-link-hover-color;\n background-color: @navbar-inverse-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-active-color;\n background-color: @navbar-inverse-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-disabled-color;\n background-color: @navbar-inverse-link-disabled-bg;\n }\n }\n }\n }\n }\n\n .navbar-link {\n color: @navbar-inverse-link-color;\n &:hover {\n color: @navbar-inverse-link-hover-color;\n }\n }\n\n}\n","//\n// Utility classes\n// --------------------------------------------------\n\n\n// Floats\n// -------------------------\n\n.clearfix {\n .clearfix();\n}\n.center-block {\n .center-block();\n}\n.pull-right {\n float: right !important;\n}\n.pull-left {\n float: left !important;\n}\n\n\n// Toggling content\n// -------------------------\n\n// Note: Deprecated .hide in favor of .hidden or .sr-only (as appropriate) in v3.0.1\n.hide {\n display: none !important;\n}\n.show {\n display: block !important;\n}\n.invisible {\n visibility: hidden;\n}\n.text-hide {\n .text-hide();\n}\n\n\n// Hide from screenreaders and browsers\n//\n// Credit: HTML5 Boilerplate\n\n.hidden {\n display: none !important;\n visibility: hidden !important;\n}\n\n\n// For Affix plugin\n// -------------------------\n\n.affix {\n position: fixed;\n}\n","//\n// Breadcrumbs\n// --------------------------------------------------\n\n\n.breadcrumb {\n padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal;\n margin-bottom: @line-height-computed;\n list-style: none;\n background-color: @breadcrumb-bg;\n border-radius: @border-radius-base;\n\n > li {\n display: inline-block;\n\n + li:before {\n content: \"@{breadcrumb-separator}\\00a0\"; // Unicode space added since inline-block means non-collapsing white-space\n padding: 0 5px;\n color: @breadcrumb-color;\n }\n }\n\n > .active {\n color: @breadcrumb-active-color;\n }\n}\n","//\n// Pagination (multiple pages)\n// --------------------------------------------------\n.pagination {\n display: inline-block;\n padding-left: 0;\n margin: @line-height-computed 0;\n border-radius: @border-radius-base;\n\n > li {\n display: inline; // Remove list-style and block-level defaults\n > a,\n > span {\n position: relative;\n float: left; // Collapse white-space\n padding: @padding-base-vertical @padding-base-horizontal;\n line-height: @line-height-base;\n text-decoration: none;\n color: @pagination-color;\n background-color: @pagination-bg;\n border: 1px solid @pagination-border;\n margin-left: -1px;\n }\n &:first-child {\n > a,\n > span {\n margin-left: 0;\n .border-left-radius(@border-radius-base);\n }\n }\n &:last-child {\n > a,\n > span {\n .border-right-radius(@border-radius-base);\n }\n }\n }\n\n > li > a,\n > li > span {\n &:hover,\n &:focus {\n color: @pagination-hover-color;\n background-color: @pagination-hover-bg;\n border-color: @pagination-hover-border;\n }\n }\n\n > .active > a,\n > .active > span {\n &,\n &:hover,\n &:focus {\n z-index: 2;\n color: @pagination-active-color;\n background-color: @pagination-active-bg;\n border-color: @pagination-active-border;\n cursor: default;\n }\n }\n\n > .disabled {\n > span,\n > span:hover,\n > span:focus,\n > a,\n > a:hover,\n > a:focus {\n color: @pagination-disabled-color;\n background-color: @pagination-disabled-bg;\n border-color: @pagination-disabled-border;\n cursor: not-allowed;\n }\n }\n}\n\n// Sizing\n// --------------------------------------------------\n\n// Large\n.pagination-lg {\n .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @border-radius-large);\n}\n\n// Small\n.pagination-sm {\n .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @border-radius-small);\n}\n","//\n// Pager pagination\n// --------------------------------------------------\n\n\n.pager {\n padding-left: 0;\n margin: @line-height-computed 0;\n list-style: none;\n text-align: center;\n &:extend(.clearfix all);\n li {\n display: inline;\n > a,\n > span {\n display: inline-block;\n padding: 5px 14px;\n background-color: @pager-bg;\n border: 1px solid @pager-border;\n border-radius: @pager-border-radius;\n }\n\n > a:hover,\n > a:focus {\n text-decoration: none;\n background-color: @pager-hover-bg;\n }\n }\n\n .next {\n > a,\n > span {\n float: right;\n }\n }\n\n .previous {\n > a,\n > span {\n float: left;\n }\n }\n\n .disabled {\n > a,\n > a:hover,\n > a:focus,\n > span {\n color: @pager-disabled-color;\n background-color: @pager-bg;\n cursor: not-allowed;\n }\n }\n\n}\n","//\n// Labels\n// --------------------------------------------------\n\n.label {\n display: inline;\n padding: .2em .6em .3em;\n font-size: 75%;\n font-weight: bold;\n line-height: 1;\n color: @label-color;\n text-align: center;\n white-space: nowrap;\n vertical-align: baseline;\n border-radius: .25em;\n\n // Add hover effects, but only for links\n &[href] {\n &:hover,\n &:focus {\n color: @label-link-hover-color;\n text-decoration: none;\n cursor: pointer;\n }\n }\n\n // Empty labels collapse automatically (not available in IE8)\n &:empty {\n display: none;\n }\n\n // Quick fix for labels in buttons\n .btn & {\n position: relative;\n top: -1px;\n }\n}\n\n// Colors\n// Contextual variations (linked labels get darker on :hover)\n\n.label-default {\n .label-variant(@label-default-bg);\n}\n\n.label-primary {\n .label-variant(@label-primary-bg);\n}\n\n.label-success {\n .label-variant(@label-success-bg);\n}\n\n.label-info {\n .label-variant(@label-info-bg);\n}\n\n.label-warning {\n .label-variant(@label-warning-bg);\n}\n\n.label-danger {\n .label-variant(@label-danger-bg);\n}\n","//\n// Badges\n// --------------------------------------------------\n\n\n// Base classes\n.badge {\n display: inline-block;\n min-width: 10px;\n padding: 3px 7px;\n font-size: @font-size-small;\n font-weight: @badge-font-weight;\n color: @badge-color;\n line-height: @badge-line-height;\n vertical-align: baseline;\n white-space: nowrap;\n text-align: center;\n background-color: @badge-bg;\n border-radius: @badge-border-radius;\n\n // Empty badges collapse automatically (not available in IE8)\n &:empty {\n display: none;\n }\n\n // Quick fix for badges in buttons\n .btn & {\n position: relative;\n top: -1px;\n }\n .btn-xs & {\n top: 0;\n padding: 1px 5px;\n }\n}\n\n// Hover state, but only for links\na.badge {\n &:hover,\n &:focus {\n color: @badge-link-hover-color;\n text-decoration: none;\n cursor: pointer;\n }\n}\n\n// Account for counters in navs\na.list-group-item.active > .badge,\n.nav-pills > .active > a > .badge {\n color: @badge-active-color;\n background-color: @badge-active-bg;\n}\n.nav-pills > li > a > .badge {\n margin-left: 3px;\n}\n","//\n// Jumbotron\n// --------------------------------------------------\n\n\n.jumbotron {\n padding: @jumbotron-padding;\n margin-bottom: @jumbotron-padding;\n color: @jumbotron-color;\n background-color: @jumbotron-bg;\n\n h1,\n .h1 {\n color: @jumbotron-heading-color;\n }\n p {\n margin-bottom: (@jumbotron-padding / 2);\n font-size: @jumbotron-font-size;\n font-weight: 200;\n }\n\n .container & {\n border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container\n }\n\n .container {\n max-width: 100%;\n }\n\n @media screen and (min-width: @screen-sm-min) {\n padding-top: (@jumbotron-padding * 1.6);\n padding-bottom: (@jumbotron-padding * 1.6);\n\n .container & {\n padding-left: (@jumbotron-padding * 2);\n padding-right: (@jumbotron-padding * 2);\n }\n\n h1,\n .h1 {\n font-size: (@font-size-base * 4.5);\n }\n }\n}\n","//\n// Alerts\n// --------------------------------------------------\n\n\n// Base styles\n// -------------------------\n\n.alert {\n padding: @alert-padding;\n margin-bottom: @line-height-computed;\n border: 1px solid transparent;\n border-radius: @alert-border-radius;\n\n // Headings for larger alerts\n h4 {\n margin-top: 0;\n // Specified for the h4 to prevent conflicts of changing @headings-color\n color: inherit;\n }\n // Provide class for links that match alerts\n .alert-link {\n font-weight: @alert-link-font-weight;\n }\n\n // Improve alignment and spacing of inner content\n > p,\n > ul {\n margin-bottom: 0;\n }\n > p + p {\n margin-top: 5px;\n }\n}\n\n// Dismissable alerts\n//\n// Expand the right padding and account for the close button's positioning.\n\n.alert-dismissable {\n padding-right: (@alert-padding + 20);\n\n // Adjust close link position\n .close {\n position: relative;\n top: -2px;\n right: -21px;\n color: inherit;\n }\n}\n\n// Alternate styles\n//\n// Generate contextual modifier classes for colorizing the alert.\n\n.alert-success {\n .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text);\n}\n.alert-info {\n .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text);\n}\n.alert-warning {\n .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text);\n}\n.alert-danger {\n .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text);\n}\n","//\n// Progress bars\n// --------------------------------------------------\n\n\n// Bar animations\n// -------------------------\n\n// WebKit\n@-webkit-keyframes progress-bar-stripes {\n from { background-position: 40px 0; }\n to { background-position: 0 0; }\n}\n\n// Spec and IE10+\n@keyframes progress-bar-stripes {\n from { background-position: 40px 0; }\n to { background-position: 0 0; }\n}\n\n\n\n// Bar itself\n// -------------------------\n\n// Outer container\n.progress {\n overflow: hidden;\n height: @line-height-computed;\n margin-bottom: @line-height-computed;\n background-color: @progress-bg;\n border-radius: @border-radius-base;\n .box-shadow(inset 0 1px 2px rgba(0,0,0,.1));\n}\n\n// Bar of progress\n.progress-bar {\n float: left;\n width: 0%;\n height: 100%;\n font-size: @font-size-small;\n line-height: @line-height-computed;\n color: @progress-bar-color;\n text-align: center;\n background-color: @progress-bar-bg;\n .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15));\n .transition(width .6s ease);\n}\n\n// Striped bars\n.progress-striped .progress-bar {\n #gradient > .striped();\n background-size: 40px 40px;\n}\n\n// Call animation for the active one\n.progress.active .progress-bar {\n .animation(progress-bar-stripes 2s linear infinite);\n}\n\n\n\n// Variations\n// -------------------------\n\n.progress-bar-success {\n .progress-bar-variant(@progress-bar-success-bg);\n}\n\n.progress-bar-info {\n .progress-bar-variant(@progress-bar-info-bg);\n}\n\n.progress-bar-warning {\n .progress-bar-variant(@progress-bar-warning-bg);\n}\n\n.progress-bar-danger {\n .progress-bar-variant(@progress-bar-danger-bg);\n}\n","// Media objects\n// Source: http://stubbornella.org/content/?p=497\n// --------------------------------------------------\n\n\n// Common styles\n// -------------------------\n\n// Clear the floats\n.media,\n.media-body {\n overflow: hidden;\n zoom: 1;\n}\n\n// Proper spacing between instances of .media\n.media,\n.media .media {\n margin-top: 15px;\n}\n.media:first-child {\n margin-top: 0;\n}\n\n// For images and videos, set to block\n.media-object {\n display: block;\n}\n\n// Reset margins on headings for tighter default spacing\n.media-heading {\n margin: 0 0 5px;\n}\n\n\n// Media image alignment\n// -------------------------\n\n.media {\n > .pull-left {\n margin-right: 10px;\n }\n > .pull-right {\n margin-left: 10px;\n }\n}\n\n\n// Media list variation\n// -------------------------\n\n// Undo default ul/ol styles\n.media-list {\n padding-left: 0;\n list-style: none;\n}\n","//\n// List groups\n// --------------------------------------------------\n\n\n// Base class\n//\n// Easily usable on