index.html 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468
  1. <!DOCTYPE html>
  2. <html lang="fr" dir="ltr">
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>CanalPlus</title>
  6. <link rel="manifest" href="manifest.json">
  7. <meta name="viewport" content="width=device-width">
  8. <meta name="theme-color" content="#587b8c">
  9. <link rel="icon" href="favicon.ico">
  10. <link rel="shortcut icon" href="favicon.ico">
  11. <link rel="apple-touch-icon" href="img/iphone-icon.png">
  12. <!--<style type="text/css">
  13. body.hidden{
  14. visibility:hidden;
  15. background-color:#E3EAED;
  16. background-repeat:no-repeat;
  17. background-position-x:50%;
  18. background-position-y:50%;
  19. background-image:url(img/loading.svg)
  20. }
  21. </style>-->
  22. <link rel="stylesheet" href="css/canalbis.css" type="text/css" media="all">
  23. <noscript>
  24. <style type="text/css">body.nojs{visibility:visible;}</style>
  25. </noscript>
  26. <script src="js/jquery-3.2.1.min.js" defer></script>
  27. <script src="js/jquery-ui.min.js" defer></script>
  28. <!--https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.11/handlebars.min.js-->
  29. <script src="js/handlebars.min.js" defer></script>
  30. <script src="js/canalbis.js" defer></script>
  31. </head>
  32. <body class="nojs">
  33. <header>
  34. <section>
  35. <ul>
  36. <li><span class="modal-open btn">&#8651;</span></li>
  37. </ul>
  38. </section>
  39. <section>
  40. <nav>
  41. <div>
  42. <button aria-label="Ouvrir menu" class="bt-menu"><svg viewBox="0 0 459 459" enable-background="new 0 0 459 459"><path d="M0 382.5h459v-51h-459v51zm0-127.5h459v-51h-459v51zm0-178.5v51h459v-51h-459z"></path></svg></button>
  43. </div>
  44. <div>
  45. <button aria-label="Fermer menu" class="bt-menu-close">
  46. <svg viewBox="0 0 371.23 371.23" enable-background="new 0 0 371.23 371.23"><path d="M371.23 21.213l-21.212-21.213-164.403 164.402-164.402-164.402-21.213 21.213 164.402 164.402-164.402 164.403 21.213 21.212 164.402-164.402 164.403 164.402 21.212-21.212-164.402-164.403z"></path></svg>
  47. </button>
  48. </div>
  49. <div>
  50. <a href="#anomalies">Anomalies</a>
  51. </div>
  52. <div>
  53. <a href="#vannes">Vannes</a>
  54. </div>
  55. <div>
  56. <a href="#niveaux">Niveaux</a>
  57. </div>
  58. <div>
  59. <a href="#contacts">Contacts</a>
  60. </div>
  61. <div>
  62. <a href="#interventions">Interventions</a>
  63. </div>
  64. <div>
  65. <a href="#parametres">Paramètres</a>
  66. </div>
  67. </nav>
  68. </section>
  69. </header>
  70. <section class="main">
  71. <noscript>
  72. <h1>Appli canal de la Bruche</h1>
  73. Pour accéder à toutes les fonctionnalités de ce site, vous devez activer JavaScript. Voici les <a href="//www.enable-javascript.com/fr/" target="js">
  74. instructions pour activer JavaScript dans votre navigateur Web
  75. </a>
  76. </noscript>
  77. </section>
  78. <section class="footer-top">
  79. <pre class="results__display-wrapper"><code class="results-display"></code></pre>
  80. </section>
  81. <footer>
  82. <nav class="obs">
  83. <div><span class="modal-open">Alerte</span></div>
  84. <div></div>
  85. </nav>
  86. <span id="cRetour" class="cInvisible"></span>
  87. </footer>
  88. <section class="modal-background"></section>
  89. <section class="modal-content">
  90. <button class="data-sync" disabled>Sync</button>
  91. <div class="sync-result"></div>
  92. <br>
  93. <span class="modal-close">X</span>
  94. </section>
  95. <section class="modal-content-1" style="display:none">
  96. <form class="contact" enctype="multipart/form-data">
  97. <h2>Contact</h2>
  98. <aside>
  99. <input name="title" required placeholder="titre du message" type="text"><br>
  100. <input name="email" required placeholder="votre email message" type="email"><br>
  101. <textarea name="message" placeholder="votre message"></textarea><br>
  102. <input type="file" required id="imgfile" name="img" accept="image/*"><br>
  103. <input name="lat" id="input-lat" type="hidden"><input id="input-lng" name="lng" type="hidden">
  104. <button type="button" class="send-message">Envoyer</button>
  105. </aside>
  106. <span class="send-result"></span>
  107. <br>
  108. <span class="modal-close">X</span>
  109. </form>
  110. </section>
  111. <script id="parametres" type="x-tmpl-mustache">
  112. <h1>Paramètres</h1>
  113. <form class="data-form param" enctype="multipart/form-data">
  114. <div class="input-group">
  115. <label class="label" for="year_week">Campagne</label>
  116. <input class="input-text" id="year_week" name="year_week" type="text" />
  117. </div>
  118. <div class="input-group">
  119. <label class="label" for="user">Utilisateur</label>
  120. <select class="input-select" id="user" name="user">
  121. <option value="2">Clément VIX</option>
  122. <option value="4">Luc TIRARD</option>
  123. <option value="6">Freddy SITTLER</option>
  124. </select>
  125. </div>
  126. <div class="input-group">
  127. <label class="label" for="start">Heure de début d'astreinte</label>
  128. <input class="input-text" id="start" name="start" type="text" pattern="^(1?[0-9]|2[0-3]):[0-5][0-9]$" title="HH:MM" required/>
  129. </div>
  130. <div class="input-group">
  131. <label class="label" for="end">Heure de fin d'astreinte</label>
  132. <input class="input-text" id="end" name="end" type="text" pattern="^(1?[0-9]|2[0-3]):[0-5][0-9]$" title="HH:MM" required/>
  133. </div>
  134. <button class="button-submit btn btn-save" type="submit">Sauvegarder</button>
  135. </form>
  136. </script>
  137. <script id="niveaux" type="x-tmpl-mustache">
  138. <h1>Niveaux</h1>
  139. <h2>Créer un enregistrement</h2>
  140. <form class="data-form niveau" enctype="multipart/form-data">
  141. <div class="input-group">
  142. <label class="label" for="point">Point de relevé</label>
  143. <select class="input-select" id="point" name="point">
  144. <option value="ECH_S1">Station n°1 - Bief n°1</option>
  145. <option value="ECH_BA1">Echelle ouvrage AD</option>
  146. <option value="ECH_BA2">Echelle ouvrage AS</option>
  147. <option value="ECH_PA1">Echelle ouvrage PA1</option>
  148. <option value="ECH_E1">Echelle écluse n°1</option>
  149. <option value="ECH_E2">Echelle écluse n°2</option>
  150. <option value="ECH_E7">Echelle écluse n°7</option>
  151. <option value="ECH_S2">Station n°2 - Bief n°8</option>
  152. <option value="ECH_E8">Echelle écluse n°8</option>
  153. <option value="ECH_RD222">Echelle pont RD 222</option>
  154. <option value="ECH_S3">Station n°3 - Bief n°9</option>
  155. <option value="ECH_S4">Station n°4 - Bief n°11</option>
  156. <option value="ECH_E4">Echelle écluse n°4</option>
  157. <option value="ECH_PF">Echelle pont SNCF Bief 11</option>
  158. <option value="ECH_D6">Echelle déversoir D6</option>
  159. <option value="ECH_D11AM">Echelle amont D11</option>
  160. <option value="ECH_D11AV">Echelle aval D11</option>
  161. </select>
  162. </div>
  163. <div class="input-group">
  164. <label class="label" for="level">Niveau</label>
  165. <input class="input-text" id="level" name="level" type="number" title="doit être un numérique" required />
  166. </div>
  167. <button class="button-submit btn btn-save" type="submit">Sauvegarder</button>
  168. </form>
  169. {{#if data}}
  170. <button class="del btn btn-delete" disabled>Supprimer</button>
  171. <h2>Les données</h2>
  172. <table class="selectable">
  173. <thead>
  174. <tr><td>Camp</td><td>date</td><td>niv</td><td>pt</td></tr>
  175. </thead>
  176. <tbody>
  177. {{#data}}
  178. <tr data-id="{{tstamp}}" data-type="niveaux"><td>{{campaign}}</td><td>{{#todate}}{{tstamp}}{{/todate}}</td><td>{{level}}</td><td>{{point}}</td></tr>
  179. {{/data}}
  180. </tbody>
  181. </table>
  182. {{/if}}
  183. </script>
  184. <script id="anomalies" type="x-tmpl-mustache">
  185. <h1>Anomalie</h1>
  186. <h2>Créer un enregistrement</h2>
  187. <form class="data-form anomalie" enctype="multipart/form-data">
  188. <div class="input-group">
  189. <label class="label" for="type">Type</label>
  190. <select id="type" name="type">
  191. <option value="1">Obstacle à l'écoulement</option>,
  192. <option value="2">Obstacle au passage sur le domaine</option>,
  193. <option value="3">Dégradation ouvrage</option>,
  194. <option value="4">Dégradation hors ouvrage</option>,
  195. <option value="5">Occupation illicite du Domaine</option>,
  196. <option value="6">Autre</option>
  197. </select>
  198. </div>
  199. <div class="input-group">
  200. <label class="label" for="desc">Description</label>
  201. <textarea id="desc" name="desc" rows="6" required></textarea>
  202. <input type="hidden" id="coordinates" name="coordinates" required>
  203. </div>
  204. <div class="input-group-img">
  205. <div class="input-group img-group" id="img-group">
  206. <label class="label" for="imgfile">Photo</label>
  207. <input class="input-file input-file-img btn" type="file" name="img" accept="image/*" capture><br>
  208. <input type="hidden" name="imgdata" class="hidden-file-img" value="">
  209. <img src="#" class="img-preview" width="128" />
  210. <button class="file-del btn btn-delete">Supprimer</button>
  211. </div>
  212. </div>
  213. <div>
  214. <button class="btn btn-duplicate btn-img">Ajouter une image</button>
  215. </div>
  216. <button class="button-submit btn btn-save" type="submit">Sauvegarder</button>
  217. </form>
  218. <h2>Les données</h2>
  219. {{#if data}}
  220. <button class="del btn btn-delete" disabled>Supprimer</button>
  221. <table class="selectable">
  222. <thead>
  223. <tr><td>date</td><td>type</td><td>desc</td></tr>
  224. </thead>
  225. <tbody>
  226. {{#data}}
  227. <tr data-id="{{tstamp}}" data-type="anomalies"><td>{{#todate}}{{tstamp}}{{/todate}}</td><td>{{type}}</td><td>{{desc}}</td></tr>
  228. {{/data}}
  229. </tbody>
  230. </table>
  231. {{/if}}
  232. </script>
  233. <script id="index" type="x-tmpl-mustache">
  234. <h1>Canal de la Bruche</h1>
  235. <div class="home-pp">
  236. <a href="#anomalies">
  237. <div>
  238. <picture>
  239. <source type="image/svg+xml" srcset="img/alert.svg" media="(min-width:240px)">
  240. <img src="img/alert.png" width="224" alt="" />
  241. </picture><h3>
  242. Anomalies
  243. </h3>
  244. </div>
  245. </a>
  246. <a href="#vannes">
  247. <div>
  248. <picture>
  249. <source type="image/svg+xml" srcset="img/valve.svg" media="(min-width:240px)">
  250. <img src="img/valve.png" width="224" alt="" />
  251. </picture><h3>
  252. Vannes
  253. </h3>
  254. </div>
  255. </a>
  256. <a href="#niveaux">
  257. <div>
  258. <picture>
  259. <source type="image/svg+xml" srcset="img/levels.svg" media="(min-width:240px)">
  260. <img src="img/levels.png" width="224" alt="" />
  261. </picture><h3>
  262. Niveaux
  263. </h3>
  264. </div>
  265. </a>
  266. </div>
  267. <div class="home-pp">
  268. <a href="#contacts">
  269. <div>
  270. <picture>
  271. <source type="image/svg+xml" srcset="img/add-contact.svg" media="(min-width:240px)">
  272. <img src="img/add-contact.png" width="224" alt="" />
  273. </picture>
  274. <h3>
  275. Contacts
  276. </h3>
  277. </div>
  278. </a>
  279. <a href="#interventions">
  280. <div>
  281. <picture>
  282. <source type="image/svg+xml" srcset="img/intervention.svg" media="(min-width:240px)">
  283. <img src="img/intervention.png" width="224" alt="" />
  284. </picture>
  285. <h3>
  286. Interventions
  287. </h3>
  288. </div>
  289. </a>
  290. <a href="#parametres">
  291. <div>
  292. <picture>
  293. <source type="image/svg+xml" srcset="img/high-voltage.svg" media="(min-width:240px)">
  294. <img src="img/high-voltage.png" width="224" alt="" />
  295. </picture>
  296. <h3>
  297. Paramètres
  298. </h3>
  299. </div>
  300. </a>
  301. </div>
  302. </script>
  303. <script id="interventions" type="x-tmpl-mustache">
  304. <h1>Interventions</h1>
  305. {{#if contact}}
  306. <select class="select-contact">
  307. <option>Sélection du contact à avertir</option>
  308. {{#contact}}
  309. {{#if mobile}}
  310. {{#if_eq mobile}}
  311. <option value="{{phone}}" selected>{{name}} {{firstname}}</option>
  312. {{else}}
  313. <option value="{{phone}}">{{name}} {{firstname}}</option>
  314. {{/if_eq}}
  315. {{/if}}
  316. {{/contact}}
  317. </select>
  318. {{/if}}
  319. {{#if intervention}}
  320. <div>
  321. <a href="sms:{{intervention}}?body=début d'intervention" data-ng-message="début d'intervention" class="intervention-start btn" data-type="start">Début</>
  322. <a href="sms:{{intervention}}?body=fin d'intervention" data-ng-message="fin d'intervention" class="intervention-end btn" data-type="end">Fin</a>
  323. </div>
  324. {{/if}}
  325. </script>
  326. <script id="contacts" type="x-tmpl-mustache">
  327. <h1>Contacts</h1>
  328. {{#if contact}}
  329. <ul class="list-contact">
  330. {{#contact}}
  331. <li>
  332. {{#if email}}
  333. <a href="mailto:{{email}}?subject=De canalplus" class="btn">&#9993;</a>
  334. {{/if}}
  335. <a href="tel:{{phone}}" class="btn">&#x260E;</a>
  336. {{#if mobile}}
  337. <a href="sms:{{phone}}?body=De canalplus" class="btn">&#128489;</a>
  338. {{/if}}
  339. {{name}} {{firstname}}
  340. </li>
  341. {{/contact}}
  342. </ul>
  343. {{/if}}
  344. </script>
  345. <script id="vannes" type="x-tmpl-mustache">
  346. <h1>Vannes</h1>
  347. <h2>Créer un enregistrement</h2>
  348. <form class="data-form vanne" enctype="multipart/form-data">
  349. <div class="input-group">
  350. <label class="label" for="point">Ouvrage</label>
  351. <select class="input-select" id="point" name="point">
  352. <option value="PA1">PA1</option>
  353. <option value="AD">AD</option>
  354. </select>
  355. </div>
  356. <div class="input-group">
  357. <label class="label" for="valve">Ouvrage</label>
  358. <select class="input-select" id="valve" name="valve">
  359. <option value="Ouverture vanne alimentation">Ouverture vanne alimentation</option>
  360. <option value="Ouverture vanne 1">Ouverture vanne 1</option>
  361. <option value="Ouverture vanne 2">Ouverture vanne 2</option>
  362. <option value="Ouverture vanne 3">Ouverture vanne 3</option>
  363. </select>
  364. </div>
  365. <div class="input-group">
  366. <label class="label" for="level">Niveau</label>
  367. <input class="input-text" id="level" name="level" type="number" title="doit être un numérique" required />
  368. </div>
  369. <button class="button-submit btn btn-save" type="submit">Sauvegarder</button>
  370. </form>
  371. <h2>Les données</h2>
  372. {{#if data}}
  373. <button class="del btn btn-delete" disabled>Supprimer</button>
  374. <table class="selectable">
  375. <thead>
  376. <tr><td>camp</td><td>date</td><td>niv</td><td>pt</td><td>vanne</td></tr>
  377. </thead>
  378. <tbody>
  379. {{#data}}
  380. <tr data-id="{{tstamp}}" data-type="vannes"><td>{{campaign}}</td><td>{{#todate}}{{tstamp}}{{/todate}}</td><td>{{level}}</td><td>{{point}}</td><td>{{valve}}</td></tr>
  381. {{/data}}
  382. </tbody>
  383. </tableclass="selectable">
  384. {{/if}}
  385. </script>
  386. </body>
  387. </html>