├── LICENSE.md ├── README.md ├── changelog.md ├── screenshots ├── bing.png ├── google.png ├── options.png ├── popup.png └── reddit.png └── src └── chromium ├── _locales ├── en │ └── messages.json ├── es │ └── messages.json └── ru │ └── messages.json ├── css ├── options.css ├── popup-debug.css └── popup.css ├── images ├── Andy_Trash_Can.svg ├── chromium-speech_input_mic_full-128.png ├── chromium-speech_input_mic_full-16.png ├── chromium-speech_input_mic_full-19.png ├── chromium-speech_input_mic_full-48.png └── chromium-speech_input_mic_full-68.png ├── js ├── background.js ├── catincan.js ├── content.js ├── default-options.js ├── options.js └── popup.js ├── lib ├── SlickGrid │ ├── MIT-LICENSE.txt │ ├── css │ │ └── smoothness │ │ │ ├── images │ │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ │ ├── ui-bg_flat_75_ffffff_40x100.png │ │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ │ ├── ui-bg_highlight-soft_75_cccccc_1x100.png │ │ │ ├── ui-icons_222222_256x240.png │ │ │ ├── ui-icons_2e83ff_256x240.png │ │ │ ├── ui-icons_454545_256x240.png │ │ │ ├── ui-icons_888888_256x240.png │ │ │ └── ui-icons_cd0a0a_256x240.png │ │ │ └── jquery-ui-1.8.5.custom.css │ ├── examples │ │ └── slick-default-theme.css │ ├── images │ │ ├── actions.gif │ │ ├── ajax-loader-small.gif │ │ ├── arrow_redo.png │ │ ├── arrow_right_peppermint.png │ │ ├── arrow_right_spearmint.png │ │ ├── arrow_undo.png │ │ ├── bullet_blue.png │ │ ├── bullet_star.png │ │ ├── bullet_toggle_minus.png │ │ ├── bullet_toggle_plus.png │ │ ├── calendar.gif │ │ ├── collapse.gif │ │ ├── comment_yellow.gif │ │ ├── down.gif │ │ ├── drag-handle.png │ │ ├── editor-helper-bg.gif │ │ ├── expand.gif │ │ ├── header-bg.gif │ │ ├── header-columns-bg.gif │ │ ├── header-columns-over-bg.gif │ │ ├── help.png │ │ ├── info.gif │ │ ├── listview.gif │ │ ├── pencil.gif │ │ ├── row-over-bg.gif │ │ ├── sort-asc.gif │ │ ├── sort-asc.png │ │ ├── sort-desc.gif │ │ ├── sort-desc.png │ │ ├── stripes.png │ │ ├── tag_red.png │ │ ├── tick.png │ │ ├── user_identity.gif │ │ └── user_identity_plus.gif │ ├── lib │ │ ├── jquery-1.4.3.min.js │ │ ├── jquery-ui-1.8.5.custom.min.js │ │ ├── jquery.event.drag-2.0.min.js │ │ └── jquery.event.drop-2.0.min.js │ ├── slick.editors.js │ ├── slick.grid.css │ └── slick.grid.js └── chromium-i18n.js ├── manifest.json └── views ├── background.xhtml ├── options.html ├── popup-debug.xhtml └── popup.xhtml /LICENSE.md: -------------------------------------------------------------------------------- 1 | Licenses 2 | ======== 3 | 4 | 5 | Voice Search 6 | ------------ 7 | 8 | Copyright © 2013 [OFTN Inc.][1] 9 | 10 | Permission is hereby granted, free of charge, to any person 11 | obtaining a copy of this software and associated documentation 12 | files (the "Software"), to deal in the Software without 13 | restriction, including without limitation the rights to use, 14 | copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | copies of the Software, and to permit persons to whom the 16 | Software is furnished to do so, subject to the following 17 | conditions: 18 | 19 | The above copyright notice and this permission notice shall be 20 | included in all copies or substantial portions of the Software. 21 | 22 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 23 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 24 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 25 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 26 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 27 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 28 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 29 | OTHER DEALINGS IN THE SOFTWARE. 30 | 31 | 32 | Chromium 33 | -------- 34 | 35 | The [microphone icon][2] used in this software is from the [Chromium browser][3] 36 | by Google under the folllowing license. 37 | 38 | Copyright © 2010 The Chromium Authors. All rights reserved. 39 | 40 | Redistribution and use in source and binary forms, with or without 41 | modification, are permitted provided that the following conditions are 42 | met: 43 | 44 | * Redistributions of source code must retain the above copyright 45 | notice, this list of conditions and the following disclaimer. 46 | * Redistributions in binary form must reproduce the above 47 | copyright notice, this list of conditions and the following disclaimer 48 | in the documentation and/or other materials provided with the 49 | distribution. 50 | * Neither the name of Google Inc. nor the names of its 51 | contributors may be used to endorse or promote products derived from 52 | this software without specific prior written permission. 53 | 54 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 55 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 56 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 57 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 58 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 59 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 60 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 61 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 62 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 63 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 64 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 65 | 66 | 67 | SlickGrid 68 | --------- 69 | 70 | The options page in this software uses [SlickGrid][4], by Michael Leibman under the 71 | following license. 72 | 73 | Copyright © 2010 Michael Leibman, 74 | 75 | Permission is hereby granted, free of charge, to any person obtaining 76 | a copy of this software and associated documentation files (the 77 | "Software"), to deal in the Software without restriction, including 78 | without limitation the rights to use, copy, modify, merge, publish, 79 | distribute, sublicense, and/or sell copies of the Software, and to 80 | permit persons to whom the Software is furnished to do so, subject to 81 | the following conditions: 82 | 83 | The above copyright notice and this permission notice shall be 84 | included in all copies or substantial portions of the Software. 85 | 86 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 87 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 88 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 89 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 90 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 91 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 92 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 93 | 94 | 95 | [1]: https://oftn.org 96 | [2]: https://purl.eligrey.com/github/voice-search/blob/master/src/images/chrome-speech_input_mic_full.png 97 | [3]: https://www.chromium.org/ 98 | [4]: https://github.com/mleibman/slickgrid 99 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Voice Search 2 | ============ 3 | 4 | Voice Search is a Google Chrome extension that provides a method to search by 5 | speaking. For example, just click on microphone and say kittens to search for 6 | kittens. If you specifically want pictures of kittens, say google 7 | images kittens. Want to learn more about World War II? Say 8 | wikipedia world war two. 9 | 10 | Screenshots 11 | ----------- 12 | 13 | * [Voice Search popup][1] 14 | * [Options page][2] 15 | * [Google][3] 16 | * [Bing][4] 17 | * [reddit][5] 18 | 19 | Roadmap 20 | ------- 21 | 22 |
23 |
Version 1.2
24 |
25 | One-click voice search from the browser button and Chrome OS integration with the Search key. 26 |
27 |
Version 1.3
28 |
29 | Implement functionality to import and export search engines and settings. Also 30 | provide an interface for setting common "task" terms and give it appropriate 31 | defaults. For example, set map to Google Maps and buy to Google 32 | Shopping and say map atlantis, buy 33 | flux capacitor, or even calculate cloud height for a 1 34 | megaton nuclear explosion (assuming calculate is set to 35 | Wolfram|Alpha). Currently, one must create new terms to do this, and modifying the 36 | old term's URI template does not update the new term's URI template. listen 37 | to and/or play are likely to be included in this version, but I'm 38 | not sure what the default should be so I'm open to suggestions. 39 |
40 |
Version 1.4
41 |
42 | Detect OpenSearch description files and provide a method to easily add them to 43 | Voice Search. If Google Chrome stable implements 44 | SpeechInputResultCollection, it will be used to chose the closest 45 | utterance to using a term, and if SpeechInputError events get 46 | implemented, they will be handled appropriately to inform the user of any problems 47 | recognizing speech input. 48 |
49 |
Version 2.0
50 |
51 | Support scripted terms and revamp the options interface accordingly. There will 52 | also need to be a way for websites to signal that they provide a scripted term. 53 | This release is aimed at providing at least some of the features that Mozilla 54 | Ubiquity implemented, but for voice. 55 |
56 |
57 | 58 | ![Tracking image](//in.getclicky.com/212712ns.gif) 59 | 60 | [1]: http://purl.eligrey.com/github/voice-search/raw/master/screenshots/popup.png 61 | [2]: http://purl.eligrey.com/github/voice-search/raw/master/screenshots/options.png 62 | [3]: http://purl.eligrey.com/github/voice-search/raw/master/screenshots/google.png 63 | [4]: http://purl.eligrey.com/github/voice-search/raw/master/screenshots/bing.png 64 | [5]: http://purl.eligrey.com/github/voice-search/raw/master/screenshots/reddit.png 65 | -------------------------------------------------------------------------------- /changelog.md: -------------------------------------------------------------------------------- 1 | Voice Search Changelog 2 | ====================== 3 | 4 | 1.1.2 5 | ----- 6 | 7 | * Initial catincan campaign integration (will be removed after the campaign) 8 | 9 | 1.1.1 10 | ----- 11 | 12 | * Fixed license information. 13 | 14 | 1.1.0 15 | ----- 16 | 17 | * Fixed the browser action. 18 | * New browser action interaction flow using windows. 19 | * Added engine definitions for common phrases such as "search for" and "pictures of". 20 | * Added logging feature. 21 | 22 | 1.0.11 23 | ------ 24 | 25 | * Updated manifest version. 26 | 27 | 1.0.10 28 | ------ 29 | 30 | * Added Spanish locale by David Álvarez Robert. 31 | * Improved Russian locale (now uses google.ru instead of gooogle.com). 32 | * Removed instructions for older versions of Chrome from the readme. 33 | 34 | 1.0.9 35 | ----- 36 | 37 | * Made Google the default search engine again. 38 | 39 | 1.0.8 40 | ----- 41 | 42 | * No longer auto-submitting when speech input and/or grammars are already being used. 43 | * Fixed some margin issues. 44 | 45 | 1.0.7 46 | ----- 47 | 48 | * Fixed debug mode. 49 | * Fixed not replacing all instances of `%s` (for real this time). 50 | * Added Russian locale by Pavel Argentov. 51 | * Removed unused PayPal button icon. 52 | 53 | 1.0.6 54 | ----- 55 | 56 | * Added a third state for website integration, which is to add speech input buttons to 57 | *all* input elements. This should take care Speechify. 58 | * Using the `SpeechInputResult` interface now that Chrome stable supports it. 59 | * Normalized code style. 60 | * Sorta-linted all non-lib code. There are some things in JSLint that I disagree with, 61 | such as `in`, referencing a function in it's own definition, and `!!+` being bad. 62 | 63 | 1.0.5 64 | ----- 65 | 66 | * Fixed the speech input microphone position on integrated websites. 67 | * Now replacing every instance of `%s` in search engine URL templates. 68 | * Updated the donation link on the options page to use WePay instead of PayPal. 69 | * Updated Chromium DOM i18n (chromium-i18n.js). 70 | 71 | 1.0.4 72 | ----- 73 | 74 | * Made DuckDuckGo the default search engine. 75 | * Corrected image filenames to correspond to the Chromium project instead of Google 76 | Chrome. 77 | 78 | 1.0.3 79 | ----- 80 | 81 | * Added OSX instructions to the readme. 82 | * Updated Twitter search box margin in content script for a change in Twitter. 83 | * Now using `chrome.tabs.create()` instead of `open()`. 84 | * Removed extra copy of a microphone image. 85 | 86 | 1.0.2 87 | ----- 88 | 89 | * Added a debug mode that can be enabled by setting `localStorage.debug` to `1`. Debug 90 | mode is intended for testing how queries are intepereted. 91 | * Made column headers on the options page i18nizable. 92 | 93 | 1.0.1 94 | ----- 95 | 96 | * Added support for multiple search boxes in website integration. 97 | * Added YouTube to the default integrated websites. 98 | 99 | 1.0.0 100 | ----- 101 | 102 | * Initial release. 103 | -------------------------------------------------------------------------------- /screenshots/bing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/screenshots/bing.png -------------------------------------------------------------------------------- /screenshots/google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/screenshots/google.png -------------------------------------------------------------------------------- /screenshots/options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/screenshots/options.png -------------------------------------------------------------------------------- /screenshots/popup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/screenshots/popup.png -------------------------------------------------------------------------------- /screenshots/reddit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/screenshots/reddit.png -------------------------------------------------------------------------------- /src/chromium/_locales/en/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "extension_name":{"message":"Voice Search"} 3 | , "extension_description":{"message":"Search by speaking."} 4 | 5 | , "version_message":{"message":"Version 1.1.2"} 6 | , "changelog":{"message":"Changelog"} 7 | , "report_bug":{"message":"Report a bug"} 8 | , "donate":{"message":"Donate"} 9 | 10 | , "popup_title":{"message":"Voice Search"} 11 | , "popup_search_engines_select":{"message":"Search Engines"} 12 | , "popup_debug_test_query":{"message":"Test"} 13 | , "popup_debug_engine_name":{"message":"Search Engine:"} 14 | , "popup_debug_query":{"message":"Query:"} 15 | , "popup_debug_uri":{"message":"URI:"} 16 | 17 | , "opts_title":{"message":"Voice Search Options"} 18 | , "opts_search_engines":{"message":"Search Engines"} 19 | , "opts_uri_format":{"message":"Insert %s where the query should go."} 20 | , "opts_default_engine":{"message":"The first search engine is the default used when searching."} 21 | , "opts_delete_search_engine":{"message":"Drag search engines to the trash can to delete them."} 22 | , "opts_delete_drag":{"message":"Drag to trash can to delete"} 23 | , "opts_website_integration":{"message":"Website Integration"} 24 | , "opts_website_integration_label":{"message":"Add speech input buttons to "} 25 | , "opts_website_integration_all":{"message":"all text fields"} 26 | , "opts_website_integration_search":{"message":"search fields"} 27 | , "opts_website_integration_none":{"message":"nothing"} 28 | , "opts_save_button":{"message":"Save"} 29 | , "opts_restore_defaults_button":{"message":"Restore Defaults"} 30 | , "opts_settings_saved":{"message":"Settings saved."} 31 | , "opts_name_column":{"message":"Name"} 32 | , "opts_uri_column":{"message":"URL"} 33 | 34 | , "background_view_title":{"message":"Voice Search Background Page"} 35 | 36 | , "duckduckgo_search_name":{"message":"DuckDuckGo"} 37 | , "duckduckgo_search_uri_template":{"message":"http://duckduckgo.com/?q=%s"} 38 | 39 | , "wikipedia_search_name":{"message":"Wikipedia"} 40 | , "wikipedia_search_uri_template":{"message":"http://en.wikipedia.org/w/index.php?title=Special:Search&search=%s"} 41 | 42 | , "google_search_name":{"message":"Google"} 43 | , "google_search_uri_template":{"message":"http://www.google.com/search?q=%s"} 44 | 45 | , "google_images_search_name":{"message":"Google Images"} 46 | , "google_images_search_uri_template":{"message":"http://www.google.com/images?q=%s"} 47 | 48 | , "google_maps_search_name":{"message":"Google Maps"} 49 | , "google_maps_search_uri_template":{"message":"http://maps.google.com/maps?q=%s"} 50 | 51 | , "google_videos_search_name":{"message":"Google Videos"} 52 | , "google_videos_search_uri_template":{"message":"http://www.google.com/search?q=%s&tbs=vid:1"} 53 | 54 | , "youtube_search_name":{"message":"YouTube"} 55 | , "youtube_search_uri_template":{"message":"http://www.youtube.com/results?search_query=%s"} 56 | 57 | , "wolframalpha_search_name":{"message":"Wolfram|Alpha"} 58 | , "wolframalpha_search_uri_template":{"message":"http://www.wolframalpha.com/input/?i=%s"} 59 | 60 | , "bing_search_name":{"message":"Bing"} 61 | , "bing_search_uri_template":{"message":"http://www.bing.com/search?q=%s"} 62 | 63 | , "yahoo_search_name":{"message":"Yahoo!"} 64 | , "yahoo_search_uri_template":{"message":"http://search.yahoo.com/search?p=%s"} 65 | } 66 | -------------------------------------------------------------------------------- /src/chromium/_locales/es/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "extension_name":{"message":"Búsqueda por voz"} 3 | , "extension_description":{"message":"Buscar hablando."} 4 | 5 | , "version_message":{"message":"Versión 1.1.2"} 6 | , "changelog":{"message":"Registro de cambios"} 7 | , "report_bug":{"message":"Reportar un error"} 8 | , "donate":{"message":"Donar"} 9 | 10 | , "popup_title":{"message":"Búsqueda por voz"} 11 | , "popup_search_engines_select":{"message":"Motores de búsqueda"} 12 | , "popup_debug_test_query":{"message":"Prueba"} 13 | , "popup_debug_engine_name":{"message":"Motor de búsqueda:"} 14 | , "popup_debug_query":{"message":"Consulta:"} 15 | , "popup_debug_uri":{"message":"URI:"} 16 | 17 | , "opts_title":{"message":"Opciones de la búsqueda de voz"} 18 | , "opts_search_engines":{"message":"Motores de búsqueda"} 19 | , "opts_uri_format":{"message":"Inserte %s donde debería ir la consulta."} 20 | , "opts_default_engine":{"message":"El primer motor de búsqueda es el usado por defecto al buscar."} 21 | , "opts_delete_search_engine":{"message":"Arrastre los motores de búsqueda a la papelera para eliminarlos."} 22 | , "opts_delete_drag":{"message":"Arrastre a la parapelera para eliminar"} 23 | , "opts_website_integration":{"message":"Integración en las páginas web"} 24 | , "opts_website_integration_label":{"message":"Añadir botones de búsqueda por voz en "} 25 | , "opts_website_integration_all":{"message":"todos los campos"} 26 | , "opts_website_integration_search":{"message":"campos de búsqueda"} 27 | , "opts_website_integration_none":{"message":"ningún lugar"} 28 | , "opts_save_button":{"message":"Guardar"} 29 | , "opts_restore_defaults_button":{"message":"Restaurar configuración por defecto"} 30 | , "opts_settings_saved":{"message":"Configuración guardada."} 31 | , "opts_name_column":{"message":"Nombre"} 32 | , "opts_uri_column":{"message":"URL"} 33 | 34 | , "background_view_title":{"message":"Página en segundo plano de Búsqueda por Voz"} 35 | 36 | , "duckduckgo_search_name":{"message":"DuckDuckGo"} 37 | , "duckduckgo_search_uri_template":{"message":"http://duckduckgo.com/?q=%s"} 38 | 39 | , "wikipedia_search_name":{"message":"Wikipedia"} 40 | , "wikipedia_search_uri_template":{"message":"http://es.wikipedia.org/w/index.php?title=Special:Search&search=%s"} 41 | 42 | , "google_search_name":{"message":"Google"} 43 | , "google_search_uri_template":{"message":"http://www.google.es/search?q=%s"} 44 | 45 | , "google_images_search_name":{"message":"Google Imagenes"} 46 | , "google_images_search_uri_template":{"message":"http://www.google.es/images?q=%s"} 47 | 48 | , "google_maps_search_name":{"message":"Google Maps"} 49 | , "google_maps_search_uri_template":{"message":"http://maps.google.es/maps?q=%s"} 50 | 51 | , "google_videos_search_name":{"message":"Google Videos"} 52 | , "google_videos_search_uri_template":{"message":"http://www.google.es/search?q=%s&tbs=vid:1"} 53 | 54 | , "youtube_search_name":{"message":"YouTube"} 55 | , "youtube_search_uri_template":{"message":"http://www.youtube.com/results?search_query=%s"} 56 | 57 | , "wolframalpha_search_name":{"message":"Wolfram Alfa"} 58 | , "wolframalpha_search_uri_template":{"message":"http://www.wolframalpha.com/input/?i=%s"} 59 | 60 | , "bing_search_name":{"message":"Bing"} 61 | , "bing_search_uri_template":{"message":"http://www.bing.com/search?q=%s"} 62 | 63 | , "yahoo_search_name":{"message":"Yahoo!"} 64 | , "yahoo_search_uri_template":{"message":"http://search.yahoo.com/search?p=%s"} 65 | } 66 | -------------------------------------------------------------------------------- /src/chromium/_locales/ru/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "extension_name":{"message":"Голосовой поиск"} 3 | , "extension_description":{"message":"Поиск, управляемый голосом."} 4 | 5 | , "version_message":{"message":"Версия 1.1.2"} 6 | , "changelog":{"message":"Журнал изменений"} 7 | , "report_bug":{"message":"Сообщить об ошибке в программе"} 8 | , "donate":{"message":"Пожертвовать"} 9 | 10 | , "popup_title":{"message":"Голосовой поиск"} 11 | , "popup_search_engines_select":{"message":"Системы поиска"} 12 | , "popup_debug_test_query":{"message":"Проверка"} 13 | , "popup_debug_engine_name":{"message":"Система поиска:"} 14 | , "popup_debug_query":{"message":"Запрос:"} 15 | , "popup_debug_uri":{"message":"URI:"} 16 | 17 | , "opts_title":{"message":"Настройки голосового поиска"} 18 | , "opts_search_engines":{"message":"Системы поиска"} 19 | , "opts_uri_format":{"message":"Пропишите %s в том месте, где должен быть запрос."} 20 | , "opts_default_engine":{"message":"Первая по счету поисковая система будет использоваться по умолчанию."} 21 | , "opts_delete_search_engine":{"message":"Для удаления перетащите систему поиска в корзину."} 22 | , "opts_delete_drag":{"message":"Для удаления перетащите в корзину"} 23 | , "opts_website_integration":{"message":"Интеграция с сайтами"} 24 | , "opts_website_integration_label":{"message":"Добавить кнопки голосового поиска "} 25 | , "opts_website_integration_all":{"message":"ко всем текстовым полям"} 26 | , "opts_website_integration_search":{"message":"к полям поиска"} 27 | , "opts_website_integration_none":{"message":"никуда"} 28 | , "opts_save_button":{"message":"Сохранить"} 29 | , "opts_restore_defaults_button":{"message":"Восстановить исходные настройки"} 30 | , "opts_settings_saved":{"message":"Настройки сохранены."} 31 | , "opts_name_column":{"message":"Имя"} 32 | , "opts_uri_column":{"message":"URL"} 33 | 34 | , "background_view_title":{"message":"Скрытая страница \"Голосового поиска\""} 35 | 36 | , "duckduckgo_search_name":{"message":"DuckDuckGo"} 37 | , "duckduckgo_search_uri_template":{"message":"http://duckduckgo.com/?q=%s"} 38 | 39 | , "wikipedia_search_name":{"message":"Wikipedia"} 40 | , "wikipedia_search_uri_template":{"message":"http://ru.wikipedia.org/w/index.php?title=Special:Search&search=%s"} 41 | 42 | , "google_search_name":{"message":"Google"} 43 | , "google_search_uri_template":{"message":"http://www.google.ru/search?q=%s"} 44 | 45 | , "google_images_search_name":{"message":"Google Images"} 46 | , "google_images_search_uri_template":{"message":"http://www.google.ru/images?q=%s"} 47 | 48 | , "google_maps_search_name":{"message":"Google Maps"} 49 | , "google_maps_search_uri_template":{"message":"http://maps.google.ru/maps?q=%s"} 50 | 51 | , "google_videos_search_name":{"message":"Google Videos"} 52 | , "google_videos_search_uri_template":{"message":"http://www.google.ru/search?q=%s&tbs=vid:1"} 53 | 54 | , "youtube_search_name":{"message":"YouTube"} 55 | , "youtube_search_uri_template":{"message":"http://www.youtube.com/results?search_query=%s"} 56 | 57 | , "wolframalpha_search_name":{"message":"Wolfram|Alpha"} 58 | , "wolframalpha_search_uri_template":{"message":"http://www.wolframalpha.com/input/?i=%s"} 59 | 60 | , "bing_search_name":{"message":"Bing"} 61 | , "bing_search_uri_template":{"message":"http://www.bing.com/search?q=%s"} 62 | 63 | , "yahoo_search_name":{"message":"Yahoo!"} 64 | , "yahoo_search_uri_template":{"message":"http://search.yahoo.com/search?p=%s"} 65 | } 66 | -------------------------------------------------------------------------------- /src/chromium/css/options.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | body, input { 4 | font-family: Ubuntu, "Segoe UI", Helvetica, Arial, sans-serif; 5 | } 6 | body { 7 | margin: 10px; 8 | margin-top: 20px; 9 | } 10 | h1 { 11 | font-size: 200%; 12 | font-weight: bold; 13 | display: inline; 14 | padding-top: 10px; 15 | padding-bottom: 10px; 16 | padding-__MSG_@@bidi_start_edge__: 60px; 17 | background: url("../images/chromium-speech_input_mic_full-68.png") no-repeat; 18 | background-size: 68px; 19 | background-position: 0; 20 | } 21 | fieldset legend { 22 | font-size: 140%; 23 | } 24 | #version { 25 | float: __MSG_@@bidi_end_edge__; 26 | } 27 | #version ul { 28 | list-style: none; 29 | } 30 | #version ul li { 31 | display: inline-block; 32 | } 33 | #version ul li:not(:first-child)::before { 34 | content: " — " 35 | } 36 | #version #donate { 37 | display: inline-block; 38 | margin-bottom: -5px; 39 | } 40 | #options { 41 | clear: both; 42 | } 43 | /*.cell-search-engine-name { 44 | 45 | } 46 | .cell-search-engine-uri { 47 | }*/ 48 | .reorder-cell { 49 | cursor: move; 50 | background: url("../lib/SlickGrid/images/drag-handle.png") no-repeat center center; 51 | } 52 | #search-engines-container { 53 | width: 60em; 54 | } 55 | #search-engines { 56 | width: 100%; 57 | height: 23em; 58 | } 59 | #delete-search-engine { 60 | float: left; 61 | height: 70px; 62 | background: url("../images/Andy_Trash_Can.svg") no-repeat left center; 63 | background-size: 70px; 64 | padding-left: 70px; 65 | padding-right: 0.8em; 66 | line-height: 70px; 67 | border-radius: 5px; 68 | } 69 | #status { 70 | color: #0e5ecf; 71 | } 72 | .slick-row.ui-state-active { 73 | background: lightgray; 74 | } 75 | .actions { 76 | margin-top: 1em; 77 | } 78 | fieldset { 79 | margin: 6px 6px 0 6px; 80 | padding: 10px 10px 10px 10px; 81 | color: #333; 82 | border: 1px solid #dedede; 83 | border-radius: 5px 5px; 84 | } -------------------------------------------------------------------------------- /src/chromium/css/popup-debug.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | #voice-search { 4 | width: 100%; 5 | } 6 | #debug-results th { 7 | text-align: left; 8 | } 9 | -------------------------------------------------------------------------------- /src/chromium/css/popup.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | body { 4 | margin: 13px 8px 0 13px; 5 | width: 59px; 6 | } 7 | #app { 8 | width: 59px; 9 | height: 42px; 10 | margin-left: 25%; 11 | } 12 | #voice-search { 13 | -webkit-appearance: none; 14 | appearance: normal; 15 | border: 0; 16 | width: 40px; 17 | height: 40px; 18 | outline: none; 19 | margin: 0; 20 | padding: 0; 21 | cursor: pointer; 22 | color: transparent; 23 | position: relative; 24 | top: -1px; 25 | } 26 | #voice-search::selection { 27 | color: transparent; 28 | background-color: transparent; 29 | } 30 | #voice-search::-webkit-input-speech-button { 31 | font-size: 230%; /*31-32px or something*/ 32 | } 33 | /* 34 | #voice-search::-webkit-search-results-button {} 35 | #voice-search::-webkit-search-cancel-button {} 36 | */ 37 | #search-engines { 38 | width: 17px; 39 | height: 42px; 40 | border: none; 41 | outline: none; 42 | } 43 | -------------------------------------------------------------------------------- /src/chromium/images/Andy_Trash_Can.svg: -------------------------------------------------------------------------------- 1 | 2 | 22 | 24 | 25 | 27 | image/svg+xml 28 | 30 | 31 | 32 | 33 | 52 | 54 | 63 | 65 | 69 | 73 | 74 | 76 | 80 | 84 | 85 | 93 | 101 | 109 | 117 | 125 | 133 | 141 | 149 | 157 | 160 | 163 | 164 | 167 | 170 | 171 | 176 | 181 | 182 | 183 | 205 | 207 | 209 | 214 | 216 | 220 | 224 | 225 | 229 | 234 | 239 | 244 | 249 | 250 | 252 | 254 | 258 | 262 | 263 | 267 | 271 | 275 | 280 | 285 | 287 | 292 | 296 | 301 | 302 | 303 | 305 | 309 | 313 | 314 | 315 | 316 | -------------------------------------------------------------------------------- /src/chromium/images/chromium-speech_input_mic_full-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/images/chromium-speech_input_mic_full-128.png -------------------------------------------------------------------------------- /src/chromium/images/chromium-speech_input_mic_full-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/images/chromium-speech_input_mic_full-16.png -------------------------------------------------------------------------------- /src/chromium/images/chromium-speech_input_mic_full-19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/images/chromium-speech_input_mic_full-19.png -------------------------------------------------------------------------------- /src/chromium/images/chromium-speech_input_mic_full-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/images/chromium-speech_input_mic_full-48.png -------------------------------------------------------------------------------- /src/chromium/images/chromium-speech_input_mic_full-68.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/images/chromium-speech_input_mic_full-68.png -------------------------------------------------------------------------------- /src/chromium/js/background.js: -------------------------------------------------------------------------------- 1 | /*! Voice Search Chromium Extension 2 | * 3 | * Copyright 2012 Eli Grey 4 | * See LICENSE.md 5 | */ 6 | 7 | /*jslint laxbreak: true, strict: true*/ 8 | /*global localStorage, chrome*/ 9 | 10 | "use strict"; 11 | 12 | chrome.browserAction.onClicked.addListener(function() { 13 | chrome.windows.getCurrent(function(window) { 14 | chrome.windows.create({ 15 | url: chrome.extension.getURL("views/popup.xhtml") 16 | , width: 100 17 | , height: 100 18 | , left: window.left + window.width - 145 19 | , top: window.top 20 | , focused: true 21 | , type: "popup" 22 | }); 23 | }); 24 | }); -------------------------------------------------------------------------------- /src/chromium/js/catincan.js: -------------------------------------------------------------------------------- 1 | chrome.storage.local.get('catincan_popup_seen', function(data) { 2 | if (!data.catincan_popup_seen) { 3 | chrome.tabs.create({ 4 | url: "https://www.catincan.com/proposal/voice-search-chrome/voice-search-one-click-functionality-and-chrome-os-integration" 5 | , active: true 6 | }); 7 | } 8 | chrome.storage.local.set({ 9 | 'catincan_popup_seen': true 10 | }); 11 | }); -------------------------------------------------------------------------------- /src/chromium/js/content.js: -------------------------------------------------------------------------------- 1 | /*! Voice Search Chromium Extension 2 | * 3 | * Copyright 2012 Eli Grey 4 | * See LICENSE.md 5 | */ 6 | 7 | /*jslint laxbreak: true, strict: true*/ 8 | /*global location, document, chrome*/ 9 | 10 | (function(document) { 11 | "use strict"; 12 | 13 | var init = function(website_integration) { 14 | if (website_integration === "none") { 15 | return; 16 | } 17 | var 18 | full_host = location.hostname 19 | , host = full_host.split(".").slice(-2).join(".") 20 | , $ = function(query) { 21 | return document.querySelectorAll(query); 22 | } 23 | , inject_CSS = function() { 24 | var 25 | style = document.createElement("style") 26 | , rules = arguments 27 | , i = 0 28 | , len = rules.length 29 | ; 30 | document.documentElement.appendChild(style); 31 | for (; i < len; i++) { 32 | style.sheet.insertRule(rules[i], style.sheet.cssRules.length); 33 | } 34 | } 35 | , submit = function(event) { 36 | var target = event.target; 37 | log_query(target.value, document.title, location.href, "", target.type); 38 | target.form.submit(); 39 | } 40 | , speech_change_event = ("onspeechchange" in document.createElement("input") ? "" : "webkit") 41 | + "speechchange" 42 | , add_speech_input = function(elts, auto_submit) { 43 | if (elts === null) { 44 | return; 45 | } 46 | var 47 | i = elts.length 48 | , elt 49 | ; 50 | while (i--) { 51 | elt = elts[i]; 52 | if (elt.grammar || elt.webkitGrammar) { 53 | // don't mess with inputs where grammars are specified 54 | // they probably have a custom speech input flow already 55 | continue; 56 | } 57 | if (auto_submit && !elt.speech && !elt.webkitSpeech) { 58 | // don't auto-submit if speech is already being used 59 | elt.addEventListener(speech_change_event, submit); 60 | } 61 | elt.speech = elt.webkitSpeech = true; 62 | } 63 | } 64 | , inputs 65 | // Google TLDs list from http://www.thomasbindl.com/blog/?title=list_of_googel_tlds 66 | , google_TLDs = "com de at pl fr nl it com.tr es ch be gr com.br lu fi pt hu hr bg com.mx si sk ro ca co.uk cl com.ar se cz dk co.th com.co lt co.id co.in co.il com.eg cn co.ve ru co.jp com.pe com.au co.ma co.za com.ph com.sa ie co.kr no com.ec com.vn lv com.mt com.uy ae ba co.nz com.ua co.cr ee com.do com.tw com.hk com.my com.sv com.pr lk com.gt com.bd com.pk is li com.bh com.ni com.py com.ng com.bo co.ke hn com.sg mu ci jo nu com.jm com.ly co.yu tt com.kh ge com.na com.et sm cd gm com.qa dj com.cu com.pa gp az as pl mn ht md am sn je com.bn com.ai co.zm ma rw co.ug com.vc com at com.gi to com.om kz co.uz" 67 | .replace(/\./g, "\\.").split(" ") 68 | , supported_google_subdomains = "www encrypted code video maps news books scholar blogsearch".split(" ") 69 | , google_hosts = new RegExp("(?:" + supported_google_subdomains.join("|") + ")+\\.google\\.(?:" + google_TLDs.join("|") + ")$") 70 | , sites = [ 71 | //{host: google_hosts, selectors: "input[name='q']"} 72 | {host: "duckduckgo.com", selectors: ["#hfih", "#hfi"]/*, margin: "2px 0 0 0"*/} 73 | , {host: "bing.com", selectors: "input[name='q']"} 74 | , {host: "yahoo.com", selectors: "input[name='p']"} 75 | , {host: "wikipedia.org", selectors: "input[name='search']"} 76 | , {host: "wolframalpha.com", selectors: "#i"} 77 | , {host: "github.com", selectors: "#search_form input[name='q']"} 78 | , {host: "reddit.com", selectors: "input[name='q']"/*, margin: "3px 0 0 0"*/} 79 | , {host: "twitter.com", selectors: "#search-query"/*, margin: "0 25px 0 0"*/} 80 | , {host: "facebook.com", selectors: "#q"} 81 | , {host: "youtube.com", selectors: "#masthead-search-term"} 82 | ] 83 | , i = sites.length 84 | , arr = function(maybe_array) { 85 | return [].concat(maybe_array); 86 | } 87 | , selectors 88 | , css 89 | ; 90 | // process non-HTML5 input type=search sites 91 | while (i--) { 92 | if ( 93 | (typeof sites[i].host === "string" && host === sites[i].host) 94 | || (sites[i].host instanceof RegExp && sites[i].host.test(full_host)) 95 | ) { 96 | selectors = arr(sites[i].selectors); 97 | inputs = $(selectors.join(",")); 98 | if (inputs !== null) { 99 | add_speech_input(inputs, true); 100 | css = selectors.join("::-webkit-input-speech-button,") + "::-webkit-input-speech-button{"; 101 | // + "float: right;"; 102 | if (sites[i].margin) { 103 | css += "margin:" + sites[i].margin + ";"; 104 | } 105 | css += "}"; 106 | inject_CSS(css); 107 | } 108 | break; 109 | } 110 | } 111 | // general speech input solution for any other site 112 | inputs = $("input[type='search']"); 113 | add_speech_input(inputs, true); 114 | if (website_integration === "all") { 115 | inputs = $("input:not([type='search']),textarea"); 116 | add_speech_input(inputs, false); 117 | } 118 | } 119 | 120 | , port = chrome.extension.connect({name: chrome.extension.getURL("")}) 121 | , init_listener = function(website_integration) { 122 | port.onMessage.removeListener(init_listener); 123 | init(website_integration); 124 | } 125 | , log_query = function(raw_query, name, url, query, input_method) { 126 | port.postMessage({ 127 | raw_query: raw_query 128 | , name: name 129 | , url: url 130 | , query: query 131 | , input_method: input_method 132 | }); 133 | } 134 | ; 135 | 136 | port.onMessage.addListener(init_listener); 137 | 138 | }(document)); -------------------------------------------------------------------------------- /src/chromium/js/default-options.js: -------------------------------------------------------------------------------- 1 | /*! Voice Search Chromium Extension 2 | * 3 | * Copyright 2012 Eli Grey 4 | * See LICENSE.md 5 | */ 6 | 7 | /*jslint laxbreak: true, strict: true*/ 8 | /*global localStorage, i18n*/ 9 | 10 | (function() { 11 | "use strict"; 12 | var opts = localStorage; 13 | if (!opts.search_engines) { 14 | opts.search_engines = JSON.stringify([ 15 | { 16 | "name": i18n("google_search_name") 17 | , "uri": i18n("google_search_uri_template") 18 | } 19 | , { 20 | "name": "Search for" 21 | , "uri": i18n("google_search_uri_template") 22 | , "in_popup": false 23 | } , { 24 | "name": i18n("duckduckgo_search_name") 25 | , "uri": i18n("duckduckgo_search_uri_template") 26 | } 27 | , { 28 | "name": i18n("wikipedia_search_name") 29 | , "uri": i18n("wikipedia_search_uri_template") 30 | } 31 | , { 32 | "name": i18n("google_images_search_name") 33 | , "uri": i18n("google_images_search_uri_template") 34 | } 35 | , { 36 | "name": "Images of" 37 | , "uri": i18n("google_images_search_uri_template") 38 | , "in_popup": false 39 | } , { 40 | "name": "Pictures of" 41 | , "uri": i18n("google_images_search_uri_template") 42 | , "in_popup": false 43 | } 44 | , { 45 | "name": i18n("google_maps_search_name") 46 | , "uri": i18n("google_maps_search_uri_template") 47 | } 48 | , { 49 | "name": "Where is" 50 | , "uri": i18n("google_maps_search_uri_template") 51 | , "in_popup": false 52 | } 53 | , { 54 | "name": i18n("google_videos_search_name") 55 | , "uri": i18n("google_videos_search_uri_template") 56 | } 57 | , { 58 | "name": "Videos of" 59 | , "uri": i18n("google_videos_search_uri_template") 60 | , "in_popup": false 61 | } 62 | , { 63 | "name": i18n("youtube_search_name") 64 | , "uri": i18n("youtube_search_uri_template") 65 | } 66 | , { 67 | "name": i18n("wolframalpha_search_name") 68 | , "uri": i18n("wolframalpha_search_uri_template") 69 | } 70 | , { 71 | "name": "Calculate" 72 | , "uri": i18n("wolframalpha_search_uri_template") 73 | , "in_popup": false 74 | } 75 | , { 76 | "name": i18n("bing_search_name") 77 | , "uri": i18n("bing_search_uri_template") 78 | } 79 | , { 80 | "name": i18n("yahoo_search_name") 81 | , "uri": i18n("yahoo_search_uri_template") 82 | } 83 | ]); 84 | } 85 | if (!opts.website_integration) { 86 | opts.website_integration = "all"; 87 | } 88 | if (!opts.debug) { 89 | opts.debug = "0"; 90 | } 91 | }()); -------------------------------------------------------------------------------- /src/chromium/js/options.js: -------------------------------------------------------------------------------- 1 | /*! Voice Search Chromium Extension 2 | * 3 | * Copyright 2012 Eli Grey 4 | * See LICENSE.md 5 | */ 6 | 7 | /*jslint laxbreak: true, strict: true*/ 8 | /*global 9 | i18n, localStorage, navigator, location, document, setTimeout, clearTimeout 10 | , Slick, TextCellEditor 11 | , jQuery 12 | */ 13 | 14 | 15 | (function(document) { 16 | "use strict"; 17 | var 18 | $ = jQuery 19 | , text = function(data) { 20 | return document.createTextNode(data); 21 | } 22 | , opts = localStorage 23 | , id = function(id) { 24 | return document.getElementById(id); 25 | } 26 | , save_btn = id("save") 27 | , restore_defaults_btn = id("restore-defaults") 28 | , website_integration_select = id("website-integration") 29 | , status = id("status") 30 | , website_integration_options = { 31 | "all": 0 32 | , "search": 1 33 | , "none": 2 34 | } 35 | , message 36 | , message_timeout 37 | , update_status = function(message_text) { 38 | if (message) { 39 | clearTimeout(message_timeout); 40 | status.removeChild(message); 41 | } 42 | message = status.appendChild(text(message_text)); 43 | message_timeout = setTimeout(function() { 44 | status.removeChild(message); 45 | message = null; 46 | }, 4000); 47 | } 48 | , search_engines = JSON.parse(opts.search_engines) 49 | , grid 50 | , origin_regex = /^[\w\-]+:\/*\[?[\w\.:\-]+\]?(?::\d+)?/ 51 | , URI_formatter = function(row, cell, value, columnDef, dataContext) { 52 | value = value || ""; 53 | var 54 | origin = value.match(origin_regex) 55 | , favicon = "chrome://favicon/" 56 | ; 57 | if (origin) { 58 | favicon += origin[0]; 59 | } 60 | return " " + value; 61 | } 62 | , save_opts = function() { 63 | opts.search_engines = JSON.stringify(grid.getData()); 64 | opts.website_integration = website_integration_select.value; 65 | update_status(i18n("opts_settings_saved")); 66 | } 67 | , restore_opts = function() { 68 | opts.clear(); 69 | location.reload(); 70 | } 71 | , columns = [ 72 | { 73 | id: "#" 74 | , name: "" 75 | , width: 40 76 | , behavior: "selectAndMove" 77 | , unselectable: true 78 | , resizable: false 79 | , cssClass: "reorder-cell dnd" 80 | } 81 | , { 82 | id: "name" 83 | , name: i18n("opts_name_column") 84 | , field: "name" 85 | , width: 200 86 | , cssClass: "cell-search-engine-name" 87 | , editor: TextCellEditor 88 | } 89 | , { 90 | id: "uri" 91 | , name: i18n("opts_uri_column") 92 | , width: 500 93 | , cssClass: "cell-search-engine-uri" 94 | , field: "uri" 95 | , formatter: URI_formatter 96 | , editor: TextCellEditor 97 | } 98 | ] 99 | , options = { 100 | editable: true 101 | , enableAddRow: true 102 | , enableRowReordering: true 103 | , enableCellNavigation: true 104 | , forceFitColumns: true 105 | , autoEdit: false 106 | } 107 | ; 108 | 109 | website_integration_select.selectedIndex = website_integration_options[opts.website_integration]; 110 | 111 | save_btn.addEventListener("click", save_opts); 112 | restore_defaults_btn.addEventListener("click", restore_opts); 113 | 114 | grid = new Slick.Grid(id("search-engines"), search_engines, columns, options); 115 | 116 | $("#search-engines") 117 | .bind("draginit", function(e, dd) { 118 | var cell = grid.getCellFromEvent(e); 119 | if (!cell) { 120 | return false; 121 | } 122 | dd.row = cell.row; 123 | if (!search_engines[dd.row]) { 124 | return false; 125 | } 126 | if (Slick.GlobalEditorLock.isActive() && !Slick.GlobalEditorLock.cancelCurrentEdit()) { 127 | return false; 128 | } 129 | }) 130 | .bind("dragstart", function(e, dd) { 131 | var selectedRows = grid.getSelectedRows(); 132 | 133 | if (!selectedRows.length || $.inArray(dd.row, selectedRows) === -1) { 134 | selectedRows = [dd.row]; 135 | grid.setSelectedRows(selectedRows); 136 | } 137 | 138 | dd.rows = selectedRows; 139 | dd.count = selectedRows.length; 140 | 141 | var proxy = $(document.createElement("span")) 142 | .css({ 143 | position: "absolute" 144 | , display: "inline-block" 145 | , padding: "4px 10px" 146 | , background: "#e0e0e0" 147 | , border: "1px solid gray" 148 | , "z-index": 99999 149 | , "border-radius": "8px" 150 | , "-webkit-box-shadow": "2px 2px 6px silver" 151 | , "box-shadow": "2px 2px 6px silver" 152 | }) 153 | .text(i18n("opts_delete_drag")) 154 | .appendTo(document.body); 155 | 156 | dd.helper = proxy; 157 | 158 | $(dd.available).css("background-color", "transparent"); 159 | 160 | return proxy; 161 | }) 162 | .bind("drag", function(e, dd) { 163 | dd.helper.css({top: e.pageY + 5, left: e.pageX + 5}); 164 | }) 165 | .bind("dragend", function(e, dd) { 166 | dd.helper.remove(); 167 | $(dd.available).css("background-color", "transparent"); 168 | }); 169 | 170 | 171 | $("#delete-search-engine") 172 | .bind("dropstart", function(e,dd) { 173 | $(this).css("background-color","red"); 174 | }) 175 | .bind("dropend", function(e,dd) { 176 | $(dd.available).css("background-color","transparent"); 177 | }) 178 | .bind("drop", function(e,dd) { 179 | var 180 | rowsToDelete = dd.rows.sort().reverse() 181 | , i = 0 182 | , len = rowsToDelete.length 183 | ; 184 | for (; i < len; i++) { 185 | search_engines.splice(rowsToDelete[i],1); 186 | } 187 | grid.invalidate(); 188 | grid.setSelectedRows([]); 189 | }); 190 | 191 | grid.onAddNewRow = function(newItem,columnDef) { 192 | var item = {name:"", uri: ""}; 193 | $.extend(item,newItem); 194 | search_engines.push(item); 195 | grid.removeRows([search_engines.length - 1]); 196 | grid.updateRowCount(); 197 | grid.render(); 198 | }; 199 | grid.onBeforeMoveRows = function(rows, insertBefore) { 200 | var 201 | i = 0 202 | , len = rows.length 203 | ; 204 | for (; i < len; i++) { 205 | // no point in moving before or after itself 206 | if (rows[i] === insertBefore || rows[i] === insertBefore - 1) { 207 | return false; 208 | } 209 | } 210 | return true; 211 | }; 212 | grid.onMoveRows = function(rows, insertBefore) { 213 | var 214 | extractedRows = [] 215 | , selectedRows = [] 216 | , left 217 | , right 218 | , i = 0 219 | , len = rows.length 220 | ; 221 | 222 | left = search_engines.slice(0, insertBefore); 223 | right = search_engines.slice(insertBefore, search_engines.length); 224 | 225 | for (; i < len; i++) { 226 | extractedRows.push(search_engines[rows[i]]); 227 | } 228 | 229 | rows.sort().reverse(); 230 | 231 | for (i = 0; i < len; i++) { 232 | var row = rows[i]; 233 | if (row < insertBefore) { 234 | left.splice(row, 1); 235 | } else { 236 | right.splice(row-insertBefore, 1); 237 | } 238 | } 239 | 240 | search_engines = left.concat(extractedRows.concat(right)); 241 | 242 | for (i = 0; i < len; i++) { 243 | selectedRows.push(left.length + i); 244 | } 245 | 246 | grid.setData(search_engines); 247 | grid.setSelectedRows(selectedRows); 248 | grid.render(); 249 | }; 250 | 251 | if (/^Win\d*$/.test(navigator.platform)) { 252 | var style = document.createElement("style"); 253 | document.documentElement.appendChild(style); 254 | style.sheet.insertRule( 255 | "h1,h2,h3,h4,h5,h6,legend{text-shadow:transparent 0 0 1px}" 256 | , style.sheet.cssRules.length 257 | ); 258 | } 259 | }(document)); 260 | -------------------------------------------------------------------------------- /src/chromium/js/popup.js: -------------------------------------------------------------------------------- 1 | /*! Voice Search Chromium Extension 2 | * 3 | * Copyright 2012 Eli Grey 4 | * See LICENSE.md 5 | */ 6 | 7 | /*jslint laxbreak: true, strict: true*/ 8 | /*global i18n, chrome, localStorage, location, document, Option*/ 9 | 10 | // manually set localStorage.debug to "1" in the console to enable debug mode 11 | const DEBUG = !!+localStorage.debug; 12 | 13 | if (DEBUG && location.pathname !== "/views/popup-debug.xhtml") { 14 | location.replace("/views/popup-debug.xhtml"); 15 | } 16 | 17 | (function(document) { 18 | "use strict"; 19 | var 20 | opts = localStorage 21 | , $ = function(id) { 22 | return document.getElementById(id); 23 | } 24 | , open_search_query = function(raw_query, name, template_uri, query) { 25 | chrome.tabs.create({ 26 | url: template_uri.replace(/%s/g, encodeURIComponent(query)) 27 | , selected: true 28 | }); 29 | close(); 30 | } 31 | , voice_search_input = $("voice-search") 32 | , search_engine_select = $("search-engines") 33 | , speech_change_event = ("onspeechchange" in document.createElement("input") ? "" : "webkit") 34 | + "speechchange" 35 | , search_engines = JSON.parse(opts.search_engines) 36 | , search_engine_regexs = [] 37 | , punctuation = /[,"'?!;:#$%&()*+\/<>=@\[\]\\\^_{}\|~.\-]+/g 38 | , whitespace = /\s+/g 39 | , mid_word_capitalization = /([a-z])([A-Z])/g 40 | , search_engine_regex 41 | , i = 0 42 | , len = search_engines.length 43 | , close_on_blur = true 44 | , on_view_blur = function() { 45 | if (close_on_blur) { 46 | close(); 47 | } 48 | } 49 | , on_mouse_down = function() { 50 | close_on_blur = false; 51 | } 52 | , on_speech_change = function(event) { 53 | var 54 | query = "results" in event ? 55 | event.results.item(0).utterance : event.target.value 56 | , selected = search_engine_select.selectedIndex 57 | ; 58 | if (!DEBUG) { 59 | // hide any text from showing behind the voice input button 60 | event.target.value = ""; 61 | } 62 | if (!selected) { 63 | // attempt to discern a dictation to use a specific search engine 64 | var 65 | specific_search_engine_query 66 | , i = search_engines.length 67 | // longest matching search engine detected 68 | // for cases like 'google: videos foobar' vs 'google videos: foobar' 69 | , best_match = {matched: false} 70 | ; 71 | while (i--) { 72 | specific_search_engine_query = query.match(search_engine_regexs[i]); 73 | if (specific_search_engine_query !== null) { 74 | if (!best_match.matched || 75 | best_match.name.length < search_engines[i].name.length 76 | ) { 77 | best_match.matched = true; 78 | best_match.name = search_engines[i].name; 79 | best_match.uri = search_engines[i].uri; 80 | best_match.query = specific_search_engine_query[2]; 81 | } 82 | } 83 | } 84 | if (!best_match.matched) { 85 | // use default search engine if no match 86 | best_match = search_engines[0]; 87 | best_match.query = query; 88 | } 89 | open_search_query(query, best_match.name, best_match.uri, best_match.query); 90 | } else { 91 | open_search_query( 92 | query 93 | , search_engine_select.children.item(selected).firstChild.data 94 | , search_engine_select.value 95 | , query 96 | ); 97 | } 98 | } 99 | ; 100 | for (; i < len; i++) { 101 | // make regexps for matching commands dictated for a certain search engine 102 | search_engine_regex = "^(" + 103 | search_engines[i].name 104 | // punctuation optional 105 | .replace(punctuation, "\\W*") 106 | // whitespace optional 107 | .replace(whitespace, "\\s*") 108 | // allow possible spaces from capitalization (e.g. YouTube ~ You Tube) 109 | .replace(mid_word_capitalization, "$1\\s*$2") + 110 | ")\\s+([\\s\\S]+)$" // query capture group 111 | ; 112 | search_engine_regexs.push(new RegExp(search_engine_regex, "i")); 113 | } 114 | search_engine_select.children.item(0).value = search_engines[0].uri; 115 | for (i = 0, len = search_engines.length; i < len; i++) { 116 | if (search_engines[i].in_popup !== false) { 117 | search_engine_select.appendChild(new Option( 118 | search_engines[i].name, search_engines[i].uri 119 | )); 120 | } 121 | } 122 | if (DEBUG) { 123 | var 124 | form = $("debug") 125 | , test_query_btn = $("test-query") 126 | , debug_engine_name = $("debug-engine-name").appendChild(document.createTextNode("")) 127 | , debug_query = $("debug-query").appendChild(document.createTextNode("")) 128 | , debug_URI = $("debug-uri").appendChild(document.createTextNode("")) 129 | ; 130 | open_search_query = function(raw_query, name, template_uri, query) { 131 | debug_engine_name.data = name; 132 | debug_query.data = query; 133 | debug_URI.data = template_uri.replace(/%s/g, encodeURIComponent(query)); 134 | }; 135 | form.addEventListener("submit", function(event) { 136 | event.preventDefault(); 137 | }); 138 | test_query_btn.addEventListener("DOMActivate", function() { 139 | on_speech_change({target: voice_search_input}); 140 | }); 141 | } else { 142 | voice_search_input.addEventListener("mousedown", on_mouse_down); 143 | voice_search_input.addEventListener(speech_change_event, on_speech_change); 144 | self.addEventListener("blur", on_view_blur); 145 | } 146 | }(document)); 147 | -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/MIT-LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010 Michael Leibman, http://github.com/mleibman/slickgrid 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/css/smoothness/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/css/smoothness/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/css/smoothness/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/css/smoothness/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/css/smoothness/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/css/smoothness/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/css/smoothness/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/css/smoothness/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/css/smoothness/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/css/smoothness/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/css/smoothness/jquery-ui-1.8.5.custom.css: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI CSS Framework @VERSION 3 | * 4 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Theming/API 9 | */ 10 | 11 | /* Layout helpers 12 | ----------------------------------*/ 13 | .ui-helper-hidden { display: none; } 14 | .ui-helper-hidden-accessible { position: absolute; left: -99999999px; } 15 | .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } 16 | .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } 17 | .ui-helper-clearfix { display: inline-block; } 18 | /* required comment for clearfix to work in Opera \*/ 19 | * html .ui-helper-clearfix { height:1%; } 20 | .ui-helper-clearfix { display:block; } 21 | /* end clearfix */ 22 | .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } 23 | 24 | 25 | /* Interaction Cues 26 | ----------------------------------*/ 27 | .ui-state-disabled { cursor: default !important; } 28 | 29 | 30 | /* Icons 31 | ----------------------------------*/ 32 | 33 | /* states and images */ 34 | .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } 35 | 36 | 37 | /* Misc visuals 38 | ----------------------------------*/ 39 | 40 | /* Overlays */ 41 | .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } 42 | 43 | 44 | /* 45 | * jQuery UI CSS Framework @VERSION 46 | * 47 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) 48 | * Dual licensed under the MIT or GPL Version 2 licenses. 49 | * http://jquery.org/license 50 | * 51 | * http://docs.jquery.com/UI/Theming/API 52 | * 53 | * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px 54 | */ 55 | 56 | 57 | /* Component containers 58 | ----------------------------------*/ 59 | .ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; } 60 | .ui-widget .ui-widget { font-size: 1em; } 61 | .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; } 62 | .ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; } 63 | .ui-widget-content a { color: #222222; } 64 | .ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; } 65 | .ui-widget-header a { color: #222222; } 66 | 67 | /* Interaction states 68 | ----------------------------------*/ 69 | .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; } 70 | .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; } 71 | .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; } 72 | .ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; } 73 | .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; } 74 | .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; } 75 | .ui-widget :active { outline: none; } 76 | 77 | /* Interaction Cues 78 | ----------------------------------*/ 79 | .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; } 80 | .ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } 81 | .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; } 82 | .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; } 83 | .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; } 84 | .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } 85 | .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } 86 | .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } 87 | 88 | /* Icons 89 | ----------------------------------*/ 90 | 91 | /* states and images */ 92 | .ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); } 93 | .ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } 94 | .ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } 95 | .ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png); } 96 | .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); } 97 | .ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); } 98 | .ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); } 99 | .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); } 100 | 101 | /* positioning */ 102 | .ui-icon-carat-1-n { background-position: 0 0; } 103 | .ui-icon-carat-1-ne { background-position: -16px 0; } 104 | .ui-icon-carat-1-e { background-position: -32px 0; } 105 | .ui-icon-carat-1-se { background-position: -48px 0; } 106 | .ui-icon-carat-1-s { background-position: -64px 0; } 107 | .ui-icon-carat-1-sw { background-position: -80px 0; } 108 | .ui-icon-carat-1-w { background-position: -96px 0; } 109 | .ui-icon-carat-1-nw { background-position: -112px 0; } 110 | .ui-icon-carat-2-n-s { background-position: -128px 0; } 111 | .ui-icon-carat-2-e-w { background-position: -144px 0; } 112 | .ui-icon-triangle-1-n { background-position: 0 -16px; } 113 | .ui-icon-triangle-1-ne { background-position: -16px -16px; } 114 | .ui-icon-triangle-1-e { background-position: -32px -16px; } 115 | .ui-icon-triangle-1-se { background-position: -48px -16px; } 116 | .ui-icon-triangle-1-s { background-position: -64px -16px; } 117 | .ui-icon-triangle-1-sw { background-position: -80px -16px; } 118 | .ui-icon-triangle-1-w { background-position: -96px -16px; } 119 | .ui-icon-triangle-1-nw { background-position: -112px -16px; } 120 | .ui-icon-triangle-2-n-s { background-position: -128px -16px; } 121 | .ui-icon-triangle-2-e-w { background-position: -144px -16px; } 122 | .ui-icon-arrow-1-n { background-position: 0 -32px; } 123 | .ui-icon-arrow-1-ne { background-position: -16px -32px; } 124 | .ui-icon-arrow-1-e { background-position: -32px -32px; } 125 | .ui-icon-arrow-1-se { background-position: -48px -32px; } 126 | .ui-icon-arrow-1-s { background-position: -64px -32px; } 127 | .ui-icon-arrow-1-sw { background-position: -80px -32px; } 128 | .ui-icon-arrow-1-w { background-position: -96px -32px; } 129 | .ui-icon-arrow-1-nw { background-position: -112px -32px; } 130 | .ui-icon-arrow-2-n-s { background-position: -128px -32px; } 131 | .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } 132 | .ui-icon-arrow-2-e-w { background-position: -160px -32px; } 133 | .ui-icon-arrow-2-se-nw { background-position: -176px -32px; } 134 | .ui-icon-arrowstop-1-n { background-position: -192px -32px; } 135 | .ui-icon-arrowstop-1-e { background-position: -208px -32px; } 136 | .ui-icon-arrowstop-1-s { background-position: -224px -32px; } 137 | .ui-icon-arrowstop-1-w { background-position: -240px -32px; } 138 | .ui-icon-arrowthick-1-n { background-position: 0 -48px; } 139 | .ui-icon-arrowthick-1-ne { background-position: -16px -48px; } 140 | .ui-icon-arrowthick-1-e { background-position: -32px -48px; } 141 | .ui-icon-arrowthick-1-se { background-position: -48px -48px; } 142 | .ui-icon-arrowthick-1-s { background-position: -64px -48px; } 143 | .ui-icon-arrowthick-1-sw { background-position: -80px -48px; } 144 | .ui-icon-arrowthick-1-w { background-position: -96px -48px; } 145 | .ui-icon-arrowthick-1-nw { background-position: -112px -48px; } 146 | .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } 147 | .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } 148 | .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } 149 | .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } 150 | .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } 151 | .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } 152 | .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } 153 | .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } 154 | .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } 155 | .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } 156 | .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } 157 | .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } 158 | .ui-icon-arrowreturn-1-w { background-position: -64px -64px; } 159 | .ui-icon-arrowreturn-1-n { background-position: -80px -64px; } 160 | .ui-icon-arrowreturn-1-e { background-position: -96px -64px; } 161 | .ui-icon-arrowreturn-1-s { background-position: -112px -64px; } 162 | .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } 163 | .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } 164 | .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } 165 | .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } 166 | .ui-icon-arrow-4 { background-position: 0 -80px; } 167 | .ui-icon-arrow-4-diag { background-position: -16px -80px; } 168 | .ui-icon-extlink { background-position: -32px -80px; } 169 | .ui-icon-newwin { background-position: -48px -80px; } 170 | .ui-icon-refresh { background-position: -64px -80px; } 171 | .ui-icon-shuffle { background-position: -80px -80px; } 172 | .ui-icon-transfer-e-w { background-position: -96px -80px; } 173 | .ui-icon-transferthick-e-w { background-position: -112px -80px; } 174 | .ui-icon-folder-collapsed { background-position: 0 -96px; } 175 | .ui-icon-folder-open { background-position: -16px -96px; } 176 | .ui-icon-document { background-position: -32px -96px; } 177 | .ui-icon-document-b { background-position: -48px -96px; } 178 | .ui-icon-note { background-position: -64px -96px; } 179 | .ui-icon-mail-closed { background-position: -80px -96px; } 180 | .ui-icon-mail-open { background-position: -96px -96px; } 181 | .ui-icon-suitcase { background-position: -112px -96px; } 182 | .ui-icon-comment { background-position: -128px -96px; } 183 | .ui-icon-person { background-position: -144px -96px; } 184 | .ui-icon-print { background-position: -160px -96px; } 185 | .ui-icon-trash { background-position: -176px -96px; } 186 | .ui-icon-locked { background-position: -192px -96px; } 187 | .ui-icon-unlocked { background-position: -208px -96px; } 188 | .ui-icon-bookmark { background-position: -224px -96px; } 189 | .ui-icon-tag { background-position: -240px -96px; } 190 | .ui-icon-home { background-position: 0 -112px; } 191 | .ui-icon-flag { background-position: -16px -112px; } 192 | .ui-icon-calendar { background-position: -32px -112px; } 193 | .ui-icon-cart { background-position: -48px -112px; } 194 | .ui-icon-pencil { background-position: -64px -112px; } 195 | .ui-icon-clock { background-position: -80px -112px; } 196 | .ui-icon-disk { background-position: -96px -112px; } 197 | .ui-icon-calculator { background-position: -112px -112px; } 198 | .ui-icon-zoomin { background-position: -128px -112px; } 199 | .ui-icon-zoomout { background-position: -144px -112px; } 200 | .ui-icon-search { background-position: -160px -112px; } 201 | .ui-icon-wrench { background-position: -176px -112px; } 202 | .ui-icon-gear { background-position: -192px -112px; } 203 | .ui-icon-heart { background-position: -208px -112px; } 204 | .ui-icon-star { background-position: -224px -112px; } 205 | .ui-icon-link { background-position: -240px -112px; } 206 | .ui-icon-cancel { background-position: 0 -128px; } 207 | .ui-icon-plus { background-position: -16px -128px; } 208 | .ui-icon-plusthick { background-position: -32px -128px; } 209 | .ui-icon-minus { background-position: -48px -128px; } 210 | .ui-icon-minusthick { background-position: -64px -128px; } 211 | .ui-icon-close { background-position: -80px -128px; } 212 | .ui-icon-closethick { background-position: -96px -128px; } 213 | .ui-icon-key { background-position: -112px -128px; } 214 | .ui-icon-lightbulb { background-position: -128px -128px; } 215 | .ui-icon-scissors { background-position: -144px -128px; } 216 | .ui-icon-clipboard { background-position: -160px -128px; } 217 | .ui-icon-copy { background-position: -176px -128px; } 218 | .ui-icon-contact { background-position: -192px -128px; } 219 | .ui-icon-image { background-position: -208px -128px; } 220 | .ui-icon-video { background-position: -224px -128px; } 221 | .ui-icon-script { background-position: -240px -128px; } 222 | .ui-icon-alert { background-position: 0 -144px; } 223 | .ui-icon-info { background-position: -16px -144px; } 224 | .ui-icon-notice { background-position: -32px -144px; } 225 | .ui-icon-help { background-position: -48px -144px; } 226 | .ui-icon-check { background-position: -64px -144px; } 227 | .ui-icon-bullet { background-position: -80px -144px; } 228 | .ui-icon-radio-off { background-position: -96px -144px; } 229 | .ui-icon-radio-on { background-position: -112px -144px; } 230 | .ui-icon-pin-w { background-position: -128px -144px; } 231 | .ui-icon-pin-s { background-position: -144px -144px; } 232 | .ui-icon-play { background-position: 0 -160px; } 233 | .ui-icon-pause { background-position: -16px -160px; } 234 | .ui-icon-seek-next { background-position: -32px -160px; } 235 | .ui-icon-seek-prev { background-position: -48px -160px; } 236 | .ui-icon-seek-end { background-position: -64px -160px; } 237 | .ui-icon-seek-start { background-position: -80px -160px; } 238 | /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ 239 | .ui-icon-seek-first { background-position: -80px -160px; } 240 | .ui-icon-stop { background-position: -96px -160px; } 241 | .ui-icon-eject { background-position: -112px -160px; } 242 | .ui-icon-volume-off { background-position: -128px -160px; } 243 | .ui-icon-volume-on { background-position: -144px -160px; } 244 | .ui-icon-power { background-position: 0 -176px; } 245 | .ui-icon-signal-diag { background-position: -16px -176px; } 246 | .ui-icon-signal { background-position: -32px -176px; } 247 | .ui-icon-battery-0 { background-position: -48px -176px; } 248 | .ui-icon-battery-1 { background-position: -64px -176px; } 249 | .ui-icon-battery-2 { background-position: -80px -176px; } 250 | .ui-icon-battery-3 { background-position: -96px -176px; } 251 | .ui-icon-circle-plus { background-position: 0 -192px; } 252 | .ui-icon-circle-minus { background-position: -16px -192px; } 253 | .ui-icon-circle-close { background-position: -32px -192px; } 254 | .ui-icon-circle-triangle-e { background-position: -48px -192px; } 255 | .ui-icon-circle-triangle-s { background-position: -64px -192px; } 256 | .ui-icon-circle-triangle-w { background-position: -80px -192px; } 257 | .ui-icon-circle-triangle-n { background-position: -96px -192px; } 258 | .ui-icon-circle-arrow-e { background-position: -112px -192px; } 259 | .ui-icon-circle-arrow-s { background-position: -128px -192px; } 260 | .ui-icon-circle-arrow-w { background-position: -144px -192px; } 261 | .ui-icon-circle-arrow-n { background-position: -160px -192px; } 262 | .ui-icon-circle-zoomin { background-position: -176px -192px; } 263 | .ui-icon-circle-zoomout { background-position: -192px -192px; } 264 | .ui-icon-circle-check { background-position: -208px -192px; } 265 | .ui-icon-circlesmall-plus { background-position: 0 -208px; } 266 | .ui-icon-circlesmall-minus { background-position: -16px -208px; } 267 | .ui-icon-circlesmall-close { background-position: -32px -208px; } 268 | .ui-icon-squaresmall-plus { background-position: -48px -208px; } 269 | .ui-icon-squaresmall-minus { background-position: -64px -208px; } 270 | .ui-icon-squaresmall-close { background-position: -80px -208px; } 271 | .ui-icon-grip-dotted-vertical { background-position: 0 -224px; } 272 | .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } 273 | .ui-icon-grip-solid-vertical { background-position: -32px -224px; } 274 | .ui-icon-grip-solid-horizontal { background-position: -48px -224px; } 275 | .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } 276 | .ui-icon-grip-diagonal-se { background-position: -80px -224px; } 277 | 278 | 279 | /* Misc visuals 280 | ----------------------------------*/ 281 | 282 | /* Corner radius */ 283 | .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; } 284 | .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; } 285 | .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } 286 | .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } 287 | .ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; } 288 | .ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } 289 | .ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } 290 | .ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } 291 | .ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } 292 | 293 | /* Overlays */ 294 | .ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); } 295 | .ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/* 296 | * jQuery UI Resizable @VERSION 297 | * 298 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) 299 | * Dual licensed under the MIT or GPL Version 2 licenses. 300 | * http://jquery.org/license 301 | * 302 | * http://docs.jquery.com/UI/Resizable#theming 303 | */ 304 | .ui-resizable { position: relative;} 305 | .ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;} 306 | .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } 307 | .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } 308 | .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } 309 | .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } 310 | .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } 311 | .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } 312 | .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } 313 | .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } 314 | .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* 315 | * jQuery UI Selectable @VERSION 316 | * 317 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) 318 | * Dual licensed under the MIT or GPL Version 2 licenses. 319 | * http://jquery.org/license 320 | * 321 | * http://docs.jquery.com/UI/Selectable#theming 322 | */ 323 | .ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } 324 | /* 325 | * jQuery UI Accordion @VERSION 326 | * 327 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) 328 | * Dual licensed under the MIT or GPL Version 2 licenses. 329 | * http://jquery.org/license 330 | * 331 | * http://docs.jquery.com/UI/Accordion#theming 332 | */ 333 | /* IE/Win - Fix animation bug - #4615 */ 334 | .ui-accordion { width: 100%; } 335 | .ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } 336 | .ui-accordion .ui-accordion-li-fix { display: inline; } 337 | .ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } 338 | .ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } 339 | .ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } 340 | .ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } 341 | .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } 342 | .ui-accordion .ui-accordion-content-active { display: block; }/* 343 | * jQuery UI Autocomplete @VERSION 344 | * 345 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) 346 | * Dual licensed under the MIT or GPL Version 2 licenses. 347 | * http://jquery.org/license 348 | * 349 | * http://docs.jquery.com/UI/Autocomplete#theming 350 | */ 351 | .ui-autocomplete { position: absolute; cursor: default; } 352 | 353 | /* workarounds */ 354 | * html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ 355 | 356 | /* 357 | * jQuery UI Menu @VERSION 358 | * 359 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) 360 | * Dual licensed under the MIT or GPL Version 2 licenses. 361 | * http://jquery.org/license 362 | * 363 | * http://docs.jquery.com/UI/Menu#theming 364 | */ 365 | .ui-menu { 366 | list-style:none; 367 | padding: 2px; 368 | margin: 0; 369 | display:block; 370 | float: left; 371 | } 372 | .ui-menu .ui-menu { 373 | margin-top: -3px; 374 | } 375 | .ui-menu .ui-menu-item { 376 | margin:0; 377 | padding: 0; 378 | zoom: 1; 379 | float: left; 380 | clear: left; 381 | width: 100%; 382 | } 383 | .ui-menu .ui-menu-item a { 384 | text-decoration:none; 385 | display:block; 386 | padding:.2em .4em; 387 | line-height:1.5; 388 | zoom:1; 389 | } 390 | .ui-menu .ui-menu-item a.ui-state-hover, 391 | .ui-menu .ui-menu-item a.ui-state-active { 392 | font-weight: normal; 393 | margin: -1px; 394 | } 395 | /* 396 | * jQuery UI Button @VERSION 397 | * 398 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) 399 | * Dual licensed under the MIT or GPL Version 2 licenses. 400 | * http://jquery.org/license 401 | * 402 | * http://docs.jquery.com/UI/Button#theming 403 | */ 404 | .ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ 405 | .ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ 406 | button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ 407 | .ui-button-icons-only { width: 3.4em; } 408 | button.ui-button-icons-only { width: 3.7em; } 409 | 410 | /*button text element */ 411 | .ui-button .ui-button-text { display: block; line-height: 1.4; } 412 | .ui-button-text-only .ui-button-text { padding: .4em 1em; } 413 | .ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } 414 | .ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } 415 | .ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } 416 | .ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } 417 | /* no icon support for input elements, provide padding by default */ 418 | input.ui-button { padding: .4em 1em; } 419 | 420 | /*button icon element(s) */ 421 | .ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } 422 | .ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } 423 | .ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } 424 | .ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } 425 | .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } 426 | 427 | /*button sets*/ 428 | .ui-buttonset { margin-right: 7px; } 429 | .ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } 430 | 431 | /* workarounds */ 432 | button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ 433 | /* 434 | * jQuery UI Dialog @VERSION 435 | * 436 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) 437 | * Dual licensed under the MIT or GPL Version 2 licenses. 438 | * http://jquery.org/license 439 | * 440 | * http://docs.jquery.com/UI/Dialog#theming 441 | */ 442 | .ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } 443 | .ui-dialog .ui-dialog-titlebar { padding: .5em 1em .3em; position: relative; } 444 | .ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .2em 0; } 445 | .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } 446 | .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } 447 | .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } 448 | .ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } 449 | .ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } 450 | .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } 451 | .ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } 452 | .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } 453 | .ui-draggable .ui-dialog-titlebar { cursor: move; } 454 | /* 455 | * jQuery UI Slider @VERSION 456 | * 457 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) 458 | * Dual licensed under the MIT or GPL Version 2 licenses. 459 | * http://jquery.org/license 460 | * 461 | * http://docs.jquery.com/UI/Slider#theming 462 | */ 463 | .ui-slider { position: relative; text-align: left; } 464 | .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } 465 | .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } 466 | 467 | .ui-slider-horizontal { height: .8em; } 468 | .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } 469 | .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } 470 | .ui-slider-horizontal .ui-slider-range-min { left: 0; } 471 | .ui-slider-horizontal .ui-slider-range-max { right: 0; } 472 | 473 | .ui-slider-vertical { width: .8em; height: 100px; } 474 | .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } 475 | .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } 476 | .ui-slider-vertical .ui-slider-range-min { bottom: 0; } 477 | .ui-slider-vertical .ui-slider-range-max { top: 0; }/* 478 | * jQuery UI Tabs @VERSION 479 | * 480 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) 481 | * Dual licensed under the MIT or GPL Version 2 licenses. 482 | * http://jquery.org/license 483 | * 484 | * http://docs.jquery.com/UI/Tabs#theming 485 | */ 486 | .ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ 487 | .ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } 488 | .ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } 489 | .ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } 490 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } 491 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } 492 | .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ 493 | .ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } 494 | .ui-tabs .ui-tabs-hide { display: none !important; } 495 | /* 496 | * jQuery UI Datepicker @VERSION 497 | * 498 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) 499 | * Dual licensed under the MIT or GPL Version 2 licenses. 500 | * http://jquery.org/license 501 | * 502 | * http://docs.jquery.com/UI/Datepicker#theming 503 | */ 504 | .ui-datepicker { width: 17em; padding: .2em .2em 0; } 505 | .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } 506 | .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } 507 | .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } 508 | .ui-datepicker .ui-datepicker-prev { left:2px; } 509 | .ui-datepicker .ui-datepicker-next { right:2px; } 510 | .ui-datepicker .ui-datepicker-prev-hover { left:1px; } 511 | .ui-datepicker .ui-datepicker-next-hover { right:1px; } 512 | .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } 513 | .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } 514 | .ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } 515 | .ui-datepicker select.ui-datepicker-month-year {width: 100%;} 516 | .ui-datepicker select.ui-datepicker-month, 517 | .ui-datepicker select.ui-datepicker-year { width: 49%;} 518 | .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } 519 | .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } 520 | .ui-datepicker td { border: 0; padding: 1px; } 521 | .ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } 522 | .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } 523 | .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } 524 | .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } 525 | 526 | /* with multiple calendars */ 527 | .ui-datepicker.ui-datepicker-multi { width:auto; } 528 | .ui-datepicker-multi .ui-datepicker-group { float:left; } 529 | .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } 530 | .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } 531 | .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } 532 | .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } 533 | .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } 534 | .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } 535 | .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } 536 | .ui-datepicker-row-break { clear:both; width:100%; } 537 | 538 | /* RTL support */ 539 | .ui-datepicker-rtl { direction: rtl; } 540 | .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } 541 | .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } 542 | .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } 543 | .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } 544 | .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } 545 | .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } 546 | .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } 547 | .ui-datepicker-rtl .ui-datepicker-group { float:right; } 548 | .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } 549 | .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } 550 | 551 | /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ 552 | .ui-datepicker-cover { 553 | display: none; /*sorry for IE5*/ 554 | display/**/: block; /*sorry for IE5*/ 555 | position: absolute; /*must have*/ 556 | z-index: -1; /*must have*/ 557 | filter: mask(); /*must have*/ 558 | top: -4px; /*must have*/ 559 | left: -4px; /*must have*/ 560 | width: 200px; /*must have*/ 561 | height: 200px; /*must have*/ 562 | }/* 563 | * jQuery UI Progressbar @VERSION 564 | * 565 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) 566 | * Dual licensed under the MIT or GPL Version 2 licenses. 567 | * http://jquery.org/license 568 | * 569 | * http://docs.jquery.com/UI/Progressbar#theming 570 | */ 571 | .ui-progressbar { height:2em; text-align: left; } 572 | .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/examples/slick-default-theme.css: -------------------------------------------------------------------------------- 1 | /* 2 | IMPORTANT: 3 | In order to preserve the uniform grid appearance, all cell styles need to have padding, margin and border sizes. 4 | No built-in (selected, editable, highlight, flashing, invalid, loading, :focus) or user-specified CSS 5 | classes should alter those! 6 | */ 7 | 8 | .slick-header-columns { 9 | background: url('../images/header-columns-bg.gif') repeat-x center bottom; 10 | border-bottom: 1px solid silver; 11 | } 12 | 13 | .slick-header-column { 14 | background: url('../images/header-columns-bg.gif') repeat-x center bottom; 15 | border-right: 1px solid silver; 16 | } 17 | 18 | .slick-header-column:hover, .slick-header-column-active { 19 | background: white url('../images/header-columns-over-bg.gif') repeat-x center bottom; 20 | } 21 | 22 | .slick-row.ui-state-active { 23 | background: #F5F7D7; 24 | } 25 | 26 | .slick-row { 27 | position: absolute; 28 | background: white; 29 | border: 0px; 30 | line-height: 20px; 31 | } 32 | 33 | .slick-row.selected { 34 | z-index: 10; 35 | background: #DFE8F6; 36 | } 37 | 38 | .slick-cell { 39 | padding-left: 4px; 40 | padding-right: 4px; 41 | } 42 | 43 | .slick-cell.selected { 44 | border-color: gray; 45 | border-style: solid; 46 | } 47 | 48 | 49 | .slick-sortable-placeholder { 50 | background: silver!important; 51 | } 52 | 53 | .slick-row[row$="1"], .slick-row[row$="3"], .slick-row[row$="5"], .slick-row[row$="7"], .slick-row[row$="9"] { 54 | background: #fafafa; 55 | } 56 | 57 | .slick-row.ui-state-active { 58 | background: #F5F7D7; 59 | } 60 | 61 | .slick-row.loading { 62 | opacity: 0.5; 63 | filter: alpha(opacity=50); 64 | } 65 | 66 | .slick-cell.invalid { 67 | border-color: red; 68 | } -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/images/actions.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/images/actions.gif -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/images/ajax-loader-small.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/images/ajax-loader-small.gif -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/images/arrow_redo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/images/arrow_redo.png -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/images/arrow_right_peppermint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/images/arrow_right_peppermint.png -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/images/arrow_right_spearmint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/images/arrow_right_spearmint.png -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/images/arrow_undo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/images/arrow_undo.png -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/images/bullet_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/images/bullet_blue.png -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/images/bullet_star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/images/bullet_star.png -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/images/bullet_toggle_minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/images/bullet_toggle_minus.png -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/images/bullet_toggle_plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/images/bullet_toggle_plus.png -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/images/calendar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/images/calendar.gif -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/images/collapse.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/images/collapse.gif -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/images/comment_yellow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/images/comment_yellow.gif -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/images/down.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/images/down.gif -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/images/drag-handle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/images/drag-handle.png -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/images/editor-helper-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/images/editor-helper-bg.gif -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/images/expand.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/images/expand.gif -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/images/header-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/images/header-bg.gif -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/images/header-columns-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/images/header-columns-bg.gif -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/images/header-columns-over-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/images/header-columns-over-bg.gif -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/images/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/images/help.png -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/images/info.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/images/info.gif -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/images/listview.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/images/listview.gif -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/images/pencil.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/images/pencil.gif -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/images/row-over-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/images/row-over-bg.gif -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/images/sort-asc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/images/sort-asc.gif -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/images/sort-asc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/images/sort-asc.png -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/images/sort-desc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/images/sort-desc.gif -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/images/sort-desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/images/sort-desc.png -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/images/stripes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/images/stripes.png -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/images/tag_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/images/tag_red.png -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/images/tick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/images/tick.png -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/images/user_identity.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/images/user_identity.gif -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/images/user_identity_plus.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eligrey/voice-search/ebac7e5106f2683194c0aa279cb5854c7ad07ded/src/chromium/lib/SlickGrid/images/user_identity_plus.gif -------------------------------------------------------------------------------- /src/chromium/lib/SlickGrid/lib/jquery.event.drag-2.0.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jquery.event.drag - v 2.0.0 3 | * Copyright (c) 2010 Three Dub Media - http://threedubmedia.com 4 | * Open Source MIT License - http://threedubmedia.com/code/license 5 | */ 6 | ;(function(f){f.fn.drag=function(b,a,d){var e=typeof b=="string"?b:"",k=f.isFunction(b)?b:f.isFunction(a)?a:null;if(e.indexOf("drag")!==0)e="drag"+e;d=(b==k?a:d)||{};return k?this.bind(e,d,k):this.trigger(e)};var i=f.event,h=i.special,c=h.drag={defaults:{which:1,distance:0,not:":input",handle:null,relative:false,drop:true,click:false},datakey:"dragdata",livekey:"livedrag",add:function(b){var a=f.data(this,c.datakey),d=b.data||{};a.related+=1;if(!a.live&&b.selector){a.live=true;i.add(this,"draginit."+ c.livekey,c.delegate)}f.each(c.defaults,function(e){if(d[e]!==undefined)a[e]=d[e]})},remove:function(){f.data(this,c.datakey).related-=1},setup:function(){if(!f.data(this,c.datakey)){var b=f.extend({related:0},c.defaults);f.data(this,c.datakey,b);i.add(this,"mousedown",c.init,b);this.attachEvent&&this.attachEvent("ondragstart",c.dontstart)}},teardown:function(){if(!f.data(this,c.datakey).related){f.removeData(this,c.datakey);i.remove(this,"mousedown",c.init);i.remove(this,"draginit",c.delegate);c.textselect(true); this.detachEvent&&this.detachEvent("ondragstart",c.dontstart)}},init:function(b){var a=b.data,d;if(!(a.which>0&&b.which!=a.which))if(!f(b.target).is(a.not))if(!(a.handle&&!f(b.target).closest(a.handle,b.currentTarget).length)){a.propagates=1;a.interactions=[c.interaction(this,a)];a.target=b.target;a.pageX=b.pageX;a.pageY=b.pageY;a.dragging=null;d=c.hijack(b,"draginit",a);if(a.propagates){if((d=c.flatten(d))&&d.length){a.interactions=[];f.each(d,function(){a.interactions.push(c.interaction(this,a))})}a.propagates= a.interactions.length;a.drop!==false&&h.drop&&h.drop.handler(b,a);c.textselect(false);i.add(document,"mousemove mouseup",c.handler,a);return false}}},interaction:function(b,a){return{drag:b,callback:new c.callback,droppable:[],offset:f(b)[a.relative?"position":"offset"]()||{top:0,left:0}}},handler:function(b){var a=b.data;switch(b.type){case !a.dragging&&"mousemove":if(Math.pow(b.pageX-a.pageX,2)+Math.pow(b.pageY-a.pageY,2)=c.left&&(a[0]||a.right)<=c.right&&(a[1]||a.top)>=c.top&&(a[1]||a.bottom)<=c.bottom},modes:{intersect:function(c,a,d){return this.contains(d,[c.pageX,c.pageY])?1E9:this.modes.overlap.apply(this,arguments)},overlap:function(c, a,d){return Math.max(0,Math.min(d.bottom,a.bottom)-Math.max(d.top,a.top))*Math.max(0,Math.min(d.right,a.right)-Math.max(d.left,a.left))},fit:function(c,a,d){return this.contains(d,a)?1:0},middle:function(c,a,d){return this.contains(d,[a.left+a.width*0.5,a.top+a.height*0.5])?1:0}},sort:function(c,a){return a.winner-c.winner||c.index-a.index},tolerate:function(c){var a,d,g,e,h,m,j=0,k,p=c.interactions.length,n=[b.event.pageX,b.event.pageY],o=b.tolerance||b.modes[b.mode];do if(k=c.interactions[j]){if(!k)return; k.drop=[];h=[];m=k.droppable.length;if(o)g=b.locate(k.proxy);a=0;do if(d=k.droppable[a]){e=f.data(d,b.datakey);if(d=e.location){e.winner=o?o.call(b,b.event,g,d):b.contains(d,n)?1:0;h.push(e)}}while(++a" + value + "%"; 16 | else 17 | return "" + value + "%"; 18 | }, 19 | 20 | GraphicalPercentCompleteCellFormatter : function(row, cell, value, columnDef, dataContext) { 21 | if (value == null || value === "") 22 | return ""; 23 | 24 | var color; 25 | 26 | if (value < 30) 27 | color = "red"; 28 | else if (value < 70) 29 | color = "silver"; 30 | else 31 | color = "green"; 32 | 33 | return ""; 34 | }, 35 | 36 | YesNoCellFormatter : function(row, cell, value, columnDef, dataContext) { 37 | return value ? "Yes" : "No"; 38 | }, 39 | 40 | BoolCellFormatter : function(row, cell, value, columnDef, dataContext) { 41 | return value ? "" : ""; 42 | }, 43 | 44 | TaskNameFormatter : function(row, cell, value, columnDef, dataContext) { 45 | // todo: html encode 46 | var spacer = ""; 47 | return spacer + "  " + value; 48 | }, 49 | 50 | ResourcesFormatter : function(row, cell, value, columnDef, dataContext) { 51 | var resources = dataContext["resources"]; 52 | 53 | if (!resources || resources.length == 0) 54 | return ""; 55 | 56 | if (columnDef.width < 50) 57 | return (resources.length > 1 ? "
"; 59 | else 60 | return resources.join(", "); 61 | }, 62 | 63 | StarFormatter : function(row, cell, value, columnDef, dataContext) { 64 | return (value) ? "" : ""; 65 | }, 66 | 67 | 68 | TextCellEditor : function(args) { 69 | var $input; 70 | var defaultValue; 71 | var scope = this; 72 | 73 | this.init = function() { 74 | $input = $("") 75 | .appendTo(args.container) 76 | .bind("keydown.nav", function(e) { 77 | if (e.keyCode === $.ui.keyCode.LEFT || e.keyCode === $.ui.keyCode.RIGHT) { 78 | e.stopImmediatePropagation(); 79 | } 80 | }) 81 | .focus() 82 | .select(); 83 | }; 84 | 85 | this.destroy = function() { 86 | $input.remove(); 87 | }; 88 | 89 | this.focus = function() { 90 | $input.focus(); 91 | }; 92 | 93 | this.loadValue = function(item) { 94 | defaultValue = item[args.column.field] || ""; 95 | $input.val(defaultValue); 96 | $input[0].defaultValue = defaultValue; 97 | $input.select(); 98 | }; 99 | 100 | this.serializeValue = function() { 101 | return $input.val(); 102 | }; 103 | 104 | this.applyValue = function(item,state) { 105 | item[args.column.field] = state; 106 | }; 107 | 108 | this.isValueChanged = function() { 109 | return (!($input.val() == "" && defaultValue == null)) && ($input.val() != defaultValue); 110 | }; 111 | 112 | this.validate = function() { 113 | if (args.column.validator) { 114 | var validationResults = args.column.validator($input.val()); 115 | if (!validationResults.valid) 116 | return validationResults; 117 | } 118 | 119 | return { 120 | valid: true, 121 | msg: null 122 | }; 123 | }; 124 | 125 | this.init(); 126 | }, 127 | 128 | IntegerCellEditor : function(args) { 129 | var $input; 130 | var defaultValue; 131 | var scope = this; 132 | 133 | this.init = function() { 134 | $input = $(""); 135 | 136 | $input.bind("keydown.nav", function(e) { 137 | if (e.keyCode === $.ui.keyCode.LEFT || e.keyCode === $.ui.keyCode.RIGHT) { 138 | e.stopImmediatePropagation(); 139 | } 140 | }); 141 | 142 | $input.appendTo(args.container); 143 | $input.focus().select(); 144 | }; 145 | 146 | this.destroy = function() { 147 | $input.remove(); 148 | }; 149 | 150 | this.focus = function() { 151 | $input.focus(); 152 | }; 153 | 154 | this.loadValue = function(item) { 155 | defaultValue = item[args.column.field]; 156 | $input.val(defaultValue); 157 | $input[0].defaultValue = defaultValue; 158 | $input.select(); 159 | }; 160 | 161 | this.serializeValue = function() { 162 | return parseInt($input.val(),10) || 0; 163 | }; 164 | 165 | this.applyValue = function(item,state) { 166 | item[args.column.field] = state; 167 | }; 168 | 169 | this.isValueChanged = function() { 170 | return (!($input.val() == "" && defaultValue == null)) && ($input.val() != defaultValue); 171 | }; 172 | 173 | this.validate = function() { 174 | if (isNaN($input.val())) 175 | return { 176 | valid: false, 177 | msg: "Please enter a valid integer" 178 | }; 179 | 180 | return { 181 | valid: true, 182 | msg: null 183 | }; 184 | }; 185 | 186 | this.init(); 187 | }, 188 | 189 | DateCellEditor : function(args) { 190 | var $input; 191 | var defaultValue; 192 | var scope = this; 193 | var calendarOpen = false; 194 | 195 | this.init = function() { 196 | $input = $(""); 197 | $input.appendTo(args.container); 198 | $input.focus().select(); 199 | $input.datepicker({ 200 | showOn: "button", 201 | buttonImageOnly: true, 202 | buttonImage: "../images/calendar.gif", 203 | beforeShow: function() { calendarOpen = true }, 204 | onClose: function() { calendarOpen = false } 205 | }); 206 | $input.width($input.width() - 18); 207 | }; 208 | 209 | this.destroy = function() { 210 | $.datepicker.dpDiv.stop(true,true); 211 | $input.datepicker("hide"); 212 | $input.datepicker("destroy"); 213 | $input.remove(); 214 | }; 215 | 216 | this.show = function() { 217 | if (calendarOpen) { 218 | $.datepicker.dpDiv.stop(true,true).show(); 219 | } 220 | }; 221 | 222 | this.hide = function() { 223 | if (calendarOpen) { 224 | $.datepicker.dpDiv.stop(true,true).hide(); 225 | } 226 | }; 227 | 228 | this.position = function(position) { 229 | if (!calendarOpen) return; 230 | $.datepicker.dpDiv 231 | .css("top", position.top + 30) 232 | .css("left", position.left); 233 | }; 234 | 235 | this.focus = function() { 236 | $input.focus(); 237 | }; 238 | 239 | this.loadValue = function(item) { 240 | defaultValue = item[args.column.field]; 241 | $input.val(defaultValue); 242 | $input[0].defaultValue = defaultValue; 243 | $input.select(); 244 | }; 245 | 246 | this.serializeValue = function() { 247 | return $input.val(); 248 | }; 249 | 250 | this.applyValue = function(item,state) { 251 | item[args.column.field] = state; 252 | }; 253 | 254 | this.isValueChanged = function() { 255 | return (!($input.val() == "" && defaultValue == null)) && ($input.val() != defaultValue); 256 | }; 257 | 258 | this.validate = function() { 259 | return { 260 | valid: true, 261 | msg: null 262 | }; 263 | }; 264 | 265 | this.init(); 266 | }, 267 | 268 | YesNoSelectCellEditor : function(args) { 269 | var $select; 270 | var defaultValue; 271 | var scope = this; 272 | 273 | this.init = function() { 274 | $select = $(""); 275 | $select.appendTo(args.container); 276 | $select.focus(); 277 | }; 278 | 279 | this.destroy = function() { 280 | $select.remove(); 281 | }; 282 | 283 | this.focus = function() { 284 | $select.focus(); 285 | }; 286 | 287 | this.loadValue = function(item) { 288 | $select.val((defaultValue = item[args.column.field]) ? "yes" : "no"); 289 | $select.select(); 290 | }; 291 | 292 | this.serializeValue = function() { 293 | return ($select.val() == "yes"); 294 | }; 295 | 296 | this.applyValue = function(item,state) { 297 | item[args.column.field] = state; 298 | }; 299 | 300 | this.isValueChanged = function() { 301 | return ($select.val() != defaultValue); 302 | }; 303 | 304 | this.validate = function() { 305 | return { 306 | valid: true, 307 | msg: null 308 | }; 309 | }; 310 | 311 | this.init(); 312 | }, 313 | 314 | YesNoCheckboxCellEditor : function(args) { 315 | var $select; 316 | var defaultValue; 317 | var scope = this; 318 | 319 | this.init = function() { 320 | $select = $(""); 321 | $select.appendTo(args.container); 322 | $select.focus(); 323 | }; 324 | 325 | this.destroy = function() { 326 | $select.remove(); 327 | }; 328 | 329 | this.focus = function() { 330 | $select.focus(); 331 | }; 332 | 333 | this.loadValue = function(item) { 334 | defaultValue = item[args.column.field]; 335 | if (defaultValue) 336 | $select.attr("checked", "checked"); 337 | else 338 | $select.removeAttr("checked"); 339 | }; 340 | 341 | this.serializeValue = function() { 342 | return $select.attr("checked"); 343 | }; 344 | 345 | this.applyValue = function(item,state) { 346 | item[args.column.field] = state; 347 | }; 348 | 349 | this.isValueChanged = function() { 350 | return ($select.attr("checked") != defaultValue); 351 | }; 352 | 353 | this.validate = function() { 354 | return { 355 | valid: true, 356 | msg: null 357 | }; 358 | }; 359 | 360 | this.init(); 361 | }, 362 | 363 | PercentCompleteCellEditor : function(args) { 364 | var $input, $picker; 365 | var defaultValue; 366 | var scope = this; 367 | 368 | this.init = function() { 369 | $input = $(""); 370 | $input.width($(args.container).innerWidth() - 25); 371 | $input.appendTo(args.container); 372 | 373 | $picker = $("
").appendTo(args.container); 374 | $picker.append("
"); 375 | 376 | $picker.find(".editor-percentcomplete-buttons").append("

"); 377 | 378 | $input.focus().select(); 379 | 380 | $picker.find(".editor-percentcomplete-slider").slider({ 381 | orientation: "vertical", 382 | range: "min", 383 | value: defaultValue, 384 | slide: function(event, ui) { 385 | $input.val(ui.value) 386 | } 387 | }); 388 | 389 | $picker.find(".editor-percentcomplete-buttons button").bind("click", function(e) { 390 | $input.val($(this).attr("val")); 391 | $picker.find(".editor-percentcomplete-slider").slider("value", $(this).attr("val")); 392 | }) 393 | }; 394 | 395 | this.destroy = function() { 396 | $input.remove(); 397 | $picker.remove(); 398 | }; 399 | 400 | this.focus = function() { 401 | $input.focus(); 402 | }; 403 | 404 | this.loadValue = function(item) { 405 | $input.val(defaultValue = item[args.column.field]); 406 | $input.select(); 407 | }; 408 | 409 | this.serializeValue = function() { 410 | return parseInt($input.val(),10) || 0; 411 | }; 412 | 413 | this.applyValue = function(item,state) { 414 | item[args.column.field] = state; 415 | }; 416 | 417 | this.isValueChanged = function() { 418 | return (!($input.val() == "" && defaultValue == null)) && ((parseInt($input.val(),10) || 0) != defaultValue); 419 | }; 420 | 421 | this.validate = function() { 422 | if (isNaN(parseInt($input.val(),10))) 423 | return { 424 | valid: false, 425 | msg: "Please enter a valid positive number" 426 | }; 427 | 428 | return { 429 | valid: true, 430 | msg: null 431 | }; 432 | }; 433 | 434 | this.init(); 435 | }, 436 | 437 | StarCellEditor : function(args) { 438 | var $input; 439 | var defaultValue; 440 | var scope = this; 441 | 442 | function toggle(e) { 443 | if (e.type == "keydown" && e.which != 32) return; 444 | 445 | if ($input.css("opacity") == "1") 446 | $input.css("opacity", 0.5); 447 | else 448 | $input.css("opacity", 1); 449 | 450 | e.preventDefault(); 451 | e.stopPropagation(); 452 | return false; 453 | } 454 | 455 | this.init = function() { 456 | $input = $("") 457 | .bind("click keydown", toggle) 458 | .appendTo(args.container) 459 | .focus(); 460 | }; 461 | 462 | this.destroy = function() { 463 | $input.unbind("click keydown", toggle); 464 | $input.remove(); 465 | }; 466 | 467 | this.focus = function() { 468 | $input.focus(); 469 | }; 470 | 471 | this.loadValue = function(item) { 472 | defaultValue = item[args.column.field]; 473 | $input.css("opacity", defaultValue ? 1 : 0.2); 474 | }; 475 | 476 | this.serializeValue = function() { 477 | return ($input.css("opacity") == "1"); 478 | }; 479 | 480 | this.applyValue = function(item,state) { 481 | item[args.column.field] = state; 482 | }; 483 | 484 | this.isValueChanged = function() { 485 | return defaultValue != ($input.css("opacity") == "1"); 486 | }; 487 | 488 | this.validate = function() { 489 | return { 490 | valid: true, 491 | msg: null 492 | }; 493 | }; 494 | 495 | this.init(); 496 | }, 497 | 498 | /* 499 | * An example of a "detached" editor. 500 | * The UI is added onto document BODY and .position(), .show() and .hide() are implemented. 501 | * KeyDown events are also handled to provide handling for Tab, Shift-Tab, Esc and Ctrl-Enter. 502 | */ 503 | LongTextCellEditor : function (args) { 504 | var $input, $wrapper; 505 | var defaultValue; 506 | var scope = this; 507 | 508 | this.init = function() { 509 | var $container = $("body"); 510 | 511 | $wrapper = $("
") 512 | .appendTo($container); 513 | 514 | $input = $("