// @flow import * as React from 'react'; import WebViewScreen from "../components/WebViewScreen"; import i18n from "i18n-js"; type Props = { navigation: Object, } const ROOM_URL = 'http://planex.insa-toulouse.fr/salles.php'; const PC_URL = 'http://planex.insa-toulouse.fr/sallesInfo.php'; const BIB_URL = 'https://bibbox.insa-toulouse.fr/'; const CUSTOM_CSS_GENERAL = 'https://srv-falcon.etud.insa-toulouse.fr/~amicale_app/custom_css/rooms/customMobile.css'; const CUSTOM_CSS_Bib = 'https://srv-falcon.etud.insa-toulouse.fr/~amicale_app/custom_css/rooms/customBibMobile.css'; /** * Class defining the app's planex screen. * This screen uses a webview to render the planex page */ export default class AvailableRoomScreen extends React.Component { customInjectedJS: string; customBibInjectedJS: string; constructor() { super(); this.customInjectedJS = 'document.querySelector(\'head\').innerHTML += \'\';' + 'document.querySelector(\'head\').innerHTML += \'\';' + 'let header = $(".table tbody tr:first");' + '$("table").prepend("");true;' + // Fix for crash on ios '$("thead").append(header);true;'; this.customBibInjectedJS = 'document.querySelector(\'head\').innerHTML += \'\';' + 'document.querySelector(\'head\').innerHTML += \'\';' + 'if ($(".hero-unit-form").length > 0 && $("#customBackButton").length === 0)' + '$(".hero-unit-form").append("' + '
' + '' + '' + '' + '
");true;'; } render() { const nav = this.props.navigation; return ( ); } }