├── site ├── robots.txt ├── _00.txt ├── redcap_v10.4.1 │ └── Resources │ │ ├── images │ │ ├── box_bg.jpg │ │ ├── favicon.ico │ │ ├── upArrow.png │ │ ├── warning.png │ │ ├── tab-back.png │ │ ├── tab-line.gif │ │ ├── yellowbox.png │ │ ├── apptitle-bg.png │ │ ├── black_arrow.gif │ │ ├── darkgreen-bg.gif │ │ ├── gear_small2.png │ │ ├── instruction_bg.png │ │ ├── progress_circle.gif │ │ ├── apple-touch-icon.png │ │ ├── black_arrow_left.gif │ │ ├── black_arrow_small.png │ │ ├── arrow_state_grey_expanded.png │ │ ├── enhanced_checkbox_checked.png │ │ └── enhanced_checkbox_unchecked.png │ │ ├── fonts │ │ ├── OpenSans.woff │ │ ├── OpenSans-Bold.woff │ │ ├── OpenSans-Italic.woff │ │ ├── OpenSans-Light.woff │ │ ├── OpenSans-Semibold.woff │ │ ├── OpenSans-BoldItalic.woff │ │ ├── OpenSansLight-Italic.woff │ │ └── OpenSans-SemiboldItalic.woff │ │ ├── webpack │ │ ├── images │ │ │ ├── sort_asc.png │ │ │ ├── sort_both.png │ │ │ ├── sort_desc.png │ │ │ ├── sort_asc_disabled.png │ │ │ ├── sort_desc_disabled.png │ │ │ ├── ui-icons_444444_256x240.png │ │ │ ├── ui-icons_555555_256x240.png │ │ │ ├── ui-icons_777620_256x240.png │ │ │ ├── ui-icons_777777_256x240.png │ │ │ ├── ui-icons_cc0000_256x240.png │ │ │ └── ui-icons_ffffff_256x240.png │ │ └── css │ │ │ └── fontawesome │ │ │ └── webfonts │ │ │ ├── fa-brands-400-.eot │ │ │ ├── fa-brands-400.eot │ │ │ ├── fa-brands-400.ttf │ │ │ ├── fa-brands-400.woff │ │ │ ├── fa-regular-400.eot │ │ │ ├── fa-regular-400.ttf │ │ │ ├── fa-solid-900-.eot │ │ │ ├── fa-solid-900.eot │ │ │ ├── fa-solid-900.ttf │ │ │ ├── fa-solid-900.woff │ │ │ ├── fa-solid-900.woff2 │ │ │ ├── fa-brands-400.woff2 │ │ │ ├── fa-regular-400-.eot │ │ │ ├── fa-regular-400.woff │ │ │ └── fa-regular-400.woff2 │ │ ├── js │ │ ├── Libraries │ │ │ ├── geoPositionSimulator-1609169281.js │ │ │ ├── jSignature.SignHere-1609169281.js │ │ │ ├── geoPosition-1609169281.js │ │ │ └── jSignature-1609169281.js │ │ ├── FontSize-1609169281.js │ │ └── Survey-1609169281.js │ │ └── css │ │ └── survey-1609169281.css ├── surveys │ ├── index.php-pid=338&doc_id_hash=da9057ca2dc47bac87a1ca80e3c5e0484da4f053&__passthru=DataEntry|image_view.php&s=7M3XF79KFL&id=10183.png │ ├── index.php-pid=338&__passthru=DataEntry|image_view.php&doc_id_hash=2ff48fc2c9750528630b98439ea934d6c9e81af0&id=10178&instance=1&s=7M3XF79KFL.png │ ├── index.php-pid=338&__passthru=DataEntry|image_view.php&doc_id_hash=327e4b155aab7b0659cbe2acdde4b4fcc8735456&id=10176&instance=1&s=7M3XF79KFL.png │ ├── index.php-pid=338&__passthru=DataEntry|image_view.php&doc_id_hash=35d17515f81b2675dc10a1bae4ea3d469c1b3551&id=10173&instance=1&s=7M3XF79KFL.png │ ├── index.php-pid=338&__passthru=DataEntry|image_view.php&doc_id_hash=e4b630b131f6c38e647bfca0116a1f8b74a5ea47&id=10175&instance=1&s=7M3XF79KFL.png │ └── index.php-pid=338&__passthru=DataEntry|image_view.php&doc_id_hash=efb07a3f59eafe1d339d2daace5c299412d458a6&id=10174&instance=1&s=7M3XF79KFL.png ├── _downloads.html └── api │ └── index-type=module&prefix=shazam&page=js|shazam.js.html ├── README.md └── code ├── geoPositionSimulator.js ├── FontSize.js ├── jSignature.SignHere.js ├── Survey.js ├── geoPosition.js ├── shazam.js └── jSignature.js /site/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: / -------------------------------------------------------------------------------- /site/_00.txt: -------------------------------------------------------------------------------- 1 | redcap.saude.gov.br/surveys/index-s=7M3XF79KFL.html -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/images/box_bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/images/box_bg.jpg -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/images/favicon.ico -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/images/upArrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/images/upArrow.png -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/images/warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/images/warning.png -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/fonts/OpenSans.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/fonts/OpenSans.woff -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/images/tab-back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/images/tab-back.png -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/images/tab-line.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/images/tab-line.gif -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/images/yellowbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/images/yellowbox.png -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/images/apptitle-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/images/apptitle-bg.png -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/images/black_arrow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/images/black_arrow.gif -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/images/darkgreen-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/images/darkgreen-bg.gif -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/images/gear_small2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/images/gear_small2.png -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/fonts/OpenSans-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/fonts/OpenSans-Bold.woff -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/fonts/OpenSans-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/fonts/OpenSans-Italic.woff -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/fonts/OpenSans-Light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/fonts/OpenSans-Light.woff -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/images/instruction_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/images/instruction_bg.png -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/images/progress_circle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/images/progress_circle.gif -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/fonts/OpenSans-Semibold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/fonts/OpenSans-Semibold.woff -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/images/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/images/apple-touch-icon.png -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/images/black_arrow_left.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/images/black_arrow_left.gif -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/images/black_arrow_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/images/black_arrow_small.png -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/webpack/images/sort_asc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/webpack/images/sort_asc.png -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/webpack/images/sort_both.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/webpack/images/sort_both.png -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/webpack/images/sort_desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/webpack/images/sort_desc.png -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/fonts/OpenSans-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/fonts/OpenSans-BoldItalic.woff -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/fonts/OpenSansLight-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/fonts/OpenSansLight-Italic.woff -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/fonts/OpenSans-SemiboldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/fonts/OpenSans-SemiboldItalic.woff -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/images/arrow_state_grey_expanded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/images/arrow_state_grey_expanded.png -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/images/enhanced_checkbox_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/images/enhanced_checkbox_checked.png -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/webpack/images/sort_asc_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/webpack/images/sort_asc_disabled.png -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/images/enhanced_checkbox_unchecked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/images/enhanced_checkbox_unchecked.png -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/webpack/images/sort_desc_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/webpack/images/sort_desc_disabled.png -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/webpack/images/ui-icons_444444_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/webpack/images/ui-icons_444444_256x240.png -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/webpack/images/ui-icons_555555_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/webpack/images/ui-icons_555555_256x240.png -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/webpack/images/ui-icons_777620_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/webpack/images/ui-icons_777620_256x240.png -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/webpack/images/ui-icons_777777_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/webpack/images/ui-icons_777777_256x240.png -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/webpack/images/ui-icons_cc0000_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/webpack/images/ui-icons_cc0000_256x240.png -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/webpack/images/ui-icons_ffffff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/webpack/images/ui-icons_ffffff_256x240.png -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/webpack/css/fontawesome/webfonts/fa-brands-400-.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/webpack/css/fontawesome/webfonts/fa-brands-400-.eot -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/webpack/css/fontawesome/webfonts/fa-brands-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/webpack/css/fontawesome/webfonts/fa-brands-400.eot -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/webpack/css/fontawesome/webfonts/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/webpack/css/fontawesome/webfonts/fa-brands-400.ttf -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/webpack/css/fontawesome/webfonts/fa-brands-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/webpack/css/fontawesome/webfonts/fa-brands-400.woff -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/webpack/css/fontawesome/webfonts/fa-regular-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/webpack/css/fontawesome/webfonts/fa-regular-400.eot -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/webpack/css/fontawesome/webfonts/fa-regular-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/webpack/css/fontawesome/webfonts/fa-regular-400.ttf -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/webpack/css/fontawesome/webfonts/fa-solid-900-.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/webpack/css/fontawesome/webfonts/fa-solid-900-.eot -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/webpack/css/fontawesome/webfonts/fa-solid-900.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/webpack/css/fontawesome/webfonts/fa-solid-900.eot -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/webpack/css/fontawesome/webfonts/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/webpack/css/fontawesome/webfonts/fa-solid-900.ttf -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/webpack/css/fontawesome/webfonts/fa-solid-900.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/webpack/css/fontawesome/webfonts/fa-solid-900.woff -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/webpack/css/fontawesome/webfonts/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/webpack/css/fontawesome/webfonts/fa-solid-900.woff2 -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/webpack/css/fontawesome/webfonts/fa-brands-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/webpack/css/fontawesome/webfonts/fa-brands-400.woff2 -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/webpack/css/fontawesome/webfonts/fa-regular-400-.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/webpack/css/fontawesome/webfonts/fa-regular-400-.eot -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/webpack/css/fontawesome/webfonts/fa-regular-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/webpack/css/fontawesome/webfonts/fa-regular-400.woff -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/webpack/css/fontawesome/webfonts/fa-regular-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/redcap_v10.4.1/Resources/webpack/css/fontawesome/webfonts/fa-regular-400.woff2 -------------------------------------------------------------------------------- /site/surveys/index.php-pid=338&doc_id_hash=da9057ca2dc47bac87a1ca80e3c5e0484da4f053&__passthru=DataEntry|image_view.php&s=7M3XF79KFL&id=10183.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/surveys/index.php-pid=338&doc_id_hash=da9057ca2dc47bac87a1ca80e3c5e0484da4f053&__passthru=DataEntry|image_view.php&s=7M3XF79KFL&id=10183.png -------------------------------------------------------------------------------- /site/surveys/index.php-pid=338&__passthru=DataEntry|image_view.php&doc_id_hash=2ff48fc2c9750528630b98439ea934d6c9e81af0&id=10178&instance=1&s=7M3XF79KFL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/surveys/index.php-pid=338&__passthru=DataEntry|image_view.php&doc_id_hash=2ff48fc2c9750528630b98439ea934d6c9e81af0&id=10178&instance=1&s=7M3XF79KFL.png -------------------------------------------------------------------------------- /site/surveys/index.php-pid=338&__passthru=DataEntry|image_view.php&doc_id_hash=327e4b155aab7b0659cbe2acdde4b4fcc8735456&id=10176&instance=1&s=7M3XF79KFL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/surveys/index.php-pid=338&__passthru=DataEntry|image_view.php&doc_id_hash=327e4b155aab7b0659cbe2acdde4b4fcc8735456&id=10176&instance=1&s=7M3XF79KFL.png -------------------------------------------------------------------------------- /site/surveys/index.php-pid=338&__passthru=DataEntry|image_view.php&doc_id_hash=35d17515f81b2675dc10a1bae4ea3d469c1b3551&id=10173&instance=1&s=7M3XF79KFL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/surveys/index.php-pid=338&__passthru=DataEntry|image_view.php&doc_id_hash=35d17515f81b2675dc10a1bae4ea3d469c1b3551&id=10173&instance=1&s=7M3XF79KFL.png -------------------------------------------------------------------------------- /site/surveys/index.php-pid=338&__passthru=DataEntry|image_view.php&doc_id_hash=e4b630b131f6c38e647bfca0116a1f8b74a5ea47&id=10175&instance=1&s=7M3XF79KFL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/surveys/index.php-pid=338&__passthru=DataEntry|image_view.php&doc_id_hash=e4b630b131f6c38e647bfca0116a1f8b74a5ea47&id=10175&instance=1&s=7M3XF79KFL.png -------------------------------------------------------------------------------- /site/surveys/index.php-pid=338&__passthru=DataEntry|image_view.php&doc_id_hash=efb07a3f59eafe1d339d2daace5c299412d458a6&id=10174&instance=1&s=7M3XF79KFL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RodrigoMenegat/autopsia-do-tratecov/HEAD/site/surveys/index.php-pid=338&__passthru=DataEntry|image_view.php&doc_id_hash=efb07a3f59eafe1d339d2daace5c299412d458a6&id=10174&instance=1&s=7M3XF79KFL.png -------------------------------------------------------------------------------- /site/_downloads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Downloads 6 | 7 | 8 |

Downloads

9 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Autópsia do TrateCov 2 | 3 | Esse repositório contem os arquivos JavaScript e a estrutura da página do aplicativo TrateCov, publicado pelo Governo Federal durante a crise da covid-19 em Manaus, em janeiro de 2021. 4 | 5 | Todos os arquivos foram obtidos simplesmente ao acessar a aba _network_ do inspetor de elementos do navegador Google Chrome. 6 | 7 | Na prática, todos eles já estavam disponíveis, nesse mesmo estado, para qualquer usuário que acessasse o site. 8 | 9 | O site também foi arquivado no Internet Archive no dia 20 de janeiro. Assim, é possivel ver como o aplicativo funcionava "ao vivo". O arquivo está disponível [aqui](https://web.archive.org/web/20210120031248/https://redcap.saude.gov.br/surveys/index.php?s=7M3XF79KFL). 10 | -------------------------------------------------------------------------------- /code/geoPositionSimulator.js: -------------------------------------------------------------------------------- 1 | // 2 | // javascript-mobile-desktop-geolocation 3 | // https://github.com/estebanav/javascript-mobile-desktop-geolocation 4 | // 5 | // Copyright J. Esteban Acosta Villafañe 6 | // Licensed under the MIT licenses. 7 | // 8 | // Based on Stan Wiechers > geo-location-javascript v0.4.8 > http://code.google.com/p/geo-location-javascript/ 9 | // 10 | // Revision: $Rev: 01 $: 11 | // Author: $Author: estebanav $: 12 | // Date: $Date: 2012-09-07 23:03:53 -0300 (Fri, 07 Sep 2012) $: 13 | 14 | 15 | var geoPositionSimulator=function(){ 16 | var pub = {}; 17 | var currentPosition=null; 18 | /* 19 | * Example: 20 | * array = [ { coords: { 21 | * latitude: 30.293095, 22 | * longitude: -97.5763955 23 | * } 24 | * }] 25 | * 26 | */ 27 | pub.init = function(array) 28 | { 29 | var next=0; 30 | for (i in array) 31 | { 32 | if( i == 0 ) 33 | { 34 | currentPosition=array[i]; 35 | } 36 | else 37 | { 38 | setTimeout((function(pos) { 39 | return function() { 40 | currentPosition=pos; 41 | } 42 | })(array[i]),next); 43 | } 44 | next+=array[i].duration; 45 | } 46 | } 47 | 48 | pub.getCurrentPosition = function(locationCallback,errorCallback) 49 | { 50 | locationCallback(currentPosition); 51 | } 52 | return pub; 53 | }(); -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/js/Libraries/geoPositionSimulator-1609169281.js: -------------------------------------------------------------------------------- 1 | // 2 | // javascript-mobile-desktop-geolocation 3 | // https://github.com/estebanav/javascript-mobile-desktop-geolocation 4 | // 5 | // Copyright J. Esteban Acosta Villafañe 6 | // Licensed under the MIT licenses. 7 | // 8 | // Based on Stan Wiechers > geo-location-javascript v0.4.8 > http://code.google.com/p/geo-location-javascript/ 9 | // 10 | // Revision: $Rev: 01 $: 11 | // Author: $Author: estebanav $: 12 | // Date: $Date: 2012-09-07 23:03:53 -0300 (Fri, 07 Sep 2012) $: 13 | 14 | 15 | var geoPositionSimulator=function(){ 16 | var pub = {}; 17 | var currentPosition=null; 18 | /* 19 | * Example: 20 | * array = [ { coords: { 21 | * latitude: 30.293095, 22 | * longitude: -97.5763955 23 | * } 24 | * }] 25 | * 26 | */ 27 | pub.init = function(array) 28 | { 29 | var next=0; 30 | for (i in array) 31 | { 32 | if( i == 0 ) 33 | { 34 | currentPosition=array[i]; 35 | } 36 | else 37 | { 38 | setTimeout((function(pos) { 39 | return function() { 40 | currentPosition=pos; 41 | } 42 | })(array[i]),next); 43 | } 44 | next+=array[i].duration; 45 | } 46 | } 47 | 48 | pub.getCurrentPosition = function(locationCallback,errorCallback) 49 | { 50 | locationCallback(currentPosition); 51 | } 52 | return pub; 53 | }(); -------------------------------------------------------------------------------- /code/FontSize.js: -------------------------------------------------------------------------------- 1 | // $('#some-element').actual('height'); to obtain sizes of hidden elements on page 2 | /*! Copyright 2012, Ben Lin (http://dreamerslab.com/) 3 | * Licensed under the MIT License (LICENSE.txt). 4 | * 5 | * Version: 1.0.19 6 | * 7 | * Requires: jQuery >= 1.2.3 8 | */ 9 | (function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a); 10 | }else{a(jQuery);}}(function(a){a.fn.addBack=a.fn.addBack||a.fn.andSelf;a.fn.extend({actual:function(b,l){if(!this[b]){throw'$.actual => The jQuery method "'+b+'" you called does not exist'; 11 | }var f={absolute:false,clone:false,includeMargin:false,display:"block"};var i=a.extend(f,l);var e=this.eq(0);var h,j;if(i.clone===true){h=function(){var m="position: absolute !important; top: -1000 !important; "; 12 | e=e.clone().attr("style",m).appendTo("body");};j=function(){e.remove();};}else{var g=[];var d="";var c;h=function(){c=e.parents().addBack().filter(":hidden"); 13 | d+="visibility: hidden !important; display: "+i.display+" !important; ";if(i.absolute===true){d+="position: absolute !important; ";}c.each(function(){var m=a(this); 14 | var n=m.attr("style");g.push(n);m.attr("style",n?n+";"+d:d);});};j=function(){c.each(function(m){var o=a(this);var n=g[m];if(n===undefined){o.removeAttr("style"); 15 | }else{o.attr("style",n);}});};}h();var k=/(outer)/.test(b)?e[b](i.includeMargin):e[b]();j();return k;}});})); 16 | 17 | // Change font size of elements on page. Provide tags (e.g., p, .data) and increase factor (e.g., 0.8, 1.5) and class to exclude (e.g., label) 18 | function changeFont(tags, factor) { 19 | var matrixRegex = /matrix\((-?\d*\.?\d+),\s*0,\s*0,\s*(-?\d*\.?\d+),\s*0,\s*0\)/; 20 | factor = (factor > 1) ? 2.0 : -2.0; 21 | 22 | // Tags are iterated in reverse to prevent compounding size changes in nested spans 23 | // due to incorrect detection of the previous size as the size set during the 24 | // current iteration of this method. 25 | $($(tags).get().reverse()).each(function(){ 26 | // Get font-size and increase 27 | var ob = $(this); 28 | // For certain fields, get height and increase 29 | var tag_name = this.tagName.toLowerCase(); 30 | // Skip spans that wrap drop-downs 31 | if (tag_name == 'span' && $('select:first-child',ob).hasClass('x-form-text')) return; 32 | // Set font-size 33 | var appendStyle = 'font-size: '+(parseFloat(ob.css('font-size'),10)+factor)+'px !important;'; 34 | // Set based on input type 35 | if (tag_name == 'select') { 36 | // Drop-down 37 | var thisHeight = parseFloat(ob.css('height'),10); 38 | if (thisHeight < 5) thisHeight = ob.actual('height'); // Use alternative method to find height of hidden element 39 | appendStyle += 'height: '+(thisHeight+factor)+'px !important;'; 40 | } else if (tag_name == 'input') { 41 | var input_type = ob.attr('type'); 42 | if (input_type == 'text') { 43 | // Text 44 | var thisHeight = parseFloat(ob.css('height'),10); 45 | if (thisHeight < 5) thisHeight = ob.actual('height'); // Use alternative method to find height of hidden element 46 | appendStyle += 'height: '+(thisHeight+factor)+'px !important;'; 47 | } else if (input_type == 'radio' || input_type == 'checkbox') { 48 | // Radio/Checkbox 49 | var transform = (ob.css('-webkit-transform') != null ? ob.css('-webkit-transform') : (ob.css('-moz-transform') != null ? ob.css('-moz-transform') : (ob.css('-ms-transform') != null ? ob.css('-ms-transform') : (ob.css('transform') != null ? ob.css('transform') : (ob.css('-o-transform') != null ? ob.css('-o-transform') : 1))))); 50 | if (transform !== 1) { 51 | try { 52 | var matches = transform.match(matrixRegex); 53 | transform = matches[1]*1+(factor/10); 54 | } catch(e) { 55 | transform = 1+(factor/10); 56 | } 57 | } else { 58 | transform = 1+(factor/10); 59 | } 60 | ob.css({ 61 | '-webkit-transform' : 'scale(' + transform + ')', 62 | '-moz-transform' : 'scale(' + transform + ')', 63 | '-ms-transform' : 'scale(' + transform + ')', 64 | '-o-transform' : 'scale(' + transform + ')', 65 | 'transform' : 'scale(' + transform + ')' 66 | }); 67 | var margin = round(ob.css('margin-top').replace('px','')*1+factor); 68 | appendStyle += 'margin: '+margin+'px '+margin+'px '+margin+'px 0px !important;'; 69 | } 70 | } else if (tag_name == 'button' && ob.hasClass('rc-autocomplete')) { 71 | // Drop-down autocomplete button 72 | appendStyle += 'height: '+($('input.rc-autocomplete:first', ob.parent()).outerHeight())+'px !important;'; 73 | } 74 | var style = (ob.attr('style') == null) ? '' : ob.attr('style'); 75 | ob.attr('style', style+';'+appendStyle); 76 | }); 77 | } 78 | 79 | $(function() 80 | { 81 | // Set original font increment and tags to change 82 | var fontSizeCookie = getCookie('fontsize'); 83 | var fontIncreaseIncrement = (fontSizeCookie != null && fontSizeCookie != "" && fontSizeCookie != 0) ? fontSizeCookie : 0; 84 | var fontIncreaseTags = 'a, p, h3, span, select, input, textarea, .note, .labelrc, .data, .labelmatrix, .data_matrix,.headermatrix td, #surveytitle, .header, .sliderlabels td, ' 85 | + '.sldrmsg, #surveyinstructions p, .popup-contents td, #return_instructions, .exittext, button.rc-autocomplete, .choicevert, choicehoriz'; 86 | // Increase Font Size 87 | $('.increaseFont').click(function(){ 88 | changeFont(fontIncreaseTags, 1.2); 89 | // Increase global value of font 90 | fontIncreaseIncrement++; 91 | // Set cookie 92 | setCookie('fontsize',fontIncreaseIncrement,1); 93 | }); 94 | // Decrease Font Size 95 | $('.decreaseFont').click(function(){ 96 | changeFont(fontIncreaseTags, 1/1.2); 97 | // Decrease global value of font 98 | fontIncreaseIncrement--; 99 | // Set cookie 100 | setCookie('fontsize',fontIncreaseIncrement,1); 101 | }); 102 | // If cookie is already set for font size change, then resize again at page load 103 | if (fontIncreaseIncrement != 0) { 104 | if (fontIncreaseIncrement > 0) { 105 | for (i=1; i <= fontIncreaseIncrement; i++) { 106 | changeFont(fontIncreaseTags, 1.2); 107 | } 108 | } else { 109 | for (i=1; i <= Math.abs(fontIncreaseIncrement); i++) { 110 | changeFont(fontIncreaseTags, 1/1.2); 111 | } 112 | } 113 | } 114 | }); -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/js/FontSize-1609169281.js: -------------------------------------------------------------------------------- 1 | // $('#some-element').actual('height'); to obtain sizes of hidden elements on page 2 | /*! Copyright 2012, Ben Lin (http://dreamerslab.com/) 3 | * Licensed under the MIT License (LICENSE.txt). 4 | * 5 | * Version: 1.0.19 6 | * 7 | * Requires: jQuery >= 1.2.3 8 | */ 9 | (function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a); 10 | }else{a(jQuery);}}(function(a){a.fn.addBack=a.fn.addBack||a.fn.andSelf;a.fn.extend({actual:function(b,l){if(!this[b]){throw'$.actual => The jQuery method "'+b+'" you called does not exist'; 11 | }var f={absolute:false,clone:false,includeMargin:false,display:"block"};var i=a.extend(f,l);var e=this.eq(0);var h,j;if(i.clone===true){h=function(){var m="position: absolute !important; top: -1000 !important; "; 12 | e=e.clone().attr("style",m).appendTo("body");};j=function(){e.remove();};}else{var g=[];var d="";var c;h=function(){c=e.parents().addBack().filter(":hidden"); 13 | d+="visibility: hidden !important; display: "+i.display+" !important; ";if(i.absolute===true){d+="position: absolute !important; ";}c.each(function(){var m=a(this); 14 | var n=m.attr("style");g.push(n);m.attr("style",n?n+";"+d:d);});};j=function(){c.each(function(m){var o=a(this);var n=g[m];if(n===undefined){o.removeAttr("style"); 15 | }else{o.attr("style",n);}});};}h();var k=/(outer)/.test(b)?e[b](i.includeMargin):e[b]();j();return k;}});})); 16 | 17 | // Change font size of elements on page. Provide tags (e.g., p, .data) and increase factor (e.g., 0.8, 1.5) and class to exclude (e.g., label) 18 | function changeFont(tags, factor) { 19 | var matrixRegex = /matrix\((-?\d*\.?\d+),\s*0,\s*0,\s*(-?\d*\.?\d+),\s*0,\s*0\)/; 20 | factor = (factor > 1) ? 2.0 : -2.0; 21 | 22 | // Tags are iterated in reverse to prevent compounding size changes in nested spans 23 | // due to incorrect detection of the previous size as the size set during the 24 | // current iteration of this method. 25 | $($(tags).get().reverse()).each(function(){ 26 | // Get font-size and increase 27 | var ob = $(this); 28 | // For certain fields, get height and increase 29 | var tag_name = this.tagName.toLowerCase(); 30 | // Skip spans that wrap drop-downs 31 | if (tag_name == 'span' && $('select:first-child',ob).hasClass('x-form-text')) return; 32 | // Set font-size 33 | var appendStyle = 'font-size: '+(parseFloat(ob.css('font-size'),10)+factor)+'px !important;'; 34 | // Set based on input type 35 | if (tag_name == 'select') { 36 | // Drop-down 37 | var thisHeight = parseFloat(ob.css('height'),10); 38 | if (thisHeight < 5) thisHeight = ob.actual('height'); // Use alternative method to find height of hidden element 39 | appendStyle += 'height: '+(thisHeight+factor)+'px !important;'; 40 | } else if (tag_name == 'input') { 41 | var input_type = ob.attr('type'); 42 | if (input_type == 'text') { 43 | // Text 44 | var thisHeight = parseFloat(ob.css('height'),10); 45 | if (thisHeight < 5) thisHeight = ob.actual('height'); // Use alternative method to find height of hidden element 46 | appendStyle += 'height: '+(thisHeight+factor)+'px !important;'; 47 | } else if (input_type == 'radio' || input_type == 'checkbox') { 48 | // Radio/Checkbox 49 | var transform = (ob.css('-webkit-transform') != null ? ob.css('-webkit-transform') : (ob.css('-moz-transform') != null ? ob.css('-moz-transform') : (ob.css('-ms-transform') != null ? ob.css('-ms-transform') : (ob.css('transform') != null ? ob.css('transform') : (ob.css('-o-transform') != null ? ob.css('-o-transform') : 1))))); 50 | if (transform !== 1) { 51 | try { 52 | var matches = transform.match(matrixRegex); 53 | transform = matches[1]*1+(factor/10); 54 | } catch(e) { 55 | transform = 1+(factor/10); 56 | } 57 | } else { 58 | transform = 1+(factor/10); 59 | } 60 | ob.css({ 61 | '-webkit-transform' : 'scale(' + transform + ')', 62 | '-moz-transform' : 'scale(' + transform + ')', 63 | '-ms-transform' : 'scale(' + transform + ')', 64 | '-o-transform' : 'scale(' + transform + ')', 65 | 'transform' : 'scale(' + transform + ')' 66 | }); 67 | var margin = round(ob.css('margin-top').replace('px','')*1+factor); 68 | appendStyle += 'margin: '+margin+'px '+margin+'px '+margin+'px 0px !important;'; 69 | } 70 | } else if (tag_name == 'button' && ob.hasClass('rc-autocomplete')) { 71 | // Drop-down autocomplete button 72 | appendStyle += 'height: '+($('input.rc-autocomplete:first', ob.parent()).outerHeight())+'px !important;'; 73 | } 74 | var style = (ob.attr('style') == null) ? '' : ob.attr('style'); 75 | ob.attr('style', style+';'+appendStyle); 76 | }); 77 | } 78 | 79 | $(function() 80 | { 81 | // Set original font increment and tags to change 82 | var fontSizeCookie = getCookie('fontsize'); 83 | var fontIncreaseIncrement = (fontSizeCookie != null && fontSizeCookie != "" && fontSizeCookie != 0) ? fontSizeCookie : 0; 84 | var fontIncreaseTags = 'a, p, h3, span, select, input, textarea, .note, .labelrc, .data, .labelmatrix, .data_matrix,.headermatrix td, #surveytitle, .header, .sliderlabels td, ' 85 | + '.sldrmsg, #surveyinstructions p, .popup-contents td, #return_instructions, .exittext, button.rc-autocomplete, .choicevert, choicehoriz'; 86 | // Increase Font Size 87 | $('.increaseFont').click(function(){ 88 | changeFont(fontIncreaseTags, 1.2); 89 | // Increase global value of font 90 | fontIncreaseIncrement++; 91 | // Set cookie 92 | setCookie('fontsize',fontIncreaseIncrement,1); 93 | }); 94 | // Decrease Font Size 95 | $('.decreaseFont').click(function(){ 96 | changeFont(fontIncreaseTags, 1/1.2); 97 | // Decrease global value of font 98 | fontIncreaseIncrement--; 99 | // Set cookie 100 | setCookie('fontsize',fontIncreaseIncrement,1); 101 | }); 102 | // If cookie is already set for font size change, then resize again at page load 103 | if (fontIncreaseIncrement != 0) { 104 | if (fontIncreaseIncrement > 0) { 105 | for (i=1; i <= fontIncreaseIncrement; i++) { 106 | changeFont(fontIncreaseTags, 1.2); 107 | } 108 | } else { 109 | for (i=1; i <= Math.abs(fontIncreaseIncrement); i++) { 110 | changeFont(fontIncreaseTags, 1/1.2); 111 | } 112 | } 113 | } 114 | }); -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/css/survey-1609169281.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #333; 3 | font-family: "Open Sans",Helvetica,Arial,sans-serif; 4 | font-size: 12px; 5 | margin: 0; 6 | padding: 0; 7 | overflow: auto; 8 | } 9 | #pagecontainer { 10 | margin: 0 auto; 11 | max-height: 100%; 12 | padding: 0 0 10px; 13 | text-align: left; 14 | max-width: 800px; 15 | } 16 | #container{ 17 | margin: 0; 18 | padding: 7px 0px 0px 0px; 19 | text-align: left; 20 | background: #fff; 21 | border: 1px solid #ccc; 22 | border-top: 0; 23 | border-bottom: 0; 24 | } 25 | #questiontable { border-left: 0;border-right: 0;border-bottom: 0; } 26 | #footer { 27 | color: #888; 28 | font-size: 11px; 29 | text-align:center; 30 | margin: 30px 0 0 0; 31 | padding:20px 0 5px; 32 | } 33 | #footer a { 34 | color:#aaa;text-decoration:none;font-weight:normal;font-size:11px; 35 | } 36 | #header { 37 | margin-left: 50px; 38 | margin-right: 37px; 39 | position: relative; 40 | text-align: left; 41 | width: 791px; 42 | z-index: 1; 43 | } 44 | #pagecontent { 45 | margin-top: -14px; 46 | margin-bottom: 0px; 47 | } 48 | #pagecontent table{ 49 | clear: both; 50 | } 51 | 52 | #surveytitle { padding-left: 10px; padding-right: 10px; font-family: "Open Sans",Helvetica,Arial,sans-serif;font-size: 20px;font-weight: normal;margin:20px 0;text-align:left; } 53 | 54 | .header { 55 | background:url("../images/instruction_bg.png") repeat-x scroll 0 0 #BCCFE8; 56 | color:#000000; 57 | font-size:13px; 58 | font-weight:bold; 59 | padding:8px; 60 | border:0px; 61 | } 62 | input.rc-autocomplete{ 63 | width:100% !important; 64 | } 65 | .data, .labelrc, .labelmatrix, .data_matrix { 66 | padding:15px 10px; 67 | background:#F3F3F3; 68 | border:0px; 69 | border-bottom:1px solid #DDDDDD; 70 | vertical-align:top; 71 | font-weight: bold; 72 | } 73 | .data_matrix { 74 | vertical-align:middle; 75 | } 76 | .labelrc a:link, .labelrc a:visited, .labelrc a:active, .labelrc a:hover { font-family: "Open Sans",Helvetica,Arial,sans-serif; } 77 | .labelmatrix { 78 | padding-top:0;padding-bottom:0;padding-right:0; 79 | } 80 | 81 | table.form_border { border:1px solid #DDDDDD; } 82 | .viewEq { display: none; } 83 | .calcDisc { display: none; } 84 | .submitBtn { background: red; } 85 | 86 | #surveytitlelogo { table-layout:fixed;margin-top:3px; } 87 | 88 | a:link, a:visited, a:active, a:hover{ font-family: "Open Sans",Helvetica,Arial,sans-serif; font-size: 12px; color: #000066; text-decoration: underline; text-align:left; } 89 | a:hover{ color: red; } 90 | p { line-height: 1.5em; } 91 | .hang a:link, .hang a:visited, .hang a:active, .hang a:hover{ text-decoration: none; } 92 | .x-panel-header { text-align: left; } 93 | .sendit-lnk { display: none; } 94 | .hide { display: none; } 95 | 96 | /* Bubble pop-up on survey page */ 97 | .popup { 98 | position: absolute; 99 | display: none; 100 | z-index: 50; 101 | border-collapse: collapse; 102 | } 103 | .popup table.popup-contents { 104 | font-size: 12px; 105 | line-height: 1.4em; 106 | background-color: #fff; 107 | color: #666; 108 | border: 1px solid #888; 109 | } 110 | #return_corner, #survey_queue_corner{ 111 | white-space:nowrap; 112 | text-align:center; 113 | padding:9px 9px 4px 9px; 114 | border-left:1px solid #bbb; 115 | border-bottom:1px solid #bbb; 116 | } 117 | #return_instructions { padding: 0 10px; } 118 | #stopActionPrompt, #stopActionReturn { display: none; text-align: left; font-size: 13px; margin: 10px 0; } 119 | #surveypagenum { color:#800000;font-weight:bold;text-align:right;margin:0 8px 5px 3px; } 120 | #surveyinstructions, #surveyacknowledgment { padding:0 10px 15px; } 121 | #surveyinstructions p, #surveyinstructions div, #surveyacknowledgment p, #surveyacknowledgment div { max-width:100% !important; } 122 | #surveyinstructions div, #surveyinstructions p { margin:8px 0; } 123 | .questionnum { padding-right:3px;padding-left:3px;text-align:right; } 124 | .questionnummatrix { padding-right:3px;padding-left:3px;text-align:right;padding-top:4px; } 125 | 126 | /* ACTION TAGS */ 127 | .\@HIDDEN-FORM { 128 | display: table-row; 129 | /* IE 6-9 hack*/ 130 | display: block\9; 131 | } 132 | .\@HIDDEN-SURVEY { display: none; } 133 | .\@READONLY-SURVEY { 134 | /* IE 8 */ 135 | -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)"; 136 | /* IE 5-7 */ 137 | filter: alpha(opacity=60); 138 | /* Netscape */ 139 | -moz-opacity: 0.6; 140 | /* Safari 1.x */ 141 | -khtml-opacity: 0.6; 142 | /* Good browsers */ 143 | opacity: 0.6; 144 | } 145 | .\@READONLY-FORM { 146 | /* IE 8 */ 147 | -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; 148 | /* IE 5-7 */ 149 | filter: alpha(opacity=100); 150 | /* Netscape */ 151 | -moz-opacity: 1.0; 152 | /* Safari 1.x */ 153 | -khtml-opacity: 1.0; 154 | /* Good browsers */ 155 | opacity: 1.0; 156 | } 157 | #changeFont { padding-top:7px;padding-right:15px;text-align:right;position:relative;color:#666;font-family:tahoma;font-size:11px; } 158 | #changeFont .far { font-size: 13px } 159 | #changeFont button { border:0;padding:0;margin:0; } 160 | #form { border-top:1px solid #DDD; } 161 | #questiontable td input[type='text'], #questiontable td textarea, #questiontable td select { color: #000000; } 162 | .choicematrix { padding: 5px 0 1px !important; } 163 | 164 | 165 | div.enhancedchoice_wrapper { 166 | margin-top:2px; 167 | } 168 | div.enhancedchoice { 169 | margin-top:2px; 170 | float: left; 171 | } 172 | div.enhancedchoice label { 173 | width: 90%; 174 | -webkit-border-radius: 10px; 175 | -moz-border-radius: 10px; 176 | border-radius: 10px; 177 | text-align: left; 178 | vertical-align: middle; 179 | height: auto; 180 | border: 1px solid #337ab7; 181 | color: #337ab7; 182 | background-color: #FFF; 183 | overflow: visible !important; 184 | white-space: normal !important; 185 | cursor:pointer;cursor:hand; 186 | } 187 | div.enhancedchoice label span.ec { 188 | display: block; 189 | text-align: center; 190 | padding: 6px; 191 | } 192 | div.enhancedchoice label.selectedradio, div.enhancedchoice label.selectedchkbox, div.enhancedchoice label.hover:hover { 193 | border: 1px solid #FFF; 194 | background-color: #337ab7; 195 | } 196 | div.enhancedchoice label.selectedradio, div.enhancedchoice label.selectedradio a, div.enhancedchoice label.selectedchkbox, div.enhancedchoice label.selectedchkbox a, div.enhancedchoice label.hover:hover, div.enhancedchoice label.hover:hover a { 197 | color: #FFF; 198 | } 199 | div.enhancedchoice label.selectedchkbox span.ec { 200 | text-align: left; 201 | padding-left: 45px; 202 | background: url("../images/enhanced_checkbox_checked.png") left center no-repeat; 203 | } 204 | div.enhancedchoice label.unselectedchkbox span.ec { 205 | text-align: left; 206 | padding-left: 45px; 207 | background: url("../images/enhanced_checkbox_unchecked.png") left center no-repeat; 208 | } 209 | div.enhancedchoice label.hover:hover { 210 | transition: background 0.5s ease; 211 | -webkit-transition: background 0.5s ease; /* Safari */ 212 | } 213 | img.rc-autocomplete { 214 | margin: 2px 3px; 215 | } 216 | 217 | @media print { 218 | div.enhancedchoice_wrapper label, 219 | div.enhancedchoice_wrapper label 220 | { 221 | border: 1px dotted gray; 222 | } 223 | div.enhancedchoice label.selectedradio, 224 | div.enhancedchoice label.selectedchkbox { 225 | border-color: black !important; 226 | } 227 | } 228 | 229 | /* mobile styles */ 230 | @media screen and (max-width: 767px) { 231 | .data, .labelrc { 232 | padding:5px; 233 | } 234 | .labelmatrix, .data_matrix { 235 | padding:2px 0; 236 | } 237 | .questionnum { padding-right:2px;padding-left:2px; } 238 | } -------------------------------------------------------------------------------- /code/jSignature.SignHere.js: -------------------------------------------------------------------------------- 1 | /** @license 2 | jSignature v2 jSignature's Sign Here "sticker" plugin 3 | Copyright (c) 2011 Willow Systems Corp http://willow-systems.com 4 | MIT License 5 | 6 | */ 7 | ;(function(){ 8 | 9 | var apinamespace = 'jSignature' 10 | 11 | function attachHandlers($obj, apinamespace, extensionName) { 12 | 13 | ;(function(jSignatureInstance, $obj, apinamespace) { 14 | $obj.bind('click', function(){ 15 | // when user is annoyed enough to click on us, hide us 16 | $obj.hide() 17 | }) 18 | 19 | jSignatureInstance.events.subscribe( 20 | apinamespace + '.change' 21 | , function(){ 22 | if (jSignatureInstance.dataEngine.data.length) { 23 | $obj.hide() 24 | } else { 25 | $obj.show() 26 | } 27 | } 28 | ) 29 | })( this, $obj, apinamespace ) 30 | } 31 | 32 | function ExtensionInitializer(extensionName){ 33 | // we are called very early in instance's life. 34 | // right after the settings are resolved and 35 | // jSignatureInstance.events is created 36 | // and right before first ("jSignature.initializing") event is called. 37 | // You don't really need to manupilate 38 | // jSignatureInstance directly, just attach 39 | // a bunch of events to jSignatureInstance.events 40 | // (look at the source of jSignatureClass to see when these fire) 41 | // and your special pieces of code will attach by themselves. 42 | 43 | // this function runs every time a new instance is set up. 44 | // this means every var you create will live only for one instance 45 | // unless you attach it to something outside, like "window." 46 | // and pick it up later from there. 47 | 48 | // when globalEvents' events fire, 'this' is globalEvents object 49 | // when jSignatureInstance's events fire, 'this' is jSignatureInstance 50 | 51 | // Here, 52 | // this = is new jSignatureClass's instance. 53 | 54 | // The way you COULD approch setting this up is: 55 | // if you have multistep set up, attach event to "jSignature.initializing" 56 | // that attaches other events to be fired further lower the init stream. 57 | // Or, if you know for sure you rely on only one jSignatureInstance's event, 58 | // just attach to it directly 59 | 60 | var apinamespace = 'jSignature' 61 | 62 | this.events.subscribe( 63 | // name of the event 64 | apinamespace + '.attachingEventHandlers' 65 | // event handlers, can pass args too, but in majority of cases, 66 | // 'this' which is jSignatureClass object instance pointer is enough to get by. 67 | , function(){ 68 | 69 | var renderer = function(){ 70 | var data = "data:image/gif;base64,R0lGODlhtABJAOf/AAABAAACAAEEAAIFAQQHAgUIBAcJBQoJAAgLBwwLAAoMCA0MAA8OAwwPCxMQAA8RDRURABYSARITERMVBBQVExcXABgYAhYYFRkaBBwbABkaGB0cAR4dAhocGRsdGh8fBSIgAB0fHB4gHSAhHyQjBSckACIjISgmASQlIyooBSYnJSwpAC0qAC4rAS8rAikqKCssKjEuBTMvAC0uLDUwAjcyBS8xLzg0Bjs1ATIzMTw3Azk5BDQ2MzY3NTs7Bjw8Bzg5Nz49ADo7OUA/AkJABEJBBTw+O0RCBj5APUVECEdFAUFCQElGAkpIBERGQ0xKBk5LB09MCEdJRlJOAlNPA0pLSVRQBFZSBk1PTFdTB1hUCVtVAE9RTlxXAl5YBFJUUVRVU2BaBmFbCFZXVWJcCVZYVVlbWWZgAmhhBGliBVxeW15gXWxlCW1mC2BiX25nDHBoAXJqA2NlYnRrBmZnZXFuCGhpZ3NwCnRxDHVyAHdzAWxta3l1A3p2BW9xbnx4CX55DIB7AHN1coJ8AYN+A3Z4dXh6d4eBCYiCDImDDnt9eoyFAI2GAo6HA36AfZCJBoCCf4KEgZOLDJWND4WHhJiQAYiKh5qSBZ2UCouNip+VDqGXAI6QjaSaA5CSj6ecB5SWk6ieC6qfDq2hAJeZlq+jAJmbmLCkAqynBJyem66oCZ2fnLCqDaCin7StALKsEKOloriwA7qyCaeppry0DamrqL+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maaZaUWSl6e5mgkZlBYREAA7" 71 | , $img = $('') 72 | try { 73 | $img[0].src = data 74 | return $img 75 | } catch (ex) { 76 | return $() // empty jQuery obj 77 | } 78 | } 79 | if (this.settings[extensionName] && typeof this.settings[extensionName].renderer === 'function') { 80 | renderer = this.settings[extensionName].renderer 81 | } 82 | 83 | var $obj = renderer() 84 | 85 | if ($obj.length) { 86 | $obj.appendTo(this.$controlbarUpper) 87 | 88 | attachHandlers.call( 89 | this 90 | , $obj 91 | , apinamespace 92 | , extensionName 93 | ) 94 | } 95 | } 96 | ) 97 | } 98 | 99 | var ExtensionAttacher = function(){ 100 | $.fn[apinamespace]( 101 | 'addPlugin' 102 | , 'instance' // type of plugin 103 | , 'SignHere' // extension name 104 | , ExtensionInitializer 105 | ) 106 | } 107 | 108 | 109 | // //Because plugins are minified together with jSignature, multiple defines per (minified) file blow up and dont make sense 110 | // //Need to revisit this later. 111 | 112 | // if ( typeof define === "function" && define.amd != null) { 113 | // // AMD-loader compatible resource declaration 114 | // // you need to call this one with jQuery as argument. 115 | // define(function(){return Initializer} ) 116 | // } else { 117 | ExtensionAttacher() 118 | // } 119 | 120 | })(); -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/js/Libraries/jSignature.SignHere-1609169281.js: -------------------------------------------------------------------------------- 1 | /** @license 2 | jSignature v2 jSignature's Sign Here "sticker" plugin 3 | Copyright (c) 2011 Willow Systems Corp http://willow-systems.com 4 | MIT License 5 | 6 | */ 7 | ;(function(){ 8 | 9 | var apinamespace = 'jSignature' 10 | 11 | function attachHandlers($obj, apinamespace, extensionName) { 12 | 13 | ;(function(jSignatureInstance, $obj, apinamespace) { 14 | $obj.bind('click', function(){ 15 | // when user is annoyed enough to click on us, hide us 16 | $obj.hide() 17 | }) 18 | 19 | jSignatureInstance.events.subscribe( 20 | apinamespace + '.change' 21 | , function(){ 22 | if (jSignatureInstance.dataEngine.data.length) { 23 | $obj.hide() 24 | } else { 25 | $obj.show() 26 | } 27 | } 28 | ) 29 | })( this, $obj, apinamespace ) 30 | } 31 | 32 | function ExtensionInitializer(extensionName){ 33 | // we are called very early in instance's life. 34 | // right after the settings are resolved and 35 | // jSignatureInstance.events is created 36 | // and right before first ("jSignature.initializing") event is called. 37 | // You don't really need to manupilate 38 | // jSignatureInstance directly, just attach 39 | // a bunch of events to jSignatureInstance.events 40 | // (look at the source of jSignatureClass to see when these fire) 41 | // and your special pieces of code will attach by themselves. 42 | 43 | // this function runs every time a new instance is set up. 44 | // this means every var you create will live only for one instance 45 | // unless you attach it to something outside, like "window." 46 | // and pick it up later from there. 47 | 48 | // when globalEvents' events fire, 'this' is globalEvents object 49 | // when jSignatureInstance's events fire, 'this' is jSignatureInstance 50 | 51 | // Here, 52 | // this = is new jSignatureClass's instance. 53 | 54 | // The way you COULD approch setting this up is: 55 | // if you have multistep set up, attach event to "jSignature.initializing" 56 | // that attaches other events to be fired further lower the init stream. 57 | // Or, if you know for sure you rely on only one jSignatureInstance's event, 58 | // just attach to it directly 59 | 60 | var apinamespace = 'jSignature' 61 | 62 | this.events.subscribe( 63 | // name of the event 64 | apinamespace + '.attachingEventHandlers' 65 | // event handlers, can pass args too, but in majority of cases, 66 | // 'this' which is jSignatureClass object instance pointer is enough to get by. 67 | , function(){ 68 | 69 | var renderer = function(){ 70 | var data = "data:image/gif;base64,R0lGODlhtABJAOf/AAABAAACAAEEAAIFAQQHAgUIBAcJBQoJAAgLBwwLAAoMCA0MAA8OAwwPCxMQAA8RDRURABYSARITERMVBBQVExcXABgYAhYYFRkaBBwbABkaGB0cAR4dAhocGRsdGh8fBSIgAB0fHB4gHSAhHyQjBSckACIjISgmASQlIyooBSYnJSwpAC0qAC4rAS8rAikqKCssKjEuBTMvAC0uLDUwAjcyBS8xLzg0Bjs1ATIzMTw3Azk5BDQ2MzY3NTs7Bjw8Bzg5Nz49ADo7OUA/AkJABEJBBTw+O0RCBj5APUVECEdFAUFCQElGAkpIBERGQ0xKBk5LB09MCEdJRlJOAlNPA0pLSVRQB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z0NgX5vAJTyAhBIAFs0A32vhTw4gNpCAHNgBvBlADbKAJxvCFm8QOqqAF4uEEq6A0kRePPbYR+zANoOBuVIYDbbAJn2Zn7RALYsAZO2EEoICKB4mQeKWQGWd0VJZsy+aPYxIPuMAGRpMDmeCHHemR1GS+ds5QdGuHL/JGb7DXJMBQB7H1ApBwfy8Jkz1kdsiQCWWAAh33cSGHI8fwB3+yEyZgCD9XN0LJHrhXDJYABpjXE0m3dE3HGtIwCKXYgn5waVRZlVwCE/ege7zHdm4Hd5UBaduzExJAB8jwIgmBlggJE/YgDJHABf/HExGgeaigDJVgW7yoBsKQIXrZmNuoEfvnCFigARZlAGCQC9jomJppcRshD72gCFXQAVUAC/C4maaZaUWSl6e5mgkZlBYREAA7" 71 | , $img = $('') 72 | try { 73 | $img[0].src = data 74 | return $img 75 | } catch (ex) { 76 | return $() // empty jQuery obj 77 | } 78 | } 79 | if (this.settings[extensionName] && typeof this.settings[extensionName].renderer === 'function') { 80 | renderer = this.settings[extensionName].renderer 81 | } 82 | 83 | var $obj = renderer() 84 | 85 | if ($obj.length) { 86 | $obj.appendTo(this.$controlbarUpper) 87 | 88 | attachHandlers.call( 89 | this 90 | , $obj 91 | , apinamespace 92 | , extensionName 93 | ) 94 | } 95 | } 96 | ) 97 | } 98 | 99 | var ExtensionAttacher = function(){ 100 | $.fn[apinamespace]( 101 | 'addPlugin' 102 | , 'instance' // type of plugin 103 | , 'SignHere' // extension name 104 | , ExtensionInitializer 105 | ) 106 | } 107 | 108 | 109 | // //Because plugins are minified together with jSignature, multiple defines per (minified) file blow up and dont make sense 110 | // //Need to revisit this later. 111 | 112 | // if ( typeof define === "function" && define.amd != null) { 113 | // // AMD-loader compatible resource declaration 114 | // // you need to call this one with jQuery as argument. 115 | // define(function(){return Initializer} ) 116 | // } else { 117 | ExtensionAttacher() 118 | // } 119 | 120 | })(); -------------------------------------------------------------------------------- /code/Survey.js: -------------------------------------------------------------------------------- 1 | $(function(){ 2 | 3 | // Make section headers into toolbar CSS 4 | $('.header').addClass('toolbar'); 5 | 6 | // Add extra border about main survey container for survey acknowledgement, etc. 7 | if (!$('#questiontable').length) $('#container').css('border','1px solid #ccc'); 8 | 9 | // Remove ability to submit form via Enter button on keyboard 10 | $(':input').keypress(function(e) { 11 | if ((this.type == 'checkbox' || this.type == 'text') && e.which == 13) { 12 | return false; 13 | } 14 | }); 15 | 16 | // Safari hack for large radios/checkboxes 17 | var chrome = navigator.userAgent.indexOf('Chrome') > -1; 18 | var safari = navigator.userAgent.indexOf("Safari") > -1; 19 | if (chrome && safari) safari = false; 20 | // If Safari and large text, increase padding of checkbox/radio (should be done with classes - not style) 21 | if (safari && $('#questiontable input[type="checkbox"]:first, #questiontable input[type="radio"]:first').length) { 22 | if ($('#questiontable input[type="checkbox"]:first, #questiontable input[type="radio"]:first').css('margin').substring(0,3) == '6px') { 23 | $('#questiontable input[type="checkbox"], #questiontable input[type="radio"]').css('margin', '8px'); 24 | } 25 | } 26 | 27 | // Hack to un-truncate long select options: http://stackoverflow.com/a/19734474/1402028 28 | if (isIOS) $("#questiontable select").append(''); 29 | 30 | try{ 31 | // Enable action tags 32 | enableActionTags(); 33 | 34 | // Enable auto-complete for drop-downs (unless Field Embedding is used, and if so, we'll run after doFieldEmbedding()) 35 | if (!$('#questiontable .rc-field-embed').length) enableDropdownAutocomplete(); 36 | 37 | // Hide or disable fields if using special annotation 38 | triggerActionTags(); 39 | 40 | // Set autocomplete for BioPortal ontology search for ALL fields on a page 41 | initAllWebServiceAutoSuggest(); 42 | 43 | // Make sure dropdowns don't get too wide so that they create horizontal scrollbar 44 | shrinkWideDropDowns(); 45 | 46 | // Improve onchance event of text/notes fields to trigger branching logic before leaving the field 47 | // (so that we don't skip over the next field, which becomes displayed) 48 | improveBranchingOnchange(); 49 | }catch(e){ } 50 | 51 | // Bubble pop-up for Return Code widget 52 | if ($('.bubbleInfo').length) { 53 | $('.bubbleInfo').each(function () { 54 | var distance = 10; 55 | var time = 250; 56 | var hideDelay = 500; 57 | var hideDelayTimer = null; 58 | var beingShown = false; 59 | var shown = false; 60 | var trigger = $('.trigger', this); 61 | if (!trigger.length) return; 62 | var info = $('.popup', this).css('opacity', 0); 63 | $([trigger.get(0), info.get(0)]).mouseover(function (e) { 64 | if (hideDelayTimer) clearTimeout(hideDelayTimer); 65 | if (beingShown || shown) { 66 | // don't trigger the animation again 67 | return; 68 | } else { 69 | // reset position of info box 70 | beingShown = true; 71 | info.css({ 72 | top: 0, 73 | right: 0, 74 | width: 300, 75 | display: 'block' 76 | }).animate({ 77 | top: '+=' + distance + 'px', 78 | opacity: 1 79 | }, time, 'swing', function() { 80 | beingShown = false; 81 | shown = true; 82 | }); 83 | } 84 | return false; 85 | }).mouseout(function () { 86 | if (hideDelayTimer) clearTimeout(hideDelayTimer); 87 | hideDelayTimer = setTimeout(function () { 88 | hideDelayTimer = null; 89 | info.animate({ 90 | top: '-=' + distance + 'px', 91 | opacity: 0 92 | }, time, 'swing', function () { 93 | shown = false; 94 | info.css('display', 'none'); 95 | }); 96 | 97 | }, hideDelay); 98 | 99 | return false; 100 | }); 101 | }); 102 | } 103 | 104 | // Add ALT text to all images that lack it 105 | $('img').each(function(){ 106 | if (typeof $(this).attr('alt') == "undefined") $(this).attr('alt', ''); 107 | }); 108 | }); 109 | 110 | // Display the Survey Login dialog (login form) 111 | function displaySurveyLoginDialog() { 112 | $('#survey_login_dialog').dialog({ bgiframe: true, modal: true, width: (isMobileDevice ? $(window).width() : 670), open:function(){fitDialog(this);}, 113 | close:function(){ window.location.href=window.location.href; }, 114 | title: ''+langSurveyLoginForm4+'', buttons: [ 115 | { text: langSurveyLoginForm1, click: function () { 116 | // Make sure enough inputs were entered 117 | var numValuesEntered = 0; 118 | $('#survey_auth_form input').each(function(){ 119 | var thisval = trim($(this).val()); 120 | if (thisval != '') numValuesEntered++; 121 | }); 122 | // If not enough values entered, give error message 123 | if (numValuesEntered < survey_auth_min_fields) { 124 | simpleDialog(langSurveyLoginForm2, langSurveyLoginForm3); 125 | return; 126 | } 127 | // Submit form 128 | $('#survey_auth_form').submit(); 129 | } }] }); 130 | // If there are no login fields displayed in the dialog, then remove the "Log In" button 131 | if ($('#survey_auth_form table.form_border tr').length == 0) { 132 | $('#survey_login_dialog').parent().find('div.ui-dialog-buttonpane').hide(); 133 | } 134 | // Add extra style to the "Log In" button 135 | else { 136 | $('#survey_login_dialog').parent().find('div.ui-dialog-buttonpane button').css({'font-weight':'bold','color':'#444','font-size':'15px'}); 137 | } 138 | } 139 | 140 | // Send confirmation message to respondent after they provide their email address 141 | function sendConfirmationEmail(record, s) { 142 | showProgress(1,100); 143 | $.post(dirname(dirname(app_path_webroot))+"/surveys/index.php?s="+s+"&__passthru="+encodeURIComponent("Surveys/email_participant_confirmation.php"),{ record: record, email: $('#confirmation_email_address').val() },function(data){ 144 | showProgress(0,0); 145 | if (data == '0') { 146 | alert(woops); 147 | } else { 148 | simpleDialog(data,null,null,350); 149 | $('#confirmation_email_sent').show(); 150 | } 151 | }); 152 | } 153 | 154 | // Because the survey logo can lag in loading after the page loads, it can dislocate the text-to-speech 155 | // icons of the title and instructions, so reload those icons when logo loads 156 | function reloadSpeakIconsForLogo() { 157 | // If not using text-to-speech, then do nothing 158 | if (typeof texttospeech_js_loaded == 'undefined') return; 159 | // First, remove icons already loaded 160 | $('#surveyinstructions img.spkrplay, #surveytitle img.spkrplay').remove(); 161 | // Now re-add the icons 162 | addSpeakIconsToSurvey(true); 163 | } 164 | 165 | // Using button click, add "speak" icon to all viable elements on the survey page 166 | function addSpeakIconsToSurveyViaBtnClick(enable) { 167 | if (enable == '1') { 168 | if (typeof texttospeech_js_loaded == 'undefined') { 169 | $.loadScript(app_path_webroot+'Resources/js/TextToSpeech.js'); 170 | } else { 171 | addSpeakIconsToSurvey(); 172 | } 173 | $('#enable_text-to-speech').hide(); 174 | $('#disable_text-to-speech').show(); 175 | setCookie('texttospeech','1',365); 176 | } else { 177 | if (typeof texttospeech_js_loaded == 'undefined') { 178 | $.loadScript(app_path_webroot+'Resources/js/TextToSpeech.js'); 179 | } 180 | $('#enable_text-to-speech').show(); 181 | $('#disable_text-to-speech').hide(); 182 | setCookie('texttospeech','0',365); 183 | $('.spkrplay').remove(); 184 | } 185 | } 186 | 187 | // Deal with random IE image sizing issues 188 | function imgSizeIE(ob) { 189 | var w = $(ob).width(); 190 | if (w > 0 && w != 75) $(ob).width(w); 191 | } 192 | 193 | // Checks survey page's URL for any reserved parameters (prevents confliction when using survey pre-filling) 194 | function checkReservedSurveyParams(haystack) { 195 | var hu = window.location.search.substring(1); 196 | var gy = hu.split("&"); 197 | var param, paramVal; 198 | var listRes = new Array(); 199 | var listcount = 0; 200 | for (i=0;i0) { 212 | msg = "NOTICE: You are attempting to pass parameters in the URL that are reserved. " 213 | + "Below are the parameters that you will need to remove from the URL's query string, as they will not be able to pre-fill " 214 | + "survey questions because they are reserved. If you do not know what this means, please contact " 215 | + "your survey administrator.\n\nReserved parameters:\n - " + listRes.join("\n - "); 216 | alert(msg); 217 | }; 218 | } 219 | 220 | // For emailing survey link for participants that wish to return later 221 | function emailReturning(survey_id,event_id,participant_id,hash,email,page,success_body,success_title) { 222 | if (email == '') { 223 | $('#autoEmail').show(); 224 | } else { 225 | $('#autoEmail').hide(); 226 | } 227 | $.get(page, { s: hash, survey_id: survey_id, event_id: event_id, participant_id: participant_id, email: email }, function(data) { 228 | if (data == '0') { 229 | alert(woops); 230 | } else if (data == '2') { 231 | $('#autoEmail').hide(); 232 | $('#provideEmail').show(); 233 | } else if (email != '') { 234 | simpleDialog(success_body+' '+data,success_title); 235 | } 236 | }); 237 | } 238 | 239 | // If user tries to close the page after modifying any values on the data entry form, then stop and prompt user if they really want to leave page 240 | window.onbeforeunload = function() { 241 | // If form values have changed... 242 | if (dataEntryFormValuesChanged) { 243 | var separator = "#########################################\n"; 244 | // Prompt user with confirmation 245 | return separator + langDlgSaveDataTitleCaps + "\n\n" + langDlgSaveDataMsg + "\n" + separator; 246 | } 247 | } 248 | 249 | -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/js/Survey-1609169281.js: -------------------------------------------------------------------------------- 1 | $(function(){ 2 | 3 | // Make section headers into toolbar CSS 4 | $('.header').addClass('toolbar'); 5 | 6 | // Add extra border about main survey container for survey acknowledgement, etc. 7 | if (!$('#questiontable').length) $('#container').css('border','1px solid #ccc'); 8 | 9 | // Remove ability to submit form via Enter button on keyboard 10 | $(':input').keypress(function(e) { 11 | if ((this.type == 'checkbox' || this.type == 'text') && e.which == 13) { 12 | return false; 13 | } 14 | }); 15 | 16 | // Safari hack for large radios/checkboxes 17 | var chrome = navigator.userAgent.indexOf('Chrome') > -1; 18 | var safari = navigator.userAgent.indexOf("Safari") > -1; 19 | if (chrome && safari) safari = false; 20 | // If Safari and large text, increase padding of checkbox/radio (should be done with classes - not style) 21 | if (safari && $('#questiontable input[type="checkbox"]:first, #questiontable input[type="radio"]:first').length) { 22 | if ($('#questiontable input[type="checkbox"]:first, #questiontable input[type="radio"]:first').css('margin').substring(0,3) == '6px') { 23 | $('#questiontable input[type="checkbox"], #questiontable input[type="radio"]').css('margin', '8px'); 24 | } 25 | } 26 | 27 | // Hack to un-truncate long select options: http://stackoverflow.com/a/19734474/1402028 28 | if (isIOS) $("#questiontable select").append(''); 29 | 30 | try{ 31 | // Enable action tags 32 | enableActionTags(); 33 | 34 | // Enable auto-complete for drop-downs (unless Field Embedding is used, and if so, we'll run after doFieldEmbedding()) 35 | if (!$('#questiontable .rc-field-embed').length) enableDropdownAutocomplete(); 36 | 37 | // Hide or disable fields if using special annotation 38 | triggerActionTags(); 39 | 40 | // Set autocomplete for BioPortal ontology search for ALL fields on a page 41 | initAllWebServiceAutoSuggest(); 42 | 43 | // Make sure dropdowns don't get too wide so that they create horizontal scrollbar 44 | shrinkWideDropDowns(); 45 | 46 | // Improve onchance event of text/notes fields to trigger branching logic before leaving the field 47 | // (so that we don't skip over the next field, which becomes displayed) 48 | improveBranchingOnchange(); 49 | }catch(e){ } 50 | 51 | // Bubble pop-up for Return Code widget 52 | if ($('.bubbleInfo').length) { 53 | $('.bubbleInfo').each(function () { 54 | var distance = 10; 55 | var time = 250; 56 | var hideDelay = 500; 57 | var hideDelayTimer = null; 58 | var beingShown = false; 59 | var shown = false; 60 | var trigger = $('.trigger', this); 61 | if (!trigger.length) return; 62 | var info = $('.popup', this).css('opacity', 0); 63 | $([trigger.get(0), info.get(0)]).mouseover(function (e) { 64 | if (hideDelayTimer) clearTimeout(hideDelayTimer); 65 | if (beingShown || shown) { 66 | // don't trigger the animation again 67 | return; 68 | } else { 69 | // reset position of info box 70 | beingShown = true; 71 | info.css({ 72 | top: 0, 73 | right: 0, 74 | width: 300, 75 | display: 'block' 76 | }).animate({ 77 | top: '+=' + distance + 'px', 78 | opacity: 1 79 | }, time, 'swing', function() { 80 | beingShown = false; 81 | shown = true; 82 | }); 83 | } 84 | return false; 85 | }).mouseout(function () { 86 | if (hideDelayTimer) clearTimeout(hideDelayTimer); 87 | hideDelayTimer = setTimeout(function () { 88 | hideDelayTimer = null; 89 | info.animate({ 90 | top: '-=' + distance + 'px', 91 | opacity: 0 92 | }, time, 'swing', function () { 93 | shown = false; 94 | info.css('display', 'none'); 95 | }); 96 | 97 | }, hideDelay); 98 | 99 | return false; 100 | }); 101 | }); 102 | } 103 | 104 | // Add ALT text to all images that lack it 105 | $('img').each(function(){ 106 | if (typeof $(this).attr('alt') == "undefined") $(this).attr('alt', ''); 107 | }); 108 | }); 109 | 110 | // Display the Survey Login dialog (login form) 111 | function displaySurveyLoginDialog() { 112 | $('#survey_login_dialog').dialog({ bgiframe: true, modal: true, width: (isMobileDevice ? $(window).width() : 670), open:function(){fitDialog(this);}, 113 | close:function(){ window.location.href=window.location.href; }, 114 | title: ''+langSurveyLoginForm4+'', buttons: [ 115 | { text: langSurveyLoginForm1, click: function () { 116 | // Make sure enough inputs were entered 117 | var numValuesEntered = 0; 118 | $('#survey_auth_form input').each(function(){ 119 | var thisval = trim($(this).val()); 120 | if (thisval != '') numValuesEntered++; 121 | }); 122 | // If not enough values entered, give error message 123 | if (numValuesEntered < survey_auth_min_fields) { 124 | simpleDialog(langSurveyLoginForm2, langSurveyLoginForm3); 125 | return; 126 | } 127 | // Submit form 128 | $('#survey_auth_form').submit(); 129 | } }] }); 130 | // If there are no login fields displayed in the dialog, then remove the "Log In" button 131 | if ($('#survey_auth_form table.form_border tr').length == 0) { 132 | $('#survey_login_dialog').parent().find('div.ui-dialog-buttonpane').hide(); 133 | } 134 | // Add extra style to the "Log In" button 135 | else { 136 | $('#survey_login_dialog').parent().find('div.ui-dialog-buttonpane button').css({'font-weight':'bold','color':'#444','font-size':'15px'}); 137 | } 138 | } 139 | 140 | // Send confirmation message to respondent after they provide their email address 141 | function sendConfirmationEmail(record, s) { 142 | showProgress(1,100); 143 | $.post(dirname(dirname(app_path_webroot))+"/surveys/index.php?s="+s+"&__passthru="+encodeURIComponent("Surveys/email_participant_confirmation.php"),{ record: record, email: $('#confirmation_email_address').val() },function(data){ 144 | showProgress(0,0); 145 | if (data == '0') { 146 | alert(woops); 147 | } else { 148 | simpleDialog(data,null,null,350); 149 | $('#confirmation_email_sent').show(); 150 | } 151 | }); 152 | } 153 | 154 | // Because the survey logo can lag in loading after the page loads, it can dislocate the text-to-speech 155 | // icons of the title and instructions, so reload those icons when logo loads 156 | function reloadSpeakIconsForLogo() { 157 | // If not using text-to-speech, then do nothing 158 | if (typeof texttospeech_js_loaded == 'undefined') return; 159 | // First, remove icons already loaded 160 | $('#surveyinstructions img.spkrplay, #surveytitle img.spkrplay').remove(); 161 | // Now re-add the icons 162 | addSpeakIconsToSurvey(true); 163 | } 164 | 165 | // Using button click, add "speak" icon to all viable elements on the survey page 166 | function addSpeakIconsToSurveyViaBtnClick(enable) { 167 | if (enable == '1') { 168 | if (typeof texttospeech_js_loaded == 'undefined') { 169 | $.loadScript(app_path_webroot+'Resources/js/TextToSpeech.js'); 170 | } else { 171 | addSpeakIconsToSurvey(); 172 | } 173 | $('#enable_text-to-speech').hide(); 174 | $('#disable_text-to-speech').show(); 175 | setCookie('texttospeech','1',365); 176 | } else { 177 | if (typeof texttospeech_js_loaded == 'undefined') { 178 | $.loadScript(app_path_webroot+'Resources/js/TextToSpeech.js'); 179 | } 180 | $('#enable_text-to-speech').show(); 181 | $('#disable_text-to-speech').hide(); 182 | setCookie('texttospeech','0',365); 183 | $('.spkrplay').remove(); 184 | } 185 | } 186 | 187 | // Deal with random IE image sizing issues 188 | function imgSizeIE(ob) { 189 | var w = $(ob).width(); 190 | if (w > 0 && w != 75) $(ob).width(w); 191 | } 192 | 193 | // Checks survey page's URL for any reserved parameters (prevents confliction when using survey pre-filling) 194 | function checkReservedSurveyParams(haystack) { 195 | var hu = window.location.search.substring(1); 196 | var gy = hu.split("&"); 197 | var param, paramVal; 198 | var listRes = new Array(); 199 | var listcount = 0; 200 | for (i=0;i0) { 212 | msg = "NOTICE: You are attempting to pass parameters in the URL that are reserved. " 213 | + "Below are the parameters that you will need to remove from the URL's query string, as they will not be able to pre-fill " 214 | + "survey questions because they are reserved. If you do not know what this means, please contact " 215 | + "your survey administrator.\n\nReserved parameters:\n - " + listRes.join("\n - "); 216 | alert(msg); 217 | }; 218 | } 219 | 220 | // For emailing survey link for participants that wish to return later 221 | function emailReturning(survey_id,event_id,participant_id,hash,email,page,success_body,success_title) { 222 | if (email == '') { 223 | $('#autoEmail').show(); 224 | } else { 225 | $('#autoEmail').hide(); 226 | } 227 | $.get(page, { s: hash, survey_id: survey_id, event_id: event_id, participant_id: participant_id, email: email }, function(data) { 228 | if (data == '0') { 229 | alert(woops); 230 | } else if (data == '2') { 231 | $('#autoEmail').hide(); 232 | $('#provideEmail').show(); 233 | } else if (email != '') { 234 | simpleDialog(success_body+' '+data,success_title); 235 | } 236 | }); 237 | } 238 | 239 | // If user tries to close the page after modifying any values on the data entry form, then stop and prompt user if they really want to leave page 240 | window.onbeforeunload = function() { 241 | // If form values have changed... 242 | if (dataEntryFormValuesChanged) { 243 | var separator = "#########################################\n"; 244 | // Prompt user with confirmation 245 | return separator + langDlgSaveDataTitleCaps + "\n\n" + langDlgSaveDataMsg + "\n" + separator; 246 | } 247 | } 248 | 249 | -------------------------------------------------------------------------------- /code/geoPosition.js: -------------------------------------------------------------------------------- 1 | // 2 | // javascript-mobile-desktop-geolocation 3 | // https://github.com/estebanav/javascript-mobile-desktop-geolocation 4 | // 5 | // Copyright J. Esteban Acosta Villafañe 6 | // Licensed under the MIT licenses. 7 | // 8 | // Based on Stan Wiechers > geo-location-javascript v0.4.8 > http://code.google.com/p/geo-location-javascript/ 9 | // 10 | // Revision: $Rev: 01 $: 11 | // Author: $Author: estebanav $: 12 | // Date: $Date: 2012-09-07 23:03:53 -0300 (Fri, 07 Sep 2012) $: 13 | 14 | var bb = { 15 | success: 0, 16 | error: 0, 17 | blackberryTimeoutId : -1 18 | }; 19 | 20 | function handleBlackBerryLocationTimeout() 21 | { 22 | if(bb.blackberryTimeoutId!=-1) { 23 | bb.error({ message: "Timeout error", 24 | code: 3 25 | }); 26 | } 27 | } 28 | function handleBlackBerryLocation() 29 | { 30 | clearTimeout(bb.blackberryTimeoutId); 31 | bb.blackberryTimeoutId=-1; 32 | if (bb.success && bb.error) { 33 | if(blackberry.location.latitude==0 && blackberry.location.longitude==0) { 34 | //http://dev.w3.org/geo/api/spec-source.html#position_unavailable_error 35 | //POSITION_UNAVAILABLE (numeric value 2) 36 | bb.error({message:"Position unavailable", code:2}); 37 | } 38 | else 39 | { 40 | var timestamp=null; 41 | //only available with 4.6 and later 42 | //http://na.blackberry.com/eng/deliverables/8861/blackberry_location_568404_11.jsp 43 | if (blackberry.location.timestamp) 44 | { 45 | timestamp = new Date( blackberry.location.timestamp ); 46 | } 47 | bb.success( { timestamp: timestamp , 48 | coords: { 49 | latitude: blackberry.location.latitude, 50 | longitude: blackberry.location.longitude 51 | } 52 | }); 53 | } 54 | //since blackberry.location.removeLocationUpdate(); 55 | //is not working as described http://na.blackberry.com/eng/deliverables/8861/blackberry_location_removeLocationUpdate_568409_11.jsp 56 | //the callback are set to null to indicate that the job is done 57 | 58 | bb.success = null; 59 | bb.error = null; 60 | } 61 | } 62 | 63 | var geoPosition=function() { 64 | 65 | var pub = {}; 66 | var provider=null; 67 | var u="undefined"; 68 | var ipGeolocationSrv = 'http://freegeoip.net/json/?callback=JSONPCallback'; 69 | 70 | pub.getCurrentPosition = function(success,error,opts) 71 | { 72 | provider.getCurrentPosition(success, error,opts); 73 | } 74 | 75 | pub.jsonp = { 76 | callbackCounter: 0, 77 | 78 | fetch: function(url, callback) { 79 | var fn = 'JSONPCallback_' + this.callbackCounter++; 80 | window[fn] = this.evalJSONP(callback); 81 | url = url.replace('=JSONPCallback', '=' + fn); 82 | 83 | var scriptTag = document.createElement('SCRIPT'); 84 | scriptTag.src = url; 85 | document.getElementsByTagName('HEAD')[0].appendChild(scriptTag); 86 | }, 87 | 88 | evalJSONP: function(callback) { 89 | return function(data) { 90 | callback(data); 91 | } 92 | } 93 | }; 94 | 95 | pub.confirmation = function() 96 | { 97 | return confirm('This Webpage wants to track your physical location.\nDo you allow it?'); 98 | }; 99 | 100 | pub.init = function() 101 | { 102 | try 103 | { 104 | var hasGeolocation = typeof(navigator.geolocation)!=u; 105 | if( !hasGeolocation ){ 106 | if( !pub.confirmation() ){ 107 | return false; 108 | } 109 | } 110 | 111 | if ( ( typeof(geoPositionSimulator)!=u ) && (geoPositionSimulator.length > 0 ) ){ 112 | provider=geoPositionSimulator; 113 | } else if (typeof(bondi)!=u && typeof(bondi.geolocation)!=u ) { 114 | provider=bondi.geolocation; 115 | } else if ( hasGeolocation ) { 116 | provider=navigator.geolocation; 117 | pub.getCurrentPosition = function(success, error, opts) { 118 | function _success(p) { 119 | //for mozilla geode,it returns the coordinates slightly differently 120 | var params; 121 | if(typeof(p.latitude)!=u) { 122 | params = { 123 | timestamp: p.timestamp, 124 | coords: { 125 | latitude: p.latitude, 126 | longitude: p.longitude 127 | } 128 | }; 129 | } else { 130 | params = p; 131 | } 132 | success( params ); 133 | } 134 | provider.getCurrentPosition(_success,error,opts); 135 | } 136 | } else if(typeof(window.blackberry)!=u && blackberry.location.GPSSupported) { 137 | // set to autonomous mode 138 | if(typeof(blackberry.location.setAidMode)==u) { 139 | return false; 140 | } 141 | blackberry.location.setAidMode(2); 142 | //override default method implementation 143 | pub.getCurrentPosition = function(success,error,opts) 144 | { 145 | //passing over callbacks as parameter didn't work consistently 146 | //in the onLocationUpdate method, thats why they have to be set outside 147 | bb.success = success; 148 | bb.error = error; 149 | //function needs to be a string according to 150 | //http://www.tonybunce.com/2008/05/08/Blackberry-Browser-Amp-GPS.aspx 151 | if(opts['timeout']) { 152 | bb.blackberryTimeoutId = setTimeout("handleBlackBerryLocationTimeout()",opts['timeout']); 153 | } else { 154 | //default timeout when none is given to prevent a hanging script 155 | bb.blackberryTimeoutId = setTimeout("handleBlackBerryLocationTimeout()",60000); 156 | } 157 | blackberry.location.onLocationUpdate("handleBlackBerryLocation()"); 158 | blackberry.location.refreshLocation(); 159 | } 160 | provider = blackberry.location; 161 | 162 | } else if ( typeof(Mojo) !=u && typeof(Mojo.Service.Request)!="Mojo.Service.Request") { 163 | provider = true; 164 | pub.getCurrentPosition = function(success, error, opts) { 165 | parameters = {}; 166 | if( opts ) { 167 | //http://developer.palm.com/index.php?option=com_content&view=article&id=1673#GPS-getCurrentPosition 168 | if (opts.enableHighAccuracy && opts.enableHighAccuracy == true ){ 169 | parameters.accuracy = 1; 170 | } 171 | if ( opts.maximumAge ) { 172 | parameters.maximumAge = opts.maximumAge; 173 | } 174 | if (opts.responseTime) { 175 | if( opts.responseTime < 5 ) { 176 | parameters.responseTime = 1; 177 | } else if ( opts.responseTime < 20 ) { 178 | parameters.responseTime = 2; 179 | } else { 180 | parameters.timeout = 3; 181 | } 182 | } 183 | } 184 | 185 | r = new Mojo.Service.Request( 'palm://com.palm.location' , { 186 | method:"getCurrentPosition", 187 | parameters:parameters, 188 | onSuccess: function( p ){ 189 | success( { timestamp: p.timestamp, 190 | coords: { 191 | latitude: p.latitude, 192 | longitude: p.longitude, 193 | heading: p.heading 194 | } 195 | }); 196 | }, 197 | onFailure: function( e ){ 198 | if (e.errorCode==1) { 199 | error({ code: 3, 200 | message: "Timeout" 201 | }); 202 | } else if (e.errorCode==2){ 203 | error({ code: 2, 204 | message: "Position unavailable" 205 | }); 206 | } else { 207 | error({ code: 0, 208 | message: "Unknown Error: webOS-code" + errorCode 209 | }); 210 | } 211 | } 212 | }); 213 | } 214 | 215 | } 216 | else if (typeof(device)!=u && typeof(device.getServiceObject)!=u) { 217 | provider=device.getServiceObject("Service.Location", "ILocation"); 218 | 219 | //override default method implementation 220 | pub.getCurrentPosition = function(success, error, opts){ 221 | function callback(transId, eventCode, result) { 222 | if (eventCode == 4) { 223 | error({message:"Position unavailable", code:2}); 224 | } else { 225 | //no timestamp of location given? 226 | success( { timestamp:null, 227 | coords: { 228 | latitude: result.ReturnValue.Latitude, 229 | longitude: result.ReturnValue.Longitude, 230 | altitude: result.ReturnValue.Altitude, 231 | heading: result.ReturnValue.Heading } 232 | }); 233 | } 234 | } 235 | //location criteria 236 | 237 | var criteria = new Object(); 238 | criteria.LocationInformationClass = "BasicLocationInformation"; 239 | //make the call 240 | provider.ILocation.GetLocation(criteria,callback); 241 | } 242 | } else { 243 | pub.getCurrentPosition = function(success, error, opts) { 244 | pub.jsonp.fetch(ipGeolocationSrv, 245 | function( p ){ success( { timestamp: p.timestamp, 246 | coords: { 247 | latitude: p.latitude, 248 | longitude: p.longitude, 249 | heading: p.heading 250 | } 251 | });}); 252 | } 253 | provider = true; 254 | } 255 | } 256 | catch (e){ 257 | if( typeof(console) != u ) console.log(e); 258 | return false; 259 | } 260 | return provider!=null; 261 | } 262 | return pub; 263 | }(); 264 | -------------------------------------------------------------------------------- /site/redcap_v10.4.1/Resources/js/Libraries/geoPosition-1609169281.js: -------------------------------------------------------------------------------- 1 | // 2 | // javascript-mobile-desktop-geolocation 3 | // https://github.com/estebanav/javascript-mobile-desktop-geolocation 4 | // 5 | // Copyright J. Esteban Acosta Villafañe 6 | // Licensed under the MIT licenses. 7 | // 8 | // Based on Stan Wiechers > geo-location-javascript v0.4.8 > http://code.google.com/p/geo-location-javascript/ 9 | // 10 | // Revision: $Rev: 01 $: 11 | // Author: $Author: estebanav $: 12 | // Date: $Date: 2012-09-07 23:03:53 -0300 (Fri, 07 Sep 2012) $: 13 | 14 | var bb = { 15 | success: 0, 16 | error: 0, 17 | blackberryTimeoutId : -1 18 | }; 19 | 20 | function handleBlackBerryLocationTimeout() 21 | { 22 | if(bb.blackberryTimeoutId!=-1) { 23 | bb.error({ message: "Timeout error", 24 | code: 3 25 | }); 26 | } 27 | } 28 | function handleBlackBerryLocation() 29 | { 30 | clearTimeout(bb.blackberryTimeoutId); 31 | bb.blackberryTimeoutId=-1; 32 | if (bb.success && bb.error) { 33 | if(blackberry.location.latitude==0 && blackberry.location.longitude==0) { 34 | //http://dev.w3.org/geo/api/spec-source.html#position_unavailable_error 35 | //POSITION_UNAVAILABLE (numeric value 2) 36 | bb.error({message:"Position unavailable", code:2}); 37 | } 38 | else 39 | { 40 | var timestamp=null; 41 | //only available with 4.6 and later 42 | //http://na.blackberry.com/eng/deliverables/8861/blackberry_location_568404_11.jsp 43 | if (blackberry.location.timestamp) 44 | { 45 | timestamp = new Date( blackberry.location.timestamp ); 46 | } 47 | bb.success( { timestamp: timestamp , 48 | coords: { 49 | latitude: blackberry.location.latitude, 50 | longitude: blackberry.location.longitude 51 | } 52 | }); 53 | } 54 | //since blackberry.location.removeLocationUpdate(); 55 | //is not working as described http://na.blackberry.com/eng/deliverables/8861/blackberry_location_removeLocationUpdate_568409_11.jsp 56 | //the callback are set to null to indicate that the job is done 57 | 58 | bb.success = null; 59 | bb.error = null; 60 | } 61 | } 62 | 63 | var geoPosition=function() { 64 | 65 | var pub = {}; 66 | var provider=null; 67 | var u="undefined"; 68 | var ipGeolocationSrv = 'http://freegeoip.net/json/?callback=JSONPCallback'; 69 | 70 | pub.getCurrentPosition = function(success,error,opts) 71 | { 72 | provider.getCurrentPosition(success, error,opts); 73 | } 74 | 75 | pub.jsonp = { 76 | callbackCounter: 0, 77 | 78 | fetch: function(url, callback) { 79 | var fn = 'JSONPCallback_' + this.callbackCounter++; 80 | window[fn] = this.evalJSONP(callback); 81 | url = url.replace('=JSONPCallback', '=' + fn); 82 | 83 | var scriptTag = document.createElement('SCRIPT'); 84 | scriptTag.src = url; 85 | document.getElementsByTagName('HEAD')[0].appendChild(scriptTag); 86 | }, 87 | 88 | evalJSONP: function(callback) { 89 | return function(data) { 90 | callback(data); 91 | } 92 | } 93 | }; 94 | 95 | pub.confirmation = function() 96 | { 97 | return confirm('This Webpage wants to track your physical location.\nDo you allow it?'); 98 | }; 99 | 100 | pub.init = function() 101 | { 102 | try 103 | { 104 | var hasGeolocation = typeof(navigator.geolocation)!=u; 105 | if( !hasGeolocation ){ 106 | if( !pub.confirmation() ){ 107 | return false; 108 | } 109 | } 110 | 111 | if ( ( typeof(geoPositionSimulator)!=u ) && (geoPositionSimulator.length > 0 ) ){ 112 | provider=geoPositionSimulator; 113 | } else if (typeof(bondi)!=u && typeof(bondi.geolocation)!=u ) { 114 | provider=bondi.geolocation; 115 | } else if ( hasGeolocation ) { 116 | provider=navigator.geolocation; 117 | pub.getCurrentPosition = function(success, error, opts) { 118 | function _success(p) { 119 | //for mozilla geode,it returns the coordinates slightly differently 120 | var params; 121 | if(typeof(p.latitude)!=u) { 122 | params = { 123 | timestamp: p.timestamp, 124 | coords: { 125 | latitude: p.latitude, 126 | longitude: p.longitude 127 | } 128 | }; 129 | } else { 130 | params = p; 131 | } 132 | success( params ); 133 | } 134 | provider.getCurrentPosition(_success,error,opts); 135 | } 136 | } else if(typeof(window.blackberry)!=u && blackberry.location.GPSSupported) { 137 | // set to autonomous mode 138 | if(typeof(blackberry.location.setAidMode)==u) { 139 | return false; 140 | } 141 | blackberry.location.setAidMode(2); 142 | //override default method implementation 143 | pub.getCurrentPosition = function(success,error,opts) 144 | { 145 | //passing over callbacks as parameter didn't work consistently 146 | //in the onLocationUpdate method, thats why they have to be set outside 147 | bb.success = success; 148 | bb.error = error; 149 | //function needs to be a string according to 150 | //http://www.tonybunce.com/2008/05/08/Blackberry-Browser-Amp-GPS.aspx 151 | if(opts['timeout']) { 152 | bb.blackberryTimeoutId = setTimeout("handleBlackBerryLocationTimeout()",opts['timeout']); 153 | } else { 154 | //default timeout when none is given to prevent a hanging script 155 | bb.blackberryTimeoutId = setTimeout("handleBlackBerryLocationTimeout()",60000); 156 | } 157 | blackberry.location.onLocationUpdate("handleBlackBerryLocation()"); 158 | blackberry.location.refreshLocation(); 159 | } 160 | provider = blackberry.location; 161 | 162 | } else if ( typeof(Mojo) !=u && typeof(Mojo.Service.Request)!="Mojo.Service.Request") { 163 | provider = true; 164 | pub.getCurrentPosition = function(success, error, opts) { 165 | parameters = {}; 166 | if( opts ) { 167 | //http://developer.palm.com/index.php?option=com_content&view=article&id=1673#GPS-getCurrentPosition 168 | if (opts.enableHighAccuracy && opts.enableHighAccuracy == true ){ 169 | parameters.accuracy = 1; 170 | } 171 | if ( opts.maximumAge ) { 172 | parameters.maximumAge = opts.maximumAge; 173 | } 174 | if (opts.responseTime) { 175 | if( opts.responseTime < 5 ) { 176 | parameters.responseTime = 1; 177 | } else if ( opts.responseTime < 20 ) { 178 | parameters.responseTime = 2; 179 | } else { 180 | parameters.timeout = 3; 181 | } 182 | } 183 | } 184 | 185 | r = new Mojo.Service.Request( 'palm://com.palm.location' , { 186 | method:"getCurrentPosition", 187 | parameters:parameters, 188 | onSuccess: function( p ){ 189 | success( { timestamp: p.timestamp, 190 | coords: { 191 | latitude: p.latitude, 192 | longitude: p.longitude, 193 | heading: p.heading 194 | } 195 | }); 196 | }, 197 | onFailure: function( e ){ 198 | if (e.errorCode==1) { 199 | error({ code: 3, 200 | message: "Timeout" 201 | }); 202 | } else if (e.errorCode==2){ 203 | error({ code: 2, 204 | message: "Position unavailable" 205 | }); 206 | } else { 207 | error({ code: 0, 208 | message: "Unknown Error: webOS-code" + errorCode 209 | }); 210 | } 211 | } 212 | }); 213 | } 214 | 215 | } 216 | else if (typeof(device)!=u && typeof(device.getServiceObject)!=u) { 217 | provider=device.getServiceObject("Service.Location", "ILocation"); 218 | 219 | //override default method implementation 220 | pub.getCurrentPosition = function(success, error, opts){ 221 | function callback(transId, eventCode, result) { 222 | if (eventCode == 4) { 223 | error({message:"Position unavailable", code:2}); 224 | } else { 225 | //no timestamp of location given? 226 | success( { timestamp:null, 227 | coords: { 228 | latitude: result.ReturnValue.Latitude, 229 | longitude: result.ReturnValue.Longitude, 230 | altitude: result.ReturnValue.Altitude, 231 | heading: result.ReturnValue.Heading } 232 | }); 233 | } 234 | } 235 | //location criteria 236 | 237 | var criteria = new Object(); 238 | criteria.LocationInformationClass = "BasicLocationInformation"; 239 | //make the call 240 | provider.ILocation.GetLocation(criteria,callback); 241 | } 242 | } else { 243 | pub.getCurrentPosition = function(success, error, opts) { 244 | pub.jsonp.fetch(ipGeolocationSrv, 245 | function( p ){ success( { timestamp: p.timestamp, 246 | coords: { 247 | latitude: p.latitude, 248 | longitude: p.longitude, 249 | heading: p.heading 250 | } 251 | });}); 252 | } 253 | provider = true; 254 | } 255 | } 256 | catch (e){ 257 | if( typeof(console) != u ) console.log(e); 258 | return false; 259 | } 260 | return provider!=null; 261 | } 262 | return pub; 263 | }(); 264 | -------------------------------------------------------------------------------- /code/shazam.js: -------------------------------------------------------------------------------- 1 | // SHAZAM JS FILE USED FOR BOTH CONFIG AND ACTUAL ADMINISTRATION OF SHAZAM INSTRUMENTS 2 | var Shazam = Shazam || {}; 3 | 4 | 5 | // These counters are for when we need to delay transformation for dropdown auto-complete fields 6 | Shazam.maxTransformDelays = 5; 7 | Shazam.transformDelays = 0; 8 | Shazam.showDuration = Shazam.showDuration || 0; 9 | Shazam.hideDuration = Shazam.hideDuration || 0; 10 | 11 | // This is a callback that can be registered that you can call before Shazam displays the page 12 | Shazam.beforeDisplayCallback = Shazam.beforeDisplayCallback || null; 13 | 14 | 15 | 16 | /** 17 | * A utility function for highlighting fields in the data dictionary view 18 | */ 19 | Shazam.highlightFields = function() { 20 | Shazam.log("Highlight Fields"); 21 | $(Shazam.fields).each( function(i,e){ 22 | var tr = $('tr[sq_id="' + e + '"]'); 23 | if (tr.length) { 24 | var icon_div = $('.frmedit_icons', tr); 25 | var label = $('Shazam') 26 | .addClass("badge badge-info shazam-label") 27 | .attr("data-toggle", "tooltip") 28 | .attr("title", "The content of this field is generated by the Shazam External Module") 29 | .on('click', function() { 30 | event.stopPropagation(); 31 | }) 32 | .appendTo(icon_div); 33 | Shazam.log("Highlight Fields", e); 34 | } 35 | }); 36 | }; 37 | 38 | 39 | /** 40 | * A Logging wrapper to handle old IE versions 41 | */ 42 | Shazam.log = function() { 43 | 44 | if (!Shazam.isDev) return false; 45 | 46 | // Make console logging more resilient to Redmond 47 | try { 48 | console.log.apply(this,arguments); 49 | } catch(err) { 50 | // Error trying to apply logs to console (problem with IE11) 51 | try { 52 | console.log(arguments); 53 | 54 | } catch (err2) { 55 | // Can't even do that! Argh - no logging 56 | // var d = $('
').html(JSON.stringify(err)).appendTo($('body')); 57 | } 58 | } 59 | 60 | // } 61 | }; 62 | 63 | 64 | /** 65 | * Transform the page according to Shazam 66 | */ 67 | Shazam.Transform = function() { 68 | 69 | // Skip Shazam if some other module has set the 'DisableTransform' property to true... 70 | if (Shazam.DisableTransform) { 71 | // Turn the form back on as the EM turns it off on page load 72 | $('#form').animate({opacity: 1}, 250); 73 | return; 74 | } 75 | 76 | 77 | // Check if we need to delay execution for autocomplete dropdowns to be handled first... 78 | var ac_dropdowns = $('input.rc-autocomplete').length; 79 | var ac_dropdowns_processed = $('input.rc-autocomplete.ui-autocomplete-input').length; 80 | if (ac_dropdowns > ac_dropdowns_processed) { 81 | if (Shazam.transformDelays < Shazam.maxTransformDelays) { 82 | setTimeout(function () { 83 | Shazam.Transform() 84 | }, 5); 85 | 86 | // Increment number of processing delays 87 | Shazam.transformDelays ++; 88 | Shazam.log("Delaying Shazam (#" + Shazam.transformDelays + ") - waiting for autocomplete dropdowns to be processed..."); 89 | return; 90 | } else { 91 | Shazam.log ("Only " + ac_dropdowns_processed + " of " + ac_dropdowns + " autocomplete dropdowns processed after " + Shazam.transformDelays + " shazam transform delays. Moving forward anyhow but all autodropdowns may not work"); 92 | } 93 | } 94 | 95 | Shazam.log("Starting to Transform"); 96 | 97 | 98 | $(Shazam.params).each(function(i, obj) { 99 | var field_name = obj.field_name; 100 | var html_content = obj.html; 101 | 102 | // Get parent tr for destination field 103 | var shazam_target_tr = $('tr[sq_id="' + field_name + '"]'); 104 | 105 | // // Add shazam-row class to tr (not sure why this was done...) 106 | // $(shazam_target_tr).addClass('shazam-row'); 107 | 108 | // Get the last td in the descriptive tr to inject the Shazam HTML code 109 | var shazam_target = $('td:last-child', shazam_target_tr); 110 | Shazam.log(field_name + " is Shazam target", shazam_target); 111 | 112 | // Set the html according to the parameters 113 | $(shazam_target).html(html_content); 114 | 115 | // Loop through HTML content and substitute in native page content 116 | $('.shazam', shazam_target).each(function () { 117 | 118 | // Shazam.log("Shazam Insert:",this); 119 | var nodeValue = trim($(this).text()); // The text inside the node 120 | var matches = nodeValue.split(':'); // Parse if there is a ":" delimiter 121 | var search_field = matches[0]; // field_name 122 | var search_option = matches[1]; // label is only supported option now 123 | Shazam.log(field_name, search_field, search_option, nodeValue); 124 | 125 | // Find the 'real tr' for the field to be relocated 126 | var source_tr = $("tr[sq_id='" + search_field + "']"); 127 | 128 | // Make sure field is present on page 129 | if (source_tr.length === 0) { 130 | Shazam.log(field_name + ": Unable to find shazam-specified field " + search_field); 131 | return; 132 | } 133 | 134 | // Okay - this is the harder part. REDCap doesn't have any defined classes that 135 | // make it easy to parse out the various parts of a question, so we have to deal 136 | // with all the possiblities... 137 | // 138 | // label 139 | // input(s) 140 | // and potentially the 'icons' 141 | // 142 | // I just created a test project with a bunch of combinations to try and make this better 143 | 144 | var label; 145 | var data; 146 | 147 | // Look for non-Matrix groups 148 | 149 | // WE CAN DETERMINE IF THE ROW IS LEFT OR RIGHT BASED ON COLSPAN OF TDS 150 | var align; 151 | 152 | if (Shazam.isSurvey) { 153 | align = (source_tr.children('td').length === 2) ? "left": "right"; 154 | } else { 155 | align = (source_tr.children('td').length === 1) ? "left": "right"; 156 | } 157 | 158 | Shazam.log(search_field + " alignment: " + align, "td count: " + source_tr.children('td').length); 159 | 160 | // Check to see if we need to parse the label 161 | if (search_option === 'label') { 162 | Shazam.log(search_field + " Label Search in tr", source_tr); 163 | 164 | var source_label; 165 | if (source_tr.attr('mtxgrp')) { 166 | Shazam.log(search_field + " is a MATRIX"); 167 | var label_e; 168 | // For a matrix, the label is in the second 169 | if (Shazam.isSurvey) { 170 | label_e = source_tr.find('table:first').find('td:first').find('label'); 171 | } else { 172 | label_e = source_tr.find('table:first').find('td:first').find('label').find('td:first'); 173 | } 174 | if (label_e.length) source_label = label_e.html().trim(); 175 | } else { 176 | 177 | // Not a matrix 178 | if (Shazam.isSurvey && source_tr.find('td').not('.questionnum').find('label').length > 0) { 179 | Shazam.log(search_field + ' Label1'); 180 | source_label = source_tr.find('td').not('.questionnum').find('label').html().trim(); 181 | } else if ($('table[role="presentation"]', source_tr).find('td:first-child').length > 0) { 182 | Shazam.log(search_field + ' Label2'); 183 | source_label = $('table[role="presentation"]', source_tr).find('td:first-child').html().trim(); 184 | } else if (align === "left" && source_tr.children('td').not('.questionnum').length === 1) { 185 | // } else if (align === "left" && source_tr.children('td').length === 1) { 186 | Shazam.log(search_field + ' Label3'); 187 | // descriptive text field trs have exactly one immediate child td 188 | // (which may contain other tables with tds) 189 | source_label = source_tr.find('td').not('.questionnum').first().html().trim(); 190 | } else if ($('.sldrparent', source_tr).length > 0) { 191 | Shazam.log(search_field + ' Label3'); 192 | // Is a slider 193 | source_label = source_tr.find('label:first').html(); 194 | } else if ($("#label-" + search_field + " td:first").length > 0) { 195 | Shazam.log(search_field + ' Label4'); 196 | source_label = $("#label-" + search_field + " td:first").html().trim(); 197 | } else { 198 | Shazam.log(search_field + ' Label5'); 199 | // Last resort - set label to field 200 | source_label = $("#label-" + search_field).html(); 201 | } 202 | Shazam.log(search_field + " Source Label", source_label); 203 | } 204 | 205 | // COPY label to the shazam cell 206 | // $(this).html(source_label.clone()).addClass('shazam_label'); 207 | $(this).html(source_label).addClass('shazam_label'); 208 | 209 | } else { 210 | // PROCESS DATA (not doing a special option 211 | 212 | var source_data; 213 | 214 | if (source_tr.attr('mtxgrp')) { 215 | Shazam.log(search_field + " is a MATRIX"); 216 | var header_table = $('#' + source_tr.attr('mtxgrp') + '-mtxhdr-tr').find('table:first').clone(); 217 | header_table.find('td:first').remove(); 218 | var data_table = source_tr.find('table:first').clone(); 219 | data_table.find('td:first').remove(); 220 | 221 | source_data = $("
").append(header_table).append(data_table); 222 | // source_data = data_table; 223 | } else if (align === "right") { 224 | // Vanilla- take the td.data 225 | source_data = $("td.data", source_tr).children(); 226 | Shazam.log(search_field + " AlignRight - using td.data", source_tr); 227 | } else if ($('a.fileuploadlink', source_tr).length > 0) { 228 | Shazam.log(search_field + " FileUpload"); 229 | // This is a file upload field which needs an exception 230 | source_data = source_tr.find("td").not('questionnum').find('label').nextAll(); 231 | } else { 232 | Shazam.log(search_field + " LeftCatchAll"); 233 | 234 | // This rule handles the majority of left-aligned fields 235 | // Take everything after the div.space separator 236 | source_data = source_tr.find("td").not('questionnum').find("div.space").nextAll(); 237 | 238 | // source_data = source_tr.find("td:first").find("div.space").nextAll(); 239 | } 240 | 241 | 242 | // If we still didn't find anything - then lets log an error and continue 243 | if (!source_data.length) { 244 | Shazam.log(field_name + " ERROR finding td for " + search_field + " in shazam config"); 245 | return true; 246 | } 247 | 248 | // Adjust width of some non-hidden inputs 249 | $("input[type!='hidden']", source_data.parent()).each(function (i, e) { 250 | Shazam.log(search_field + " non-hidden inputs", i, e); 251 | var type = $(e).prop('type'); 252 | 253 | // Left aligned stuff has a rci-left class... going to leave it for now. 254 | if ($(e).hasClass("rci-left")) $(e).removeClass('rci-left').addClass('rci-left-shazam'); 255 | 256 | // TODO: NOT SURE IF THIS IS REALLY NEEDED STILL 257 | // if (type == 'text' && $(this).css('width') != '0px') $(this).css({'width': ''});//,'max-width':'90%'}); 258 | 259 | if (type === 'textarea') $(this).css('width', '95%'); 260 | }); 261 | 262 | 263 | // Move reset buttons to left 264 | var r = $("a", source_data).filter(function (index) { 265 | return $(this).text() === "reset"; 266 | }).parent().css('text-align', 'left'); 267 | 268 | 269 | 270 | // Add Data History & Field Comment Log/Data Resolution Workflow icons -- doesn't work for matrix! 271 | if (Shazam.isSurvey === false && (Shazam.displayIcons === true || $(this).hasClass('shazam-icons'))) { 272 | // Place the icons into a span tag so you can do CSS to control their wrapping 273 | Shazam.log(search_field + " Adding DisplayIcons!", source_tr); 274 | 275 | var trp; 276 | 277 | if (source_tr.attr('mtxgrp')) { 278 | trp = $('table[role="presentation"]:last', source_tr) 279 | } else if (source_tr.hasClass('sliderlabels')) { 280 | Shazam.log(search_field + " skipping Slider Icons"); 281 | } else { 282 | // This new version only supports the presentation table wrapper! 283 | trp = $('table[role="presentation"]:first', source_tr); 284 | } 285 | 286 | if (trp.length) { 287 | // Replace the first TD with the data 288 | trp.find('td:first').html(source_data); 289 | $(this).html(trp); 290 | } 291 | } else { 292 | // Move Contents of source to shazam cell 293 | Shazam.log(search_field + " moving data into " + field_name, source_data); 294 | $(this).html(source_data); 295 | } 296 | } 297 | 298 | 299 | // Hide the source TRs. (two methods here) 300 | //$(real_tr).css('display','none'); 301 | 302 | if (source_tr.attr('mtxgrp')) { 303 | var mtx_header = $('#' + source_tr.attr('mtxgrp') + '-mtxhdr-tr:visible'); 304 | if (mtx_header.length) { 305 | Shazam.log("HIDING MATRIX HEADER", mtx_header); 306 | mtx_header.css({"position":"absolute","width":"0px !important","height": "0px !important","opacity":"0"}); 307 | } 308 | } 309 | 310 | $(source_tr).css({"position":"absolute","width":"0px !important","height": "0px !important","opacity":"0"}).addClass('shazam-vanished'); //, "left":"-8000px"}); 311 | }); 312 | 313 | // Look for shazam-mirror-visibility 314 | // This feature allows you to make a DOM element mirror the visibility of another element. 315 | $('td.labelrc *[data-shazam-mirror-visibility]', shazam_target_tr).each(function () { 316 | Shazam.log ('dependent mirror-viz element', this); 317 | 318 | // The 'shazam' element that will be hidden/shown 319 | var mirror_element = this; 320 | 321 | // The redcap field that controls the mirror_element 322 | var mirror_source_field = $(this).data('shazam-mirror-visibility'); 323 | 324 | // Get the 'source' tr 325 | var mirror_source_tr = $("tr[sq_id='" + mirror_source_field + "']"); 326 | 327 | Shazam.log("Checking mirror for " + mirror_source_field); 328 | 329 | // Make sure field is present on page 330 | if (!mirror_source_tr.length) { 331 | Shazam.log("Unable to mirror visibility of field that isn't on this page: " + mirror_source_field); 332 | return true; 333 | } 334 | 335 | // Do an initial sync of the visibilty 336 | if (mirror_source_tr.is(':visible')) { 337 | Shazam.log("Visible"); 338 | $(mirror_element).show(Shazam.showDuration); 339 | } else { 340 | Shazam.log("Invisible"); 341 | $(mirror_element).hide(Shazam.hideDuration); 342 | } 343 | 344 | // Create observer that maintains the sync going forward 345 | var observer = new MutationObserver(function (mutations) { 346 | var target = mutations[0].target; 347 | Shazam.log("MutationObserver", mutations,target); 348 | if ($(target).is(':visible')) { 349 | Shazam.log('showing ', mirror_element); 350 | $(mirror_element).show(Shazam.showDuration); 351 | } else { 352 | Shazam.log('hiding ', mirror_element); 353 | $(mirror_element).hide(Shazam.hideDuration); 354 | } 355 | }); 356 | 357 | // Attach observer to target 358 | var target = $(mirror_source_tr)[0]; 359 | observer.observe(target, { 360 | attributes: true 361 | }); 362 | //Shazam.log ("shazam-mirror-visibility"); 363 | //Shazam.log(this); 364 | }); 365 | 366 | }); 367 | 368 | // If is survey and all questionnum (left column) are empty, then hide them 369 | if (Shazam.isSurvey) { 370 | var allEmpty = true; 371 | 372 | // Kludgy way to look through all the first TDs to see if they have text (e.g. question numbers) 373 | $('td.questionnum').parent().not('.shazam-vanished').find('td.questionnum').each(function(){ 374 | if($(this).text() !== "") { 375 | Shazam.log("this is not empty",this); 376 | allEmpty = false; 377 | } 378 | }); 379 | if (allEmpty) { 380 | Shazam.log("all td.questionnum are empty"); 381 | 382 | // Per issue #18, we do not want to hide questionnum that are in the first header td of a matrix 383 | // https://stackoverflow.com/questions/6784741/how-to-select-an-element-which-parent-is-not-specified-class 384 | // $('.formtbody > tr:not("[mtxgrp]") td.questionnum').hide(); 385 | 386 | // Handle non-matrix groups 387 | $('.formtbody > tr:not("[mtxgrp]") td.questionnum').hide(); 388 | 389 | // Handle Matrix Groups 390 | $('.formtbody > tr[mtxgrp] td.questionnum').hide(); 391 | $('.formtbody > tr[mtxgrp] td.questionnummatrix').hide(); 392 | } 393 | } 394 | 395 | // Bring back the form 396 | if (typeof(Shazam.beforeDisplayCallback) === 'function' ) Shazam.beforeDisplayCallback(); 397 | $('#form').animate({opacity: 1}, 500); 398 | }; -------------------------------------------------------------------------------- /site/api/index-type=module&prefix=shazam&page=js|shazam.js.html: -------------------------------------------------------------------------------- 1 | // SHAZAM JS FILE USED FOR BOTH CONFIG AND ACTUAL ADMINISTRATION OF SHAZAM INSTRUMENTS 2 | var Shazam = Shazam || {}; 3 | 4 | 5 | // These counters are for when we need to delay transformation for dropdown auto-complete fields 6 | Shazam.maxTransformDelays = 5; 7 | Shazam.transformDelays = 0; 8 | Shazam.showDuration = Shazam.showDuration || 0; 9 | Shazam.hideDuration = Shazam.hideDuration || 0; 10 | 11 | // This is a callback that can be registered that you can call before Shazam displays the page 12 | Shazam.beforeDisplayCallback = Shazam.beforeDisplayCallback || null; 13 | 14 | 15 | 16 | /** 17 | * A utility function for highlighting fields in the data dictionary view 18 | */ 19 | Shazam.highlightFields = function() { 20 | Shazam.log("Highlight Fields"); 21 | $(Shazam.fields).each( function(i,e){ 22 | var tr = $('tr[sq_id="' + e + '"]'); 23 | if (tr.length) { 24 | var icon_div = $('.frmedit_icons', tr); 25 | var label = $('Shazam') 26 | .addClass("badge badge-info shazam-label") 27 | .attr("data-toggle", "tooltip") 28 | .attr("title", "The content of this field is generated by the Shazam External Module") 29 | .on('click', function() { 30 | event.stopPropagation(); 31 | }) 32 | .appendTo(icon_div); 33 | Shazam.log("Highlight Fields", e); 34 | } 35 | }); 36 | }; 37 | 38 | 39 | /** 40 | * A Logging wrapper to handle old IE versions 41 | */ 42 | Shazam.log = function() { 43 | 44 | if (!Shazam.isDev) return false; 45 | 46 | // Make console logging more resilient to Redmond 47 | try { 48 | console.log.apply(this,arguments); 49 | } catch(err) { 50 | // Error trying to apply logs to console (problem with IE11) 51 | try { 52 | console.log(arguments); 53 | 54 | } catch (err2) { 55 | // Can't even do that! Argh - no logging 56 | // var d = $('
').html(JSON.stringify(err)).appendTo($('body')); 57 | } 58 | } 59 | 60 | // } 61 | }; 62 | 63 | 64 | /** 65 | * Transform the page according to Shazam 66 | */ 67 | Shazam.Transform = function() { 68 | 69 | // Skip Shazam if some other module has set the 'DisableTransform' property to true... 70 | if (Shazam.DisableTransform) { 71 | // Turn the form back on as the EM turns it off on page load 72 | $('#form').animate({opacity: 1}, 250); 73 | return; 74 | } 75 | 76 | 77 | // Check if we need to delay execution for autocomplete dropdowns to be handled first... 78 | var ac_dropdowns = $('input.rc-autocomplete').length; 79 | var ac_dropdowns_processed = $('input.rc-autocomplete.ui-autocomplete-input').length; 80 | if (ac_dropdowns > ac_dropdowns_processed) { 81 | if (Shazam.transformDelays < Shazam.maxTransformDelays) { 82 | setTimeout(function () { 83 | Shazam.Transform() 84 | }, 5); 85 | 86 | // Increment number of processing delays 87 | Shazam.transformDelays ++; 88 | Shazam.log("Delaying Shazam (#" + Shazam.transformDelays + ") - waiting for autocomplete dropdowns to be processed..."); 89 | return; 90 | } else { 91 | Shazam.log ("Only " + ac_dropdowns_processed + " of " + ac_dropdowns + " autocomplete dropdowns processed after " + Shazam.transformDelays + " shazam transform delays. Moving forward anyhow but all autodropdowns may not work"); 92 | } 93 | } 94 | 95 | Shazam.log("Starting to Transform"); 96 | 97 | 98 | $(Shazam.params).each(function(i, obj) { 99 | var field_name = obj.field_name; 100 | var html_content = obj.html; 101 | 102 | // Get parent tr for destination field 103 | var shazam_target_tr = $('tr[sq_id="' + field_name + '"]'); 104 | 105 | // // Add shazam-row class to tr (not sure why this was done...) 106 | // $(shazam_target_tr).addClass('shazam-row'); 107 | 108 | // Get the last td in the descriptive tr to inject the Shazam HTML code 109 | var shazam_target = $('td:last-child', shazam_target_tr); 110 | Shazam.log(field_name + " is Shazam target", shazam_target); 111 | 112 | // Set the html according to the parameters 113 | $(shazam_target).html(html_content); 114 | 115 | // Loop through HTML content and substitute in native page content 116 | $('.shazam', shazam_target).each(function () { 117 | 118 | // Shazam.log("Shazam Insert:",this); 119 | var nodeValue = trim($(this).text()); // The text inside the node 120 | var matches = nodeValue.split(':'); // Parse if there is a ":" delimiter 121 | var search_field = matches[0]; // field_name 122 | var search_option = matches[1]; // label is only supported option now 123 | Shazam.log(field_name, search_field, search_option, nodeValue); 124 | 125 | // Find the 'real tr' for the field to be relocated 126 | var source_tr = $("tr[sq_id='" + search_field + "']"); 127 | 128 | // Make sure field is present on page 129 | if (source_tr.length === 0) { 130 | Shazam.log(field_name + ": Unable to find shazam-specified field " + search_field); 131 | return; 132 | } 133 | 134 | // Okay - this is the harder part. REDCap doesn't have any defined classes that 135 | // make it easy to parse out the various parts of a question, so we have to deal 136 | // with all the possiblities... 137 | // 138 | // label 139 | // input(s) 140 | // and potentially the 'icons' 141 | // 142 | // I just created a test project with a bunch of combinations to try and make this better 143 | 144 | var label; 145 | var data; 146 | 147 | // Look for non-Matrix groups 148 | 149 | // WE CAN DETERMINE IF THE ROW IS LEFT OR RIGHT BASED ON COLSPAN OF TDS 150 | var align; 151 | 152 | if (Shazam.isSurvey) { 153 | align = (source_tr.children('td').length === 2) ? "left": "right"; 154 | } else { 155 | align = (source_tr.children('td').length === 1) ? "left": "right"; 156 | } 157 | 158 | Shazam.log(search_field + " alignment: " + align, "td count: " + source_tr.children('td').length); 159 | 160 | // Check to see if we need to parse the label 161 | if (search_option === 'label') { 162 | Shazam.log(search_field + " Label Search in tr", source_tr); 163 | 164 | var source_label; 165 | if (source_tr.attr('mtxgrp')) { 166 | Shazam.log(search_field + " is a MATRIX"); 167 | var label_e; 168 | // For a matrix, the label is in the second 169 | if (Shazam.isSurvey) { 170 | label_e = source_tr.find('table:first').find('td:first').find('label'); 171 | } else { 172 | label_e = source_tr.find('table:first').find('td:first').find('label').find('td:first'); 173 | } 174 | if (label_e.length) source_label = label_e.html().trim(); 175 | } else { 176 | 177 | // Not a matrix 178 | if (Shazam.isSurvey && source_tr.find('td').not('.questionnum').find('label').length > 0) { 179 | Shazam.log(search_field + ' Label1'); 180 | source_label = source_tr.find('td').not('.questionnum').find('label').html().trim(); 181 | } else if ($('table[role="presentation"]', source_tr).find('td:first-child').length > 0) { 182 | Shazam.log(search_field + ' Label2'); 183 | source_label = $('table[role="presentation"]', source_tr).find('td:first-child').html().trim(); 184 | } else if (align === "left" && source_tr.children('td').not('.questionnum').length === 1) { 185 | // } else if (align === "left" && source_tr.children('td').length === 1) { 186 | Shazam.log(search_field + ' Label3'); 187 | // descriptive text field trs have exactly one immediate child td 188 | // (which may contain other tables with tds) 189 | source_label = source_tr.find('td').not('.questionnum').first().html().trim(); 190 | } else if ($('.sldrparent', source_tr).length > 0) { 191 | Shazam.log(search_field + ' Label3'); 192 | // Is a slider 193 | source_label = source_tr.find('label:first').html(); 194 | } else if ($("#label-" + search_field + " td:first").length > 0) { 195 | Shazam.log(search_field + ' Label4'); 196 | source_label = $("#label-" + search_field + " td:first").html().trim(); 197 | } else { 198 | Shazam.log(search_field + ' Label5'); 199 | // Last resort - set label to field 200 | source_label = $("#label-" + search_field).html(); 201 | } 202 | Shazam.log(search_field + " Source Label", source_label); 203 | } 204 | 205 | // COPY label to the shazam cell 206 | // $(this).html(source_label.clone()).addClass('shazam_label'); 207 | $(this).html(source_label).addClass('shazam_label'); 208 | 209 | } else { 210 | // PROCESS DATA (not doing a special option 211 | 212 | var source_data; 213 | 214 | if (source_tr.attr('mtxgrp')) { 215 | Shazam.log(search_field + " is a MATRIX"); 216 | var header_table = $('#' + source_tr.attr('mtxgrp') + '-mtxhdr-tr').find('table:first').clone(); 217 | header_table.find('td:first').remove(); 218 | var data_table = source_tr.find('table:first').clone(); 219 | data_table.find('td:first').remove(); 220 | 221 | source_data = $("
").append(header_table).append(data_table); 222 | // source_data = data_table; 223 | } else if (align === "right") { 224 | // Vanilla- take the td.data 225 | source_data = $("td.data", source_tr).children(); 226 | Shazam.log(search_field + " AlignRight - using td.data", source_tr); 227 | } else if ($('a.fileuploadlink', source_tr).length > 0) { 228 | Shazam.log(search_field + " FileUpload"); 229 | // This is a file upload field which needs an exception 230 | source_data = source_tr.find("td").not('questionnum').find('label').nextAll(); 231 | } else { 232 | Shazam.log(search_field + " LeftCatchAll"); 233 | 234 | // This rule handles the majority of left-aligned fields 235 | // Take everything after the div.space separator 236 | source_data = source_tr.find("td").not('questionnum').find("div.space").nextAll(); 237 | 238 | // source_data = source_tr.find("td:first").find("div.space").nextAll(); 239 | } 240 | 241 | 242 | // If we still didn't find anything - then lets log an error and continue 243 | if (!source_data.length) { 244 | Shazam.log(field_name + " ERROR finding td for " + search_field + " in shazam config"); 245 | return true; 246 | } 247 | 248 | // Adjust width of some non-hidden inputs 249 | $("input[type!='hidden']", source_data.parent()).each(function (i, e) { 250 | Shazam.log(search_field + " non-hidden inputs", i, e); 251 | var type = $(e).prop('type'); 252 | 253 | // Left aligned stuff has a rci-left class... going to leave it for now. 254 | if ($(e).hasClass("rci-left")) $(e).removeClass('rci-left').addClass('rci-left-shazam'); 255 | 256 | // TODO: NOT SURE IF THIS IS REALLY NEEDED STILL 257 | // if (type == 'text' && $(this).css('width') != '0px') $(this).css({'width': ''});//,'max-width':'90%'}); 258 | 259 | if (type === 'textarea') $(this).css('width', '95%'); 260 | }); 261 | 262 | 263 | // Move reset buttons to left 264 | var r = $("a", source_data).filter(function (index) { 265 | return $(this).text() === "reset"; 266 | }).parent().css('text-align', 'left'); 267 | 268 | 269 | 270 | // Add Data History & Field Comment Log/Data Resolution Workflow icons -- doesn't work for matrix! 271 | if (Shazam.isSurvey === false && (Shazam.displayIcons === true || $(this).hasClass('shazam-icons'))) { 272 | // Place the icons into a span tag so you can do CSS to control their wrapping 273 | Shazam.log(search_field + " Adding DisplayIcons!", source_tr); 274 | 275 | var trp; 276 | 277 | if (source_tr.attr('mtxgrp')) { 278 | trp = $('table[role="presentation"]:last', source_tr) 279 | } else if (source_tr.hasClass('sliderlabels')) { 280 | Shazam.log(search_field + " skipping Slider Icons"); 281 | } else { 282 | // This new version only supports the presentation table wrapper! 283 | trp = $('table[role="presentation"]:first', source_tr); 284 | } 285 | 286 | if (trp.length) { 287 | // Replace the first TD with the data 288 | trp.find('td:first').html(source_data); 289 | $(this).html(trp); 290 | } 291 | } else { 292 | // Move Contents of source to shazam cell 293 | Shazam.log(search_field + " moving data into " + field_name, source_data); 294 | $(this).html(source_data); 295 | } 296 | } 297 | 298 | 299 | // Hide the source TRs. (two methods here) 300 | //$(real_tr).css('display','none'); 301 | 302 | if (source_tr.attr('mtxgrp')) { 303 | var mtx_header = $('#' + source_tr.attr('mtxgrp') + '-mtxhdr-tr:visible'); 304 | if (mtx_header.length) { 305 | Shazam.log("HIDING MATRIX HEADER", mtx_header); 306 | mtx_header.css({"position":"absolute","width":"0px !important","height": "0px !important","opacity":"0"}); 307 | } 308 | } 309 | 310 | $(source_tr).css({"position":"absolute","width":"0px !important","height": "0px !important","opacity":"0"}).addClass('shazam-vanished'); //, "left":"-8000px"}); 311 | }); 312 | 313 | // Look for shazam-mirror-visibility 314 | // This feature allows you to make a DOM element mirror the visibility of another element. 315 | $('td.labelrc *[data-shazam-mirror-visibility]', shazam_target_tr).each(function () { 316 | Shazam.log ('dependent mirror-viz element', this); 317 | 318 | // The 'shazam' element that will be hidden/shown 319 | var mirror_element = this; 320 | 321 | // The redcap field that controls the mirror_element 322 | var mirror_source_field = $(this).data('shazam-mirror-visibility'); 323 | 324 | // Get the 'source' tr 325 | var mirror_source_tr = $("tr[sq_id='" + mirror_source_field + "']"); 326 | 327 | Shazam.log("Checking mirror for " + mirror_source_field); 328 | 329 | // Make sure field is present on page 330 | if (!mirror_source_tr.length) { 331 | Shazam.log("Unable to mirror visibility of field that isn't on this page: " + mirror_source_field); 332 | return true; 333 | } 334 | 335 | // Do an initial sync of the visibilty 336 | if (mirror_source_tr.is(':visible')) { 337 | Shazam.log("Visible"); 338 | $(mirror_element).show(Shazam.showDuration); 339 | } else { 340 | Shazam.log("Invisible"); 341 | $(mirror_element).hide(Shazam.hideDuration); 342 | } 343 | 344 | // Create observer that maintains the sync going forward 345 | var observer = new MutationObserver(function (mutations) { 346 | var target = mutations[0].target; 347 | Shazam.log("MutationObserver", mutations,target); 348 | if ($(target).is(':visible')) { 349 | Shazam.log('showing ', mirror_element); 350 | $(mirror_element).show(Shazam.showDuration); 351 | } else { 352 | Shazam.log('hiding ', mirror_element); 353 | $(mirror_element).hide(Shazam.hideDuration); 354 | } 355 | }); 356 | 357 | // Attach observer to target 358 | var target = $(mirror_source_tr)[0]; 359 | observer.observe(target, { 360 | attributes: true 361 | }); 362 | //Shazam.log ("shazam-mirror-visibility"); 363 | //Shazam.log(this); 364 | }); 365 | 366 | }); 367 | 368 | // If is survey and all questionnum (left column) are empty, then hide them 369 | if (Shazam.isSurvey) { 370 | var allEmpty = true; 371 | 372 | // Kludgy way to look through all the first TDs to see if they have text (e.g. question numbers) 373 | $('td.questionnum').parent().not('.shazam-vanished').find('td.questionnum').each(function(){ 374 | if($(this).text() !== "") { 375 | Shazam.log("this is not empty",this); 376 | allEmpty = false; 377 | } 378 | }); 379 | if (allEmpty) { 380 | Shazam.log("all td.questionnum are empty"); 381 | 382 | // Per issue #18, we do not want to hide questionnum that are in the first header td of a matrix 383 | // https://stackoverflow.com/questions/6784741/how-to-select-an-element-which-parent-is-not-specified-class 384 | // $('.formtbody > tr:not("[mtxgrp]") td.questionnum').hide(); 385 | 386 | // Handle non-matrix groups 387 | $('.formtbody > tr:not("[mtxgrp]") td.questionnum').hide(); 388 | 389 | // Handle Matrix Groups 390 | $('.formtbody > tr[mtxgrp] td.questionnum').hide(); 391 | $('.formtbody > tr[mtxgrp] td.questionnummatrix').hide(); 392 | } 393 | } 394 | 395 | // Bring back the form 396 | if (typeof(Shazam.beforeDisplayCallback) === 'function' ) Shazam.beforeDisplayCallback(); 397 | $('#form').animate({opacity: 1}, 500); 398 | }; -------------------------------------------------------------------------------- /code/jSignature.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | jSignature v2 "2018-11-06T13:56" "commit ID 89c22b348ab2e1d92a928d8fd992f175e8bc5cbd" 4 | Copyright (c) 2012 Willow Systems Corp http://willow-systems.com 5 | Copyright (c) 2010 Brinley Ang http://www.unbolt.net 6 | MIT License 7 | 8 | 9 | Simplify.js BSD 10 | (c) 2012, Vladimir Agafonkin 11 | mourner.github.com/simplify-js 12 | 13 | 14 | base64 encoder 15 | MIT, GPL 16 | http://phpjs.org/functions/base64_encode 17 | + original by: Tyler Akins (http://rumkin.com) 18 | + improved by: Bayron Guevara 19 | + improved by: Thunder.m 20 | + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) 21 | + bugfixed by: Pellentesque Malesuada 22 | + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) 23 | + improved by: Rafal Kukawski (http://kukawski.pl) 24 | 25 | 26 | jSignature v2 jSignature's Undo Button and undo functionality plugin 27 | 28 | 29 | jSignature v2 jSignature's custom "base30" format export and import plugins. 30 | 31 | 32 | jSignature v2 SVG export plugin. 33 | 34 | */ 35 | (function(){function q(a){var b=a.css("color"),c;a=a[0];for(var g=!1;a&&!c&&!g;){try{var d=$(a).css("background-color")}catch(l){d="transparent"}"transparent"!==d&&"rgba(0, 0, 0, 0)"!==d&&(c=d);g=a.body;a=a.parentNode}a=/rgb[a]*\((\d+),\s*(\d+),\s*(\d+)/;g=/#([AaBbCcDdEeFf\d]{2})([AaBbCcDdEeFf\d]{2})([AaBbCcDdEeFf\d]{2})/;d=void 0;if(d=b.match(a))var m={r:parseInt(d[1],10),g:parseInt(d[2],10),b:parseInt(d[3],10)};else(d=b.match(g))&&(m={r:parseInt(d[1],16),g:parseInt(d[2],16),b:parseInt(d[3],16)}); 36 | if(c)if(d=void 0,d=c.match(a))var e={r:parseInt(d[1],10),g:parseInt(d[2],10),b:parseInt(d[3],10)};else(d=c.match(g))&&(e={r:parseInt(d[1],16),g:parseInt(d[2],16),b:parseInt(d[3],16)});else e=m?127
').appendTo(g);this.isCanvasEmulator=!1;b=this.canvas=this.initializeCanvas(e);c=$(b);this.$controlbarLower=$('
').appendTo(g); 45 | this.canvasContext=b.getContext("2d");c.data("jSignature.this",this);e.lineWidth=function(a,b){return a?a:Math.max(Math.round(b/400),2)}(e.lineWidth,b.width);this.lineCurveThreshold=3*e.lineWidth;e.cssclass&&""!=$.trim(e.cssclass)&&c.addClass(e.cssclass);this.fatFingerCompensation=0;g=function(a){var b,c,d=function(d){d=d.changedTouches&&0e.minFatFingerCompensation?-3*e.lineWidth:e.minFatFingerCompensation;b(g);m?(d.addEventListener("touchend",a),d.addEventListener("touchstart",b),d.addEventListener("touchmove",c)): 48 | (d.ontouchend=a,d.ontouchstart=b,d.ontouchmove=c)};m?d.addEventListener("touchstart",this.ontouchstart):d.ontouchstart=ontouchstart;d.onmousedown=function(g){m?d.removeEventListener("touchstart",this.ontouchstart):d.ontouchstart=d.ontouchend=d.ontouchmove=void 0;b(g);d.onmousedown=b;d.onmouseup=a;d.onmousemove=c};window.navigator.msPointerEnabled&&(d.onmspointerdown=b,d.onmspointerup=a,d.onmspointermove=c)}}).call(this,g.drawEndHandler,g.drawStartHandler,g.drawMoveHandler);a["jSignature.windowmouseup"]= 49 | d.subscribe("jSignature.windowmouseup",g.drawEndHandler);this.events.publish("jSignature.attachingEventHandlers");n.call(this,this,e.width.toString(10),"jSignature",d);this.resetCanvas(e.data);this.events.publish("jSignature.initialized");return this}function x(a){if(a.getContext)return!1;var b=a.ownerDocument.parentWindow,c=b.FlashCanvas?a.ownerDocument.parentWindow.FlashCanvas:"undefined"===typeof FlashCanvas?void 0:FlashCanvas;if(c){a=c.initElement(a);c=1;b&&b.screen&&b.screen.deviceXDPI&&b.screen.logicalXDPI&& 50 | (c=1*b.screen.deviceXDPI/b.screen.logicalXDPI);if(1!==c)try{$(a).children("object").get(0).resize(Math.ceil(a.width*c),Math.ceil(a.height*c)),a.getContext("2d").scale(c,c)}catch(g){}return!0}throw Error("Canvas element does not support 2d context. jSignature cannot proceed.");}var v=function(a,b){var c;this.kick=function(){clearTimeout(c);c=setTimeout(b,a)};this.clear=function(){clearTimeout(c)};return this},u=function(a){this.topics={};this.context=a?a:this;this.publish=function(a,c,g,d){if(this.topics[a]){var b= 51 | this.topics[a],e=Array.prototype.slice.call(arguments,1),f=[],h=[],t;var k=0;for(t=b.length;kthis.lineCurveThreshold){var l= 53 | 2this.lineCurveThreshold)if(1').appendTo(this.$controlbarLower),k=h.width();h.css("left",Math.round((this.canvas.width-k)/2));k!==h.width()&&h.width(k);return h});q.call(this,h,"jSignature",k)}})})})(); 68 | (function(){for(var q={},k={},h="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWX".split(""),p=h.length/2,n=p-1;-1f&&0c&&(c=1,a.push("Y")),d=Math.abs(f),d>=p?a.push(w(d.toString(p))):a.push(d.toString(p));return a.join("")},v=function(e){var a= 69 | [];e=e.split("");for(var b=e.length,c,g=1,d=[],f=0,h=0;ha?(a=2e){a=(new k(f.x[a-2],f.y[a-2])).getVectorToPoint(c);c=b.angleTo(a.reverse());var g=.35*b.getLength();a=(new q(a.x+b.x,a.y+b.y)).resizeTo(Math.max(.05,c)*g);return["c",h(a.x,2),h(a.y,2),h(b.x, 76 | 2),h(b.y,2),h(b.x,2),h(b.y,2)]}return["l",h(b.x,2),h(b.y,2)]}function w(f,e,a){e=["M",h(f.x[0]-e,2),h(f.y[0]-a,2)];a=1;for(var b=f.x.length-1;a',''],b,c=f.length,g,d=[],h=[],k=g=b=0,l=0,p=[];if(0!==c){for(b=0;bc?0:c;l=0>d?0:d;b-=c;g=h-d}a.push('');b=0;for(c=p.length;b');a.push("");return a.join("")}function u(f,e){return["image/svg+xml",v(f,e)]}function y(f,e){return["image/svg+xml;base64",C(v(f,e))]}(function(f,e){"use strict"; 79 | f.simplify=function(a,b,c){b=b!==e?b*b:1;if(!c){var g=a.length,d=a[0],f=[d];for(c=1;cb&&(f.push(h),d=h)}a=(d!==h&&f.push(h),f)}h=a;c=h.length;g=new (typeof Uint8Array!=e+""?Uint8Array:Array)(c);d=0;f=c-1;var p,q=[],r=[],y=[];for(g[d]=g[f]=1;f;){n=0;for(k=d+1;kn&&(p=k,n=A)}n>b&&(g[p]=1,q.push(d),r.push(p),q.push(p),r.push(f));d=q.pop();f=r.pop()}for(k=0;k>18&63;d=k>>12&63;h=k>>6&63;k&=63;c[b++]=e[g]+e[d]+e[h]+e[k]}while(a 7 | 8 | 9 | Simplify.js BSD 10 | (c) 2012, Vladimir Agafonkin 11 | mourner.github.com/simplify-js 12 | 13 | 14 | base64 encoder 15 | MIT, GPL 16 | http://phpjs.org/functions/base64_encode 17 | + original by: Tyler Akins (http://rumkin.com) 18 | + improved by: Bayron Guevara 19 | + improved by: Thunder.m 20 | + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) 21 | + bugfixed by: Pellentesque Malesuada 22 | + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) 23 | + improved by: Rafal Kukawski (http://kukawski.pl) 24 | 25 | 26 | jSignature v2 jSignature's Undo Button and undo functionality plugin 27 | 28 | 29 | jSignature v2 jSignature's custom "base30" format export and import plugins. 30 | 31 | 32 | jSignature v2 SVG export plugin. 33 | 34 | */ 35 | (function(){function q(a){var b=a.css("color"),c;a=a[0];for(var g=!1;a&&!c&&!g;){try{var d=$(a).css("background-color")}catch(l){d="transparent"}"transparent"!==d&&"rgba(0, 0, 0, 0)"!==d&&(c=d);g=a.body;a=a.parentNode}a=/rgb[a]*\((\d+),\s*(\d+),\s*(\d+)/;g=/#([AaBbCcDdEeFf\d]{2})([AaBbCcDdEeFf\d]{2})([AaBbCcDdEeFf\d]{2})/;d=void 0;if(d=b.match(a))var m={r:parseInt(d[1],10),g:parseInt(d[2],10),b:parseInt(d[3],10)};else(d=b.match(g))&&(m={r:parseInt(d[1],16),g:parseInt(d[2],16),b:parseInt(d[3],16)}); 36 | if(c)if(d=void 0,d=c.match(a))var e={r:parseInt(d[1],10),g:parseInt(d[2],10),b:parseInt(d[3],10)};else(d=c.match(g))&&(e={r:parseInt(d[1],16),g:parseInt(d[2],16),b:parseInt(d[3],16)});else e=m?127
').appendTo(g);this.isCanvasEmulator=!1;b=this.canvas=this.initializeCanvas(e);c=$(b);this.$controlbarLower=$('
').appendTo(g); 45 | this.canvasContext=b.getContext("2d");c.data("jSignature.this",this);e.lineWidth=function(a,b){return a?a:Math.max(Math.round(b/400),2)}(e.lineWidth,b.width);this.lineCurveThreshold=3*e.lineWidth;e.cssclass&&""!=$.trim(e.cssclass)&&c.addClass(e.cssclass);this.fatFingerCompensation=0;g=function(a){var b,c,d=function(d){d=d.changedTouches&&0e.minFatFingerCompensation?-3*e.lineWidth:e.minFatFingerCompensation;b(g);m?(d.addEventListener("touchend",a),d.addEventListener("touchstart",b),d.addEventListener("touchmove",c)): 48 | (d.ontouchend=a,d.ontouchstart=b,d.ontouchmove=c)};m?d.addEventListener("touchstart",this.ontouchstart):d.ontouchstart=ontouchstart;d.onmousedown=function(g){m?d.removeEventListener("touchstart",this.ontouchstart):d.ontouchstart=d.ontouchend=d.ontouchmove=void 0;b(g);d.onmousedown=b;d.onmouseup=a;d.onmousemove=c};window.navigator.msPointerEnabled&&(d.onmspointerdown=b,d.onmspointerup=a,d.onmspointermove=c)}}).call(this,g.drawEndHandler,g.drawStartHandler,g.drawMoveHandler);a["jSignature.windowmouseup"]= 49 | d.subscribe("jSignature.windowmouseup",g.drawEndHandler);this.events.publish("jSignature.attachingEventHandlers");n.call(this,this,e.width.toString(10),"jSignature",d);this.resetCanvas(e.data);this.events.publish("jSignature.initialized");return this}function x(a){if(a.getContext)return!1;var b=a.ownerDocument.parentWindow,c=b.FlashCanvas?a.ownerDocument.parentWindow.FlashCanvas:"undefined"===typeof FlashCanvas?void 0:FlashCanvas;if(c){a=c.initElement(a);c=1;b&&b.screen&&b.screen.deviceXDPI&&b.screen.logicalXDPI&& 50 | (c=1*b.screen.deviceXDPI/b.screen.logicalXDPI);if(1!==c)try{$(a).children("object").get(0).resize(Math.ceil(a.width*c),Math.ceil(a.height*c)),a.getContext("2d").scale(c,c)}catch(g){}return!0}throw Error("Canvas element does not support 2d context. jSignature cannot proceed.");}var v=function(a,b){var c;this.kick=function(){clearTimeout(c);c=setTimeout(b,a)};this.clear=function(){clearTimeout(c)};return this},u=function(a){this.topics={};this.context=a?a:this;this.publish=function(a,c,g,d){if(this.topics[a]){var b= 51 | this.topics[a],e=Array.prototype.slice.call(arguments,1),f=[],h=[],t;var k=0;for(t=b.length;kthis.lineCurveThreshold){var l= 53 | 2this.lineCurveThreshold)if(1').appendTo(this.$controlbarLower),k=h.width();h.css("left",Math.round((this.canvas.width-k)/2));k!==h.width()&&h.width(k);return h});q.call(this,h,"jSignature",k)}})})})(); 68 | (function(){for(var q={},k={},h="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWX".split(""),p=h.length/2,n=p-1;-1f&&0c&&(c=1,a.push("Y")),d=Math.abs(f),d>=p?a.push(w(d.toString(p))):a.push(d.toString(p));return a.join("")},v=function(e){var a= 69 | [];e=e.split("");for(var b=e.length,c,g=1,d=[],f=0,h=0;ha?(a=2e){a=(new k(f.x[a-2],f.y[a-2])).getVectorToPoint(c);c=b.angleTo(a.reverse());var g=.35*b.getLength();a=(new q(a.x+b.x,a.y+b.y)).resizeTo(Math.max(.05,c)*g);return["c",h(a.x,2),h(a.y,2),h(b.x, 76 | 2),h(b.y,2),h(b.x,2),h(b.y,2)]}return["l",h(b.x,2),h(b.y,2)]}function w(f,e,a){e=["M",h(f.x[0]-e,2),h(f.y[0]-a,2)];a=1;for(var b=f.x.length-1;a',''],b,c=f.length,g,d=[],h=[],k=g=b=0,l=0,p=[];if(0!==c){for(b=0;bc?0:c;l=0>d?0:d;b-=c;g=h-d}a.push('');b=0;for(c=p.length;b');a.push("");return a.join("")}function u(f,e){return["image/svg+xml",v(f,e)]}function y(f,e){return["image/svg+xml;base64",C(v(f,e))]}(function(f,e){"use strict"; 79 | f.simplify=function(a,b,c){b=b!==e?b*b:1;if(!c){var g=a.length,d=a[0],f=[d];for(c=1;cb&&(f.push(h),d=h)}a=(d!==h&&f.push(h),f)}h=a;c=h.length;g=new (typeof Uint8Array!=e+""?Uint8Array:Array)(c);d=0;f=c-1;var p,q=[],r=[],y=[];for(g[d]=g[f]=1;f;){n=0;for(k=d+1;kn&&(p=k,n=A)}n>b&&(g[p]=1,q.push(d),r.push(p),q.push(p),r.push(f));d=q.pop();f=r.pop()}for(k=0;k>18&63;d=k>>12&63;h=k>>6&63;k&=63;c[b++]=e[g]+e[d]+e[h]+e[k]}while(a